From d85f087ecc800e03a843dbc7bceaa02c81f0fee7 Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Fri, 26 May 2023 20:53:20 +0700 Subject: [PATCH 01/58] feat(contracts): claimDelay calculation --- .../deploy/01-outbox/01-arb-to-eth-outbox.ts | 27 +++++-------------- .../01-outbox/01-arb-to-gnosis-outbox.ts | 12 ++++----- .../src/arbitrumToEth/VeaOutboxArbToEth.sol | 21 ++++++++++----- contracts/src/canonical/arbitrum/IBridge.sol | 2 ++ .../canonical/arbitrum/ISequencerInbox.sol | 22 +++++++++++++++ 5 files changed, 51 insertions(+), 33 deletions(-) create mode 100644 contracts/src/canonical/arbitrum/ISequencerInbox.sol diff --git a/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts b/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts index ed9a9202..bb25b22e 100644 --- a/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts @@ -10,29 +10,14 @@ enum ReceiverChains { } const paramsByChainId = { ETHEREUM_MAINNET: { - deposit: parseEther("20"), // 1000 ETH budget to start, enough for 21 days till timeout - // Average happy path wait time is 42 hours (36, 48 hours) - epochPeriod: 43200, // 12 hours - claimDelay: 108000, // 30 hours (24 hours sequencer backdating + 6 hour buffer) - challengePeriod: 21600, // 6 hours - numEpochTimeout: 42, // 21 days - maxMissingBlocks: 108, // 108 in 1800 slots - senderChainId: 42161, + deposit: parseEther("20"), // 1500 ETH budget to start, enough for 21 days till timeout + // Average happy path wait time is 45 hours (42, 48 hours) + epochPeriod: 21600, // 6 hours + challengePeriod: 86400, // 24 hours + numEpochTimeout: 84, // 21 days + maxMissingBlocks: 601, // 601 in 7200 slots, assumes 10% non-censoring validators arbitrumBridge: "0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a", // https://developer.arbitrum.io/useful-addresses }, - /* - // if maxTimeVariation on seuqencer is 4 hours. . . - ETHEREUM_MAINNET: { - deposit: parseEther("10"), // 1000 ETH budget to start, enough for 21 days till timeout - // Average happy path wait time is 12 hours (9, 15 hours) - epochPeriod: 43200, // 6 hours - claimDelay: 21600, // 6 hours (4 hours sequencer backdating + 2 hour buffer) - challengePeriod: 21600, // 3 hours - numEpochTimeout: 42, // 21 days - maxMissingBlocks: 40, // 900 in 1800 slots - senderChainId: 42161, - arbitrumBridge: "0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a", // https://developer.arbitrum.io/useful-addresses - },*/ HARDHAT: { deposit: parseEther("10"), // 120 eth budget for timeout // Average happy path wait time is 45 mins, assume no censorship diff --git a/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts b/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts index 59299665..1d5d92e5 100644 --- a/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts @@ -11,14 +11,14 @@ enum ReceiverChains { const paramsByChainId = { GNOSIS_MAINNET: { - deposit: parseEther("20000"), // 200,000 xDAI budget to start, enough for 10 days till timeout + deposit: parseEther("40000"), // 800,000 xDAI budget to start, enough for 21 days till timeout // Average happy path wait time is 42 hours (36 - 48 hours) - epochPeriod: 43200, // 12 hours - claimDelay: 108000, // 30 hours (24 hours sequencer backdating + 6 hour buffer) - challengePeriod: 21600, // 6 hours - numEpochTimeout: 42, // 21 days + epochPeriod: 21600, // 6 hours + claimDelay: 108000, // 30 hours (24 hours sequencer backdating + 6 hour epochperiod) + challengePeriod: 86400, // 12 hours + numEpochTimeout: 84, // 21 days amb: "0x75Df5AF045d91108662D8080fD1FEFAd6aA0bb59", - maxMissingBlocks: 709, // 709 in 4320 slots, assumes 20% honest validators + maxMissingBlocks: 3207, // 3207 in 17280 slots, assumes 20% honest validators senderChainId: 421613, }, HARDHAT: { diff --git a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol index f9bbd561..a6bd3618 100644 --- a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol +++ b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol @@ -8,6 +8,7 @@ pragma solidity 0.8.18; +import "../canonical/arbitrum/ISequencerInbox.sol"; import "../canonical/arbitrum/IBridge.sol"; import "../canonical/arbitrum/IOutbox.sol"; import "../interfaces/outboxes/IVeaOutboxOnL1.sol"; @@ -88,7 +89,6 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { /// @param _epochPeriod The duration of each epoch. /// @param _challengePeriod The duration of the period allowing to challenge a claim. /// @param _timeoutEpochs The epochs before the bridge is considered shutdown. - /// @param _claimDelay The number of epochs after which the claim can be submitted. /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum. /// @param _bridge The address of the arbitrum bridge contract on Ethereum. /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period. @@ -97,30 +97,39 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { uint256 _epochPeriod, uint256 _challengePeriod, uint256 _timeoutEpochs, - uint256 _claimDelay, address _veaInboxArbToEth, address _bridge, uint256 _maxMissingBlocks ) { + // sanity check to prevent underflow the deployer should have set these correctly. + require(0 < _epochPeriod && _epochPeriod <= block.timestamp, "Invalid epochPeriod."); + deposit = _deposit; // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value. epochPeriod = _epochPeriod; challengePeriod = _challengePeriod; timeoutEpochs = _timeoutEpochs; - claimDelay = _claimDelay; veaInboxArbToEth = _veaInboxArbToEth; bridge = IBridge(_bridge); maxMissingBlocks = _maxMissingBlocks; + ISequencerInbox sequencerInbox = ISequencerInbox(bridge.sequencerInbox()); + // the maximum asynchronous lag between the L2 and L1 clocks + (, , uint256 arbitrumSequencerMaxDelaySeconds, ) = sequencerInbox.maxTimeVariation(); + + // adding the epochPeriod for the time for a node to sync + // in otherwords, this is the worst case time for an honest node to know the L2 state to claim / challenge + claimDelay = arbitrumSequencerMaxDelaySeconds + 2 * epochPeriod; + + // sanity check to prevent underflow + require(claimDelay <= block.timestamp, "Invalid claimDelay."); + // claimant and challenger are not sybil resistant // must burn half deposit to prevent zero cost griefing burn = _deposit / 2; depositPlusReward = 2 * _deposit - burn; latestVerifiedEpoch = block.timestamp / epochPeriod - 1; - - // claimDelay should never be set this high, but we santiy check to prevent underflow - require(claimDelay <= block.timestamp, "Invalid epochClaimDelay."); } // ************************************* // diff --git a/contracts/src/canonical/arbitrum/IBridge.sol b/contracts/src/canonical/arbitrum/IBridge.sol index 5e6ffa41..fcc22b71 100644 --- a/contracts/src/canonical/arbitrum/IBridge.sol +++ b/contracts/src/canonical/arbitrum/IBridge.sol @@ -8,4 +8,6 @@ pragma solidity 0.8.18; interface IBridge { function activeOutbox() external view returns (address); + + function sequencerInbox() external view returns (address); } diff --git a/contracts/src/canonical/arbitrum/ISequencerInbox.sol b/contracts/src/canonical/arbitrum/ISequencerInbox.sol new file mode 100644 index 00000000..888484b8 --- /dev/null +++ b/contracts/src/canonical/arbitrum/ISequencerInbox.sol @@ -0,0 +1,22 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/nitro/blob/master/LICENSE +// SPDX-License-Identifier: BUSL-1.1 +// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol +// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code +// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code +// interface is pruned for relevant function stubs + +pragma solidity 0.8.18; + +import "./IBridge.sol"; + +interface ISequencerInbox { + struct MaxTimeVariation { + uint256 delayBlocks; + uint256 futureBlocks; + uint256 delaySeconds; + uint256 futureSeconds; + } + + function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256); +} From 535d2f70386b2999a1022daa902dee23a1758162 Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Fri, 26 May 2023 21:05:54 +0700 Subject: [PATCH 02/58] chore(contracts): deploy param comments --- contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts b/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts index bb25b22e..05a66c59 100644 --- a/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts @@ -11,7 +11,8 @@ enum ReceiverChains { const paramsByChainId = { ETHEREUM_MAINNET: { deposit: parseEther("20"), // 1500 ETH budget to start, enough for 21 days till timeout - // Average happy path wait time is 45 hours (42, 48 hours) + // Average happy path wait time in normal operation is 2 days 12 hours + // min time: 2 days 8 hours. max time: 2 days 16 hours. Rare case can be 3 days. epochPeriod: 21600, // 6 hours challengePeriod: 86400, // 24 hours numEpochTimeout: 84, // 21 days From f5c5da077991214a799acb011588e4c3154c303a Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Mon, 29 May 2023 11:25:39 +0700 Subject: [PATCH 03/58] feat(contracts): better avg case challenge period --- .../src/arbitrumToEth/VeaInboxArbToEth.sol | 2 -- .../src/arbitrumToEth/VeaOutboxArbToEth.sol | 30 ++++++++++++++----- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/contracts/src/arbitrumToEth/VeaInboxArbToEth.sol b/contracts/src/arbitrumToEth/VeaInboxArbToEth.sol index 298d74e8..9346cc32 100644 --- a/contracts/src/arbitrumToEth/VeaInboxArbToEth.sol +++ b/contracts/src/arbitrumToEth/VeaInboxArbToEth.sol @@ -141,8 +141,6 @@ contract VeaInboxArbToEth is IVeaInbox { unchecked { epoch = block.timestamp / epochPeriod; - require(snapshots[epoch] == bytes32(0), "Snapshot already taken for this epoch."); - // calculate the current root of the incremental merkle tree encoded in the inbox uint256 height; diff --git a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol index a6bd3618..6b27bdb8 100644 --- a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol +++ b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol @@ -143,18 +143,18 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { require(msg.value >= deposit, "Insufficient claim deposit."); unchecked { - require((block.timestamp - claimDelay) / epochPeriod == _epoch, "Invalid epoch."); + require(block.timestamp / epochPeriod >= _epoch, "Epoch is in the future."); + require((block.timestamp - claimDelay) / epochPeriod <= _epoch, "Epoch is too old."); } - require(_stateRoot != bytes32(0), "Invalid claim."); require(claimHashes[_epoch] == bytes32(0), "Claim already made."); claimHashes[_epoch] = hashClaim( Claim({ stateRoot: _stateRoot, claimer: msg.sender, - timestamp: uint32(block.timestamp), - blocknumber: uint32(block.number), + timestamp: uint32(0), + blocknumber: uint32(0), honest: Party.None, challenger: address(0) }) @@ -163,6 +163,19 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { emit Claimed(msg.sender, _stateRoot); } + /// @dev Start verification for claim for 'epoch'. + /// @param _epoch The epoch of the claim to challenge. + /// @param _claim The claim associated with the epoch. + function startClaimVerification(uint256 _epoch, Claim memory _claim) external payable virtual { + require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); + require(_claim.timestamp == uint32(0), "Claim already challenged."); + require((block.timestamp - claimDelay) / epochPeriod >= _epoch, "Epoch is too old."); + + _claim.timestamp = uint32(block.timestamp); + _claim.blocknumber = uint32(block.number); + claimHashes[_epoch] == hashClaim(_claim); + } + /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'. /// @param _epoch The epoch of the claim to challenge. /// @param _claim The claim associated with the epoch. @@ -172,7 +185,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { require(msg.value >= deposit, "Insufficient challenge deposit."); unchecked { - require(block.timestamp < uint256(_claim.timestamp) + challengePeriod, "Challenge period elapsed."); + require(_claim.honest == Party.None, "Claim already verified."); } _claim.challenger = msg.sender; @@ -188,6 +201,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); unchecked { + require(_claim.timestamp != 0, "Claim verification not started."); require(_claim.timestamp + challengePeriod < block.timestamp, "Challenge period has not yet elapsed."); require( // expected blocks <= actual blocks + maxMissingBlocks @@ -201,7 +215,9 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { if (_epoch > latestVerifiedEpoch) { latestVerifiedEpoch = _epoch; - stateRoot = _claim.stateRoot; + if (_claim.stateRoot != bytes32(0)) { + stateRoot = _claim.stateRoot; + } emit Verified(_epoch); } @@ -223,7 +239,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/ // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34 // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50 - // note: we use the bridge address as a source of truth for the activeOutbox address + // note: we call the bridge for the activeOutbox address require(msg.sender == address(bridge), "Not from bridge."); require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, "veaInbox only."); From b035f9a15ca5c58f42632116e400d81338a90043 Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Thu, 15 Jun 2023 20:15:02 +0900 Subject: [PATCH 04/58] feat(contracts): testnet update --- contracts/README.md | 15 +- .../01-arb-goerli-to-chiado-outbox.ts | 44 +- .../01-arb-goerli-to-goerli-outbox.ts | 19 +- .../deploy/01-outbox/01-arb-to-eth-outbox.ts | 83 +- .../01-outbox/01-arb-to-gnosis-outbox.ts | 73 +- .../deploy/02-inbox/02-arb-to-eth-inbox.ts | 28 +- .../deploy/02-inbox/02-arb-to-gnosis-inbox.ts | 16 +- .../03-arb-goerli-to-chiado-router.ts | 2 +- .../03-routers/03-arb-to-gnosis-router.ts | 19 +- .../VeaInboxArbToEthDevnet.json | 112 +- .../VeaInboxArbToEthTestnet.json | 443 ++++++ .../VeaInboxArbToGnosisDevnet.json | 124 +- .../VeaInboxArbToGnosisTestnet.json | 443 ++++++ .../chiado/VeaOutboxArbToGnosisDevnet.json | 508 +++++-- .../chiado/VeaOutboxArbToGnosisTestnet.json | 1249 ++++++++++++++++ .../goerli/RouterArbToGnosisDevnet.json | 207 ++- .../goerli/RouterArbToGnosisTestnet.json | 389 +++++ .../goerli/VeaOutboxArbToEthDevnet.json | 585 ++++++-- .../goerli/VeaOutboxArbToEthTestnet.json | 1303 +++++++++++++++++ contracts/hardhat.config.ts | 16 + contracts/package.json | 18 +- .../src/arbitrumToEth/VeaInboxArbToEth.sol | 34 +- .../src/arbitrumToEth/VeaOutboxArbToEth.sol | 254 +++- .../arbitrumToGnosis/RouterArbToGnosis.sol | 77 + .../arbitrumToGnosis/VeaInboxArbToGnosis.sol | 37 +- .../arbitrumToGnosis/VeaOutboxArbToGnosis.sol | 204 ++- .../arbitrumToEth/VeaOutboxArbToEthDevnet.sol | 96 +- .../VeaOutboxArbToGnosisDevnet.sol | 93 +- .../interfaces/outboxes/IVeaOutboxOnL2.sol | 2 +- contracts/src/interfaces/types/VeaClaim.sol | 5 +- .../updaters/IArbitrumUpdatable.sol | 18 + .../ArbitrumToEth/VeaOutboxMockArbToEth.sol | 37 +- .../test/bridge-mocks/arbitrum/BridgeMock.sol | 4 +- .../arbitrum/SequencerInboxMock.sol | 23 + contracts/test/integration/ArbToEth.ts | 461 +++--- contracts/test/merkle/index.ts | 8 - yarn.lock | 14 +- 37 files changed, 6105 insertions(+), 958 deletions(-) create mode 100644 contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json create mode 100644 contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json create mode 100644 contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json create mode 100644 contracts/deployments/goerli/RouterArbToGnosisTestnet.json create mode 100644 contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json create mode 100644 contracts/src/interfaces/updaters/IArbitrumUpdatable.sol create mode 100644 contracts/src/test/bridge-mocks/arbitrum/SequencerInboxMock.sol diff --git a/contracts/README.md b/contracts/README.md index 4dc16cc6..7cd9f160 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -10,17 +10,22 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments #### Goerli -- [RouterArbToGnosisDevnet](https://goerli.etherscan.io/address/0xAb53e341121448Ae259Da8fa17f216Cb0e21199C) -- [VeaOutboxArbToEthDevnet](https://goerli.etherscan.io/address/0x906dE43dBef27639b1688Ac46532a16dc07Ce410) +- [RouterArbToGnosisDevnet](https://goerli.etherscan.io/address/0x660daB9A6436A814a6ae3a6f27b309356a4bE78c) +- [RouterArbToGnosisTestnet](https://goerli.etherscan.io/address/0xfF2B7048d673767754B798df1702C786E2c59F1F) +- [VeaOutboxArbToEthDevnet](https://goerli.etherscan.io/address/0xB32A65B4b0b18d231BA88c3E37F7f600683baD6D) +- [VeaOutboxArbToEthTestnet](https://goerli.etherscan.io/address/0x9cF5c011e2A4CB7797413f311A35AcB021071c35) #### Arbitrum Goerli -- [VeaInboxArbToEthDevnet](https://goerli.arbiscan.io/address/0x906dE43dBef27639b1688Ac46532a16dc07Ce410) -- [VeaInboxArbToGnosisDevnet](https://goerli.arbiscan.io/address/0xAb53e341121448Ae259Da8fa17f216Cb0e21199C) +- [VeaInboxArbToEthDevnet](https://goerli.arbiscan.io/address/0x3aD2FfA09823de2f98F2f0aBA832a6b83521E2E6) +- [VeaInboxArbToEthTestnet](https://goerli.arbiscan.io/address/0x8893441F219e2836D9c7E1c727CDA9ACFF84D069) +- [VeaInboxArbToGnosisDevnet](https://goerli.arbiscan.io/address/0x6aF68A94246AB9Ad3e6B1D5e28d9eAF374eaB015) +- [VeaInboxArbToGnosisTestnet](https://goerli.arbiscan.io/address/0x773872EFbA47b926F4B2d42DaB4677431bDA02E4) #### Chiado -- [VeaOutboxArbToGnosisDevnet](https://blockscout.com/gnosis/chiado/address/0xAb53e341121448Ae259Da8fa17f216Cb0e21199C) +- [VeaOutboxArbToGnosisDevnet](https://blockscout.com/gnosis/chiado/address/0x32b55e5E51f6F4cbd661a4cA1cC6142f6380777b) +- [VeaOutboxArbToGnosisTestnet](https://blockscout.com/gnosis/chiado/address/0x53194Fa828ebEfa5cB515d23CC2467d88f6B0Be2) ## Getting Started diff --git a/contracts/deploy/01-outbox/01-arb-goerli-to-chiado-outbox.ts b/contracts/deploy/01-outbox/01-arb-goerli-to-chiado-outbox.ts index 16c0059c..4dbcfc8a 100644 --- a/contracts/deploy/01-outbox/01-arb-goerli-to-chiado-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-goerli-to-chiado-outbox.ts @@ -14,22 +14,24 @@ const paramsByChainId = { deposit: parseEther("0.001"), epochPeriod: 1800, // 60 min claimDelay: 0, // Assume no sequencer backdating - challengePeriod: 0, // 30 min + minChallengePeriod: 0, // 30 min numEpochTimeout: 10000000000000, // never maxMissingBlocks: 10000000000000, amb: "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - senderChainId: 421613, + routerChainId: 5, + sequencerLimit: 86400, // 24 hours }, HARDHAT: { deposit: parseEther("5"), // 120 xDAI budget for timeout // Average happy path wait time is 22.5 mins, assume no censorship - epochPeriod: 600, // 15 min + minChallengePeriod: 600, // 15 min challengePeriod: 600, // 15 min (assume no sequencer backdating) numEpochTimeout: 24, // 6 hours claimDelay: 2, amb: ethers.constants.AddressZero, maxMissingBlocks: 10000000000000, - senderChainId: 421613, + routerChainId: 31337, + sequencerLimit: 86400, // 24 hours }, }; @@ -53,8 +55,17 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { HARDHAT: config.networks.localhost, }; - const { deposit, epochPeriod, challengePeriod, numEpochTimeout, claimDelay, amb, maxMissingBlocks } = - paramsByChainId[ReceiverChains[chainId]]; + const { + deposit, + epochPeriod, + routerChainId, + minChallengePeriod, + numEpochTimeout, + claimDelay, + amb, + maxMissingBlocks, + sequencerLimit, + } = paramsByChainId[ReceiverChains[chainId]]; // Hack to predict the deployment address on the sender chain. // TODO: use deterministic deployments @@ -72,13 +83,13 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { args: [ deposit, epochPeriod, - challengePeriod, + minChallengePeriod, numEpochTimeout, - claimDelay, - veaInboxAddress, amb, ethers.constants.AddressZero, + sequencerLimit, maxMissingBlocks, + routerChainId, ], log: true, }); @@ -97,15 +108,22 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const routerChainProvider = new providers.JsonRpcProvider(routerNetworks[ReceiverChains[chainId]].url); let nonceRouter = await routerChainProvider.getTransactionCount(deployer); - const veaInboxAddress = getContractAddress(deployer, nonce); - console.log("calculated future veaInbox for nonce %d: %s", nonce, veaInboxAddress); - const routerAddress = getContractAddress(deployer, nonceRouter); console.log("calculated future router for nonce %d: %s", nonce, routerAddress); const txn = await deploy("VeaOutboxArbToGnosisDevnet", { from: deployer, - args: [deposit, epochPeriod, challengePeriod, numEpochTimeout, claimDelay, amb, routerAddress, maxMissingBlocks], + args: [ + deposit, + epochPeriod, + minChallengePeriod, + numEpochTimeout, + amb, + routerAddress, + sequencerLimit, + maxMissingBlocks, + routerChainId, + ], log: true, ...gasOptions, }); diff --git a/contracts/deploy/01-outbox/01-arb-goerli-to-goerli-outbox.ts b/contracts/deploy/01-outbox/01-arb-goerli-to-goerli-outbox.ts index c7603492..b1e308d1 100644 --- a/contracts/deploy/01-outbox/01-arb-goerli-to-goerli-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-goerli-to-goerli-outbox.ts @@ -14,20 +14,17 @@ const paramsByChainId = { deposit: parseEther("0.001"), // Average happy path wait time is 1 hour (30 min, 90 min), happy path only epochPeriod: 1800, // 30 min - claimDelay: 0, // Assume no sequencer backdating - challengePeriod: 0, // 0 min + minChallengePeriod: 0, // 0 min numEpochTimeout: 10000000000000, // never maxMissingBlocks: 10000000000000, - arbitrumBridge: "0xC1Ebd02f738644983b6C4B2d440b8e77DdE276Bd", // https://developer.arbitrum.io/useful-addresses + arbitrumBridge: "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", // https://developer.arbitrum.io/useful-addresses }, HARDHAT: { deposit: parseEther("10"), // 120 eth budget for timeout // Average happy path wait time is 45 mins, assume no censorship epochPeriod: 1800, // 30 min - claimDelay: 0, // 30 hours (24 hours sequencer backdating + 6 hour buffer) - challengePeriod: 1800, // 30 min (assume no sequencer backdating) + minChallengePeriod: 1800, // 30 min (assume no sequencer backdating) numEpochTimeout: 10000000000000, // 6 hours - senderChainId: 31337, maxMissingBlocks: 10000000000000, arbitrumBridge: ethers.constants.AddressZero, }, @@ -48,7 +45,7 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { HARDHAT: config.networks.localhost, }; - const { deposit, epochPeriod, challengePeriod, numEpochTimeout, claimDelay, maxMissingBlocks, arbitrumBridge } = + const { deposit, epochPeriod, numEpochTimeout, minChallengePeriod, maxMissingBlocks, arbitrumBridge } = paramsByChainId[ReceiverChains[chainId]]; // Hack to predict the deployment address on the sender chain. @@ -81,9 +78,8 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { arbSysAddress, deposit, epochPeriod, - challengePeriod, + minChallengePeriod, numEpochTimeout, - claimDelay, veaInboxAddress, bridgeAddress, maxMissingBlocks, @@ -114,9 +110,8 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { args: [ deposit, epochPeriod, - challengePeriod, + minChallengePeriod, numEpochTimeout, - claimDelay, veaInboxAddress, arbitrumBridge, maxMissingBlocks, @@ -137,7 +132,7 @@ deployOutbox.tags = ["ArbGoerliToGoerliOutbox"]; deployOutbox.skip = async ({ getChainId }) => { const chainId = Number(await getChainId()); console.log(chainId); - return !(chainId === 5 || chainId === 31337); + return !ReceiverChains[chainId]; }; export default deployOutbox; diff --git a/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts b/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts index 05a66c59..f68b1976 100644 --- a/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts @@ -6,28 +6,35 @@ import { ethers } from "hardhat"; enum ReceiverChains { ETHEREUM_MAINNET = 1, + ETHEREUM_GOERLI = 5, HARDHAT = 31337, } + const paramsByChainId = { ETHEREUM_MAINNET: { - deposit: parseEther("20"), // 1500 ETH budget to start, enough for 21 days till timeout - // Average happy path wait time in normal operation is 2 days 12 hours - // min time: 2 days 8 hours. max time: 2 days 16 hours. Rare case can be 3 days. - epochPeriod: 21600, // 6 hours - challengePeriod: 86400, // 24 hours - numEpochTimeout: 84, // 21 days - maxMissingBlocks: 601, // 601 in 7200 slots, assumes 10% non-censoring validators + deposit: parseEther("10"), // ~2000 ETH budget, enough for 8 days of challenges + // bridging speed is 28 - 29 hours. + epochPeriod: 3600, // 1 hours + minChallengePeriod: 10800, // 3 hours + numEpochTimeout: 504, // 21 days + maxMissingBlocks: 49, // 49 in 900 slots, assumes 10% non-censoring validators arbitrumBridge: "0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a", // https://developer.arbitrum.io/useful-addresses }, + ETHEREUM_GOERLI: { + deposit: parseEther("1"), // ~200 ETH budget to start, enough for 8 days of challenges + // bridging speed is 27 - 28 hours. + epochPeriod: 3600, // 1 hours + minChallengePeriod: 10800, // 3 hours + numEpochTimeout: 1000000, // never + maxMissingBlocks: 1000000, // any, goerli network performance is poor, so can't use the censorship test well + arbitrumBridge: "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", // https://developer.arbitrum.io/useful-addresses + }, HARDHAT: { - deposit: parseEther("10"), // 120 eth budget for timeout - // Average happy path wait time is 45 mins, assume no censorship + deposit: parseEther("10"), epochPeriod: 1800, // 30 min - claimDelay: 0, // 30 hours (24 hours sequencer backdating + 6 hour buffer) - challengePeriod: 1800, // 30 min (assume no sequencer backdating) - numEpochTimeout: 10000000000000, // 6 hours - senderChainId: 31337, - maxMissingBlocks: 10000000000000, + minChallengePeriod: 1800, // 30 min + numEpochTimeout: 10000000000000, // never + maxMissingBlocks: 10, arbitrumBridge: ethers.constants.AddressZero, }, }; @@ -44,10 +51,11 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const senderNetworks = { ETHEREUM_MAINNET: config.networks.arbitrum, + ETHEREUM_GOERLI: config.networks.arbitrumGoerli, HARDHAT: config.networks.localhost, }; - const { deposit, epochPeriod, challengePeriod, numEpochTimeout, claimDelay, maxMissingBlocks, arbitrumBridge } = + const { deposit, epochPeriod, minChallengePeriod, numEpochTimeout, claimDelay, maxMissingBlocks, arbitrumBridge } = paramsByChainId[ReceiverChains[chainId]]; // Hack to predict the deployment address on the sender chain. @@ -56,22 +64,33 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { // ---------------------------------------------------------------------------------------------- const hardhatDeployer = async () => { let nonce = await ethers.provider.getTransactionCount(deployer); - nonce += 4; // SenderGatewayToEthereum deploy tx will be the 5th after this, same network for both sender/receiver. - const senderGatewayAddress = getContractAddress(deployer, nonce); - console.log("calculated future SenderGatewayToEthereum address for nonce %d: %s", nonce, senderGatewayAddress); - nonce -= 2; - - const arbSysAddress = getContractAddress(deployer, nonce); + const arbSysAddress = getContractAddress(deployer, nonce + 5); console.log("calculated future arbSysAddress address for nonce %d: %s", nonce, arbSysAddress); - nonce += 1; - const veaInboxAddress = getContractAddress(deployer, nonce); + const veaInboxAddress = getContractAddress(deployer, nonce + 6); console.log("calculated future VeaInbox for nonce %d: %s", nonce, veaInboxAddress); - nonce += 3; - const bridgeAddress = getContractAddress(deployer, nonce); - console.log("calculated future inboxAddress for nonce %d: %s", nonce, bridgeAddress); + const senderGatewayAddress = getContractAddress(deployer, nonce + 7); + console.log("calculated future SenderGatewayToEthereum address for nonce %d: %s", nonce, senderGatewayAddress); + + const outbox = await deploy("OutboxMock", { + from: deployer, + args: [veaInboxAddress], + log: true, + }); + + const sequencerInbox = await deploy("SequencerInboxMock", { + from: deployer, + args: [86400], + log: true, + }); + + const bridge = await deploy("BridgeMock", { + from: deployer, + args: [outbox.address, sequencerInbox.address], + log: true, + }); const veaOutbox = await deploy("VeaOutbox", { from: deployer, @@ -80,11 +99,10 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { arbSysAddress, deposit, epochPeriod, - challengePeriod, + minChallengePeriod, numEpochTimeout, - claimDelay, veaInboxAddress, - bridgeAddress, + bridge.address, maxMissingBlocks, ], log: true, @@ -109,15 +127,14 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { console.log("calculated future veaInbox for nonce %d: %s", nonce, veaInboxAddress); if (chainId) - await deploy("VeaOutboxArbToEth", { + await deploy("VeaOutboxArbToEth" + (chainId === 1 ? "" : "Testnet"), { from: deployer, contract: "VeaOutboxArbToEth", args: [ deposit, epochPeriod, - challengePeriod, + minChallengePeriod, numEpochTimeout, - claimDelay, veaInboxAddress, arbitrumBridge, maxMissingBlocks, @@ -138,7 +155,7 @@ deployOutbox.tags = ["ArbToEthOutbox"]; deployOutbox.skip = async ({ getChainId }) => { const chainId = Number(await getChainId()); console.log(chainId); - return !(chainId === 1 || chainId === 31337); + return !ReceiverChains[chainId]; }; export default deployOutbox; diff --git a/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts b/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts index 1d5d92e5..31b65893 100644 --- a/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts @@ -6,20 +6,32 @@ import { ethers } from "hardhat"; enum ReceiverChains { GNOSIS_MAINNET = 100, + GNOSIS_CHIADO = 10200, HARDHAT = 31337, } const paramsByChainId = { GNOSIS_MAINNET: { - deposit: parseEther("40000"), // 800,000 xDAI budget to start, enough for 21 days till timeout - // Average happy path wait time is 42 hours (36 - 48 hours) - epochPeriod: 21600, // 6 hours - claimDelay: 108000, // 30 hours (24 hours sequencer backdating + 6 hour epochperiod) - challengePeriod: 86400, // 12 hours - numEpochTimeout: 84, // 21 days + deposit: parseEther("2000"), // ~ 400k xDAI budget to start, enough for 8 days of challenges + // bridging speed is 28 - 29 hours. + epochPeriod: 3600, // 1 hours + minChallengePeriod: 10800, // 3 hours + numEpochTimeout: 504, // 21 days + maxMissingBlocks: 345, // 345 in 2160 slots, assumes 20% non-censoring validators + routerChainId: 1, amb: "0x75Df5AF045d91108662D8080fD1FEFAd6aA0bb59", - maxMissingBlocks: 3207, // 3207 in 17280 slots, assumes 20% honest validators - senderChainId: 421613, + sequencerLimit: 86400, // 24 hours + }, + GNOSIS_CHIADO: { + deposit: parseEther("1"), // ~200 xDAI budget to start, enough for 8 days of challenges + // bridging speed is 28 - 29 hours. + epochPeriod: 3600, // 1 hours + minChallengePeriod: 10800, // 3 hours + numEpochTimeout: 1000000, // never + maxMissingBlocks: 1000000, // any + routerChainId: 5, + amb: "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", + sequencerLimit: 86400, // 24 hours }, HARDHAT: { deposit: parseEther("5"), // 120 xDAI budget for timeout @@ -31,7 +43,8 @@ const paramsByChainId = { amb: ethers.constants.AddressZero, routerAddress: ethers.constants.AddressZero, maxMissingBlocks: 10000000000000, - senderChainId: 421613, + routerChainId: 31337, + sequencerLimit: 86400, // 24 hours }, }; @@ -47,16 +60,26 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const senderNetworks = { GNOSIS_MAINNET: config.networks.arbitrum, + GNOSIS_CHIADO: config.networks.arbitrumGoerli, HARDHAT: config.networks.localhost, }; const routerNetworks = { GNOSIS_MAINNET: config.networks.mainnet, + GNOSIS_CHIADO: config.networks.goerli, HARDHAT: config.networks.localhost, }; - const { deposit, epochPeriod, challengePeriod, numEpochTimeout, claimDelay, amb, maxMissingBlocks } = - paramsByChainId[ReceiverChains[chainId]]; + const { + deposit, + epochPeriod, + routerChainId, + minChallengePeriod, + numEpochTimeout, + amb, + maxMissingBlocks, + sequencerLimit, + } = paramsByChainId[ReceiverChains[chainId]]; // Hack to predict the deployment address on the sender chain. // TODO: use deterministic deployments @@ -64,23 +87,23 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { // ---------------------------------------------------------------------------------------------- const hardhatDeployer = async () => { let nonce = await ethers.provider.getTransactionCount(deployer); - nonce += 3; // SenderGatewayToEthereum deploy tx will be the 5th after this, same network for both sender/receiver. + nonce += 4; // SenderGatewayToEthereum deploy tx will be the 5th after this, same network for both sender/receiver. - const veaInboxAddress = getContractAddress(deployer, nonce); - console.log("calculated future veaInbox for nonce %d: %s", nonce, veaInboxAddress); + const routerAddress = getContractAddress(deployer, nonce); + console.log("calculated future router for nonce %d: %s", nonce, routerAddress); await deploy("VeaOutboxGnosisMock", { from: deployer, args: [ deposit, epochPeriod, - challengePeriod, + minChallengePeriod, numEpochTimeout, - claimDelay, - veaInboxAddress, amb, ethers.constants.AddressZero, + sequencerLimit, maxMissingBlocks, + routerChainId, ], log: true, }); @@ -100,10 +123,22 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const routerAddress = getContractAddress(deployer, nonceRouter); console.log("calculated future router for nonce %d: %s", nonce, routerAddress); - const txn = await deploy("VeaOutboxArbToGnosis", { + const txn = await deploy("VeaOutboxArbToGnosis" + (chainId === 100 ? "" : "Testnet"), { + contract: "VeaOutboxArbToGnosis", from: deployer, - args: [deposit, epochPeriod, challengePeriod, numEpochTimeout, claimDelay, amb, routerAddress, maxMissingBlocks], + args: [ + deposit, + epochPeriod, + minChallengePeriod, + numEpochTimeout, + amb, + routerAddress, + sequencerLimit, + maxMissingBlocks, + routerChainId, + ], log: true, + gasPrice: ethers.utils.parseUnits("1", "gwei"), // chiado rpc response underprices gas }); console.log("VeaOutboxArbToGnosis deployed to:", txn.address); diff --git a/contracts/deploy/02-inbox/02-arb-to-eth-inbox.ts b/contracts/deploy/02-inbox/02-arb-to-eth-inbox.ts index 804ca096..c156e718 100644 --- a/contracts/deploy/02-inbox/02-arb-to-eth-inbox.ts +++ b/contracts/deploy/02-inbox/02-arb-to-eth-inbox.ts @@ -3,19 +3,23 @@ import { DeployFunction } from "hardhat-deploy/types"; enum SenderChains { ARBITRUM = 42161, + ARBITRUM_GOERLI = 421613, HARDHAT = 31337, } const paramsByChainId = { ARBITRUM: { - epochPeriod: 43200, // 12 hours + epochPeriod: 7200, // 2 hours companion: (hre: HardhatRuntimeEnvironment) => hre.companionNetworks.mainnet, }, + ARBITRUM_GOERLI: { + epochPeriod: 7200, // 2 hours + companion: (hre: HardhatRuntimeEnvironment) => hre.companionNetworks.goerli, + }, HARDHAT: { epochPeriod: 1800, // 30 minutes }, }; -// TODO: use deterministic deployments const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployments, getNamedAccounts, getChainId } = hre; const { deploy, execute } = deployments; @@ -40,34 +44,22 @@ const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { }); const receiverGateway = await deployments.get("ReceiverGateway"); - const receiverChainId = 31337; - const senderGateway = await deploy("SenderGateway", { + await deploy("SenderGateway", { from: deployer, contract: "SenderGatewayMock", args: [veaInbox.address, receiverGateway.address], gasLimit: 4000000, log: true, }); - - const outbox = await deploy("OutboxMock", { - from: deployer, - args: [veaInbox.address], - log: true, - }); - - await deploy("BridgeMock", { - from: deployer, - args: [outbox.address], - log: true, - }); }; // ---------------------------------------------------------------------------------------------- const liveDeployer = async () => { - const veaOutbox = await companion(hre).deployments.get("VeaOutbox"); + const veaOutbox = await companion(hre).deployments.get("VeaOutboxArbToEth" + (chainId === 42161 ? "" : "Testnet")); - await deploy("VeaInboxArbToEth", { + await deploy("VeaInboxArbToEth" + (chainId === 42161 ? "" : "Testnet"), { + contract: "VeaInboxArbToEth", from: deployer, args: [epochPeriod, veaOutbox.address], log: true, diff --git a/contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts b/contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts index 3f1be8b2..a7223292 100644 --- a/contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts +++ b/contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts @@ -3,13 +3,18 @@ import { DeployFunction } from "hardhat-deploy/types"; enum SenderChains { ARBITRUM = 42161, + ARBITRUM_GOERLI = 421613, HARDHAT = 31337, } const paramsByChainId = { ARBITRUM: { - epochPeriod: 43200, // 12 hours + epochPeriod: 3600, // 1 hours companion: (hre: HardhatRuntimeEnvironment) => hre.companionNetworks.gnosischain, }, + ARBITRUM_GOERLI: { + epochPeriod: 3600, // 1 hours + companion: (hre: HardhatRuntimeEnvironment) => hre.companionNetworks.chiado, + }, HARDHAT: { epochPeriod: 1800, // 30 minutes }, @@ -28,9 +33,12 @@ const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { // ---------------------------------------------------------------------------------------------- - const veaOutboxGnosis = await companion(hre).deployments.get("VeaOutboxGnosis"); + const veaOutboxGnosis = await companion(hre).deployments.get( + "VeaOutboxArbToGnosis" + (chainId === 42161 ? "" : "Testnet") + ); - await deploy("VeaInboxArbToGnosis", { + await deploy("VeaInboxArbToGnosis" + (chainId === 42161 ? "" : "Testnet"), { + contract: "VeaInboxArbToGnosis", from: deployer, args: [epochPeriod, veaOutboxGnosis.address], log: true, @@ -41,7 +49,7 @@ deployInbox.tags = ["ArbToGnosisInbox"]; deployInbox.skip = async ({ getChainId }) => { const chainId = Number(await getChainId()); console.log(chainId); - return !(chainId === 42161 || chainId === 31337); + return !SenderChains[chainId]; }; deployInbox.runAtTheEnd = true; diff --git a/contracts/deploy/03-routers/03-arb-goerli-to-chiado-router.ts b/contracts/deploy/03-routers/03-arb-goerli-to-chiado-router.ts index beba31b4..d4978d65 100644 --- a/contracts/deploy/03-routers/03-arb-goerli-to-chiado-router.ts +++ b/contracts/deploy/03-routers/03-arb-goerli-to-chiado-router.ts @@ -9,7 +9,7 @@ enum RouterChains { const paramsByChainId = { ETHEREUM_GOERLI: { - arbitrumBridge: "0xC1Ebd02f738644983b6C4B2d440b8e77DdE276Bd", // https://developer.arbitrum.io/useful-addresses + arbitrumBridge: "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", // https://developer.arbitrum.io/useful-addresses amb: "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", }, HARDHAT: { diff --git a/contracts/deploy/03-routers/03-arb-to-gnosis-router.ts b/contracts/deploy/03-routers/03-arb-to-gnosis-router.ts index 67d76835..4cabb507 100644 --- a/contracts/deploy/03-routers/03-arb-to-gnosis-router.ts +++ b/contracts/deploy/03-routers/03-arb-to-gnosis-router.ts @@ -4,6 +4,7 @@ import { ethers } from "hardhat"; enum RouterChains { ETHEREUM_MAINNET = 1, + ETHEREUM_GOERLI = 5, HARDHAT = 31337, } @@ -12,6 +13,10 @@ const paramsByChainId = { arbitrumBridge: "0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a", // https://developer.arbitrum.io/useful-addresses amb: "0x75Df5AF045d91108662D8080fD1FEFAd6aA0bb59", }, + ETHEREUM_GOERLI: { + arbitrumBridge: "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", // https://developer.arbitrum.io/useful-addresses + amb: "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", + }, HARDHAT: { arbitrumInbox: ethers.constants.AddressZero, amb: ethers.constants.AddressZero, @@ -28,7 +33,7 @@ const deployRouter: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; console.log("deployer: %s", deployer); - const { arbitrumInbox, amb } = paramsByChainId[RouterChains[chainId]]; + const { arbitrumBridge, amb } = paramsByChainId[RouterChains[chainId]]; // ---------------------------------------------------------------------------------------------- const hardhatDeployer = async () => { @@ -38,19 +43,21 @@ const deployRouter: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const router = await deploy("RouterArbToGnosis", { from: deployer, contract: "RouterArbToGnosis", - args: [arbitrumInbox, amb, veaInbox.address, veaOutbox.address], + args: [arbitrumBridge, amb, veaInbox.address, veaOutbox.address], }); }; // ---------------------------------------------------------------------------------------------- const liveDeployer = async () => { - const veaOutbox = await hre.companionNetworks.gnosischain.deployments.get("VeaOutboxArbToGnosis"); - const veaInbox = await hre.companionNetworks.arbitrum.deployments.get("VeaInboxArbToGnosis"); + const outboxNetwork = chainId === 1 ? hre.companionNetworks.gnosischain : hre.companionNetworks.chiado; + const inboxNetwork = chainId === 1 ? hre.companionNetworks.arbitrum : hre.companionNetworks.arbitrumGoerli; + const veaOutbox = await outboxNetwork.deployments.get("VeaOutboxArbToGnosis" + (chainId === 1 ? "" : "Testnet")); + const veaInbox = await inboxNetwork.deployments.get("VeaInboxArbToGnosis" + (chainId === 1 ? "" : "Testnet")); - const router = await deploy("RouterArbToGnosis", { + const router = await deploy("RouterArbToGnosis" + (chainId === 1 ? "" : "Testnet"), { from: deployer, contract: "RouterArbToGnosis", - args: [arbitrumInbox, amb, veaInbox.address, veaOutbox.address], + args: [arbitrumBridge, amb, veaInbox.address, veaOutbox.address], log: true, }); }; diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json index 35e71802..421fc427 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xA3FefC6FeE3fc66B9d9a8BEE794736ab71a74c55", + "address": "0x3aD2FfA09823de2f98F2f0aBA832a6b83521E2E6", "abi": [ { "inputs": [ @@ -33,6 +33,18 @@ { "anonymous": false, "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "_snapshot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, { "indexed": false, "internalType": "uint64", @@ -75,6 +87,38 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "epochAt", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochNow", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "epochPeriod", @@ -164,12 +208,17 @@ }, { "internalType": "uint32", - "name": "timestamp", + "name": "timestampClaimed", "type": "uint32" }, { "internalType": "uint32", - "name": "blocknumber", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", "type": "uint32" }, { @@ -226,32 +275,33 @@ "type": "function" } ], - "transactionHash": "0x64bc94d437cf6d16a7bb3604d87200a18828231fe64a8c66d6a1caf68b428795", + "transactionHash": "0xe77584f55eb58bfeb1c948d5da662f7119748445d8a4acc5e94a9a7802ed0cf9", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xA3FefC6FeE3fc66B9d9a8BEE794736ab71a74c55", + "contractAddress": "0x3aD2FfA09823de2f98F2f0aBA832a6b83521E2E6", "transactionIndex": 1, - "gasUsed": "656379", + "gasUsed": "672950", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xe0176ec49d91883d3eb5be0653db1d675bd508d8c8f5941a6d5a8791704fca37", - "transactionHash": "0x64bc94d437cf6d16a7bb3604d87200a18828231fe64a8c66d6a1caf68b428795", + "blockHash": "0xa9292c0178799978886c01da5c9a41f03fa5f8f40be34f0b391c62985410ee83", + "transactionHash": "0xe77584f55eb58bfeb1c948d5da662f7119748445d8a4acc5e94a9a7802ed0cf9", "logs": [], - "blockNumber": 21520024, - "cumulativeGasUsed": "656379", + "blockNumber": 26137654, + "cumulativeGasUsed": "672950", "status": 1, "byzantium": true }, "args": [ 1800, - "0x9235A379950B9f01fb3e2961C06912A96DCcef0e" + "0xB32A65B4b0b18d231BA88c3E37F7f600683baD6D" ], - "numDeployments": 7, - "solcInputHash": "e487ffce47057585ae2a5d1ee9829c9f", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See merkle tree docs for details how inbox manages state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"notice\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@jaybuidl, @shotaronowhere]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/**\\n * Vea Inbox From Arbitrum to Ethereum.\\n * Note: This contract is deployed on Arbitrum.\\n */\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /**\\n * @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n * @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n */\\n event MessageSent(bytes _nodeData);\\n\\n /**\\n * The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n * @param _count The count of messages in the merkle tree.\\n */\\n event SnapshotSaved(uint64 _count);\\n\\n /**\\n * @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n * @param _epochSent The epoch of the snapshot.\\n * @param _ticketId The ticketId of the L2->L1 message.\\n */\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /**\\n * @dev Constructor.\\n * Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n * @param _epochPeriod The duration in seconds between epochs.\\n * @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n */\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n\\n // epochPeriod should never be set this small, but we check non-zero value as a sanity check to avoid division by zero\\n require(_epochPeriod > 0, \\\"Epoch period must be greater than 0.\\\");\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Sends an arbitrary message to Ethereum.\\n * `O(log(count))` where count is the number of messages already sent.\\n * Amortized cost is constant.\\n * Note: See merkle tree docs for details how inbox manages state.\\n * @param _to The address of the contract on the receiving chain which receives the calldata.\\n * @param _fnSelector The function selector of the receiving contract.\\n * @param _data The message calldata, abi.encode(param1, param2, ...)\\n * @return msgId The zero based index of the message in the inbox.\\n */\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // data for outbox relay\\n abi.encodePacked( // abi.encodeWithSelector(fnSelector, msg.sender, data)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /**\\n * @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n * `O(log(count))` where count number of messages in the inbox.\\n * Note: See merkle tree docs for details how inbox manages state.\\n */\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n require(snapshots[epoch] == bytes32(0), \\\"Snapshot already taken for this epoch.\\\");\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(count);\\n }\\n\\n /**\\n * @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n * note: EVM scratch space is used to efficiently calculate hashes.\\n * @param _left The left hash.\\n * @param _right The right hash.\\n * @return parent The parent hash.\\n */\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /**\\n * @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n * @param _epoch The epoch of the snapshot requested to send.\\n * @param _claim The claim associated with the epoch.\\n */\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x9c01d3e3034554b02cc98a46901db8c7ef0c4d4e0c9be5f48fe031c9f22ac3dc\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n/**\\n * @title System level functionality\\n * @notice For use by contracts to interact with core L2-specific functionality.\\n * Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\n */\\ninterface IArbSys {\\n /**\\n * @notice Send a transaction to L1\\n * @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n * to a contract address without any code (as enforced by the Bridge contract).\\n * @param destination recipient address on L1\\n * @param data (optional) calldata for L1 contract call\\n * @return a unique identifier for this L2-to-L1 transaction.\\n */\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x0029d413171b339edaae794d96d33fa7f8a1500b6ea27e2a533ae7333337c50b\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@jaybuidl, @shotaronowhere]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /**\\n * @dev Sends an arbitrary message to receiving chain.\\n * Note: Calls authenticated by receiving gateway checking the sender argument.\\n * @param _to The cross-domain contract address which receives the calldata.\\n * @param _fnSelection The function selector of the receiving contract.\\n * @param _data The message calldata, abi.encode(...)\\n * @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n */\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /**\\n * Saves snapshot of state root.\\n * `O(log(count))` where count number of messages in the inbox.\\n * @dev Snapshots can be saved a maximum of once per epoch.\\n */\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x86b4efc88b10b38080ca738e0d7c06e84f24e7cbb6a19b16f9a3e62433019094\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@jaybuidl, @shotaronowhere]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/**\\n * @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\n */\\ninterface IVeaOutboxOnL1 {\\n /**\\n * Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n * @dev Verifies and relays the message.\\n * @param _proof The merkle proof to prove the message.\\n * @param _msgId The zero based index of the message in the inbox.\\n * @param _to The address to send the message to.\\n * @param _message The message to relay.\\n */\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /**\\n * Note: Access restricted to canonical bridge.\\n * @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n * @param _epoch The epoch to verify.\\n * @param _stateRoot The true state root for the epoch.\\n * @param _claim The claim associated with the epoch.\\n */\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x0f96c2344dcdf78dc89359ba72e281a28cf8e47368eabf4bebc9a648ffc35163\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@jaybuidl, @shotaronowhere]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestamp;\\n uint32 blocknumber;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1bdda50afbf5f966278a867e7149397ed820de658c15dda4266e70c314df17d2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b50604051610bd4380380610bd483398101604081905261002f916100a5565b60808290526001600160a01b03811660a0528161009e5760405162461bcd60e51b8152602060048201526024808201527f45706f636820706572696f64206d7573742062652067726561746572207468616044820152633710181760e11b606482015260840160405180910390fd5b50506100e2565b600080604083850312156100b857600080fd5b825160208401519092506001600160a01b03811681146100d757600080fd5b809150509250929050565b60805160a051610ab961011b6000396000818160e101526105800152600081816101200152818161019b015261048d0152610ab96000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063b5b7a1841161005b578063b5b7a1841461011b578063d6565a2d14610150578063e149b5ec14610170578063e5a1c3561461018357600080fd5b806306661abd1461008d57806351920535146100bf5780635f85896c146100c9578063744b49bf146100dc575b600080fd5b6041546100a19067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100c7610196565b005b6100a16100d7366004610702565b61031f565b6101037f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b6565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100b6565b61014261015e3660046107c7565b60006020819052908152604090205481565b6100c761017e3660046107f4565b61048b565b6101426101913660046107c7565b61062b565b6000807f000000000000000000000000000000000000000000000000000000000000000042816101c8576101c8610894565b046000818152602081905260409020549092501561023c5760405162461bcd60e51b815260206004820152602660248201527f536e617073686f7420616c72656164792074616b656e20666f7220746869732060448201526532b837b1b41760d11b60648201526084015b60405180910390fd5b60415460009067ffffffffffffffff165b8015610286578060011660010361027a5760018260408110610271576102716108aa565b01549250610286565b6001918201911c61024d565b60011c5b80156102c85760019182019181811690036102c0576102bd600183604081106102b5576102b56108aa565b015484610642565b92505b60011c61028a565b505060008281526020818152604091829020839055604154915167ffffffffffffffff90921682527f8d762ebc760982a11d9a00cc7c1c4c91f9c1084b85633ee8ca462da42465f1d9910160405180910390a15050565b60415460009067ffffffffffffffff9081169081106103715760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b6044820152606401610233565b6040516000908290879061038d908890339089906020016108e4565b60408051601f19818403018152908290526103ac93929160200161091a565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610410576103f8600183604081106102b5576102b56108aa565b92506001918201911c677fffffffffffffff166103d7565b508160018260408110610425576104256108aa565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03690610478908490610995565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ba576104ba610894565b0482106105145760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b6064820152608401610233565b60008281526020819052604080822054905161053691859185906024016109af565b60408051601f198184030181529181526020820180516001600160e01b0316631ee9e40360e21b179052516349460b4d60e11b815290915060009060649063928c169a906105aa907f0000000000000000000000000000000000000000000000000000000000000000908690600401610a3e565b6020604051808303816000875af11580156105c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ed9190610a6a565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061063b57600080fd5b0154905081565b60008183101561066057826000528160205260406000209050610670565b8160005282602052604060002090505b92915050565b80356001600160a01b038116811461068d57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160c0810167ffffffffffffffff811182821017156106cb576106cb610692565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156106fa576106fa610692565b604052919050565b60008060006060848603121561071757600080fd5b61072084610676565b92506020848101356001600160e01b03198116811461073e57600080fd5b9250604085013567ffffffffffffffff8082111561075b57600080fd5b818701915087601f83011261076f57600080fd5b81358181111561078157610781610692565b610793601f8201601f191685016106d1565b915080825288848285010111156107a957600080fd5b80848401858401376000848284010152508093505050509250925092565b6000602082840312156107d957600080fd5b5035919050565b803563ffffffff8116811461068d57600080fd5b60008082840360e081121561080857600080fd5b8335925060c0601f198201121561081e57600080fd5b506108276106a8565b6020840135815261083a60408501610676565b602082015261084b606085016107e0565b604082015261085c608085016107e0565b606082015260a08401356003811061087357600080fd5b608082015261088460c08501610676565b60a0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60005b838110156108db5781810151838201526020016108c3565b50506000910152565b63ffffffff60e01b841681528260048201526000825161090b8160248501602087016108c0565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b1660088201526000825161095a81601c8501602087016108c0565b91909101601c01949350505050565b600081518084526109818160208601602086016108c0565b601f01601f19169290920160200192915050565b6020815260006109a86020830184610969565b9392505050565b6000610100820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501525050608083015160038110610a1d57634e487b7160e01b600052602160045260246000fd5b60c083015260a092909201516001600160a01b031660e09091015292915050565b6001600160a01b0383168152604060208201819052600090610a6290830184610969565b949350505050565b600060208284031215610a7c57600080fd5b505191905056fea2646970667358221220baf3eff894785b12718036e33a017934af31e9ef3edf4bf42ca396ec6e77f8d764736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063b5b7a1841161005b578063b5b7a1841461011b578063d6565a2d14610150578063e149b5ec14610170578063e5a1c3561461018357600080fd5b806306661abd1461008d57806351920535146100bf5780635f85896c146100c9578063744b49bf146100dc575b600080fd5b6041546100a19067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100c7610196565b005b6100a16100d7366004610702565b61031f565b6101037f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b6565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100b6565b61014261015e3660046107c7565b60006020819052908152604090205481565b6100c761017e3660046107f4565b61048b565b6101426101913660046107c7565b61062b565b6000807f000000000000000000000000000000000000000000000000000000000000000042816101c8576101c8610894565b046000818152602081905260409020549092501561023c5760405162461bcd60e51b815260206004820152602660248201527f536e617073686f7420616c72656164792074616b656e20666f7220746869732060448201526532b837b1b41760d11b60648201526084015b60405180910390fd5b60415460009067ffffffffffffffff165b8015610286578060011660010361027a5760018260408110610271576102716108aa565b01549250610286565b6001918201911c61024d565b60011c5b80156102c85760019182019181811690036102c0576102bd600183604081106102b5576102b56108aa565b015484610642565b92505b60011c61028a565b505060008281526020818152604091829020839055604154915167ffffffffffffffff90921682527f8d762ebc760982a11d9a00cc7c1c4c91f9c1084b85633ee8ca462da42465f1d9910160405180910390a15050565b60415460009067ffffffffffffffff9081169081106103715760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b6044820152606401610233565b6040516000908290879061038d908890339089906020016108e4565b60408051601f19818403018152908290526103ac93929160200161091a565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610410576103f8600183604081106102b5576102b56108aa565b92506001918201911c677fffffffffffffff166103d7565b508160018260408110610425576104256108aa565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03690610478908490610995565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ba576104ba610894565b0482106105145760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b6064820152608401610233565b60008281526020819052604080822054905161053691859185906024016109af565b60408051601f198184030181529181526020820180516001600160e01b0316631ee9e40360e21b179052516349460b4d60e11b815290915060009060649063928c169a906105aa907f0000000000000000000000000000000000000000000000000000000000000000908690600401610a3e565b6020604051808303816000875af11580156105c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ed9190610a6a565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061063b57600080fd5b0154905081565b60008183101561066057826000528160205260406000209050610670565b8160005282602052604060002090505b92915050565b80356001600160a01b038116811461068d57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160c0810167ffffffffffffffff811182821017156106cb576106cb610692565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156106fa576106fa610692565b604052919050565b60008060006060848603121561071757600080fd5b61072084610676565b92506020848101356001600160e01b03198116811461073e57600080fd5b9250604085013567ffffffffffffffff8082111561075b57600080fd5b818701915087601f83011261076f57600080fd5b81358181111561078157610781610692565b610793601f8201601f191685016106d1565b915080825288848285010111156107a957600080fd5b80848401858401376000848284010152508093505050509250925092565b6000602082840312156107d957600080fd5b5035919050565b803563ffffffff8116811461068d57600080fd5b60008082840360e081121561080857600080fd5b8335925060c0601f198201121561081e57600080fd5b506108276106a8565b6020840135815261083a60408501610676565b602082015261084b606085016107e0565b604082015261085c608085016107e0565b606082015260a08401356003811061087357600080fd5b608082015261088460c08501610676565b60a0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60005b838110156108db5781810151838201526020016108c3565b50506000910152565b63ffffffff60e01b841681528260048201526000825161090b8160248501602087016108c0565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b1660088201526000825161095a81601c8501602087016108c0565b91909101601c01949350505050565b600081518084526109818160208601602086016108c0565b601f01601f19169290920160200192915050565b6020815260006109a86020830184610969565b9392505050565b6000610100820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501525050608083015160038110610a1d57634e487b7160e01b600052602160045260246000fd5b60c083015260a092909201516001600160a01b031660e09091015292915050565b6001600160a01b0383168152604060208201819052600090610a6290830184610969565b949350505050565b600060208284031215610a7c57600080fd5b505191905056fea2646970667358221220baf3eff894785b12718036e33a017934af31e9ef3edf4bf42ca396ec6e77f8d764736f6c63430008120033", + "numDeployments": 8, + "solcInputHash": "c9836c6cb024801f3104e49f87086294", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n \\n // epochPeriod should never be set this small, but we check non-zero value as a sanity check to avoid division by zero\\n require(_epochPeriod > 0, \\\"Epoch period must be greater than 0.\\\");\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x90dcc790abb213bcad8e8f0e431590f9b4f10017338c7e3d780e25ed999d7f0b\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610c55380380610c5583398101604081905261002f916100a5565b60808290526001600160a01b03811660a0528161009e5760405162461bcd60e51b8152602060048201526024808201527f45706f636820706572696f64206d7573742062652067726561746572207468616044820152633710181760e11b606482015260840160405180910390fd5b50506100e2565b600080604083850312156100b857600080fd5b825160208401519092506001600160a01b03811681146100d757600080fd5b809150509250929050565b60805160a051610b2b61012a6000396000818161012001526105b401526000818161015f015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122094407127302ed545ff4f2b1bef1e39e0ed071c2adffcd35207f07bce2f12d28164736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122094407127302ed545ff4f2b1bef1e39e0ed071c2adffcd35207f07bce2f12d28164736f6c63430008120033", "devdoc": { + "details": "Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.", "events": { "MessageSent(bytes)": { "details": "Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.", @@ -259,9 +309,11 @@ "_nodeData": "The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)." } }, - "SnapshotSaved(uint64)": { + "SnapshotSaved(bytes32,uint256,uint64)": { "params": { - "_count": "The count of messages in the merkle tree." + "_count": "The count of messages in the merkle tree.", + "_epoch": "The epoch of the snapshot.", + "_snapshot": "The snapshot of the merkle tree state root." } }, "SnapshotSent(uint256,bytes32)": { @@ -281,11 +333,26 @@ "_veaOutboxArbToEth": "The veaOutbox on ethereum." } }, + "epochAt(uint256)": { + "details": "Get the epoch from the inbox's point of view using timestamp.", + "params": { + "_timestamp": "The timestamp to calculate the epoch from." + }, + "returns": { + "epoch": "The calculated epoch." + } + }, + "epochNow()": { + "details": "Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.", + "returns": { + "epoch": "The epoch associated with the current inbox block.timestamp" + } + }, "saveSnapshot()": { - "details": "Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state." + "details": "Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state." }, "sendMessage(address,bytes4,bytes)": { - "details": "Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See merkle tree docs for details how inbox manages state.", + "details": "Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.", "params": { "_data": "The message calldata, abi.encode(param1, param2, ...)", "_fnSelector": "The function selector of the receiving contract.", @@ -295,7 +362,7 @@ "_0": "msgId The zero based index of the message in the inbox." } }, - "sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint8,address))": { + "sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Sends the state root snapshot using Arbitrum's canonical bridge.", "params": { "_claim": "The claim associated with the epoch.", @@ -307,13 +374,12 @@ }, "userdoc": { "events": { - "SnapshotSaved(uint64)": { + "SnapshotSaved(bytes32,uint256,uint64)": { "notice": "The bridgers can watch this event to claim the stateRoot on the veaOutbox." } }, "kind": "user", "methods": {}, - "notice": "Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.", "version": 1 }, "storageLayout": { diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json new file mode 100644 index 00000000..49ee6630 --- /dev/null +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json @@ -0,0 +1,443 @@ +{ + "address": "0x8893441F219e2836D9c7E1c727CDA9ACFF84D069", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epochPeriod", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_veaOutboxArbToEth", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "_nodeData", + "type": "bytes" + } + ], + "name": "MessageSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "_snapshot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_count", + "type": "uint64" + } + ], + "name": "SnapshotSaved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_epochSent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_ticketId", + "type": "bytes32" + } + ], + "name": "SnapshotSent", + "type": "event" + }, + { + "inputs": [], + "name": "count", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "epochAt", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochNow", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "inbox", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "saveSnapshot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "_fnSelector", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "sendMessage", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "sendSnapshot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "snapshots", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "veaOutboxArbToEth", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x48eec9ead1467c76fee05acc6436b3dc265906452800dc7b2ed16d46c98970ef", + "receipt": { + "to": null, + "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", + "contractAddress": "0x8893441F219e2836D9c7E1c727CDA9ACFF84D069", + "transactionIndex": 2, + "gasUsed": "672962", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x4b4af6ff2df8dd46a9073c356d72b043986081186d009a225f9f90b39806b394", + "transactionHash": "0x48eec9ead1467c76fee05acc6436b3dc265906452800dc7b2ed16d46c98970ef", + "logs": [], + "blockNumber": 26147399, + "cumulativeGasUsed": "861180", + "status": 1, + "byzantium": true + }, + "args": [ + 7200, + "0x9cF5c011e2A4CB7797413f311A35AcB021071c35" + ], + "numDeployments": 4, + "solcInputHash": "c9836c6cb024801f3104e49f87086294", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n \\n // epochPeriod should never be set this small, but we check non-zero value as a sanity check to avoid division by zero\\n require(_epochPeriod > 0, \\\"Epoch period must be greater than 0.\\\");\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x90dcc790abb213bcad8e8f0e431590f9b4f10017338c7e3d780e25ed999d7f0b\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610c55380380610c5583398101604081905261002f916100a5565b60808290526001600160a01b03811660a0528161009e5760405162461bcd60e51b8152602060048201526024808201527f45706f636820706572696f64206d7573742062652067726561746572207468616044820152633710181760e11b606482015260840160405180910390fd5b50506100e2565b600080604083850312156100b857600080fd5b825160208401519092506001600160a01b03811681146100d757600080fd5b809150509250929050565b60805160a051610b2b61012a6000396000818161012001526105b401526000818161015f015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122094407127302ed545ff4f2b1bef1e39e0ed071c2adffcd35207f07bce2f12d28164736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122094407127302ed545ff4f2b1bef1e39e0ed071c2adffcd35207f07bce2f12d28164736f6c63430008120033", + "devdoc": { + "details": "Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.", + "events": { + "MessageSent(bytes)": { + "details": "Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.", + "params": { + "_nodeData": "The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)." + } + }, + "SnapshotSaved(bytes32,uint256,uint64)": { + "params": { + "_count": "The count of messages in the merkle tree.", + "_epoch": "The epoch of the snapshot.", + "_snapshot": "The snapshot of the merkle tree state root." + } + }, + "SnapshotSent(uint256,bytes32)": { + "details": "The event is emitted when a snapshot is sent through the canonical arbitrum bridge.", + "params": { + "_epochSent": "The epoch of the snapshot.", + "_ticketId": "The ticketId of the L2->L1 message." + } + } + }, + "kind": "dev", + "methods": { + "constructor": { + "details": "Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value", + "params": { + "_epochPeriod": "The duration in seconds between epochs.", + "_veaOutboxArbToEth": "The veaOutbox on ethereum." + } + }, + "epochAt(uint256)": { + "details": "Get the epoch from the inbox's point of view using timestamp.", + "params": { + "_timestamp": "The timestamp to calculate the epoch from." + }, + "returns": { + "epoch": "The calculated epoch." + } + }, + "epochNow()": { + "details": "Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.", + "returns": { + "epoch": "The epoch associated with the current inbox block.timestamp" + } + }, + "saveSnapshot()": { + "details": "Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state." + }, + "sendMessage(address,bytes4,bytes)": { + "details": "Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.", + "params": { + "_data": "The message calldata, abi.encode(param1, param2, ...)", + "_fnSelector": "The function selector of the receiving contract.", + "_to": "The address of the contract on the receiving chain which receives the calldata." + }, + "returns": { + "_0": "msgId The zero based index of the message in the inbox." + } + }, + "sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Sends the state root snapshot using Arbitrum's canonical bridge.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch of the snapshot requested to send." + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "SnapshotSaved(bytes32,uint256,uint64)": { + "notice": "The bridgers can watch this event to claim the stateRoot on the veaOutbox." + } + }, + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 24, + "contract": "src/arbitrumToEth/VeaInboxArbToEth.sol:VeaInboxArbToEth", + "label": "snapshots", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_uint256,t_bytes32)" + }, + { + "astId": 28, + "contract": "src/arbitrumToEth/VeaInboxArbToEth.sol:VeaInboxArbToEth", + "label": "inbox", + "offset": 0, + "slot": "1", + "type": "t_array(t_bytes32)64_storage" + }, + { + "astId": 30, + "contract": "src/arbitrumToEth/VeaInboxArbToEth.sol:VeaInboxArbToEth", + "label": "count", + "offset": 0, + "slot": "65", + "type": "t_uint64" + } + ], + "types": { + "t_array(t_bytes32)64_storage": { + "base": "t_bytes32", + "encoding": "inplace", + "label": "bytes32[64]", + "numberOfBytes": "2048" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + } +} diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json index 3d87d76a..1c9aa7f3 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x660daB9A6436A814a6ae3a6f27b309356a4bE78c", + "address": "0x6aF68A94246AB9Ad3e6B1D5e28d9eAF374eaB015", "abi": [ { "inputs": [ @@ -33,6 +33,18 @@ { "anonymous": false, "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "_snapshot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, { "indexed": false, "internalType": "uint64", @@ -75,6 +87,38 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "epochAt", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochNow", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "epochPeriod", @@ -177,12 +221,17 @@ }, { "internalType": "uint32", - "name": "timestamp", + "name": "timestampClaimed", "type": "uint32" }, { "internalType": "uint32", - "name": "blocknumber", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", "type": "uint32" }, { @@ -226,42 +275,45 @@ "type": "function" } ], - "transactionHash": "0x68aa646f6b36c052ab7783e8c7a69f1f8386635bb9f4f64f1980cea7c34ea8f0", + "transactionHash": "0x4d210306fd0acb8d7d1f7dcbaf779085ec258d6d3dc5576f2d2a59445fd4cf9d", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x660daB9A6436A814a6ae3a6f27b309356a4bE78c", - "transactionIndex": 2, - "gasUsed": "651662", + "contractAddress": "0x6aF68A94246AB9Ad3e6B1D5e28d9eAF374eaB015", + "transactionIndex": 1, + "gasUsed": "672962", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x6068d09be0fd1224cb5811ce5fefa9641571a0687a50110b75daf794652b5bb4", - "transactionHash": "0x68aa646f6b36c052ab7783e8c7a69f1f8386635bb9f4f64f1980cea7c34ea8f0", + "blockHash": "0x905e9319e1a6a1c12f9c20a0625be74f3e4492c4c870db02f8160181b656717d", + "transactionHash": "0x4d210306fd0acb8d7d1f7dcbaf779085ec258d6d3dc5576f2d2a59445fd4cf9d", "logs": [], - "blockNumber": 21519249, - "cumulativeGasUsed": "790580", + "blockNumber": 26137715, + "cumulativeGasUsed": "672962", "status": 1, "byzantium": true }, "args": [ 1800, - "0xdFd7aDEb43d46FA3f16FB3e27F7fe85c3f5BD89D" + "0x32b55e5E51f6F4cbd661a4cA1cC6142f6380777b" ], - "numDeployments": 8, - "solcInputHash": "164349035d8ff73dc3aa26ca72d8e398", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)\"}},\"SnapshotSaved(uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See merkle tree documentation for details how inbox manages state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"notice\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@jaybuidl, @shotaronowhere]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\n\\n/**\\n * Vea Inbox From Arbitrum to Gnosis.\\n * Note: This contract is deployed on the Arbitrum.\\n */\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between stateroot snapshots\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /**\\n * @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n * @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)\\n */\\n event MessageSent(bytes _nodeData);\\n\\n /**\\n * The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n * @param _count The count of messages in the merkle tree.\\n */\\n event SnapshotSaved(uint64 _count);\\n\\n /**\\n * @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n * @param _epochSent The epoch of the snapshot.\\n * @param _ticketId The ticketId of the L2->L1 message.\\n */\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /**\\n * @dev Constructor.\\n * Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n * @param _epochPeriod The duration in seconds between epochs.\\n * @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n */\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n\\n // epochPeriod should never be set this small, but we check non-zero value as a sanity check to avoid division by zero\\n require(_epochPeriod > 0, \\\"Epoch period must be greater than 0.\\\");\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Sends an arbitrary message to Gnosis.\\n * `O(log(count))` where count is the number of messages already sent.\\n * Amortized cost is constant.\\n * Note: See merkle tree documentation for details how inbox manages state.\\n * @param _to The address of the contract on the receiving chain which receives the calldata.\\n * @param _fnSelector The function selector of the receiving contract.\\n * @param _data The message calldata, abi.encode(param1, param2, ...)\\n * @return msgId The zero based index of the message in the inbox.\\n */\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // data for outbox relay\\n abi.encodePacked( // abi.encodeWithSelector(fnSelector, msg.sender, data)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /**\\n * @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n * `O(log(count))` where count number of messages in the inbox.\\n * Note: See merkle tree docs for details how inbox manages state.\\n */\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n require(snapshots[epoch] == bytes32(0), \\\"Snapshot already taken for this epoch.\\\");\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(count);\\n }\\n\\n /**\\n * @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n * note: EVM scratch space is used to efficiently calculate hashes.\\n * @param _left The left hash.\\n * @param _right The right hash.\\n * @return parent The parent hash.\\n */\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /**\\n * @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n * @param _epoch The epoch of the snapshot requested to send.\\n * @param _claim The claim associated with the epoch\\n */\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToL1.route, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x783bca9185d916b9830ca0d3617847cf35c77e619b85f4e26129c8915a604049\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n/**\\n * @title System level functionality\\n * @notice For use by contracts to interact with core L2-specific functionality.\\n * Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\n */\\ninterface IArbSys {\\n /**\\n * @notice Send a transaction to L1\\n * @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n * to a contract address without any code (as enforced by the Bridge contract).\\n * @param destination recipient address on L1\\n * @param data (optional) calldata for L1 contract call\\n * @return a unique identifier for this L2-to-L1 transaction.\\n */\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x0029d413171b339edaae794d96d33fa7f8a1500b6ea27e2a533ae7333337c50b\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@jaybuidl, @shotaronowhere]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /**\\n * @dev Sends an arbitrary message to receiving chain.\\n * Note: Calls authenticated by receiving gateway checking the sender argument.\\n * @param _to The cross-domain contract address which receives the calldata.\\n * @param _fnSelection The function selector of the receiving contract.\\n * @param _data The message calldata, abi.encode(...)\\n * @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n */\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /**\\n * Saves snapshot of state root.\\n * `O(log(count))` where count number of messages in the inbox.\\n * @dev Snapshots can be saved a maximum of once per epoch.\\n */\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x86b4efc88b10b38080ca738e0d7c06e84f24e7cbb6a19b16f9a3e62433019094\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@shotaronowhere]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/**\\n * @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n * @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n * @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\n */\\ninterface IRouterToL1 {\\n /**\\n * Note: Access restricted to canonical sending-chain bridge.\\n * @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n * @param _epoch The epoch to verify.\\n * @param _stateRoot The true state root for the epoch.\\n * @param _claim The claim associated with the epoch.\\n */\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xc686c3c4fc00ed3832f699243647b6b96a37263443e24d096daced73c38c9c4a\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@jaybuidl, @shotaronowhere]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestamp;\\n uint32 blocknumber;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1bdda50afbf5f966278a867e7149397ed820de658c15dda4266e70c314df17d2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b50604051610bd4380380610bd483398101604081905261002f916100a5565b60808290526001600160a01b03811660a0528161009e5760405162461bcd60e51b8152602060048201526024808201527f45706f636820706572696f64206d7573742062652067726561746572207468616044820152633710181760e11b606482015260840160405180910390fd5b50506100e2565b600080604083850312156100b857600080fd5b825160208401519092506001600160a01b03811681146100d757600080fd5b809150509250929050565b60805160a051610ab961011b60003960008181610116015261058001526000818160e10152818161019b015261048d0152610ab96000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063d5e6a9df1161005b578063d5e6a9df14610111578063d6565a2d14610150578063e149b5ec14610170578063e5a1c3561461018357600080fd5b806306661abd1461008d57806351920535146100bf5780635f85896c146100c9578063b5b7a184146100dc575b600080fd5b6041546100a19067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100c7610196565b005b6100a16100d7366004610702565b61031f565b6101037f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100b6565b6101387f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b6565b61010361015e3660046107c7565b60006020819052908152604090205481565b6100c761017e3660046107f4565b61048b565b6101036101913660046107c7565b61062b565b6000807f000000000000000000000000000000000000000000000000000000000000000042816101c8576101c8610894565b046000818152602081905260409020549092501561023c5760405162461bcd60e51b815260206004820152602660248201527f536e617073686f7420616c72656164792074616b656e20666f7220746869732060448201526532b837b1b41760d11b60648201526084015b60405180910390fd5b60415460009067ffffffffffffffff165b8015610286578060011660010361027a5760018260408110610271576102716108aa565b01549250610286565b6001918201911c61024d565b60011c5b80156102c85760019182019181811690036102c0576102bd600183604081106102b5576102b56108aa565b015484610642565b92505b60011c61028a565b505060008281526020818152604091829020839055604154915167ffffffffffffffff90921682527f8d762ebc760982a11d9a00cc7c1c4c91f9c1084b85633ee8ca462da42465f1d9910160405180910390a15050565b60415460009067ffffffffffffffff9081169081106103715760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b6044820152606401610233565b6040516000908290879061038d908890339089906020016108e4565b60408051601f19818403018152908290526103ac93929160200161091a565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610410576103f8600183604081106102b5576102b56108aa565b92506001918201911c677fffffffffffffff166103d7565b508160018260408110610425576104256108aa565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03690610478908490610995565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ba576104ba610894565b0482106105145760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b6064820152608401610233565b60008281526020819052604080822054905161053691859185906024016109af565b60408051601f198184030181529181526020820180516001600160e01b031663b9457b0760e01b179052516349460b4d60e11b815290915060009060649063928c169a906105aa907f0000000000000000000000000000000000000000000000000000000000000000908690600401610a3e565b6020604051808303816000875af11580156105c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ed9190610a6a565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061063b57600080fd5b0154905081565b60008183101561066057826000528160205260406000209050610670565b8160005282602052604060002090505b92915050565b80356001600160a01b038116811461068d57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160c0810167ffffffffffffffff811182821017156106cb576106cb610692565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156106fa576106fa610692565b604052919050565b60008060006060848603121561071757600080fd5b61072084610676565b92506020848101356001600160e01b03198116811461073e57600080fd5b9250604085013567ffffffffffffffff8082111561075b57600080fd5b818701915087601f83011261076f57600080fd5b81358181111561078157610781610692565b610793601f8201601f191685016106d1565b915080825288848285010111156107a957600080fd5b80848401858401376000848284010152508093505050509250925092565b6000602082840312156107d957600080fd5b5035919050565b803563ffffffff8116811461068d57600080fd5b60008082840360e081121561080857600080fd5b8335925060c0601f198201121561081e57600080fd5b506108276106a8565b6020840135815261083a60408501610676565b602082015261084b606085016107e0565b604082015261085c608085016107e0565b606082015260a08401356003811061087357600080fd5b608082015261088460c08501610676565b60a0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60005b838110156108db5781810151838201526020016108c3565b50506000910152565b63ffffffff60e01b841681528260048201526000825161090b8160248501602087016108c0565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b1660088201526000825161095a81601c8501602087016108c0565b91909101601c01949350505050565b600081518084526109818160208601602086016108c0565b601f01601f19169290920160200192915050565b6020815260006109a86020830184610969565b9392505050565b6000610100820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501525050608083015160038110610a1d57634e487b7160e01b600052602160045260246000fd5b60c083015260a092909201516001600160a01b031660e09091015292915050565b6001600160a01b0383168152604060208201819052600090610a6290830184610969565b949350505050565b600060208284031215610a7c57600080fd5b505191905056fea2646970667358221220d2117e5649949352e9a497686fe72b50cf6fabe4e2b193a8061a0ad55c4d7c7564736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063d5e6a9df1161005b578063d5e6a9df14610111578063d6565a2d14610150578063e149b5ec14610170578063e5a1c3561461018357600080fd5b806306661abd1461008d57806351920535146100bf5780635f85896c146100c9578063b5b7a184146100dc575b600080fd5b6041546100a19067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100c7610196565b005b6100a16100d7366004610702565b61031f565b6101037f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100b6565b6101387f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b6565b61010361015e3660046107c7565b60006020819052908152604090205481565b6100c761017e3660046107f4565b61048b565b6101036101913660046107c7565b61062b565b6000807f000000000000000000000000000000000000000000000000000000000000000042816101c8576101c8610894565b046000818152602081905260409020549092501561023c5760405162461bcd60e51b815260206004820152602660248201527f536e617073686f7420616c72656164792074616b656e20666f7220746869732060448201526532b837b1b41760d11b60648201526084015b60405180910390fd5b60415460009067ffffffffffffffff165b8015610286578060011660010361027a5760018260408110610271576102716108aa565b01549250610286565b6001918201911c61024d565b60011c5b80156102c85760019182019181811690036102c0576102bd600183604081106102b5576102b56108aa565b015484610642565b92505b60011c61028a565b505060008281526020818152604091829020839055604154915167ffffffffffffffff90921682527f8d762ebc760982a11d9a00cc7c1c4c91f9c1084b85633ee8ca462da42465f1d9910160405180910390a15050565b60415460009067ffffffffffffffff9081169081106103715760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b6044820152606401610233565b6040516000908290879061038d908890339089906020016108e4565b60408051601f19818403018152908290526103ac93929160200161091a565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610410576103f8600183604081106102b5576102b56108aa565b92506001918201911c677fffffffffffffff166103d7565b508160018260408110610425576104256108aa565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b03690610478908490610995565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ba576104ba610894565b0482106105145760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b6064820152608401610233565b60008281526020819052604080822054905161053691859185906024016109af565b60408051601f198184030181529181526020820180516001600160e01b031663b9457b0760e01b179052516349460b4d60e11b815290915060009060649063928c169a906105aa907f0000000000000000000000000000000000000000000000000000000000000000908690600401610a3e565b6020604051808303816000875af11580156105c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ed9190610a6a565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061063b57600080fd5b0154905081565b60008183101561066057826000528160205260406000209050610670565b8160005282602052604060002090505b92915050565b80356001600160a01b038116811461068d57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160c0810167ffffffffffffffff811182821017156106cb576106cb610692565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156106fa576106fa610692565b604052919050565b60008060006060848603121561071757600080fd5b61072084610676565b92506020848101356001600160e01b03198116811461073e57600080fd5b9250604085013567ffffffffffffffff8082111561075b57600080fd5b818701915087601f83011261076f57600080fd5b81358181111561078157610781610692565b610793601f8201601f191685016106d1565b915080825288848285010111156107a957600080fd5b80848401858401376000848284010152508093505050509250925092565b6000602082840312156107d957600080fd5b5035919050565b803563ffffffff8116811461068d57600080fd5b60008082840360e081121561080857600080fd5b8335925060c0601f198201121561081e57600080fd5b506108276106a8565b6020840135815261083a60408501610676565b602082015261084b606085016107e0565b604082015261085c608085016107e0565b606082015260a08401356003811061087357600080fd5b608082015261088460c08501610676565b60a0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60005b838110156108db5781810151838201526020016108c3565b50506000910152565b63ffffffff60e01b841681528260048201526000825161090b8160248501602087016108c0565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b1660088201526000825161095a81601c8501602087016108c0565b91909101601c01949350505050565b600081518084526109818160208601602086016108c0565b601f01601f19169290920160200192915050565b6020815260006109a86020830184610969565b9392505050565b6000610100820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501525050608083015160038110610a1d57634e487b7160e01b600052602160045260246000fd5b60c083015260a092909201516001600160a01b031660e09091015292915050565b6001600160a01b0383168152604060208201819052600090610a6290830184610969565b949350505050565b600060208284031215610a7c57600080fd5b505191905056fea2646970667358221220d2117e5649949352e9a497686fe72b50cf6fabe4e2b193a8061a0ad55c4d7c7564736f6c63430008120033", + "numDeployments": 9, + "solcInputHash": "c9836c6cb024801f3104e49f87086294", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n\\n // epochPeriod should never be set this small, but we check non-zero value as a sanity check to avoid division by zero\\n require(_epochPeriod > 0, \\\"Epoch period must be greater than 0.\\\");\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n \\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToL1.route, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x874abaaca56ea116842cd346203f8a7c379980655cd63e36a03f6e5bc6bcaeb3\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610c55380380610c5583398101604081905261002f916100a5565b60808290526001600160a01b03811660a0528161009e5760405162461bcd60e51b8152602060048201526024808201527f45706f636820706572696f64206d7573742062652067726561746572207468616044820152633710181760e11b606482015260840160405180910390fd5b50506100e2565b600080604083850312156100b857600080fd5b825160208401519092506001600160a01b03811681146100d757600080fd5b809150509250929050565b60805160a051610b2b61012a6000396000818161015a01526105b4015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea26469706673582212204c224f9540e5afa597c0bbc232c72da16fde23ebb10cb81218150d7be7e9307b64736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea26469706673582212204c224f9540e5afa597c0bbc232c72da16fde23ebb10cb81218150d7be7e9307b64736f6c63430008120033", "devdoc": { + "details": "Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.", "events": { "MessageSent(bytes)": { "details": "Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.", "params": { - "_nodeData": "The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)" + "_nodeData": "The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)." } }, - "SnapshotSaved(uint64)": { + "SnapshotSaved(bytes32,uint256,uint64)": { "params": { - "_count": "The count of messages in the merkle tree." + "_count": "The count of messages in the merkle tree.", + "_epoch": "The epoch of the snapshot.", + "_snapshot": "The snapshot of the merkle tree state root." } }, "SnapshotSent(uint256,bytes32)": { @@ -281,11 +333,26 @@ "_routerArbToGnosis": "The router on Ethereum that routes from Arbitrum to Gnosis." } }, + "epochAt(uint256)": { + "details": "Get the epoch from the inbox's point of view using timestamp.", + "params": { + "_timestamp": "The timestamp to calculate the epoch from." + }, + "returns": { + "epoch": "The calculated epoch." + } + }, + "epochNow()": { + "details": "Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.", + "returns": { + "epoch": "The epoch associated with the current inbox block.timestamp" + } + }, "saveSnapshot()": { - "details": "Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state." + "details": "Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state." }, "sendMessage(address,bytes4,bytes)": { - "details": "Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See merkle tree documentation for details how inbox manages state.", + "details": "Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.", "params": { "_data": "The message calldata, abi.encode(param1, param2, ...)", "_fnSelector": "The function selector of the receiving contract.", @@ -295,10 +362,10 @@ "_0": "msgId The zero based index of the message in the inbox." } }, - "sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint8,address))": { + "sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Sends the state root snapshot using Arbitrum's canonical bridge.", "params": { - "_claim": "The claim associated with the epoch", + "_claim": "The claim associated with the epoch.", "_epoch": "The epoch of the snapshot requested to send." } } @@ -307,19 +374,18 @@ }, "userdoc": { "events": { - "SnapshotSaved(uint64)": { + "SnapshotSaved(bytes32,uint256,uint64)": { "notice": "The bridgers can watch this event to claim the stateRoot on the veaOutbox." } }, "kind": "user", "methods": {}, - "notice": "Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.", "version": 1 }, "storageLayout": { "storage": [ { - "astId": 1627, + "astId": 2140, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "snapshots", "offset": 0, @@ -327,7 +393,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 1631, + "astId": 2144, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "inbox", "offset": 0, @@ -335,7 +401,7 @@ "type": "t_array(t_bytes32)64_storage" }, { - "astId": 1633, + "astId": 2146, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "count", "offset": 0, diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json new file mode 100644 index 00000000..442dcdd1 --- /dev/null +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json @@ -0,0 +1,443 @@ +{ + "address": "0x773872EFbA47b926F4B2d42DaB4677431bDA02E4", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epochPeriod", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_routerArbToGnosis", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "_nodeData", + "type": "bytes" + } + ], + "name": "MessageSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "_snapshot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_count", + "type": "uint64" + } + ], + "name": "SnapshotSaved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_epochSent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_ticketId", + "type": "bytes32" + } + ], + "name": "SnapshotSent", + "type": "event" + }, + { + "inputs": [], + "name": "count", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "epochAt", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochNow", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "inbox", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "routerArbToGnosis", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "saveSnapshot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "_fnSelector", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "sendMessage", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "sendSnapshot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "snapshots", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x6151bd455b5bab507dd838b2120bf057a163b5e6cbaccc38d58e4b1776c1592d", + "receipt": { + "to": null, + "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", + "contractAddress": "0x773872EFbA47b926F4B2d42DaB4677431bDA02E4", + "transactionIndex": 1, + "gasUsed": "672962", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xe4590dde0f52cf13f1a6e55a35bbce338b13801ca346fb0adc5532dad43e325d", + "transactionHash": "0x6151bd455b5bab507dd838b2120bf057a163b5e6cbaccc38d58e4b1776c1592d", + "logs": [], + "blockNumber": 26147455, + "cumulativeGasUsed": "672962", + "status": 1, + "byzantium": true + }, + "args": [ + 3600, + "0x53194Fa828ebEfa5cB515d23CC2467d88f6B0Be2" + ], + "numDeployments": 2, + "solcInputHash": "c9836c6cb024801f3104e49f87086294", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n\\n // epochPeriod should never be set this small, but we check non-zero value as a sanity check to avoid division by zero\\n require(_epochPeriod > 0, \\\"Epoch period must be greater than 0.\\\");\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n \\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToL1.route, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x874abaaca56ea116842cd346203f8a7c379980655cd63e36a03f6e5bc6bcaeb3\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610c55380380610c5583398101604081905261002f916100a5565b60808290526001600160a01b03811660a0528161009e5760405162461bcd60e51b8152602060048201526024808201527f45706f636820706572696f64206d7573742062652067726561746572207468616044820152633710181760e11b606482015260840160405180910390fd5b50506100e2565b600080604083850312156100b857600080fd5b825160208401519092506001600160a01b03811681146100d757600080fd5b809150509250929050565b60805160a051610b2b61012a6000396000818161015a01526105b4015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea26469706673582212204c224f9540e5afa597c0bbc232c72da16fde23ebb10cb81218150d7be7e9307b64736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea26469706673582212204c224f9540e5afa597c0bbc232c72da16fde23ebb10cb81218150d7be7e9307b64736f6c63430008120033", + "devdoc": { + "details": "Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.", + "events": { + "MessageSent(bytes)": { + "details": "Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.", + "params": { + "_nodeData": "The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)." + } + }, + "SnapshotSaved(bytes32,uint256,uint64)": { + "params": { + "_count": "The count of messages in the merkle tree.", + "_epoch": "The epoch of the snapshot.", + "_snapshot": "The snapshot of the merkle tree state root." + } + }, + "SnapshotSent(uint256,bytes32)": { + "details": "The event is emitted when a snapshot is sent through the canonical arbitrum bridge.", + "params": { + "_epochSent": "The epoch of the snapshot.", + "_ticketId": "The ticketId of the L2->L1 message." + } + } + }, + "kind": "dev", + "methods": { + "constructor": { + "details": "Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value", + "params": { + "_epochPeriod": "The duration in seconds between epochs.", + "_routerArbToGnosis": "The router on Ethereum that routes from Arbitrum to Gnosis." + } + }, + "epochAt(uint256)": { + "details": "Get the epoch from the inbox's point of view using timestamp.", + "params": { + "_timestamp": "The timestamp to calculate the epoch from." + }, + "returns": { + "epoch": "The calculated epoch." + } + }, + "epochNow()": { + "details": "Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.", + "returns": { + "epoch": "The epoch associated with the current inbox block.timestamp" + } + }, + "saveSnapshot()": { + "details": "Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state." + }, + "sendMessage(address,bytes4,bytes)": { + "details": "Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.", + "params": { + "_data": "The message calldata, abi.encode(param1, param2, ...)", + "_fnSelector": "The function selector of the receiving contract.", + "_to": "The address of the contract on the receiving chain which receives the calldata." + }, + "returns": { + "_0": "msgId The zero based index of the message in the inbox." + } + }, + "sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Sends the state root snapshot using Arbitrum's canonical bridge.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch of the snapshot requested to send." + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "SnapshotSaved(bytes32,uint256,uint64)": { + "notice": "The bridgers can watch this event to claim the stateRoot on the veaOutbox." + } + }, + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2140, + "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", + "label": "snapshots", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_uint256,t_bytes32)" + }, + { + "astId": 2144, + "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", + "label": "inbox", + "offset": 0, + "slot": "1", + "type": "t_array(t_bytes32)64_storage" + }, + { + "astId": 2146, + "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", + "label": "count", + "offset": 0, + "slot": "65", + "type": "t_uint64" + } + ], + "types": { + "t_array(t_bytes32)64_storage": { + "base": "t_bytes32", + "encoding": "inplace", + "label": "bytes32[64]", + "numberOfBytes": "2048" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + } +} diff --git a/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json b/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json index 46f03352..e9282f3d 100644 --- a/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json +++ b/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xdFd7aDEb43d46FA3f16FB3e27F7fe85c3f5BD89D", + "address": "0x32b55e5E51f6F4cbd661a4cA1cC6142f6380777b", "abi": [ { "inputs": [ @@ -23,11 +23,6 @@ "name": "_timeoutEpochs", "type": "uint256" }, - { - "internalType": "uint256", - "name": "_claimDelay", - "type": "uint256" - }, { "internalType": "contract IAMB", "name": "_amb", @@ -42,6 +37,16 @@ "internalType": "uint256", "name": "_maxMissingBlocks", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_sequencerLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_routerChainId", + "type": "uint256" } ], "stateMutability": "nonpayable", @@ -98,6 +103,32 @@ "name": "MessageRelayed", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newSequencerLimit", + "type": "uint256" + } + ], + "name": "SequencerLimitUpdateReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "VerificationStarted", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -126,11 +157,6 @@ }, { "inputs": [ - { - "internalType": "uint256", - "name": "_epoch", - "type": "uint256" - }, { "components": [ { @@ -145,12 +171,17 @@ }, { "internalType": "uint32", - "name": "timestamp", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", "type": "uint32" }, { "internalType": "uint32", - "name": "blocknumber", + "name": "blocknumberVerification", "type": "uint32" }, { @@ -169,22 +200,70 @@ "type": "tuple" } ], - "name": "challenge", - "outputs": [], - "stateMutability": "payable", + "name": "censorshipTestStatus", + "outputs": [ + { + "internalType": "enum VeaOutboxArbToGnosis.CensorshipTestStatus", + "name": "status", + "type": "uint8" + } + ], + "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "challengePeriod", - "outputs": [ + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "_epoch", "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" } ], - "stateMutability": "view", + "name": "challenge", + "outputs": [], + "stateMutability": "payable", "type": "function" }, { @@ -218,19 +297,6 @@ "stateMutability": "payable", "type": "function" }, - { - "inputs": [], - "name": "claimDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -294,6 +360,38 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "epochAt", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochNow", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "epochPeriod", @@ -323,12 +421,17 @@ }, { "internalType": "uint32", - "name": "timestamp", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", "type": "uint32" }, { "internalType": "uint32", - "name": "blocknumber", + "name": "blocknumberVerification", "type": "uint32" }, { @@ -385,51 +488,13 @@ "type": "function" }, { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "stateRoot", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "claimer", - "type": "address" - }, - { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "blocknumber", - "type": "uint32" - }, - { - "internalType": "enum Party", - "name": "honest", - "type": "uint8" - }, - { - "internalType": "address", - "name": "challenger", - "type": "address" - } - ], - "internalType": "struct Claim", - "name": "_claim", - "type": "tuple" - } - ], - "name": "passedTest", + "inputs": [], + "name": "minChallengePeriod", "outputs": [ { - "internalType": "bool", - "name": "testPassed", - "type": "bool" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], "stateMutability": "view", @@ -480,12 +545,17 @@ }, { "internalType": "uint32", - "name": "timestamp", + "name": "timestampClaimed", "type": "uint32" }, { "internalType": "uint32", - "name": "blocknumber", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", "type": "uint32" }, { @@ -522,6 +592,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "routerChainId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -550,6 +633,74 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "sequencerLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "startVerification", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "stateRoot", @@ -576,6 +727,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newSequencerLimit", + "type": "uint256" + } + ], + "name": "updateSequencerLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -597,12 +761,17 @@ }, { "internalType": "uint32", - "name": "timestamp", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", "type": "uint32" }, { "internalType": "uint32", - "name": "blocknumber", + "name": "blocknumberVerification", "type": "uint32" }, { @@ -621,7 +790,7 @@ "type": "tuple" } ], - "name": "validateSnapshot", + "name": "verifySnapshot", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -647,12 +816,17 @@ }, { "internalType": "uint32", - "name": "timestamp", + "name": "timestampClaimed", "type": "uint32" }, { "internalType": "uint32", - "name": "blocknumber", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", "type": "uint32" }, { @@ -697,12 +871,17 @@ }, { "internalType": "uint32", - "name": "timestamp", + "name": "timestampClaimed", "type": "uint32" }, { "internalType": "uint32", - "name": "blocknumber", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", "type": "uint32" }, { @@ -747,12 +926,17 @@ }, { "internalType": "uint32", - "name": "timestamp", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", "type": "uint32" }, { "internalType": "uint32", - "name": "blocknumber", + "name": "blocknumberVerification", "type": "uint32" }, { @@ -797,12 +981,17 @@ }, { "internalType": "uint32", - "name": "timestamp", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", "type": "uint32" }, { "internalType": "uint32", - "name": "blocknumber", + "name": "blocknumberVerification", "type": "uint32" }, { @@ -827,19 +1016,19 @@ "type": "function" } ], - "transactionHash": "0x7f5fdadebaab37571744759fdf7a075861633178d5e4b6e4ae5e7ac25445a55d", + "transactionHash": "0x6dd0e4d968d7e0d520d64b49c2b8c62a2718c33e4f58f0e6819dcc84a1ac4075", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xdFd7aDEb43d46FA3f16FB3e27F7fe85c3f5BD89D", + "contractAddress": "0x32b55e5E51f6F4cbd661a4cA1cC6142f6380777b", "transactionIndex": 0, - "gasUsed": "1937548", + "gasUsed": "2093426", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x5add32b977f907094f7771c2639f4abb1a624b7dcf0ae0e168d0cc64bcc37ec0", - "transactionHash": "0x7f5fdadebaab37571744759fdf7a075861633178d5e4b6e4ae5e7ac25445a55d", + "blockHash": "0x9627161ef7f97e2d5311c5905bdd5ad1242fdca0e1b36d48aae3505fdabfa30d", + "transactionHash": "0x6dd0e4d968d7e0d520d64b49c2b8c62a2718c33e4f58f0e6819dcc84a1ac4075", "logs": [], - "blockNumber": 4087642, - "cumulativeGasUsed": "1937548", + "blockNumber": 4471814, + "cumulativeGasUsed": "2093426", "status": 1, "byzantium": true }, @@ -848,17 +1037,19 @@ 1800, 0, 10000000000000, - 0, "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0xD4847f86Ed2E9D03839B15fd0818759861c063a8", - 10000000000000 + "0x660daB9A6436A814a6ae3a6f27b309356a4bE78c", + 86400, + 10000000000000, + 5 ], - "numDeployments": 10, - "solcInputHash": "de8d57bf51a0c5c580c54a12eae49416", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_claimDelay\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosisDevnet\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"passedTest\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"testPassed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"validateSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watcher check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}}},\"kind\":\"dev\",\"methods\":{\"challenge(uint256,(bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_claimDelay\":\"The number of epochs a claim can be submitted for.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_routerArbToGnosisDevnet\":\"The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"passedTest((bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"Claim passed censorship test\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"testPassed\":\"True if the claim passed the censorship test.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded with header from VeaInbox.\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"validateSnapshot(uint256,(bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"notice\":\"Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":\"VeaOutboxArbToGnosisDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@jaybuidl, @shotaronowhere]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/**\\n * Vea Outbox From Arbitrum to Gnosis.\\n * Note: This contract is deployed on Gnosis.\\n */\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n bytes32 internal constant ROUTER_CHAIN_ID = bytes32(uint256(1)); // Router chain is Ethereum L1\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable challengePeriod; // Claim challenge timewindow.\\n uint256 public immutable claimDelay; // Can only claim for epochs after this delay (seconds)\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot;\\n uint256 public latestVerifiedEpoch;\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /**\\n * @dev Watcher check this event to challenge fraud.\\n * @param _claimer The address of the claimer.\\n * @param _stateRoot The state root of the claim.\\n */\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /**\\n * @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n * @param _epoch The epoch associated with the challenged claim.\\n * @param _challenger The address of the challenger.\\n */\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /**\\n * @dev This event indicates that a message has been relayed.\\n * @param _msgId The msgId of the message that was relayed.\\n */\\n event MessageRelayed(uint64 _msgId);\\n\\n /**\\n * @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n * @param _epoch The epoch that was verified.\\n */\\n event Verified(uint256 _epoch);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod <= latestVerifiedEpoch + timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod > latestVerifiedEpoch + timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /**\\n * @dev Constructor.\\n * Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n * @param _deposit The deposit amount to submit a claim in wei.\\n * @param _epochPeriod The duration of each epoch.\\n * @param _challengePeriod The duration of the period allowing to challenge a claim.\\n * @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n * @param _claimDelay The number of epochs after which the claim can be submitted.\\n * @param _amb The address of the AMB contract on Gnosis.\\n * @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n * @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n */\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n uint256 _claimDelay,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n epochPeriod = _epochPeriod;\\n challengePeriod = _challengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n claimDelay = _claimDelay;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n\\n // claimDelay should never be set this high, but we santiy check to prevent underflow\\n require(claimDelay <= block.timestamp, \\\"Invalid epochClaimDelay.\\\");\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n * @param _epoch The epoch for which the claim is made.\\n * @param _stateRoot The state root to claim.\\n */\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require((block.timestamp - claimDelay) / epochPeriod == _epoch, \\\"Invalid epoch.\\\");\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n blocknumber: uint32(block.number),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n }\\n\\n /**\\n * @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n * @param _epoch The epoch of the claim to challenge.\\n * @param _claim The claim associated with the epoch.\\n */\\n function challenge(uint256 _epoch, Claim memory _claim) external payable virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n\\n unchecked {\\n require(block.timestamp < uint256(_claim.timestamp) + challengePeriod, \\\"Challenge period elapsed.\\\");\\n }\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n }\\n\\n /**\\n * @dev Resolves the optimistic claim for '_epoch'.\\n * @param _epoch The epoch of the optimistic claim.\\n * @param _claim The claim associated with the epoch.\\n */\\n function validateSnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n unchecked {\\n require(_claim.timestamp + challengePeriod < block.timestamp, \\\"Challenge period has not yet elapsed.\\\");\\n require(\\n // expected blocks <= actual blocks + maxMissingBlocks\\n uint256(_claim.blocknumber) + (block.timestamp - uint256(_claim.timestamp)) / SLOT_TIME <=\\n block.number + maxMissingBlocks,\\n \\\"Too many missing blocks. Possible censorship attack. Use canonical bridge.\\\"\\n );\\n }\\n\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /**\\n * Note: Access restricted to AMB.\\n * @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n * @param _epoch The epoch to verify.\\n * @param _stateRoot The true state root for the epoch.\\n * @param _claim The claim associated with the epoch.\\n */\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(ROUTER_CHAIN_ID == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim) && _claim.honest == Party.None) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /**\\n * @dev Verifies and relays the message. UNTRUSTED.\\n * @param _proof The merkle proof to prove the message.\\n * @param _msgId The zero based index of the message in the inbox.\\n * @param _to The address of the contract on Gnosis to call.\\n * @param _message The message encoded with header from VeaInbox.\\n */\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /**\\n * @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n * @param _epoch The epoch associated with the claim deposit to withraw.\\n * @param _claim The claim associated with the epoch.\\n */\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /**\\n * @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n * @param _epoch The epoch associated with the challenge deposit to withraw.\\n * @param _claim The claim associated with the epoch.\\n */\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /**\\n * @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n * @param _epoch The epoch associated with the claim deposit to withraw.\\n * @param _claim The claim associated with the epoch.\\n */\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /**\\n * @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n * @param _epoch The epoch associated with the claim deposit to withraw.\\n * @param _claim The claim associated with the epoch.\\n */\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Hashes the claim.\\n * @param _claim The claim to hash.\\n * @return hashedClaim The hash of the claim.\\n */\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestamp,\\n _claim.blocknumber,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /**\\n * @dev Claim passed censorship test\\n * @param _claim The claim to test.\\n * @return testPassed True if the claim passed the censorship test.\\n */\\n function passedTest(Claim calldata _claim) external view returns (bool testPassed) {\\n uint256 expectedBlocks = uint256(_claim.blocknumber) + (block.timestamp - uint256(_claim.timestamp)) / SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n testPassed = (expectedBlocks <= actualBlocks + maxMissingBlocks);\\n }\\n}\\n\",\"keccak256\":\"0x2e43dd7d77aba05b999c844aa01a97fe0012accdfd9bca1217a6251105985934\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@jaybuidl, @shotaronowhere]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToGnosis/VeaOutboxArbToGnosis.sol\\\";\\n\\n/**\\n * Vea Outbox From ArbitrumGoerli to Chiado.\\n * Note: This contract is deployed on Chiado.\\n * Note: This contract is permissioned for developer testing (devnet).\\n */\\ncontract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis {\\n\\n address public devnetOperator; // permissioned devnet operator\\n\\n /** \\n * @dev Requires that the sender is the devnet operator. \\n */\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender); \\n _;\\n }\\n\\n /**\\n * @dev Changes the devnet operator.\\n * @param _devnetOperator The new testnet operator.\\n */\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator{\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /**\\n * @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n * @param _epoch The epoch for which the claim is made.\\n * @param _stateRoot The state root to claim.\\n */\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n\\n unchecked {\\n require((block.timestamp - claimDelay) / epochPeriod == _epoch, \\\"Invalid epoch.\\\");\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n blocknumber: uint32(block.number),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n }\\n\\n /**\\n * @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n * @param _epoch The epoch of the claim to challenge.\\n * @param _claim The claim associated with the epoch.\\n */\\n function challenge(uint256 _epoch, Claim memory _claim) external payable override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n\\n unchecked {\\n require(block.timestamp < uint256(_claim.timestamp) + challengePeriod, \\\"Challenge period elapsed.\\\");\\n }\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n }\\n\\n /**\\n * @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n * @param _epoch The epoch associated with the claim deposit to withraw.\\n * @param _claim The claim associated with the epoch.\\n */\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn); \\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /**\\n * @dev Resolves the optimistic claim for '_epoch'.\\n * @param _epoch The epoch of the optimistic claim.\\n * @param _claim The claim associated with the epoch.\\n */\\n function validateSnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n unchecked {\\n require(_claim.timestamp + challengePeriod <= block.timestamp, \\\"Challenge period has not yet elapsed.\\\");\\n require(\\n // expected blocks <= actual blocks + maxMissingBlocks\\n uint256(_claim.blocknumber) + (block.timestamp - uint256(_claim.timestamp)) / SLOT_TIME <=\\n block.number + maxMissingBlocks,\\n \\\"Too many missing blocks. Possible censorship attack. Use canonical bridge.\\\"\\n );\\n }\\n\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /**\\n * @dev Testnet operator utility function to claim, validate and withdraw.\\n * @param _epoch The epoch for which the claim is made.\\n * @param _stateroot The state root to claim.\\n */\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n validateSnapshot(\\n _epoch,\\n Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n blocknumber: uint32(block.number),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n withdrawClaimDeposit(\\n _epoch,\\n Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n blocknumber: uint32(block.number),\\n honest: Party.Claimer,\\n challenger: address(0)\\n })\\n );\\n }\\n\\n /**\\n * @dev Constructor.\\n * @param _deposit The deposit amount to submit a claim in wei.\\n * @param _epochPeriod The duration of each epoch.\\n * @param _challengePeriod The duration of the period allowing to challenge a claim.\\n * @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n * @param _claimDelay The number of epochs a claim can be submitted for.\\n * @param _amb The address of the AMB contract on Gnosis.\\n * @param _routerArbToGnosisDevnet The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\\n * @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n */\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n uint256 _claimDelay,\\n IAMB _amb,\\n address _routerArbToGnosisDevnet,\\n uint256 _maxMissingBlocks\\n )\\n VeaOutboxArbToGnosis(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _claimDelay,\\n _amb,\\n _routerArbToGnosisDevnet,\\n _maxMissingBlocks\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x5f4bddfdc5081b343f42e085a4eb1501c0b15ebd748ab0a435fcd80e11ce9304\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@jaybuidl, @shotaronowhere]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/**\\n * @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\n */\\ninterface IVeaOutboxOnL1 {\\n /**\\n * Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n * @dev Verifies and relays the message.\\n * @param _proof The merkle proof to prove the message.\\n * @param _msgId The zero based index of the message in the inbox.\\n * @param _to The address to send the message to.\\n * @param _message The message to relay.\\n */\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /**\\n * Note: Access restricted to canonical bridge.\\n * @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n * @param _epoch The epoch to verify.\\n * @param _stateRoot The true state root for the epoch.\\n * @param _claim The claim associated with the epoch.\\n */\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x0f96c2344dcdf78dc89359ba72e281a28cf8e47368eabf4bebc9a648ffc35163\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@jaybuidl, @shotaronowhere]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestamp;\\n uint32 blocknumber;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1bdda50afbf5f966278a867e7149397ed820de658c15dda4266e70c314df17d2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101c06040523480156200001257600080fd5b50604051620024b6380380620024b683398101604081905262000035916200015e565b60c08890526101208790526101408690526101808590526101608490526001600160a01b03808416608052821660a0526101a0819052878787878787878762000080600289620001ed565b60e08190526200009289600262000210565b6200009e919062000230565b6101005261012051600190620000b59042620001ed565b620000c1919062000230565b600155610160514210156200011c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c69642065706f6368436c61696d44656c61792e0000000000000000604482015260640160405180910390fd5b5050600480546001600160a01b0319163317905550620002469c50505050505050505050505050565b6001600160a01b03811681146200015b57600080fd5b50565b600080600080600080600080610100898b0312156200017c57600080fd5b885197506020890151965060408901519550606089015194506080890151935060a0890151620001ac8162000145565b60c08a0151909350620001bf8162000145565b8092505060e089015190509295985092959890939650565b634e487b7160e01b600052601160045260246000fd5b6000826200020b57634e487b7160e01b600052601260045260246000fd5b500490565b80820281158282048414176200022a576200022a620001d7565b92915050565b818103818111156200022a576200022a620001d7565b60805160a05160c05160e05161010051610120516101405161016051610180516101a05161213e62000378600039600081816103e9015281816105d9015261141401526000818161041d01528181610cc9015281816112bf015281816115a701526117b30152600081816102190152610855015260008181610540015281816111f1015261138b0152600081816104510152818161083401528181610cee015281816112e4015281816115cc01526117d801526000818161070e0152611b3a0152600081816106c60152611ae70152600081816104c50152818161075e01528181610799015281816111570152818161171101528181611778015261191e0152600081816104f90152610f1a01526000818161019801528181610d6801528181610dca0152610e8f015261213e6000f3fe6080604052600436106101815760003560e01c80639588eca2116100d1578063bd7df3f91161008a578063d5e6a9df11610064578063d5e6a9df146104e7578063eedcf2a91461051b578063f3f480d91461052e578063f939bad91461056257600080fd5b8063bd7df3f914610473578063c299be3314610493578063d0e30db0146104b357600080fd5b80639588eca21461038e578063a53d3c26146103a4578063a557d918146103b7578063aa22a1c6146103d7578063b044397e1461040b578063b5b7a1841461043f57600080fd5b806331d144571161013e5780637ba7900c116101185780637ba7900c146103015780638a619a71146103215780638ad3a8f71461034157806390df63b71461036157600080fd5b806331d14457146102ae57806331ddf743146102c157806334c75d72146102e157600080fd5b80631062b39a1461018657806310e8f6bf146101d75780631c8ec299146102075780632415855b146102495780632639c0601461026b57806327ee6bdd14610298575b600080fd5b34801561019257600080fd5b506101ba7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101e357600080fd5b506101f76101f2366004611b8f565b610582565b60405190151581526020016101ce565b34801561021357600080fd5b5061023b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101ce565b34801561025557600080fd5b50610269610264366004611ca6565b610609565b005b34801561027757600080fd5b5061023b610286366004611cd3565b60026020526000908152604090205481565b3480156102a457600080fd5b5061023b60015481565b6102696102bc366004611cec565b610797565b3480156102cd57600080fd5b506102696102dc366004611d6f565b6109da565b3480156102ed57600080fd5b5061023b6102fc366004611e31565b610c7a565b34801561030d57600080fd5b5061026961031c366004611e4d565b610cc7565b34801561032d57600080fd5b5061026961033c366004611e84565b611062565b34801561034d57600080fd5b506004546101ba906001600160a01b031681565b34801561036d57600080fd5b5061023b61037c366004611cd3565b60036020526000908152604090205481565b34801561039a57600080fd5b5061023b60005481565b6102696103b2366004611ca6565b6110c5565b3480156103c357600080fd5b506102696103d2366004611ca6565b6112bd565b3480156103e357600080fd5b5061023b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561041757600080fd5b5061023b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561044b57600080fd5b5061023b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561047f57600080fd5b5061026961048e366004611ca6565b6115a5565b34801561049f57600080fd5b506102696104ae366004611ca6565b6117b1565b3480156104bf57600080fd5b5061023b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104f357600080fd5b506101ba7f000000000000000000000000000000000000000000000000000000000000000081565b610269610529366004611cec565b61196a565b34801561053a57600080fd5b5061023b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561056e57600080fd5b5061026961057d366004611ea1565b611a30565b60008060056105976060850160408601611ec5565b6105a79063ffffffff1642611ef6565b6105b19190611f25565b6105c16080850160608601611ec5565b63ffffffff166105d19190611f47565b9050436105fe7f000000000000000000000000000000000000000000000000000000000000000082611f47565b909111159392505050565b61061281610c7a565b600083815260026020526040902054146106475760405162461bcd60e51b815260040161063e90611f5a565b60405180910390fd5b60018160800151600281111561065f5761065f611f82565b1461069c5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b604482015260640161063e565b60008281526002602052604081205560a08101516001600160a01b031615610748576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000003410156108075760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e0000000000604482015260640161063e565b6004546001600160a01b031633146108315760405162461bcd60e51b815260040161063e90611f98565b817f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000042038161088357610883611f0f565b04146108c25760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21032b837b1b41760911b604482015260640161063e565b806108df5760405162461bcd60e51b815260040161063e90611f5a565b600082815260026020526040902054156109315760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161063e565b61098e6040518060c00160405280838152602001336001600160a01b031681526020014263ffffffff1681526020014363ffffffff1681526020016000600281111561097f5761097f611f82565b81526000602090910152610c7a565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91015b60405180910390a25050565b60408510610a1c5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161063e565b600084848484604051602001610a359493929190611fcf565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610ab5576000888883818110610a7757610a77612011565b90506020020135905082811115610a9c57826000528060205260406000209250610aac565b8060005282602052604060002092505b50600101610a5b565b508060005414610af85760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161063e565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610b6d5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161063e565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610b9d9089908990612027565b6000604051808303816000865af19150503d8060008114610bda576040519150601f19603f3d011682016040523d82523d6000602084013e610bdf565b606091505b5050905080610c305760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161063e565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b80516020808301516040808501516060860151608087015160a08801519351600097610caa979096959101612037565b604051602081830303815290604052805190602001209050919050565b7f0000000000000000000000000000000000000000000000000000000000000000600154017f00000000000000000000000000000000000000000000000000000000000000004281610d1b57610d1b611f0f565b041115610d5d5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161063e565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610dc85760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b604482015260640161063e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4a91906120b7565b600114610e8d5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161063e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610eeb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0f91906120d0565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610f825760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161063e565b60015483118015610f9257508115155b15610fd557600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610fde81610c7a565b60008481526002602052604090205414801561100f575060008160800151600281111561100d5761100d611f82565b145b1561105d5780518290036110295760016080820152611044565b60a08101516001600160a01b03161561104457600260808201525b61104d81610c7a565b6000848152600260205260409020555b505050565b6004546001600160a01b0316331461107957600080fd5b6004546001600160a01b031633146110a35760405162461bcd60e51b815260040161063e90611f98565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6110ce81610c7a565b600083815260026020526040902054146110fa5760405162461bcd60e51b815260040161063e90611f5a565b60a08101516001600160a01b0316156111555760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161063e565b7f00000000000000000000000000000000000000000000000000000000000000003410156111c55760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e00604482015260640161063e565b6004546001600160a01b031633146111ef5760405162461bcd60e51b815260040161063e90611f98565b7f0000000000000000000000000000000000000000000000000000000000000000816040015163ffffffff1601421061126a5760405162461bcd60e51b815260206004820152601960248201527f4368616c6c656e676520706572696f6420656c61707365642e00000000000000604482015260640161063e565b3360a082015261127981610c7a565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791016109ce565b7f0000000000000000000000000000000000000000000000000000000000000000600154017f0000000000000000000000000000000000000000000000000000000000000000428161131157611311611f0f565b0411156113535760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161063e565b61135c81610c7a565b600083815260026020526040902054146113885760405162461bcd60e51b815260040161063e90611f5a565b427f0000000000000000000000000000000000000000000000000000000000000000826040015163ffffffff160111156114125760405162461bcd60e51b815260206004820152602560248201527f4368616c6c656e676520706572696f6420686173206e6f742079657420656c616044820152643839b2b21760d91b606482015260840161063e565b7f000000000000000000000000000000000000000000000000000000000000000043016005826040015163ffffffff1642038161145157611451611f0f565b04826060015163ffffffff160111156114e55760405162461bcd60e51b815260206004820152604a60248201527f546f6f206d616e79206d697373696e6720626c6f636b732e20506f737369626c60448201527f652063656e736f72736869702061747461636b2e205573652063616e6f6e696360648201526930b610313934b233b29760b11b608482015260a40161063e565b60a08101516001600160a01b0316156115375760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161063e565b60015482111561157f57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b6001608082015261158f81610c7a565b6000928352600260205260409092209190915550565b7f0000000000000000000000000000000000000000000000000000000000000000600154017f000000000000000000000000000000000000000000000000000000000000000042816115f9576115f9611f0f565b04116116395760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161063e565b61164281610c7a565b6000838152600260205260409020541461166e5760405162461bcd60e51b815260040161063e90611f5a565b60008160800151600281111561168657611686611f82565b146116c55760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161063e565b60a08101516001600160a01b0316156107935760208101516001600160a01b03166117495760008281526002602052604080822082905560a083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60a081018051600090915261175d82610c7a565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600154017f0000000000000000000000000000000000000000000000000000000000000000428161180557611805611f0f565b04116118455760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161063e565b61184e81610c7a565b6000838152600260205260409020541461187a5760405162461bcd60e51b815260040161063e90611f5a565b60008160800151600281111561189257611892611f82565b146118d15760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161063e565b60208101516001600160a01b0316156107935760a08101516001600160a01b03166119565760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b602081018051600090915261175d82610c7a565b6119748282610797565b6119d2826040518060c00160405280848152602001336001600160a01b031681526020014263ffffffff1681526020014363ffffffff168152602001600060028111156119c3576119c3611f82565b815260006020909101526112bd565b610793826040518060c00160405280848152602001336001600160a01b031681526020014263ffffffff1681526020014363ffffffff16815260200160016002811115611a2157611a21611f82565b81526000602090910152610609565b611a426102fc36839003830183611e31565b60008381526002602052604090205414611a6e5760405162461bcd60e51b815260040161063e90611f5a565b6002611a8060a08301608084016120ed565b6002811115611a9157611a91611f82565b14611ad25760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b604482015260640161063e565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150611b2c93505060c0840191505060a08301611e84565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b600060c08284031215611b8957600080fd5b50919050565b600060c08284031215611ba157600080fd5b611bab8383611b77565b9392505050565b6001600160a01b0381168114611bc757600080fd5b50565b8035611bd581611bb2565b919050565b803563ffffffff81168114611bd557600080fd5b803560038110611bd557600080fd5b600060c08284031215611c0f57600080fd5b60405160c0810181811067ffffffffffffffff82111715611c4057634e487b7160e01b600052604160045260246000fd5b60405282358152905080611c5660208401611bca565b6020820152611c6760408401611bda565b6040820152611c7860608401611bda565b6060820152611c8960808401611bee565b6080820152611c9a60a08401611bca565b60a08201525092915050565b60008060e08385031215611cb957600080fd5b82359150611cca8460208501611bfd565b90509250929050565b600060208284031215611ce557600080fd5b5035919050565b60008060408385031215611cff57600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611bd557600080fd5b60008083601f840112611d3857600080fd5b50813567ffffffffffffffff811115611d5057600080fd5b602083019150836020828501011115611d6857600080fd5b9250929050565b60008060008060008060808789031215611d8857600080fd5b863567ffffffffffffffff80821115611da057600080fd5b818901915089601f830112611db457600080fd5b813581811115611dc357600080fd5b8a60208260051b8501011115611dd857600080fd5b60208301985080975050611dee60208a01611d0e565b9550611dfc60408a01611bca565b94506060890135915080821115611e1257600080fd5b50611e1f89828a01611d26565b979a9699509497509295939492505050565b600060c08284031215611e4357600080fd5b611bab8383611bfd565b60008060006101008486031215611e6357600080fd5b8335925060208401359150611e7b8560408601611bfd565b90509250925092565b600060208284031215611e9657600080fd5b8135611bab81611bb2565b60008060e08385031215611eb457600080fd5b82359150611cca8460208501611b77565b600060208284031215611ed757600080fd5b611bab82611bda565b634e487b7160e01b600052601160045260246000fd5b81810381811115611f0957611f09611ee0565b92915050565b634e487b7160e01b600052601260045260246000fd5b600082611f4257634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115611f0957611f09611ee0565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052602160045260246000fd5b60208082526018908201527f496e76616c696420546573746e6574204f70657261746f720000000000000000604082015260600190565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b86815260006bffffffffffffffffffffffff19808860601b16602084015263ffffffff60e01b808860e01b166034850152808760e01b166038850152506003851061209257634e487b7160e01b600052602160045260246000fd5b60f89490941b603c8301525060609190911b909116603d820152605101949350505050565b6000602082840312156120c957600080fd5b5051919050565b6000602082840312156120e257600080fd5b8151611bab81611bb2565b6000602082840312156120ff57600080fd5b611bab82611bee56fea2646970667358221220b0cef60de85bd7067edc03873ecef384ba4a15e3561f93fb6bef1ba4497788db64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101815760003560e01c80639588eca2116100d1578063bd7df3f91161008a578063d5e6a9df11610064578063d5e6a9df146104e7578063eedcf2a91461051b578063f3f480d91461052e578063f939bad91461056257600080fd5b8063bd7df3f914610473578063c299be3314610493578063d0e30db0146104b357600080fd5b80639588eca21461038e578063a53d3c26146103a4578063a557d918146103b7578063aa22a1c6146103d7578063b044397e1461040b578063b5b7a1841461043f57600080fd5b806331d144571161013e5780637ba7900c116101185780637ba7900c146103015780638a619a71146103215780638ad3a8f71461034157806390df63b71461036157600080fd5b806331d14457146102ae57806331ddf743146102c157806334c75d72146102e157600080fd5b80631062b39a1461018657806310e8f6bf146101d75780631c8ec299146102075780632415855b146102495780632639c0601461026b57806327ee6bdd14610298575b600080fd5b34801561019257600080fd5b506101ba7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101e357600080fd5b506101f76101f2366004611b8f565b610582565b60405190151581526020016101ce565b34801561021357600080fd5b5061023b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101ce565b34801561025557600080fd5b50610269610264366004611ca6565b610609565b005b34801561027757600080fd5b5061023b610286366004611cd3565b60026020526000908152604090205481565b3480156102a457600080fd5b5061023b60015481565b6102696102bc366004611cec565b610797565b3480156102cd57600080fd5b506102696102dc366004611d6f565b6109da565b3480156102ed57600080fd5b5061023b6102fc366004611e31565b610c7a565b34801561030d57600080fd5b5061026961031c366004611e4d565b610cc7565b34801561032d57600080fd5b5061026961033c366004611e84565b611062565b34801561034d57600080fd5b506004546101ba906001600160a01b031681565b34801561036d57600080fd5b5061023b61037c366004611cd3565b60036020526000908152604090205481565b34801561039a57600080fd5b5061023b60005481565b6102696103b2366004611ca6565b6110c5565b3480156103c357600080fd5b506102696103d2366004611ca6565b6112bd565b3480156103e357600080fd5b5061023b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561041757600080fd5b5061023b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561044b57600080fd5b5061023b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561047f57600080fd5b5061026961048e366004611ca6565b6115a5565b34801561049f57600080fd5b506102696104ae366004611ca6565b6117b1565b3480156104bf57600080fd5b5061023b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104f357600080fd5b506101ba7f000000000000000000000000000000000000000000000000000000000000000081565b610269610529366004611cec565b61196a565b34801561053a57600080fd5b5061023b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561056e57600080fd5b5061026961057d366004611ea1565b611a30565b60008060056105976060850160408601611ec5565b6105a79063ffffffff1642611ef6565b6105b19190611f25565b6105c16080850160608601611ec5565b63ffffffff166105d19190611f47565b9050436105fe7f000000000000000000000000000000000000000000000000000000000000000082611f47565b909111159392505050565b61061281610c7a565b600083815260026020526040902054146106475760405162461bcd60e51b815260040161063e90611f5a565b60405180910390fd5b60018160800151600281111561065f5761065f611f82565b1461069c5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b604482015260640161063e565b60008281526002602052604081205560a08101516001600160a01b031615610748576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000003410156108075760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e0000000000604482015260640161063e565b6004546001600160a01b031633146108315760405162461bcd60e51b815260040161063e90611f98565b817f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000042038161088357610883611f0f565b04146108c25760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21032b837b1b41760911b604482015260640161063e565b806108df5760405162461bcd60e51b815260040161063e90611f5a565b600082815260026020526040902054156109315760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161063e565b61098e6040518060c00160405280838152602001336001600160a01b031681526020014263ffffffff1681526020014363ffffffff1681526020016000600281111561097f5761097f611f82565b81526000602090910152610c7a565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91015b60405180910390a25050565b60408510610a1c5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161063e565b600084848484604051602001610a359493929190611fcf565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610ab5576000888883818110610a7757610a77612011565b90506020020135905082811115610a9c57826000528060205260406000209250610aac565b8060005282602052604060002092505b50600101610a5b565b508060005414610af85760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161063e565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610b6d5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161063e565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610b9d9089908990612027565b6000604051808303816000865af19150503d8060008114610bda576040519150601f19603f3d011682016040523d82523d6000602084013e610bdf565b606091505b5050905080610c305760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161063e565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b80516020808301516040808501516060860151608087015160a08801519351600097610caa979096959101612037565b604051602081830303815290604052805190602001209050919050565b7f0000000000000000000000000000000000000000000000000000000000000000600154017f00000000000000000000000000000000000000000000000000000000000000004281610d1b57610d1b611f0f565b041115610d5d5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161063e565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610dc85760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b604482015260640161063e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e26573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4a91906120b7565b600114610e8d5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161063e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610eeb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0f91906120d0565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610f825760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161063e565b60015483118015610f9257508115155b15610fd557600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610fde81610c7a565b60008481526002602052604090205414801561100f575060008160800151600281111561100d5761100d611f82565b145b1561105d5780518290036110295760016080820152611044565b60a08101516001600160a01b03161561104457600260808201525b61104d81610c7a565b6000848152600260205260409020555b505050565b6004546001600160a01b0316331461107957600080fd5b6004546001600160a01b031633146110a35760405162461bcd60e51b815260040161063e90611f98565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6110ce81610c7a565b600083815260026020526040902054146110fa5760405162461bcd60e51b815260040161063e90611f5a565b60a08101516001600160a01b0316156111555760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161063e565b7f00000000000000000000000000000000000000000000000000000000000000003410156111c55760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e00604482015260640161063e565b6004546001600160a01b031633146111ef5760405162461bcd60e51b815260040161063e90611f98565b7f0000000000000000000000000000000000000000000000000000000000000000816040015163ffffffff1601421061126a5760405162461bcd60e51b815260206004820152601960248201527f4368616c6c656e676520706572696f6420656c61707365642e00000000000000604482015260640161063e565b3360a082015261127981610c7a565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791016109ce565b7f0000000000000000000000000000000000000000000000000000000000000000600154017f0000000000000000000000000000000000000000000000000000000000000000428161131157611311611f0f565b0411156113535760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161063e565b61135c81610c7a565b600083815260026020526040902054146113885760405162461bcd60e51b815260040161063e90611f5a565b427f0000000000000000000000000000000000000000000000000000000000000000826040015163ffffffff160111156114125760405162461bcd60e51b815260206004820152602560248201527f4368616c6c656e676520706572696f6420686173206e6f742079657420656c616044820152643839b2b21760d91b606482015260840161063e565b7f000000000000000000000000000000000000000000000000000000000000000043016005826040015163ffffffff1642038161145157611451611f0f565b04826060015163ffffffff160111156114e55760405162461bcd60e51b815260206004820152604a60248201527f546f6f206d616e79206d697373696e6720626c6f636b732e20506f737369626c60448201527f652063656e736f72736869702061747461636b2e205573652063616e6f6e696360648201526930b610313934b233b29760b11b608482015260a40161063e565b60a08101516001600160a01b0316156115375760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161063e565b60015482111561157f57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b6001608082015261158f81610c7a565b6000928352600260205260409092209190915550565b7f0000000000000000000000000000000000000000000000000000000000000000600154017f000000000000000000000000000000000000000000000000000000000000000042816115f9576115f9611f0f565b04116116395760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161063e565b61164281610c7a565b6000838152600260205260409020541461166e5760405162461bcd60e51b815260040161063e90611f5a565b60008160800151600281111561168657611686611f82565b146116c55760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161063e565b60a08101516001600160a01b0316156107935760208101516001600160a01b03166117495760008281526002602052604080822082905560a083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60a081018051600090915261175d82610c7a565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600154017f0000000000000000000000000000000000000000000000000000000000000000428161180557611805611f0f565b04116118455760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161063e565b61184e81610c7a565b6000838152600260205260409020541461187a5760405162461bcd60e51b815260040161063e90611f5a565b60008160800151600281111561189257611892611f82565b146118d15760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161063e565b60208101516001600160a01b0316156107935760a08101516001600160a01b03166119565760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b602081018051600090915261175d82610c7a565b6119748282610797565b6119d2826040518060c00160405280848152602001336001600160a01b031681526020014263ffffffff1681526020014363ffffffff168152602001600060028111156119c3576119c3611f82565b815260006020909101526112bd565b610793826040518060c00160405280848152602001336001600160a01b031681526020014263ffffffff1681526020014363ffffffff16815260200160016002811115611a2157611a21611f82565b81526000602090910152610609565b611a426102fc36839003830183611e31565b60008381526002602052604090205414611a6e5760405162461bcd60e51b815260040161063e90611f5a565b6002611a8060a08301608084016120ed565b6002811115611a9157611a91611f82565b14611ad25760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b604482015260640161063e565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150611b2c93505060c0840191505060a08301611e84565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b600060c08284031215611b8957600080fd5b50919050565b600060c08284031215611ba157600080fd5b611bab8383611b77565b9392505050565b6001600160a01b0381168114611bc757600080fd5b50565b8035611bd581611bb2565b919050565b803563ffffffff81168114611bd557600080fd5b803560038110611bd557600080fd5b600060c08284031215611c0f57600080fd5b60405160c0810181811067ffffffffffffffff82111715611c4057634e487b7160e01b600052604160045260246000fd5b60405282358152905080611c5660208401611bca565b6020820152611c6760408401611bda565b6040820152611c7860608401611bda565b6060820152611c8960808401611bee565b6080820152611c9a60a08401611bca565b60a08201525092915050565b60008060e08385031215611cb957600080fd5b82359150611cca8460208501611bfd565b90509250929050565b600060208284031215611ce557600080fd5b5035919050565b60008060408385031215611cff57600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611bd557600080fd5b60008083601f840112611d3857600080fd5b50813567ffffffffffffffff811115611d5057600080fd5b602083019150836020828501011115611d6857600080fd5b9250929050565b60008060008060008060808789031215611d8857600080fd5b863567ffffffffffffffff80821115611da057600080fd5b818901915089601f830112611db457600080fd5b813581811115611dc357600080fd5b8a60208260051b8501011115611dd857600080fd5b60208301985080975050611dee60208a01611d0e565b9550611dfc60408a01611bca565b94506060890135915080821115611e1257600080fd5b50611e1f89828a01611d26565b979a9699509497509295939492505050565b600060c08284031215611e4357600080fd5b611bab8383611bfd565b60008060006101008486031215611e6357600080fd5b8335925060208401359150611e7b8560408601611bfd565b90509250925092565b600060208284031215611e9657600080fd5b8135611bab81611bb2565b60008060e08385031215611eb457600080fd5b82359150611cca8460208501611b77565b600060208284031215611ed757600080fd5b611bab82611bda565b634e487b7160e01b600052601160045260246000fd5b81810381811115611f0957611f09611ee0565b92915050565b634e487b7160e01b600052601260045260246000fd5b600082611f4257634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115611f0957611f09611ee0565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052602160045260246000fd5b60208082526018908201527f496e76616c696420546573746e6574204f70657261746f720000000000000000604082015260600190565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b86815260006bffffffffffffffffffffffff19808860601b16602084015263ffffffff60e01b808860e01b166034850152808760e01b166038850152506003851061209257634e487b7160e01b600052602160045260246000fd5b60f89490941b603c8301525060609190911b909116603d820152605101949350505050565b6000602082840312156120c957600080fd5b5051919050565b6000602082840312156120e257600080fd5b8151611bab81611bb2565b6000602082840312156120ff57600080fd5b611bab82611bee56fea2646970667358221220b0cef60de85bd7067edc03873ecef384ba4a15e3561f93fb6bef1ba4497788db64736f6c63430008120033", + "numDeployments": 11, + "solcInputHash": "c9836c6cb024801f3104e49f87086294", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosisDevnet\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"SequencerLimitUpdateReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"updateSequencerLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"SequencerLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerLimit\":\"The new maxL2StateSyncDelay.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_routerArbToGnosisDevnet\":\"The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\",\"_routerChainId\":\"The chain id of the router contract.\",\"_sequencerLimit\":\"The maximum number of sequencer messages that can be submitted in a challenge period.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerLimit(uint256)\":{\"details\":\"Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":\"VeaOutboxArbToGnosisDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/IArbitrumUpdatable.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, IArbitrumUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerLimit The new maxL2StateSyncDelay.\\n event SequencerLimitUpdateReceived(uint256 _newSequencerLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerLimit = _sequencerLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n /// @param _newSequencerLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerLimit(uint256 _newSequencerLimit) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (sequencerLimit != _newSequencerLimit) {\\n sequencerLimit = _newSequencerLimit;\\n emit SequencerLimitUpdateReceived(_newSequencerLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerLimit) {\\n // Allow claims to be made within the sequencerLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x3598855941548dfff854203745983d57b0125c0bdab5b070adb5b0e1725f5245\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToGnosis/VeaOutboxArbToGnosis.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Chiado.\\n/// Note: This contract is deployed on Chiado.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(\\n _epoch,\\n claim\\n );\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(\\n _epoch,\\n claim\\n );\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(\\n _epoch,\\n claim\\n );\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosisDevnet The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _sequencerLimit The maximum number of sequencer messages that can be submitted in a challenge period.\\n /// @param _routerChainId The chain id of the router contract.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosisDevnet,\\n uint256 _maxMissingBlocks,\\n uint256 _sequencerLimit,\\n uint256 _routerChainId\\n )\\n VeaOutboxArbToGnosis(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _amb,\\n _routerArbToGnosisDevnet,\\n _maxMissingBlocks,\\n sequencerLimit,\\n _routerChainId\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x28cbb304881b32a609d4c77485cdb9843c420c12e328e6e737472ec7a9eaa4d0\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/IArbitrumUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from the Arbitrum Bridge through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an IArbitrumUpdateable contract which receives updates from the router on Ethereum.\\ninterface IArbitrumUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Arbitrum Sequencer contract.\\n /// @param _newSequencerLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerLimit(uint256 _newSequencerLimit) external;\\n}\\n\",\"keccak256\":\"0x4d59f1de812ac1ddad033f03c7dc34b1325b5b6dd43d26b97cd4e0d2d14c371a\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101c06040523480156200001257600080fd5b506040516200271638038062002716833981016040819052620000359162000117565b6004805460c08b90526101408a90526101808890526101608990526001600160a01b03808816608052861660a0526101a0819052610120839052908490558990899089908990899089908990886200008f60028a620001b0565b60e0819052620000a18a6002620001d3565b620000ad9190620001f3565b6101005261014051600190620000c49042620001b0565b620000d09190620001f3565b6001555050600580546001600160a01b0319163317905550620002099e505050505050505050505050505050565b6001600160a01b03811681146200011457600080fd5b50565b60008060008060008060008060006101208a8c0312156200013757600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a01516200016081620000fe565b60a08b01519095506200017381620000fe565b8094505060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001ce57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001ed57620001ed6200019a565b92915050565b81810381811115620001ed57620001ed6200019a565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516123b1620003656000396000818161049b0152611d9d0152600081816104cf015281816108a00152818161153c015281816116c70152611b5c0152600081816105570152611d31015260008181610503015281816108c401528181610c550152818161142a01528181611560015281816116eb0152611b800152600081816103ee01528181610a3b01526119c00152600081816111b001526112e901526000818161115d01526112a10152600081816105ab015281816106a1015281816108270152818161085401528181610c980152818161133901528181611831015281816118980152611cc70152600081816105df01528181610b280152611aad0152600081816102240152818161093f015281816109b901528181610a9d015281816118dc0152818161193e0152611a2201526123b16000f3fe6080604052600436106101d85760003560e01c80638d96fdea11610102578063b633b94411610095578063d5e6a9df11610064578063d5e6a9df146105cd578063da2b7bc414610601578063df19e6ff14610621578063eedcf2a91461064e57600080fd5b8063b633b94414610525578063c2114a1614610545578063c299acc414610579578063d0e30db01461059957600080fd5b80639c13b6b5116100d15780639c13b6b514610473578063aa22a1c614610489578063b044397e146104bd578063b5b7a184146104f157600080fd5b80638d96fdea146103dc57806390df63b714610410578063930f28af1461043d5780639588eca21461045d57600080fd5b806331ddf7431161017a5780634a439cfe116101495780634a439cfe1461035c578063541adcca1461037c5780638a619a711461039c5780638ad3a8f7146103bc57600080fd5b806331ddf743146102dc5780633ce43cfd146102fc5780634788cb381461031c57806349b4299e1461033c57600080fd5b8063222ae786116101b6578063222ae786146102635780632639c0601461028657806327ee6bdd146102b357806331d14457146102c957600080fd5b806301139b68146101dd5780630f0adca5146101f25780631062b39a14610212575b600080fd5b6101f06101eb366004611f57565b610661565b005b3480156101fe57600080fd5b506101f061020d366004611f85565b61089e565b34801561021e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561026f57600080fd5b50610278610c4e565b60405190815260200161025a565b34801561029257600080fd5b506102786102a1366004611fbc565b60026020526000908152604090205481565b3480156102bf57600080fd5b5061027860015481565b6101f06102d7366004611fd5565b610c7f565b3480156102e857600080fd5b506101f06102f7366004612058565b610e06565b34801561030857600080fd5b506101f061031736600461211a565b6110a6565b34801561032857600080fd5b506101f0610337366004611f57565b6111ed565b34801561034857600080fd5b506101f0610357366004611f57565b611371565b34801561036857600080fd5b50610278610377366004611fbc565b611423565b34801561038857600080fd5b50610278610397366004612153565b611455565b3480156103a857600080fd5b506101f06103b7366004612176565b6114a7565b3480156103c857600080fd5b50600554610246906001600160a01b031681565b3480156103e857600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561041c57600080fd5b5061027861042b366004611fbc565b60036020526000908152604090205481565b34801561044957600080fd5b506101f0610458366004611f57565b61153a565b34801561046957600080fd5b5061027860005481565b34801561047f57600080fd5b5061027860045481565b34801561049557600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c957600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156104fd57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561053157600080fd5b506101f0610540366004611f57565b6116c5565b34801561055157600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561058557600080fd5b506101f0610594366004611fbc565b6118d1565b3480156105a557600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d957600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561060d57600080fd5b506101f061061c366004611f57565b611b5a565b34801561062d57600080fd5b5061064161063c366004612153565b611d13565b60405161025a91906121a9565b6101f061065c366004611fd5565b611dda565b61066a81611455565b6000838152600260205260409020541461069f5760405162461bcd60e51b8152600401610696906121c3565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561070f5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610696565b60c08101516001600160a01b03161561076a5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610696565b60008160a00151600281111561078257610782612193565b146107cf5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610696565b3360c08201526107de81611455565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f000000000000000000000000000000000000000000000000000000000000000034111561089a5760006108797f0000000000000000000000000000000000000000000000000000000000000000346121eb565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816108f1576108f161220c565b040311156109345760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109b75760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190612222565b7f000000000000000000000000000000000000000000000000000000000000000014610a9b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1d919061223b565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b905760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b60015483118015610ba057508115155b15610be357600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610bec81611455565b60008481526002602052604090205403610c49578051829003610c1557600160a0820152610c30565b60c08101516001600160a01b031615610c3057600260a08201525b610c3981611455565b6000848152600260205260409020555b505050565b6000610c7a7f000000000000000000000000000000000000000000000000000000000000000042612258565b905090565b6005546001600160a01b03163314610c9657600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610d065760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610696565b80610d235760405162461bcd60e51b8152600401610696906121c3565b60008281526002602052604090205415610d755760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610696565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbb90611455565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050565b60408510610e485760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610696565b600084848484604051602001610e61949392919061227a565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610ee1576000888883818110610ea357610ea36122bc565b90506020020135905082811115610ec857826000528060205260406000209250610ed8565b8060005282602052604060002092505b50600101610e87565b508060005414610f245760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610696565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f995760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610696565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc990899089906122d2565b6000604051808303816000865af19150503d8060008114611006576040519150601f19603f3d011682016040523d82523d6000602084013e61100b565b606091505b505090508061105c5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610696565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b861039736839003830183612153565b600083815260026020526040902054146110e45760405162461bcd60e51b8152600401610696906121c3565b60026110f660c0830160a084016122e2565b600281111561110757611107612193565b146111485760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610696565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506111a293505060e0840191505060c08301612176565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f681611455565b600083815260026020526040902054146112225760405162461bcd60e51b8152600401610696906121c3565b60018160a00151600281111561123a5761123a612193565b146112775760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610696565b60008281526002602052604081205560c08101516001600160a01b031615611323576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6005546001600160a01b0316331461138857600080fd5b61139181611455565b600083815260026020526040902054146113bd5760405162461bcd60e51b8152600401610696906121c3565b63ffffffff4281166060830152431660808201526113da81611455565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a15050565b600061144f7f000000000000000000000000000000000000000000000000000000000000000083612258565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861148a9890979691016122fd565b604051602081830303815290604052805190602001209050919050565b6005546001600160a01b031633146114be57600080fd5b6005546001600160a01b031633146115185760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610696565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161158d5761158d61220c565b040311156115d05760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b6115d981611455565b600083815260026020526040902054146116055760405162461bcd60e51b8152600401610696906121c3565b60c08101516001600160a01b0316156116575760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610696565b60015482111561169f57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a08201526116af81611455565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816117185761171861220c565b0403116117595760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b61176281611455565b6000838152600260205260409020541461178e5760405162461bcd60e51b8152600401610696906121c3565b60008160a0015160028111156117a6576117a6612193565b146117e55760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60c08101516001600160a01b03161561089a5760208101516001600160a01b03166118695760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c081018051600090915261187d82611455565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461193c5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561199a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119be9190612222565b7f000000000000000000000000000000000000000000000000000000000000000014611a205760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aa2919061223b565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614611b155760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b8060045414611b575760048190556040518181527fe5c620413c3d944fbd314ecc2375b9bdcc721589711a4348d9ecaf966160fa389060200160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bad57611bad61220c565b040311611bee5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611bf781611455565b60008381526002602052604090205414611c235760405162461bcd60e51b8152600401610696906121c3565b60008160a001516002811115611c3b57611c3b612193565b14611c7a5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60208101516001600160a01b03161561089a5760c08101516001600160a01b0316611cff5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b602081018051600090915261187d82611455565b6000816060015163ffffffff16600003611d2f57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611d6b57506003919050565b60006005836060015163ffffffff16420381611d8957611d8961220c565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611dcd5760019250611dd2565b600092505b50505b919050565b611de48282610c7f565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611e2b8382611371565b63ffffffff428116606083015243166080820152611e49838261153a565b600160a0820152610c4983826111ed565b6001600160a01b0381168114611b5757600080fd5b8035611dd581611e5a565b803563ffffffff81168114611dd557600080fd5b803560038110611dd557600080fd5b600060e08284031215611eaf57600080fd5b60405160e0810181811067ffffffffffffffff82111715611ee057634e487b7160e01b600052604160045260246000fd5b60405282358152905080611ef660208401611e6f565b6020820152611f0760408401611e7a565b6040820152611f1860608401611e7a565b6060820152611f2960808401611e7a565b6080820152611f3a60a08401611e8e565b60a0820152611f4b60c08401611e6f565b60c08201525092915050565b6000806101008385031215611f6b57600080fd5b82359150611f7c8460208501611e9d565b90509250929050565b60008060006101208486031215611f9b57600080fd5b8335925060208401359150611fb38560408601611e9d565b90509250925092565b600060208284031215611fce57600080fd5b5035919050565b60008060408385031215611fe857600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611dd557600080fd5b60008083601f84011261202157600080fd5b50813567ffffffffffffffff81111561203957600080fd5b60208301915083602082850101111561205157600080fd5b9250929050565b6000806000806000806080878903121561207157600080fd5b863567ffffffffffffffff8082111561208957600080fd5b818901915089601f83011261209d57600080fd5b8135818111156120ac57600080fd5b8a60208260051b85010111156120c157600080fd5b602083019850809750506120d760208a01611ff7565b95506120e560408a01611e6f565b945060608901359150808211156120fb57600080fd5b5061210889828a0161200f565b979a9699509497509295939492505050565b60008082840361010081121561212f57600080fd5b8335925060e0601f198201121561214557600080fd5b506020830190509250929050565b600060e0828403121561216557600080fd5b61216f8383611e9d565b9392505050565b60006020828403121561218857600080fd5b813561216f81611e5a565b634e487b7160e01b600052602160045260246000fd5b60208101600483106121bd576121bd612193565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b8181038181111561144f57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60006020828403121561223457600080fd5b5051919050565b60006020828403121561224d57600080fd5b815161216f81611e5a565b60008261227557634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156122f457600080fd5b61216f82611e8e565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061235557612355612193565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212205d5e24960772c5c18cf100203c59608aa6d0ec9dc0ae35a14fdaa806ed13c60364736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101d85760003560e01c80638d96fdea11610102578063b633b94411610095578063d5e6a9df11610064578063d5e6a9df146105cd578063da2b7bc414610601578063df19e6ff14610621578063eedcf2a91461064e57600080fd5b8063b633b94414610525578063c2114a1614610545578063c299acc414610579578063d0e30db01461059957600080fd5b80639c13b6b5116100d15780639c13b6b514610473578063aa22a1c614610489578063b044397e146104bd578063b5b7a184146104f157600080fd5b80638d96fdea146103dc57806390df63b714610410578063930f28af1461043d5780639588eca21461045d57600080fd5b806331ddf7431161017a5780634a439cfe116101495780634a439cfe1461035c578063541adcca1461037c5780638a619a711461039c5780638ad3a8f7146103bc57600080fd5b806331ddf743146102dc5780633ce43cfd146102fc5780634788cb381461031c57806349b4299e1461033c57600080fd5b8063222ae786116101b6578063222ae786146102635780632639c0601461028657806327ee6bdd146102b357806331d14457146102c957600080fd5b806301139b68146101dd5780630f0adca5146101f25780631062b39a14610212575b600080fd5b6101f06101eb366004611f57565b610661565b005b3480156101fe57600080fd5b506101f061020d366004611f85565b61089e565b34801561021e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561026f57600080fd5b50610278610c4e565b60405190815260200161025a565b34801561029257600080fd5b506102786102a1366004611fbc565b60026020526000908152604090205481565b3480156102bf57600080fd5b5061027860015481565b6101f06102d7366004611fd5565b610c7f565b3480156102e857600080fd5b506101f06102f7366004612058565b610e06565b34801561030857600080fd5b506101f061031736600461211a565b6110a6565b34801561032857600080fd5b506101f0610337366004611f57565b6111ed565b34801561034857600080fd5b506101f0610357366004611f57565b611371565b34801561036857600080fd5b50610278610377366004611fbc565b611423565b34801561038857600080fd5b50610278610397366004612153565b611455565b3480156103a857600080fd5b506101f06103b7366004612176565b6114a7565b3480156103c857600080fd5b50600554610246906001600160a01b031681565b3480156103e857600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561041c57600080fd5b5061027861042b366004611fbc565b60036020526000908152604090205481565b34801561044957600080fd5b506101f0610458366004611f57565b61153a565b34801561046957600080fd5b5061027860005481565b34801561047f57600080fd5b5061027860045481565b34801561049557600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c957600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156104fd57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561053157600080fd5b506101f0610540366004611f57565b6116c5565b34801561055157600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561058557600080fd5b506101f0610594366004611fbc565b6118d1565b3480156105a557600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d957600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561060d57600080fd5b506101f061061c366004611f57565b611b5a565b34801561062d57600080fd5b5061064161063c366004612153565b611d13565b60405161025a91906121a9565b6101f061065c366004611fd5565b611dda565b61066a81611455565b6000838152600260205260409020541461069f5760405162461bcd60e51b8152600401610696906121c3565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561070f5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610696565b60c08101516001600160a01b03161561076a5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610696565b60008160a00151600281111561078257610782612193565b146107cf5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610696565b3360c08201526107de81611455565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f000000000000000000000000000000000000000000000000000000000000000034111561089a5760006108797f0000000000000000000000000000000000000000000000000000000000000000346121eb565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816108f1576108f161220c565b040311156109345760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109b75760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190612222565b7f000000000000000000000000000000000000000000000000000000000000000014610a9b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1d919061223b565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b905760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b60015483118015610ba057508115155b15610be357600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610bec81611455565b60008481526002602052604090205403610c49578051829003610c1557600160a0820152610c30565b60c08101516001600160a01b031615610c3057600260a08201525b610c3981611455565b6000848152600260205260409020555b505050565b6000610c7a7f000000000000000000000000000000000000000000000000000000000000000042612258565b905090565b6005546001600160a01b03163314610c9657600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610d065760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610696565b80610d235760405162461bcd60e51b8152600401610696906121c3565b60008281526002602052604090205415610d755760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610696565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbb90611455565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050565b60408510610e485760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610696565b600084848484604051602001610e61949392919061227a565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610ee1576000888883818110610ea357610ea36122bc565b90506020020135905082811115610ec857826000528060205260406000209250610ed8565b8060005282602052604060002092505b50600101610e87565b508060005414610f245760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610696565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f995760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610696565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc990899089906122d2565b6000604051808303816000865af19150503d8060008114611006576040519150601f19603f3d011682016040523d82523d6000602084013e61100b565b606091505b505090508061105c5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610696565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b861039736839003830183612153565b600083815260026020526040902054146110e45760405162461bcd60e51b8152600401610696906121c3565b60026110f660c0830160a084016122e2565b600281111561110757611107612193565b146111485760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610696565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506111a293505060e0840191505060c08301612176565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f681611455565b600083815260026020526040902054146112225760405162461bcd60e51b8152600401610696906121c3565b60018160a00151600281111561123a5761123a612193565b146112775760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610696565b60008281526002602052604081205560c08101516001600160a01b031615611323576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6005546001600160a01b0316331461138857600080fd5b61139181611455565b600083815260026020526040902054146113bd5760405162461bcd60e51b8152600401610696906121c3565b63ffffffff4281166060830152431660808201526113da81611455565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a15050565b600061144f7f000000000000000000000000000000000000000000000000000000000000000083612258565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861148a9890979691016122fd565b604051602081830303815290604052805190602001209050919050565b6005546001600160a01b031633146114be57600080fd5b6005546001600160a01b031633146115185760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610696565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161158d5761158d61220c565b040311156115d05760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b6115d981611455565b600083815260026020526040902054146116055760405162461bcd60e51b8152600401610696906121c3565b60c08101516001600160a01b0316156116575760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610696565b60015482111561169f57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a08201526116af81611455565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816117185761171861220c565b0403116117595760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b61176281611455565b6000838152600260205260409020541461178e5760405162461bcd60e51b8152600401610696906121c3565b60008160a0015160028111156117a6576117a6612193565b146117e55760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60c08101516001600160a01b03161561089a5760208101516001600160a01b03166118695760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c081018051600090915261187d82611455565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461193c5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561199a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119be9190612222565b7f000000000000000000000000000000000000000000000000000000000000000014611a205760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aa2919061223b565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614611b155760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b8060045414611b575760048190556040518181527fe5c620413c3d944fbd314ecc2375b9bdcc721589711a4348d9ecaf966160fa389060200160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bad57611bad61220c565b040311611bee5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611bf781611455565b60008381526002602052604090205414611c235760405162461bcd60e51b8152600401610696906121c3565b60008160a001516002811115611c3b57611c3b612193565b14611c7a5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60208101516001600160a01b03161561089a5760c08101516001600160a01b0316611cff5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b602081018051600090915261187d82611455565b6000816060015163ffffffff16600003611d2f57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611d6b57506003919050565b60006005836060015163ffffffff16420381611d8957611d8961220c565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611dcd5760019250611dd2565b600092505b50505b919050565b611de48282610c7f565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611e2b8382611371565b63ffffffff428116606083015243166080820152611e49838261153a565b600160a0820152610c4983826111ed565b6001600160a01b0381168114611b5757600080fd5b8035611dd581611e5a565b803563ffffffff81168114611dd557600080fd5b803560038110611dd557600080fd5b600060e08284031215611eaf57600080fd5b60405160e0810181811067ffffffffffffffff82111715611ee057634e487b7160e01b600052604160045260246000fd5b60405282358152905080611ef660208401611e6f565b6020820152611f0760408401611e7a565b6040820152611f1860608401611e7a565b6060820152611f2960808401611e7a565b6080820152611f3a60a08401611e8e565b60a0820152611f4b60c08401611e6f565b60c08201525092915050565b6000806101008385031215611f6b57600080fd5b82359150611f7c8460208501611e9d565b90509250929050565b60008060006101208486031215611f9b57600080fd5b8335925060208401359150611fb38560408601611e9d565b90509250925092565b600060208284031215611fce57600080fd5b5035919050565b60008060408385031215611fe857600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611dd557600080fd5b60008083601f84011261202157600080fd5b50813567ffffffffffffffff81111561203957600080fd5b60208301915083602082850101111561205157600080fd5b9250929050565b6000806000806000806080878903121561207157600080fd5b863567ffffffffffffffff8082111561208957600080fd5b818901915089601f83011261209d57600080fd5b8135818111156120ac57600080fd5b8a60208260051b85010111156120c157600080fd5b602083019850809750506120d760208a01611ff7565b95506120e560408a01611e6f565b945060608901359150808211156120fb57600080fd5b5061210889828a0161200f565b979a9699509497509295939492505050565b60008082840361010081121561212f57600080fd5b8335925060e0601f198201121561214557600080fd5b506020830190509250929050565b600060e0828403121561216557600080fd5b61216f8383611e9d565b9392505050565b60006020828403121561218857600080fd5b813561216f81611e5a565b634e487b7160e01b600052602160045260246000fd5b60208101600483106121bd576121bd612193565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b8181038181111561144f57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60006020828403121561223457600080fd5b5051919050565b60006020828403121561224d57600080fd5b815161216f81611e5a565b60008261227557634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156122f457600080fd5b61216f82611e8e565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061235557612355612193565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212205d5e24960772c5c18cf100203c59608aa6d0ec9dc0ae35a14fdaa806ed13c60364736f6c63430008120033", "devdoc": { + "details": "Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).", "events": { "Challenged(uint256,address)": { "details": "This event indicates that `sendSnapshot(epoch)` should be called in the inbox.", @@ -868,7 +1059,7 @@ } }, "Claimed(address,bytes32)": { - "details": "Watcher check this event to challenge fraud.", + "details": "Watchers check this event to challenge fraud.", "params": { "_claimer": "The address of the claimer.", "_stateRoot": "The state root of the claim." @@ -880,6 +1071,18 @@ "_msgId": "The msgId of the message that was relayed." } }, + "SequencerLimitUpdateReceived(uint256)": { + "details": "This event indicates the sequencer limit updated.", + "params": { + "_newSequencerLimit": "The new maxL2StateSyncDelay." + } + }, + "VerificationStarted(uint256)": { + "details": "This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.", + "params": { + "_epoch": "The epoch that started verification." + } + }, "Verified(uint256)": { "details": "This events indicates that verification has succeeded. The messages are ready to be relayed.", "params": { @@ -889,7 +1092,16 @@ }, "kind": "dev", "methods": { - "challenge(uint256,(bytes32,address,uint32,uint32,uint8,address))": { + "censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Gets the status of the censorship test for claim.", + "params": { + "_claim": "The claim to test." + }, + "returns": { + "status": "True if the claim passed the censorship test." + } + }, + "challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.", "params": { "_claim": "The claim associated with the epoch.", @@ -914,11 +1126,12 @@ "params": { "_amb": "The address of the AMB contract on Gnosis.", "_challengePeriod": "The duration of the period allowing to challenge a claim.", - "_claimDelay": "The number of epochs a claim can be submitted for.", "_deposit": "The deposit amount to submit a claim in wei.", "_epochPeriod": "The duration of each epoch.", "_maxMissingBlocks": "The maximum number of blocks that can be missing in a challenge period.", "_routerArbToGnosisDevnet": "The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.", + "_routerChainId": "The chain id of the router contract.", + "_sequencerLimit": "The maximum number of sequencer messages that can be submitted in a challenge period.", "_timeoutEpochs": "The epochs before the bridge is considered shutdown." } }, @@ -929,25 +1142,28 @@ "_stateroot": "The state root to claim." } }, - "hashClaim((bytes32,address,uint32,uint32,uint8,address))": { - "details": "Hashes the claim.", - "params": { - "_claim": "The claim to hash." - }, + "epochAt(uint256)": { + "details": "Get the current epoch from the outbox's point of view using the Ethereum L1 clock.", "returns": { - "hashedClaim": "The hash of the claim." + "epoch": "The hash of the claim." } }, - "passedTest((bytes32,address,uint32,uint32,uint8,address))": { - "details": "Claim passed censorship test", + "epochNow()": { + "details": "Get the current epoch from the outbox's point of view using the Ethereum L1 clock.", + "returns": { + "epoch": "The hash of the claim." + } + }, + "hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Hashes the claim.", "params": { - "_claim": "The claim to test." + "_claim": "The claim to hash." }, "returns": { - "testPassed": "True if the claim passed the censorship test." + "hashedClaim": "The hash of the claim." } }, - "resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint8,address))": { + "resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Resolves any challenge of the optimistic claim for '_epoch'.", "params": { "_claim": "The claim associated with the epoch.", @@ -958,41 +1174,54 @@ "sendMessage(bytes32[],uint64,address,bytes)": { "details": "Verifies and relays the message. UNTRUSTED.", "params": { - "_message": "The message encoded with header from VeaInbox.", + "_message": "The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)", "_msgId": "The zero based index of the message in the inbox.", - "_proof": "The merkle proof to prove the message.", + "_proof": "The merkle proof to prove the message inclusion in the inbox state root.", "_to": "The address of the contract on Gnosis to call." } }, - "validateSnapshot(uint256,(bytes32,address,uint32,uint32,uint8,address))": { + "startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Start verification for claim for 'epoch'.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch of the claim to challenge." + } + }, + "updateSequencerLimit(uint256)": { + "details": "Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge", + "params": { + "_newSequencerLimit": "The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract." + } + }, + "verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Resolves the optimistic claim for '_epoch'.", "params": { "_claim": "The claim associated with the epoch.", "_epoch": "The epoch of the optimistic claim." } }, - "withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint8,address))": { + "withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.", "params": { "_claim": "The claim associated with the epoch.", "_epoch": "The epoch associated with the challenge deposit to withraw." } }, - "withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint8,address))": { + "withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.", "params": { "_claim": "The claim associated with the epoch.", "_epoch": "The epoch associated with the claim deposit to withraw." } }, - "withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint8,address))": { + "withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.", "params": { "_claim": "The claim associated with the epoch.", "_epoch": "The epoch associated with the claim deposit to withraw." } }, - "withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint8,address))": { + "withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.", "params": { "_claim": "The claim associated with the epoch.", @@ -1005,17 +1234,16 @@ "userdoc": { "kind": "user", "methods": { - "resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint8,address))": { + "resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "notice": "Note: Access restricted to AMB." } }, - "notice": "Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).", "version": 1 }, "storageLayout": { "storage": [ { - "astId": 1151, + "astId": 2556, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "stateRoot", "offset": 0, @@ -1023,7 +1251,7 @@ "type": "t_bytes32" }, { - "astId": 1153, + "astId": 2558, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "latestVerifiedEpoch", "offset": 0, @@ -1031,7 +1259,7 @@ "type": "t_uint256" }, { - "astId": 1157, + "astId": 2562, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "claimHashes", "offset": 0, @@ -1039,7 +1267,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 1161, + "astId": 2566, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "relayed", "offset": 0, @@ -1047,11 +1275,19 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2762, + "astId": 2568, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", - "label": "devnetOperator", + "label": "sequencerLimit", "offset": 0, "slot": "4", + "type": "t_uint256" + }, + { + "astId": 4440, + "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", + "label": "devnetOperator", + "offset": 0, + "slot": "5", "type": "t_address" } ], diff --git a/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json b/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json new file mode 100644 index 00000000..1c8bd118 --- /dev/null +++ b/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json @@ -0,0 +1,1249 @@ +{ + "address": "0x53194Fa828ebEfa5cB515d23CC2467d88f6B0Be2", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_deposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_epochPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minChallengePeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_timeoutEpochs", + "type": "uint256" + }, + { + "internalType": "contract IAMB", + "name": "_amb", + "type": "address" + }, + { + "internalType": "address", + "name": "_routerArbToGnosis", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_sequencerLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxMissingBlocks", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_routerChainId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_challenger", + "type": "address" + } + ], + "name": "Challenged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_claimer", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_stateRoot", + "type": "bytes32" + } + ], + "name": "Claimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "_msgId", + "type": "uint64" + } + ], + "name": "MessageRelayed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newSequencerLimit", + "type": "uint256" + } + ], + "name": "SequencerLimitUpdateReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "VerificationStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "Verified", + "type": "event" + }, + { + "inputs": [], + "name": "amb", + "outputs": [ + { + "internalType": "contract IAMB", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "censorshipTestStatus", + "outputs": [ + { + "internalType": "enum VeaOutboxArbToGnosis.CensorshipTestStatus", + "name": "status", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "challenge", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_stateRoot", + "type": "bytes32" + } + ], + "name": "claim", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "claimHashes", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "epochAt", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochNow", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "hashClaim", + "outputs": [ + { + "internalType": "bytes32", + "name": "hashedClaim", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "latestVerifiedEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxMissingBlocks", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minChallengePeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "relayed", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_stateRoot", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "resolveDisputedClaim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "routerArbToGnosis", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "routerChainId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "_proof", + "type": "bytes32[]" + }, + { + "internalType": "uint64", + "name": "_msgId", + "type": "uint64" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_message", + "type": "bytes" + } + ], + "name": "sendMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "startVerification", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stateRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timeoutEpochs", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newSequencerLimit", + "type": "uint256" + } + ], + "name": "updateSequencerLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "verifySnapshot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "withdrawChallengeDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "withdrawChallengerEscapeHatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "withdrawClaimDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "withdrawClaimerEscapeHatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xf6612fe40e11c51584f45204d69f623f17485bcf1b93fe57fbd9ccf815918bb1", + "receipt": { + "to": null, + "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", + "contractAddress": "0x53194Fa828ebEfa5cB515d23CC2467d88f6B0Be2", + "transactionIndex": 2, + "gasUsed": "2127697", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x15cf7be6705c1c31af30804e20c6eb833b90723cb1234786183a7bb6fdfc73ab", + "transactionHash": "0xf6612fe40e11c51584f45204d69f623f17485bcf1b93fe57fbd9ccf815918bb1", + "logs": [], + "blockNumber": 4472675, + "cumulativeGasUsed": "2184685", + "status": 1, + "byzantium": true + }, + "args": [ + "1000000000000000000", + 3600, + 10800, + 1000000, + "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", + "0xfF2B7048d673767754B798df1702C786E2c59F1F", + 86400, + 1000000, + 5 + ], + "numDeployments": 2, + "solcInputHash": "c9836c6cb024801f3104e49f87086294", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"SequencerLimitUpdateReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"updateSequencerLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"SequencerLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerLimit\":\"The new maxL2StateSyncDelay.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Ethereum.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerLimit(uint256)\":{\"details\":\"Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":\"VeaOutboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/IArbitrumUpdatable.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, IArbitrumUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerLimit The new maxL2StateSyncDelay.\\n event SequencerLimitUpdateReceived(uint256 _newSequencerLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerLimit = _sequencerLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n /// @param _newSequencerLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerLimit(uint256 _newSequencerLimit) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (sequencerLimit != _newSequencerLimit) {\\n sequencerLimit = _newSequencerLimit;\\n emit SequencerLimitUpdateReceived(_newSequencerLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerLimit) {\\n // Allow claims to be made within the sequencerLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x3598855941548dfff854203745983d57b0125c0bdab5b070adb5b0e1725f5245\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/IArbitrumUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from the Arbitrum Bridge through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an IArbitrumUpdateable contract which receives updates from the router on Ethereum.\\ninterface IArbitrumUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Arbitrum Sequencer contract.\\n /// @param _newSequencerLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerLimit(uint256 _newSequencerLimit) external;\\n}\\n\",\"keccak256\":\"0x4d59f1de812ac1ddad033f03c7dc34b1325b5b6dd43d26b97cd4e0d2d14c371a\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101c06040523480156200001257600080fd5b5060405162002802380380620028028339810160408190526200003591620000ea565b60c08990526101408890526101808690526101608790526001600160a01b03808616608052841660a0526101a082905261012081905260048390556200007d60028a62000183565b60e08190526200008f8a6002620001a6565b6200009b9190620001c6565b6101005261014051600190620000b2904262000183565b620000be9190620001c6565b60015550620001dc975050505050505050565b6001600160a01b0381168114620000e757600080fd5b50565b60008060008060008060008060006101208a8c0312156200010a57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a01516200013381620000d1565b60a08b01519095506200014681620000d1565b8094505060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001a157634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001c057620001c06200016d565b92915050565b81810381811115620001c057620001c06200016d565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516124bc620003466000396000818161043a0152611f0d01526000818161046e0152818161082d01528181611643015281816118370152611ccc0152600081816104f60152611ea10152600081816104a20152818161085101528181610be201528181610c7e01528181610d060152818161140a015281816115c4015281816116670152818161185b0152611cf001526000818161038d015281816109c80152611b30015260006112210152600081816111ce015261133301526000818161054a0152818161062d015281816107b4015281816107e101528181610c0e01528181611396015281816119a101528181611a080152611e3701526000818161057e01528181610ab50152611c1d015260008181610203015281816108cc0152818161094601528181610a2a01528181611a4c01528181611aae0152611b9201526124bc6000f3fe6080604052600436106101b75760003560e01c806390df63b7116100ec578063b633b9441161008a578063d0e30db011610064578063d0e30db014610538578063d5e6a9df1461056c578063da2b7bc4146105a0578063df19e6ff146105c057600080fd5b8063b633b944146104c4578063c2114a16146104e4578063c299acc41461051857600080fd5b80639c13b6b5116100c65780639c13b6b514610412578063aa22a1c614610428578063b044397e1461045c578063b5b7a1841461049057600080fd5b806390df63b7146103af578063930f28af146103dc5780639588eca2146103fc57600080fd5b806331ddf7431161015957806349b4299e1161013357806349b4299e1461031b5780634a439cfe1461033b578063541adcca1461035b5780638d96fdea1461037b57600080fd5b806331ddf743146102bb5780633ce43cfd146102db5780634788cb38146102fb57600080fd5b8063222ae78611610195578063222ae786146102425780632639c0601461026557806327ee6bdd1461029257806331d14457146102a857600080fd5b806301139b68146101bc5780630f0adca5146101d15780631062b39a146101f1575b600080fd5b6101cf6101ca366004612047565b6105ed565b005b3480156101dd57600080fd5b506101cf6101ec366004612075565b61082b565b3480156101fd57600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024e57600080fd5b50610257610bdb565b604051908152602001610239565b34801561027157600080fd5b506102576102803660046120ac565b60026020526000908152604090205481565b34801561029e57600080fd5b5061025760015481565b6101cf6102b63660046120c5565b610c0c565b3480156102c757600080fd5b506101cf6102d6366004612148565b610e77565b3480156102e757600080fd5b506101cf6102f636600461220a565b611117565b34801561030757600080fd5b506101cf61031636600461220a565b61125e565b34801561032757600080fd5b506101cf610336366004612047565b6113d3565b34801561034757600080fd5b506102576103563660046120ac565b6115bd565b34801561036757600080fd5b50610257610376366004612243565b6115ef565b34801561038757600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156103bb57600080fd5b506102576103ca3660046120ac565b60036020526000908152604090205481565b3480156103e857600080fd5b506101cf6103f7366004612047565b611641565b34801561040857600080fd5b5061025760005481565b34801561041e57600080fd5b5061025760045481565b34801561043457600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561046857600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561049c57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d057600080fd5b506101cf6104df366004612047565b611835565b3480156104f057600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561052457600080fd5b506101cf6105333660046120ac565b611a41565b34801561054457600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561057857600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ac57600080fd5b506101cf6105bb366004612047565b611cca565b3480156105cc57600080fd5b506105e06105db366004612243565b611e83565b604051610239919061227c565b6105f6816115ef565b6000838152600260205260409020541461062b5760405162461bcd60e51b815260040161062290612296565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561069b5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610622565b60c08101516001600160a01b0316156106f65760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610622565b60008160a00151600281111561070e5761070e612266565b1461075b5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610622565b3360c082015261076a816115ef565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108275760006108067f0000000000000000000000000000000000000000000000000000000000000000346122d4565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161087e5761087e6122e7565b040311156108c15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109445760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c691906122fd565b7f000000000000000000000000000000000000000000000000000000000000000014610a285760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aaa9190612316565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b1d5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b60015483118015610b2d57508115155b15610b7057600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b79816115ef565b60008481526002602052604090205403610bd6578051829003610ba257600160a0820152610bbd565b60c08101516001600160a01b031615610bbd57600260a08201525b610bc6816115ef565b6000848152600260205260409020555b505050565b6000610c077f000000000000000000000000000000000000000000000000000000000000000042612333565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c7c5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000004281610cab57610cab6122e7565b048210610cfa5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610622565b600454421115610d7e577f0000000000000000000000000000000000000000000000000000000000000000600454420381610d3757610d376122e7565b04826001011015610d7e5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610622565b80610d9b5760405162461bcd60e51b815260040161062290612296565b60008281526002602052604090205415610ded5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610622565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610e33906115ef565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107aa565b60408510610eb95760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610622565b600084848484604051602001610ed29493929190612355565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610f52576000888883818110610f1457610f14612397565b90506020020135905082811115610f3957826000528060205260406000209250610f49565b8060005282602052604060002092505b50600101610ef8565b508060005414610f955760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610622565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561100a5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610622565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061103a90899089906123ad565b6000604051808303816000865af19150503d8060008114611077576040519150601f19603f3d011682016040523d82523d6000602084013e61107c565b606091505b50509050806110cd5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610622565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61112961037636839003830183612243565b600083815260026020526040902054146111555760405162461bcd60e51b815260040161062290612296565b600261116760c0830160a084016123bd565b600281111561117857611178612266565b146111b95760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610622565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061121393505060e0840191505060c083016123d8565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61127061037636839003830183612243565b6000838152600260205260409020541461129c5760405162461bcd60e51b815260040161062290612296565b60016112ae60c0830160a084016123bd565b60028111156112bf576112bf612266565b146112fc5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610622565b600082815260026020526040812081905561131d60e0830160c084016123d8565b6001600160a01b031614611378576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061121393505060408401915050602083016123d8565b61138860408201602083016123d8565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6113dc816115ef565b600083815260026020526040902054146114085760405162461bcd60e51b815260040161062290612296565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff1661144191906123f5565b61144b91906123f5565b4210156114af5760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610622565b60006114ba82611e83565b905060028160038111156114d0576114d0612266565b14806114ed575060008160038111156114eb576114eb612266565b145b6115565760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610622565b63ffffffff428116606084015243166080830152611573826115ef565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115e97f000000000000000000000000000000000000000000000000000000000000000083612333565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611624989097969101612408565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611694576116946122e7565b040311156116d75760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b6116e0816115ef565b6000838152600260205260409020541461170c5760405162461bcd60e51b815260040161062290612296565b60c08101516001600160a01b03161561175e5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610622565b600161176982611e83565b600381111561177a5761177a612266565b146117c75760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610622565b60015482111561180f57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261181f816115ef565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611888576118886122e7565b0403116118c95760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b6118d2816115ef565b600083815260026020526040902054146118fe5760405162461bcd60e51b815260040161062290612296565b60008160a00151600281111561191657611916612266565b146119555760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60c08101516001600160a01b0316156108275760208101516001600160a01b03166119d95760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c08101805160009091526119ed826115ef565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611aac5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b2e91906122fd565b7f000000000000000000000000000000000000000000000000000000000000000014611b905760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015611bee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c129190612316565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614611c855760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b8060045414611cc75760048190556040518181527fe5c620413c3d944fbd314ecc2375b9bdcc721589711a4348d9ecaf966160fa389060200160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d1d57611d1d6122e7565b040311611d5e5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611d67816115ef565b60008381526002602052604090205414611d935760405162461bcd60e51b815260040161062290612296565b60008160a001516002811115611dab57611dab612266565b14611dea5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60208101516001600160a01b0316156108275760c08101516001600160a01b0316611e6f5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60208101805160009091526119ed826115ef565b6000816060015163ffffffff16600003611e9f57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611edb57506003919050565b60006005836060015163ffffffff16420381611ef957611ef96122e7565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611f3d5760019250611f42565b600092505b50505b919050565b6001600160a01b0381168114611cc757600080fd5b8035611f4581611f4a565b803563ffffffff81168114611f4557600080fd5b803560038110611f4557600080fd5b600060e08284031215611f9f57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fd057634e487b7160e01b600052604160045260246000fd5b60405282358152905080611fe660208401611f5f565b6020820152611ff760408401611f6a565b604082015261200860608401611f6a565b606082015261201960808401611f6a565b608082015261202a60a08401611f7e565b60a082015261203b60c08401611f5f565b60c08201525092915050565b600080610100838503121561205b57600080fd5b8235915061206c8460208501611f8d565b90509250929050565b6000806000610120848603121561208b57600080fd5b83359250602084013591506120a38560408601611f8d565b90509250925092565b6000602082840312156120be57600080fd5b5035919050565b600080604083850312156120d857600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611f4557600080fd5b60008083601f84011261211157600080fd5b50813567ffffffffffffffff81111561212957600080fd5b60208301915083602082850101111561214157600080fd5b9250929050565b6000806000806000806080878903121561216157600080fd5b863567ffffffffffffffff8082111561217957600080fd5b818901915089601f83011261218d57600080fd5b81358181111561219c57600080fd5b8a60208260051b85010111156121b157600080fd5b602083019850809750506121c760208a016120e7565b95506121d560408a01611f5f565b945060608901359150808211156121eb57600080fd5b506121f889828a016120ff565b979a9699509497509295939492505050565b60008082840361010081121561221f57600080fd5b8335925060e0601f198201121561223557600080fd5b506020830190509250929050565b600060e0828403121561225557600080fd5b61225f8383611f8d565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061229057612290612266565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156115e9576115e96122be565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561230f57600080fd5b5051919050565b60006020828403121561232857600080fd5b815161225f81611f4a565b60008261235057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123cf57600080fd5b61225f82611f7e565b6000602082840312156123ea57600080fd5b813561225f81611f4a565b808201808211156115e9576115e96122be565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061246057612460612266565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212201c9f54aa22ba7698fc9ba489f860256f3e64eff6f8b9e65283583a07459d15b264736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101b75760003560e01c806390df63b7116100ec578063b633b9441161008a578063d0e30db011610064578063d0e30db014610538578063d5e6a9df1461056c578063da2b7bc4146105a0578063df19e6ff146105c057600080fd5b8063b633b944146104c4578063c2114a16146104e4578063c299acc41461051857600080fd5b80639c13b6b5116100c65780639c13b6b514610412578063aa22a1c614610428578063b044397e1461045c578063b5b7a1841461049057600080fd5b806390df63b7146103af578063930f28af146103dc5780639588eca2146103fc57600080fd5b806331ddf7431161015957806349b4299e1161013357806349b4299e1461031b5780634a439cfe1461033b578063541adcca1461035b5780638d96fdea1461037b57600080fd5b806331ddf743146102bb5780633ce43cfd146102db5780634788cb38146102fb57600080fd5b8063222ae78611610195578063222ae786146102425780632639c0601461026557806327ee6bdd1461029257806331d14457146102a857600080fd5b806301139b68146101bc5780630f0adca5146101d15780631062b39a146101f1575b600080fd5b6101cf6101ca366004612047565b6105ed565b005b3480156101dd57600080fd5b506101cf6101ec366004612075565b61082b565b3480156101fd57600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024e57600080fd5b50610257610bdb565b604051908152602001610239565b34801561027157600080fd5b506102576102803660046120ac565b60026020526000908152604090205481565b34801561029e57600080fd5b5061025760015481565b6101cf6102b63660046120c5565b610c0c565b3480156102c757600080fd5b506101cf6102d6366004612148565b610e77565b3480156102e757600080fd5b506101cf6102f636600461220a565b611117565b34801561030757600080fd5b506101cf61031636600461220a565b61125e565b34801561032757600080fd5b506101cf610336366004612047565b6113d3565b34801561034757600080fd5b506102576103563660046120ac565b6115bd565b34801561036757600080fd5b50610257610376366004612243565b6115ef565b34801561038757600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156103bb57600080fd5b506102576103ca3660046120ac565b60036020526000908152604090205481565b3480156103e857600080fd5b506101cf6103f7366004612047565b611641565b34801561040857600080fd5b5061025760005481565b34801561041e57600080fd5b5061025760045481565b34801561043457600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561046857600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561049c57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d057600080fd5b506101cf6104df366004612047565b611835565b3480156104f057600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561052457600080fd5b506101cf6105333660046120ac565b611a41565b34801561054457600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561057857600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ac57600080fd5b506101cf6105bb366004612047565b611cca565b3480156105cc57600080fd5b506105e06105db366004612243565b611e83565b604051610239919061227c565b6105f6816115ef565b6000838152600260205260409020541461062b5760405162461bcd60e51b815260040161062290612296565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561069b5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610622565b60c08101516001600160a01b0316156106f65760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610622565b60008160a00151600281111561070e5761070e612266565b1461075b5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610622565b3360c082015261076a816115ef565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108275760006108067f0000000000000000000000000000000000000000000000000000000000000000346122d4565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161087e5761087e6122e7565b040311156108c15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109445760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c691906122fd565b7f000000000000000000000000000000000000000000000000000000000000000014610a285760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aaa9190612316565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b1d5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b60015483118015610b2d57508115155b15610b7057600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b79816115ef565b60008481526002602052604090205403610bd6578051829003610ba257600160a0820152610bbd565b60c08101516001600160a01b031615610bbd57600260a08201525b610bc6816115ef565b6000848152600260205260409020555b505050565b6000610c077f000000000000000000000000000000000000000000000000000000000000000042612333565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c7c5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000004281610cab57610cab6122e7565b048210610cfa5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610622565b600454421115610d7e577f0000000000000000000000000000000000000000000000000000000000000000600454420381610d3757610d376122e7565b04826001011015610d7e5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610622565b80610d9b5760405162461bcd60e51b815260040161062290612296565b60008281526002602052604090205415610ded5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610622565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610e33906115ef565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107aa565b60408510610eb95760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610622565b600084848484604051602001610ed29493929190612355565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610f52576000888883818110610f1457610f14612397565b90506020020135905082811115610f3957826000528060205260406000209250610f49565b8060005282602052604060002092505b50600101610ef8565b508060005414610f955760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610622565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561100a5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610622565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061103a90899089906123ad565b6000604051808303816000865af19150503d8060008114611077576040519150601f19603f3d011682016040523d82523d6000602084013e61107c565b606091505b50509050806110cd5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610622565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61112961037636839003830183612243565b600083815260026020526040902054146111555760405162461bcd60e51b815260040161062290612296565b600261116760c0830160a084016123bd565b600281111561117857611178612266565b146111b95760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610622565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061121393505060e0840191505060c083016123d8565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61127061037636839003830183612243565b6000838152600260205260409020541461129c5760405162461bcd60e51b815260040161062290612296565b60016112ae60c0830160a084016123bd565b60028111156112bf576112bf612266565b146112fc5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610622565b600082815260026020526040812081905561131d60e0830160c084016123d8565b6001600160a01b031614611378576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061121393505060408401915050602083016123d8565b61138860408201602083016123d8565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6113dc816115ef565b600083815260026020526040902054146114085760405162461bcd60e51b815260040161062290612296565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff1661144191906123f5565b61144b91906123f5565b4210156114af5760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610622565b60006114ba82611e83565b905060028160038111156114d0576114d0612266565b14806114ed575060008160038111156114eb576114eb612266565b145b6115565760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610622565b63ffffffff428116606084015243166080830152611573826115ef565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115e97f000000000000000000000000000000000000000000000000000000000000000083612333565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611624989097969101612408565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611694576116946122e7565b040311156116d75760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b6116e0816115ef565b6000838152600260205260409020541461170c5760405162461bcd60e51b815260040161062290612296565b60c08101516001600160a01b03161561175e5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610622565b600161176982611e83565b600381111561177a5761177a612266565b146117c75760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610622565b60015482111561180f57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261181f816115ef565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611888576118886122e7565b0403116118c95760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b6118d2816115ef565b600083815260026020526040902054146118fe5760405162461bcd60e51b815260040161062290612296565b60008160a00151600281111561191657611916612266565b146119555760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60c08101516001600160a01b0316156108275760208101516001600160a01b03166119d95760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c08101805160009091526119ed826115ef565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611aac5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b2e91906122fd565b7f000000000000000000000000000000000000000000000000000000000000000014611b905760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015611bee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c129190612316565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614611c855760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b8060045414611cc75760048190556040518181527fe5c620413c3d944fbd314ecc2375b9bdcc721589711a4348d9ecaf966160fa389060200160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d1d57611d1d6122e7565b040311611d5e5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611d67816115ef565b60008381526002602052604090205414611d935760405162461bcd60e51b815260040161062290612296565b60008160a001516002811115611dab57611dab612266565b14611dea5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60208101516001600160a01b0316156108275760c08101516001600160a01b0316611e6f5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60208101805160009091526119ed826115ef565b6000816060015163ffffffff16600003611e9f57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611edb57506003919050565b60006005836060015163ffffffff16420381611ef957611ef96122e7565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611f3d5760019250611f42565b600092505b50505b919050565b6001600160a01b0381168114611cc757600080fd5b8035611f4581611f4a565b803563ffffffff81168114611f4557600080fd5b803560038110611f4557600080fd5b600060e08284031215611f9f57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fd057634e487b7160e01b600052604160045260246000fd5b60405282358152905080611fe660208401611f5f565b6020820152611ff760408401611f6a565b604082015261200860608401611f6a565b606082015261201960808401611f6a565b608082015261202a60a08401611f7e565b60a082015261203b60c08401611f5f565b60c08201525092915050565b600080610100838503121561205b57600080fd5b8235915061206c8460208501611f8d565b90509250929050565b6000806000610120848603121561208b57600080fd5b83359250602084013591506120a38560408601611f8d565b90509250925092565b6000602082840312156120be57600080fd5b5035919050565b600080604083850312156120d857600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611f4557600080fd5b60008083601f84011261211157600080fd5b50813567ffffffffffffffff81111561212957600080fd5b60208301915083602082850101111561214157600080fd5b9250929050565b6000806000806000806080878903121561216157600080fd5b863567ffffffffffffffff8082111561217957600080fd5b818901915089601f83011261218d57600080fd5b81358181111561219c57600080fd5b8a60208260051b85010111156121b157600080fd5b602083019850809750506121c760208a016120e7565b95506121d560408a01611f5f565b945060608901359150808211156121eb57600080fd5b506121f889828a016120ff565b979a9699509497509295939492505050565b60008082840361010081121561221f57600080fd5b8335925060e0601f198201121561223557600080fd5b506020830190509250929050565b600060e0828403121561225557600080fd5b61225f8383611f8d565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061229057612290612266565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156115e9576115e96122be565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561230f57600080fd5b5051919050565b60006020828403121561232857600080fd5b815161225f81611f4a565b60008261235057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123cf57600080fd5b61225f82611f7e565b6000602082840312156123ea57600080fd5b813561225f81611f4a565b808201808211156115e9576115e96122be565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061246057612460612266565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212201c9f54aa22ba7698fc9ba489f860256f3e64eff6f8b9e65283583a07459d15b264736f6c63430008120033", + "devdoc": { + "details": "Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.", + "events": { + "Challenged(uint256,address)": { + "details": "This event indicates that `sendSnapshot(epoch)` should be called in the inbox.", + "params": { + "_challenger": "The address of the challenger.", + "_epoch": "The epoch associated with the challenged claim." + } + }, + "Claimed(address,bytes32)": { + "details": "Watchers check this event to challenge fraud.", + "params": { + "_claimer": "The address of the claimer.", + "_stateRoot": "The state root of the claim." + } + }, + "MessageRelayed(uint64)": { + "details": "This event indicates that a message has been relayed.", + "params": { + "_msgId": "The msgId of the message that was relayed." + } + }, + "SequencerLimitUpdateReceived(uint256)": { + "details": "This event indicates the sequencer limit updated.", + "params": { + "_newSequencerLimit": "The new maxL2StateSyncDelay." + } + }, + "VerificationStarted(uint256)": { + "details": "This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.", + "params": { + "_epoch": "The epoch that started verification." + } + }, + "Verified(uint256)": { + "details": "This events indicates that verification has succeeded. The messages are ready to be relayed.", + "params": { + "_epoch": "The epoch that was verified." + } + } + }, + "kind": "dev", + "methods": { + "censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Gets the status of the censorship test for claim.", + "params": { + "_claim": "The claim to test." + }, + "returns": { + "status": "True if the claim passed the censorship test." + } + }, + "challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch of the claim to challenge." + } + }, + "claim(uint256,bytes32)": { + "details": "Submit a claim about the _stateRoot at _epoch and submit a deposit.", + "params": { + "_epoch": "The epoch for which the claim is made.", + "_stateRoot": "The state root to claim." + } + }, + "constructor": { + "details": "Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value", + "params": { + "_amb": "The address of the AMB contract on Gnosis.", + "_deposit": "The deposit amount to submit a claim in wei.", + "_epochPeriod": "The duration of each epoch.", + "_maxMissingBlocks": "The maximum number of blocks that can be missing in a challenge period.", + "_minChallengePeriod": "The minimum time window to challenge a claim.", + "_routerArbToGnosis": "The address of the router on Ethereum that routes from Arbitrum to Ethereum.", + "_routerChainId": "The chain id of the routerArbToGnosis.", + "_sequencerLimit": "The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.", + "_timeoutEpochs": "The epochs before the bridge is considered shutdown." + } + }, + "epochAt(uint256)": { + "details": "Get the current epoch from the outbox's point of view using the Ethereum L1 clock.", + "returns": { + "epoch": "The hash of the claim." + } + }, + "epochNow()": { + "details": "Get the current epoch from the outbox's point of view using the Ethereum L1 clock.", + "returns": { + "epoch": "The hash of the claim." + } + }, + "hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Hashes the claim.", + "params": { + "_claim": "The claim to hash." + }, + "returns": { + "hashedClaim": "The hash of the claim." + } + }, + "resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Resolves any challenge of the optimistic claim for '_epoch'.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch to verify.", + "_stateRoot": "The true state root for the epoch." + } + }, + "sendMessage(bytes32[],uint64,address,bytes)": { + "details": "Verifies and relays the message. UNTRUSTED.", + "params": { + "_message": "The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)", + "_msgId": "The zero based index of the message in the inbox.", + "_proof": "The merkle proof to prove the message inclusion in the inbox state root.", + "_to": "The address of the contract on Gnosis to call." + } + }, + "startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Start verification for claim for 'epoch'.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch of the claim to challenge." + } + }, + "updateSequencerLimit(uint256)": { + "details": "Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge", + "params": { + "_newSequencerLimit": "The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract." + } + }, + "verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Resolves the optimistic claim for '_epoch'.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch of the optimistic claim." + } + }, + "withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch associated with the challenge deposit to withraw." + } + }, + "withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch associated with the claim deposit to withraw." + } + }, + "withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch associated with the claim deposit to withraw." + } + }, + "withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch associated with the claim deposit to withraw." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "notice": "Note: Access restricted to AMB." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2556, + "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", + "label": "stateRoot", + "offset": 0, + "slot": "0", + "type": "t_bytes32" + }, + { + "astId": 2558, + "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", + "label": "latestVerifiedEpoch", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 2562, + "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", + "label": "claimHashes", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_bytes32)" + }, + { + "astId": 2566, + "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", + "label": "relayed", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint256,t_bytes32)" + }, + { + "astId": 2568, + "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", + "label": "sequencerLimit", + "offset": 0, + "slot": "4", + "type": "t_uint256" + } + ], + "types": { + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} diff --git a/contracts/deployments/goerli/RouterArbToGnosisDevnet.json b/contracts/deployments/goerli/RouterArbToGnosisDevnet.json index 8aaa09fc..f225f736 100644 --- a/contracts/deployments/goerli/RouterArbToGnosisDevnet.json +++ b/contracts/deployments/goerli/RouterArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xD4847f86Ed2E9D03839B15fd0818759861c063a8", + "address": "0x660daB9A6436A814a6ae3a6f27b309356a4bE78c", "abi": [ { "inputs": [ @@ -46,6 +46,45 @@ "name": "Routed", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_requestedSequencerLimit", + "type": "uint256" + } + ], + "name": "SequencerLimitDecreaseRequested", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "_ticketID", + "type": "bytes32" + } + ], + "name": "SequencerLimitSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newSequencerLimit", + "type": "uint256" + } + ], + "name": "SequencerLimitUpdated", + "type": "event" + }, { "inputs": [], "name": "amb", @@ -72,6 +111,13 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "executeSequencerLimitDecreaseRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -98,12 +144,17 @@ }, { "internalType": "uint32", - "name": "timestamp", + "name": "timestampClaimed", "type": "uint32" }, { "internalType": "uint32", - "name": "blocknumber", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", "type": "uint32" }, { @@ -127,6 +178,44 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "sequencerLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerLimitDecreaseRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestedSequencerLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updateSequencerLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "veaInboxArbToGnosis", @@ -154,34 +243,35 @@ "type": "function" } ], - "transactionHash": "0x1d4a99de35b479ca1602e8cdd592fa84d0aa2851769bdd9e30bbe8e622129630", + "transactionHash": "0xa5c1912a9a5382f76ba8a70c87e2e615c887f02edefbe2abdf9569542bb4b953", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xD4847f86Ed2E9D03839B15fd0818759861c063a8", - "transactionIndex": 32, - "gasUsed": "413720", + "contractAddress": "0x660daB9A6436A814a6ae3a6f27b309356a4bE78c", + "transactionIndex": 39, + "gasUsed": "852741", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x770c8831e04e125123a645cf4b42243b34b2f10dc4e7eeefd2a85c501a4fba35", - "transactionHash": "0x1d4a99de35b479ca1602e8cdd592fa84d0aa2851769bdd9e30bbe8e622129630", + "blockHash": "0x5dedb1f9340d5dc928823f8db27e78101ffcc7d84315b79b7abe0bf3223ee24f", + "transactionHash": "0xa5c1912a9a5382f76ba8a70c87e2e615c887f02edefbe2abdf9569542bb4b953", "logs": [], - "blockNumber": 9050719, - "cumulativeGasUsed": "5199553", + "blockNumber": 9181948, + "cumulativeGasUsed": "4080654", "status": 1, "byzantium": true }, "args": [ - "0xC1Ebd02f738644983b6C4B2d440b8e77DdE276Bd", + "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0x660daB9A6436A814a6ae3a6f27b309356a4bE78c", - "0xdFd7aDEb43d46FA3f16FB3e27F7fe85c3f5BD89D" + "0x6aF68A94246AB9Ad3e6B1D5e28d9eAF374eaB015", + "0x32b55e5E51f6F4cbd661a4cA1cC6142f6380777b" ], - "numDeployments": 9, - "solcInputHash": "164349035d8ff73dc3aa26ca72d8e398", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"notice\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@shotaronowhere, @jaybuidl]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/**\\n * Router from Arbitrum to Gnosis Chain.\\n * Note: This contract is deployed on Ethereum.\\n */\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /**\\n * @dev Event emitted when a message is relayed to another Safe Bridge.\\n * @param _epoch The epoch of the batch requested to send.\\n * @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n */\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /**\\n * @dev Constructor.\\n * @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n * @param _amb The address of the AMB contract on Ethereum.\\n * @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n * @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n */\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * Note: Access restricted to arbitrum canonical bridge.\\n * @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n * @param _epoch The epoch to verify.\\n * @param _stateroot The true batch merkle root for the epoch.\\n * @param _claim The claim associated with the epoch.\\n */\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x85a777b43e50de1205be9d8643d4e8a04b5ca64ea76ddced87eddd61eaf63856\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x4087f2b5f4e9d2cdb2ebd352ba187f343c9c3ca7b20512b9d54ccf99a06692f5\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x8f4b4815b49b6f5cea5c75ccd32a5166d04c398143c683049ffba35c051258fb\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@jaybuidl, @shotaronowhere]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/**\\n * @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\n */\\ninterface IVeaOutboxOnL1 {\\n /**\\n * Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n * @dev Verifies and relays the message.\\n * @param _proof The merkle proof to prove the message.\\n * @param _msgId The zero based index of the message in the inbox.\\n * @param _to The address to send the message to.\\n * @param _message The message to relay.\\n */\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /**\\n * Note: Access restricted to canonical bridge.\\n * @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n * @param _epoch The epoch to verify.\\n * @param _stateRoot The true state root for the epoch.\\n * @param _claim The claim associated with the epoch.\\n */\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x0f96c2344dcdf78dc89359ba72e281a28cf8e47368eabf4bebc9a648ffc35163\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@shotaronowhere]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/**\\n * @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n * @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n * @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\n */\\ninterface IRouterToL1 {\\n /**\\n * Note: Access restricted to canonical sending-chain bridge.\\n * @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n * @param _epoch The epoch to verify.\\n * @param _stateRoot The true state root for the epoch.\\n * @param _claim The claim associated with the epoch.\\n */\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xc686c3c4fc00ed3832f699243647b6b96a37263443e24d096daced73c38c9c4a\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@jaybuidl, @shotaronowhere]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestamp;\\n uint32 blocknumber;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1bdda50afbf5f966278a867e7149397ed820de658c15dda4266e70c314df17d2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x61010060405234801561001157600080fd5b5060405161079a38038061079a8339810160408190526100309161006a565b6001600160a01b0393841660805291831660a052821660c0521660e0526100c9565b6001600160a01b038116811461006757600080fd5b50565b6000806000806080858703121561008057600080fd5b845161008b81610052565b602086015190945061009c81610052565b60408601519093506100ad81610052565b60608601519092506100be81610052565b939692955090935050565b60805160a05160c05160e0516106786101226000396000818160a4015261037601526000818160cb015261019b0152600081816061015261034d0152600081816101070152818161013401526101c501526106786000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80631062b39a1461005c5780632fa70aa71461009f5780638c5f173f146100c6578063b9457b07146100ed578063e78cea9214610102575b600080fd5b6100837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b6100837f000000000000000000000000000000000000000000000000000000000000000081565b6100837f000000000000000000000000000000000000000000000000000000000000000081565b6101006100fb366004610487565b610129565b005b6100837f000000000000000000000000000000000000000000000000000000000000000081565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101995760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b60448201526064015b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610221573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061024591906104e1565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610282573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a691906104e1565b6001600160a01b0316146102ed5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610190565b600083838360405160240161030493929190610529565b60408051601f19818403018152918152602080830180516001600160e01b0316631ee9e40360e21b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa1580156103bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e391906105c4565b6040518463ffffffff1660e01b8152600401610401939291906105dd565b6020604051808303816000875af1158015610420573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044491906105c4565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161047891815260200190565b60405180910390a25050505050565b600080600083850361010081121561049e57600080fd5b843593506020850135925060c0603f19820112156104bb57600080fd5b506040840190509250925092565b6001600160a01b03811681146104de57600080fd5b50565b6000602082840312156104f357600080fd5b81516104fe816104c9565b9392505050565b8035610510816104c9565b919050565b803563ffffffff8116811461051057600080fd5b83815260208082018490528235604083015261010082019083013561054d816104c9565b6001600160a01b0316606083015261056760408401610515565b63ffffffff80821660808501528061058160608701610515565b1660a0850152505060808301356003811061059b57600080fd5b60c08301526105ac60a08401610505565b6001600160a01b03811660e084015250949350505050565b6000602082840312156105d657600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610619578681018301518582016080015282016105fd565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220cb569e879dc562ca22dece59c1f6d33f389dc4dbfae032d602f54c67a40d59cc64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c80631062b39a1461005c5780632fa70aa71461009f5780638c5f173f146100c6578063b9457b07146100ed578063e78cea9214610102575b600080fd5b6100837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b6100837f000000000000000000000000000000000000000000000000000000000000000081565b6100837f000000000000000000000000000000000000000000000000000000000000000081565b6101006100fb366004610487565b610129565b005b6100837f000000000000000000000000000000000000000000000000000000000000000081565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101995760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b60448201526064015b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610221573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061024591906104e1565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610282573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a691906104e1565b6001600160a01b0316146102ed5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610190565b600083838360405160240161030493929190610529565b60408051601f19818403018152918152602080830180516001600160e01b0316631ee9e40360e21b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa1580156103bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e391906105c4565b6040518463ffffffff1660e01b8152600401610401939291906105dd565b6020604051808303816000875af1158015610420573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044491906105c4565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161047891815260200190565b60405180910390a25050505050565b600080600083850361010081121561049e57600080fd5b843593506020850135925060c0603f19820112156104bb57600080fd5b506040840190509250925092565b6001600160a01b03811681146104de57600080fd5b50565b6000602082840312156104f357600080fd5b81516104fe816104c9565b9392505050565b8035610510816104c9565b919050565b803563ffffffff8116811461051057600080fd5b83815260208082018490528235604083015261010082019083013561054d816104c9565b6001600160a01b0316606083015261056760408401610515565b63ffffffff80821660808501528061058160608701610515565b1660a0850152505060808301356003811061059b57600080fd5b60c08301526105ac60a08401610505565b6001600160a01b03811660e084015250949350505050565b6000602082840312156105d657600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610619578681018301518582016080015282016105fd565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220cb569e879dc562ca22dece59c1f6d33f389dc4dbfae032d602f54c67a40d59cc64736f6c63430008120033", + "numDeployments": 10, + "solcInputHash": "c9836c6cb024801f3104e49f87086294", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"SequencerLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"SequencerLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"SequencerLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"SequencerLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerLimit\":\"The new sequencer limit requested.\"}},\"SequencerLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"SequencerLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerLimitDecreaseRequest()\":{\"details\":\"execute SequencerLimitDecreaseRequest\"},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updateSequencerLimit()\":{\"details\":\"Update the sequencerLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/IArbitrumUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerLimitDecreaseRequest; // Decreasing the sequencerLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event SequencerLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerLimit The new maxL2StateSyncDelay.\\n event SequencerLimitUpdated(uint256 _newSequencerLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerLimit The new sequencer limit requested.\\n event SequencerLimitDecreaseRequested(uint256 _requestedSequencerLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerLimit > sequencerLimit) {\\n // For sequencerLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerLimit = newSequencerLimit;\\n emit SequencerLimitUpdated(newSequencerLimit);\\n sendSequencerLimit();\\n } else if (newSequencerLimit < sequencerLimit) {\\n require(sequencerLimitDecreaseRequest.timestamp == 0, \\\"Sequencer limit decrease request already pending.\\\");\\n\\n sequencerLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerLimit, \\n timestamp: block.timestamp\\n });\\n emit SequencerLimitDecreaseRequested(newSequencerLimit);\\n }\\n }\\n\\n /// @dev execute SequencerLimitDecreaseRequest\\n function executeSequencerLimitDecreaseRequest() external {\\n require(sequencerLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerLimitDecreaseRequest.timestamp + sequencerLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerLimit = sequencerLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerLimit == requestedSequencerLimit) {\\n sequencerLimit = requestedSequencerLimit;\\n emit SequencerLimitUpdated(requestedSequencerLimit);\\n sendSequencerLimit();\\n }\\n }\\n\\n /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n function sendSequencerLimit() internal {\\n bytes memory data = abi.encodeCall(IArbitrumUpdatable.updateSequencerLimit, sequencerLimit);\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit SequencerLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x9948429dd367155ea338d03e19a9f5a7e2f6b6cdd69f3221a9c68787828a62b6\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/IArbitrumUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from the Arbitrum Bridge through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an IArbitrumUpdateable contract which receives updates from the router on Ethereum.\\ninterface IArbitrumUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Arbitrum Sequencer contract.\\n /// @param _newSequencerLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerLimit(uint256 _newSequencerLimit) external;\\n}\\n\",\"keccak256\":\"0x4d59f1de812ac1ddad033f03c7dc34b1325b5b6dd43d26b97cd4e0d2d14c371a\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b5060405162000fe138038062000fe1833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610d5d620002846000396000818160eb0152818161082401526109bd0152600081816101120152610649015260008181609d015281816107fb015261099401526000818161017b015281816102c1015281816103e5015281816105e701526106730152610d5d6000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80639c13b6b5116100665780639c13b6b514610134578063da456a0e1461014b578063dd5fdeaa1461016e578063e78cea9214610176578063f6ee5b761461019d57600080fd5b80631062b39a1461009857806325a2acb1146100dc5780632fa70aa7146100e65780638c5f173f1461010d575b600080fd5b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100e46101b0565b005b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b61013d60005481565b6040519081526020016100d3565b600154600254610159919082565b604080519283526020830191909152016100d3565b6100e46103e1565b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6100e46101ab366004610aca565b6105dc565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b0c565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b48565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610b6c565b50925050508181036103dd5760008290556040518281527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a16103dd610935565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610441573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104659190610b48565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c69190610b6c565b50925050506000548111156105185760008190556040518181527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a1610515610935565b50565b600054811015610515576002541561058c5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527f08b771dddc6449625c7cd99bccdaf915b9c891fb6fa03695a71175b69e376ebb910160405180910390a150565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106475760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f39190610b48565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107549190610b48565b6001600160a01b03161461079b5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008383836040516024016107b293929190610bf7565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561086d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108919190610ca9565b6040518463ffffffff1660e01b81526004016108af93929190610cc2565b6020604051808303816000875af11580156108ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f29190610ca9565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092691815260200190565b60405180910390a25050505050565b6000805460405160240161094b91815260200190565b60408051601f19818403018152918152602080830180516001600160e01b03166330a66b3160e21b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2a9190610ca9565b6040518463ffffffff1660e01b8152600401610a4893929190610cc2565b6020604051808303816000875af1158015610a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8b9190610ca9565b90507fd488b9f6b18ad9b161668081604f47fc1bf87885163d2220eb8e27e7c9c7b59381604051610abe91815260200190565b60405180910390a15050565b6000806000838503610120811215610ae157600080fd5b843593506020850135925060e0603f1982011215610afe57600080fd5b506040840190509250925092565b80820180821115610b2d57634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b038116811461051557600080fd5b600060208284031215610b5a57600080fd5b8151610b6581610b33565b9392505050565b60008060008060808587031215610b8257600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bad81610b33565b919050565b803563ffffffff81168114610bad57600080fd5b803560038110610bad57600080fd5b60038110610bf357634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1b81610b33565b6001600160a01b03166060830152610c3560408401610bb2565b63ffffffff808216608085015280610c4f60608701610bb2565b1660a085015280610c6260808701610bb2565b1660c08501525050610c7660a08401610bc6565b610c8360e0840182610bd5565b50610c9060c08401610ba2565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cbb57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cfe57868101830151858201608001528201610ce2565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220eb4ad4f2e9b0b72e4d19c4740089707442a5a4b35d3f482fe78ca0227afc31b364736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80639c13b6b5116100665780639c13b6b514610134578063da456a0e1461014b578063dd5fdeaa1461016e578063e78cea9214610176578063f6ee5b761461019d57600080fd5b80631062b39a1461009857806325a2acb1146100dc5780632fa70aa7146100e65780638c5f173f1461010d575b600080fd5b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100e46101b0565b005b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b61013d60005481565b6040519081526020016100d3565b600154600254610159919082565b604080519283526020830191909152016100d3565b6100e46103e1565b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6100e46101ab366004610aca565b6105dc565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b0c565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b48565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610b6c565b50925050508181036103dd5760008290556040518281527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a16103dd610935565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610441573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104659190610b48565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c69190610b6c565b50925050506000548111156105185760008190556040518181527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a1610515610935565b50565b600054811015610515576002541561058c5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527f08b771dddc6449625c7cd99bccdaf915b9c891fb6fa03695a71175b69e376ebb910160405180910390a150565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106475760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f39190610b48565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107549190610b48565b6001600160a01b03161461079b5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008383836040516024016107b293929190610bf7565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561086d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108919190610ca9565b6040518463ffffffff1660e01b81526004016108af93929190610cc2565b6020604051808303816000875af11580156108ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f29190610ca9565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092691815260200190565b60405180910390a25050505050565b6000805460405160240161094b91815260200190565b60408051601f19818403018152918152602080830180516001600160e01b03166330a66b3160e21b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2a9190610ca9565b6040518463ffffffff1660e01b8152600401610a4893929190610cc2565b6020604051808303816000875af1158015610a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8b9190610ca9565b90507fd488b9f6b18ad9b161668081604f47fc1bf87885163d2220eb8e27e7c9c7b59381604051610abe91815260200190565b60405180910390a15050565b6000806000838503610120811215610ae157600080fd5b843593506020850135925060e0603f1982011215610afe57600080fd5b506040840190509250925092565b80820180821115610b2d57634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b038116811461051557600080fd5b600060208284031215610b5a57600080fd5b8151610b6581610b33565b9392505050565b60008060008060808587031215610b8257600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bad81610b33565b919050565b803563ffffffff81168114610bad57600080fd5b803560038110610bad57600080fd5b60038110610bf357634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1b81610b33565b6001600160a01b03166060830152610c3560408401610bb2565b63ffffffff808216608085015280610c4f60608701610bb2565b1660a085015280610c6260808701610bb2565b1660c08501525050610c7660a08401610bc6565b610c8360e0840182610bd5565b50610c9060c08401610ba2565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cbb57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cfe57868101830151858201608001528201610ce2565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220eb4ad4f2e9b0b72e4d19c4740089707442a5a4b35d3f482fe78ca0227afc31b364736f6c63430008120033", "devdoc": { + "details": "Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.", "events": { "Routed(uint256,bytes32)": { "details": "Event emitted when a message is relayed to another Safe Bridge.", @@ -189,6 +279,24 @@ "_epoch": "The epoch of the batch requested to send.", "_ticketID": "The unique identifier provided by the underlying canonical bridge." } + }, + "SequencerLimitDecreaseRequested(uint256)": { + "details": "This event indicates that a request to decrease the sequencer limit has been made.", + "params": { + "_requestedSequencerLimit": "The new sequencer limit requested." + } + }, + "SequencerLimitSent(bytes32)": { + "details": "This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value", + "params": { + "_ticketID": "The ticketID from the AMB of the cross-chain message." + } + }, + "SequencerLimitUpdated(uint256)": { + "details": "This event indicates the sequencer limit updated.", + "params": { + "_newSequencerLimit": "The new maxL2StateSyncDelay." + } } }, "kind": "dev", @@ -202,13 +310,19 @@ "_veaOutboxArbToGnosis": "The vea outbox on Gnosis Chain." } }, - "route(uint256,bytes32,(bytes32,address,uint32,uint32,uint8,address))": { + "executeSequencerLimitDecreaseRequest()": { + "details": "execute SequencerLimitDecreaseRequest" + }, + "route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Resolves any challenge of the optimistic claim for '_epoch'.", "params": { "_claim": "The claim associated with the epoch.", "_epoch": "The epoch to verify.", "_stateroot": "The true batch merkle root for the epoch." } + }, + "updateSequencerLimit()": { + "details": "Update the sequencerLimit. If decreasing, a delayed request is created for later execution." } }, "version": 1 @@ -216,15 +330,60 @@ "userdoc": { "kind": "user", "methods": { - "route(uint256,bytes32,(bytes32,address,uint32,uint32,uint8,address))": { + "route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "notice": "Note: Access restricted to arbitrum canonical bridge." } }, - "notice": "Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.", "version": 1 }, "storageLayout": { - "storage": [], - "types": null + "storage": [ + { + "astId": 1835, + "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", + "label": "sequencerLimit", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 1838, + "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", + "label": "sequencerLimitDecreaseRequest", + "offset": 0, + "slot": "1", + "type": "t_struct(SequencerLimitDecreaseRequest)1843_storage" + } + ], + "types": { + "t_struct(SequencerLimitDecreaseRequest)1843_storage": { + "encoding": "inplace", + "label": "struct RouterArbToGnosis.SequencerLimitDecreaseRequest", + "members": [ + { + "astId": 1840, + "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", + "label": "requestedSequencerLimit", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 1842, + "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", + "label": "timestamp", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } } } diff --git a/contracts/deployments/goerli/RouterArbToGnosisTestnet.json b/contracts/deployments/goerli/RouterArbToGnosisTestnet.json new file mode 100644 index 00000000..7d738e41 --- /dev/null +++ b/contracts/deployments/goerli/RouterArbToGnosisTestnet.json @@ -0,0 +1,389 @@ +{ + "address": "0xfF2B7048d673767754B798df1702C786E2c59F1F", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IBridge", + "name": "_bridge", + "type": "address" + }, + { + "internalType": "contract IAMB", + "name": "_amb", + "type": "address" + }, + { + "internalType": "address", + "name": "_veaInboxArbToGnosis", + "type": "address" + }, + { + "internalType": "address", + "name": "_veaOutboxArbToGnosis", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_ticketID", + "type": "bytes32" + } + ], + "name": "Routed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_requestedSequencerLimit", + "type": "uint256" + } + ], + "name": "SequencerLimitDecreaseRequested", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "_ticketID", + "type": "bytes32" + } + ], + "name": "SequencerLimitSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newSequencerLimit", + "type": "uint256" + } + ], + "name": "SequencerLimitUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "amb", + "outputs": [ + { + "internalType": "contract IAMB", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "bridge", + "outputs": [ + { + "internalType": "contract IBridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "executeSequencerLimitDecreaseRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_stateroot", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "route", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerLimitDecreaseRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestedSequencerLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updateSequencerLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "veaInboxArbToGnosis", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "veaOutboxArbToGnosis", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x7dbe5f504a6d9104289dea858569d1ec89e014cdf833f56e41155292c16c59f4", + "receipt": { + "to": null, + "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", + "contractAddress": "0xfF2B7048d673767754B798df1702C786E2c59F1F", + "transactionIndex": 65, + "gasUsed": "852741", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xacd5a2fa3774512b4da23a14d99577be127f92be65faa2dc95f4c8d571198a56", + "transactionHash": "0x7dbe5f504a6d9104289dea858569d1ec89e014cdf833f56e41155292c16c59f4", + "logs": [], + "blockNumber": 9182229, + "cumulativeGasUsed": "16449276", + "status": 1, + "byzantium": true + }, + "args": [ + "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", + "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", + "0x773872EFbA47b926F4B2d42DaB4677431bDA02E4", + "0x53194Fa828ebEfa5cB515d23CC2467d88f6B0Be2" + ], + "numDeployments": 2, + "solcInputHash": "c9836c6cb024801f3104e49f87086294", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"SequencerLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"SequencerLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"SequencerLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"SequencerLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerLimit\":\"The new sequencer limit requested.\"}},\"SequencerLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"SequencerLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerLimitDecreaseRequest()\":{\"details\":\"execute SequencerLimitDecreaseRequest\"},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updateSequencerLimit()\":{\"details\":\"Update the sequencerLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/IArbitrumUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerLimitDecreaseRequest; // Decreasing the sequencerLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event SequencerLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerLimit The new maxL2StateSyncDelay.\\n event SequencerLimitUpdated(uint256 _newSequencerLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerLimit The new sequencer limit requested.\\n event SequencerLimitDecreaseRequested(uint256 _requestedSequencerLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerLimit > sequencerLimit) {\\n // For sequencerLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerLimit = newSequencerLimit;\\n emit SequencerLimitUpdated(newSequencerLimit);\\n sendSequencerLimit();\\n } else if (newSequencerLimit < sequencerLimit) {\\n require(sequencerLimitDecreaseRequest.timestamp == 0, \\\"Sequencer limit decrease request already pending.\\\");\\n\\n sequencerLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerLimit, \\n timestamp: block.timestamp\\n });\\n emit SequencerLimitDecreaseRequested(newSequencerLimit);\\n }\\n }\\n\\n /// @dev execute SequencerLimitDecreaseRequest\\n function executeSequencerLimitDecreaseRequest() external {\\n require(sequencerLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerLimitDecreaseRequest.timestamp + sequencerLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerLimit = sequencerLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerLimit == requestedSequencerLimit) {\\n sequencerLimit = requestedSequencerLimit;\\n emit SequencerLimitUpdated(requestedSequencerLimit);\\n sendSequencerLimit();\\n }\\n }\\n\\n /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n function sendSequencerLimit() internal {\\n bytes memory data = abi.encodeCall(IArbitrumUpdatable.updateSequencerLimit, sequencerLimit);\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit SequencerLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x9948429dd367155ea338d03e19a9f5a7e2f6b6cdd69f3221a9c68787828a62b6\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/IArbitrumUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from the Arbitrum Bridge through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an IArbitrumUpdateable contract which receives updates from the router on Ethereum.\\ninterface IArbitrumUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Arbitrum Sequencer contract.\\n /// @param _newSequencerLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerLimit(uint256 _newSequencerLimit) external;\\n}\\n\",\"keccak256\":\"0x4d59f1de812ac1ddad033f03c7dc34b1325b5b6dd43d26b97cd4e0d2d14c371a\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b5060405162000fe138038062000fe1833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610d5d620002846000396000818160eb0152818161082401526109bd0152600081816101120152610649015260008181609d015281816107fb015261099401526000818161017b015281816102c1015281816103e5015281816105e701526106730152610d5d6000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80639c13b6b5116100665780639c13b6b514610134578063da456a0e1461014b578063dd5fdeaa1461016e578063e78cea9214610176578063f6ee5b761461019d57600080fd5b80631062b39a1461009857806325a2acb1146100dc5780632fa70aa7146100e65780638c5f173f1461010d575b600080fd5b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100e46101b0565b005b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b61013d60005481565b6040519081526020016100d3565b600154600254610159919082565b604080519283526020830191909152016100d3565b6100e46103e1565b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6100e46101ab366004610aca565b6105dc565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b0c565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b48565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610b6c565b50925050508181036103dd5760008290556040518281527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a16103dd610935565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610441573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104659190610b48565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c69190610b6c565b50925050506000548111156105185760008190556040518181527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a1610515610935565b50565b600054811015610515576002541561058c5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527f08b771dddc6449625c7cd99bccdaf915b9c891fb6fa03695a71175b69e376ebb910160405180910390a150565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106475760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f39190610b48565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107549190610b48565b6001600160a01b03161461079b5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008383836040516024016107b293929190610bf7565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561086d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108919190610ca9565b6040518463ffffffff1660e01b81526004016108af93929190610cc2565b6020604051808303816000875af11580156108ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f29190610ca9565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092691815260200190565b60405180910390a25050505050565b6000805460405160240161094b91815260200190565b60408051601f19818403018152918152602080830180516001600160e01b03166330a66b3160e21b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2a9190610ca9565b6040518463ffffffff1660e01b8152600401610a4893929190610cc2565b6020604051808303816000875af1158015610a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8b9190610ca9565b90507fd488b9f6b18ad9b161668081604f47fc1bf87885163d2220eb8e27e7c9c7b59381604051610abe91815260200190565b60405180910390a15050565b6000806000838503610120811215610ae157600080fd5b843593506020850135925060e0603f1982011215610afe57600080fd5b506040840190509250925092565b80820180821115610b2d57634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b038116811461051557600080fd5b600060208284031215610b5a57600080fd5b8151610b6581610b33565b9392505050565b60008060008060808587031215610b8257600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bad81610b33565b919050565b803563ffffffff81168114610bad57600080fd5b803560038110610bad57600080fd5b60038110610bf357634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1b81610b33565b6001600160a01b03166060830152610c3560408401610bb2565b63ffffffff808216608085015280610c4f60608701610bb2565b1660a085015280610c6260808701610bb2565b1660c08501525050610c7660a08401610bc6565b610c8360e0840182610bd5565b50610c9060c08401610ba2565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cbb57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cfe57868101830151858201608001528201610ce2565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220eb4ad4f2e9b0b72e4d19c4740089707442a5a4b35d3f482fe78ca0227afc31b364736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80639c13b6b5116100665780639c13b6b514610134578063da456a0e1461014b578063dd5fdeaa1461016e578063e78cea9214610176578063f6ee5b761461019d57600080fd5b80631062b39a1461009857806325a2acb1146100dc5780632fa70aa7146100e65780638c5f173f1461010d575b600080fd5b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100e46101b0565b005b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b61013d60005481565b6040519081526020016100d3565b600154600254610159919082565b604080519283526020830191909152016100d3565b6100e46103e1565b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6100e46101ab366004610aca565b6105dc565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b0c565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b48565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610b6c565b50925050508181036103dd5760008290556040518281527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a16103dd610935565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610441573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104659190610b48565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c69190610b6c565b50925050506000548111156105185760008190556040518181527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a1610515610935565b50565b600054811015610515576002541561058c5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527f08b771dddc6449625c7cd99bccdaf915b9c891fb6fa03695a71175b69e376ebb910160405180910390a150565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106475760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f39190610b48565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107549190610b48565b6001600160a01b03161461079b5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008383836040516024016107b293929190610bf7565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561086d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108919190610ca9565b6040518463ffffffff1660e01b81526004016108af93929190610cc2565b6020604051808303816000875af11580156108ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f29190610ca9565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092691815260200190565b60405180910390a25050505050565b6000805460405160240161094b91815260200190565b60408051601f19818403018152918152602080830180516001600160e01b03166330a66b3160e21b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2a9190610ca9565b6040518463ffffffff1660e01b8152600401610a4893929190610cc2565b6020604051808303816000875af1158015610a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8b9190610ca9565b90507fd488b9f6b18ad9b161668081604f47fc1bf87885163d2220eb8e27e7c9c7b59381604051610abe91815260200190565b60405180910390a15050565b6000806000838503610120811215610ae157600080fd5b843593506020850135925060e0603f1982011215610afe57600080fd5b506040840190509250925092565b80820180821115610b2d57634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b038116811461051557600080fd5b600060208284031215610b5a57600080fd5b8151610b6581610b33565b9392505050565b60008060008060808587031215610b8257600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bad81610b33565b919050565b803563ffffffff81168114610bad57600080fd5b803560038110610bad57600080fd5b60038110610bf357634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1b81610b33565b6001600160a01b03166060830152610c3560408401610bb2565b63ffffffff808216608085015280610c4f60608701610bb2565b1660a085015280610c6260808701610bb2565b1660c08501525050610c7660a08401610bc6565b610c8360e0840182610bd5565b50610c9060c08401610ba2565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cbb57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cfe57868101830151858201608001528201610ce2565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220eb4ad4f2e9b0b72e4d19c4740089707442a5a4b35d3f482fe78ca0227afc31b364736f6c63430008120033", + "devdoc": { + "details": "Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.", + "events": { + "Routed(uint256,bytes32)": { + "details": "Event emitted when a message is relayed to another Safe Bridge.", + "params": { + "_epoch": "The epoch of the batch requested to send.", + "_ticketID": "The unique identifier provided by the underlying canonical bridge." + } + }, + "SequencerLimitDecreaseRequested(uint256)": { + "details": "This event indicates that a request to decrease the sequencer limit has been made.", + "params": { + "_requestedSequencerLimit": "The new sequencer limit requested." + } + }, + "SequencerLimitSent(bytes32)": { + "details": "This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value", + "params": { + "_ticketID": "The ticketID from the AMB of the cross-chain message." + } + }, + "SequencerLimitUpdated(uint256)": { + "details": "This event indicates the sequencer limit updated.", + "params": { + "_newSequencerLimit": "The new maxL2StateSyncDelay." + } + } + }, + "kind": "dev", + "methods": { + "constructor": { + "details": "Constructor.", + "params": { + "_amb": "The address of the AMB contract on Ethereum.", + "_bridge": "The address of the arbitrum bridge contract on Ethereum.", + "_veaInboxArbToGnosis": "The vea inbox on Arbitrum.", + "_veaOutboxArbToGnosis": "The vea outbox on Gnosis Chain." + } + }, + "executeSequencerLimitDecreaseRequest()": { + "details": "execute SequencerLimitDecreaseRequest" + }, + "route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Resolves any challenge of the optimistic claim for '_epoch'.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch to verify.", + "_stateroot": "The true batch merkle root for the epoch." + } + }, + "updateSequencerLimit()": { + "details": "Update the sequencerLimit. If decreasing, a delayed request is created for later execution." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "notice": "Note: Access restricted to arbitrum canonical bridge." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1835, + "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", + "label": "sequencerLimit", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 1838, + "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", + "label": "sequencerLimitDecreaseRequest", + "offset": 0, + "slot": "1", + "type": "t_struct(SequencerLimitDecreaseRequest)1843_storage" + } + ], + "types": { + "t_struct(SequencerLimitDecreaseRequest)1843_storage": { + "encoding": "inplace", + "label": "struct RouterArbToGnosis.SequencerLimitDecreaseRequest", + "members": [ + { + "astId": 1840, + "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", + "label": "requestedSequencerLimit", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 1842, + "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", + "label": "timestamp", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} diff --git a/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json b/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json index 98d4ae2a..cff1c814 100644 --- a/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json +++ b/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x9235A379950B9f01fb3e2961C06912A96DCcef0e", + "address": "0xB32A65B4b0b18d231BA88c3E37F7f600683baD6D", "abi": [ { "inputs": [ @@ -23,11 +23,6 @@ "name": "_timeoutEpochs", "type": "uint256" }, - { - "internalType": "uint256", - "name": "_epochClaimDelay", - "type": "uint256" - }, { "internalType": "address", "name": "_veaInboxArbToEthDevnet", @@ -98,6 +93,45 @@ "name": "MessageRelayed", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_requestedSequencerLimit", + "type": "uint256" + } + ], + "name": "SequencerLimitDecreaseRequested", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newSequencerLimit", + "type": "uint256" + } + ], + "name": "SequencerLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "VerificationStarted", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -126,11 +160,6 @@ }, { "inputs": [ - { - "internalType": "uint256", - "name": "_epoch", - "type": "uint256" - }, { "components": [ { @@ -145,12 +174,17 @@ }, { "internalType": "uint32", - "name": "timestamp", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", "type": "uint32" }, { "internalType": "uint32", - "name": "blocknumber", + "name": "blocknumberVerification", "type": "uint32" }, { @@ -169,22 +203,70 @@ "type": "tuple" } ], - "name": "challenge", - "outputs": [], - "stateMutability": "payable", + "name": "censorshipTestStatus", + "outputs": [ + { + "internalType": "enum VeaOutboxArbToEth.CensorshipTestStatus", + "name": "status", + "type": "uint8" + } + ], + "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "challengePeriod", - "outputs": [ + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "_epoch", "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" } ], - "stateMutability": "view", + "name": "challenge", + "outputs": [], + "stateMutability": "payable", "type": "function" }, { @@ -218,19 +300,6 @@ "stateMutability": "payable", "type": "function" }, - { - "inputs": [], - "name": "claimDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -294,6 +363,38 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "epochAt", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochNow", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "epochPeriod", @@ -307,6 +408,13 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "executeSequencerLimitDecreaseRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -323,12 +431,17 @@ }, { "internalType": "uint32", - "name": "timestamp", + "name": "timestampClaimed", "type": "uint32" }, { "internalType": "uint32", - "name": "blocknumber", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", "type": "uint32" }, { @@ -385,51 +498,13 @@ "type": "function" }, { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "stateRoot", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "claimer", - "type": "address" - }, - { - "internalType": "uint32", - "name": "timestamp", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "blocknumber", - "type": "uint32" - }, - { - "internalType": "enum Party", - "name": "honest", - "type": "uint8" - }, - { - "internalType": "address", - "name": "challenger", - "type": "address" - } - ], - "internalType": "struct Claim", - "name": "_claim", - "type": "tuple" - } - ], - "name": "passedTest", + "inputs": [], + "name": "minChallengePeriod", "outputs": [ { - "internalType": "bool", - "name": "testPassed", - "type": "bool" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], "stateMutability": "view", @@ -480,12 +555,17 @@ }, { "internalType": "uint32", - "name": "timestamp", + "name": "timestampClaimed", "type": "uint32" }, { "internalType": "uint32", - "name": "blocknumber", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", "type": "uint32" }, { @@ -539,12 +619,12 @@ }, { "inputs": [], - "name": "stateRoot", + "name": "sequencerLimit", "outputs": [ { - "internalType": "bytes32", + "internalType": "uint256", "name": "", - "type": "bytes32" + "type": "uint256" } ], "stateMutability": "view", @@ -552,11 +632,16 @@ }, { "inputs": [], - "name": "timeoutEpochs", + "name": "sequencerLimitDecreaseRequest", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "requestedSequencerLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", "type": "uint256" } ], @@ -567,7 +652,7 @@ "inputs": [ { "internalType": "uint256", - "name": "epoch", + "name": "_epoch", "type": "uint256" }, { @@ -584,12 +669,17 @@ }, { "internalType": "uint32", - "name": "timestamp", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", "type": "uint32" }, { "internalType": "uint32", - "name": "blocknumber", + "name": "blocknumberVerification", "type": "uint32" }, { @@ -608,7 +698,40 @@ "type": "tuple" } ], - "name": "validateSnapshot", + "name": "startVerification", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stateRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timeoutEpochs", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updateSequencerLimit", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -647,12 +770,72 @@ }, { "internalType": "uint32", - "name": "timestamp", + "name": "timestampClaimed", "type": "uint32" }, { "internalType": "uint32", - "name": "blocknumber", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "verifySnapshot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", "type": "uint32" }, { @@ -697,12 +880,17 @@ }, { "internalType": "uint32", - "name": "timestamp", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", "type": "uint32" }, { "internalType": "uint32", - "name": "blocknumber", + "name": "blocknumberVerification", "type": "uint32" }, { @@ -747,12 +935,17 @@ }, { "internalType": "uint32", - "name": "timestamp", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", "type": "uint32" }, { "internalType": "uint32", - "name": "blocknumber", + "name": "blocknumberVerification", "type": "uint32" }, { @@ -797,12 +990,17 @@ }, { "internalType": "uint32", - "name": "timestamp", + "name": "timestampClaimed", "type": "uint32" }, { "internalType": "uint32", - "name": "blocknumber", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", "type": "uint32" }, { @@ -827,19 +1025,32 @@ "type": "function" } ], - "transactionHash": "0xa450c2b14e8b8115b73ed7d3c50df227c82773559b2a2f52ac7e8b6f93d7cda8", + "transactionHash": "0x4d92349ef29cd1ffece5eda752ec94ccaa1a4842ff6beb84f37c55f7faa7acaa", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x9235A379950B9f01fb3e2961C06912A96DCcef0e", - "transactionIndex": 10, - "gasUsed": "1901118", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xeb32a690a77950b7793a1d47aa1666cd15fec5d677fb1276bae83ed734400ad3", - "transactionHash": "0xa450c2b14e8b8115b73ed7d3c50df227c82773559b2a2f52ac7e8b6f93d7cda8", - "logs": [], - "blockNumber": 9050723, - "cumulativeGasUsed": "2528110", + "contractAddress": "0xB32A65B4b0b18d231BA88c3E37F7f600683baD6D", + "transactionIndex": 48, + "gasUsed": "2205665", + "logsBloom": "0x00000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000002280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xd0432acc65704603b2c0c6b20b70eb297c03a618dc2c945b7c63c9bedbf8f97b", + "transactionHash": "0x4d92349ef29cd1ffece5eda752ec94ccaa1a4842ff6beb84f37c55f7faa7acaa", + "logs": [ + { + "transactionIndex": 48, + "blockNumber": 9181945, + "transactionHash": "0x4d92349ef29cd1ffece5eda752ec94ccaa1a4842ff6beb84f37c55f7faa7acaa", + "address": "0xB32A65B4b0b18d231BA88c3E37F7f600683baD6D", + "topics": [ + "0x5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000015180", + "logIndex": 151, + "blockHash": "0xd0432acc65704603b2c0c6b20b70eb297c03a618dc2c945b7c63c9bedbf8f97b" + } + ], + "blockNumber": 9181945, + "cumulativeGasUsed": "10656379", "status": 1, "byzantium": true }, @@ -848,17 +1059,17 @@ 1800, 0, 10000000000000, - 0, - "0xA3FefC6FeE3fc66B9d9a8BEE794736ab71a74c55", - "0xC1Ebd02f738644983b6C4B2d440b8e77DdE276Bd", + "0x3aD2FfA09823de2f98F2f0aBA832a6b83521E2E6", + "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", 10000000000000 ], - "numDeployments": 7, - "solcInputHash": "de8d57bf51a0c5c580c54a12eae49416", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochClaimDelay\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEthDevnet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"passedTest\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"testPassed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"validateSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumber\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watcher check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}}},\"kind\":\"dev\",\"methods\":{\"challenge(uint256,(bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_bridge\":\"The address of the Arbitrum bridge contract on Ethereum.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochClaimDelay\":\"The number of epochs a claim can be submitted for.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEthDevnet\":\"The address of the devnet vea inbox on Arbitrum to Ethereum.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"passedTest((bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"Claim passed censorship test\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"testPassed\":\"True if the claim passed the censorship test.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded with header from VeaInbox.\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"validateSnapshot(uint256,(bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"notice\":\"Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":\"VeaOutboxArbToEthDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@jaybuidl, @shotaronowhere]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/**\\n * Vea Outbox From Arbitrum to Ethereum.\\n * Note: This contract is deployed on Ethereum.\\n */\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable challengePeriod; // Time window to challenge a claim.\\n uint256 public immutable claimDelay; // Can only claim for epochs after this delay (seconds)\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot;\\n uint256 public latestVerifiedEpoch;\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /**\\n * @dev Watcher check this event to challenge fraud.\\n * @param _claimer The address of the claimer.\\n * @param _stateRoot The state root of the claim.\\n */\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /**\\n * @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n * @param _epoch The epoch associated with the challenged claim.\\n * @param _challenger The address of the challenger.\\n */\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /**\\n * @dev This event indicates that a message has been relayed.\\n * @param _msgId The msgId of the message that was relayed.\\n */\\n event MessageRelayed(uint64 _msgId);\\n\\n /**\\n * @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n * @param _epoch The epoch that was verified.\\n */\\n event Verified(uint256 _epoch);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod <= latestVerifiedEpoch + timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod > latestVerifiedEpoch + timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /**\\n * @dev Constructor.\\n * Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n * @param _deposit The deposit amount to submit a claim in wei.\\n * @param _epochPeriod The duration of each epoch.\\n * @param _challengePeriod The duration of the period allowing to challenge a claim.\\n * @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n * @param _claimDelay The number of epochs after which the claim can be submitted.\\n * @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n * @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n * @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n */\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n uint256 _claimDelay,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n challengePeriod = _challengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n claimDelay = _claimDelay;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n\\n // claimDelay should never be set this high, but we santiy check to prevent underflow\\n require(claimDelay <= block.timestamp, \\\"Invalid epochClaimDelay.\\\");\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /**\\n * @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n * @param _epoch The epoch for which the claim is made.\\n * @param _stateRoot The state root to claim.\\n */\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require((block.timestamp - claimDelay) / epochPeriod == _epoch, \\\"Invalid epoch.\\\");\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n blocknumber: uint32(block.number),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n }\\n\\n /**\\n * @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n * @param _epoch The epoch of the claim to challenge.\\n * @param _claim The claim associated with the epoch.\\n */\\n function challenge(uint256 _epoch, Claim memory _claim) external payable virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n\\n unchecked {\\n require(block.timestamp < uint256(_claim.timestamp) + challengePeriod, \\\"Challenge period elapsed.\\\");\\n }\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n }\\n\\n /**\\n * @dev Resolves the optimistic claim for '_epoch'.\\n * @param _epoch The epoch of the optimistic claim.\\n * @param _claim The claim associated with the epoch.\\n */\\n function validateSnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n unchecked {\\n require(_claim.timestamp + challengePeriod < block.timestamp, \\\"Challenge period has not yet elapsed.\\\");\\n require(\\n // expected blocks <= actual blocks + maxMissingBlocks\\n uint256(_claim.blocknumber) + (block.timestamp - uint256(_claim.timestamp)) / SLOT_TIME <=\\n block.number + maxMissingBlocks,\\n \\\"Too many missing blocks. Possible censorship attack. Use canonical bridge.\\\"\\n );\\n }\\n\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /**\\n * Note: Access restricted to arbitrum bridge.\\n * @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n * @param _epoch The epoch to verify.\\n * @param _stateRoot The true state root for the epoch.\\n * @param _claim The claim associated with the epoch\\n */\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInbox only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim) && _claim.honest == Party.None) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /**\\n * @dev Verifies and relays the message. UNTRUSTED.\\n * @param _proof The merkle proof to prove the message.\\n * @param _msgId The zero based index of the message in the inbox.\\n * @param _to The address of the contract on Ethereum to call.\\n * @param _message The message encoded with header from VeaInbox.\\n */\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /**\\n * @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n * @param _epoch The epoch associated with the claim deposit to withraw.\\n * @param _claim The claim associated with the epoch.\\n */\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /**\\n * @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n * @param _epoch The epoch associated with the challenge deposit to withraw.\\n * @param _claim The claim associated with the epoch.\\n */\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /**\\n * @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n * @param _epoch The epoch associated with the claim deposit to withraw.\\n * @param _claim The claim associated with the epoch.\\n */\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /**\\n * @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n * @param _epoch The epoch associated with the claim deposit to withraw.\\n * @param _claim The claim associated with the epoch.\\n */\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /**\\n * @dev Hashes the claim.\\n * @param _claim The claim to hash.\\n * @return hashedClaim The hash of the claim.\\n */\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestamp,\\n _claim.blocknumber,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /**\\n * @dev Claim passed censorship test\\n * @param _claim The claim to test.\\n * @return testPassed True if the claim passed the censorship test.\\n */\\n function passedTest(Claim calldata _claim) external view returns (bool testPassed) {\\n uint256 expectedBlocks = uint256(_claim.blocknumber) + (block.timestamp - uint256(_claim.timestamp)) / SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n testPassed = (expectedBlocks <= actualBlocks + maxMissingBlocks);\\n }\\n}\\n\",\"keccak256\":\"0x18a1fe9cdf31d1076d303a66249f6b32602649a0a40d7175aaebf4440f112728\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x4087f2b5f4e9d2cdb2ebd352ba187f343c9c3ca7b20512b9d54ccf99a06692f5\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x8f4b4815b49b6f5cea5c75ccd32a5166d04c398143c683049ffba35c051258fb\"},\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@jaybuidl, @shotaronowhere]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToEth/VeaOutboxArbToEth.sol\\\";\\n\\n/**\\n * Vea Outbox From ArbitrumGoerli to Goerli.\\n * Note: This contract is deployed on Goerli.\\n * Note: This contract is permissioned for developer testing (devnet).\\n */\\ncontract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth {\\n\\n address public devnetOperator; // permissioned devnet operator\\n\\n /** \\n * @dev Requires that the sender is the devnet operator. \\n */\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender); \\n _;\\n }\\n\\n /**\\n * @dev Changes the devnet operator.\\n * @param _devnetOperator The new testnet operator.\\n */\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator{\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /**\\n * @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n * @param _epoch The epoch for which the claim is made.\\n * @param _stateRoot The state root to claim.\\n */\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require((block.timestamp - claimDelay) / epochPeriod == _epoch, \\\"Invalid epoch.\\\");\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n blocknumber: uint32(block.number),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n }\\n\\n /**\\n * @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n * @param _epoch The epoch of the claim to challenge.\\n * @param _claim The claim associated with the epoch.\\n */\\n function challenge(uint256 _epoch, Claim memory _claim) external payable override onlyByDevnetOperator{\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n\\n unchecked {\\n require(block.timestamp < uint256(_claim.timestamp) + challengePeriod, \\\"Challenge period elapsed.\\\");\\n }\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n }\\n\\n /**\\n * @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n * @param _claim The claim associated with the epoch.\\n * @param _epoch The epoch associated with the claim deposit to withraw.\\n */\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /**\\n * @dev Resolves the optimistic claim for '_epoch'.\\n * @param epoch The epoch of the optimistic claim.\\n * @param _claim The claim associated with the epoch.\\n */\\n function validateSnapshot(uint256 epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n unchecked {\\n require(_claim.timestamp + challengePeriod <= block.timestamp, \\\"Challenge period has not yet elapsed.\\\");\\n require(\\n // expected blocks <= actual blocks + maxMissingBlocks\\n uint256(_claim.blocknumber) + (block.timestamp - uint256(_claim.timestamp)) / SLOT_TIME <=\\n block.number + maxMissingBlocks,\\n \\\"Too many missing blocks. Possible censorship attack. Use canonical bridge.\\\"\\n );\\n }\\n\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[epoch] = hashClaim(_claim);\\n }\\n\\n /**\\n * @dev Testnet operator utility function to claim, validate and withdraw.\\n * @param _epoch The epoch for which the claim is made.\\n * @param _stateroot The state root to claim.\\n */\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n validateSnapshot(\\n _epoch,\\n Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n blocknumber: uint32(block.number),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n withdrawClaimDeposit(\\n _epoch,\\n Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n blocknumber: uint32(block.number),\\n honest: Party.Claimer,\\n challenger: address(0)\\n })\\n );\\n }\\n\\n /**\\n * @dev Constructor.\\n * @param _deposit The deposit amount to submit a claim in wei.\\n * @param _epochPeriod The duration of each epoch.\\n * @param _challengePeriod The duration of the period allowing to challenge a claim.\\n * @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n * @param _epochClaimDelay The number of epochs a claim can be submitted for.\\n * @param _veaInboxArbToEthDevnet The address of the devnet vea inbox on Arbitrum to Ethereum.\\n * @param _bridge The address of the Arbitrum bridge contract on Ethereum.\\n * @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n */\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n uint256 _epochClaimDelay,\\n address _veaInboxArbToEthDevnet,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n )\\n VeaOutboxArbToEth(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _epochClaimDelay,\\n _veaInboxArbToEthDevnet,\\n _bridge,\\n _maxMissingBlocks\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x8531b22520f32d44cac0750b3671724f39c22513ff048bf0e120e3079e720c1e\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@jaybuidl, @shotaronowhere]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/**\\n * @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\n */\\ninterface IVeaOutboxOnL1 {\\n /**\\n * Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n * @dev Verifies and relays the message.\\n * @param _proof The merkle proof to prove the message.\\n * @param _msgId The zero based index of the message in the inbox.\\n * @param _to The address to send the message to.\\n * @param _message The message to relay.\\n */\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /**\\n * Note: Access restricted to canonical bridge.\\n * @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n * @param _epoch The epoch to verify.\\n * @param _stateRoot The true state root for the epoch.\\n * @param _claim The claim associated with the epoch.\\n */\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x0f96c2344dcdf78dc89359ba72e281a28cf8e47368eabf4bebc9a648ffc35163\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/**\\n * @authors: [@jaybuidl, @shotaronowhere]\\n * @reviewers: []\\n * @auditors: []\\n * @bounties: []\\n * @deployments: []\\n */\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestamp;\\n uint32 blocknumber;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1bdda50afbf5f966278a867e7149397ed820de658c15dda4266e70c314df17d2\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101c06040523480156200001257600080fd5b506040516200240038038062002400833981016040819052620000359162000162565b60c08890526101208790526101408690526101808590526101608490526001600160a01b0380841660a05282166080526101a0819052878787878787878762000080600289620001ea565b60e0819052620000928960026200020d565b6200009e91906200022d565b6101005261012051600190620000b59042620001ea565b620000c191906200022d565b600155610160514210156200011c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c69642065706f6368436c61696d44656c61792e0000000000000000604482015260640160405180910390fd5b5050600480546001600160a01b0319163317905550620002439c50505050505050505050505050565b80516001600160a01b03811681146200015d57600080fd5b919050565b600080600080600080600080610100898b0312156200018057600080fd5b8851975060208901519650604089015195506060890151945060808901519350620001ae60a08a0162000145565b9250620001be60c08a0162000145565b915060e089015190509295985092959890939650565b634e487b7160e01b600052601160045260246000fd5b6000826200020857634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620002275762000227620001d4565b92915050565b81810381811115620002275762000227620001d4565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516120926200036e600039600081816103e9015281816105d901526113b801526000818161041d01528181610cb6015281816112630152818161154b01526117570152600081816101cd015261084201526000818161054001528181611195015261132f0152600081816104510152818161082101528181610cdb0152818161128801528181611570015261177c01526000818161070e0152611ade0152600081816106c60152611a8b0152600081816104c50152818161075e015281816107b001528181611125015281816116b50152818161171c01526118c20152600081816102c70152610db70152600081816104f901528181610d550152610de101526120926000f3fe6080604052600436106101815760003560e01c80639588eca2116100d1578063bd7df3f91161008a578063e78cea9211610064578063e78cea92146104e7578063eedcf2a91461051b578063f3f480d91461052e578063f939bad91461056257600080fd5b8063bd7df3f914610473578063c299be3314610493578063d0e30db0146104b357600080fd5b80639588eca21461038e578063a53d3c26146103a4578063a557d918146103b7578063aa22a1c6146103d7578063b044397e1461040b578063b5b7a1841461043f57600080fd5b806331ddf7431161013e5780637ba7900c116101185780637ba7900c146103015780638a619a71146103215780638ad3a8f71461034157806390df63b71461036157600080fd5b806331ddf7431461027557806334c75d721461029557806369cd250d146102b557600080fd5b806310e8f6bf146101865780631c8ec299146101bb5780632415855b146101fd5780632639c0601461021f57806327ee6bdd1461024c57806331d1445714610262575b600080fd5b34801561019257600080fd5b506101a66101a1366004611b33565b610582565b60405190151581526020015b60405180910390f35b3480156101c757600080fd5b506101ef7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101b2565b34801561020957600080fd5b5061021d610218366004611c4a565b610609565b005b34801561022b57600080fd5b506101ef61023a366004611c77565b60026020526000908152604090205481565b34801561025857600080fd5b506101ef60015481565b61021d610270366004611c90565b610797565b34801561028157600080fd5b5061021d610290366004611d13565b6109c7565b3480156102a157600080fd5b506101ef6102b0366004611dd5565b610c67565b3480156102c157600080fd5b506102e97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101b2565b34801561030d57600080fd5b5061021d61031c366004611df1565b610cb4565b34801561032d57600080fd5b5061021d61033c366004611e28565b610fe9565b34801561034d57600080fd5b506004546102e9906001600160a01b031681565b34801561036d57600080fd5b506101ef61037c366004611c77565b60036020526000908152604090205481565b34801561039a57600080fd5b506101ef60005481565b61021d6103b2366004611c4a565b61107c565b3480156103c357600080fd5b5061021d6103d2366004611c4a565b611261565b3480156103e357600080fd5b506101ef7f000000000000000000000000000000000000000000000000000000000000000081565b34801561041757600080fd5b506101ef7f000000000000000000000000000000000000000000000000000000000000000081565b34801561044b57600080fd5b506101ef7f000000000000000000000000000000000000000000000000000000000000000081565b34801561047f57600080fd5b5061021d61048e366004611c4a565b611549565b34801561049f57600080fd5b5061021d6104ae366004611c4a565b611755565b3480156104bf57600080fd5b506101ef7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104f357600080fd5b506102e97f000000000000000000000000000000000000000000000000000000000000000081565b61021d610529366004611c90565b61190e565b34801561053a57600080fd5b506101ef7f000000000000000000000000000000000000000000000000000000000000000081565b34801561056e57600080fd5b5061021d61057d366004611e45565b6119d4565b600080600c6105976060850160408601611e69565b6105a79063ffffffff1642611e9a565b6105b19190611ec9565b6105c16080850160608601611e69565b63ffffffff166105d19190611eeb565b9050436105fe7f000000000000000000000000000000000000000000000000000000000000000082611eeb565b909111159392505050565b61061281610c67565b600083815260026020526040902054146106475760405162461bcd60e51b815260040161063e90611efe565b60405180910390fd5b60018160800151600281111561065f5761065f611f26565b1461069c5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b604482015260640161063e565b60008281526002602052604081205560a08101516001600160a01b031615610748576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b6004546001600160a01b031633146107ae57600080fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561081e5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e0000000000604482015260640161063e565b817f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000042038161087057610870611eb3565b04146108af5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21032b837b1b41760911b604482015260640161063e565b806108cc5760405162461bcd60e51b815260040161063e90611efe565b6000828152600260205260409020541561091e5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161063e565b61097b6040518060c00160405280838152602001336001600160a01b031681526020014263ffffffff1681526020014363ffffffff1681526020016000600281111561096c5761096c611f26565b81526000602090910152610c67565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91015b60405180910390a25050565b60408510610a095760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161063e565b600084848484604051602001610a229493929190611f3c565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610aa2576000888883818110610a6457610a64611f7e565b90506020020135905082811115610a8957826000528060205260406000209250610a99565b8060005282602052604060002092505b50600101610a48565b508060005414610ae55760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161063e565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610b5a5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161063e565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610b8a9089908990611f94565b6000604051808303816000865af19150503d8060008114610bc7576040519150601f19603f3d011682016040523d82523d6000602084013e610bcc565b606091505b5050905080610c1d5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161063e565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b80516020808301516040808501516060860151608087015160a08801519351600097610c97979096959101611fa4565b604051602081830303815290604052805190602001209050919050565b7f0000000000000000000000000000000000000000000000000000000000000000600154017f00000000000000000000000000000000000000000000000000000000000000004281610d0857610d08611eb3565b041115610d4a5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161063e565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610db55760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b604482015260640161063e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e619190612024565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec29190612024565b6001600160a01b031614610f095760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b604482015260640161063e565b60015483118015610f1957508115155b15610f5c57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610f6581610c67565b600084815260026020526040902054148015610f965750600081608001516002811115610f9457610f94611f26565b145b15610fe4578051829003610fb05760016080820152610fcb565b60a08101516001600160a01b031615610fcb57600260808201525b610fd481610c67565b6000848152600260205260409020555b505050565b6004546001600160a01b0316331461100057600080fd5b6004546001600160a01b0316331461105a5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f720000000000000000604482015260640161063e565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b0316331461109357600080fd5b61109c81610c67565b600083815260026020526040902054146110c85760405162461bcd60e51b815260040161063e90611efe565b60a08101516001600160a01b0316156111235760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161063e565b7f00000000000000000000000000000000000000000000000000000000000000003410156111935760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e00604482015260640161063e565b7f0000000000000000000000000000000000000000000000000000000000000000816040015163ffffffff1601421061120e5760405162461bcd60e51b815260206004820152601960248201527f4368616c6c656e676520706572696f6420656c61707365642e00000000000000604482015260640161063e565b3360a082015261121d81610c67565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791016109bb565b7f0000000000000000000000000000000000000000000000000000000000000000600154017f000000000000000000000000000000000000000000000000000000000000000042816112b5576112b5611eb3565b0411156112f75760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161063e565b61130081610c67565b6000838152600260205260409020541461132c5760405162461bcd60e51b815260040161063e90611efe565b427f0000000000000000000000000000000000000000000000000000000000000000826040015163ffffffff160111156113b65760405162461bcd60e51b815260206004820152602560248201527f4368616c6c656e676520706572696f6420686173206e6f742079657420656c616044820152643839b2b21760d91b606482015260840161063e565b7f00000000000000000000000000000000000000000000000000000000000000004301600c826040015163ffffffff164203816113f5576113f5611eb3565b04826060015163ffffffff160111156114895760405162461bcd60e51b815260206004820152604a60248201527f546f6f206d616e79206d697373696e6720626c6f636b732e20506f737369626c60448201527f652063656e736f72736869702061747461636b2e205573652063616e6f6e696360648201526930b610313934b233b29760b11b608482015260a40161063e565b60a08101516001600160a01b0316156114db5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161063e565b60015482111561152357600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b6001608082015261153381610c67565b6000928352600260205260409092209190915550565b7f0000000000000000000000000000000000000000000000000000000000000000600154017f0000000000000000000000000000000000000000000000000000000000000000428161159d5761159d611eb3565b04116115dd5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161063e565b6115e681610c67565b600083815260026020526040902054146116125760405162461bcd60e51b815260040161063e90611efe565b60008160800151600281111561162a5761162a611f26565b146116695760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161063e565b60a08101516001600160a01b0316156107935760208101516001600160a01b03166116ed5760008281526002602052604080822082905560a083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60a081018051600090915261170182610c67565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600154017f000000000000000000000000000000000000000000000000000000000000000042816117a9576117a9611eb3565b04116117e95760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161063e565b6117f281610c67565b6000838152600260205260409020541461181e5760405162461bcd60e51b815260040161063e90611efe565b60008160800151600281111561183657611836611f26565b146118755760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161063e565b60208101516001600160a01b0316156107935760a08101516001600160a01b03166118fa5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b602081018051600090915261170182610c67565b6119188282610797565b611976826040518060c00160405280848152602001336001600160a01b031681526020014263ffffffff1681526020014363ffffffff1681526020016000600281111561196757611967611f26565b81526000602090910152611261565b610793826040518060c00160405280848152602001336001600160a01b031681526020014263ffffffff1681526020014363ffffffff168152602001600160028111156119c5576119c5611f26565b81526000602090910152610609565b6119e66102b036839003830183611dd5565b60008381526002602052604090205414611a125760405162461bcd60e51b815260040161063e90611efe565b6002611a2460a0830160808401612041565b6002811115611a3557611a35611f26565b14611a765760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b604482015260640161063e565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150611ad093505060c0840191505060a08301611e28565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b600060c08284031215611b2d57600080fd5b50919050565b600060c08284031215611b4557600080fd5b611b4f8383611b1b565b9392505050565b6001600160a01b0381168114611b6b57600080fd5b50565b8035611b7981611b56565b919050565b803563ffffffff81168114611b7957600080fd5b803560038110611b7957600080fd5b600060c08284031215611bb357600080fd5b60405160c0810181811067ffffffffffffffff82111715611be457634e487b7160e01b600052604160045260246000fd5b60405282358152905080611bfa60208401611b6e565b6020820152611c0b60408401611b7e565b6040820152611c1c60608401611b7e565b6060820152611c2d60808401611b92565b6080820152611c3e60a08401611b6e565b60a08201525092915050565b60008060e08385031215611c5d57600080fd5b82359150611c6e8460208501611ba1565b90509250929050565b600060208284031215611c8957600080fd5b5035919050565b60008060408385031215611ca357600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611b7957600080fd5b60008083601f840112611cdc57600080fd5b50813567ffffffffffffffff811115611cf457600080fd5b602083019150836020828501011115611d0c57600080fd5b9250929050565b60008060008060008060808789031215611d2c57600080fd5b863567ffffffffffffffff80821115611d4457600080fd5b818901915089601f830112611d5857600080fd5b813581811115611d6757600080fd5b8a60208260051b8501011115611d7c57600080fd5b60208301985080975050611d9260208a01611cb2565b9550611da060408a01611b6e565b94506060890135915080821115611db657600080fd5b50611dc389828a01611cca565b979a9699509497509295939492505050565b600060c08284031215611de757600080fd5b611b4f8383611ba1565b60008060006101008486031215611e0757600080fd5b8335925060208401359150611e1f8560408601611ba1565b90509250925092565b600060208284031215611e3a57600080fd5b8135611b4f81611b56565b60008060e08385031215611e5857600080fd5b82359150611c6e8460208501611b1b565b600060208284031215611e7b57600080fd5b611b4f82611b7e565b634e487b7160e01b600052601160045260246000fd5b81810381811115611ead57611ead611e84565b92915050565b634e487b7160e01b600052601260045260246000fd5b600082611ee657634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115611ead57611ead611e84565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052602160045260246000fd5b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b86815260006bffffffffffffffffffffffff19808860601b16602084015263ffffffff60e01b808860e01b166034850152808760e01b1660388501525060038510611fff57634e487b7160e01b600052602160045260246000fd5b60f89490941b603c8301525060609190911b909116603d820152605101949350505050565b60006020828403121561203657600080fd5b8151611b4f81611b56565b60006020828403121561205357600080fd5b611b4f82611b9256fea2646970667358221220c58db01aa6f8f437a1c44fc8c56245e951bedd4f4b6ec3ce4d070476cca0e52064736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101815760003560e01c80639588eca2116100d1578063bd7df3f91161008a578063e78cea9211610064578063e78cea92146104e7578063eedcf2a91461051b578063f3f480d91461052e578063f939bad91461056257600080fd5b8063bd7df3f914610473578063c299be3314610493578063d0e30db0146104b357600080fd5b80639588eca21461038e578063a53d3c26146103a4578063a557d918146103b7578063aa22a1c6146103d7578063b044397e1461040b578063b5b7a1841461043f57600080fd5b806331ddf7431161013e5780637ba7900c116101185780637ba7900c146103015780638a619a71146103215780638ad3a8f71461034157806390df63b71461036157600080fd5b806331ddf7431461027557806334c75d721461029557806369cd250d146102b557600080fd5b806310e8f6bf146101865780631c8ec299146101bb5780632415855b146101fd5780632639c0601461021f57806327ee6bdd1461024c57806331d1445714610262575b600080fd5b34801561019257600080fd5b506101a66101a1366004611b33565b610582565b60405190151581526020015b60405180910390f35b3480156101c757600080fd5b506101ef7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101b2565b34801561020957600080fd5b5061021d610218366004611c4a565b610609565b005b34801561022b57600080fd5b506101ef61023a366004611c77565b60026020526000908152604090205481565b34801561025857600080fd5b506101ef60015481565b61021d610270366004611c90565b610797565b34801561028157600080fd5b5061021d610290366004611d13565b6109c7565b3480156102a157600080fd5b506101ef6102b0366004611dd5565b610c67565b3480156102c157600080fd5b506102e97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101b2565b34801561030d57600080fd5b5061021d61031c366004611df1565b610cb4565b34801561032d57600080fd5b5061021d61033c366004611e28565b610fe9565b34801561034d57600080fd5b506004546102e9906001600160a01b031681565b34801561036d57600080fd5b506101ef61037c366004611c77565b60036020526000908152604090205481565b34801561039a57600080fd5b506101ef60005481565b61021d6103b2366004611c4a565b61107c565b3480156103c357600080fd5b5061021d6103d2366004611c4a565b611261565b3480156103e357600080fd5b506101ef7f000000000000000000000000000000000000000000000000000000000000000081565b34801561041757600080fd5b506101ef7f000000000000000000000000000000000000000000000000000000000000000081565b34801561044b57600080fd5b506101ef7f000000000000000000000000000000000000000000000000000000000000000081565b34801561047f57600080fd5b5061021d61048e366004611c4a565b611549565b34801561049f57600080fd5b5061021d6104ae366004611c4a565b611755565b3480156104bf57600080fd5b506101ef7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104f357600080fd5b506102e97f000000000000000000000000000000000000000000000000000000000000000081565b61021d610529366004611c90565b61190e565b34801561053a57600080fd5b506101ef7f000000000000000000000000000000000000000000000000000000000000000081565b34801561056e57600080fd5b5061021d61057d366004611e45565b6119d4565b600080600c6105976060850160408601611e69565b6105a79063ffffffff1642611e9a565b6105b19190611ec9565b6105c16080850160608601611e69565b63ffffffff166105d19190611eeb565b9050436105fe7f000000000000000000000000000000000000000000000000000000000000000082611eeb565b909111159392505050565b61061281610c67565b600083815260026020526040902054146106475760405162461bcd60e51b815260040161063e90611efe565b60405180910390fd5b60018160800151600281111561065f5761065f611f26565b1461069c5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b604482015260640161063e565b60008281526002602052604081205560a08101516001600160a01b031615610748576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b6004546001600160a01b031633146107ae57600080fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561081e5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e0000000000604482015260640161063e565b817f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000042038161087057610870611eb3565b04146108af5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21032b837b1b41760911b604482015260640161063e565b806108cc5760405162461bcd60e51b815260040161063e90611efe565b6000828152600260205260409020541561091e5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161063e565b61097b6040518060c00160405280838152602001336001600160a01b031681526020014263ffffffff1681526020014363ffffffff1681526020016000600281111561096c5761096c611f26565b81526000602090910152610c67565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91015b60405180910390a25050565b60408510610a095760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161063e565b600084848484604051602001610a229493929190611f3c565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610aa2576000888883818110610a6457610a64611f7e565b90506020020135905082811115610a8957826000528060205260406000209250610a99565b8060005282602052604060002092505b50600101610a48565b508060005414610ae55760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161063e565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610b5a5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161063e565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610b8a9089908990611f94565b6000604051808303816000865af19150503d8060008114610bc7576040519150601f19603f3d011682016040523d82523d6000602084013e610bcc565b606091505b5050905080610c1d5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161063e565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b80516020808301516040808501516060860151608087015160a08801519351600097610c97979096959101611fa4565b604051602081830303815290604052805190602001209050919050565b7f0000000000000000000000000000000000000000000000000000000000000000600154017f00000000000000000000000000000000000000000000000000000000000000004281610d0857610d08611eb3565b041115610d4a5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161063e565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610db55760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b604482015260640161063e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e619190612024565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec29190612024565b6001600160a01b031614610f095760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b604482015260640161063e565b60015483118015610f1957508115155b15610f5c57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610f6581610c67565b600084815260026020526040902054148015610f965750600081608001516002811115610f9457610f94611f26565b145b15610fe4578051829003610fb05760016080820152610fcb565b60a08101516001600160a01b031615610fcb57600260808201525b610fd481610c67565b6000848152600260205260409020555b505050565b6004546001600160a01b0316331461100057600080fd5b6004546001600160a01b0316331461105a5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f720000000000000000604482015260640161063e565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b0316331461109357600080fd5b61109c81610c67565b600083815260026020526040902054146110c85760405162461bcd60e51b815260040161063e90611efe565b60a08101516001600160a01b0316156111235760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161063e565b7f00000000000000000000000000000000000000000000000000000000000000003410156111935760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e00604482015260640161063e565b7f0000000000000000000000000000000000000000000000000000000000000000816040015163ffffffff1601421061120e5760405162461bcd60e51b815260206004820152601960248201527f4368616c6c656e676520706572696f6420656c61707365642e00000000000000604482015260640161063e565b3360a082015261121d81610c67565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791016109bb565b7f0000000000000000000000000000000000000000000000000000000000000000600154017f000000000000000000000000000000000000000000000000000000000000000042816112b5576112b5611eb3565b0411156112f75760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161063e565b61130081610c67565b6000838152600260205260409020541461132c5760405162461bcd60e51b815260040161063e90611efe565b427f0000000000000000000000000000000000000000000000000000000000000000826040015163ffffffff160111156113b65760405162461bcd60e51b815260206004820152602560248201527f4368616c6c656e676520706572696f6420686173206e6f742079657420656c616044820152643839b2b21760d91b606482015260840161063e565b7f00000000000000000000000000000000000000000000000000000000000000004301600c826040015163ffffffff164203816113f5576113f5611eb3565b04826060015163ffffffff160111156114895760405162461bcd60e51b815260206004820152604a60248201527f546f6f206d616e79206d697373696e6720626c6f636b732e20506f737369626c60448201527f652063656e736f72736869702061747461636b2e205573652063616e6f6e696360648201526930b610313934b233b29760b11b608482015260a40161063e565b60a08101516001600160a01b0316156114db5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161063e565b60015482111561152357600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b6001608082015261153381610c67565b6000928352600260205260409092209190915550565b7f0000000000000000000000000000000000000000000000000000000000000000600154017f0000000000000000000000000000000000000000000000000000000000000000428161159d5761159d611eb3565b04116115dd5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161063e565b6115e681610c67565b600083815260026020526040902054146116125760405162461bcd60e51b815260040161063e90611efe565b60008160800151600281111561162a5761162a611f26565b146116695760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161063e565b60a08101516001600160a01b0316156107935760208101516001600160a01b03166116ed5760008281526002602052604080822082905560a083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60a081018051600090915261170182610c67565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600154017f000000000000000000000000000000000000000000000000000000000000000042816117a9576117a9611eb3565b04116117e95760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161063e565b6117f281610c67565b6000838152600260205260409020541461181e5760405162461bcd60e51b815260040161063e90611efe565b60008160800151600281111561183657611836611f26565b146118755760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161063e565b60208101516001600160a01b0316156107935760a08101516001600160a01b03166118fa5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b602081018051600090915261170182610c67565b6119188282610797565b611976826040518060c00160405280848152602001336001600160a01b031681526020014263ffffffff1681526020014363ffffffff1681526020016000600281111561196757611967611f26565b81526000602090910152611261565b610793826040518060c00160405280848152602001336001600160a01b031681526020014263ffffffff1681526020014363ffffffff168152602001600160028111156119c5576119c5611f26565b81526000602090910152610609565b6119e66102b036839003830183611dd5565b60008381526002602052604090205414611a125760405162461bcd60e51b815260040161063e90611efe565b6002611a2460a0830160808401612041565b6002811115611a3557611a35611f26565b14611a765760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b604482015260640161063e565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150611ad093505060c0840191505060a08301611e28565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b600060c08284031215611b2d57600080fd5b50919050565b600060c08284031215611b4557600080fd5b611b4f8383611b1b565b9392505050565b6001600160a01b0381168114611b6b57600080fd5b50565b8035611b7981611b56565b919050565b803563ffffffff81168114611b7957600080fd5b803560038110611b7957600080fd5b600060c08284031215611bb357600080fd5b60405160c0810181811067ffffffffffffffff82111715611be457634e487b7160e01b600052604160045260246000fd5b60405282358152905080611bfa60208401611b6e565b6020820152611c0b60408401611b7e565b6040820152611c1c60608401611b7e565b6060820152611c2d60808401611b92565b6080820152611c3e60a08401611b6e565b60a08201525092915050565b60008060e08385031215611c5d57600080fd5b82359150611c6e8460208501611ba1565b90509250929050565b600060208284031215611c8957600080fd5b5035919050565b60008060408385031215611ca357600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611b7957600080fd5b60008083601f840112611cdc57600080fd5b50813567ffffffffffffffff811115611cf457600080fd5b602083019150836020828501011115611d0c57600080fd5b9250929050565b60008060008060008060808789031215611d2c57600080fd5b863567ffffffffffffffff80821115611d4457600080fd5b818901915089601f830112611d5857600080fd5b813581811115611d6757600080fd5b8a60208260051b8501011115611d7c57600080fd5b60208301985080975050611d9260208a01611cb2565b9550611da060408a01611b6e565b94506060890135915080821115611db657600080fd5b50611dc389828a01611cca565b979a9699509497509295939492505050565b600060c08284031215611de757600080fd5b611b4f8383611ba1565b60008060006101008486031215611e0757600080fd5b8335925060208401359150611e1f8560408601611ba1565b90509250925092565b600060208284031215611e3a57600080fd5b8135611b4f81611b56565b60008060e08385031215611e5857600080fd5b82359150611c6e8460208501611b1b565b600060208284031215611e7b57600080fd5b611b4f82611b7e565b634e487b7160e01b600052601160045260246000fd5b81810381811115611ead57611ead611e84565b92915050565b634e487b7160e01b600052601260045260246000fd5b600082611ee657634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115611ead57611ead611e84565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052602160045260246000fd5b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b86815260006bffffffffffffffffffffffff19808860601b16602084015263ffffffff60e01b808860e01b166034850152808760e01b1660388501525060038510611fff57634e487b7160e01b600052602160045260246000fd5b60f89490941b603c8301525060609190911b909116603d820152605101949350505050565b60006020828403121561203657600080fd5b8151611b4f81611b56565b60006020828403121561205357600080fd5b611b4f82611b9256fea2646970667358221220c58db01aa6f8f437a1c44fc8c56245e951bedd4f4b6ec3ce4d070476cca0e52064736f6c63430008120033", + "numDeployments": 8, + "solcInputHash": "c9836c6cb024801f3104e49f87086294", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEthDevnet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"SequencerLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"SequencerLimitUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"SequencerLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerLimit\":\"The new sequencer limit requested.\"}},\"SequencerLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerLimit\":\"The new maxL2StateSyncDelay.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_bridge\":\"The address of the Arbitrum bridge contract on Ethereum.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEthDevnet\":\"The address of the devnet vea inbox on Arbitrum to Ethereum.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executeSequencerLimitDecreaseRequest()\":{\"details\":\"execute SequencerLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerLimit()\":{\"details\":\"Request to decrease the sequencerLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":\"VeaOutboxArbToEthDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerLimitDecreaseRequest; // Decreasing the sequencerLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerLimit The new maxL2StateSyncDelay.\\n event SequencerLimitUpdated(uint256 _newSequencerLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerLimit The new sequencer limit requested.\\n event SequencerLimitDecreaseRequested(uint256 _requestedSequencerLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updateSequencerLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerLimit.\\n function updateSequencerLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerLimit > sequencerLimit) {\\n // For sequencerLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerLimit = newSequencerLimit;\\n emit SequencerLimitUpdated(newSequencerLimit);\\n } else if (newSequencerLimit < sequencerLimit) {\\n require(sequencerLimitDecreaseRequest.timestamp == 0, \\\"Sequencer limit decrease request already pending.\\\");\\n\\n sequencerLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerLimit, \\n timestamp: block.timestamp\\n });\\n\\n emit SequencerLimitDecreaseRequested(newSequencerLimit);\\n }\\n }\\n\\n /// @dev execute SequencerLimitDecreaseRequest\\n function executeSequencerLimitDecreaseRequest() external {\\n require(sequencerLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerLimitDecreaseRequest.timestamp + sequencerLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerLimit = sequencerLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerLimit == requestedSequencerLimit) {\\n sequencerLimit = requestedSequencerLimit;\\n emit SequencerLimitUpdated(requestedSequencerLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerLimit) {\\n // Allow claims to be made within the sequencerLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x1a7affa8f2ca1bf2ef5b7c57a5a07215282875209008f7dceee9eecfa4906db3\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToEth/VeaOutboxArbToEth.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Goerli.\\n/// Note: This contract is deployed on Goerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(\\n _epoch,\\n claim\\n );\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(\\n _epoch,\\n claim\\n );\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(\\n _epoch,\\n claim\\n );\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEthDevnet The address of the devnet vea inbox on Arbitrum to Ethereum.\\n /// @param _bridge The address of the Arbitrum bridge contract on Ethereum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEthDevnet,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n )\\n VeaOutboxArbToEth(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _veaInboxArbToEthDevnet,\\n _bridge,\\n _maxMissingBlocks\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x6af5ea9e63d2e395cc709d8421e6b92438bed5691693ac9c50c125c664460543\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002a4438038062002a448339810160408190526200003591620002ee565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190528686868686868662000076620000ee565b620000836002886200036c565b60e0819052620000958860026200038f565b620000a19190620003af565b6101005261012051600190620000b890426200036c565b620000c49190620003af565b6001555050600780546001600160a01b0319163317905550620004219a5050505050505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000131573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001579190620003c5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000195573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001bb9190620003ea565b5092505050600454811115620002065760048190556040518181527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a150565b600454811015620002ce5760065415620002805760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527f08b771dddc6449625c7cd99bccdaf915b9c891fb6fa03695a71175b69e376ebb910160405180910390a15b50565b80516001600160a01b0381168114620002e957600080fd5b919050565b600080600080600080600060e0888a0312156200030a57600080fd5b875196506020880151955060408801519450606088015193506200033160808901620002d1565b92506200034160a08901620002d1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200038a57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620003a957620003a962000356565b92915050565b81810381811115620003a957620003a962000356565b600060208284031215620003d857600080fd5b620003e382620002d1565b9392505050565b600080600080608085870312156200040157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516124f56200054f600039600081816104870152611ea90152600081816104bb015281816108b2015281816116dd015281816118680152611a740152600081816105430152611e3d0152600081816104ef015281816108d601528181610bdf015281816115cb015281816117010152818161188c0152611a9801526000818161135801526114910152600081816113050152611449015260008181610577015281816106b2015281816108390152818161086601528181610e47015281816114e1015281816119d201528181611a390152611bdf01526000818161038201526109c001526000818161063d01528181610951015281816109ea01528181610d150152611c2f01526124f56000f3fe6080604052600436106101e35760003560e01c806390df63b711610102578063c2114a1611610095578063dd5fdeaa11610064578063dd5fdeaa146105e9578063df19e6ff146105fe578063e78cea921461062b578063eedcf2a91461065f57600080fd5b8063c2114a1614610531578063d0e30db014610565578063da2b7bc414610599578063da456a0e146105b957600080fd5b8063aa22a1c6116100d1578063aa22a1c614610475578063b044397e146104a9578063b5b7a184146104dd578063b633b9441461051157600080fd5b806390df63b7146103fc578063930f28af146104295780639588eca2146104495780639c13b6b51461045f57600080fd5b80633ce43cfd1161017a578063541adcca11610149578063541adcca1461035057806369cd250d146103705780638a619a71146103bc5780638ad3a8f7146103dc57600080fd5b80633ce43cfd146102d05780634788cb38146102f057806349b4299e146103105780634a439cfe1461033057600080fd5b80632639c060116101b65780632639c0601461025a57806327ee6bdd1461028757806331d144571461029d57806331ddf743146102b057600080fd5b806301139b68146101e85780630f0adca5146101fd578063222ae7861461021d57806325a2acb114610245575b600080fd5b6101fb6101f6366004612063565b610672565b005b34801561020957600080fd5b506101fb610218366004612091565b6108b0565b34801561022957600080fd5b50610232610bd8565b6040519081526020015b60405180910390f35b34801561025157600080fd5b506101fb610c09565b34801561026657600080fd5b506102326102753660046120c8565b60026020526000908152604090205481565b34801561029357600080fd5b5061023260015481565b6101fb6102ab3660046120e1565b610e2e565b3480156102bc57600080fd5b506101fb6102cb366004612164565b610fae565b3480156102dc57600080fd5b506101fb6102eb366004612226565b61124e565b3480156102fc57600080fd5b506101fb61030b366004612063565b611395565b34801561031c57600080fd5b506101fb61032b366004612063565b611519565b34801561033c57600080fd5b5061023261034b3660046120c8565b6115c4565b34801561035c57600080fd5b5061023261036b36600461225f565b6115f6565b34801561037c57600080fd5b506103a47f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161023c565b3480156103c857600080fd5b506101fb6103d7366004612282565b611648565b3480156103e857600080fd5b506007546103a4906001600160a01b031681565b34801561040857600080fd5b506102326104173660046120c8565b60036020526000908152604090205481565b34801561043557600080fd5b506101fb610444366004612063565b6116db565b34801561045557600080fd5b5061023260005481565b34801561046b57600080fd5b5061023260045481565b34801561048157600080fd5b506102327f000000000000000000000000000000000000000000000000000000000000000081565b3480156104b557600080fd5b506102327f000000000000000000000000000000000000000000000000000000000000000081565b3480156104e957600080fd5b506102327f000000000000000000000000000000000000000000000000000000000000000081565b34801561051d57600080fd5b506101fb61052c366004612063565b611866565b34801561053d57600080fd5b506102327f000000000000000000000000000000000000000000000000000000000000000081565b34801561057157600080fd5b506102327f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a557600080fd5b506101fb6105b4366004612063565b611a72565b3480156105c557600080fd5b506005546006546105d4919082565b6040805192835260208301919091520161023c565b3480156105f557600080fd5b506101fb611c2b565b34801561060a57600080fd5b5061061e61061936600461225f565b611e1f565b60405161023c91906122b5565b34801561063757600080fd5b506103a47f000000000000000000000000000000000000000000000000000000000000000081565b6101fb61066d3660046120e1565b611ee6565b61067b816115f6565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122cf565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a0015160028111156107935761079361229f565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816115f6565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f00000000000000000000000000000000000000000000000000000000000000003461230d565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090357610903612320565b040311156109465760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109be5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612336565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612336565b6001600160a01b031614610b1a5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610b2a57508115155b15610b6d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b76816115f6565b60008481526002602052604090205403610bd3578051829003610b9f57600160a0820152610bba565b60c08101516001600160a01b031615610bba57600260a08201525b610bc3816115f6565b6000848152600260205260409020555b505050565b6000610c047f000000000000000000000000000000000000000000000000000000000000000042612353565b905090565b600654600003610c705760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b600454600654610c809190612375565b4211610ce95760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610d60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d849190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610dc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de59190612388565b50925050508181036108ac5760048290556040518281527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c906020015b60405180910390a15050565b6007546001600160a01b03163314610e4557600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610eb55760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610ed25760405162461bcd60e51b81526004016106a7906122cf565b60008281526002602052604090205415610f245760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610f6a906115f6565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161082f565b60408510610ff05760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b60008484848460405160200161100994939291906123be565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561108957600088888381811061104b5761104b612400565b9050602002013590508281111561107057826000528060205260406000209250611080565b8060005282602052604060002092505b5060010161102f565b5080600054146110cc5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156111415760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b038916906111719089908990612416565b6000604051808303816000865af19150503d80600081146111ae576040519150601f19603f3d011682016040523d82523d6000602084013e6111b3565b606091505b50509050806112045760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61126061036b3683900383018361225f565b6000838152600260205260409020541461128c5760405162461bcd60e51b81526004016106a7906122cf565b600261129e60c0830160a08401612426565b60028111156112af576112af61229f565b146112f05760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061134a93505060e0840191505060c08301612282565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61139e816115f6565b600083815260026020526040902054146113ca5760405162461bcd60e51b81526004016106a7906122cf565b60018160a0015160028111156113e2576113e261229f565b1461141f5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156114cb576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461153057600080fd5b611539816115f6565b600083815260026020526040902054146115655760405162461bcd60e51b81526004016106a7906122cf565b63ffffffff428116606083015243166080820152611582816115f6565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610e22565b60006115f07f000000000000000000000000000000000000000000000000000000000000000083612353565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861162b989097969101612441565b604051602081830303815290604052805190602001209050919050565b6007546001600160a01b0316331461165f57600080fd5b6007546001600160a01b031633146116b95760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161172e5761172e612320565b040311156117715760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b61177a816115f6565b600083815260026020526040902054146117a65760405162461bcd60e51b81526004016106a7906122cf565b60c08101516001600160a01b0316156117f85760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b60015482111561184057600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611850816115f6565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816118b9576118b9612320565b0403116118fa5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611903816115f6565b6000838152600260205260409020541461192f5760405162461bcd60e51b81526004016106a7906122cf565b60008160a0015160028111156119475761194761229f565b146119865760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b0316611a0a5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611a1e826115f6565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ac557611ac5612320565b040311611b065760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611b0f816115f6565b60008381526002602052604090205414611b3b5760405162461bcd60e51b81526004016106a7906122cf565b60008160a001516002811115611b5357611b5361229f565b14611b925760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611c175760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611a1e826115f6565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611caf9190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611cec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d109190612388565b5092505050600454811115611d5a5760048190556040518181527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a150565b600454811015611e1c5760065415611dce5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527f08b771dddc6449625c7cd99bccdaf915b9c891fb6fa03695a71175b69e376ebb910160405180910390a15b50565b6000816060015163ffffffff16600003611e3b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7757506003919050565b6000600c836060015163ffffffff16420381611e9557611e95612320565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ed95760019250611ede565b600092505b50505b919050565b611ef08282610e2e565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f378382611519565b63ffffffff428116606083015243166080820152611f5583826116db565b600160a0820152610bd38382611395565b6001600160a01b0381168114611e1c57600080fd5b8035611ee181611f66565b803563ffffffff81168114611ee157600080fd5b803560038110611ee157600080fd5b600060e08284031215611fbb57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fec57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200260208401611f7b565b602082015261201360408401611f86565b604082015261202460608401611f86565b606082015261203560808401611f86565b608082015261204660a08401611f9a565b60a082015261205760c08401611f7b565b60c08201525092915050565b600080610100838503121561207757600080fd5b823591506120888460208501611fa9565b90509250929050565b600080600061012084860312156120a757600080fd5b83359250602084013591506120bf8560408601611fa9565b90509250925092565b6000602082840312156120da57600080fd5b5035919050565b600080604083850312156120f457600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee157600080fd5b60008083601f84011261212d57600080fd5b50813567ffffffffffffffff81111561214557600080fd5b60208301915083602082850101111561215d57600080fd5b9250929050565b6000806000806000806080878903121561217d57600080fd5b863567ffffffffffffffff8082111561219557600080fd5b818901915089601f8301126121a957600080fd5b8135818111156121b857600080fd5b8a60208260051b85010111156121cd57600080fd5b602083019850809750506121e360208a01612103565b95506121f160408a01611f7b565b9450606089013591508082111561220757600080fd5b5061221489828a0161211b565b979a9699509497509295939492505050565b60008082840361010081121561223b57600080fd5b8335925060e0601f198201121561225157600080fd5b506020830190509250929050565b600060e0828403121561227157600080fd5b61227b8383611fa9565b9392505050565b60006020828403121561229457600080fd5b813561227b81611f66565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122c9576122c961229f565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156115f0576115f06122f7565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561234857600080fd5b815161227b81611f66565b60008261237057634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156115f0576115f06122f7565b6000806000806080858703121561239e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561243857600080fd5b61227b82611f9a565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124995761249961229f565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220deeffe1347d1160c62da9e56119a5cfb5e8e519e5e4f73d5390c93582172c2f464736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101e35760003560e01c806390df63b711610102578063c2114a1611610095578063dd5fdeaa11610064578063dd5fdeaa146105e9578063df19e6ff146105fe578063e78cea921461062b578063eedcf2a91461065f57600080fd5b8063c2114a1614610531578063d0e30db014610565578063da2b7bc414610599578063da456a0e146105b957600080fd5b8063aa22a1c6116100d1578063aa22a1c614610475578063b044397e146104a9578063b5b7a184146104dd578063b633b9441461051157600080fd5b806390df63b7146103fc578063930f28af146104295780639588eca2146104495780639c13b6b51461045f57600080fd5b80633ce43cfd1161017a578063541adcca11610149578063541adcca1461035057806369cd250d146103705780638a619a71146103bc5780638ad3a8f7146103dc57600080fd5b80633ce43cfd146102d05780634788cb38146102f057806349b4299e146103105780634a439cfe1461033057600080fd5b80632639c060116101b65780632639c0601461025a57806327ee6bdd1461028757806331d144571461029d57806331ddf743146102b057600080fd5b806301139b68146101e85780630f0adca5146101fd578063222ae7861461021d57806325a2acb114610245575b600080fd5b6101fb6101f6366004612063565b610672565b005b34801561020957600080fd5b506101fb610218366004612091565b6108b0565b34801561022957600080fd5b50610232610bd8565b6040519081526020015b60405180910390f35b34801561025157600080fd5b506101fb610c09565b34801561026657600080fd5b506102326102753660046120c8565b60026020526000908152604090205481565b34801561029357600080fd5b5061023260015481565b6101fb6102ab3660046120e1565b610e2e565b3480156102bc57600080fd5b506101fb6102cb366004612164565b610fae565b3480156102dc57600080fd5b506101fb6102eb366004612226565b61124e565b3480156102fc57600080fd5b506101fb61030b366004612063565b611395565b34801561031c57600080fd5b506101fb61032b366004612063565b611519565b34801561033c57600080fd5b5061023261034b3660046120c8565b6115c4565b34801561035c57600080fd5b5061023261036b36600461225f565b6115f6565b34801561037c57600080fd5b506103a47f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161023c565b3480156103c857600080fd5b506101fb6103d7366004612282565b611648565b3480156103e857600080fd5b506007546103a4906001600160a01b031681565b34801561040857600080fd5b506102326104173660046120c8565b60036020526000908152604090205481565b34801561043557600080fd5b506101fb610444366004612063565b6116db565b34801561045557600080fd5b5061023260005481565b34801561046b57600080fd5b5061023260045481565b34801561048157600080fd5b506102327f000000000000000000000000000000000000000000000000000000000000000081565b3480156104b557600080fd5b506102327f000000000000000000000000000000000000000000000000000000000000000081565b3480156104e957600080fd5b506102327f000000000000000000000000000000000000000000000000000000000000000081565b34801561051d57600080fd5b506101fb61052c366004612063565b611866565b34801561053d57600080fd5b506102327f000000000000000000000000000000000000000000000000000000000000000081565b34801561057157600080fd5b506102327f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a557600080fd5b506101fb6105b4366004612063565b611a72565b3480156105c557600080fd5b506005546006546105d4919082565b6040805192835260208301919091520161023c565b3480156105f557600080fd5b506101fb611c2b565b34801561060a57600080fd5b5061061e61061936600461225f565b611e1f565b60405161023c91906122b5565b34801561063757600080fd5b506103a47f000000000000000000000000000000000000000000000000000000000000000081565b6101fb61066d3660046120e1565b611ee6565b61067b816115f6565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122cf565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a0015160028111156107935761079361229f565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816115f6565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f00000000000000000000000000000000000000000000000000000000000000003461230d565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090357610903612320565b040311156109465760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109be5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612336565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612336565b6001600160a01b031614610b1a5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610b2a57508115155b15610b6d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b76816115f6565b60008481526002602052604090205403610bd3578051829003610b9f57600160a0820152610bba565b60c08101516001600160a01b031615610bba57600260a08201525b610bc3816115f6565b6000848152600260205260409020555b505050565b6000610c047f000000000000000000000000000000000000000000000000000000000000000042612353565b905090565b600654600003610c705760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b600454600654610c809190612375565b4211610ce95760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610d60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d849190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610dc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de59190612388565b50925050508181036108ac5760048290556040518281527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c906020015b60405180910390a15050565b6007546001600160a01b03163314610e4557600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610eb55760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610ed25760405162461bcd60e51b81526004016106a7906122cf565b60008281526002602052604090205415610f245760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610f6a906115f6565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161082f565b60408510610ff05760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b60008484848460405160200161100994939291906123be565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561108957600088888381811061104b5761104b612400565b9050602002013590508281111561107057826000528060205260406000209250611080565b8060005282602052604060002092505b5060010161102f565b5080600054146110cc5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156111415760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b038916906111719089908990612416565b6000604051808303816000865af19150503d80600081146111ae576040519150601f19603f3d011682016040523d82523d6000602084013e6111b3565b606091505b50509050806112045760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61126061036b3683900383018361225f565b6000838152600260205260409020541461128c5760405162461bcd60e51b81526004016106a7906122cf565b600261129e60c0830160a08401612426565b60028111156112af576112af61229f565b146112f05760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061134a93505060e0840191505060c08301612282565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61139e816115f6565b600083815260026020526040902054146113ca5760405162461bcd60e51b81526004016106a7906122cf565b60018160a0015160028111156113e2576113e261229f565b1461141f5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156114cb576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461153057600080fd5b611539816115f6565b600083815260026020526040902054146115655760405162461bcd60e51b81526004016106a7906122cf565b63ffffffff428116606083015243166080820152611582816115f6565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610e22565b60006115f07f000000000000000000000000000000000000000000000000000000000000000083612353565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861162b989097969101612441565b604051602081830303815290604052805190602001209050919050565b6007546001600160a01b0316331461165f57600080fd5b6007546001600160a01b031633146116b95760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161172e5761172e612320565b040311156117715760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b61177a816115f6565b600083815260026020526040902054146117a65760405162461bcd60e51b81526004016106a7906122cf565b60c08101516001600160a01b0316156117f85760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b60015482111561184057600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611850816115f6565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816118b9576118b9612320565b0403116118fa5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611903816115f6565b6000838152600260205260409020541461192f5760405162461bcd60e51b81526004016106a7906122cf565b60008160a0015160028111156119475761194761229f565b146119865760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b0316611a0a5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611a1e826115f6565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ac557611ac5612320565b040311611b065760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611b0f816115f6565b60008381526002602052604090205414611b3b5760405162461bcd60e51b81526004016106a7906122cf565b60008160a001516002811115611b5357611b5361229f565b14611b925760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611c175760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611a1e826115f6565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611caf9190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611cec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d109190612388565b5092505050600454811115611d5a5760048190556040518181527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a150565b600454811015611e1c5760065415611dce5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527f08b771dddc6449625c7cd99bccdaf915b9c891fb6fa03695a71175b69e376ebb910160405180910390a15b50565b6000816060015163ffffffff16600003611e3b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7757506003919050565b6000600c836060015163ffffffff16420381611e9557611e95612320565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ed95760019250611ede565b600092505b50505b919050565b611ef08282610e2e565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f378382611519565b63ffffffff428116606083015243166080820152611f5583826116db565b600160a0820152610bd38382611395565b6001600160a01b0381168114611e1c57600080fd5b8035611ee181611f66565b803563ffffffff81168114611ee157600080fd5b803560038110611ee157600080fd5b600060e08284031215611fbb57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fec57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200260208401611f7b565b602082015261201360408401611f86565b604082015261202460608401611f86565b606082015261203560808401611f86565b608082015261204660a08401611f9a565b60a082015261205760c08401611f7b565b60c08201525092915050565b600080610100838503121561207757600080fd5b823591506120888460208501611fa9565b90509250929050565b600080600061012084860312156120a757600080fd5b83359250602084013591506120bf8560408601611fa9565b90509250925092565b6000602082840312156120da57600080fd5b5035919050565b600080604083850312156120f457600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee157600080fd5b60008083601f84011261212d57600080fd5b50813567ffffffffffffffff81111561214557600080fd5b60208301915083602082850101111561215d57600080fd5b9250929050565b6000806000806000806080878903121561217d57600080fd5b863567ffffffffffffffff8082111561219557600080fd5b818901915089601f8301126121a957600080fd5b8135818111156121b857600080fd5b8a60208260051b85010111156121cd57600080fd5b602083019850809750506121e360208a01612103565b95506121f160408a01611f7b565b9450606089013591508082111561220757600080fd5b5061221489828a0161211b565b979a9699509497509295939492505050565b60008082840361010081121561223b57600080fd5b8335925060e0601f198201121561225157600080fd5b506020830190509250929050565b600060e0828403121561227157600080fd5b61227b8383611fa9565b9392505050565b60006020828403121561229457600080fd5b813561227b81611f66565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122c9576122c961229f565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156115f0576115f06122f7565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561234857600080fd5b815161227b81611f66565b60008261237057634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156115f0576115f06122f7565b6000806000806080858703121561239e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561243857600080fd5b61227b82611f9a565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124995761249961229f565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220deeffe1347d1160c62da9e56119a5cfb5e8e519e5e4f73d5390c93582172c2f464736f6c63430008120033", "devdoc": { + "details": "Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).", "events": { "Challenged(uint256,address)": { "details": "This event indicates that `sendSnapshot(epoch)` should be called in the inbox.", @@ -868,7 +1079,7 @@ } }, "Claimed(address,bytes32)": { - "details": "Watcher check this event to challenge fraud.", + "details": "Watchers check this event to challenge fraud.", "params": { "_claimer": "The address of the claimer.", "_stateRoot": "The state root of the claim." @@ -880,6 +1091,24 @@ "_msgId": "The msgId of the message that was relayed." } }, + "SequencerLimitDecreaseRequested(uint256)": { + "details": "This event indicates that a request to decrease the sequencer limit has been made.", + "params": { + "_requestedSequencerLimit": "The new sequencer limit requested." + } + }, + "SequencerLimitUpdated(uint256)": { + "details": "This event indicates the sequencer limit updated.", + "params": { + "_newSequencerLimit": "The new maxL2StateSyncDelay." + } + }, + "VerificationStarted(uint256)": { + "details": "This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.", + "params": { + "_epoch": "The epoch that started verification." + } + }, "Verified(uint256)": { "details": "This events indicates that verification has succeeded. The messages are ready to be relayed.", "params": { @@ -889,7 +1118,16 @@ }, "kind": "dev", "methods": { - "challenge(uint256,(bytes32,address,uint32,uint32,uint8,address))": { + "censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Gets the status of the censorship test for claim.", + "params": { + "_claim": "The claim to test." + }, + "returns": { + "status": "True if the claim passed the censorship test." + } + }, + "challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.", "params": { "_claim": "The claim associated with the epoch.", @@ -915,7 +1153,6 @@ "_bridge": "The address of the Arbitrum bridge contract on Ethereum.", "_challengePeriod": "The duration of the period allowing to challenge a claim.", "_deposit": "The deposit amount to submit a claim in wei.", - "_epochClaimDelay": "The number of epochs a claim can be submitted for.", "_epochPeriod": "The duration of each epoch.", "_maxMissingBlocks": "The maximum number of blocks that can be missing in a challenge period.", "_timeoutEpochs": "The epochs before the bridge is considered shutdown.", @@ -929,28 +1166,34 @@ "_stateroot": "The state root to claim." } }, - "hashClaim((bytes32,address,uint32,uint32,uint8,address))": { - "details": "Hashes the claim.", - "params": { - "_claim": "The claim to hash." - }, + "epochAt(uint256)": { + "details": "Get the current epoch from the outbox's point of view using the Ethereum L1 clock.", "returns": { - "hashedClaim": "The hash of the claim." + "epoch": "The hash of the claim." } }, - "passedTest((bytes32,address,uint32,uint32,uint8,address))": { - "details": "Claim passed censorship test", + "epochNow()": { + "details": "Get the current epoch from the outbox's point of view using the Ethereum L1 clock.", + "returns": { + "epoch": "The hash of the claim." + } + }, + "executeSequencerLimitDecreaseRequest()": { + "details": "execute SequencerLimitDecreaseRequest" + }, + "hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Hashes the claim.", "params": { - "_claim": "The claim to test." + "_claim": "The claim to hash." }, "returns": { - "testPassed": "True if the claim passed the censorship test." + "hashedClaim": "The hash of the claim." } }, - "resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint8,address))": { + "resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Resolves any challenge of the optimistic claim for '_epoch'.", "params": { - "_claim": "The claim associated with the epoch", + "_claim": "The claim associated with the epoch.", "_epoch": "The epoch to verify.", "_stateRoot": "The true state root for the epoch." } @@ -958,41 +1201,51 @@ "sendMessage(bytes32[],uint64,address,bytes)": { "details": "Verifies and relays the message. UNTRUSTED.", "params": { - "_message": "The message encoded with header from VeaInbox.", + "_message": "The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)", "_msgId": "The zero based index of the message in the inbox.", - "_proof": "The merkle proof to prove the message.", + "_proof": "The merkle proof to prove the message inclusion in the inbox state root.", "_to": "The address of the contract on Ethereum to call." } }, - "validateSnapshot(uint256,(bytes32,address,uint32,uint32,uint8,address))": { + "startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Start verification for claim for 'epoch'.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch of the claim to challenge." + } + }, + "updateSequencerLimit()": { + "details": "Request to decrease the sequencerLimit." + }, + "verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Resolves the optimistic claim for '_epoch'.", "params": { "_claim": "The claim associated with the epoch.", - "epoch": "The epoch of the optimistic claim." + "_epoch": "The epoch of the optimistic claim." } }, - "withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint8,address))": { + "withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.", "params": { "_claim": "The claim associated with the epoch.", "_epoch": "The epoch associated with the challenge deposit to withraw." } }, - "withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint8,address))": { + "withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.", "params": { "_claim": "The claim associated with the epoch.", "_epoch": "The epoch associated with the claim deposit to withraw." } }, - "withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint8,address))": { + "withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.", "params": { "_claim": "The claim associated with the epoch.", "_epoch": "The epoch associated with the claim deposit to withraw." } }, - "withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint8,address))": { + "withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.", "params": { "_claim": "The claim associated with the epoch.", @@ -1005,17 +1258,16 @@ "userdoc": { "kind": "user", "methods": { - "resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint8,address))": { + "resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "notice": "Note: Access restricted to arbitrum bridge." } }, - "notice": "Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).", "version": 1 }, "storageLayout": { "storage": [ { - "astId": 39, + "astId": 437, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "stateRoot", "offset": 0, @@ -1023,7 +1275,7 @@ "type": "t_bytes32" }, { - "astId": 41, + "astId": 439, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "latestVerifiedEpoch", "offset": 0, @@ -1031,7 +1283,7 @@ "type": "t_uint256" }, { - "astId": 45, + "astId": 443, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "claimHashes", "offset": 0, @@ -1039,7 +1291,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 49, + "astId": 447, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "relayed", "offset": 0, @@ -1047,11 +1299,27 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2273, + "astId": 449, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", - "label": "devnetOperator", + "label": "sequencerLimit", "offset": 0, "slot": "4", + "type": "t_uint256" + }, + { + "astId": 452, + "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", + "label": "sequencerLimitDecreaseRequest", + "offset": 0, + "slot": "5", + "type": "t_struct(SequencerLimitDecreaseRequest)457_storage" + }, + { + "astId": 3974, + "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", + "label": "devnetOperator", + "offset": 0, + "slot": "7", "type": "t_address" } ], @@ -1073,6 +1341,29 @@ "numberOfBytes": "32", "value": "t_bytes32" }, + "t_struct(SequencerLimitDecreaseRequest)457_storage": { + "encoding": "inplace", + "label": "struct VeaOutboxArbToEth.SequencerLimitDecreaseRequest", + "members": [ + { + "astId": 454, + "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", + "label": "requestedSequencerLimit", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 456, + "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", + "label": "timestamp", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, "t_uint256": { "encoding": "inplace", "label": "uint256", diff --git a/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json b/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json new file mode 100644 index 00000000..81692378 --- /dev/null +++ b/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json @@ -0,0 +1,1303 @@ +{ + "address": "0x9cF5c011e2A4CB7797413f311A35AcB021071c35", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_deposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_epochPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minChallengePeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_timeoutEpochs", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_veaInboxArbToEth", + "type": "address" + }, + { + "internalType": "address", + "name": "_bridge", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxMissingBlocks", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_challenger", + "type": "address" + } + ], + "name": "Challenged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_claimer", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_stateRoot", + "type": "bytes32" + } + ], + "name": "Claimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "_msgId", + "type": "uint64" + } + ], + "name": "MessageRelayed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_requestedSequencerLimit", + "type": "uint256" + } + ], + "name": "SequencerLimitDecreaseRequested", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newSequencerLimit", + "type": "uint256" + } + ], + "name": "SequencerLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "VerificationStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "Verified", + "type": "event" + }, + { + "inputs": [], + "name": "bridge", + "outputs": [ + { + "internalType": "contract IBridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "censorshipTestStatus", + "outputs": [ + { + "internalType": "enum VeaOutboxArbToEth.CensorshipTestStatus", + "name": "status", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "challenge", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_stateRoot", + "type": "bytes32" + } + ], + "name": "claim", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "claimHashes", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "epochAt", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochNow", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "executeSequencerLimitDecreaseRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "hashClaim", + "outputs": [ + { + "internalType": "bytes32", + "name": "hashedClaim", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "latestVerifiedEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxMissingBlocks", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minChallengePeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "relayed", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_stateRoot", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "resolveDisputedClaim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "_proof", + "type": "bytes32[]" + }, + { + "internalType": "uint64", + "name": "_msgId", + "type": "uint64" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_message", + "type": "bytes" + } + ], + "name": "sendMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerLimitDecreaseRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestedSequencerLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "startVerification", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stateRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timeoutEpochs", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updateSequencerLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "veaInboxArbToEth", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "verifySnapshot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "withdrawChallengeDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "withdrawChallengerEscapeHatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "withdrawClaimDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "withdrawClaimerEscapeHatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xeca2566e580428b02088fc385aadf58ed9920fe21f2af39dc7de30ba32eed346", + "receipt": { + "to": null, + "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", + "contractAddress": "0x9cF5c011e2A4CB7797413f311A35AcB021071c35", + "transactionIndex": 61, + "gasUsed": "2236960", + "logsBloom": "0x00000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000012000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000", + "blockHash": "0xb5e35df11b606251c8cfa5368043cac7e874a2513f650c504cf0255940352b46", + "transactionHash": "0xeca2566e580428b02088fc385aadf58ed9920fe21f2af39dc7de30ba32eed346", + "logs": [ + { + "transactionIndex": 61, + "blockNumber": 9182226, + "transactionHash": "0xeca2566e580428b02088fc385aadf58ed9920fe21f2af39dc7de30ba32eed346", + "address": "0x9cF5c011e2A4CB7797413f311A35AcB021071c35", + "topics": [ + "0x5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000015180", + "logIndex": 193, + "blockHash": "0xb5e35df11b606251c8cfa5368043cac7e874a2513f650c504cf0255940352b46" + } + ], + "blockNumber": 9182226, + "cumulativeGasUsed": "12032235", + "status": 1, + "byzantium": true + }, + "args": [ + "1000000000000000000", + 3600, + 10800, + 1000000, + "0x8893441F219e2836D9c7E1c727CDA9ACFF84D069", + "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", + 1000000 + ], + "numDeployments": 4, + "solcInputHash": "c9836c6cb024801f3104e49f87086294", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"SequencerLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"SequencerLimitUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"SequencerLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerLimit\":\"The new sequencer limit requested.\"}},\"SequencerLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerLimit\":\"The new maxL2StateSyncDelay.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEth\":\"The address of the inbox contract on Arbitrum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executeSequencerLimitDecreaseRequest()\":{\"details\":\"execute SequencerLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerLimit()\":{\"details\":\"Request to decrease the sequencerLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":\"VeaOutboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerLimitDecreaseRequest; // Decreasing the sequencerLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerLimit The new maxL2StateSyncDelay.\\n event SequencerLimitUpdated(uint256 _newSequencerLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerLimit The new sequencer limit requested.\\n event SequencerLimitDecreaseRequested(uint256 _requestedSequencerLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updateSequencerLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerLimit.\\n function updateSequencerLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerLimit > sequencerLimit) {\\n // For sequencerLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerLimit = newSequencerLimit;\\n emit SequencerLimitUpdated(newSequencerLimit);\\n } else if (newSequencerLimit < sequencerLimit) {\\n require(sequencerLimitDecreaseRequest.timestamp == 0, \\\"Sequencer limit decrease request already pending.\\\");\\n\\n sequencerLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerLimit, \\n timestamp: block.timestamp\\n });\\n\\n emit SequencerLimitDecreaseRequested(newSequencerLimit);\\n }\\n }\\n\\n /// @dev execute SequencerLimitDecreaseRequest\\n function executeSequencerLimitDecreaseRequest() external {\\n require(sequencerLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerLimitDecreaseRequest.timestamp + sequencerLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerLimit = sequencerLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerLimit == requestedSequencerLimit) {\\n sequencerLimit = requestedSequencerLimit;\\n emit SequencerLimitUpdated(requestedSequencerLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerLimit) {\\n // Allow claims to be made within the sequencerLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x1a7affa8f2ca1bf2ef5b7c57a5a07215282875209008f7dceee9eecfa4906db3\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002b2e38038062002b2e8339810160408190526200003591620002ce565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190526200006f620000ce565b6200007c6002886200034c565b60e08190526200008e8860026200036f565b6200009a91906200038f565b6101005261012051600190620000b190426200034c565b620000bd91906200038f565b600155506200040195505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000111573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001379190620003a5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200019b9190620003ca565b5092505050600454811115620001e65760048190556040518181527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a150565b600454811015620002ae5760065415620002605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527f08b771dddc6449625c7cd99bccdaf915b9c891fb6fa03695a71175b69e376ebb910160405180910390a15b50565b80516001600160a01b0381168114620002c957600080fd5b919050565b600080600080600080600060e0888a031215620002ea57600080fd5b875196506020880151955060408801519450606088015193506200031160808901620002b1565b92506200032160a08901620002b1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200036a57634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000389576200038962000336565b92915050565b8181038181111562000389576200038962000336565b600060208284031215620003b857600080fd5b620003c382620002b1565b9392505050565b60008060008060808587031215620003e157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516125f16200053d60003960008181610426015261202501526000818161045a0152818161083e015281816117f0015281816119e40152611bf00152600081816104e20152611fb901526000818161048e0152818161086201528181610b6b01528181610e2b01528181610eb3015281816115b7015281816117710152818161181401528181611a080152611c14015260006113ce01526000818161137b01526114e00152600081816105160152818161063e015281816107c5015281816107f201528181610dbb0152818161154301528181611b4e01528181611bb50152611d5b015260008181610361015261094c0152600081816105dc015281816108dd0152818161097601528181610ca10152611dab01526125f16000f3fe6080604052600436106101c25760003560e01c806390df63b7116100f7578063b633b94411610095578063da456a0e11610064578063da456a0e14610558578063dd5fdeaa14610588578063df19e6ff1461059d578063e78cea92146105ca57600080fd5b8063b633b944146104b0578063c2114a16146104d0578063d0e30db014610504578063da2b7bc41461053857600080fd5b80639c13b6b5116100d15780639c13b6b5146103fe578063aa22a1c614610414578063b044397e14610448578063b5b7a1841461047c57600080fd5b806390df63b71461039b578063930f28af146103c85780639588eca2146103e857600080fd5b806331ddf7431161016457806349b4299e1161013e57806349b4299e146102ef5780634a439cfe1461030f578063541adcca1461032f57806369cd250d1461034f57600080fd5b806331ddf7431461028f5780633ce43cfd146102af5780634788cb38146102cf57600080fd5b806325a2acb1116101a057806325a2acb1146102245780632639c0601461023957806327ee6bdd1461026657806331d144571461027c57600080fd5b806301139b68146101c75780630f0adca5146101dc578063222ae786146101fc575b600080fd5b6101da6101d536600461215f565b6105fe565b005b3480156101e857600080fd5b506101da6101f736600461218d565b61083c565b34801561020857600080fd5b50610211610b64565b6040519081526020015b60405180910390f35b34801561023057600080fd5b506101da610b95565b34801561024557600080fd5b506102116102543660046121c4565b60026020526000908152604090205481565b34801561027257600080fd5b5061021160015481565b6101da61028a3660046121dd565b610db9565b34801561029b57600080fd5b506101da6102aa366004612260565b611024565b3480156102bb57600080fd5b506101da6102ca366004612322565b6112c4565b3480156102db57600080fd5b506101da6102ea366004612322565b61140b565b3480156102fb57600080fd5b506101da61030a36600461215f565b611580565b34801561031b57600080fd5b5061021161032a3660046121c4565b61176a565b34801561033b57600080fd5b5061021161034a36600461235b565b61179c565b34801561035b57600080fd5b506103837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161021b565b3480156103a757600080fd5b506102116103b63660046121c4565b60036020526000908152604090205481565b3480156103d457600080fd5b506101da6103e336600461215f565b6117ee565b3480156103f457600080fd5b5061021160005481565b34801561040a57600080fd5b5061021160045481565b34801561042057600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b34801561045457600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b34801561048857600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b3480156104bc57600080fd5b506101da6104cb36600461215f565b6119e2565b3480156104dc57600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b34801561051057600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b34801561054457600080fd5b506101da61055336600461215f565b611bee565b34801561056457600080fd5b50600554600654610573919082565b6040805192835260208301919091520161021b565b34801561059457600080fd5b506101da611da7565b3480156105a957600080fd5b506105bd6105b836600461235b565b611f9b565b60405161021b9190612394565b3480156105d657600080fd5b506103837f000000000000000000000000000000000000000000000000000000000000000081565b6106078161179c565b6000838152600260205260409020541461063c5760405162461bcd60e51b8152600401610633906123ae565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f61237e565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b8161179c565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f0000000000000000000000000000000000000000000000000000000000000000346123ec565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161088f5761088f6123ff565b040311156108d25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461094a5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f69190612415565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a579190612415565b6001600160a01b031614610aa65760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610ab657508115155b15610af957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b028161179c565b60008481526002602052604090205403610b5f578051829003610b2b57600160a0820152610b46565b60c08101516001600160a01b031615610b4657600260a08201525b610b4f8161179c565b6000848152600260205260409020555b505050565b6000610b907f000000000000000000000000000000000000000000000000000000000000000042612432565b905090565b600654600003610bfc5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b600454600654610c0c9190612454565b4211610c755760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610cec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d109190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610d4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d719190612467565b50925050508181036108385760048290556040518281527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a15050565b7f0000000000000000000000000000000000000000000000000000000000000000341015610e295760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000004281610e5857610e586123ff565b048210610ea75760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b600454421115610f2b577f0000000000000000000000000000000000000000000000000000000000000000600454420381610ee457610ee46123ff565b04826001011015610f2b5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610633565b80610f485760405162461bcd60e51b8152600401610633906123ae565b60008281526002602052604090205415610f9a5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610fe09061179c565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107bb565b604085106110665760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b60008484848460405160200161107f949392919061249d565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156110ff5760008888838181106110c1576110c16124df565b905060200201359050828111156110e6578260005280602052604060002092506110f6565b8060005282602052604060002092505b506001016110a5565b5080600054146111425760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156111b75760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b038916906111e790899089906124f5565b6000604051808303816000865af19150503d8060008114611224576040519150601f19603f3d011682016040523d82523d6000602084013e611229565b606091505b505090508061127a5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6112d661034a3683900383018361235b565b600083815260026020526040902054146113025760405162461bcd60e51b8152600401610633906123ae565b600261131460c0830160a08401612505565b60028111156113255761132561237e565b146113665760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506113c093505060e0840191505060c08301612520565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61141d61034a3683900383018361235b565b600083815260026020526040902054146114495760405162461bcd60e51b8152600401610633906123ae565b600161145b60c0830160a08401612505565b600281111561146c5761146c61237e565b146114a95760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b60008281526002602052604081208190556114ca60e0830160c08401612520565b6001600160a01b031614611525576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506113c09350506040840191505060208301612520565b6115356040820160208301612520565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6115898161179c565b600083815260026020526040902054146115b55760405162461bcd60e51b8152600401610633906123ae565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166115ee9190612454565b6115f89190612454565b42101561165c5760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b600061166782611f9b565b9050600281600381111561167d5761167d61237e565b148061169a575060008160038111156116985761169861237e565b145b6117035760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526117208261179c565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006117967f000000000000000000000000000000000000000000000000000000000000000083612432565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986117d198909796910161253d565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611841576118416123ff565b040311156118845760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b61188d8161179c565b600083815260026020526040902054146118b95760405162461bcd60e51b8152600401610633906123ae565b60c08101516001600160a01b03161561190b5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b600161191682611f9b565b60038111156119275761192761237e565b146119745760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b6001548211156119bc57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a08201526119cc8161179c565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a3557611a356123ff565b040311611a765760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611a7f8161179c565b60008381526002602052604090205414611aab5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ac357611ac361237e565b14611b025760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611b865760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b9a8261179c565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c4157611c416123ff565b040311611c825760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611c8b8161179c565b60008381526002602052604090205414611cb75760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ccf57611ccf61237e565b14611d0e5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611d935760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b9a8261179c565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2b9190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611e68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e8c9190612467565b5092505050600454811115611ed65760048190556040518181527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a150565b600454811015611f985760065415611f4a5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527f08b771dddc6449625c7cd99bccdaf915b9c891fb6fa03695a71175b69e376ebb910160405180910390a15b50565b6000816060015163ffffffff16600003611fb757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611ff357506003919050565b6000600c836060015163ffffffff16420381612011576120116123ff565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612055576001925061205a565b600092505b50505b919050565b6001600160a01b0381168114611f9857600080fd5b803561205d81612062565b803563ffffffff8116811461205d57600080fd5b80356003811061205d57600080fd5b600060e082840312156120b757600080fd5b60405160e0810181811067ffffffffffffffff821117156120e857634e487b7160e01b600052604160045260246000fd5b604052823581529050806120fe60208401612077565b602082015261210f60408401612082565b604082015261212060608401612082565b606082015261213160808401612082565b608082015261214260a08401612096565b60a082015261215360c08401612077565b60c08201525092915050565b600080610100838503121561217357600080fd5b8235915061218484602085016120a5565b90509250929050565b600080600061012084860312156121a357600080fd5b83359250602084013591506121bb85604086016120a5565b90509250925092565b6000602082840312156121d657600080fd5b5035919050565b600080604083850312156121f057600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461205d57600080fd5b60008083601f84011261222957600080fd5b50813567ffffffffffffffff81111561224157600080fd5b60208301915083602082850101111561225957600080fd5b9250929050565b6000806000806000806080878903121561227957600080fd5b863567ffffffffffffffff8082111561229157600080fd5b818901915089601f8301126122a557600080fd5b8135818111156122b457600080fd5b8a60208260051b85010111156122c957600080fd5b602083019850809750506122df60208a016121ff565b95506122ed60408a01612077565b9450606089013591508082111561230357600080fd5b5061231089828a01612217565b979a9699509497509295939492505050565b60008082840361010081121561233757600080fd5b8335925060e0601f198201121561234d57600080fd5b506020830190509250929050565b600060e0828403121561236d57600080fd5b61237783836120a5565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123a8576123a861237e565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611796576117966123d6565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561242757600080fd5b815161237781612062565b60008261244f57634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115611796576117966123d6565b6000806000806080858703121561247d57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561251757600080fd5b61237782612096565b60006020828403121561253257600080fd5b813561237781612062565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106125955761259561237e565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122093700a2c6c183d4eae9f8eb2c732ea7533c5d7603a33b7672eeea861efcd1c3564736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101c25760003560e01c806390df63b7116100f7578063b633b94411610095578063da456a0e11610064578063da456a0e14610558578063dd5fdeaa14610588578063df19e6ff1461059d578063e78cea92146105ca57600080fd5b8063b633b944146104b0578063c2114a16146104d0578063d0e30db014610504578063da2b7bc41461053857600080fd5b80639c13b6b5116100d15780639c13b6b5146103fe578063aa22a1c614610414578063b044397e14610448578063b5b7a1841461047c57600080fd5b806390df63b71461039b578063930f28af146103c85780639588eca2146103e857600080fd5b806331ddf7431161016457806349b4299e1161013e57806349b4299e146102ef5780634a439cfe1461030f578063541adcca1461032f57806369cd250d1461034f57600080fd5b806331ddf7431461028f5780633ce43cfd146102af5780634788cb38146102cf57600080fd5b806325a2acb1116101a057806325a2acb1146102245780632639c0601461023957806327ee6bdd1461026657806331d144571461027c57600080fd5b806301139b68146101c75780630f0adca5146101dc578063222ae786146101fc575b600080fd5b6101da6101d536600461215f565b6105fe565b005b3480156101e857600080fd5b506101da6101f736600461218d565b61083c565b34801561020857600080fd5b50610211610b64565b6040519081526020015b60405180910390f35b34801561023057600080fd5b506101da610b95565b34801561024557600080fd5b506102116102543660046121c4565b60026020526000908152604090205481565b34801561027257600080fd5b5061021160015481565b6101da61028a3660046121dd565b610db9565b34801561029b57600080fd5b506101da6102aa366004612260565b611024565b3480156102bb57600080fd5b506101da6102ca366004612322565b6112c4565b3480156102db57600080fd5b506101da6102ea366004612322565b61140b565b3480156102fb57600080fd5b506101da61030a36600461215f565b611580565b34801561031b57600080fd5b5061021161032a3660046121c4565b61176a565b34801561033b57600080fd5b5061021161034a36600461235b565b61179c565b34801561035b57600080fd5b506103837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161021b565b3480156103a757600080fd5b506102116103b63660046121c4565b60036020526000908152604090205481565b3480156103d457600080fd5b506101da6103e336600461215f565b6117ee565b3480156103f457600080fd5b5061021160005481565b34801561040a57600080fd5b5061021160045481565b34801561042057600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b34801561045457600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b34801561048857600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b3480156104bc57600080fd5b506101da6104cb36600461215f565b6119e2565b3480156104dc57600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b34801561051057600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b34801561054457600080fd5b506101da61055336600461215f565b611bee565b34801561056457600080fd5b50600554600654610573919082565b6040805192835260208301919091520161021b565b34801561059457600080fd5b506101da611da7565b3480156105a957600080fd5b506105bd6105b836600461235b565b611f9b565b60405161021b9190612394565b3480156105d657600080fd5b506103837f000000000000000000000000000000000000000000000000000000000000000081565b6106078161179c565b6000838152600260205260409020541461063c5760405162461bcd60e51b8152600401610633906123ae565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f61237e565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b8161179c565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f0000000000000000000000000000000000000000000000000000000000000000346123ec565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161088f5761088f6123ff565b040311156108d25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461094a5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f69190612415565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a579190612415565b6001600160a01b031614610aa65760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610ab657508115155b15610af957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b028161179c565b60008481526002602052604090205403610b5f578051829003610b2b57600160a0820152610b46565b60c08101516001600160a01b031615610b4657600260a08201525b610b4f8161179c565b6000848152600260205260409020555b505050565b6000610b907f000000000000000000000000000000000000000000000000000000000000000042612432565b905090565b600654600003610bfc5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b600454600654610c0c9190612454565b4211610c755760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610cec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d109190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610d4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d719190612467565b50925050508181036108385760048290556040518281527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a15050565b7f0000000000000000000000000000000000000000000000000000000000000000341015610e295760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000004281610e5857610e586123ff565b048210610ea75760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b600454421115610f2b577f0000000000000000000000000000000000000000000000000000000000000000600454420381610ee457610ee46123ff565b04826001011015610f2b5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610633565b80610f485760405162461bcd60e51b8152600401610633906123ae565b60008281526002602052604090205415610f9a5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610fe09061179c565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107bb565b604085106110665760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b60008484848460405160200161107f949392919061249d565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156110ff5760008888838181106110c1576110c16124df565b905060200201359050828111156110e6578260005280602052604060002092506110f6565b8060005282602052604060002092505b506001016110a5565b5080600054146111425760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156111b75760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b038916906111e790899089906124f5565b6000604051808303816000865af19150503d8060008114611224576040519150601f19603f3d011682016040523d82523d6000602084013e611229565b606091505b505090508061127a5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6112d661034a3683900383018361235b565b600083815260026020526040902054146113025760405162461bcd60e51b8152600401610633906123ae565b600261131460c0830160a08401612505565b60028111156113255761132561237e565b146113665760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506113c093505060e0840191505060c08301612520565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61141d61034a3683900383018361235b565b600083815260026020526040902054146114495760405162461bcd60e51b8152600401610633906123ae565b600161145b60c0830160a08401612505565b600281111561146c5761146c61237e565b146114a95760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b60008281526002602052604081208190556114ca60e0830160c08401612520565b6001600160a01b031614611525576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506113c09350506040840191505060208301612520565b6115356040820160208301612520565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6115898161179c565b600083815260026020526040902054146115b55760405162461bcd60e51b8152600401610633906123ae565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166115ee9190612454565b6115f89190612454565b42101561165c5760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b600061166782611f9b565b9050600281600381111561167d5761167d61237e565b148061169a575060008160038111156116985761169861237e565b145b6117035760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526117208261179c565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006117967f000000000000000000000000000000000000000000000000000000000000000083612432565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986117d198909796910161253d565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611841576118416123ff565b040311156118845760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b61188d8161179c565b600083815260026020526040902054146118b95760405162461bcd60e51b8152600401610633906123ae565b60c08101516001600160a01b03161561190b5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b600161191682611f9b565b60038111156119275761192761237e565b146119745760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b6001548211156119bc57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a08201526119cc8161179c565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a3557611a356123ff565b040311611a765760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611a7f8161179c565b60008381526002602052604090205414611aab5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ac357611ac361237e565b14611b025760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611b865760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b9a8261179c565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c4157611c416123ff565b040311611c825760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611c8b8161179c565b60008381526002602052604090205414611cb75760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ccf57611ccf61237e565b14611d0e5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611d935760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b9a8261179c565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2b9190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611e68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e8c9190612467565b5092505050600454811115611ed65760048190556040518181527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a150565b600454811015611f985760065415611f4a5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527f08b771dddc6449625c7cd99bccdaf915b9c891fb6fa03695a71175b69e376ebb910160405180910390a15b50565b6000816060015163ffffffff16600003611fb757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611ff357506003919050565b6000600c836060015163ffffffff16420381612011576120116123ff565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612055576001925061205a565b600092505b50505b919050565b6001600160a01b0381168114611f9857600080fd5b803561205d81612062565b803563ffffffff8116811461205d57600080fd5b80356003811061205d57600080fd5b600060e082840312156120b757600080fd5b60405160e0810181811067ffffffffffffffff821117156120e857634e487b7160e01b600052604160045260246000fd5b604052823581529050806120fe60208401612077565b602082015261210f60408401612082565b604082015261212060608401612082565b606082015261213160808401612082565b608082015261214260a08401612096565b60a082015261215360c08401612077565b60c08201525092915050565b600080610100838503121561217357600080fd5b8235915061218484602085016120a5565b90509250929050565b600080600061012084860312156121a357600080fd5b83359250602084013591506121bb85604086016120a5565b90509250925092565b6000602082840312156121d657600080fd5b5035919050565b600080604083850312156121f057600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461205d57600080fd5b60008083601f84011261222957600080fd5b50813567ffffffffffffffff81111561224157600080fd5b60208301915083602082850101111561225957600080fd5b9250929050565b6000806000806000806080878903121561227957600080fd5b863567ffffffffffffffff8082111561229157600080fd5b818901915089601f8301126122a557600080fd5b8135818111156122b457600080fd5b8a60208260051b85010111156122c957600080fd5b602083019850809750506122df60208a016121ff565b95506122ed60408a01612077565b9450606089013591508082111561230357600080fd5b5061231089828a01612217565b979a9699509497509295939492505050565b60008082840361010081121561233757600080fd5b8335925060e0601f198201121561234d57600080fd5b506020830190509250929050565b600060e0828403121561236d57600080fd5b61237783836120a5565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123a8576123a861237e565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611796576117966123d6565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561242757600080fd5b815161237781612062565b60008261244f57634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115611796576117966123d6565b6000806000806080858703121561247d57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561251757600080fd5b61237782612096565b60006020828403121561253257600080fd5b813561237781612062565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106125955761259561237e565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122093700a2c6c183d4eae9f8eb2c732ea7533c5d7603a33b7672eeea861efcd1c3564736f6c63430008120033", + "devdoc": { + "details": "Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.", + "events": { + "Challenged(uint256,address)": { + "details": "This event indicates that `sendSnapshot(epoch)` should be called in the inbox.", + "params": { + "_challenger": "The address of the challenger.", + "_epoch": "The epoch associated with the challenged claim." + } + }, + "Claimed(address,bytes32)": { + "details": "Watchers check this event to challenge fraud.", + "params": { + "_claimer": "The address of the claimer.", + "_stateRoot": "The state root of the claim." + } + }, + "MessageRelayed(uint64)": { + "details": "This event indicates that a message has been relayed.", + "params": { + "_msgId": "The msgId of the message that was relayed." + } + }, + "SequencerLimitDecreaseRequested(uint256)": { + "details": "This event indicates that a request to decrease the sequencer limit has been made.", + "params": { + "_requestedSequencerLimit": "The new sequencer limit requested." + } + }, + "SequencerLimitUpdated(uint256)": { + "details": "This event indicates the sequencer limit updated.", + "params": { + "_newSequencerLimit": "The new maxL2StateSyncDelay." + } + }, + "VerificationStarted(uint256)": { + "details": "This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.", + "params": { + "_epoch": "The epoch that started verification." + } + }, + "Verified(uint256)": { + "details": "This events indicates that verification has succeeded. The messages are ready to be relayed.", + "params": { + "_epoch": "The epoch that was verified." + } + } + }, + "kind": "dev", + "methods": { + "censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Gets the status of the censorship test for claim.", + "params": { + "_claim": "The claim to test." + }, + "returns": { + "status": "True if the claim passed the censorship test." + } + }, + "challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch of the claim to challenge." + } + }, + "claim(uint256,bytes32)": { + "details": "Submit a claim about the _stateRoot at _epoch and submit a deposit.", + "params": { + "_epoch": "The epoch for which the claim is made.", + "_stateRoot": "The state root to claim." + } + }, + "constructor": { + "details": "Constructor. Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value", + "params": { + "_deposit": "The deposit amount to submit a claim in wei.", + "_epochPeriod": "The duration of each epoch.", + "_maxMissingBlocks": "The maximum number of blocks that can be missing in a challenge period.", + "_minChallengePeriod": "The minimum time window to challenge a claim.", + "_timeoutEpochs": "The epochs before the bridge is considered shutdown.", + "_veaInboxArbToEth": "The address of the inbox contract on Arbitrum." + } + }, + "epochAt(uint256)": { + "details": "Get the current epoch from the outbox's point of view using the Ethereum L1 clock.", + "returns": { + "epoch": "The hash of the claim." + } + }, + "epochNow()": { + "details": "Get the current epoch from the outbox's point of view using the Ethereum L1 clock.", + "returns": { + "epoch": "The hash of the claim." + } + }, + "executeSequencerLimitDecreaseRequest()": { + "details": "execute SequencerLimitDecreaseRequest" + }, + "hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Hashes the claim.", + "params": { + "_claim": "The claim to hash." + }, + "returns": { + "hashedClaim": "The hash of the claim." + } + }, + "resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Resolves any challenge of the optimistic claim for '_epoch'.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch to verify.", + "_stateRoot": "The true state root for the epoch." + } + }, + "sendMessage(bytes32[],uint64,address,bytes)": { + "details": "Verifies and relays the message. UNTRUSTED.", + "params": { + "_message": "The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)", + "_msgId": "The zero based index of the message in the inbox.", + "_proof": "The merkle proof to prove the message inclusion in the inbox state root.", + "_to": "The address of the contract on Ethereum to call." + } + }, + "startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Start verification for claim for 'epoch'.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch of the claim to challenge." + } + }, + "updateSequencerLimit()": { + "details": "Request to decrease the sequencerLimit." + }, + "verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Resolves the optimistic claim for '_epoch'.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch of the optimistic claim." + } + }, + "withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch associated with the challenge deposit to withraw." + } + }, + "withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch associated with the claim deposit to withraw." + } + }, + "withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch associated with the claim deposit to withraw." + } + }, + "withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch associated with the claim deposit to withraw." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "notice": "Note: Access restricted to arbitrum bridge." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 437, + "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", + "label": "stateRoot", + "offset": 0, + "slot": "0", + "type": "t_bytes32" + }, + { + "astId": 439, + "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", + "label": "latestVerifiedEpoch", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 443, + "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", + "label": "claimHashes", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_bytes32)" + }, + { + "astId": 447, + "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", + "label": "relayed", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint256,t_bytes32)" + }, + { + "astId": 449, + "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", + "label": "sequencerLimit", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 452, + "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", + "label": "sequencerLimitDecreaseRequest", + "offset": 0, + "slot": "5", + "type": "t_struct(SequencerLimitDecreaseRequest)457_storage" + } + ], + "types": { + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_struct(SequencerLimitDecreaseRequest)457_storage": { + "encoding": "inplace", + "label": "struct VeaOutboxArbToEth.SequencerLimitDecreaseRequest", + "members": [ + { + "astId": 454, + "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", + "label": "requestedSequencerLimit", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 456, + "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", + "label": "timestamp", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index 5623c8c7..0ceedb6c 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -108,6 +108,22 @@ const config: HardhatUserConfig = { }, }, }, + gnosischain: { + chainId: 100, + url: "https://rpc.gnosischain.net", + accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], + live: true, + saveDeployments: true, + tags: ["staging", "outbox", "layer1"], + companionNetworks: { + arbitrumGoerli: "arbitrum", + }, + verify: { + etherscan: { + apiUrl: "https://blockscout.com/gnosis", + }, + }, + }, goerli: { chainId: 5, url: `https://goerli.infura.io/v3/${process.env.INFURA_API_KEY}`, diff --git a/contracts/package.json b/contracts/package.json index 8e741d3d..1029ddb4 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -38,8 +38,23 @@ "start": "hardhat node --tags nothing", "start-local": "hardhat node --tags ArbToEthOutbox,ArbToEthInbox", "deploy": "hardhat deploy", + "deploy:mainnet": "yarn deploy:ArbToEth && yarn deploy:ArbToGnosis", + "deploy:testnet": "yarn deploy:ArbToEthTestnet && yarn deploy:ArbToGnosisTestnet", + "deploy:devnet": "yarn deploy:ArbToEthDevnet && yarn deploy:ArbToGnosisDevnet", + "deploy:ArbToEth": "hardhat deploy --network mainnet --tags ArbToEthOutbox && hardhat deploy --network arbitrum --tags ArbToEthInbox", + "deploy:ArbToGnosis": "hardhat deploy --network gnosis --tags ArbToGnosisOutbox && hardhat deploy --network arbitrum --tags ArbToGnosisInbox && hardhat deploy --network mainnet --tags ArbToGnosisRouter", + "deploy:ArbToEthTestnet": "hardhat deploy --network goerli --tags ArbToEthOutbox && hardhat deploy --network arbitrumGoerli --tags ArbToEthInbox", + "deploy:ArbToGnosisTestnet": "hardhat deploy --network chiado --tags ArbToGnosisOutbox && hardhat deploy --network arbitrumGoerli --tags ArbToGnosisInbox && hardhat deploy --network goerli --tags ArbToGnosisRouter", + "deploy:ArbToEthDevnet": "hardhat deploy --network goerli --tags ArbGoerliToGoerliOutbox && hardhat deploy --network arbitrumGoerli --tags ArbGoerliToGoerliInbox", + "deploy:ArbToGnosisDevnet": "hardhat deploy --network chiado --tags ArbGoerliToChiadoOutbox && hardhat deploy --network arbitrumGoerli --tags ArbGoerliToChiadoInbox && hardhat deploy --network goerli --tags ArbGoerliToChiadoRouter", "deploy-local": "hardhat deploy --tags ArbToEthOutbox,ArbToEthInbox --network localhost", - "etherscan-verify": "hardhat etherscan-verify", + "etherscan-verify:testnet": "yarn etherscan-verify:chiado && yarn etherscan-verify:goerli && yarn etherscan-verify:arbitrumGoerli", + "etherscan-verify:gnosis": "hardhat etherscan-verify --network gnosischain", + "etherscan-verify:chiado": "hardhat etherscan-verify --network chiado", + "etherscan-verify:ethereum": "hardhat etherscan-verify --network ethereum", + "etherscan-verify:goerli": "hardhat etherscan-verify --network goerli", + "etherscan-verify:arbitrum": "hardhat etherscan-verify --network arbitrum", + "etherscan-verify:arbitrumGoerli": "hardhat etherscan-verify --network arbitrumGoerli", "sourcify": "hardhat sourcify --write-failing-metadata", "size": "hardhat size-contracts --no-compile", "watch": "hardhat watch", @@ -50,6 +65,7 @@ }, "devDependencies": { "@nomicfoundation/hardhat-chai-matchers": "^1.0.6", + "@nomicfoundation/hardhat-network-helpers": "^1.0.8", "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@0.3.0-beta.13", "@typechain/ethers-v5": "^10.2.0", "@typechain/hardhat": "^6.1.5", diff --git a/contracts/src/arbitrumToEth/VeaInboxArbToEth.sol b/contracts/src/arbitrumToEth/VeaInboxArbToEth.sol index 9346cc32..3d6c6efb 100644 --- a/contracts/src/arbitrumToEth/VeaInboxArbToEth.sol +++ b/contracts/src/arbitrumToEth/VeaInboxArbToEth.sol @@ -43,8 +43,10 @@ contract VeaInboxArbToEth is IVeaInbox { event MessageSent(bytes _nodeData); /// The bridgers can watch this event to claim the stateRoot on the veaOutbox. + /// @param _snapshot The snapshot of the merkle tree state root. + /// @param _epoch The epoch of the snapshot. /// @param _count The count of messages in the merkle tree. - event SnapshotSaved(uint64 _count); + event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count); /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge. /// @param _epochSent The epoch of the snapshot. @@ -70,7 +72,7 @@ contract VeaInboxArbToEth is IVeaInbox { /// @dev Sends an arbitrary message to Ethereum. /// `O(log(count))` where count is the number of messages already sent. /// Amortized cost is constant. - /// Note: See merkle tree docs for details how inbox manages state. + /// Note: See docs for details how inbox manages merkle tree state. /// @param _to The address of the contract on the receiving chain which receives the calldata. /// @param _fnSelector The function selector of the receiving contract. /// @param _data The message calldata, abi.encode(param1, param2, ...) @@ -85,8 +87,8 @@ contract VeaInboxArbToEth is IVeaInbox { bytes memory nodeData = abi.encodePacked( oldCount, _to, - // data for outbox relay - abi.encodePacked( // abi.encodeWithSelector(fnSelector, msg.sender, data) + // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data + abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...) _fnSelector, bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector _data @@ -132,7 +134,7 @@ contract VeaInboxArbToEth is IVeaInbox { } /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. - /// `O(log(count))` where count number of messages in the inbox. + /// `O(log(count))` where count number of messages in the inbox. /// Note: See merkle tree docs for details how inbox manages state. function saveSnapshot() external { uint256 epoch; @@ -174,12 +176,11 @@ contract VeaInboxArbToEth is IVeaInbox { snapshots[epoch] = stateRoot; - emit SnapshotSaved(count); + emit SnapshotSaved(stateRoot, epoch, count); } /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right. - /// note: EVM scratch space is used to efficiently calculate hashes. - /// @param _left The left hash. + /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash. /// @param _right The right hash. /// @return parent The parent hash. function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) { @@ -217,4 +218,21 @@ contract VeaInboxArbToEth is IVeaInbox { emit SnapshotSent(_epoch, ticketID); } + + // ************************************* // + // * Pure / Views * // + // ************************************* // + + /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock. + /// @return epoch The epoch associated with the current inbox block.timestamp + function epochNow() external view returns (uint256 epoch) { + epoch = block.timestamp / epochPeriod; + } + + /// @dev Get the epoch from the inbox's point of view using timestamp. + /// @param _timestamp The timestamp to calculate the epoch from. + /// @return epoch The calculated epoch. + function epochAt(uint256 _timestamp) external view returns (uint256 epoch) { + epoch = _timestamp / epochPeriod; + } } diff --git a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol index 6b27bdb8..9f668652 100644 --- a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol +++ b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol @@ -27,27 +27,41 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { uint256 internal immutable burn; // The amount of wei to burn. deposit / 2 uint256 internal immutable depositPlusReward; // 2 * deposit - burn - address internal constant BURN_ADDRESS = address(0); // address to send burned eth + address internal constant BURN_ADDRESS = address(0); // Address to send burned eth uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots. - uint256 public immutable challengePeriod; // Time window to challenge a claim. - uint256 public immutable claimDelay; // Can only claim for epochs after this delay (seconds) + uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer. uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown. uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period. - bytes32 public stateRoot; - uint256 public latestVerifiedEpoch; + bytes32 public stateRoot; // merkle root of the outbox state + uint256 public latestVerifiedEpoch; // The latest epoch that has been verified. mapping(uint256 => bytes32) public claimHashes; // epoch => claim mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message + uint256 public sequencerLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock. + SequencerLimitDecreaseRequest public sequencerLimitDecreaseRequest; // Decreasing the sequencerLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here. + + struct SequencerLimitDecreaseRequest { + uint256 requestedSequencerLimit; + uint256 timestamp; + } + + enum CensorshipTestStatus { + Failed, + Passed, + NotStarted, + InProgress + } + // ************************************* // // * Events * // // ************************************* // - /// @dev Watcher check this event to challenge fraud. + /// @dev Watchers check this event to challenge fraud. /// @param _claimer The address of the claimer. /// @param _stateRoot The state root of the claim. event Claimed(address indexed _claimer, bytes32 _stateRoot); @@ -61,24 +75,36 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { /// @param _msgId The msgId of the message that was relayed. event MessageRelayed(uint64 _msgId); + /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer. + /// @param _epoch The epoch that started verification. + event VerificationStarted(uint256 _epoch); + /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed. /// @param _epoch The epoch that was verified. event Verified(uint256 _epoch); + /// @dev This event indicates the sequencer limit updated. + /// @param _newSequencerLimit The new maxL2StateSyncDelay. + event SequencerLimitUpdated(uint256 _newSequencerLimit); + + /// @dev This event indicates that a request to decrease the sequencer limit has been made. + /// @param _requestedSequencerLimit The new sequencer limit requested. + event SequencerLimitDecreaseRequested(uint256 _requestedSequencerLimit); + // ************************************* // // * Function Modifiers * // // ************************************* // modifier OnlyBridgeRunning() { unchecked { - require(block.timestamp / epochPeriod <= latestVerifiedEpoch + timeoutEpochs, "Bridge Shutdown."); + require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, "Bridge Shutdown."); } _; } modifier OnlyBridgeShutdown() { unchecked { - require(block.timestamp / epochPeriod > latestVerifiedEpoch + timeoutEpochs, "Bridge Running."); + require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, "Bridge Running."); } _; } @@ -87,42 +113,29 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value /// @param _deposit The deposit amount to submit a claim in wei. /// @param _epochPeriod The duration of each epoch. - /// @param _challengePeriod The duration of the period allowing to challenge a claim. + /// @param _minChallengePeriod The minimum time window to challenge a claim. /// @param _timeoutEpochs The epochs before the bridge is considered shutdown. /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum. - /// @param _bridge The address of the arbitrum bridge contract on Ethereum. /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period. constructor( uint256 _deposit, uint256 _epochPeriod, - uint256 _challengePeriod, + uint256 _minChallengePeriod, uint256 _timeoutEpochs, address _veaInboxArbToEth, address _bridge, uint256 _maxMissingBlocks ) { - // sanity check to prevent underflow the deployer should have set these correctly. - require(0 < _epochPeriod && _epochPeriod <= block.timestamp, "Invalid epochPeriod."); - deposit = _deposit; // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value. epochPeriod = _epochPeriod; - challengePeriod = _challengePeriod; + minChallengePeriod = _minChallengePeriod; timeoutEpochs = _timeoutEpochs; veaInboxArbToEth = _veaInboxArbToEth; bridge = IBridge(_bridge); maxMissingBlocks = _maxMissingBlocks; - ISequencerInbox sequencerInbox = ISequencerInbox(bridge.sequencerInbox()); - // the maximum asynchronous lag between the L2 and L1 clocks - (, , uint256 arbitrumSequencerMaxDelaySeconds, ) = sequencerInbox.maxTimeVariation(); - - // adding the epochPeriod for the time for a node to sync - // in otherwords, this is the worst case time for an honest node to know the L2 state to claim / challenge - claimDelay = arbitrumSequencerMaxDelaySeconds + 2 * epochPeriod; - - // sanity check to prevent underflow - require(claimDelay <= block.timestamp, "Invalid claimDelay."); + updateSequencerLimit(); // claimant and challenger are not sybil resistant // must burn half deposit to prevent zero cost griefing @@ -132,6 +145,51 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { latestVerifiedEpoch = block.timestamp / epochPeriod - 1; } + // ************************************* // + // * Parameter Updates * // + // ************************************* // + + /// @dev Request to decrease the sequencerLimit. + function updateSequencerLimit() public { + // the maximum asynchronous lag between the L2 and L1 clocks + (, , uint256 newSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); + + if (newSequencerLimit > sequencerLimit) { + // For sequencerLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown. + sequencerLimit = newSequencerLimit; + emit SequencerLimitUpdated(newSequencerLimit); + } else if (newSequencerLimit < sequencerLimit) { + require(sequencerLimitDecreaseRequest.timestamp == 0, "Sequencer limit decrease request already pending."); + + sequencerLimitDecreaseRequest = SequencerLimitDecreaseRequest({ + requestedSequencerLimit: newSequencerLimit, + timestamp: block.timestamp + }); + + emit SequencerLimitDecreaseRequested(newSequencerLimit); + } + } + + /// @dev execute SequencerLimitDecreaseRequest + function executeSequencerLimitDecreaseRequest() external { + require(sequencerLimitDecreaseRequest.timestamp != 0, "No pending sequencer limit decrease request."); + require( + block.timestamp > sequencerLimitDecreaseRequest.timestamp + sequencerLimit, + "Sequencer limit decrease request is still pending." + ); + + uint256 requestedSequencerLimit = sequencerLimitDecreaseRequest.requestedSequencerLimit; + delete sequencerLimitDecreaseRequest; + + (, , uint256 currentSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); + + // check the request is still consistent with the arbiturm bridge + if (currentSequencerLimit == requestedSequencerLimit) { + sequencerLimit = requestedSequencerLimit; + emit SequencerLimitUpdated(requestedSequencerLimit); + } + } + // ************************************* // // * State Modifiers * // // ************************************* // @@ -143,81 +201,99 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { require(msg.value >= deposit, "Insufficient claim deposit."); unchecked { - require(block.timestamp / epochPeriod >= _epoch, "Epoch is in the future."); - require((block.timestamp - claimDelay) / epochPeriod <= _epoch, "Epoch is too old."); + require(_epoch < block.timestamp / epochPeriod, "Epoch has not yet passed."); + // Note: block.timestamp should be much larger than sequencerLimit, but we check in case Arbiturm governance updated this value. + if (block.timestamp > sequencerLimit) { + // Allow claims to be made within the sequencerLimit. + // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating. + require(_epoch + 1 >= (block.timestamp - sequencerLimit) / epochPeriod, "Epoch is too old."); + } } + require(_stateRoot != bytes32(0), "Invalid claim."); require(claimHashes[_epoch] == bytes32(0), "Claim already made."); claimHashes[_epoch] = hashClaim( Claim({ stateRoot: _stateRoot, claimer: msg.sender, - timestamp: uint32(0), - blocknumber: uint32(0), + timestampClaimed: uint32(block.timestamp), + timestampVerification: uint32(0), + blocknumberVerification: uint32(0), honest: Party.None, challenger: address(0) }) ); emit Claimed(msg.sender, _stateRoot); + + // Refund overpayment. + if (msg.value > deposit) { + uint256 refund = msg.value - deposit; + payable(msg.sender).send(refund); // User is responsible for accepting ETH. + } } - /// @dev Start verification for claim for 'epoch'. + /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'. /// @param _epoch The epoch of the claim to challenge. /// @param _claim The claim associated with the epoch. - function startClaimVerification(uint256 _epoch, Claim memory _claim) external payable virtual { + function challenge(uint256 _epoch, Claim memory _claim) external payable { require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); - require(_claim.timestamp == uint32(0), "Claim already challenged."); - require((block.timestamp - claimDelay) / epochPeriod >= _epoch, "Epoch is too old."); + require(msg.value >= deposit, "Insufficient challenge deposit."); + require(_claim.challenger == address(0), "Claim already challenged."); + require(_claim.honest == Party.None, "Claim already verified."); + + _claim.challenger = msg.sender; + claimHashes[_epoch] = hashClaim(_claim); - _claim.timestamp = uint32(block.timestamp); - _claim.blocknumber = uint32(block.number); - claimHashes[_epoch] == hashClaim(_claim); + emit Challenged(_epoch, msg.sender); + + // Refund overpayment. + if (msg.value > deposit) { + uint256 refund = msg.value - deposit; + payable(msg.sender).send(refund); // User is responsible for accepting ETH. + } } - /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'. + /// @dev Start verification for claim for 'epoch'. /// @param _epoch The epoch of the claim to challenge. /// @param _claim The claim associated with the epoch. - function challenge(uint256 _epoch, Claim memory _claim) external payable virtual { + function startVerification(uint256 _epoch, Claim memory _claim) external virtual { require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); - require(_claim.challenger == address(0), "Claim already challenged."); - require(msg.value >= deposit, "Insufficient challenge deposit."); - unchecked { - require(_claim.honest == Party.None, "Claim already verified."); - } + // sequencerLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock. + // using checked arithmetic incase arbitrum governance sets sequencerLimit to a large value + require( + block.timestamp >= _claim.timestampClaimed + sequencerLimit + epochPeriod, + "Claim must wait atleast maxL2StateSyncDelay." + ); + + CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim); + require( + censorshipTestStatus == CensorshipTestStatus.NotStarted || + censorshipTestStatus == CensorshipTestStatus.Failed, + "Claim verification in progress or already completed." + ); + + _claim.timestampVerification = uint32(block.timestamp); + _claim.blocknumberVerification = uint32(block.number); - _claim.challenger = msg.sender; claimHashes[_epoch] = hashClaim(_claim); - emit Challenged(_epoch, msg.sender); + emit VerificationStarted(_epoch); } /// @dev Resolves the optimistic claim for '_epoch'. /// @param _epoch The epoch of the optimistic claim. /// @param _claim The claim associated with the epoch. - function validateSnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning { + function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning { require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); - - unchecked { - require(_claim.timestamp != 0, "Claim verification not started."); - require(_claim.timestamp + challengePeriod < block.timestamp, "Challenge period has not yet elapsed."); - require( - // expected blocks <= actual blocks + maxMissingBlocks - uint256(_claim.blocknumber) + (block.timestamp - uint256(_claim.timestamp)) / SLOT_TIME <= - block.number + maxMissingBlocks, - "Too many missing blocks. Possible censorship attack. Use canonical bridge." - ); - } - require(_claim.challenger == address(0), "Claim is challenged."); + require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, "Censorship test not passed."); if (_epoch > latestVerifiedEpoch) { latestVerifiedEpoch = _epoch; - if (_claim.stateRoot != bytes32(0)) { - stateRoot = _claim.stateRoot; - } + stateRoot = _claim.stateRoot; emit Verified(_epoch); } @@ -229,7 +305,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { /// @dev Resolves any challenge of the optimistic claim for '_epoch'. /// @param _epoch The epoch to verify. /// @param _stateRoot The true state root for the epoch. - /// @param _claim The claim associated with the epoch + /// @param _claim The claim associated with the epoch. function resolveDisputedClaim( uint256 _epoch, bytes32 _stateRoot, @@ -241,8 +317,8 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50 // note: we call the bridge for the activeOutbox address - require(msg.sender == address(bridge), "Not from bridge."); - require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, "veaInbox only."); + require(msg.sender == address(bridge), "Not from native arbitrum bridge."); + require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, "veaInboxArbToEth only."); if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) { latestVerifiedEpoch = _epoch; @@ -250,7 +326,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { emit Verified(_epoch); } - if (claimHashes[_epoch] == hashClaim(_claim) && _claim.honest == Party.None) { + if (claimHashes[_epoch] == hashClaim(_claim)) { if (_claim.stateRoot == _stateRoot) { _claim.honest = Party.Claimer; } else if (_claim.challenger != address(0)) { @@ -261,10 +337,10 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { } /// @dev Verifies and relays the message. UNTRUSTED. - /// @param _proof The merkle proof to prove the message. + /// @param _proof The merkle proof to prove the message inclusion in the inbox state root. /// @param _msgId The zero based index of the message in the inbox. /// @param _to The address of the contract on Ethereum to call. - /// @param _message The message encoded with header from VeaInbox. + /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...) function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external { require(_proof.length < 64, "Proof too long."); @@ -405,22 +481,46 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { abi.encodePacked( _claim.stateRoot, _claim.claimer, - _claim.timestamp, - _claim.blocknumber, + _claim.timestampClaimed, + _claim.timestampVerification, + _claim.blocknumberVerification, _claim.honest, _claim.challenger ) ); } - /// @dev Claim passed censorship test + /// @dev Gets the status of the censorship test for claim. /// @param _claim The claim to test. - /// @return testPassed True if the claim passed the censorship test. - function passedTest(Claim calldata _claim) external view returns (bool testPassed) { - uint256 expectedBlocks = uint256(_claim.blocknumber) + - (block.timestamp - uint256(_claim.timestamp)) / - SLOT_TIME; - uint256 actualBlocks = block.number; - testPassed = (expectedBlocks <= actualBlocks + maxMissingBlocks); + /// @return status True if the claim passed the censorship test. + function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) { + unchecked { + if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted; + else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod) + status = CensorshipTestStatus.InProgress; + else { + uint256 expectedBlocks = uint256(_claim.blocknumberVerification) + + (block.timestamp - uint256(_claim.timestampVerification)) / + SLOT_TIME; + uint256 actualBlocks = block.number; + if (expectedBlocks - actualBlocks <= maxMissingBlocks) { + status = CensorshipTestStatus.Passed; + } else { + status = CensorshipTestStatus.Failed; + } + } + } + } + + /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock. + /// @return epoch The hash of the claim. + function epochNow() external view returns (uint256 epoch) { + epoch = block.timestamp / epochPeriod; + } + + /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock. + /// @return epoch The hash of the claim. + function epochAt(uint256 timestamp) external view returns (uint256 epoch) { + epoch = timestamp / epochPeriod; } } diff --git a/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol b/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol index 8ba60111..4dc9a68f 100644 --- a/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol @@ -11,8 +11,10 @@ pragma solidity 0.8.18; import "../canonical/gnosis-chain/IAMB.sol"; import "../canonical/arbitrum/IBridge.sol"; import "../canonical/arbitrum/IOutbox.sol"; +import "../canonical/arbitrum/ISequencerInbox.sol"; import "../interfaces/routers/IRouterToL1.sol"; import "../interfaces/outboxes/IVeaOutboxOnL1.sol"; +import "../interfaces/updaters/IArbitrumUpdatable.sol"; /// @dev Router from Arbitrum to Gnosis Chain. /// Note: This contract is deployed on Ethereum. @@ -26,6 +28,14 @@ contract RouterArbToGnosis is IRouterToL1 { address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum. address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain. + uint256 public sequencerLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock. + SequencerLimitDecreaseRequest public sequencerLimitDecreaseRequest; // Decreasing the sequencerLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here. + + struct SequencerLimitDecreaseRequest { + uint256 requestedSequencerLimit; + uint256 timestamp; + } + // ************************************* // // * Events * // // ************************************* // @@ -35,6 +45,18 @@ contract RouterArbToGnosis is IRouterToL1 { /// @param _ticketID The unique identifier provided by the underlying canonical bridge. event Routed(uint256 indexed _epoch, bytes32 _ticketID); + /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value + /// @param _ticketID The ticketID from the AMB of the cross-chain message. + event SequencerLimitSent(bytes32 _ticketID); + + /// @dev This event indicates the sequencer limit updated. + /// @param _newSequencerLimit The new maxL2StateSyncDelay. + event SequencerLimitUpdated(uint256 _newSequencerLimit); + + /// @dev This event indicates that a request to decrease the sequencer limit has been made. + /// @param _requestedSequencerLimit The new sequencer limit requested. + event SequencerLimitDecreaseRequested(uint256 _requestedSequencerLimit); + /// @dev Constructor. /// @param _bridge The address of the arbitrum bridge contract on Ethereum. /// @param _amb The address of the AMB contract on Ethereum. @@ -45,6 +67,61 @@ contract RouterArbToGnosis is IRouterToL1 { amb = _amb; veaInboxArbToGnosis = _veaInboxArbToGnosis; veaOutboxArbToGnosis = _veaOutboxArbToGnosis; + (, , sequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); + } + + // ************************************* // + // * Parameter Updates * // + // ************************************* // + + /// @dev Update the sequencerLimit. If decreasing, a delayed request is created for later execution. + function updateSequencerLimit() public { + // the maximum asynchronous lag between the L2 and L1 clocks + (, , uint256 newSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); + + if (newSequencerLimit > sequencerLimit) { + // For sequencerLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown. + sequencerLimit = newSequencerLimit; + emit SequencerLimitUpdated(newSequencerLimit); + sendSequencerLimit(); + } else if (newSequencerLimit < sequencerLimit) { + require(sequencerLimitDecreaseRequest.timestamp == 0, "Sequencer limit decrease request already pending."); + + sequencerLimitDecreaseRequest = SequencerLimitDecreaseRequest({ + requestedSequencerLimit: newSequencerLimit, + timestamp: block.timestamp + }); + emit SequencerLimitDecreaseRequested(newSequencerLimit); + } + } + + /// @dev execute SequencerLimitDecreaseRequest + function executeSequencerLimitDecreaseRequest() external { + require(sequencerLimitDecreaseRequest.timestamp != 0, "No pending sequencer limit decrease request."); + require( + block.timestamp > sequencerLimitDecreaseRequest.timestamp + sequencerLimit, + "Sequencer limit decrease request is still pending." + ); + + uint256 requestedSequencerLimit = sequencerLimitDecreaseRequest.requestedSequencerLimit; + delete sequencerLimitDecreaseRequest; + + (, , uint256 currentSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); + + // check the request is still consistent with the arbiturm bridge + if (currentSequencerLimit == requestedSequencerLimit) { + sequencerLimit = requestedSequencerLimit; + emit SequencerLimitUpdated(requestedSequencerLimit); + sendSequencerLimit(); + } + } + + /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge + function sendSequencerLimit() internal { + bytes memory data = abi.encodeCall(IArbitrumUpdatable.updateSequencerLimit, sequencerLimit); + // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit. + bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx()); + emit SequencerLimitSent(ticketID); } // ************************************* // diff --git a/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol b/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol index a2427150..702f7716 100644 --- a/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol @@ -22,7 +22,7 @@ contract VeaInboxArbToGnosis is IVeaInbox { // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys IArbSys internal constant ARB_SYS = IArbSys(address(100)); - uint256 public immutable epochPeriod; // Epochs mark the period between stateroot snapshots + uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots. address public immutable routerArbToGnosis; // The router on ethereum. mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot @@ -38,12 +38,14 @@ contract VeaInboxArbToGnosis is IVeaInbox { // ************************************* // /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum. - /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message) + /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message). event MessageSent(bytes _nodeData); /// The bridgers can watch this event to claim the stateRoot on the veaOutbox. + /// @param _snapshot The snapshot of the merkle tree state root. + /// @param _epoch The epoch of the snapshot. /// @param _count The count of messages in the merkle tree. - event SnapshotSaved(uint64 _count); + event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count); /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge. /// @param _epochSent The epoch of the snapshot. @@ -69,7 +71,7 @@ contract VeaInboxArbToGnosis is IVeaInbox { /// @dev Sends an arbitrary message to Gnosis. /// `O(log(count))` where count is the number of messages already sent. /// Amortized cost is constant. - /// Note: See merkle tree documentation for details how inbox manages state. + /// Note: See docs for details how inbox manages merkle tree state. /// @param _to The address of the contract on the receiving chain which receives the calldata. /// @param _fnSelector The function selector of the receiving contract. /// @param _data The message calldata, abi.encode(param1, param2, ...) @@ -84,8 +86,8 @@ contract VeaInboxArbToGnosis is IVeaInbox { bytes memory nodeData = abi.encodePacked( oldCount, _to, - // data for outbox relay - abi.encodePacked( // abi.encodeWithSelector(fnSelector, msg.sender, data) + // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data + abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...) _fnSelector, bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector _data @@ -140,8 +142,6 @@ contract VeaInboxArbToGnosis is IVeaInbox { unchecked { epoch = block.timestamp / epochPeriod; - require(snapshots[epoch] == bytes32(0), "Snapshot already taken for this epoch."); - // calculate the current root of the incremental merkle tree encoded in the inbox uint256 height; @@ -175,7 +175,7 @@ contract VeaInboxArbToGnosis is IVeaInbox { snapshots[epoch] = stateRoot; - emit SnapshotSaved(count); + emit SnapshotSaved(stateRoot, epoch, count); } /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right. @@ -203,7 +203,7 @@ contract VeaInboxArbToGnosis is IVeaInbox { /// @dev Sends the state root snapshot using Arbitrum's canonical bridge. /// @param _epoch The epoch of the snapshot requested to send. - /// @param _claim The claim associated with the epoch + /// @param _claim The claim associated with the epoch. function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual { unchecked { require(_epoch < block.timestamp / epochPeriod, "Can only send past epoch snapshot."); @@ -218,4 +218,21 @@ contract VeaInboxArbToGnosis is IVeaInbox { emit SnapshotSent(_epoch, ticketID); } + + // ************************************* // + // * Pure / Views * // + // ************************************* // + + /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock. + /// @return epoch The epoch associated with the current inbox block.timestamp + function epochNow() external view returns (uint256 epoch) { + epoch = block.timestamp / epochPeriod; + } + + /// @dev Get the epoch from the inbox's point of view using timestamp. + /// @param _timestamp The timestamp to calculate the epoch from. + /// @return epoch The calculated epoch. + function epochAt(uint256 _timestamp) external view returns (uint256 epoch) { + epoch = _timestamp / epochPeriod; + } } diff --git a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol index 7287c9a6..95e6a1e6 100644 --- a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol @@ -10,10 +10,11 @@ pragma solidity 0.8.18; import "../canonical/gnosis-chain/IAMB.sol"; import "../interfaces/outboxes/IVeaOutboxOnL1.sol"; +import "../interfaces/updaters/IArbitrumUpdatable.sol"; /// @dev Vea Outbox From Arbitrum to Gnosis. /// Note: This contract is deployed on Gnosis. -contract VeaOutboxArbToGnosis is IVeaOutboxOnL1 { +contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, IArbitrumUpdatable { // ************************************* // // * Storage * // // ************************************* // @@ -25,28 +26,36 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1 { uint256 internal immutable burn; // The amount of wei to burn. deposit / 2 uint256 internal immutable depositPlusReward; // 2 * deposit - burn - address internal constant BURN_ADDRESS = address(0); // address to send burned eth + address internal constant BURN_ADDRESS = address(0); // Address to send burned eth uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time - bytes32 internal constant ROUTER_CHAIN_ID = bytes32(uint256(1)); // Router chain is Ethereum L1 + uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB. uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots. - uint256 public immutable challengePeriod; // Claim challenge timewindow. - uint256 public immutable claimDelay; // Can only claim for epochs after this delay (seconds) + uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer. uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown. uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period. - bytes32 public stateRoot; - uint256 public latestVerifiedEpoch; + bytes32 public stateRoot; // merkle root of the outbox state + uint256 public latestVerifiedEpoch; // The latest epoch that has been verified. mapping(uint256 => bytes32) public claimHashes; // epoch => claim mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message + uint256 public sequencerLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock. + + enum CensorshipTestStatus { + Failed, + Passed, + NotStarted, + InProgress + } + // ************************************* // // * Events * // // ************************************* // - /// @dev Watcher check this event to challenge fraud. + /// @dev Watchers check this event to challenge fraud. /// @param _claimer The address of the claimer. /// @param _stateRoot The state root of the claim. event Claimed(address indexed _claimer, bytes32 _stateRoot); @@ -60,24 +69,32 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1 { /// @param _msgId The msgId of the message that was relayed. event MessageRelayed(uint64 _msgId); + /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer. + /// @param _epoch The epoch that started verification. + event VerificationStarted(uint256 _epoch); + /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed. /// @param _epoch The epoch that was verified. event Verified(uint256 _epoch); + /// @dev This event indicates the sequencer limit updated. + /// @param _newSequencerLimit The new maxL2StateSyncDelay. + event SequencerLimitUpdateReceived(uint256 _newSequencerLimit); + // ************************************* // // * Function Modifiers * // // ************************************* // modifier OnlyBridgeRunning() { unchecked { - require(block.timestamp / epochPeriod <= latestVerifiedEpoch + timeoutEpochs, "Bridge Shutdown."); + require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, "Bridge Shutdown."); } _; } modifier OnlyBridgeShutdown() { unchecked { - require(block.timestamp / epochPeriod > latestVerifiedEpoch + timeoutEpochs, "Bridge Running."); + require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, "Bridge Running."); } _; } @@ -86,30 +103,35 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1 { /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value /// @param _deposit The deposit amount to submit a claim in wei. /// @param _epochPeriod The duration of each epoch. - /// @param _challengePeriod The duration of the period allowing to challenge a claim. + /// @param _minChallengePeriod The minimum time window to challenge a claim. /// @param _timeoutEpochs The epochs before the bridge is considered shutdown. - /// @param _claimDelay The number of epochs after which the claim can be submitted. /// @param _amb The address of the AMB contract on Gnosis. /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Ethereum. + /// @param _sequencerLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions. /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period. + /// @param _routerChainId The chain id of the routerArbToGnosis. constructor( uint256 _deposit, uint256 _epochPeriod, - uint256 _challengePeriod, + uint256 _minChallengePeriod, uint256 _timeoutEpochs, - uint256 _claimDelay, IAMB _amb, address _routerArbToGnosis, - uint256 _maxMissingBlocks + uint256 _sequencerLimit, + uint256 _maxMissingBlocks, + uint256 _routerChainId ) { deposit = _deposit; + // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value. epochPeriod = _epochPeriod; - challengePeriod = _challengePeriod; timeoutEpochs = _timeoutEpochs; - claimDelay = _claimDelay; + minChallengePeriod = _minChallengePeriod; amb = _amb; routerArbToGnosis = _routerArbToGnosis; maxMissingBlocks = _maxMissingBlocks; + routerChainId = _routerChainId; + // This value is on another chain, so we can't read it, we trust the deployer to set a correct value. + sequencerLimit = _sequencerLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox // claimant and challenger are not sybil resistant // must burn half deposit to prevent zero cost griefing @@ -117,9 +139,23 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1 { depositPlusReward = 2 * _deposit - burn; latestVerifiedEpoch = block.timestamp / epochPeriod - 1; + } - // claimDelay should never be set this high, but we santiy check to prevent underflow - require(claimDelay <= block.timestamp, "Invalid epochClaimDelay."); + // ************************************* // + // * Parameter Updates * // + // ************************************* // + + /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge + /// @param _newSequencerLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract. + function updateSequencerLimit(uint256 _newSequencerLimit) external { + require(msg.sender == address(amb), "Not from bridge."); + require(bytes32(routerChainId) == amb.messageSourceChainId(), "Invalid chain id."); + require(routerArbToGnosis == amb.messageSender(), "Not from router."); + + if (sequencerLimit != _newSequencerLimit) { + sequencerLimit = _newSequencerLimit; + emit SequencerLimitUpdateReceived(_newSequencerLimit); + } } // ************************************* // @@ -133,7 +169,13 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1 { require(msg.value >= deposit, "Insufficient claim deposit."); unchecked { - require((block.timestamp - claimDelay) / epochPeriod == _epoch, "Invalid epoch."); + require(_epoch < block.timestamp / epochPeriod, "Epoch has not yet passed."); + // Note: block.timestamp should be much larger than sequencerLimit, but we check in case Arbiturm governance updated this value. + if (block.timestamp > sequencerLimit) { + // Allow claims to be made within the sequencerLimit. + // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating. + require(_epoch + 1 >= (block.timestamp - sequencerLimit) / epochPeriod, "Epoch is too old."); + } } require(_stateRoot != bytes32(0), "Invalid claim."); @@ -143,51 +185,79 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1 { Claim({ stateRoot: _stateRoot, claimer: msg.sender, - timestamp: uint32(block.timestamp), - blocknumber: uint32(block.number), + timestampClaimed: uint32(block.timestamp), + timestampVerification: uint32(0), + blocknumberVerification: uint32(0), honest: Party.None, challenger: address(0) }) ); emit Claimed(msg.sender, _stateRoot); + + // Refund overpayment. + if (msg.value > deposit) { + uint256 refund = msg.value - deposit; + payable(msg.sender).send(refund); // User is responsible for accepting ETH. + } } /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'. /// @param _epoch The epoch of the claim to challenge. /// @param _claim The claim associated with the epoch. - function challenge(uint256 _epoch, Claim memory _claim) external payable virtual { + function challenge(uint256 _epoch, Claim memory _claim) external payable { require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); - require(_claim.challenger == address(0), "Claim already challenged."); require(msg.value >= deposit, "Insufficient challenge deposit."); - - unchecked { - require(block.timestamp < uint256(_claim.timestamp) + challengePeriod, "Challenge period elapsed."); - } + require(_claim.challenger == address(0), "Claim already challenged."); + require(_claim.honest == Party.None, "Claim already verified."); _claim.challenger = msg.sender; claimHashes[_epoch] = hashClaim(_claim); emit Challenged(_epoch, msg.sender); + + // Refund overpayment. + if (msg.value > deposit) { + uint256 refund = msg.value - deposit; + payable(msg.sender).send(refund); // User is responsible for accepting ETH. + } } - /// @dev Resolves the optimistic claim for '_epoch'. - /// @param _epoch The epoch of the optimistic claim. + /// @dev Start verification for claim for 'epoch'. + /// @param _epoch The epoch of the claim to challenge. /// @param _claim The claim associated with the epoch. - function validateSnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning { + function startVerification(uint256 _epoch, Claim memory _claim) external virtual { require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); - unchecked { - require(_claim.timestamp + challengePeriod < block.timestamp, "Challenge period has not yet elapsed."); - require( - // expected blocks <= actual blocks + maxMissingBlocks - uint256(_claim.blocknumber) + (block.timestamp - uint256(_claim.timestamp)) / SLOT_TIME <= - block.number + maxMissingBlocks, - "Too many missing blocks. Possible censorship attack. Use canonical bridge." - ); - } + // sequencerLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock. + // using checked arithmetic incase arbitrum governance sets sequencerLimit to a large value + require( + block.timestamp >= _claim.timestampClaimed + sequencerLimit + epochPeriod, + "Claim must wait atleast maxL2StateSyncDelay." + ); + + CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim); + require( + censorshipTestStatus == CensorshipTestStatus.NotStarted || + censorshipTestStatus == CensorshipTestStatus.Failed, + "Claim verification in progress or already completed." + ); + + _claim.timestampVerification = uint32(block.timestamp); + _claim.blocknumberVerification = uint32(block.number); + + claimHashes[_epoch] = hashClaim(_claim); + + emit VerificationStarted(_epoch); + } + /// @dev Resolves the optimistic claim for '_epoch'. + /// @param _epoch The epoch of the optimistic claim. + /// @param _claim The claim associated with the epoch. + function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning { + require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); require(_claim.challenger == address(0), "Claim is challenged."); + require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, "Censorship test not passed."); if (_epoch > latestVerifiedEpoch) { latestVerifiedEpoch = _epoch; @@ -212,8 +282,8 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1 { // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge. // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge - require(msg.sender == address(amb), "Not from bridge."); - require(ROUTER_CHAIN_ID == amb.messageSourceChainId(), "Invalid chain id."); + require(msg.sender == address(amb), "Not from native Gnosis AMB bridge."); + require(bytes32(routerChainId) == amb.messageSourceChainId(), "Invalid chain id."); require(routerArbToGnosis == amb.messageSender(), "Not from router."); if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) { @@ -222,7 +292,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1 { emit Verified(_epoch); } - if (claimHashes[_epoch] == hashClaim(_claim) && _claim.honest == Party.None) { + if (claimHashes[_epoch] == hashClaim(_claim)) { if (_claim.stateRoot == _stateRoot) { _claim.honest = Party.Claimer; } else if (_claim.challenger != address(0)) { @@ -233,10 +303,10 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1 { } /// @dev Verifies and relays the message. UNTRUSTED. - /// @param _proof The merkle proof to prove the message. + /// @param _proof The merkle proof to prove the message inclusion in the inbox state root. /// @param _msgId The zero based index of the message in the inbox. /// @param _to The address of the contract on Gnosis to call. - /// @param _message The message encoded with header from VeaInbox. + /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...) function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external { require(_proof.length < 64, "Proof too long."); @@ -377,22 +447,46 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1 { abi.encodePacked( _claim.stateRoot, _claim.claimer, - _claim.timestamp, - _claim.blocknumber, + _claim.timestampClaimed, + _claim.timestampVerification, + _claim.blocknumberVerification, _claim.honest, _claim.challenger ) ); } - /// @dev Claim passed censorship test + /// @dev Gets the status of the censorship test for claim. /// @param _claim The claim to test. - /// @return testPassed True if the claim passed the censorship test. - function passedTest(Claim calldata _claim) external view returns (bool testPassed) { - uint256 expectedBlocks = uint256(_claim.blocknumber) + - (block.timestamp - uint256(_claim.timestamp)) / - SLOT_TIME; - uint256 actualBlocks = block.number; - testPassed = (expectedBlocks <= actualBlocks + maxMissingBlocks); + /// @return status True if the claim passed the censorship test. + function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) { + unchecked { + if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted; + else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod) + status = CensorshipTestStatus.InProgress; + else { + uint256 expectedBlocks = uint256(_claim.blocknumberVerification) + + (block.timestamp - uint256(_claim.timestampVerification)) / + SLOT_TIME; + uint256 actualBlocks = block.number; + if (expectedBlocks - actualBlocks <= maxMissingBlocks) { + status = CensorshipTestStatus.Passed; + } else { + status = CensorshipTestStatus.Failed; + } + } + } + } + + /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock. + /// @return epoch The hash of the claim. + function epochNow() external view returns (uint256 epoch) { + epoch = block.timestamp / epochPeriod; + } + + /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock. + /// @return epoch The hash of the claim. + function epochAt(uint256 timestamp) external view returns (uint256 epoch) { + epoch = timestamp / epochPeriod; } } diff --git a/contracts/src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol b/contracts/src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol index 14857e49..dfee9b01 100644 --- a/contracts/src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol +++ b/contracts/src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol @@ -34,11 +34,6 @@ contract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth { /// @param _stateRoot The state root to claim. function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator { require(msg.value >= deposit, "Insufficient claim deposit."); - - unchecked { - require((block.timestamp - claimDelay) / epochPeriod == _epoch, "Invalid epoch."); - } - require(_stateRoot != bytes32(0), "Invalid claim."); require(claimHashes[_epoch] == bytes32(0), "Claim already made."); @@ -46,32 +41,35 @@ contract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth { Claim({ stateRoot: _stateRoot, claimer: msg.sender, - timestamp: uint32(block.timestamp), - blocknumber: uint32(block.number), + timestampClaimed: uint32(block.timestamp), + timestampVerification: uint32(0), + blocknumberVerification: uint32(0), honest: Party.None, challenger: address(0) }) ); emit Claimed(msg.sender, _stateRoot); + + // Refund overpayment. + if (msg.value > deposit) { + uint256 refund = msg.value - deposit; + payable(msg.sender).send(refund); // User is responsible for accepting ETH. + } } - /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'. + /// @dev Start verification for claim for 'epoch'. /// @param _epoch The epoch of the claim to challenge. /// @param _claim The claim associated with the epoch. - function challenge(uint256 _epoch, Claim memory _claim) external payable override onlyByDevnetOperator { + function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator { require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); - require(_claim.challenger == address(0), "Claim already challenged."); - require(msg.value >= deposit, "Insufficient challenge deposit."); - unchecked { - require(block.timestamp < uint256(_claim.timestamp) + challengePeriod, "Challenge period elapsed."); - } + _claim.timestampVerification = uint32(block.timestamp); + _claim.blocknumberVerification = uint32(block.number); - _claim.challenger = msg.sender; claimHashes[_epoch] = hashClaim(_claim); - emit Challenged(_epoch, msg.sender); + emit VerificationStarted(_epoch); } /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged. @@ -92,31 +90,20 @@ contract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth { } /// @dev Resolves the optimistic claim for '_epoch'. - /// @param epoch The epoch of the optimistic claim. + /// @param _epoch The epoch of the optimistic claim. /// @param _claim The claim associated with the epoch. - function validateSnapshot(uint256 epoch, Claim memory _claim) public override OnlyBridgeRunning { - require(claimHashes[epoch] == hashClaim(_claim), "Invalid claim."); - - unchecked { - require(_claim.timestamp + challengePeriod <= block.timestamp, "Challenge period has not yet elapsed."); - require( - // expected blocks <= actual blocks + maxMissingBlocks - uint256(_claim.blocknumber) + (block.timestamp - uint256(_claim.timestamp)) / SLOT_TIME <= - block.number + maxMissingBlocks, - "Too many missing blocks. Possible censorship attack. Use canonical bridge." - ); - } - + function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning { + require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); require(_claim.challenger == address(0), "Claim is challenged."); - if (epoch > latestVerifiedEpoch) { - latestVerifiedEpoch = epoch; + if (_epoch > latestVerifiedEpoch) { + latestVerifiedEpoch = _epoch; stateRoot = _claim.stateRoot; - emit Verified(epoch); + emit Verified(_epoch); } _claim.honest = Party.Claimer; - claimHashes[epoch] = hashClaim(_claim); + claimHashes[_epoch] = hashClaim(_claim); } /// @dev Testnet operator utility function to claim, validate and withdraw. @@ -124,28 +111,22 @@ contract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth { /// @param _stateroot The state root to claim. function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable { claim(_epoch, _stateroot); - validateSnapshot( - _epoch, - Claim({ - stateRoot: _stateroot, - claimer: msg.sender, - timestamp: uint32(block.timestamp), - blocknumber: uint32(block.number), - honest: Party.None, - challenger: address(0) - }) - ); - withdrawClaimDeposit( - _epoch, - Claim({ - stateRoot: _stateroot, - claimer: msg.sender, - timestamp: uint32(block.timestamp), - blocknumber: uint32(block.number), - honest: Party.Claimer, - challenger: address(0) - }) - ); + Claim memory claim = Claim({ + stateRoot: _stateroot, + claimer: msg.sender, + timestampClaimed: uint32(block.timestamp), + timestampVerification: uint32(0), + blocknumberVerification: uint32(0), + honest: Party.None, + challenger: address(0) + }); + claim.timestampClaimed = uint32(block.timestamp); + startVerification(_epoch, claim); + claim.timestampVerification = uint32(block.timestamp); + claim.blocknumberVerification = uint32(block.number); + verifySnapshot(_epoch, claim); + claim.honest = Party.Claimer; + withdrawClaimDeposit(_epoch, claim); } /// @dev Constructor. @@ -153,7 +134,6 @@ contract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth { /// @param _epochPeriod The duration of each epoch. /// @param _challengePeriod The duration of the period allowing to challenge a claim. /// @param _timeoutEpochs The epochs before the bridge is considered shutdown. - /// @param _epochClaimDelay The number of epochs a claim can be submitted for. /// @param _veaInboxArbToEthDevnet The address of the devnet vea inbox on Arbitrum to Ethereum. /// @param _bridge The address of the Arbitrum bridge contract on Ethereum. /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period. @@ -162,7 +142,6 @@ contract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth { uint256 _epochPeriod, uint256 _challengePeriod, uint256 _timeoutEpochs, - uint256 _epochClaimDelay, address _veaInboxArbToEthDevnet, address _bridge, uint256 _maxMissingBlocks @@ -172,7 +151,6 @@ contract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth { _epochPeriod, _challengePeriod, _timeoutEpochs, - _epochClaimDelay, _veaInboxArbToEthDevnet, _bridge, _maxMissingBlocks diff --git a/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol b/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol index 42cd62e5..c8e112b2 100644 --- a/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol +++ b/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol @@ -32,13 +32,8 @@ contract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis { /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit. /// @param _epoch The epoch for which the claim is made. /// @param _stateRoot The state root to claim. - function claim(uint256 _epoch, bytes32 _stateRoot) public payable override { + function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator { require(msg.value >= deposit, "Insufficient claim deposit."); - require(msg.sender == devnetOperator, "Invalid Testnet Operator"); - - unchecked { - require((block.timestamp - claimDelay) / epochPeriod == _epoch, "Invalid epoch."); - } require(_stateRoot != bytes32(0), "Invalid claim."); require(claimHashes[_epoch] == bytes32(0), "Claim already made."); @@ -47,8 +42,9 @@ contract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis { Claim({ stateRoot: _stateRoot, claimer: msg.sender, - timestamp: uint32(block.timestamp), - blocknumber: uint32(block.number), + timestampClaimed: uint32(block.timestamp), + timestampVerification: uint32(0), + blocknumberVerification: uint32(0), honest: Party.None, challenger: address(0) }) @@ -57,28 +53,23 @@ contract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis { emit Claimed(msg.sender, _stateRoot); } - /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'. + /// @dev Start verification for claim for 'epoch'. /// @param _epoch The epoch of the claim to challenge. /// @param _claim The claim associated with the epoch. - function challenge(uint256 _epoch, Claim memory _claim) external payable override { + function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator { require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); - require(_claim.challenger == address(0), "Claim already challenged."); - require(msg.value >= deposit, "Insufficient challenge deposit."); - require(msg.sender == devnetOperator, "Invalid Testnet Operator"); - unchecked { - require(block.timestamp < uint256(_claim.timestamp) + challengePeriod, "Challenge period elapsed."); - } + _claim.timestampVerification = uint32(block.timestamp); + _claim.blocknumberVerification = uint32(block.number); - _claim.challenger = msg.sender; claimHashes[_epoch] = hashClaim(_claim); - emit Challenged(_epoch, msg.sender); + emit VerificationStarted(_epoch); } /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged. - /// @param _epoch The epoch associated with the claim deposit to withraw. /// @param _claim The claim associated with the epoch. + /// @param _epoch The epoch associated with the claim deposit to withraw. function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override { require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); require(_claim.honest == Party.Claimer, "Claim failed."); @@ -96,19 +87,8 @@ contract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis { /// @dev Resolves the optimistic claim for '_epoch'. /// @param _epoch The epoch of the optimistic claim. /// @param _claim The claim associated with the epoch. - function validateSnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning { + function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning { require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); - - unchecked { - require(_claim.timestamp + challengePeriod <= block.timestamp, "Challenge period has not yet elapsed."); - require( - // expected blocks <= actual blocks + maxMissingBlocks - uint256(_claim.blocknumber) + (block.timestamp - uint256(_claim.timestamp)) / SLOT_TIME <= - block.number + maxMissingBlocks, - "Too many missing blocks. Possible censorship attack. Use canonical bridge." - ); - } - require(_claim.challenger == address(0), "Claim is challenged."); if (_epoch > latestVerifiedEpoch) { @@ -126,28 +106,22 @@ contract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis { /// @param _stateroot The state root to claim. function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable { claim(_epoch, _stateroot); - validateSnapshot( - _epoch, - Claim({ - stateRoot: _stateroot, - claimer: msg.sender, - timestamp: uint32(block.timestamp), - blocknumber: uint32(block.number), - honest: Party.None, - challenger: address(0) - }) - ); - withdrawClaimDeposit( - _epoch, - Claim({ - stateRoot: _stateroot, - claimer: msg.sender, - timestamp: uint32(block.timestamp), - blocknumber: uint32(block.number), - honest: Party.Claimer, - challenger: address(0) - }) - ); + Claim memory claim = Claim({ + stateRoot: _stateroot, + claimer: msg.sender, + timestampClaimed: uint32(block.timestamp), + timestampVerification: uint32(0), + blocknumberVerification: uint32(0), + honest: Party.None, + challenger: address(0) + }); + claim.timestampClaimed = uint32(block.timestamp); + startVerification(_epoch, claim); + claim.timestampVerification = uint32(block.timestamp); + claim.blocknumberVerification = uint32(block.number); + verifySnapshot(_epoch, claim); + claim.honest = Party.Claimer; + withdrawClaimDeposit(_epoch, claim); } /// @dev Constructor. @@ -155,29 +129,32 @@ contract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis { /// @param _epochPeriod The duration of each epoch. /// @param _challengePeriod The duration of the period allowing to challenge a claim. /// @param _timeoutEpochs The epochs before the bridge is considered shutdown. - /// @param _claimDelay The number of epochs a claim can be submitted for. /// @param _amb The address of the AMB contract on Gnosis. /// @param _routerArbToGnosisDevnet The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado. /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period. + /// @param _sequencerLimit The maximum number of sequencer messages that can be submitted in a challenge period. + /// @param _routerChainId The chain id of the router contract. constructor( uint256 _deposit, uint256 _epochPeriod, uint256 _challengePeriod, uint256 _timeoutEpochs, - uint256 _claimDelay, IAMB _amb, address _routerArbToGnosisDevnet, - uint256 _maxMissingBlocks + uint256 _maxMissingBlocks, + uint256 _sequencerLimit, + uint256 _routerChainId ) VeaOutboxArbToGnosis( _deposit, _epochPeriod, _challengePeriod, _timeoutEpochs, - _claimDelay, _amb, _routerArbToGnosisDevnet, - _maxMissingBlocks + _maxMissingBlocks, + sequencerLimit, + _routerChainId ) { devnetOperator = msg.sender; diff --git a/contracts/src/interfaces/outboxes/IVeaOutboxOnL2.sol b/contracts/src/interfaces/outboxes/IVeaOutboxOnL2.sol index cdbab6e5..e6fd3cc8 100644 --- a/contracts/src/interfaces/outboxes/IVeaOutboxOnL2.sol +++ b/contracts/src/interfaces/outboxes/IVeaOutboxOnL2.sol @@ -8,7 +8,7 @@ pragma solidity 0.8.18; -/// @dev Interface of the Vea Outbox on L2s like Arbitrum, Optimism, Base, Specular where storage is inexpensive. +/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata. interface IVeaOutboxOnL2 { /// @dev Verifies and relays the message. /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication. diff --git a/contracts/src/interfaces/types/VeaClaim.sol b/contracts/src/interfaces/types/VeaClaim.sol index 6fa4f366..8f9cf5fb 100644 --- a/contracts/src/interfaces/types/VeaClaim.sol +++ b/contracts/src/interfaces/types/VeaClaim.sol @@ -17,8 +17,9 @@ enum Party { struct Claim { bytes32 stateRoot; address claimer; - uint32 timestamp; - uint32 blocknumber; + uint32 timestampClaimed; + uint32 timestampVerification; + uint32 blocknumberVerification; Party honest; address challenger; } diff --git a/contracts/src/interfaces/updaters/IArbitrumUpdatable.sol b/contracts/src/interfaces/updaters/IArbitrumUpdatable.sol new file mode 100644 index 00000000..c71bd586 --- /dev/null +++ b/contracts/src/interfaces/updaters/IArbitrumUpdatable.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT + +/// @custom:authors: [@jaybuidl, @shotaronowhere] +/// @custom:reviewers: [] +/// @custom:auditors: [] +/// @custom:bounties: [] +/// @custom:deployments: [] + +pragma solidity 0.8.18; + +/// @dev Interface of a contract which is updatable, receiving parameter updates from the Arbitrum Bridge through a cross-chain call. +/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an IArbitrumUpdateable contract which receives updates from the router on Ethereum. +interface IArbitrumUpdatable { + /// @dev Updates the sequencer limit. + /// Note: Access restricted to ensure the argument is passed from the Arbitrum Sequencer contract. + /// @param _newSequencerLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract. + function updateSequencerLimit(uint256 _newSequencerLimit) external; +} diff --git a/contracts/src/test/ArbitrumToEth/VeaOutboxMockArbToEth.sol b/contracts/src/test/ArbitrumToEth/VeaOutboxMockArbToEth.sol index 5ace364f..99ca8e85 100644 --- a/contracts/src/test/ArbitrumToEth/VeaOutboxMockArbToEth.sol +++ b/contracts/src/test/ArbitrumToEth/VeaOutboxMockArbToEth.sol @@ -23,20 +23,7 @@ contract VeaOutboxMockArbToEth is VeaOutboxArbToEth { bytes32 _stateRoot, Claim memory _claim ) external override OnlyBridgeRunning { - require( - claimHashes[_epoch] == - keccak256( - abi.encodePacked( - _claim.stateRoot, - _claim.claimer, - _claim.timestamp, - _claim.blocknumber, - _claim.honest, - _claim.challenger - ) - ), - "Invalid claim." - ); + require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); require(msg.sender == address(arbSys), "Not from bridge."); @@ -59,34 +46,32 @@ contract VeaOutboxMockArbToEth is VeaOutboxArbToEth { } /// @dev Constructor. + /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value /// @param _arbSys The mocked ArbSys. /// @param _deposit The deposit amount to submit a claim in wei. /// @param _epochPeriod The duration of each epoch. - /// @param _challengePeriod The duration of the period allowing to challenge a claim. + /// @param _minChallengePeriod The minimum time window to challenge a claim. /// @param _timeoutEpochs The epochs before the bridge is considered shutdown. - /// @param _epochClaimDelay The number of epochs a claim can be submitted for. - /// @param _veaInbox The address of the inbox contract on Arbitrum. - /// @param _inbox The address of the inbox contract on Ethereum. + /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum. + /// @param _bridge The address of the arbitrum bridge contract on Ethereum. /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period. constructor( IArbSys _arbSys, uint256 _deposit, uint256 _epochPeriod, - uint256 _challengePeriod, + uint256 _minChallengePeriod, uint256 _timeoutEpochs, - uint256 _epochClaimDelay, - address _veaInbox, - address _inbox, + address _veaInboxArbToEth, + address _bridge, uint256 _maxMissingBlocks ) VeaOutboxArbToEth( _deposit, _epochPeriod, - _challengePeriod, + _minChallengePeriod, _timeoutEpochs, - _epochClaimDelay, - _veaInbox, - _inbox, + _veaInboxArbToEth, + _bridge, _maxMissingBlocks ) { diff --git a/contracts/src/test/bridge-mocks/arbitrum/BridgeMock.sol b/contracts/src/test/bridge-mocks/arbitrum/BridgeMock.sol index 7caef686..67baa9a6 100644 --- a/contracts/src/test/bridge-mocks/arbitrum/BridgeMock.sol +++ b/contracts/src/test/bridge-mocks/arbitrum/BridgeMock.sol @@ -12,8 +12,10 @@ import "../../../canonical/arbitrum/IBridge.sol"; contract BridgeMock is IBridge { address public outbox; + address public sequencerInbox; - constructor(address _outbox) { + constructor(address _outbox, address _sequencerInbox) { + sequencerInbox = _sequencerInbox; outbox = _outbox; } diff --git a/contracts/src/test/bridge-mocks/arbitrum/SequencerInboxMock.sol b/contracts/src/test/bridge-mocks/arbitrum/SequencerInboxMock.sol new file mode 100644 index 00000000..b2dc3e3e --- /dev/null +++ b/contracts/src/test/bridge-mocks/arbitrum/SequencerInboxMock.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT + +/// @custom:authors: [@hrishibhat, @adi274] +/// @custom:reviewers: [] +/// @custom:auditors: [] +/// @custom:bounties: [] +/// @custom:deployments: [] + +pragma solidity 0.8.18; + +import "../../../canonical/arbitrum/ISequencerInbox.sol"; + +contract SequencerInboxMock is ISequencerInbox { + uint256 public delaySeconds; + + constructor(uint256 _delaySeconds) { + delaySeconds = _delaySeconds; + } + + function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256) { + return (0, 0, delaySeconds, 0); + } +} diff --git a/contracts/test/integration/ArbToEth.ts b/contracts/test/integration/ArbToEth.ts index 5ac34adc..b4ad068c 100644 --- a/contracts/test/integration/ArbToEth.ts +++ b/contracts/test/integration/ArbToEth.ts @@ -3,6 +3,7 @@ import { deployments, ethers, getNamedAccounts, network } from "hardhat"; import "@nomiclabs/hardhat-ethers"; import { BigNumber, utils } from "ethers"; import "@nomiclabs/hardhat-ethers"; +const { mine } = require("@nomicfoundation/hardhat-network-helpers"); import { VeaOutboxMockArbToEth as VeaOutboxMock, @@ -70,12 +71,12 @@ describe("Integration tests", async () => { // veaOutbox expect(await veaOutbox.deposit()).to.equal(TEN_ETH); expect(await veaOutbox.epochPeriod()).to.equal(EPOCH_PERIOD); - expect(await veaOutbox.challengePeriod()).to.equal(CHALLENGE_PERIOD); + expect(await veaOutbox.minChallengePeriod()).to.equal(CHALLENGE_PERIOD); expect(await veaOutbox.veaInboxArbToEth()).to.equal(veaInbox.address); expect(await veaOutbox.bridge()).to.equal(bridge.address); - // ReceiverGateway expect(await receiverGateway.veaOutbox()).to.equal(veaOutbox.address); + expect(await receiverGateway.senderGateway()).to.equal(senderGateway.address); }); @@ -83,13 +84,9 @@ describe("Integration tests", async () => { it("should send the fastMessage", async () => { // sending sample data through the fast Bridge const data = 1121; - const sendMessageTx = await senderGateway.sendMessage(data); - const sendMessageTx2 = await senderGateway.sendMessage(data); - const sendMessageTx3 = await senderGateway.sendMessage(data); - const sendMessageTx4 = await senderGateway.sendMessage(data); - const sendMessageTx5 = await senderGateway.sendMessage(data); - const sendMessageTx6 = await senderGateway.sendMessage(data); - const sendMessageTx7 = await senderGateway.sendMessage(data); + for (let i = 0; i < 10; i++) { + await senderGateway.sendMessage(data); + } await veaInbox.connect(bridger).saveSnapshot(); }); @@ -97,11 +94,7 @@ describe("Integration tests", async () => { // should revert if No messages have been sent yet. const data = 1121; - let sendMessageTx = await senderGateway.sendMessage(data); - - const currentBlockNum = ethers.provider.getBlockNumber(); - const currentTimestamp = (await ethers.provider.getBlock(currentBlockNum)).timestamp; - const currentEpoch = Math.floor(currentTimestamp / EPOCH_PERIOD); + await senderGateway.sendMessage(data); await veaInbox.connect(bridger).saveSnapshot(); @@ -117,18 +110,19 @@ describe("Integration tests", async () => { it("should be able to claim", async () => { const data = 1121; - const sendMessagetx = await senderGateway.sendMessage(data); - - const sendBatchTx = await veaInbox.connect(bridger).saveSnapshot(); + await senderGateway.sendMessage(data); + await veaInbox.connect(bridger).saveSnapshot(); const BatchOutgoing = veaInbox.filters.SnapshotSaved(); const batchOutGoingEvent = await veaInbox.queryFilter(BatchOutgoing); - const epoch = Math.floor( - (await batchOutGoingEvent[0].getBlock()).timestamp / (await veaInbox.epochPeriod()).toNumber() - ); + const epochPeriod = (await veaInbox.epochPeriod()).toNumber(); + const epoch = Math.floor((await batchOutGoingEvent[0].getBlock()).timestamp / epochPeriod); const batchMerkleRoot = await veaInbox.snapshots(epoch); const invalidEpoch = BigNumber.from(2).add(epoch); + await network.provider.send("evm_increaseTime", [epochPeriod]); + await network.provider.send("evm_mine"); + await expect( veaOutbox.connect(bridger).claim(epoch, batchMerkleRoot, { value: ONE_HUNDREDTH_ETH }) ).to.be.revertedWith("Insufficient claim deposit."); @@ -139,7 +133,7 @@ describe("Integration tests", async () => { await expect( veaOutbox.connect(bridger).claim(invalidEpoch, batchMerkleRoot, { value: TEN_ETH }) - ).to.be.revertedWith("Invalid epoch."); + ).to.be.revertedWith("Epoch has not yet passed."); const bridgerClaimTx = await veaOutbox.connect(bridger).claim(epoch, batchMerkleRoot, { value: TEN_ETH }); @@ -154,11 +148,12 @@ describe("Integration tests", async () => { // should fail for invalid epochs await expect( - veaOutbox.connect(bridger).validateSnapshot(0, { + veaOutbox.connect(bridger).verifySnapshot(0, { stateRoot: ethers.constants.HashZero, claimer: bridger.address, - timestamp: 0, - blocknumber: 0, + timestampClaimed: 0, + timestampVerification: 0, + blocknumberVerification: 0, honest: 0, challenger: challenger.address, }) @@ -166,15 +161,17 @@ describe("Integration tests", async () => { // sending sample data through the fast bridge const data = 1121; - const sendMessagetx = await senderGateway.sendMessage(data); - - const sendBatchTx = await veaInbox.connect(bridger).saveSnapshot(); + await senderGateway.sendMessage(data); + await veaInbox.connect(bridger).saveSnapshot(); const BatchOutgoing = veaInbox.filters.SnapshotSaved(); const batchOutGoingEvent = await veaInbox.queryFilter(BatchOutgoing); - const epoch = Math.floor( - (await batchOutGoingEvent[0].getBlock()).timestamp / (await veaInbox.epochPeriod()).toNumber() - ); + const epochPeriod = (await veaInbox.epochPeriod()).toNumber(); + const epoch = Math.floor((await batchOutGoingEvent[0].getBlock()).timestamp / epochPeriod); + + await network.provider.send("evm_increaseTime", [epochPeriod]); + await network.provider.send("evm_mine"); + const batchMerkleRoot = await veaInbox.snapshots(epoch); // Honest Bridger @@ -183,28 +180,59 @@ describe("Integration tests", async () => { // should revert as the challenge period has not passed await expect( - veaOutbox.connect(bridger).validateSnapshot(epoch, { + veaOutbox.connect(bridger).startVerification(epoch, { stateRoot: batchMerkleRoot, claimer: bridger.address, - timestamp: blockClaim.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, + timestampClaimed: blockClaim.timestamp, + timestampVerification: 0, + blocknumberVerification: 0, honest: 0, challenger: ethers.constants.AddressZero, }) - ).to.be.revertedWith("Challenge period has not yet elapsed."); + ).to.be.revertedWith("Claim must wait atleast maxL2StateSyncDelay."); - // wait for challenge period (and epoch) to pass - console.log("block number"); - console.log(bridgerClaimTx.blockNumber); - const block = await ethers.provider.getBlock(bridgerClaimTx.blockNumber!); - await network.provider.send("evm_increaseTime", [1800]); + const maxL2StateSyncDelay = (await veaOutbox.sequencerLimit()).toNumber() + epochPeriod / 2; + await network.provider.send("evm_increaseTime", [epochPeriod + maxL2StateSyncDelay]); + await network.provider.send("evm_mine"); + + const startValidationTxn = await veaOutbox.startVerification(epoch, { + stateRoot: batchMerkleRoot, + claimer: bridger.address, + timestampClaimed: blockClaim.timestamp, + timestampVerification: 0, + blocknumberVerification: 0, + honest: 0, + challenger: ethers.constants.AddressZero, + }); + await expect(startValidationTxn).to.emit(veaOutbox, "VerificationStarted").withArgs(epoch); + + const blockStartValidation = await ethers.provider.getBlock(startValidationTxn.blockNumber!); + + const minChallengePeriod = (await veaOutbox.minChallengePeriod()).toNumber(); + await network.provider.send("evm_increaseTime", [minChallengePeriod]); await network.provider.send("evm_mine"); - const bridgerVerifyBatchTx = await veaOutbox.connect(bridger).validateSnapshot(epoch, { + await expect( + veaOutbox.verifySnapshot(epoch, { + stateRoot: batchMerkleRoot, + claimer: bridger.address, + timestampClaimed: blockClaim.timestamp, + timestampVerification: blockStartValidation.timestamp!, + blocknumberVerification: startValidationTxn.blockNumber!, + honest: 0, + challenger: ethers.constants.AddressZero, + }) + ).to.be.revertedWith("Censorship test not passed."); + + const blocksToMine = Math.ceil(minChallengePeriod / 12); + await mine(blocksToMine); + + const verifySnapshotTxn = await veaOutbox.connect(bridger).verifySnapshot(epoch, { stateRoot: batchMerkleRoot, claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, + timestampClaimed: blockClaim.timestamp, + timestampVerification: blockStartValidation.timestamp!, + blocknumberVerification: startValidationTxn.blockNumber!, honest: 0, challenger: ethers.constants.AddressZero, }); @@ -248,19 +276,45 @@ describe("Integration tests", async () => { (await batchOutGoingEvent[0].getBlock()).timestamp / (await veaInbox.epochPeriod()).toNumber() ); const batchMerkleRoot = await veaInbox.snapshots(epoch); + // Honest Bridger + const epochPeriod = (await veaInbox.epochPeriod()).toNumber(); + + await network.provider.send("evm_increaseTime", [epochPeriod]); + await network.provider.send("evm_mine"); + // Honest Bridger const bridgerClaimTx = await veaOutbox.connect(bridger).claim(epoch, batchMerkleRoot, { value: TEN_ETH }); - const block = await ethers.provider.getBlock(bridgerClaimTx.blockNumber!); + const blockClaim = await ethers.provider.getBlock(bridgerClaimTx.blockNumber!); + + const maxL2StateSyncDelay = (await veaOutbox.sequencerLimit()).toNumber() + epochPeriod / 2; + await network.provider.send("evm_increaseTime", [epochPeriod + maxL2StateSyncDelay]); + await network.provider.send("evm_mine"); + + const startValidationTxn = await veaOutbox.startVerification(epoch, { + stateRoot: batchMerkleRoot, + claimer: bridger.address, + timestampClaimed: blockClaim.timestamp, + timestampVerification: 0, + blocknumberVerification: 0, + honest: 0, + challenger: ethers.constants.AddressZero, + }); + await expect(startValidationTxn).to.emit(veaOutbox, "VerificationStarted").withArgs(epoch); + + const blockStartValidation = await ethers.provider.getBlock(startValidationTxn.blockNumber!); - // wait for challenge period (and epoch) to pass - await network.provider.send("evm_increaseTime", [1800]); + const minChallengePeriod = (await veaOutbox.minChallengePeriod()).toNumber(); + await network.provider.send("evm_increaseTime", [minChallengePeriod]); await network.provider.send("evm_mine"); + const blocksToMine = Math.ceil(minChallengePeriod / 12); + await mine(blocksToMine); - const bridgerVerifyBatchTx = await veaOutbox.connect(bridger).validateSnapshot(epoch, { + const verifySnapshotTxn = await veaOutbox.connect(bridger).verifySnapshot(epoch, { stateRoot: batchMerkleRoot, claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, + timestampClaimed: blockClaim.timestamp, + timestampVerification: blockStartValidation.timestamp!, + blocknumberVerification: startValidationTxn.blockNumber!, honest: 0, challenger: ethers.constants.AddressZero, }); @@ -305,19 +359,44 @@ describe("Integration tests", async () => { ); const batchMerkleRoot = await veaInbox.snapshots(epoch); + const epochPeriod = (await veaInbox.epochPeriod()).toNumber(); + + await network.provider.send("evm_increaseTime", [epochPeriod]); + await network.provider.send("evm_mine"); + // Honest Bridger const bridgerClaimTx = await veaOutbox.connect(bridger).claim(epoch, batchMerkleRoot, { value: TEN_ETH }); - const block = await ethers.provider.getBlock(bridgerClaimTx.blockNumber!); + const blockClaim = await ethers.provider.getBlock(bridgerClaimTx.blockNumber!); - // wait for challenge period (and epoch) to pass - await network.provider.send("evm_increaseTime", [1800]); + const maxL2StateSyncDelay = (await veaOutbox.sequencerLimit()).toNumber() + epochPeriod / 2; + await network.provider.send("evm_increaseTime", [epochPeriod + maxL2StateSyncDelay]); await network.provider.send("evm_mine"); - const bridgerVerifyBatchTx = await veaOutbox.connect(bridger).validateSnapshot(epoch, { + const startValidationTxn = await veaOutbox.startVerification(epoch, { stateRoot: batchMerkleRoot, claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, + timestampClaimed: blockClaim.timestamp, + timestampVerification: 0, + blocknumberVerification: 0, + honest: 0, + challenger: ethers.constants.AddressZero, + }); + await expect(startValidationTxn).to.emit(veaOutbox, "VerificationStarted").withArgs(epoch); + + const blockStartValidation = await ethers.provider.getBlock(startValidationTxn.blockNumber!); + + const minChallengePeriod = (await veaOutbox.minChallengePeriod()).toNumber(); + await network.provider.send("evm_increaseTime", [minChallengePeriod]); + await network.provider.send("evm_mine"); + const blocksToMine = Math.ceil(minChallengePeriod / 12); + await mine(blocksToMine); + + const verifySnapshotTxn = await veaOutbox.connect(bridger).verifySnapshot(epoch, { + stateRoot: batchMerkleRoot, + claimer: bridger.address, + timestampClaimed: blockClaim.timestamp, + timestampVerification: blockStartValidation.timestamp!, + blocknumberVerification: startValidationTxn.blockNumber!, honest: 0, challenger: ethers.constants.AddressZero, }); @@ -328,8 +407,9 @@ describe("Integration tests", async () => { const withdrawClaimDepositTx = await veaOutbox.connect(bridger).withdrawClaimDeposit(epoch, { stateRoot: batchMerkleRoot, claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, + timestampClaimed: blockClaim.timestamp, + timestampVerification: blockStartValidation.timestamp!, + blocknumberVerification: startValidationTxn.blockNumber!, honest: 1, challenger: ethers.constants.AddressZero, }); @@ -363,19 +443,44 @@ describe("Integration tests", async () => { ); const batchMerkleRoot = await veaInbox.snapshots(epoch); + const epochPeriod = (await veaInbox.epochPeriod()).toNumber(); + + await network.provider.send("evm_increaseTime", [epochPeriod]); + await network.provider.send("evm_mine"); + // Honest Bridger const bridgerClaimTx = await veaOutbox.connect(bridger).claim(epoch, batchMerkleRoot, { value: TEN_ETH }); - const block = await ethers.provider.getBlock(bridgerClaimTx.blockNumber!); + const blockClaim = await ethers.provider.getBlock(bridgerClaimTx.blockNumber!); + + const maxL2StateSyncDelay = (await veaOutbox.sequencerLimit()).toNumber() + epochPeriod / 2; + await network.provider.send("evm_increaseTime", [epochPeriod + maxL2StateSyncDelay]); + await network.provider.send("evm_mine"); + + const startValidationTxn = await veaOutbox.startVerification(epoch, { + stateRoot: batchMerkleRoot, + claimer: bridger.address, + timestampClaimed: blockClaim.timestamp, + timestampVerification: 0, + blocknumberVerification: 0, + honest: 0, + challenger: ethers.constants.AddressZero, + }); + await expect(startValidationTxn).to.emit(veaOutbox, "VerificationStarted").withArgs(epoch); - // wait for challenge period (and epoch) to pass - await network.provider.send("evm_increaseTime", [1800]); + const blockStartValidation = await ethers.provider.getBlock(startValidationTxn.blockNumber!); + + const minChallengePeriod = (await veaOutbox.minChallengePeriod()).toNumber(); + await network.provider.send("evm_increaseTime", [minChallengePeriod]); await network.provider.send("evm_mine"); + const blocksToMine = Math.ceil(minChallengePeriod / 12); + await mine(blocksToMine); - const bridgerVerifyBatchTx = await veaOutbox.connect(bridger).validateSnapshot(epoch, { + const verifySnapshotTxn = await veaOutbox.connect(bridger).verifySnapshot(epoch, { stateRoot: batchMerkleRoot, claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, + timestampClaimed: blockClaim.timestamp, + timestampVerification: blockStartValidation.timestamp!, + blocknumberVerification: startValidationTxn.blockNumber!, honest: 0, challenger: ethers.constants.AddressZero, }); @@ -386,8 +491,9 @@ describe("Integration tests", async () => { const withdrawClaimDepositTx = await veaOutbox.withdrawClaimDeposit(epoch, { stateRoot: batchMerkleRoot, claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, + timestampClaimed: blockClaim.timestamp, + timestampVerification: blockStartValidation.timestamp!, + blocknumberVerification: startValidationTxn.blockNumber!, honest: 1, challenger: ethers.constants.AddressZero, }); @@ -398,7 +504,7 @@ describe("Integration tests", async () => { // most of the functions are tested thoroughly in the above test case // only challenge related functionality are tested here - it("should not be able to challenge after challenge period elapsed", async () => { + it("should be able to challenge", async () => { const data = 1121; const sendMessagetx = await senderGateway.sendMessage(data); @@ -406,66 +512,13 @@ describe("Integration tests", async () => { const BatchOutgoing = veaInbox.filters.SnapshotSaved(); const batchOutGoingEvent = await veaInbox.queryFilter(BatchOutgoing); - const epoch = Math.floor( - (await batchOutGoingEvent[0].getBlock()).timestamp / (await veaInbox.epochPeriod()).toNumber() - ); + const epochPeriod = (await veaInbox.epochPeriod()).toNumber(); + const epoch = Math.floor((await batchOutGoingEvent[0].getBlock()).timestamp / epochPeriod); const batchMerkleRoot = await veaInbox.snapshots(epoch); - // bridger tx starts - Honest Bridger - const bridgerClaimTx = await veaOutbox.connect(bridger).claim(epoch, batchMerkleRoot, { value: TEN_ETH }); - - const block = await ethers.provider.getBlock(bridgerClaimTx.blockNumber!); - - // should revert if deposit is less than claim deposit - // @note - if challenger deposits more than deposit then only the deposit will be returned - await expect( - veaOutbox.connect(challenger).challenge( - epoch, - { - stateRoot: batchMerkleRoot, - claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, - honest: 0, - challenger: ethers.constants.AddressZero, - }, - { value: ONE_HUNDREDTH_ETH } - ) - ).to.be.revertedWith("Insufficient challenge deposit."); - - // wait for challenge period (and epoch) to pass - await network.provider.send("evm_increaseTime", [1800]); + await network.provider.send("evm_increaseTime", [epochPeriod]); await network.provider.send("evm_mine"); - await expect( - veaOutbox.connect(challenger).challenge( - epoch, - { - stateRoot: batchMerkleRoot, - claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, - honest: 0, - challenger: ethers.constants.AddressZero, - }, - { value: TEN_ETH } - ) - ).to.be.revertedWith("Challenge period elapsed."); - }); - - it("should be able to challenge", async () => { - const data = 1121; - - const sendMessagetx = await senderGateway.sendMessage(data); - const sendBatchTx = await veaInbox.connect(bridger).saveSnapshot(); - - const BatchOutgoing = veaInbox.filters.SnapshotSaved(); - const batchOutGoingEvent = await veaInbox.queryFilter(BatchOutgoing); - const epoch = Math.floor( - (await batchOutGoingEvent[0].getBlock()).timestamp / (await veaInbox.epochPeriod()).toNumber() - ); - const batchMerkleRoot = await veaInbox.snapshots(epoch); - // bridger tx starts - Honest Bridger const bridgerClaimTx = await veaOutbox.connect(bridger).claim(epoch, batchMerkleRoot, { value: TEN_ETH }); const block = await ethers.provider.getBlock(bridgerClaimTx.blockNumber!); @@ -475,8 +528,9 @@ describe("Integration tests", async () => { { stateRoot: batchMerkleRoot, claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, + timestampClaimed: block.timestamp, + timestampVerification: 0, + blocknumberVerification: 0, honest: 0, challenger: ethers.constants.AddressZero, }, @@ -493,10 +547,13 @@ describe("Integration tests", async () => { const BatchOutgoing = veaInbox.filters.SnapshotSaved(); const batchOutGoingEvent = await veaInbox.queryFilter(BatchOutgoing); - const epoch = Math.floor( - (await batchOutGoingEvent[0].getBlock()).timestamp / (await veaInbox.epochPeriod()).toNumber() - ); + const epochPeriod = (await veaInbox.epochPeriod()).toNumber(); + const epoch = Math.floor((await batchOutGoingEvent[0].getBlock()).timestamp / epochPeriod); const batchMerkleRoot = await veaInbox.snapshots(epoch); + + await network.provider.send("evm_increaseTime", [epochPeriod]); + await network.provider.send("evm_mine"); + // bridger tx starts - Honest Bridger const bridgerClaimTx = await veaOutbox.connect(bridger).claim(epoch, batchMerkleRoot, { value: TEN_ETH }); const block = await ethers.provider.getBlock(bridgerClaimTx.blockNumber!); @@ -506,36 +563,23 @@ describe("Integration tests", async () => { { stateRoot: batchMerkleRoot, claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, + timestampClaimed: block.timestamp, + timestampVerification: 0, + blocknumberVerification: 0, honest: 0, challenger: ethers.constants.AddressZero, }, { value: TEN_ETH } ); - // wait for challenge period (and epoch) to pass - await network.provider.send("evm_increaseTime", [1800]); - await network.provider.send("evm_mine"); - - await expect( - veaOutbox.connect(relayer).validateSnapshot(epoch, { - stateRoot: batchMerkleRoot, - claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, - honest: 0, - challenger: challenger.address, - }) - ).to.be.revertedWith("Claim is challenged."); - const sendSafeFallbackTx = await veaInbox.connect(bridger).sendSnapshot( epoch, { stateRoot: batchMerkleRoot, claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, + timestampClaimed: block.timestamp, + timestampVerification: 0, + blocknumberVerification: 0, honest: 0, challenger: challenger.address, }, @@ -569,11 +613,13 @@ describe("Integration tests", async () => { const BatchOutgoing = veaInbox.filters.SnapshotSaved(); const batchOutGoingEvent = await veaInbox.queryFilter(BatchOutgoing); - const epoch = Math.floor( - (await batchOutGoingEvent[0].getBlock()).timestamp / (await veaInbox.epochPeriod()).toNumber() - ); + const epochPeriod = (await veaInbox.epochPeriod()).toNumber(); + const epoch = Math.floor((await batchOutGoingEvent[0].getBlock()).timestamp / epochPeriod); const batchMerkleRoot = await veaInbox.snapshots(epoch); + await network.provider.send("evm_increaseTime", [epochPeriod]); + await network.provider.send("evm_mine"); + // bridger tx starts - Honest Bridger const bridgerClaimTx = await veaOutbox.connect(bridger).claim(epoch, batchMerkleRoot, { value: TEN_ETH }); const block = await ethers.provider.getBlock(bridgerClaimTx.blockNumber!); @@ -583,37 +629,60 @@ describe("Integration tests", async () => { veaOutbox.connect(challenger).withdrawChallengeDeposit(epoch, { stateRoot: batchMerkleRoot, claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, + timestampClaimed: block.timestamp, + timestampVerification: 0, + blocknumberVerification: 0, honest: 0, challenger: ethers.constants.AddressZero, }) ).to.be.revertedWith("Challenge failed."); + const maxL2StateSyncDelay = (await veaOutbox.sequencerLimit()).toNumber() + epochPeriod / 2; + await network.provider.send("evm_increaseTime", [epochPeriod + maxL2StateSyncDelay]); + await network.provider.send("evm_mine"); + + const startValidationTxn = await veaOutbox.startVerification(epoch, { + stateRoot: batchMerkleRoot, + claimer: bridger.address, + timestampClaimed: block.timestamp, + timestampVerification: 0, + blocknumberVerification: 0, + honest: 0, + challenger: ethers.constants.AddressZero, + }); + await expect(startValidationTxn).to.emit(veaOutbox, "VerificationStarted").withArgs(epoch); + + const blockStartValidation = await ethers.provider.getBlock(startValidationTxn.blockNumber!); + + const minChallengePeriod = (await veaOutbox.minChallengePeriod()).toNumber(); + await network.provider.send("evm_increaseTime", [minChallengePeriod]); + await network.provider.send("evm_mine"); + const blocksToMine = Math.ceil(minChallengePeriod / 12); + await mine(blocksToMine); + // Challenger tx starts const challengeTx = await veaOutbox.connect(challenger).challenge( epoch, { stateRoot: batchMerkleRoot, claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, + timestampClaimed: block.timestamp, + timestampVerification: blockStartValidation.timestamp!, + blocknumberVerification: startValidationTxn.blockNumber!, honest: 0, challenger: ethers.constants.AddressZero, }, { value: TEN_ETH } ); await expect(challengeTx).to.emit(veaOutbox, "Challenged").withArgs(epoch, challenger.address); - // wait for challenge period (and epoch) to pass - await network.provider.send("evm_increaseTime", [1800]); - await network.provider.send("evm_mine"); await expect( - veaOutbox.connect(relayer).validateSnapshot(epoch, { + veaOutbox.connect(relayer).verifySnapshot(epoch, { stateRoot: batchMerkleRoot, claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, + timestampClaimed: block.timestamp, + timestampVerification: blockStartValidation.timestamp!, + blocknumberVerification: startValidationTxn.blockNumber!, honest: 0, challenger: challenger.address, }) @@ -625,8 +694,9 @@ describe("Integration tests", async () => { { stateRoot: batchMerkleRoot, claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, + timestampClaimed: block.timestamp, + timestampVerification: blockStartValidation.timestamp!, + blocknumberVerification: startValidationTxn.blockNumber!, honest: 0, challenger: challenger.address, }, @@ -640,8 +710,9 @@ describe("Integration tests", async () => { veaOutbox.withdrawChallengeDeposit(epoch, { stateRoot: batchMerkleRoot, claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, + timestampClaimed: block.timestamp, + timestampVerification: blockStartValidation.timestamp!, + blocknumberVerification: startValidationTxn.blockNumber!, honest: 1, challenger: challenger.address, }) @@ -650,8 +721,9 @@ describe("Integration tests", async () => { const withdrawClaimDepositTx = await veaOutbox.withdrawClaimDeposit(epoch, { stateRoot: batchMerkleRoot, claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, + timestampClaimed: block.timestamp, + timestampVerification: blockStartValidation.timestamp!, + blocknumberVerification: startValidationTxn.blockNumber!, honest: 1, challenger: challenger.address, }); @@ -685,8 +757,11 @@ describe("Integration tests", async () => { const epoch = Math.floor( (await batchOutGoingEvent[0].getBlock()).timestamp / (await veaInbox.epochPeriod()).toNumber() ); - const batchMerkleRoot = await veaInbox.snapshots(epoch); + const epochPeriod = (await veaOutbox.epochPeriod()).toNumber(); + const batchMerkleRoot = await veaInbox.snapshots(epoch); + await network.provider.send("evm_increaseTime", [epochPeriod]); + await network.provider.send("evm_mine"); // bridger tx starts - bridger creates fakeData & fakeHash const fakeData = "KlerosToTheMoon"; @@ -700,24 +775,45 @@ describe("Integration tests", async () => { { stateRoot: fakeHash, claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, + timestampClaimed: block.timestamp, + timestampVerification: 0, + blocknumberVerification: 0, honest: 0, challenger: ethers.constants.AddressZero, }, { value: TEN_ETH } ); - // wait for challenge period (and epoch) to pass - await network.provider.send("evm_increaseTime", [1800]); + const maxL2StateSyncDelay = (await veaOutbox.sequencerLimit()).toNumber() + epochPeriod / 2; + await network.provider.send("evm_increaseTime", [epochPeriod + maxL2StateSyncDelay]); await network.provider.send("evm_mine"); + const startValidationTxn = await veaOutbox.startVerification(epoch, { + stateRoot: fakeHash, + claimer: bridger.address, + timestampClaimed: block.timestamp, + timestampVerification: 0, + blocknumberVerification: 0, + honest: 0, + challenger: challenger.address, + }); + await expect(startValidationTxn).to.emit(veaOutbox, "VerificationStarted").withArgs(epoch); + + const blockStartValidation = await ethers.provider.getBlock(startValidationTxn.blockNumber!); + + const minChallengePeriod = (await veaOutbox.minChallengePeriod()).toNumber(); + await network.provider.send("evm_increaseTime", [minChallengePeriod]); + await network.provider.send("evm_mine"); + const blocksToMine = Math.ceil(minChallengePeriod / 12); + await mine(blocksToMine); + await expect( - veaOutbox.connect(relayer).validateSnapshot(epoch, { + veaOutbox.connect(relayer).verifySnapshot(epoch, { stateRoot: fakeHash, claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, + timestampClaimed: block.timestamp, + timestampVerification: blockStartValidation.timestamp!, + blocknumberVerification: startValidationTxn.blockNumber!, honest: 0, challenger: challenger.address, }) @@ -729,8 +825,9 @@ describe("Integration tests", async () => { { stateRoot: fakeHash, claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, + timestampClaimed: block.timestamp, + timestampVerification: blockStartValidation.timestamp!, + blocknumberVerification: startValidationTxn.blockNumber!, honest: 0, challenger: challenger.address, }, @@ -740,21 +837,23 @@ describe("Integration tests", async () => { await expect(verifyAndRelayTx).to.emit(veaOutbox, "MessageRelayed").withArgs(0); expect( veaOutbox.connect(relayer).withdrawClaimDeposit(epoch, { - stateRoot: fakeHash, + stateRoot: batchMerkleRoot, claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, - honest: 0, + timestampClaimed: block.timestamp, + timestampVerification: blockStartValidation.timestamp!, + blocknumberVerification: startValidationTxn.blockNumber!, + honest: 2, challenger: challenger.address, }) ).to.be.revertedWith("Claim failed."); await expect( veaOutbox.connect(relayer).withdrawChallengeDeposit(epoch, { - stateRoot: fakeHash, + stateRoot: batchMerkleRoot, claimer: bridger.address, - timestamp: block.timestamp, - blocknumber: bridgerClaimTx.blockNumber!, + timestampClaimed: block.timestamp, + timestampVerification: blockStartValidation.timestamp!, + blocknumberVerification: startValidationTxn.blockNumber!, honest: 2, challenger: challenger.address, }) diff --git a/contracts/test/merkle/index.ts b/contracts/test/merkle/index.ts index e9462ab6..5e93540b 100644 --- a/contracts/test/merkle/index.ts +++ b/contracts/test/merkle/index.ts @@ -52,10 +52,6 @@ describe("Merkle", async () => { mt = new MerkleTree(nodes); rootOffChain = mt.getHexRoot(); rootOnChain = await merkleTreeExposed.getMerkleRoot(); - console.log("######"); - console.log(rootOffChain); - console.log(rootOnChain); - console.log("########################"); expect(rootOffChain).to.equal(rootOnChain); }); @@ -83,10 +79,6 @@ describe("Merkle", async () => { const mt = new MerkleTree(nodes); const rootOffChain = mt.getHexRoot(); const proof = mt.getHexProof("0x89b21fb4614a02475146160be6fb83cadd1ea38dd00f1a8ed1c880c902807ff4"); - console.log("yoyoyo"); - console.log(rootOffChain); - console.log(proof); - console.log("########################"); }); }); }); diff --git a/yarn.lock b/yarn.lock index cb23dd91..b335a064 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3362,6 +3362,7 @@ __metadata: resolution: "@kleros/vea-contracts@workspace:contracts" dependencies: "@nomicfoundation/hardhat-chai-matchers": ^1.0.6 + "@nomicfoundation/hardhat-network-helpers": ^1.0.8 "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@0.3.0-beta.13" "@openzeppelin/contracts": ^4.8.3 "@typechain/ethers-v5": ^10.2.0 @@ -3866,6 +3867,17 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/hardhat-network-helpers@npm:^1.0.8": + version: 1.0.8 + resolution: "@nomicfoundation/hardhat-network-helpers@npm:1.0.8" + dependencies: + ethereumjs-util: ^7.1.4 + peerDependencies: + hardhat: ^2.9.5 + checksum: cf865301fa7a8cebf5c249bc872863d2e69f0f3d14cceadbc5d5761bd97745f38fdb17c9074d46ef0d3a75748f43c0e14d37a54a09ae3b7e0e981c7f437c8553 + languageName: node + linkType: hard + "@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.1": version: 0.1.1 resolution: "@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.1" @@ -10623,7 +10635,7 @@ __metadata: languageName: node linkType: hard -"ethereumjs-util@npm:^7.1.0, ethereumjs-util@npm:^7.1.1, ethereumjs-util@npm:^7.1.2, ethereumjs-util@npm:^7.1.5": +"ethereumjs-util@npm:^7.1.0, ethereumjs-util@npm:^7.1.1, ethereumjs-util@npm:^7.1.2, ethereumjs-util@npm:^7.1.4, ethereumjs-util@npm:^7.1.5": version: 7.1.5 resolution: "ethereumjs-util@npm:7.1.5" dependencies: From 87c0eaa41351292bb4c83f0df043fe8c73e36e43 Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Thu, 15 Jun 2023 20:41:34 +0900 Subject: [PATCH 05/58] chore(contracts): remove unnecessary require --- contracts/src/arbitrumToEth/VeaInboxArbToEth.sol | 3 --- contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol | 3 --- 2 files changed, 6 deletions(-) diff --git a/contracts/src/arbitrumToEth/VeaInboxArbToEth.sol b/contracts/src/arbitrumToEth/VeaInboxArbToEth.sol index 3d6c6efb..2094bf6a 100644 --- a/contracts/src/arbitrumToEth/VeaInboxArbToEth.sol +++ b/contracts/src/arbitrumToEth/VeaInboxArbToEth.sol @@ -60,9 +60,6 @@ contract VeaInboxArbToEth is IVeaInbox { constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) { epochPeriod = _epochPeriod; veaOutboxArbToEth = _veaOutboxArbToEth; - - // epochPeriod should never be set this small, but we check non-zero value as a sanity check to avoid division by zero - require(_epochPeriod > 0, "Epoch period must be greater than 0."); } // ************************************* // diff --git a/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol b/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol index 702f7716..819fef26 100644 --- a/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol @@ -59,9 +59,6 @@ contract VeaInboxArbToGnosis is IVeaInbox { constructor(uint256 _epochPeriod, address _routerArbToGnosis) { epochPeriod = _epochPeriod; routerArbToGnosis = _routerArbToGnosis; - - // epochPeriod should never be set this small, but we check non-zero value as a sanity check to avoid division by zero - require(_epochPeriod > 0, "Epoch period must be greater than 0."); } // ************************************* // From d747cd3a3048dfb3442ae9c8326df141463ca0fe Mon Sep 17 00:00:00 2001 From: shotaro Date: Fri, 16 Jun 2023 12:06:17 +0900 Subject: [PATCH 06/58] chore(contracts): typo The router sends messages to Gnosis, not Ethereum for this contract. --- contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol index 95e6a1e6..5388e80c 100644 --- a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol @@ -106,7 +106,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, IArbitrumUpdatable { /// @param _minChallengePeriod The minimum time window to challenge a claim. /// @param _timeoutEpochs The epochs before the bridge is considered shutdown. /// @param _amb The address of the AMB contract on Gnosis. - /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Ethereum. + /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis. /// @param _sequencerLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions. /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period. /// @param _routerChainId The chain id of the routerArbToGnosis. From 2b273be9a022f638b93cc463f657395e1c353fd7 Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Fri, 16 Jun 2023 13:41:27 +0900 Subject: [PATCH 07/58] feat(contracts): disambiguate the sequencer param --- contracts/README.md | 20 +-- .../03-routers/03-arb-to-gnosis-router.ts | 4 +- .../VeaInboxArbToEthDevnet.json | 28 ++-- .../VeaInboxArbToEthTestnet.json | 30 ++-- .../VeaInboxArbToGnosisDevnet.json | 34 ++--- .../VeaInboxArbToGnosisTestnet.json | 34 ++--- .../chiado/VeaOutboxArbToGnosisDevnet.json | 78 +++++----- .../chiado/VeaOutboxArbToGnosisTestnet.json | 80 +++++------ .../goerli/RouterArbToGnosisDevnet.json | 90 ++++++------ .../goerli/RouterArbToGnosisTestnet.json | 92 ++++++------ .../goerli/VeaOutboxArbToEthDevnet.json | 134 +++++++++--------- .../goerli/VeaOutboxArbToEthTestnet.json | 132 ++++++++--------- .../src/arbitrumToEth/VeaOutboxArbToEth.sol | 81 ++++++----- .../arbitrumToGnosis/RouterArbToGnosis.sol | 83 +++++------ .../arbitrumToGnosis/VeaOutboxArbToGnosis.sol | 40 +++--- .../VeaOutboxArbToGnosisDevnet.sol | 6 +- ...table.sol => ISequencerDelayUpdatable.sol} | 10 +- contracts/test/integration/ArbToEth.ts | 12 +- 18 files changed, 497 insertions(+), 491 deletions(-) rename contracts/src/interfaces/updaters/{IArbitrumUpdatable.sol => ISequencerDelayUpdatable.sol} (53%) diff --git a/contracts/README.md b/contracts/README.md index 7cd9f160..b1933ef5 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -10,22 +10,22 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments #### Goerli -- [RouterArbToGnosisDevnet](https://goerli.etherscan.io/address/0x660daB9A6436A814a6ae3a6f27b309356a4bE78c) -- [RouterArbToGnosisTestnet](https://goerli.etherscan.io/address/0xfF2B7048d673767754B798df1702C786E2c59F1F) -- [VeaOutboxArbToEthDevnet](https://goerli.etherscan.io/address/0xB32A65B4b0b18d231BA88c3E37F7f600683baD6D) -- [VeaOutboxArbToEthTestnet](https://goerli.etherscan.io/address/0x9cF5c011e2A4CB7797413f311A35AcB021071c35) +- [RouterArbToGnosisDevnet](https://goerli.etherscan.io/address/0xF767226FD5d9A8BbC4d99462175905cB6c1adA04) +- [RouterArbToGnosisTestnet](https://goerli.etherscan.io/address/0xbB800a318b5CeE079ADdBC6141A0BB1665793014) +- [VeaOutboxArbToEthDevnet](https://goerli.etherscan.io/address/0x19F1fE9f34d3d6323FB9862a99F8A56542f879F0) +- [VeaOutboxArbToEthTestnet](https://goerli.etherscan.io/address/0x2D2D210Bb504D4F8C226f780129a974C7CD56Ea0) #### Arbitrum Goerli -- [VeaInboxArbToEthDevnet](https://goerli.arbiscan.io/address/0x3aD2FfA09823de2f98F2f0aBA832a6b83521E2E6) -- [VeaInboxArbToEthTestnet](https://goerli.arbiscan.io/address/0x8893441F219e2836D9c7E1c727CDA9ACFF84D069) -- [VeaInboxArbToGnosisDevnet](https://goerli.arbiscan.io/address/0x6aF68A94246AB9Ad3e6B1D5e28d9eAF374eaB015) -- [VeaInboxArbToGnosisTestnet](https://goerli.arbiscan.io/address/0x773872EFbA47b926F4B2d42DaB4677431bDA02E4) +- [VeaInboxArbToEthDevnet](https://goerli.arbiscan.io/address/0x63eBccD095a663f024B5336b8362A7fa836b7882) +- [VeaInboxArbToEthTestnet](https://goerli.arbiscan.io/address/0x7B6D027DC9e838E98258c2A77877De59B7F5a350) +- [VeaInboxArbToGnosisDevnet](https://goerli.arbiscan.io/address/0xf9F4501AF2447210219d1393450a83933293a4Fd) +- [VeaInboxArbToGnosisTestnet](https://goerli.arbiscan.io/address/0xD6ecb6618e8070462E2a6AB160fE1773b8996D3a) #### Chiado -- [VeaOutboxArbToGnosisDevnet](https://blockscout.com/gnosis/chiado/address/0x32b55e5E51f6F4cbd661a4cA1cC6142f6380777b) -- [VeaOutboxArbToGnosisTestnet](https://blockscout.com/gnosis/chiado/address/0x53194Fa828ebEfa5cB515d23CC2467d88f6B0Be2) +- [VeaOutboxArbToGnosisDevnet](https://blockscout.com/gnosis/chiado/address/0xa117A3B8527133EB4CC2006F3F5b7e0cCC7298B5) +- [VeaOutboxArbToGnosisTestnet](https://blockscout.com/gnosis/chiado/address/0xd7610CF459C13Ff22923692Ab023dF5a58DeA838) ## Getting Started diff --git a/contracts/deploy/03-routers/03-arb-to-gnosis-router.ts b/contracts/deploy/03-routers/03-arb-to-gnosis-router.ts index 4cabb507..bda10b14 100644 --- a/contracts/deploy/03-routers/03-arb-to-gnosis-router.ts +++ b/contracts/deploy/03-routers/03-arb-to-gnosis-router.ts @@ -11,11 +11,11 @@ enum RouterChains { const paramsByChainId = { ETHEREUM_MAINNET: { arbitrumBridge: "0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a", // https://developer.arbitrum.io/useful-addresses - amb: "0x75Df5AF045d91108662D8080fD1FEFAd6aA0bb59", + amb: "0x4C36d2919e407f0Cc2Ee3c993ccF8ac26d9CE64e", }, ETHEREUM_GOERLI: { arbitrumBridge: "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", // https://developer.arbitrum.io/useful-addresses - amb: "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", + amb: "0x87A19d769D875964E9Cd41dDBfc397B2543764E6", }, HARDHAT: { arbitrumInbox: ethers.constants.AddressZero, diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json index 421fc427..dc363d42 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x3aD2FfA09823de2f98F2f0aBA832a6b83521E2E6", + "address": "0x63eBccD095a663f024B5336b8362A7fa836b7882", "abi": [ { "inputs": [ @@ -275,31 +275,31 @@ "type": "function" } ], - "transactionHash": "0xe77584f55eb58bfeb1c948d5da662f7119748445d8a4acc5e94a9a7802ed0cf9", + "transactionHash": "0xa124de331771c7da45f547c7a157803d83ffc07092d63da3f4d615e8ec546fa6", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x3aD2FfA09823de2f98F2f0aBA832a6b83521E2E6", + "contractAddress": "0x63eBccD095a663f024B5336b8362A7fa836b7882", "transactionIndex": 1, - "gasUsed": "672950", + "gasUsed": "671421", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa9292c0178799978886c01da5c9a41f03fa5f8f40be34f0b391c62985410ee83", - "transactionHash": "0xe77584f55eb58bfeb1c948d5da662f7119748445d8a4acc5e94a9a7802ed0cf9", + "blockHash": "0x856b39108025bdcf887902f10132066999bab87ffacffb704c12318677b2d91b", + "transactionHash": "0xa124de331771c7da45f547c7a157803d83ffc07092d63da3f4d615e8ec546fa6", "logs": [], - "blockNumber": 26137654, - "cumulativeGasUsed": "672950", + "blockNumber": 26284763, + "cumulativeGasUsed": "671421", "status": 1, "byzantium": true }, "args": [ 1800, - "0xB32A65B4b0b18d231BA88c3E37F7f600683baD6D" + "0x19F1fE9f34d3d6323FB9862a99F8A56542f879F0" ], - "numDeployments": 8, - "solcInputHash": "c9836c6cb024801f3104e49f87086294", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n \\n // epochPeriod should never be set this small, but we check non-zero value as a sanity check to avoid division by zero\\n require(_epochPeriod > 0, \\\"Epoch period must be greater than 0.\\\");\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x90dcc790abb213bcad8e8f0e431590f9b4f10017338c7e3d780e25ed999d7f0b\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b50604051610c55380380610c5583398101604081905261002f916100a5565b60808290526001600160a01b03811660a0528161009e5760405162461bcd60e51b8152602060048201526024808201527f45706f636820706572696f64206d7573742062652067726561746572207468616044820152633710181760e11b606482015260840160405180910390fd5b50506100e2565b600080604083850312156100b857600080fd5b825160208401519092506001600160a01b03811681146100d757600080fd5b809150509250929050565b60805160a051610b2b61012a6000396000818161012001526105b401526000818161015f015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122094407127302ed545ff4f2b1bef1e39e0ed071c2adffcd35207f07bce2f12d28164736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122094407127302ed545ff4f2b1bef1e39e0ed071c2adffcd35207f07bce2f12d28164736f6c63430008120033", + "numDeployments": 9, + "solcInputHash": "ad697f618f73759e1d99ca054913682f", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0xf7aedd98f0149c6f63c4d59ad9fd5d6d2d16b75a42fe95d2064a157ff181007b\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161012001526105b401526000818161015f015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220a0a2597c30b2d5058f2616d02e3665ca367e57c05fd79670bc724658fa4fe1fd64736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220a0a2597c30b2d5058f2616d02e3665ca367e57c05fd79670bc724658fa4fe1fd64736f6c63430008120033", "devdoc": { "details": "Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.", "events": { diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json index 49ee6630..e1caaabe 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x8893441F219e2836D9c7E1c727CDA9ACFF84D069", + "address": "0x7B6D027DC9e838E98258c2A77877De59B7F5a350", "abi": [ { "inputs": [ @@ -275,31 +275,31 @@ "type": "function" } ], - "transactionHash": "0x48eec9ead1467c76fee05acc6436b3dc265906452800dc7b2ed16d46c98970ef", + "transactionHash": "0x8b4c0cc923eaff48c1935547e5b48aafef6e135ae0d0c4b406d551ee2ad6f776", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x8893441F219e2836D9c7E1c727CDA9ACFF84D069", - "transactionIndex": 2, - "gasUsed": "672962", + "contractAddress": "0x7B6D027DC9e838E98258c2A77877De59B7F5a350", + "transactionIndex": 1, + "gasUsed": "671421", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x4b4af6ff2df8dd46a9073c356d72b043986081186d009a225f9f90b39806b394", - "transactionHash": "0x48eec9ead1467c76fee05acc6436b3dc265906452800dc7b2ed16d46c98970ef", + "blockHash": "0x58c4235820be0ecea038df623b80e2151a44ad7f8b8095d1240c362a18fd86e9", + "transactionHash": "0x8b4c0cc923eaff48c1935547e5b48aafef6e135ae0d0c4b406d551ee2ad6f776", "logs": [], - "blockNumber": 26147399, - "cumulativeGasUsed": "861180", + "blockNumber": 26284492, + "cumulativeGasUsed": "671421", "status": 1, "byzantium": true }, "args": [ 7200, - "0x9cF5c011e2A4CB7797413f311A35AcB021071c35" + "0x2D2D210Bb504D4F8C226f780129a974C7CD56Ea0" ], - "numDeployments": 4, - "solcInputHash": "c9836c6cb024801f3104e49f87086294", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n \\n // epochPeriod should never be set this small, but we check non-zero value as a sanity check to avoid division by zero\\n require(_epochPeriod > 0, \\\"Epoch period must be greater than 0.\\\");\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x90dcc790abb213bcad8e8f0e431590f9b4f10017338c7e3d780e25ed999d7f0b\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b50604051610c55380380610c5583398101604081905261002f916100a5565b60808290526001600160a01b03811660a0528161009e5760405162461bcd60e51b8152602060048201526024808201527f45706f636820706572696f64206d7573742062652067726561746572207468616044820152633710181760e11b606482015260840160405180910390fd5b50506100e2565b600080604083850312156100b857600080fd5b825160208401519092506001600160a01b03811681146100d757600080fd5b809150509250929050565b60805160a051610b2b61012a6000396000818161012001526105b401526000818161015f015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122094407127302ed545ff4f2b1bef1e39e0ed071c2adffcd35207f07bce2f12d28164736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122094407127302ed545ff4f2b1bef1e39e0ed071c2adffcd35207f07bce2f12d28164736f6c63430008120033", + "numDeployments": 5, + "solcInputHash": "ad697f618f73759e1d99ca054913682f", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0xf7aedd98f0149c6f63c4d59ad9fd5d6d2d16b75a42fe95d2064a157ff181007b\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161012001526105b401526000818161015f015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220a0a2597c30b2d5058f2616d02e3665ca367e57c05fd79670bc724658fa4fe1fd64736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220a0a2597c30b2d5058f2616d02e3665ca367e57c05fd79670bc724658fa4fe1fd64736f6c63430008120033", "devdoc": { "details": "Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.", "events": { diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json index 1c9aa7f3..f9c84130 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x6aF68A94246AB9Ad3e6B1D5e28d9eAF374eaB015", + "address": "0xf9F4501AF2447210219d1393450a83933293a4Fd", "abi": [ { "inputs": [ @@ -275,31 +275,31 @@ "type": "function" } ], - "transactionHash": "0x4d210306fd0acb8d7d1f7dcbaf779085ec258d6d3dc5576f2d2a59445fd4cf9d", + "transactionHash": "0x6b2b34bed6f414303a3faebe4ab9f9160826aaddcd05a681c80c982f542eb9ed", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x6aF68A94246AB9Ad3e6B1D5e28d9eAF374eaB015", + "contractAddress": "0xf9F4501AF2447210219d1393450a83933293a4Fd", "transactionIndex": 1, - "gasUsed": "672962", + "gasUsed": "671409", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x905e9319e1a6a1c12f9c20a0625be74f3e4492c4c870db02f8160181b656717d", - "transactionHash": "0x4d210306fd0acb8d7d1f7dcbaf779085ec258d6d3dc5576f2d2a59445fd4cf9d", + "blockHash": "0x6ae77a3947ccd7445954fadfcd58c86d59d64d13560052236f069e0aca795866", + "transactionHash": "0x6b2b34bed6f414303a3faebe4ab9f9160826aaddcd05a681c80c982f542eb9ed", "logs": [], - "blockNumber": 26137715, - "cumulativeGasUsed": "672962", + "blockNumber": 26284836, + "cumulativeGasUsed": "671409", "status": 1, "byzantium": true }, "args": [ 1800, - "0x32b55e5E51f6F4cbd661a4cA1cC6142f6380777b" + "0xa117A3B8527133EB4CC2006F3F5b7e0cCC7298B5" ], - "numDeployments": 9, - "solcInputHash": "c9836c6cb024801f3104e49f87086294", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n\\n // epochPeriod should never be set this small, but we check non-zero value as a sanity check to avoid division by zero\\n require(_epochPeriod > 0, \\\"Epoch period must be greater than 0.\\\");\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n \\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToL1.route, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x874abaaca56ea116842cd346203f8a7c379980655cd63e36a03f6e5bc6bcaeb3\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b50604051610c55380380610c5583398101604081905261002f916100a5565b60808290526001600160a01b03811660a0528161009e5760405162461bcd60e51b8152602060048201526024808201527f45706f636820706572696f64206d7573742062652067726561746572207468616044820152633710181760e11b606482015260840160405180910390fd5b50506100e2565b600080604083850312156100b857600080fd5b825160208401519092506001600160a01b03811681146100d757600080fd5b809150509250929050565b60805160a051610b2b61012a6000396000818161015a01526105b4015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea26469706673582212204c224f9540e5afa597c0bbc232c72da16fde23ebb10cb81218150d7be7e9307b64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea26469706673582212204c224f9540e5afa597c0bbc232c72da16fde23ebb10cb81218150d7be7e9307b64736f6c63430008120033", + "numDeployments": 10, + "solcInputHash": "ad697f618f73759e1d99ca054913682f", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToL1.route, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x48eecf0d4e478ce7860635a206ceee6535b4f4765f9d25dddae463666e2bd7cb\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161015a01526105b4015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220994c2014c4b68b5175d78f99d2fb730f4a377df08484a25fda20c640bbd2b32e64736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220994c2014c4b68b5175d78f99d2fb730f4a377df08484a25fda20c640bbd2b32e64736f6c63430008120033", "devdoc": { "details": "Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.", "events": { @@ -385,7 +385,7 @@ "storageLayout": { "storage": [ { - "astId": 2140, + "astId": 2133, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "snapshots", "offset": 0, @@ -393,7 +393,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2144, + "astId": 2137, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "inbox", "offset": 0, @@ -401,7 +401,7 @@ "type": "t_array(t_bytes32)64_storage" }, { - "astId": 2146, + "astId": 2139, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "count", "offset": 0, diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json index 442dcdd1..ea7584c1 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x773872EFbA47b926F4B2d42DaB4677431bDA02E4", + "address": "0xD6ecb6618e8070462E2a6AB160fE1773b8996D3a", "abi": [ { "inputs": [ @@ -275,31 +275,31 @@ "type": "function" } ], - "transactionHash": "0x6151bd455b5bab507dd838b2120bf057a163b5e6cbaccc38d58e4b1776c1592d", + "transactionHash": "0x03ec1c49033c62467654f622f476704bfe80285213c17343dfe3ab7cba08d898", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x773872EFbA47b926F4B2d42DaB4677431bDA02E4", + "contractAddress": "0xD6ecb6618e8070462E2a6AB160fE1773b8996D3a", "transactionIndex": 1, - "gasUsed": "672962", + "gasUsed": "671421", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xe4590dde0f52cf13f1a6e55a35bbce338b13801ca346fb0adc5532dad43e325d", - "transactionHash": "0x6151bd455b5bab507dd838b2120bf057a163b5e6cbaccc38d58e4b1776c1592d", + "blockHash": "0x6aa42d4f62d402bafcd25fa06b80ecfe94721158685684a8f4e130ac233927b4", + "transactionHash": "0x03ec1c49033c62467654f622f476704bfe80285213c17343dfe3ab7cba08d898", "logs": [], - "blockNumber": 26147455, - "cumulativeGasUsed": "672962", + "blockNumber": 26284555, + "cumulativeGasUsed": "671421", "status": 1, "byzantium": true }, "args": [ 3600, - "0x53194Fa828ebEfa5cB515d23CC2467d88f6B0Be2" + "0xd7610CF459C13Ff22923692Ab023dF5a58DeA838" ], - "numDeployments": 2, - "solcInputHash": "c9836c6cb024801f3104e49f87086294", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n\\n // epochPeriod should never be set this small, but we check non-zero value as a sanity check to avoid division by zero\\n require(_epochPeriod > 0, \\\"Epoch period must be greater than 0.\\\");\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n \\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToL1.route, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x874abaaca56ea116842cd346203f8a7c379980655cd63e36a03f6e5bc6bcaeb3\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b50604051610c55380380610c5583398101604081905261002f916100a5565b60808290526001600160a01b03811660a0528161009e5760405162461bcd60e51b8152602060048201526024808201527f45706f636820706572696f64206d7573742062652067726561746572207468616044820152633710181760e11b606482015260840160405180910390fd5b50506100e2565b600080604083850312156100b857600080fd5b825160208401519092506001600160a01b03811681146100d757600080fd5b809150509250929050565b60805160a051610b2b61012a6000396000818161015a01526105b4015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea26469706673582212204c224f9540e5afa597c0bbc232c72da16fde23ebb10cb81218150d7be7e9307b64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea26469706673582212204c224f9540e5afa597c0bbc232c72da16fde23ebb10cb81218150d7be7e9307b64736f6c63430008120033", + "numDeployments": 3, + "solcInputHash": "ad697f618f73759e1d99ca054913682f", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToL1.route, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x48eecf0d4e478ce7860635a206ceee6535b4f4765f9d25dddae463666e2bd7cb\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161015a01526105b4015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220994c2014c4b68b5175d78f99d2fb730f4a377df08484a25fda20c640bbd2b32e64736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220994c2014c4b68b5175d78f99d2fb730f4a377df08484a25fda20c640bbd2b32e64736f6c63430008120033", "devdoc": { "details": "Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.", "events": { @@ -385,7 +385,7 @@ "storageLayout": { "storage": [ { - "astId": 2140, + "astId": 2133, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "snapshots", "offset": 0, @@ -393,7 +393,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2144, + "astId": 2137, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "inbox", "offset": 0, @@ -401,7 +401,7 @@ "type": "t_array(t_bytes32)64_storage" }, { - "astId": 2146, + "astId": 2139, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "count", "offset": 0, diff --git a/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json b/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json index e9282f3d..2e6747cc 100644 --- a/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json +++ b/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x32b55e5E51f6F4cbd661a4cA1cC6142f6380777b", + "address": "0xa117A3B8527133EB4CC2006F3F5b7e0cCC7298B5", "abi": [ { "inputs": [ @@ -40,7 +40,7 @@ }, { "internalType": "uint256", - "name": "_sequencerLimit", + "name": "_sequencerDelayLimit", "type": "uint256" }, { @@ -109,11 +109,11 @@ { "indexed": false, "internalType": "uint256", - "name": "_newSequencerLimit", + "name": "_epoch", "type": "uint256" } ], - "name": "SequencerLimitUpdateReceived", + "name": "VerificationStarted", "type": "event" }, { @@ -126,7 +126,7 @@ "type": "uint256" } ], - "name": "VerificationStarted", + "name": "Verified", "type": "event" }, { @@ -135,11 +135,11 @@ { "indexed": false, "internalType": "uint256", - "name": "_epoch", + "name": "_newsequencerDelayLimit", "type": "uint256" } ], - "name": "Verified", + "name": "sequencerDelayLimitUpdateReceived", "type": "event" }, { @@ -635,7 +635,7 @@ }, { "inputs": [], - "name": "sequencerLimit", + "name": "sequencerDelayLimit", "outputs": [ { "internalType": "uint256", @@ -731,11 +731,11 @@ "inputs": [ { "internalType": "uint256", - "name": "_newSequencerLimit", + "name": "_newSequencerDelayLimit", "type": "uint256" } ], - "name": "updateSequencerLimit", + "name": "updateSequencerDelayLimit", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -1016,19 +1016,19 @@ "type": "function" } ], - "transactionHash": "0x6dd0e4d968d7e0d520d64b49c2b8c62a2718c33e4f58f0e6819dcc84a1ac4075", + "transactionHash": "0x486151cc7b5e7d9f5ddb9551648cbae8137f1f4787338303ae7135ee896c0c82", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x32b55e5E51f6F4cbd661a4cA1cC6142f6380777b", + "contractAddress": "0xa117A3B8527133EB4CC2006F3F5b7e0cCC7298B5", "transactionIndex": 0, - "gasUsed": "2093426", + "gasUsed": "2093258", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x9627161ef7f97e2d5311c5905bdd5ad1242fdca0e1b36d48aae3505fdabfa30d", - "transactionHash": "0x6dd0e4d968d7e0d520d64b49c2b8c62a2718c33e4f58f0e6819dcc84a1ac4075", + "blockHash": "0x606075b6b63e6064a6b9d7c061c51554ea9d4e746a95ac057e7d49a57adbd8ca", + "transactionHash": "0x486151cc7b5e7d9f5ddb9551648cbae8137f1f4787338303ae7135ee896c0c82", "logs": [], - "blockNumber": 4471814, - "cumulativeGasUsed": "2093426", + "blockNumber": 4486412, + "cumulativeGasUsed": "2093258", "status": 1, "byzantium": true }, @@ -1038,16 +1038,16 @@ 0, 10000000000000, "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0x660daB9A6436A814a6ae3a6f27b309356a4bE78c", + "0xF767226FD5d9A8BbC4d99462175905cB6c1adA04", 86400, 10000000000000, 5 ], - "numDeployments": 11, - "solcInputHash": "c9836c6cb024801f3104e49f87086294", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosisDevnet\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"SequencerLimitUpdateReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"updateSequencerLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"SequencerLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerLimit\":\"The new maxL2StateSyncDelay.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_routerArbToGnosisDevnet\":\"The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\",\"_routerChainId\":\"The chain id of the router contract.\",\"_sequencerLimit\":\"The maximum number of sequencer messages that can be submitted in a challenge period.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerLimit(uint256)\":{\"details\":\"Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":\"VeaOutboxArbToGnosisDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/IArbitrumUpdatable.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, IArbitrumUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerLimit The new maxL2StateSyncDelay.\\n event SequencerLimitUpdateReceived(uint256 _newSequencerLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerLimit = _sequencerLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n /// @param _newSequencerLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerLimit(uint256 _newSequencerLimit) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (sequencerLimit != _newSequencerLimit) {\\n sequencerLimit = _newSequencerLimit;\\n emit SequencerLimitUpdateReceived(_newSequencerLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerLimit) {\\n // Allow claims to be made within the sequencerLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x3598855941548dfff854203745983d57b0125c0bdab5b070adb5b0e1725f5245\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToGnosis/VeaOutboxArbToGnosis.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Chiado.\\n/// Note: This contract is deployed on Chiado.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(\\n _epoch,\\n claim\\n );\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(\\n _epoch,\\n claim\\n );\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(\\n _epoch,\\n claim\\n );\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosisDevnet The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _sequencerLimit The maximum number of sequencer messages that can be submitted in a challenge period.\\n /// @param _routerChainId The chain id of the router contract.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosisDevnet,\\n uint256 _maxMissingBlocks,\\n uint256 _sequencerLimit,\\n uint256 _routerChainId\\n )\\n VeaOutboxArbToGnosis(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _amb,\\n _routerArbToGnosisDevnet,\\n _maxMissingBlocks,\\n sequencerLimit,\\n _routerChainId\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x28cbb304881b32a609d4c77485cdb9843c420c12e328e6e737472ec7a9eaa4d0\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/IArbitrumUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from the Arbitrum Bridge through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an IArbitrumUpdateable contract which receives updates from the router on Ethereum.\\ninterface IArbitrumUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Arbitrum Sequencer contract.\\n /// @param _newSequencerLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerLimit(uint256 _newSequencerLimit) external;\\n}\\n\",\"keccak256\":\"0x4d59f1de812ac1ddad033f03c7dc34b1325b5b6dd43d26b97cd4e0d2d14c371a\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101c06040523480156200001257600080fd5b506040516200271638038062002716833981016040819052620000359162000117565b6004805460c08b90526101408a90526101808890526101608990526001600160a01b03808816608052861660a0526101a0819052610120839052908490558990899089908990899089908990886200008f60028a620001b0565b60e0819052620000a18a6002620001d3565b620000ad9190620001f3565b6101005261014051600190620000c49042620001b0565b620000d09190620001f3565b6001555050600580546001600160a01b0319163317905550620002099e505050505050505050505050505050565b6001600160a01b03811681146200011457600080fd5b50565b60008060008060008060008060006101208a8c0312156200013757600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a01516200016081620000fe565b60a08b01519095506200017381620000fe565b8094505060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001ce57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001ed57620001ed6200019a565b92915050565b81810381811115620001ed57620001ed6200019a565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516123b1620003656000396000818161049b0152611d9d0152600081816104cf015281816108a00152818161153c015281816116c70152611b5c0152600081816105570152611d31015260008181610503015281816108c401528181610c550152818161142a01528181611560015281816116eb0152611b800152600081816103ee01528181610a3b01526119c00152600081816111b001526112e901526000818161115d01526112a10152600081816105ab015281816106a1015281816108270152818161085401528181610c980152818161133901528181611831015281816118980152611cc70152600081816105df01528181610b280152611aad0152600081816102240152818161093f015281816109b901528181610a9d015281816118dc0152818161193e0152611a2201526123b16000f3fe6080604052600436106101d85760003560e01c80638d96fdea11610102578063b633b94411610095578063d5e6a9df11610064578063d5e6a9df146105cd578063da2b7bc414610601578063df19e6ff14610621578063eedcf2a91461064e57600080fd5b8063b633b94414610525578063c2114a1614610545578063c299acc414610579578063d0e30db01461059957600080fd5b80639c13b6b5116100d15780639c13b6b514610473578063aa22a1c614610489578063b044397e146104bd578063b5b7a184146104f157600080fd5b80638d96fdea146103dc57806390df63b714610410578063930f28af1461043d5780639588eca21461045d57600080fd5b806331ddf7431161017a5780634a439cfe116101495780634a439cfe1461035c578063541adcca1461037c5780638a619a711461039c5780638ad3a8f7146103bc57600080fd5b806331ddf743146102dc5780633ce43cfd146102fc5780634788cb381461031c57806349b4299e1461033c57600080fd5b8063222ae786116101b6578063222ae786146102635780632639c0601461028657806327ee6bdd146102b357806331d14457146102c957600080fd5b806301139b68146101dd5780630f0adca5146101f25780631062b39a14610212575b600080fd5b6101f06101eb366004611f57565b610661565b005b3480156101fe57600080fd5b506101f061020d366004611f85565b61089e565b34801561021e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561026f57600080fd5b50610278610c4e565b60405190815260200161025a565b34801561029257600080fd5b506102786102a1366004611fbc565b60026020526000908152604090205481565b3480156102bf57600080fd5b5061027860015481565b6101f06102d7366004611fd5565b610c7f565b3480156102e857600080fd5b506101f06102f7366004612058565b610e06565b34801561030857600080fd5b506101f061031736600461211a565b6110a6565b34801561032857600080fd5b506101f0610337366004611f57565b6111ed565b34801561034857600080fd5b506101f0610357366004611f57565b611371565b34801561036857600080fd5b50610278610377366004611fbc565b611423565b34801561038857600080fd5b50610278610397366004612153565b611455565b3480156103a857600080fd5b506101f06103b7366004612176565b6114a7565b3480156103c857600080fd5b50600554610246906001600160a01b031681565b3480156103e857600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561041c57600080fd5b5061027861042b366004611fbc565b60036020526000908152604090205481565b34801561044957600080fd5b506101f0610458366004611f57565b61153a565b34801561046957600080fd5b5061027860005481565b34801561047f57600080fd5b5061027860045481565b34801561049557600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c957600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156104fd57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561053157600080fd5b506101f0610540366004611f57565b6116c5565b34801561055157600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561058557600080fd5b506101f0610594366004611fbc565b6118d1565b3480156105a557600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d957600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561060d57600080fd5b506101f061061c366004611f57565b611b5a565b34801561062d57600080fd5b5061064161063c366004612153565b611d13565b60405161025a91906121a9565b6101f061065c366004611fd5565b611dda565b61066a81611455565b6000838152600260205260409020541461069f5760405162461bcd60e51b8152600401610696906121c3565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561070f5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610696565b60c08101516001600160a01b03161561076a5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610696565b60008160a00151600281111561078257610782612193565b146107cf5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610696565b3360c08201526107de81611455565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f000000000000000000000000000000000000000000000000000000000000000034111561089a5760006108797f0000000000000000000000000000000000000000000000000000000000000000346121eb565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816108f1576108f161220c565b040311156109345760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109b75760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190612222565b7f000000000000000000000000000000000000000000000000000000000000000014610a9b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1d919061223b565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b905760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b60015483118015610ba057508115155b15610be357600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610bec81611455565b60008481526002602052604090205403610c49578051829003610c1557600160a0820152610c30565b60c08101516001600160a01b031615610c3057600260a08201525b610c3981611455565b6000848152600260205260409020555b505050565b6000610c7a7f000000000000000000000000000000000000000000000000000000000000000042612258565b905090565b6005546001600160a01b03163314610c9657600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610d065760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610696565b80610d235760405162461bcd60e51b8152600401610696906121c3565b60008281526002602052604090205415610d755760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610696565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbb90611455565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050565b60408510610e485760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610696565b600084848484604051602001610e61949392919061227a565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610ee1576000888883818110610ea357610ea36122bc565b90506020020135905082811115610ec857826000528060205260406000209250610ed8565b8060005282602052604060002092505b50600101610e87565b508060005414610f245760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610696565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f995760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610696565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc990899089906122d2565b6000604051808303816000865af19150503d8060008114611006576040519150601f19603f3d011682016040523d82523d6000602084013e61100b565b606091505b505090508061105c5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610696565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b861039736839003830183612153565b600083815260026020526040902054146110e45760405162461bcd60e51b8152600401610696906121c3565b60026110f660c0830160a084016122e2565b600281111561110757611107612193565b146111485760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610696565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506111a293505060e0840191505060c08301612176565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f681611455565b600083815260026020526040902054146112225760405162461bcd60e51b8152600401610696906121c3565b60018160a00151600281111561123a5761123a612193565b146112775760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610696565b60008281526002602052604081205560c08101516001600160a01b031615611323576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6005546001600160a01b0316331461138857600080fd5b61139181611455565b600083815260026020526040902054146113bd5760405162461bcd60e51b8152600401610696906121c3565b63ffffffff4281166060830152431660808201526113da81611455565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a15050565b600061144f7f000000000000000000000000000000000000000000000000000000000000000083612258565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861148a9890979691016122fd565b604051602081830303815290604052805190602001209050919050565b6005546001600160a01b031633146114be57600080fd5b6005546001600160a01b031633146115185760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610696565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161158d5761158d61220c565b040311156115d05760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b6115d981611455565b600083815260026020526040902054146116055760405162461bcd60e51b8152600401610696906121c3565b60c08101516001600160a01b0316156116575760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610696565b60015482111561169f57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a08201526116af81611455565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816117185761171861220c565b0403116117595760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b61176281611455565b6000838152600260205260409020541461178e5760405162461bcd60e51b8152600401610696906121c3565b60008160a0015160028111156117a6576117a6612193565b146117e55760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60c08101516001600160a01b03161561089a5760208101516001600160a01b03166118695760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c081018051600090915261187d82611455565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461193c5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561199a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119be9190612222565b7f000000000000000000000000000000000000000000000000000000000000000014611a205760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aa2919061223b565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614611b155760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b8060045414611b575760048190556040518181527fe5c620413c3d944fbd314ecc2375b9bdcc721589711a4348d9ecaf966160fa389060200160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bad57611bad61220c565b040311611bee5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611bf781611455565b60008381526002602052604090205414611c235760405162461bcd60e51b8152600401610696906121c3565b60008160a001516002811115611c3b57611c3b612193565b14611c7a5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60208101516001600160a01b03161561089a5760c08101516001600160a01b0316611cff5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b602081018051600090915261187d82611455565b6000816060015163ffffffff16600003611d2f57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611d6b57506003919050565b60006005836060015163ffffffff16420381611d8957611d8961220c565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611dcd5760019250611dd2565b600092505b50505b919050565b611de48282610c7f565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611e2b8382611371565b63ffffffff428116606083015243166080820152611e49838261153a565b600160a0820152610c4983826111ed565b6001600160a01b0381168114611b5757600080fd5b8035611dd581611e5a565b803563ffffffff81168114611dd557600080fd5b803560038110611dd557600080fd5b600060e08284031215611eaf57600080fd5b60405160e0810181811067ffffffffffffffff82111715611ee057634e487b7160e01b600052604160045260246000fd5b60405282358152905080611ef660208401611e6f565b6020820152611f0760408401611e7a565b6040820152611f1860608401611e7a565b6060820152611f2960808401611e7a565b6080820152611f3a60a08401611e8e565b60a0820152611f4b60c08401611e6f565b60c08201525092915050565b6000806101008385031215611f6b57600080fd5b82359150611f7c8460208501611e9d565b90509250929050565b60008060006101208486031215611f9b57600080fd5b8335925060208401359150611fb38560408601611e9d565b90509250925092565b600060208284031215611fce57600080fd5b5035919050565b60008060408385031215611fe857600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611dd557600080fd5b60008083601f84011261202157600080fd5b50813567ffffffffffffffff81111561203957600080fd5b60208301915083602082850101111561205157600080fd5b9250929050565b6000806000806000806080878903121561207157600080fd5b863567ffffffffffffffff8082111561208957600080fd5b818901915089601f83011261209d57600080fd5b8135818111156120ac57600080fd5b8a60208260051b85010111156120c157600080fd5b602083019850809750506120d760208a01611ff7565b95506120e560408a01611e6f565b945060608901359150808211156120fb57600080fd5b5061210889828a0161200f565b979a9699509497509295939492505050565b60008082840361010081121561212f57600080fd5b8335925060e0601f198201121561214557600080fd5b506020830190509250929050565b600060e0828403121561216557600080fd5b61216f8383611e9d565b9392505050565b60006020828403121561218857600080fd5b813561216f81611e5a565b634e487b7160e01b600052602160045260246000fd5b60208101600483106121bd576121bd612193565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b8181038181111561144f57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60006020828403121561223457600080fd5b5051919050565b60006020828403121561224d57600080fd5b815161216f81611e5a565b60008261227557634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156122f457600080fd5b61216f82611e8e565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061235557612355612193565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212205d5e24960772c5c18cf100203c59608aa6d0ec9dc0ae35a14fdaa806ed13c60364736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101d85760003560e01c80638d96fdea11610102578063b633b94411610095578063d5e6a9df11610064578063d5e6a9df146105cd578063da2b7bc414610601578063df19e6ff14610621578063eedcf2a91461064e57600080fd5b8063b633b94414610525578063c2114a1614610545578063c299acc414610579578063d0e30db01461059957600080fd5b80639c13b6b5116100d15780639c13b6b514610473578063aa22a1c614610489578063b044397e146104bd578063b5b7a184146104f157600080fd5b80638d96fdea146103dc57806390df63b714610410578063930f28af1461043d5780639588eca21461045d57600080fd5b806331ddf7431161017a5780634a439cfe116101495780634a439cfe1461035c578063541adcca1461037c5780638a619a711461039c5780638ad3a8f7146103bc57600080fd5b806331ddf743146102dc5780633ce43cfd146102fc5780634788cb381461031c57806349b4299e1461033c57600080fd5b8063222ae786116101b6578063222ae786146102635780632639c0601461028657806327ee6bdd146102b357806331d14457146102c957600080fd5b806301139b68146101dd5780630f0adca5146101f25780631062b39a14610212575b600080fd5b6101f06101eb366004611f57565b610661565b005b3480156101fe57600080fd5b506101f061020d366004611f85565b61089e565b34801561021e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561026f57600080fd5b50610278610c4e565b60405190815260200161025a565b34801561029257600080fd5b506102786102a1366004611fbc565b60026020526000908152604090205481565b3480156102bf57600080fd5b5061027860015481565b6101f06102d7366004611fd5565b610c7f565b3480156102e857600080fd5b506101f06102f7366004612058565b610e06565b34801561030857600080fd5b506101f061031736600461211a565b6110a6565b34801561032857600080fd5b506101f0610337366004611f57565b6111ed565b34801561034857600080fd5b506101f0610357366004611f57565b611371565b34801561036857600080fd5b50610278610377366004611fbc565b611423565b34801561038857600080fd5b50610278610397366004612153565b611455565b3480156103a857600080fd5b506101f06103b7366004612176565b6114a7565b3480156103c857600080fd5b50600554610246906001600160a01b031681565b3480156103e857600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561041c57600080fd5b5061027861042b366004611fbc565b60036020526000908152604090205481565b34801561044957600080fd5b506101f0610458366004611f57565b61153a565b34801561046957600080fd5b5061027860005481565b34801561047f57600080fd5b5061027860045481565b34801561049557600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c957600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156104fd57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561053157600080fd5b506101f0610540366004611f57565b6116c5565b34801561055157600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561058557600080fd5b506101f0610594366004611fbc565b6118d1565b3480156105a557600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d957600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561060d57600080fd5b506101f061061c366004611f57565b611b5a565b34801561062d57600080fd5b5061064161063c366004612153565b611d13565b60405161025a91906121a9565b6101f061065c366004611fd5565b611dda565b61066a81611455565b6000838152600260205260409020541461069f5760405162461bcd60e51b8152600401610696906121c3565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561070f5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610696565b60c08101516001600160a01b03161561076a5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610696565b60008160a00151600281111561078257610782612193565b146107cf5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610696565b3360c08201526107de81611455565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f000000000000000000000000000000000000000000000000000000000000000034111561089a5760006108797f0000000000000000000000000000000000000000000000000000000000000000346121eb565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816108f1576108f161220c565b040311156109345760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109b75760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190612222565b7f000000000000000000000000000000000000000000000000000000000000000014610a9b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1d919061223b565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b905760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b60015483118015610ba057508115155b15610be357600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610bec81611455565b60008481526002602052604090205403610c49578051829003610c1557600160a0820152610c30565b60c08101516001600160a01b031615610c3057600260a08201525b610c3981611455565b6000848152600260205260409020555b505050565b6000610c7a7f000000000000000000000000000000000000000000000000000000000000000042612258565b905090565b6005546001600160a01b03163314610c9657600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610d065760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610696565b80610d235760405162461bcd60e51b8152600401610696906121c3565b60008281526002602052604090205415610d755760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610696565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbb90611455565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050565b60408510610e485760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610696565b600084848484604051602001610e61949392919061227a565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610ee1576000888883818110610ea357610ea36122bc565b90506020020135905082811115610ec857826000528060205260406000209250610ed8565b8060005282602052604060002092505b50600101610e87565b508060005414610f245760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610696565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f995760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610696565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc990899089906122d2565b6000604051808303816000865af19150503d8060008114611006576040519150601f19603f3d011682016040523d82523d6000602084013e61100b565b606091505b505090508061105c5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610696565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b861039736839003830183612153565b600083815260026020526040902054146110e45760405162461bcd60e51b8152600401610696906121c3565b60026110f660c0830160a084016122e2565b600281111561110757611107612193565b146111485760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610696565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506111a293505060e0840191505060c08301612176565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f681611455565b600083815260026020526040902054146112225760405162461bcd60e51b8152600401610696906121c3565b60018160a00151600281111561123a5761123a612193565b146112775760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610696565b60008281526002602052604081205560c08101516001600160a01b031615611323576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6005546001600160a01b0316331461138857600080fd5b61139181611455565b600083815260026020526040902054146113bd5760405162461bcd60e51b8152600401610696906121c3565b63ffffffff4281166060830152431660808201526113da81611455565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a15050565b600061144f7f000000000000000000000000000000000000000000000000000000000000000083612258565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861148a9890979691016122fd565b604051602081830303815290604052805190602001209050919050565b6005546001600160a01b031633146114be57600080fd5b6005546001600160a01b031633146115185760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610696565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161158d5761158d61220c565b040311156115d05760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b6115d981611455565b600083815260026020526040902054146116055760405162461bcd60e51b8152600401610696906121c3565b60c08101516001600160a01b0316156116575760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610696565b60015482111561169f57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a08201526116af81611455565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816117185761171861220c565b0403116117595760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b61176281611455565b6000838152600260205260409020541461178e5760405162461bcd60e51b8152600401610696906121c3565b60008160a0015160028111156117a6576117a6612193565b146117e55760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60c08101516001600160a01b03161561089a5760208101516001600160a01b03166118695760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c081018051600090915261187d82611455565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461193c5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561199a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119be9190612222565b7f000000000000000000000000000000000000000000000000000000000000000014611a205760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aa2919061223b565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614611b155760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b8060045414611b575760048190556040518181527fe5c620413c3d944fbd314ecc2375b9bdcc721589711a4348d9ecaf966160fa389060200160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bad57611bad61220c565b040311611bee5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611bf781611455565b60008381526002602052604090205414611c235760405162461bcd60e51b8152600401610696906121c3565b60008160a001516002811115611c3b57611c3b612193565b14611c7a5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60208101516001600160a01b03161561089a5760c08101516001600160a01b0316611cff5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b602081018051600090915261187d82611455565b6000816060015163ffffffff16600003611d2f57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611d6b57506003919050565b60006005836060015163ffffffff16420381611d8957611d8961220c565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611dcd5760019250611dd2565b600092505b50505b919050565b611de48282610c7f565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611e2b8382611371565b63ffffffff428116606083015243166080820152611e49838261153a565b600160a0820152610c4983826111ed565b6001600160a01b0381168114611b5757600080fd5b8035611dd581611e5a565b803563ffffffff81168114611dd557600080fd5b803560038110611dd557600080fd5b600060e08284031215611eaf57600080fd5b60405160e0810181811067ffffffffffffffff82111715611ee057634e487b7160e01b600052604160045260246000fd5b60405282358152905080611ef660208401611e6f565b6020820152611f0760408401611e7a565b6040820152611f1860608401611e7a565b6060820152611f2960808401611e7a565b6080820152611f3a60a08401611e8e565b60a0820152611f4b60c08401611e6f565b60c08201525092915050565b6000806101008385031215611f6b57600080fd5b82359150611f7c8460208501611e9d565b90509250929050565b60008060006101208486031215611f9b57600080fd5b8335925060208401359150611fb38560408601611e9d565b90509250925092565b600060208284031215611fce57600080fd5b5035919050565b60008060408385031215611fe857600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611dd557600080fd5b60008083601f84011261202157600080fd5b50813567ffffffffffffffff81111561203957600080fd5b60208301915083602082850101111561205157600080fd5b9250929050565b6000806000806000806080878903121561207157600080fd5b863567ffffffffffffffff8082111561208957600080fd5b818901915089601f83011261209d57600080fd5b8135818111156120ac57600080fd5b8a60208260051b85010111156120c157600080fd5b602083019850809750506120d760208a01611ff7565b95506120e560408a01611e6f565b945060608901359150808211156120fb57600080fd5b5061210889828a0161200f565b979a9699509497509295939492505050565b60008082840361010081121561212f57600080fd5b8335925060e0601f198201121561214557600080fd5b506020830190509250929050565b600060e0828403121561216557600080fd5b61216f8383611e9d565b9392505050565b60006020828403121561218857600080fd5b813561216f81611e5a565b634e487b7160e01b600052602160045260246000fd5b60208101600483106121bd576121bd612193565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b8181038181111561144f57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60006020828403121561223457600080fd5b5051919050565b60006020828403121561224d57600080fd5b815161216f81611e5a565b60008261227557634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156122f457600080fd5b61216f82611e8e565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061235557612355612193565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212205d5e24960772c5c18cf100203c59608aa6d0ec9dc0ae35a14fdaa806ed13c60364736f6c63430008120033", + "numDeployments": 12, + "solcInputHash": "ad697f618f73759e1d99ca054913682f", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosisDevnet\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_routerArbToGnosisDevnet\":\"The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\",\"_routerChainId\":\"The chain id of the router contract.\",\"_sequencerDelayLimit\":\"The maximum number of sequencer messages that can be submitted in a challenge period.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256)\":{\"details\":\"Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":\"VeaOutboxArbToGnosisDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x2fe0351f519bd619887915bbe25f2b18d52f1170d6640f49698b3d4dc56d2601\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToGnosis/VeaOutboxArbToGnosis.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Chiado.\\n/// Note: This contract is deployed on Chiado.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosisDevnet The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _sequencerDelayLimit The maximum number of sequencer messages that can be submitted in a challenge period.\\n /// @param _routerChainId The chain id of the router contract.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosisDevnet,\\n uint256 _maxMissingBlocks,\\n uint256 _sequencerDelayLimit,\\n uint256 _routerChainId\\n )\\n VeaOutboxArbToGnosis(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _amb,\\n _routerArbToGnosisDevnet,\\n _maxMissingBlocks,\\n _sequencerDelayLimit,\\n _routerChainId\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xab3a39d2515db68f62fde6addb1d845b20e04dc70fb5dcb329b69e8309dbc4d1\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Arbitrum Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit) external;\\n}\",\"keccak256\":\"0xcf2532733ecd20779e259f12452b75f0ebda4965bc8aa2c8af041df908e632d3\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101c06040523480156200001257600080fd5b506040516200270d3803806200270d83398101604081905262000035916200010e565b60c08990526101408890526101808690526101608790526001600160a01b03808616608052841660a0526101a082905261012081905260048390558888888888888888886200008660028a620001a7565b60e0819052620000988a6002620001ca565b620000a49190620001ea565b6101005261014051600190620000bb9042620001a7565b620000c79190620001ea565b6001555050600580546001600160a01b0319163317905550620002009e505050505050505050505050505050565b6001600160a01b03811681146200010b57600080fd5b50565b60008060008060008060008060006101208a8c0312156200012e57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a01516200015781620000f5565b60a08b01519095506200016a81620000f5565b8094505060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001c557634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001e457620001e462000191565b92915050565b81810381811115620001e457620001e462000191565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516123b16200035c600039600081816104a50152611d9d0152600081816104d9015281816108a0015281816117c5015281816119500152611b5c0152600081816105610152611d3101526000818161050d015281816108c401528181610c550152818161142a015281816117e9015281816119740152611b8001526000818161040e01528181610a3b01526115960152600081816111b001526112e901526000818161115d01526112a1015260008181610595015281816106a1015281816108270152818161085401528181610c980152818161133901528181611aba01528181611b210152611cc70152600081816105c901528181610b2801526116830152600081816102240152818161093f015281816109b901528181610a9d015281816114b20152818161151401526115f801526123b16000f3fe6080604052600436106101d85760003560e01c80638ad3a8f711610102578063b633b94411610095578063da2b7bc411610064578063da2b7bc4146105eb578063df19e6ff1461060b578063e813a75514610638578063eedcf2a91461064e57600080fd5b8063b633b9441461052f578063c2114a161461054f578063d0e30db014610583578063d5e6a9df146105b757600080fd5b80639588eca2116100d15780639588eca21461047d578063aa22a1c614610493578063b044397e146104c7578063b5b7a184146104fb57600080fd5b80638ad3a8f7146103dc5780638d96fdea146103fc57806390df63b714610430578063930f28af1461045d57600080fd5b806331ddf7431161017a5780634a439cfe116101495780634a439cfe1461035c578063541adcca1461037c578063654bc9651461039c5780638a619a71146103bc57600080fd5b806331ddf743146102dc5780633ce43cfd146102fc5780634788cb381461031c57806349b4299e1461033c57600080fd5b8063222ae786116101b6578063222ae786146102635780632639c0601461028657806327ee6bdd146102b357806331d14457146102c957600080fd5b806301139b68146101dd5780630f0adca5146101f25780631062b39a14610212575b600080fd5b6101f06101eb366004611f57565b610661565b005b3480156101fe57600080fd5b506101f061020d366004611f85565b61089e565b34801561021e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561026f57600080fd5b50610278610c4e565b60405190815260200161025a565b34801561029257600080fd5b506102786102a1366004611fbc565b60026020526000908152604090205481565b3480156102bf57600080fd5b5061027860015481565b6101f06102d7366004611fd5565b610c7f565b3480156102e857600080fd5b506101f06102f7366004612058565b610e06565b34801561030857600080fd5b506101f061031736600461211a565b6110a6565b34801561032857600080fd5b506101f0610337366004611f57565b6111ed565b34801561034857600080fd5b506101f0610357366004611f57565b611371565b34801561036857600080fd5b50610278610377366004611fbc565b611423565b34801561038857600080fd5b50610278610397366004612153565b611455565b3480156103a857600080fd5b506101f06103b7366004611fbc565b6114a7565b3480156103c857600080fd5b506101f06103d7366004612176565b611730565b3480156103e857600080fd5b50600554610246906001600160a01b031681565b34801561040857600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561043c57600080fd5b5061027861044b366004611fbc565b60036020526000908152604090205481565b34801561046957600080fd5b506101f0610478366004611f57565b6117c3565b34801561048957600080fd5b5061027860005481565b34801561049f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d357600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561050757600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561053b57600080fd5b506101f061054a366004611f57565b61194e565b34801561055b57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561058f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c357600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f757600080fd5b506101f0610606366004611f57565b611b5a565b34801561061757600080fd5b5061062b610626366004612153565b611d13565b60405161025a91906121a9565b34801561064457600080fd5b5061027860045481565b6101f061065c366004611fd5565b611dda565b61066a81611455565b6000838152600260205260409020541461069f5760405162461bcd60e51b8152600401610696906121c3565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561070f5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610696565b60c08101516001600160a01b03161561076a5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610696565b60008160a00151600281111561078257610782612193565b146107cf5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610696565b3360c08201526107de81611455565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f000000000000000000000000000000000000000000000000000000000000000034111561089a5760006108797f0000000000000000000000000000000000000000000000000000000000000000346121eb565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816108f1576108f161220c565b040311156109345760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109b75760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190612222565b7f000000000000000000000000000000000000000000000000000000000000000014610a9b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1d919061223b565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b905760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b60015483118015610ba057508115155b15610be357600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610bec81611455565b60008481526002602052604090205403610c49578051829003610c1557600160a0820152610c30565b60c08101516001600160a01b031615610c3057600260a08201525b610c3981611455565b6000848152600260205260409020555b505050565b6000610c7a7f000000000000000000000000000000000000000000000000000000000000000042612258565b905090565b6005546001600160a01b03163314610c9657600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610d065760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610696565b80610d235760405162461bcd60e51b8152600401610696906121c3565b60008281526002602052604090205415610d755760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610696565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbb90611455565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050565b60408510610e485760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610696565b600084848484604051602001610e61949392919061227a565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610ee1576000888883818110610ea357610ea36122bc565b90506020020135905082811115610ec857826000528060205260406000209250610ed8565b8060005282602052604060002092505b50600101610e87565b508060005414610f245760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610696565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f995760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610696565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc990899089906122d2565b6000604051808303816000865af19150503d8060008114611006576040519150601f19603f3d011682016040523d82523d6000602084013e61100b565b606091505b505090508061105c5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610696565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b861039736839003830183612153565b600083815260026020526040902054146110e45760405162461bcd60e51b8152600401610696906121c3565b60026110f660c0830160a084016122e2565b600281111561110757611107612193565b146111485760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610696565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506111a293505060e0840191505060c08301612176565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f681611455565b600083815260026020526040902054146112225760405162461bcd60e51b8152600401610696906121c3565b60018160a00151600281111561123a5761123a612193565b146112775760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610696565b60008281526002602052604081205560c08101516001600160a01b031615611323576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6005546001600160a01b0316331461138857600080fd5b61139181611455565b600083815260026020526040902054146113bd5760405162461bcd60e51b8152600401610696906121c3565b63ffffffff4281166060830152431660808201526113da81611455565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a15050565b600061144f7f000000000000000000000000000000000000000000000000000000000000000083612258565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861148a9890979691016122fd565b604051602081830303815290604052805190602001209050919050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115125760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611570573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115949190612222565b7f0000000000000000000000000000000000000000000000000000000000000000146115f65760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015611654573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611678919061223b565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146116eb5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b806004541461172d5760048190556040518181527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b50565b6005546001600160a01b0316331461174757600080fd5b6005546001600160a01b031633146117a15760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610696565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816118165761181661220c565b040311156118595760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b61186281611455565b6000838152600260205260409020541461188e5760405162461bcd60e51b8152600401610696906121c3565b60c08101516001600160a01b0316156118e05760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610696565b60015482111561192857600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261193881611455565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119a1576119a161220c565b0403116119e25760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b6119eb81611455565b60008381526002602052604090205414611a175760405162461bcd60e51b8152600401610696906121c3565b60008160a001516002811115611a2f57611a2f612193565b14611a6e5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60c08101516001600160a01b03161561089a5760208101516001600160a01b0316611af25760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b0682611455565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bad57611bad61220c565b040311611bee5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611bf781611455565b60008381526002602052604090205414611c235760405162461bcd60e51b8152600401610696906121c3565b60008160a001516002811115611c3b57611c3b612193565b14611c7a5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60208101516001600160a01b03161561089a5760c08101516001600160a01b0316611cff5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b0682611455565b6000816060015163ffffffff16600003611d2f57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611d6b57506003919050565b60006005836060015163ffffffff16420381611d8957611d8961220c565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611dcd5760019250611dd2565b600092505b50505b919050565b611de48282610c7f565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611e2b8382611371565b63ffffffff428116606083015243166080820152611e4983826117c3565b600160a0820152610c4983826111ed565b6001600160a01b038116811461172d57600080fd5b8035611dd581611e5a565b803563ffffffff81168114611dd557600080fd5b803560038110611dd557600080fd5b600060e08284031215611eaf57600080fd5b60405160e0810181811067ffffffffffffffff82111715611ee057634e487b7160e01b600052604160045260246000fd5b60405282358152905080611ef660208401611e6f565b6020820152611f0760408401611e7a565b6040820152611f1860608401611e7a565b6060820152611f2960808401611e7a565b6080820152611f3a60a08401611e8e565b60a0820152611f4b60c08401611e6f565b60c08201525092915050565b6000806101008385031215611f6b57600080fd5b82359150611f7c8460208501611e9d565b90509250929050565b60008060006101208486031215611f9b57600080fd5b8335925060208401359150611fb38560408601611e9d565b90509250925092565b600060208284031215611fce57600080fd5b5035919050565b60008060408385031215611fe857600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611dd557600080fd5b60008083601f84011261202157600080fd5b50813567ffffffffffffffff81111561203957600080fd5b60208301915083602082850101111561205157600080fd5b9250929050565b6000806000806000806080878903121561207157600080fd5b863567ffffffffffffffff8082111561208957600080fd5b818901915089601f83011261209d57600080fd5b8135818111156120ac57600080fd5b8a60208260051b85010111156120c157600080fd5b602083019850809750506120d760208a01611ff7565b95506120e560408a01611e6f565b945060608901359150808211156120fb57600080fd5b5061210889828a0161200f565b979a9699509497509295939492505050565b60008082840361010081121561212f57600080fd5b8335925060e0601f198201121561214557600080fd5b506020830190509250929050565b600060e0828403121561216557600080fd5b61216f8383611e9d565b9392505050565b60006020828403121561218857600080fd5b813561216f81611e5a565b634e487b7160e01b600052602160045260246000fd5b60208101600483106121bd576121bd612193565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b8181038181111561144f57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60006020828403121561223457600080fd5b5051919050565b60006020828403121561224d57600080fd5b815161216f81611e5a565b60008261227557634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156122f457600080fd5b61216f82611e8e565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061235557612355612193565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122036459ebec58d3a58d557d1eced6662f003afbbc89580afca39609a7f839d2f6264736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101d85760003560e01c80638ad3a8f711610102578063b633b94411610095578063da2b7bc411610064578063da2b7bc4146105eb578063df19e6ff1461060b578063e813a75514610638578063eedcf2a91461064e57600080fd5b8063b633b9441461052f578063c2114a161461054f578063d0e30db014610583578063d5e6a9df146105b757600080fd5b80639588eca2116100d15780639588eca21461047d578063aa22a1c614610493578063b044397e146104c7578063b5b7a184146104fb57600080fd5b80638ad3a8f7146103dc5780638d96fdea146103fc57806390df63b714610430578063930f28af1461045d57600080fd5b806331ddf7431161017a5780634a439cfe116101495780634a439cfe1461035c578063541adcca1461037c578063654bc9651461039c5780638a619a71146103bc57600080fd5b806331ddf743146102dc5780633ce43cfd146102fc5780634788cb381461031c57806349b4299e1461033c57600080fd5b8063222ae786116101b6578063222ae786146102635780632639c0601461028657806327ee6bdd146102b357806331d14457146102c957600080fd5b806301139b68146101dd5780630f0adca5146101f25780631062b39a14610212575b600080fd5b6101f06101eb366004611f57565b610661565b005b3480156101fe57600080fd5b506101f061020d366004611f85565b61089e565b34801561021e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561026f57600080fd5b50610278610c4e565b60405190815260200161025a565b34801561029257600080fd5b506102786102a1366004611fbc565b60026020526000908152604090205481565b3480156102bf57600080fd5b5061027860015481565b6101f06102d7366004611fd5565b610c7f565b3480156102e857600080fd5b506101f06102f7366004612058565b610e06565b34801561030857600080fd5b506101f061031736600461211a565b6110a6565b34801561032857600080fd5b506101f0610337366004611f57565b6111ed565b34801561034857600080fd5b506101f0610357366004611f57565b611371565b34801561036857600080fd5b50610278610377366004611fbc565b611423565b34801561038857600080fd5b50610278610397366004612153565b611455565b3480156103a857600080fd5b506101f06103b7366004611fbc565b6114a7565b3480156103c857600080fd5b506101f06103d7366004612176565b611730565b3480156103e857600080fd5b50600554610246906001600160a01b031681565b34801561040857600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561043c57600080fd5b5061027861044b366004611fbc565b60036020526000908152604090205481565b34801561046957600080fd5b506101f0610478366004611f57565b6117c3565b34801561048957600080fd5b5061027860005481565b34801561049f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d357600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561050757600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561053b57600080fd5b506101f061054a366004611f57565b61194e565b34801561055b57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561058f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c357600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f757600080fd5b506101f0610606366004611f57565b611b5a565b34801561061757600080fd5b5061062b610626366004612153565b611d13565b60405161025a91906121a9565b34801561064457600080fd5b5061027860045481565b6101f061065c366004611fd5565b611dda565b61066a81611455565b6000838152600260205260409020541461069f5760405162461bcd60e51b8152600401610696906121c3565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561070f5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610696565b60c08101516001600160a01b03161561076a5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610696565b60008160a00151600281111561078257610782612193565b146107cf5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610696565b3360c08201526107de81611455565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f000000000000000000000000000000000000000000000000000000000000000034111561089a5760006108797f0000000000000000000000000000000000000000000000000000000000000000346121eb565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816108f1576108f161220c565b040311156109345760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109b75760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190612222565b7f000000000000000000000000000000000000000000000000000000000000000014610a9b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1d919061223b565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b905760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b60015483118015610ba057508115155b15610be357600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610bec81611455565b60008481526002602052604090205403610c49578051829003610c1557600160a0820152610c30565b60c08101516001600160a01b031615610c3057600260a08201525b610c3981611455565b6000848152600260205260409020555b505050565b6000610c7a7f000000000000000000000000000000000000000000000000000000000000000042612258565b905090565b6005546001600160a01b03163314610c9657600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610d065760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610696565b80610d235760405162461bcd60e51b8152600401610696906121c3565b60008281526002602052604090205415610d755760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610696565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbb90611455565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050565b60408510610e485760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610696565b600084848484604051602001610e61949392919061227a565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610ee1576000888883818110610ea357610ea36122bc565b90506020020135905082811115610ec857826000528060205260406000209250610ed8565b8060005282602052604060002092505b50600101610e87565b508060005414610f245760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610696565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f995760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610696565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc990899089906122d2565b6000604051808303816000865af19150503d8060008114611006576040519150601f19603f3d011682016040523d82523d6000602084013e61100b565b606091505b505090508061105c5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610696565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b861039736839003830183612153565b600083815260026020526040902054146110e45760405162461bcd60e51b8152600401610696906121c3565b60026110f660c0830160a084016122e2565b600281111561110757611107612193565b146111485760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610696565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506111a293505060e0840191505060c08301612176565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f681611455565b600083815260026020526040902054146112225760405162461bcd60e51b8152600401610696906121c3565b60018160a00151600281111561123a5761123a612193565b146112775760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610696565b60008281526002602052604081205560c08101516001600160a01b031615611323576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6005546001600160a01b0316331461138857600080fd5b61139181611455565b600083815260026020526040902054146113bd5760405162461bcd60e51b8152600401610696906121c3565b63ffffffff4281166060830152431660808201526113da81611455565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a15050565b600061144f7f000000000000000000000000000000000000000000000000000000000000000083612258565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861148a9890979691016122fd565b604051602081830303815290604052805190602001209050919050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115125760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611570573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115949190612222565b7f0000000000000000000000000000000000000000000000000000000000000000146115f65760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015611654573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611678919061223b565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146116eb5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b806004541461172d5760048190556040518181527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b50565b6005546001600160a01b0316331461174757600080fd5b6005546001600160a01b031633146117a15760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610696565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816118165761181661220c565b040311156118595760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b61186281611455565b6000838152600260205260409020541461188e5760405162461bcd60e51b8152600401610696906121c3565b60c08101516001600160a01b0316156118e05760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610696565b60015482111561192857600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261193881611455565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119a1576119a161220c565b0403116119e25760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b6119eb81611455565b60008381526002602052604090205414611a175760405162461bcd60e51b8152600401610696906121c3565b60008160a001516002811115611a2f57611a2f612193565b14611a6e5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60c08101516001600160a01b03161561089a5760208101516001600160a01b0316611af25760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b0682611455565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bad57611bad61220c565b040311611bee5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611bf781611455565b60008381526002602052604090205414611c235760405162461bcd60e51b8152600401610696906121c3565b60008160a001516002811115611c3b57611c3b612193565b14611c7a5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60208101516001600160a01b03161561089a5760c08101516001600160a01b0316611cff5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b0682611455565b6000816060015163ffffffff16600003611d2f57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611d6b57506003919050565b60006005836060015163ffffffff16420381611d8957611d8961220c565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611dcd5760019250611dd2565b600092505b50505b919050565b611de48282610c7f565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611e2b8382611371565b63ffffffff428116606083015243166080820152611e4983826117c3565b600160a0820152610c4983826111ed565b6001600160a01b038116811461172d57600080fd5b8035611dd581611e5a565b803563ffffffff81168114611dd557600080fd5b803560038110611dd557600080fd5b600060e08284031215611eaf57600080fd5b60405160e0810181811067ffffffffffffffff82111715611ee057634e487b7160e01b600052604160045260246000fd5b60405282358152905080611ef660208401611e6f565b6020820152611f0760408401611e7a565b6040820152611f1860608401611e7a565b6060820152611f2960808401611e7a565b6080820152611f3a60a08401611e8e565b60a0820152611f4b60c08401611e6f565b60c08201525092915050565b6000806101008385031215611f6b57600080fd5b82359150611f7c8460208501611e9d565b90509250929050565b60008060006101208486031215611f9b57600080fd5b8335925060208401359150611fb38560408601611e9d565b90509250925092565b600060208284031215611fce57600080fd5b5035919050565b60008060408385031215611fe857600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611dd557600080fd5b60008083601f84011261202157600080fd5b50813567ffffffffffffffff81111561203957600080fd5b60208301915083602082850101111561205157600080fd5b9250929050565b6000806000806000806080878903121561207157600080fd5b863567ffffffffffffffff8082111561208957600080fd5b818901915089601f83011261209d57600080fd5b8135818111156120ac57600080fd5b8a60208260051b85010111156120c157600080fd5b602083019850809750506120d760208a01611ff7565b95506120e560408a01611e6f565b945060608901359150808211156120fb57600080fd5b5061210889828a0161200f565b979a9699509497509295939492505050565b60008082840361010081121561212f57600080fd5b8335925060e0601f198201121561214557600080fd5b506020830190509250929050565b600060e0828403121561216557600080fd5b61216f8383611e9d565b9392505050565b60006020828403121561218857600080fd5b813561216f81611e5a565b634e487b7160e01b600052602160045260246000fd5b60208101600483106121bd576121bd612193565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b8181038181111561144f57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60006020828403121561223457600080fd5b5051919050565b60006020828403121561224d57600080fd5b815161216f81611e5a565b60008261227557634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156122f457600080fd5b61216f82611e8e565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061235557612355612193565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122036459ebec58d3a58d557d1eced6662f003afbbc89580afca39609a7f839d2f6264736f6c63430008120033", "devdoc": { "details": "Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).", "events": { @@ -1071,12 +1071,6 @@ "_msgId": "The msgId of the message that was relayed." } }, - "SequencerLimitUpdateReceived(uint256)": { - "details": "This event indicates the sequencer limit updated.", - "params": { - "_newSequencerLimit": "The new maxL2StateSyncDelay." - } - }, "VerificationStarted(uint256)": { "details": "This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.", "params": { @@ -1088,6 +1082,12 @@ "params": { "_epoch": "The epoch that was verified." } + }, + "sequencerDelayLimitUpdateReceived(uint256)": { + "details": "This event indicates the sequencer limit updated.", + "params": { + "_newsequencerDelayLimit": "The new maxL2StateSyncDelay." + } } }, "kind": "dev", @@ -1131,7 +1131,7 @@ "_maxMissingBlocks": "The maximum number of blocks that can be missing in a challenge period.", "_routerArbToGnosisDevnet": "The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.", "_routerChainId": "The chain id of the router contract.", - "_sequencerLimit": "The maximum number of sequencer messages that can be submitted in a challenge period.", + "_sequencerDelayLimit": "The maximum number of sequencer messages that can be submitted in a challenge period.", "_timeoutEpochs": "The epochs before the bridge is considered shutdown." } }, @@ -1187,10 +1187,10 @@ "_epoch": "The epoch of the claim to challenge." } }, - "updateSequencerLimit(uint256)": { + "updateSequencerDelayLimit(uint256)": { "details": "Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge", "params": { - "_newSequencerLimit": "The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract." + "_newSequencerDelayLimit": "The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract." } }, "verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { @@ -1243,7 +1243,7 @@ "storageLayout": { "storage": [ { - "astId": 2556, + "astId": 2542, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "stateRoot", "offset": 0, @@ -1251,7 +1251,7 @@ "type": "t_bytes32" }, { - "astId": 2558, + "astId": 2544, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "latestVerifiedEpoch", "offset": 0, @@ -1259,7 +1259,7 @@ "type": "t_uint256" }, { - "astId": 2562, + "astId": 2548, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "claimHashes", "offset": 0, @@ -1267,7 +1267,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2566, + "astId": 2552, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "relayed", "offset": 0, @@ -1275,15 +1275,15 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2568, + "astId": 2554, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", - "label": "sequencerLimit", + "label": "sequencerDelayLimit", "offset": 0, "slot": "4", "type": "t_uint256" }, { - "astId": 4440, + "astId": 5915, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "devnetOperator", "offset": 0, diff --git a/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json b/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json index 1c8bd118..c981bed3 100644 --- a/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json +++ b/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x53194Fa828ebEfa5cB515d23CC2467d88f6B0Be2", + "address": "0xd7610CF459C13Ff22923692Ab023dF5a58DeA838", "abi": [ { "inputs": [ @@ -35,7 +35,7 @@ }, { "internalType": "uint256", - "name": "_sequencerLimit", + "name": "_sequencerDelayLimit", "type": "uint256" }, { @@ -109,11 +109,11 @@ { "indexed": false, "internalType": "uint256", - "name": "_newSequencerLimit", + "name": "_epoch", "type": "uint256" } ], - "name": "SequencerLimitUpdateReceived", + "name": "VerificationStarted", "type": "event" }, { @@ -126,7 +126,7 @@ "type": "uint256" } ], - "name": "VerificationStarted", + "name": "Verified", "type": "event" }, { @@ -135,11 +135,11 @@ { "indexed": false, "internalType": "uint256", - "name": "_epoch", + "name": "_newsequencerDelayLimit", "type": "uint256" } ], - "name": "Verified", + "name": "sequencerDelayLimitUpdateReceived", "type": "event" }, { @@ -591,7 +591,7 @@ }, { "inputs": [], - "name": "sequencerLimit", + "name": "sequencerDelayLimit", "outputs": [ { "internalType": "uint256", @@ -687,11 +687,11 @@ "inputs": [ { "internalType": "uint256", - "name": "_newSequencerLimit", + "name": "_newSequencerDelayLimit", "type": "uint256" } ], - "name": "updateSequencerLimit", + "name": "updateSequencerDelayLimit", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -972,19 +972,19 @@ "type": "function" } ], - "transactionHash": "0xf6612fe40e11c51584f45204d69f623f17485bcf1b93fe57fbd9ccf815918bb1", + "transactionHash": "0xedba060f9d5450f69b19698bbfa2b5322a20c0363b2f4646f179fd0a212d99f0", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x53194Fa828ebEfa5cB515d23CC2467d88f6B0Be2", - "transactionIndex": 2, - "gasUsed": "2127697", + "contractAddress": "0xd7610CF459C13Ff22923692Ab023dF5a58DeA838", + "transactionIndex": 0, + "gasUsed": "2127685", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x15cf7be6705c1c31af30804e20c6eb833b90723cb1234786183a7bb6fdfc73ab", - "transactionHash": "0xf6612fe40e11c51584f45204d69f623f17485bcf1b93fe57fbd9ccf815918bb1", + "blockHash": "0x4aa5277514da0accdd1dad27cff8c4a53fd016f0fc291e41b59f5d041ef4c3da", + "transactionHash": "0xedba060f9d5450f69b19698bbfa2b5322a20c0363b2f4646f179fd0a212d99f0", "logs": [], - "blockNumber": 4472675, - "cumulativeGasUsed": "2184685", + "blockNumber": 4486384, + "cumulativeGasUsed": "2127685", "status": 1, "byzantium": true }, @@ -994,16 +994,16 @@ 10800, 1000000, "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0xfF2B7048d673767754B798df1702C786E2c59F1F", + "0xbB800a318b5CeE079ADdBC6141A0BB1665793014", 86400, 1000000, 5 ], - "numDeployments": 2, - "solcInputHash": "c9836c6cb024801f3104e49f87086294", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"SequencerLimitUpdateReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"updateSequencerLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"SequencerLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerLimit\":\"The new maxL2StateSyncDelay.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Ethereum.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerLimit(uint256)\":{\"details\":\"Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":\"VeaOutboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/IArbitrumUpdatable.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, IArbitrumUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerLimit The new maxL2StateSyncDelay.\\n event SequencerLimitUpdateReceived(uint256 _newSequencerLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerLimit = _sequencerLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n /// @param _newSequencerLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerLimit(uint256 _newSequencerLimit) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (sequencerLimit != _newSequencerLimit) {\\n sequencerLimit = _newSequencerLimit;\\n emit SequencerLimitUpdateReceived(_newSequencerLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerLimit) {\\n // Allow claims to be made within the sequencerLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x3598855941548dfff854203745983d57b0125c0bdab5b070adb5b0e1725f5245\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/IArbitrumUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from the Arbitrum Bridge through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an IArbitrumUpdateable contract which receives updates from the router on Ethereum.\\ninterface IArbitrumUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Arbitrum Sequencer contract.\\n /// @param _newSequencerLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerLimit(uint256 _newSequencerLimit) external;\\n}\\n\",\"keccak256\":\"0x4d59f1de812ac1ddad033f03c7dc34b1325b5b6dd43d26b97cd4e0d2d14c371a\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101c06040523480156200001257600080fd5b5060405162002802380380620028028339810160408190526200003591620000ea565b60c08990526101408890526101808690526101608790526001600160a01b03808616608052841660a0526101a082905261012081905260048390556200007d60028a62000183565b60e08190526200008f8a6002620001a6565b6200009b9190620001c6565b6101005261014051600190620000b2904262000183565b620000be9190620001c6565b60015550620001dc975050505050505050565b6001600160a01b0381168114620000e757600080fd5b50565b60008060008060008060008060006101208a8c0312156200010a57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a01516200013381620000d1565b60a08b01519095506200014681620000d1565b8094505060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001a157634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001c057620001c06200016d565b92915050565b81810381811115620001c057620001c06200016d565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516124bc620003466000396000818161043a0152611f0d01526000818161046e0152818161082d01528181611643015281816118370152611ccc0152600081816104f60152611ea10152600081816104a20152818161085101528181610be201528181610c7e01528181610d060152818161140a015281816115c4015281816116670152818161185b0152611cf001526000818161038d015281816109c80152611b30015260006112210152600081816111ce015261133301526000818161054a0152818161062d015281816107b4015281816107e101528181610c0e01528181611396015281816119a101528181611a080152611e3701526000818161057e01528181610ab50152611c1d015260008181610203015281816108cc0152818161094601528181610a2a01528181611a4c01528181611aae0152611b9201526124bc6000f3fe6080604052600436106101b75760003560e01c806390df63b7116100ec578063b633b9441161008a578063d0e30db011610064578063d0e30db014610538578063d5e6a9df1461056c578063da2b7bc4146105a0578063df19e6ff146105c057600080fd5b8063b633b944146104c4578063c2114a16146104e4578063c299acc41461051857600080fd5b80639c13b6b5116100c65780639c13b6b514610412578063aa22a1c614610428578063b044397e1461045c578063b5b7a1841461049057600080fd5b806390df63b7146103af578063930f28af146103dc5780639588eca2146103fc57600080fd5b806331ddf7431161015957806349b4299e1161013357806349b4299e1461031b5780634a439cfe1461033b578063541adcca1461035b5780638d96fdea1461037b57600080fd5b806331ddf743146102bb5780633ce43cfd146102db5780634788cb38146102fb57600080fd5b8063222ae78611610195578063222ae786146102425780632639c0601461026557806327ee6bdd1461029257806331d14457146102a857600080fd5b806301139b68146101bc5780630f0adca5146101d15780631062b39a146101f1575b600080fd5b6101cf6101ca366004612047565b6105ed565b005b3480156101dd57600080fd5b506101cf6101ec366004612075565b61082b565b3480156101fd57600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024e57600080fd5b50610257610bdb565b604051908152602001610239565b34801561027157600080fd5b506102576102803660046120ac565b60026020526000908152604090205481565b34801561029e57600080fd5b5061025760015481565b6101cf6102b63660046120c5565b610c0c565b3480156102c757600080fd5b506101cf6102d6366004612148565b610e77565b3480156102e757600080fd5b506101cf6102f636600461220a565b611117565b34801561030757600080fd5b506101cf61031636600461220a565b61125e565b34801561032757600080fd5b506101cf610336366004612047565b6113d3565b34801561034757600080fd5b506102576103563660046120ac565b6115bd565b34801561036757600080fd5b50610257610376366004612243565b6115ef565b34801561038757600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156103bb57600080fd5b506102576103ca3660046120ac565b60036020526000908152604090205481565b3480156103e857600080fd5b506101cf6103f7366004612047565b611641565b34801561040857600080fd5b5061025760005481565b34801561041e57600080fd5b5061025760045481565b34801561043457600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561046857600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561049c57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d057600080fd5b506101cf6104df366004612047565b611835565b3480156104f057600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561052457600080fd5b506101cf6105333660046120ac565b611a41565b34801561054457600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561057857600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ac57600080fd5b506101cf6105bb366004612047565b611cca565b3480156105cc57600080fd5b506105e06105db366004612243565b611e83565b604051610239919061227c565b6105f6816115ef565b6000838152600260205260409020541461062b5760405162461bcd60e51b815260040161062290612296565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561069b5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610622565b60c08101516001600160a01b0316156106f65760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610622565b60008160a00151600281111561070e5761070e612266565b1461075b5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610622565b3360c082015261076a816115ef565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108275760006108067f0000000000000000000000000000000000000000000000000000000000000000346122d4565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161087e5761087e6122e7565b040311156108c15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109445760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c691906122fd565b7f000000000000000000000000000000000000000000000000000000000000000014610a285760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aaa9190612316565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b1d5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b60015483118015610b2d57508115155b15610b7057600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b79816115ef565b60008481526002602052604090205403610bd6578051829003610ba257600160a0820152610bbd565b60c08101516001600160a01b031615610bbd57600260a08201525b610bc6816115ef565b6000848152600260205260409020555b505050565b6000610c077f000000000000000000000000000000000000000000000000000000000000000042612333565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c7c5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000004281610cab57610cab6122e7565b048210610cfa5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610622565b600454421115610d7e577f0000000000000000000000000000000000000000000000000000000000000000600454420381610d3757610d376122e7565b04826001011015610d7e5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610622565b80610d9b5760405162461bcd60e51b815260040161062290612296565b60008281526002602052604090205415610ded5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610622565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610e33906115ef565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107aa565b60408510610eb95760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610622565b600084848484604051602001610ed29493929190612355565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610f52576000888883818110610f1457610f14612397565b90506020020135905082811115610f3957826000528060205260406000209250610f49565b8060005282602052604060002092505b50600101610ef8565b508060005414610f955760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610622565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561100a5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610622565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061103a90899089906123ad565b6000604051808303816000865af19150503d8060008114611077576040519150601f19603f3d011682016040523d82523d6000602084013e61107c565b606091505b50509050806110cd5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610622565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61112961037636839003830183612243565b600083815260026020526040902054146111555760405162461bcd60e51b815260040161062290612296565b600261116760c0830160a084016123bd565b600281111561117857611178612266565b146111b95760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610622565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061121393505060e0840191505060c083016123d8565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61127061037636839003830183612243565b6000838152600260205260409020541461129c5760405162461bcd60e51b815260040161062290612296565b60016112ae60c0830160a084016123bd565b60028111156112bf576112bf612266565b146112fc5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610622565b600082815260026020526040812081905561131d60e0830160c084016123d8565b6001600160a01b031614611378576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061121393505060408401915050602083016123d8565b61138860408201602083016123d8565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6113dc816115ef565b600083815260026020526040902054146114085760405162461bcd60e51b815260040161062290612296565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff1661144191906123f5565b61144b91906123f5565b4210156114af5760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610622565b60006114ba82611e83565b905060028160038111156114d0576114d0612266565b14806114ed575060008160038111156114eb576114eb612266565b145b6115565760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610622565b63ffffffff428116606084015243166080830152611573826115ef565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115e97f000000000000000000000000000000000000000000000000000000000000000083612333565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611624989097969101612408565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611694576116946122e7565b040311156116d75760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b6116e0816115ef565b6000838152600260205260409020541461170c5760405162461bcd60e51b815260040161062290612296565b60c08101516001600160a01b03161561175e5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610622565b600161176982611e83565b600381111561177a5761177a612266565b146117c75760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610622565b60015482111561180f57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261181f816115ef565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611888576118886122e7565b0403116118c95760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b6118d2816115ef565b600083815260026020526040902054146118fe5760405162461bcd60e51b815260040161062290612296565b60008160a00151600281111561191657611916612266565b146119555760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60c08101516001600160a01b0316156108275760208101516001600160a01b03166119d95760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c08101805160009091526119ed826115ef565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611aac5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b2e91906122fd565b7f000000000000000000000000000000000000000000000000000000000000000014611b905760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015611bee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c129190612316565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614611c855760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b8060045414611cc75760048190556040518181527fe5c620413c3d944fbd314ecc2375b9bdcc721589711a4348d9ecaf966160fa389060200160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d1d57611d1d6122e7565b040311611d5e5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611d67816115ef565b60008381526002602052604090205414611d935760405162461bcd60e51b815260040161062290612296565b60008160a001516002811115611dab57611dab612266565b14611dea5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60208101516001600160a01b0316156108275760c08101516001600160a01b0316611e6f5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60208101805160009091526119ed826115ef565b6000816060015163ffffffff16600003611e9f57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611edb57506003919050565b60006005836060015163ffffffff16420381611ef957611ef96122e7565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611f3d5760019250611f42565b600092505b50505b919050565b6001600160a01b0381168114611cc757600080fd5b8035611f4581611f4a565b803563ffffffff81168114611f4557600080fd5b803560038110611f4557600080fd5b600060e08284031215611f9f57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fd057634e487b7160e01b600052604160045260246000fd5b60405282358152905080611fe660208401611f5f565b6020820152611ff760408401611f6a565b604082015261200860608401611f6a565b606082015261201960808401611f6a565b608082015261202a60a08401611f7e565b60a082015261203b60c08401611f5f565b60c08201525092915050565b600080610100838503121561205b57600080fd5b8235915061206c8460208501611f8d565b90509250929050565b6000806000610120848603121561208b57600080fd5b83359250602084013591506120a38560408601611f8d565b90509250925092565b6000602082840312156120be57600080fd5b5035919050565b600080604083850312156120d857600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611f4557600080fd5b60008083601f84011261211157600080fd5b50813567ffffffffffffffff81111561212957600080fd5b60208301915083602082850101111561214157600080fd5b9250929050565b6000806000806000806080878903121561216157600080fd5b863567ffffffffffffffff8082111561217957600080fd5b818901915089601f83011261218d57600080fd5b81358181111561219c57600080fd5b8a60208260051b85010111156121b157600080fd5b602083019850809750506121c760208a016120e7565b95506121d560408a01611f5f565b945060608901359150808211156121eb57600080fd5b506121f889828a016120ff565b979a9699509497509295939492505050565b60008082840361010081121561221f57600080fd5b8335925060e0601f198201121561223557600080fd5b506020830190509250929050565b600060e0828403121561225557600080fd5b61225f8383611f8d565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061229057612290612266565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156115e9576115e96122be565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561230f57600080fd5b5051919050565b60006020828403121561232857600080fd5b815161225f81611f4a565b60008261235057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123cf57600080fd5b61225f82611f7e565b6000602082840312156123ea57600080fd5b813561225f81611f4a565b808201808211156115e9576115e96122be565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061246057612460612266565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212201c9f54aa22ba7698fc9ba489f860256f3e64eff6f8b9e65283583a07459d15b264736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101b75760003560e01c806390df63b7116100ec578063b633b9441161008a578063d0e30db011610064578063d0e30db014610538578063d5e6a9df1461056c578063da2b7bc4146105a0578063df19e6ff146105c057600080fd5b8063b633b944146104c4578063c2114a16146104e4578063c299acc41461051857600080fd5b80639c13b6b5116100c65780639c13b6b514610412578063aa22a1c614610428578063b044397e1461045c578063b5b7a1841461049057600080fd5b806390df63b7146103af578063930f28af146103dc5780639588eca2146103fc57600080fd5b806331ddf7431161015957806349b4299e1161013357806349b4299e1461031b5780634a439cfe1461033b578063541adcca1461035b5780638d96fdea1461037b57600080fd5b806331ddf743146102bb5780633ce43cfd146102db5780634788cb38146102fb57600080fd5b8063222ae78611610195578063222ae786146102425780632639c0601461026557806327ee6bdd1461029257806331d14457146102a857600080fd5b806301139b68146101bc5780630f0adca5146101d15780631062b39a146101f1575b600080fd5b6101cf6101ca366004612047565b6105ed565b005b3480156101dd57600080fd5b506101cf6101ec366004612075565b61082b565b3480156101fd57600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024e57600080fd5b50610257610bdb565b604051908152602001610239565b34801561027157600080fd5b506102576102803660046120ac565b60026020526000908152604090205481565b34801561029e57600080fd5b5061025760015481565b6101cf6102b63660046120c5565b610c0c565b3480156102c757600080fd5b506101cf6102d6366004612148565b610e77565b3480156102e757600080fd5b506101cf6102f636600461220a565b611117565b34801561030757600080fd5b506101cf61031636600461220a565b61125e565b34801561032757600080fd5b506101cf610336366004612047565b6113d3565b34801561034757600080fd5b506102576103563660046120ac565b6115bd565b34801561036757600080fd5b50610257610376366004612243565b6115ef565b34801561038757600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156103bb57600080fd5b506102576103ca3660046120ac565b60036020526000908152604090205481565b3480156103e857600080fd5b506101cf6103f7366004612047565b611641565b34801561040857600080fd5b5061025760005481565b34801561041e57600080fd5b5061025760045481565b34801561043457600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561046857600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561049c57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d057600080fd5b506101cf6104df366004612047565b611835565b3480156104f057600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561052457600080fd5b506101cf6105333660046120ac565b611a41565b34801561054457600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561057857600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ac57600080fd5b506101cf6105bb366004612047565b611cca565b3480156105cc57600080fd5b506105e06105db366004612243565b611e83565b604051610239919061227c565b6105f6816115ef565b6000838152600260205260409020541461062b5760405162461bcd60e51b815260040161062290612296565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561069b5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610622565b60c08101516001600160a01b0316156106f65760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610622565b60008160a00151600281111561070e5761070e612266565b1461075b5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610622565b3360c082015261076a816115ef565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108275760006108067f0000000000000000000000000000000000000000000000000000000000000000346122d4565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161087e5761087e6122e7565b040311156108c15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109445760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c691906122fd565b7f000000000000000000000000000000000000000000000000000000000000000014610a285760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aaa9190612316565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b1d5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b60015483118015610b2d57508115155b15610b7057600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b79816115ef565b60008481526002602052604090205403610bd6578051829003610ba257600160a0820152610bbd565b60c08101516001600160a01b031615610bbd57600260a08201525b610bc6816115ef565b6000848152600260205260409020555b505050565b6000610c077f000000000000000000000000000000000000000000000000000000000000000042612333565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c7c5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000004281610cab57610cab6122e7565b048210610cfa5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610622565b600454421115610d7e577f0000000000000000000000000000000000000000000000000000000000000000600454420381610d3757610d376122e7565b04826001011015610d7e5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610622565b80610d9b5760405162461bcd60e51b815260040161062290612296565b60008281526002602052604090205415610ded5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610622565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610e33906115ef565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107aa565b60408510610eb95760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610622565b600084848484604051602001610ed29493929190612355565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610f52576000888883818110610f1457610f14612397565b90506020020135905082811115610f3957826000528060205260406000209250610f49565b8060005282602052604060002092505b50600101610ef8565b508060005414610f955760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610622565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561100a5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610622565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061103a90899089906123ad565b6000604051808303816000865af19150503d8060008114611077576040519150601f19603f3d011682016040523d82523d6000602084013e61107c565b606091505b50509050806110cd5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610622565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61112961037636839003830183612243565b600083815260026020526040902054146111555760405162461bcd60e51b815260040161062290612296565b600261116760c0830160a084016123bd565b600281111561117857611178612266565b146111b95760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610622565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061121393505060e0840191505060c083016123d8565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61127061037636839003830183612243565b6000838152600260205260409020541461129c5760405162461bcd60e51b815260040161062290612296565b60016112ae60c0830160a084016123bd565b60028111156112bf576112bf612266565b146112fc5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610622565b600082815260026020526040812081905561131d60e0830160c084016123d8565b6001600160a01b031614611378576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061121393505060408401915050602083016123d8565b61138860408201602083016123d8565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6113dc816115ef565b600083815260026020526040902054146114085760405162461bcd60e51b815260040161062290612296565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff1661144191906123f5565b61144b91906123f5565b4210156114af5760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610622565b60006114ba82611e83565b905060028160038111156114d0576114d0612266565b14806114ed575060008160038111156114eb576114eb612266565b145b6115565760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610622565b63ffffffff428116606084015243166080830152611573826115ef565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115e97f000000000000000000000000000000000000000000000000000000000000000083612333565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611624989097969101612408565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611694576116946122e7565b040311156116d75760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b6116e0816115ef565b6000838152600260205260409020541461170c5760405162461bcd60e51b815260040161062290612296565b60c08101516001600160a01b03161561175e5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610622565b600161176982611e83565b600381111561177a5761177a612266565b146117c75760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610622565b60015482111561180f57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261181f816115ef565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611888576118886122e7565b0403116118c95760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b6118d2816115ef565b600083815260026020526040902054146118fe5760405162461bcd60e51b815260040161062290612296565b60008160a00151600281111561191657611916612266565b146119555760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60c08101516001600160a01b0316156108275760208101516001600160a01b03166119d95760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c08101805160009091526119ed826115ef565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611aac5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b2e91906122fd565b7f000000000000000000000000000000000000000000000000000000000000000014611b905760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015611bee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c129190612316565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614611c855760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b8060045414611cc75760048190556040518181527fe5c620413c3d944fbd314ecc2375b9bdcc721589711a4348d9ecaf966160fa389060200160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d1d57611d1d6122e7565b040311611d5e5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611d67816115ef565b60008381526002602052604090205414611d935760405162461bcd60e51b815260040161062290612296565b60008160a001516002811115611dab57611dab612266565b14611dea5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60208101516001600160a01b0316156108275760c08101516001600160a01b0316611e6f5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60208101805160009091526119ed826115ef565b6000816060015163ffffffff16600003611e9f57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611edb57506003919050565b60006005836060015163ffffffff16420381611ef957611ef96122e7565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611f3d5760019250611f42565b600092505b50505b919050565b6001600160a01b0381168114611cc757600080fd5b8035611f4581611f4a565b803563ffffffff81168114611f4557600080fd5b803560038110611f4557600080fd5b600060e08284031215611f9f57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fd057634e487b7160e01b600052604160045260246000fd5b60405282358152905080611fe660208401611f5f565b6020820152611ff760408401611f6a565b604082015261200860608401611f6a565b606082015261201960808401611f6a565b608082015261202a60a08401611f7e565b60a082015261203b60c08401611f5f565b60c08201525092915050565b600080610100838503121561205b57600080fd5b8235915061206c8460208501611f8d565b90509250929050565b6000806000610120848603121561208b57600080fd5b83359250602084013591506120a38560408601611f8d565b90509250925092565b6000602082840312156120be57600080fd5b5035919050565b600080604083850312156120d857600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611f4557600080fd5b60008083601f84011261211157600080fd5b50813567ffffffffffffffff81111561212957600080fd5b60208301915083602082850101111561214157600080fd5b9250929050565b6000806000806000806080878903121561216157600080fd5b863567ffffffffffffffff8082111561217957600080fd5b818901915089601f83011261218d57600080fd5b81358181111561219c57600080fd5b8a60208260051b85010111156121b157600080fd5b602083019850809750506121c760208a016120e7565b95506121d560408a01611f5f565b945060608901359150808211156121eb57600080fd5b506121f889828a016120ff565b979a9699509497509295939492505050565b60008082840361010081121561221f57600080fd5b8335925060e0601f198201121561223557600080fd5b506020830190509250929050565b600060e0828403121561225557600080fd5b61225f8383611f8d565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061229057612290612266565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156115e9576115e96122be565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561230f57600080fd5b5051919050565b60006020828403121561232857600080fd5b815161225f81611f4a565b60008261235057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123cf57600080fd5b61225f82611f7e565b6000602082840312156123ea57600080fd5b813561225f81611f4a565b808201808211156115e9576115e96122be565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061246057612460612266565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212201c9f54aa22ba7698fc9ba489f860256f3e64eff6f8b9e65283583a07459d15b264736f6c63430008120033", + "numDeployments": 3, + "solcInputHash": "ad697f618f73759e1d99ca054913682f", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256)\":{\"details\":\"Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":\"VeaOutboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x2fe0351f519bd619887915bbe25f2b18d52f1170d6640f49698b3d4dc56d2601\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Arbitrum Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit) external;\\n}\",\"keccak256\":\"0xcf2532733ecd20779e259f12452b75f0ebda4965bc8aa2c8af041df908e632d3\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101c06040523480156200001257600080fd5b5060405162002802380380620028028339810160408190526200003591620000ea565b60c08990526101408890526101808690526101608790526001600160a01b03808616608052841660a0526101a082905261012081905260048390556200007d60028a62000183565b60e08190526200008f8a6002620001a6565b6200009b9190620001c6565b6101005261014051600190620000b2904262000183565b620000be9190620001c6565b60015550620001dc975050505050505050565b6001600160a01b0381168114620000e757600080fd5b50565b60008060008060008060008060006101208a8c0312156200010a57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a01516200013381620000d1565b60a08b01519095506200014681620000d1565b8094505060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001a157634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001c057620001c06200016d565b92915050565b81810381811115620001c057620001c06200016d565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516124bc62000346600039600081816104440152611f0d0152600081816104780152818161082d015281816118cc01528181611ac00152611ccc0152600081816105000152611ea10152600081816104ac0152818161085101528181610be201528181610c7e01528181610d060152818161140a015281816115c4015281816118f001528181611ae40152611cf00152600081816103ad015281816109c80152611730015260006112210152600081816111ce01526113330152600081816105340152818161062d015281816107b4015281816107e101528181610c0e0152818161139601528181611c2a01528181611c910152611e3701526000818161056801528181610ab5015261181d015260008181610203015281816108cc0152818161094601528181610a2a0152818161164c015281816116ae015261179201526124bc6000f3fe6080604052600436106101b75760003560e01c80638d96fdea116100ec578063b633b9441161008a578063d5e6a9df11610064578063d5e6a9df14610556578063da2b7bc41461058a578063df19e6ff146105aa578063e813a755146105d757600080fd5b8063b633b944146104ce578063c2114a16146104ee578063d0e30db01461052257600080fd5b80639588eca2116100c65780639588eca21461041c578063aa22a1c614610432578063b044397e14610466578063b5b7a1841461049a57600080fd5b80638d96fdea1461039b57806390df63b7146103cf578063930f28af146103fc57600080fd5b806331ddf7431161015957806349b4299e1161013357806349b4299e1461031b5780634a439cfe1461033b578063541adcca1461035b578063654bc9651461037b57600080fd5b806331ddf743146102bb5780633ce43cfd146102db5780634788cb38146102fb57600080fd5b8063222ae78611610195578063222ae786146102425780632639c0601461026557806327ee6bdd1461029257806331d14457146102a857600080fd5b806301139b68146101bc5780630f0adca5146101d15780631062b39a146101f1575b600080fd5b6101cf6101ca366004612047565b6105ed565b005b3480156101dd57600080fd5b506101cf6101ec366004612075565b61082b565b3480156101fd57600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024e57600080fd5b50610257610bdb565b604051908152602001610239565b34801561027157600080fd5b506102576102803660046120ac565b60026020526000908152604090205481565b34801561029e57600080fd5b5061025760015481565b6101cf6102b63660046120c5565b610c0c565b3480156102c757600080fd5b506101cf6102d6366004612148565b610e77565b3480156102e757600080fd5b506101cf6102f636600461220a565b611117565b34801561030757600080fd5b506101cf61031636600461220a565b61125e565b34801561032757600080fd5b506101cf610336366004612047565b6113d3565b34801561034757600080fd5b506102576103563660046120ac565b6115bd565b34801561036757600080fd5b50610257610376366004612243565b6115ef565b34801561038757600080fd5b506101cf6103963660046120ac565b611641565b3480156103a757600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156103db57600080fd5b506102576103ea3660046120ac565b60036020526000908152604090205481565b34801561040857600080fd5b506101cf610417366004612047565b6118ca565b34801561042857600080fd5b5061025760005481565b34801561043e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561047257600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a657600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104da57600080fd5b506101cf6104e9366004612047565b611abe565b3480156104fa57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561052e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561056257600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b34801561059657600080fd5b506101cf6105a5366004612047565b611cca565b3480156105b657600080fd5b506105ca6105c5366004612243565b611e83565b604051610239919061227c565b3480156105e357600080fd5b5061025760045481565b6105f6816115ef565b6000838152600260205260409020541461062b5760405162461bcd60e51b815260040161062290612296565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561069b5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610622565b60c08101516001600160a01b0316156106f65760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610622565b60008160a00151600281111561070e5761070e612266565b1461075b5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610622565b3360c082015261076a816115ef565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108275760006108067f0000000000000000000000000000000000000000000000000000000000000000346122d4565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161087e5761087e6122e7565b040311156108c15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109445760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c691906122fd565b7f000000000000000000000000000000000000000000000000000000000000000014610a285760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aaa9190612316565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b1d5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b60015483118015610b2d57508115155b15610b7057600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b79816115ef565b60008481526002602052604090205403610bd6578051829003610ba257600160a0820152610bbd565b60c08101516001600160a01b031615610bbd57600260a08201525b610bc6816115ef565b6000848152600260205260409020555b505050565b6000610c077f000000000000000000000000000000000000000000000000000000000000000042612333565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c7c5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000004281610cab57610cab6122e7565b048210610cfa5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610622565b600454421115610d7e577f0000000000000000000000000000000000000000000000000000000000000000600454420381610d3757610d376122e7565b04826001011015610d7e5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610622565b80610d9b5760405162461bcd60e51b815260040161062290612296565b60008281526002602052604090205415610ded5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610622565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610e33906115ef565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107aa565b60408510610eb95760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610622565b600084848484604051602001610ed29493929190612355565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610f52576000888883818110610f1457610f14612397565b90506020020135905082811115610f3957826000528060205260406000209250610f49565b8060005282602052604060002092505b50600101610ef8565b508060005414610f955760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610622565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561100a5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610622565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061103a90899089906123ad565b6000604051808303816000865af19150503d8060008114611077576040519150601f19603f3d011682016040523d82523d6000602084013e61107c565b606091505b50509050806110cd5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610622565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61112961037636839003830183612243565b600083815260026020526040902054146111555760405162461bcd60e51b815260040161062290612296565b600261116760c0830160a084016123bd565b600281111561117857611178612266565b146111b95760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610622565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061121393505060e0840191505060c083016123d8565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61127061037636839003830183612243565b6000838152600260205260409020541461129c5760405162461bcd60e51b815260040161062290612296565b60016112ae60c0830160a084016123bd565b60028111156112bf576112bf612266565b146112fc5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610622565b600082815260026020526040812081905561131d60e0830160c084016123d8565b6001600160a01b031614611378576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061121393505060408401915050602083016123d8565b61138860408201602083016123d8565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6113dc816115ef565b600083815260026020526040902054146114085760405162461bcd60e51b815260040161062290612296565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff1661144191906123f5565b61144b91906123f5565b4210156114af5760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610622565b60006114ba82611e83565b905060028160038111156114d0576114d0612266565b14806114ed575060008160038111156114eb576114eb612266565b145b6115565760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610622565b63ffffffff428116606084015243166080830152611573826115ef565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115e97f000000000000000000000000000000000000000000000000000000000000000083612333565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611624989097969101612408565b604051602081830303815290604052805190602001209050919050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146116ac5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561170a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061172e91906122fd565b7f0000000000000000000000000000000000000000000000000000000000000000146117905760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118129190612316565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146118855760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b80600454146118c75760048190556040518181527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161191d5761191d6122e7565b040311156119605760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b611969816115ef565b600083815260026020526040902054146119955760405162461bcd60e51b815260040161062290612296565b60c08101516001600160a01b0316156119e75760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610622565b60016119f282611e83565b6003811115611a0357611a03612266565b14611a505760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610622565b600154821115611a9857600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611aa8816115ef565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b1157611b116122e7565b040311611b525760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611b5b816115ef565b60008381526002602052604090205414611b875760405162461bcd60e51b815260040161062290612296565b60008160a001516002811115611b9f57611b9f612266565b14611bde5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60c08101516001600160a01b0316156108275760208101516001600160a01b0316611c625760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611c76826115ef565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d1d57611d1d6122e7565b040311611d5e5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611d67816115ef565b60008381526002602052604090205414611d935760405162461bcd60e51b815260040161062290612296565b60008160a001516002811115611dab57611dab612266565b14611dea5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60208101516001600160a01b0316156108275760c08101516001600160a01b0316611e6f5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611c76826115ef565b6000816060015163ffffffff16600003611e9f57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611edb57506003919050565b60006005836060015163ffffffff16420381611ef957611ef96122e7565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611f3d5760019250611f42565b600092505b50505b919050565b6001600160a01b03811681146118c757600080fd5b8035611f4581611f4a565b803563ffffffff81168114611f4557600080fd5b803560038110611f4557600080fd5b600060e08284031215611f9f57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fd057634e487b7160e01b600052604160045260246000fd5b60405282358152905080611fe660208401611f5f565b6020820152611ff760408401611f6a565b604082015261200860608401611f6a565b606082015261201960808401611f6a565b608082015261202a60a08401611f7e565b60a082015261203b60c08401611f5f565b60c08201525092915050565b600080610100838503121561205b57600080fd5b8235915061206c8460208501611f8d565b90509250929050565b6000806000610120848603121561208b57600080fd5b83359250602084013591506120a38560408601611f8d565b90509250925092565b6000602082840312156120be57600080fd5b5035919050565b600080604083850312156120d857600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611f4557600080fd5b60008083601f84011261211157600080fd5b50813567ffffffffffffffff81111561212957600080fd5b60208301915083602082850101111561214157600080fd5b9250929050565b6000806000806000806080878903121561216157600080fd5b863567ffffffffffffffff8082111561217957600080fd5b818901915089601f83011261218d57600080fd5b81358181111561219c57600080fd5b8a60208260051b85010111156121b157600080fd5b602083019850809750506121c760208a016120e7565b95506121d560408a01611f5f565b945060608901359150808211156121eb57600080fd5b506121f889828a016120ff565b979a9699509497509295939492505050565b60008082840361010081121561221f57600080fd5b8335925060e0601f198201121561223557600080fd5b506020830190509250929050565b600060e0828403121561225557600080fd5b61225f8383611f8d565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061229057612290612266565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156115e9576115e96122be565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561230f57600080fd5b5051919050565b60006020828403121561232857600080fd5b815161225f81611f4a565b60008261235057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123cf57600080fd5b61225f82611f7e565b6000602082840312156123ea57600080fd5b813561225f81611f4a565b808201808211156115e9576115e96122be565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061246057612460612266565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212202f48efbf6c30927844c0e13e6d286c5c2cb35f34d6e8950bd36524eeadb3f08564736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101b75760003560e01c80638d96fdea116100ec578063b633b9441161008a578063d5e6a9df11610064578063d5e6a9df14610556578063da2b7bc41461058a578063df19e6ff146105aa578063e813a755146105d757600080fd5b8063b633b944146104ce578063c2114a16146104ee578063d0e30db01461052257600080fd5b80639588eca2116100c65780639588eca21461041c578063aa22a1c614610432578063b044397e14610466578063b5b7a1841461049a57600080fd5b80638d96fdea1461039b57806390df63b7146103cf578063930f28af146103fc57600080fd5b806331ddf7431161015957806349b4299e1161013357806349b4299e1461031b5780634a439cfe1461033b578063541adcca1461035b578063654bc9651461037b57600080fd5b806331ddf743146102bb5780633ce43cfd146102db5780634788cb38146102fb57600080fd5b8063222ae78611610195578063222ae786146102425780632639c0601461026557806327ee6bdd1461029257806331d14457146102a857600080fd5b806301139b68146101bc5780630f0adca5146101d15780631062b39a146101f1575b600080fd5b6101cf6101ca366004612047565b6105ed565b005b3480156101dd57600080fd5b506101cf6101ec366004612075565b61082b565b3480156101fd57600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024e57600080fd5b50610257610bdb565b604051908152602001610239565b34801561027157600080fd5b506102576102803660046120ac565b60026020526000908152604090205481565b34801561029e57600080fd5b5061025760015481565b6101cf6102b63660046120c5565b610c0c565b3480156102c757600080fd5b506101cf6102d6366004612148565b610e77565b3480156102e757600080fd5b506101cf6102f636600461220a565b611117565b34801561030757600080fd5b506101cf61031636600461220a565b61125e565b34801561032757600080fd5b506101cf610336366004612047565b6113d3565b34801561034757600080fd5b506102576103563660046120ac565b6115bd565b34801561036757600080fd5b50610257610376366004612243565b6115ef565b34801561038757600080fd5b506101cf6103963660046120ac565b611641565b3480156103a757600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156103db57600080fd5b506102576103ea3660046120ac565b60036020526000908152604090205481565b34801561040857600080fd5b506101cf610417366004612047565b6118ca565b34801561042857600080fd5b5061025760005481565b34801561043e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561047257600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a657600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104da57600080fd5b506101cf6104e9366004612047565b611abe565b3480156104fa57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561052e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561056257600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b34801561059657600080fd5b506101cf6105a5366004612047565b611cca565b3480156105b657600080fd5b506105ca6105c5366004612243565b611e83565b604051610239919061227c565b3480156105e357600080fd5b5061025760045481565b6105f6816115ef565b6000838152600260205260409020541461062b5760405162461bcd60e51b815260040161062290612296565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561069b5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610622565b60c08101516001600160a01b0316156106f65760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610622565b60008160a00151600281111561070e5761070e612266565b1461075b5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610622565b3360c082015261076a816115ef565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108275760006108067f0000000000000000000000000000000000000000000000000000000000000000346122d4565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161087e5761087e6122e7565b040311156108c15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109445760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c691906122fd565b7f000000000000000000000000000000000000000000000000000000000000000014610a285760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aaa9190612316565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b1d5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b60015483118015610b2d57508115155b15610b7057600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b79816115ef565b60008481526002602052604090205403610bd6578051829003610ba257600160a0820152610bbd565b60c08101516001600160a01b031615610bbd57600260a08201525b610bc6816115ef565b6000848152600260205260409020555b505050565b6000610c077f000000000000000000000000000000000000000000000000000000000000000042612333565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c7c5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000004281610cab57610cab6122e7565b048210610cfa5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610622565b600454421115610d7e577f0000000000000000000000000000000000000000000000000000000000000000600454420381610d3757610d376122e7565b04826001011015610d7e5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610622565b80610d9b5760405162461bcd60e51b815260040161062290612296565b60008281526002602052604090205415610ded5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610622565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610e33906115ef565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107aa565b60408510610eb95760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610622565b600084848484604051602001610ed29493929190612355565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610f52576000888883818110610f1457610f14612397565b90506020020135905082811115610f3957826000528060205260406000209250610f49565b8060005282602052604060002092505b50600101610ef8565b508060005414610f955760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610622565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561100a5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610622565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061103a90899089906123ad565b6000604051808303816000865af19150503d8060008114611077576040519150601f19603f3d011682016040523d82523d6000602084013e61107c565b606091505b50509050806110cd5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610622565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61112961037636839003830183612243565b600083815260026020526040902054146111555760405162461bcd60e51b815260040161062290612296565b600261116760c0830160a084016123bd565b600281111561117857611178612266565b146111b95760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610622565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061121393505060e0840191505060c083016123d8565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61127061037636839003830183612243565b6000838152600260205260409020541461129c5760405162461bcd60e51b815260040161062290612296565b60016112ae60c0830160a084016123bd565b60028111156112bf576112bf612266565b146112fc5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610622565b600082815260026020526040812081905561131d60e0830160c084016123d8565b6001600160a01b031614611378576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061121393505060408401915050602083016123d8565b61138860408201602083016123d8565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6113dc816115ef565b600083815260026020526040902054146114085760405162461bcd60e51b815260040161062290612296565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff1661144191906123f5565b61144b91906123f5565b4210156114af5760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610622565b60006114ba82611e83565b905060028160038111156114d0576114d0612266565b14806114ed575060008160038111156114eb576114eb612266565b145b6115565760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610622565b63ffffffff428116606084015243166080830152611573826115ef565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115e97f000000000000000000000000000000000000000000000000000000000000000083612333565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611624989097969101612408565b604051602081830303815290604052805190602001209050919050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146116ac5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561170a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061172e91906122fd565b7f0000000000000000000000000000000000000000000000000000000000000000146117905760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118129190612316565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146118855760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b80600454146118c75760048190556040518181527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161191d5761191d6122e7565b040311156119605760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b611969816115ef565b600083815260026020526040902054146119955760405162461bcd60e51b815260040161062290612296565b60c08101516001600160a01b0316156119e75760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610622565b60016119f282611e83565b6003811115611a0357611a03612266565b14611a505760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610622565b600154821115611a9857600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611aa8816115ef565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b1157611b116122e7565b040311611b525760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611b5b816115ef565b60008381526002602052604090205414611b875760405162461bcd60e51b815260040161062290612296565b60008160a001516002811115611b9f57611b9f612266565b14611bde5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60c08101516001600160a01b0316156108275760208101516001600160a01b0316611c625760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611c76826115ef565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d1d57611d1d6122e7565b040311611d5e5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611d67816115ef565b60008381526002602052604090205414611d935760405162461bcd60e51b815260040161062290612296565b60008160a001516002811115611dab57611dab612266565b14611dea5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60208101516001600160a01b0316156108275760c08101516001600160a01b0316611e6f5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611c76826115ef565b6000816060015163ffffffff16600003611e9f57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611edb57506003919050565b60006005836060015163ffffffff16420381611ef957611ef96122e7565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611f3d5760019250611f42565b600092505b50505b919050565b6001600160a01b03811681146118c757600080fd5b8035611f4581611f4a565b803563ffffffff81168114611f4557600080fd5b803560038110611f4557600080fd5b600060e08284031215611f9f57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fd057634e487b7160e01b600052604160045260246000fd5b60405282358152905080611fe660208401611f5f565b6020820152611ff760408401611f6a565b604082015261200860608401611f6a565b606082015261201960808401611f6a565b608082015261202a60a08401611f7e565b60a082015261203b60c08401611f5f565b60c08201525092915050565b600080610100838503121561205b57600080fd5b8235915061206c8460208501611f8d565b90509250929050565b6000806000610120848603121561208b57600080fd5b83359250602084013591506120a38560408601611f8d565b90509250925092565b6000602082840312156120be57600080fd5b5035919050565b600080604083850312156120d857600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611f4557600080fd5b60008083601f84011261211157600080fd5b50813567ffffffffffffffff81111561212957600080fd5b60208301915083602082850101111561214157600080fd5b9250929050565b6000806000806000806080878903121561216157600080fd5b863567ffffffffffffffff8082111561217957600080fd5b818901915089601f83011261218d57600080fd5b81358181111561219c57600080fd5b8a60208260051b85010111156121b157600080fd5b602083019850809750506121c760208a016120e7565b95506121d560408a01611f5f565b945060608901359150808211156121eb57600080fd5b506121f889828a016120ff565b979a9699509497509295939492505050565b60008082840361010081121561221f57600080fd5b8335925060e0601f198201121561223557600080fd5b506020830190509250929050565b600060e0828403121561225557600080fd5b61225f8383611f8d565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061229057612290612266565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156115e9576115e96122be565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561230f57600080fd5b5051919050565b60006020828403121561232857600080fd5b815161225f81611f4a565b60008261235057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123cf57600080fd5b61225f82611f7e565b6000602082840312156123ea57600080fd5b813561225f81611f4a565b808201808211156115e9576115e96122be565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061246057612460612266565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212202f48efbf6c30927844c0e13e6d286c5c2cb35f34d6e8950bd36524eeadb3f08564736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.", "events": { @@ -1027,12 +1027,6 @@ "_msgId": "The msgId of the message that was relayed." } }, - "SequencerLimitUpdateReceived(uint256)": { - "details": "This event indicates the sequencer limit updated.", - "params": { - "_newSequencerLimit": "The new maxL2StateSyncDelay." - } - }, "VerificationStarted(uint256)": { "details": "This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.", "params": { @@ -1044,6 +1038,12 @@ "params": { "_epoch": "The epoch that was verified." } + }, + "sequencerDelayLimitUpdateReceived(uint256)": { + "details": "This event indicates the sequencer limit updated.", + "params": { + "_newsequencerDelayLimit": "The new maxL2StateSyncDelay." + } } }, "kind": "dev", @@ -1079,9 +1079,9 @@ "_epochPeriod": "The duration of each epoch.", "_maxMissingBlocks": "The maximum number of blocks that can be missing in a challenge period.", "_minChallengePeriod": "The minimum time window to challenge a claim.", - "_routerArbToGnosis": "The address of the router on Ethereum that routes from Arbitrum to Ethereum.", + "_routerArbToGnosis": "The address of the router on Ethereum that routes from Arbitrum to Gnosis.", "_routerChainId": "The chain id of the routerArbToGnosis.", - "_sequencerLimit": "The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.", + "_sequencerDelayLimit": "The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.", "_timeoutEpochs": "The epochs before the bridge is considered shutdown." } }, @@ -1130,10 +1130,10 @@ "_epoch": "The epoch of the claim to challenge." } }, - "updateSequencerLimit(uint256)": { + "updateSequencerDelayLimit(uint256)": { "details": "Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge", "params": { - "_newSequencerLimit": "The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract." + "_newSequencerDelayLimit": "The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract." } }, "verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { @@ -1186,7 +1186,7 @@ "storageLayout": { "storage": [ { - "astId": 2556, + "astId": 2542, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "stateRoot", "offset": 0, @@ -1194,7 +1194,7 @@ "type": "t_bytes32" }, { - "astId": 2558, + "astId": 2544, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "latestVerifiedEpoch", "offset": 0, @@ -1202,7 +1202,7 @@ "type": "t_uint256" }, { - "astId": 2562, + "astId": 2548, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "claimHashes", "offset": 0, @@ -1210,7 +1210,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2566, + "astId": 2552, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "relayed", "offset": 0, @@ -1218,9 +1218,9 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2568, + "astId": 2554, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", - "label": "sequencerLimit", + "label": "sequencerDelayLimit", "offset": 0, "slot": "4", "type": "t_uint256" diff --git a/contracts/deployments/goerli/RouterArbToGnosisDevnet.json b/contracts/deployments/goerli/RouterArbToGnosisDevnet.json index f225f736..e9e6f485 100644 --- a/contracts/deployments/goerli/RouterArbToGnosisDevnet.json +++ b/contracts/deployments/goerli/RouterArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x660daB9A6436A814a6ae3a6f27b309356a4bE78c", + "address": "0xF767226FD5d9A8BbC4d99462175905cB6c1adA04", "abi": [ { "inputs": [ @@ -52,11 +52,11 @@ { "indexed": false, "internalType": "uint256", - "name": "_requestedSequencerLimit", + "name": "_requestedsequencerDelayLimit", "type": "uint256" } ], - "name": "SequencerLimitDecreaseRequested", + "name": "sequencerDelayLimitDecreaseRequested", "type": "event" }, { @@ -69,7 +69,7 @@ "type": "bytes32" } ], - "name": "SequencerLimitSent", + "name": "sequencerDelayLimitSent", "type": "event" }, { @@ -78,11 +78,11 @@ { "indexed": false, "internalType": "uint256", - "name": "_newSequencerLimit", + "name": "_newsequencerDelayLimit", "type": "uint256" } ], - "name": "SequencerLimitUpdated", + "name": "sequencerDelayLimitUpdated", "type": "event" }, { @@ -113,7 +113,7 @@ }, { "inputs": [], - "name": "executeSequencerLimitDecreaseRequest", + "name": "executesequencerDelayLimitDecreaseRequest", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -180,7 +180,7 @@ }, { "inputs": [], - "name": "sequencerLimit", + "name": "sequencerDelayLimit", "outputs": [ { "internalType": "uint256", @@ -193,11 +193,11 @@ }, { "inputs": [], - "name": "sequencerLimitDecreaseRequest", + "name": "sequencerDelayLimitDecreaseRequest", "outputs": [ { "internalType": "uint256", - "name": "requestedSequencerLimit", + "name": "requestedsequencerDelayLimit", "type": "uint256" }, { @@ -211,7 +211,7 @@ }, { "inputs": [], - "name": "updateSequencerLimit", + "name": "updatesequencerDelayLimit", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -243,33 +243,33 @@ "type": "function" } ], - "transactionHash": "0xa5c1912a9a5382f76ba8a70c87e2e615c887f02edefbe2abdf9569542bb4b953", + "transactionHash": "0x7d3e99aecdc8ea7e61688aa0115a38859f3db688fad94f6288ab7642174c7f25", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x660daB9A6436A814a6ae3a6f27b309356a4bE78c", - "transactionIndex": 39, - "gasUsed": "852741", + "contractAddress": "0xF767226FD5d9A8BbC4d99462175905cB6c1adA04", + "transactionIndex": 56, + "gasUsed": "852769", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x5dedb1f9340d5dc928823f8db27e78101ffcc7d84315b79b7abe0bf3223ee24f", - "transactionHash": "0xa5c1912a9a5382f76ba8a70c87e2e615c887f02edefbe2abdf9569542bb4b953", + "blockHash": "0x7c4e0320332d6dbf0a4f5d8b212bcbcab8d200a995ccd217754cf882f67ac262", + "transactionHash": "0x7d3e99aecdc8ea7e61688aa0115a38859f3db688fad94f6288ab7642174c7f25", "logs": [], - "blockNumber": 9181948, - "cumulativeGasUsed": "4080654", + "blockNumber": 9186609, + "cumulativeGasUsed": "6009492", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0x6aF68A94246AB9Ad3e6B1D5e28d9eAF374eaB015", - "0x32b55e5E51f6F4cbd661a4cA1cC6142f6380777b" + "0xf9F4501AF2447210219d1393450a83933293a4Fd", + "0xa117A3B8527133EB4CC2006F3F5b7e0cCC7298B5" ], - "numDeployments": 10, - "solcInputHash": "c9836c6cb024801f3104e49f87086294", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"SequencerLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"SequencerLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"SequencerLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"SequencerLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerLimit\":\"The new sequencer limit requested.\"}},\"SequencerLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"SequencerLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerLimitDecreaseRequest()\":{\"details\":\"execute SequencerLimitDecreaseRequest\"},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updateSequencerLimit()\":{\"details\":\"Update the sequencerLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/IArbitrumUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerLimitDecreaseRequest; // Decreasing the sequencerLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event SequencerLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerLimit The new maxL2StateSyncDelay.\\n event SequencerLimitUpdated(uint256 _newSequencerLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerLimit The new sequencer limit requested.\\n event SequencerLimitDecreaseRequested(uint256 _requestedSequencerLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerLimit > sequencerLimit) {\\n // For sequencerLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerLimit = newSequencerLimit;\\n emit SequencerLimitUpdated(newSequencerLimit);\\n sendSequencerLimit();\\n } else if (newSequencerLimit < sequencerLimit) {\\n require(sequencerLimitDecreaseRequest.timestamp == 0, \\\"Sequencer limit decrease request already pending.\\\");\\n\\n sequencerLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerLimit, \\n timestamp: block.timestamp\\n });\\n emit SequencerLimitDecreaseRequested(newSequencerLimit);\\n }\\n }\\n\\n /// @dev execute SequencerLimitDecreaseRequest\\n function executeSequencerLimitDecreaseRequest() external {\\n require(sequencerLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerLimitDecreaseRequest.timestamp + sequencerLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerLimit = sequencerLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerLimit == requestedSequencerLimit) {\\n sequencerLimit = requestedSequencerLimit;\\n emit SequencerLimitUpdated(requestedSequencerLimit);\\n sendSequencerLimit();\\n }\\n }\\n\\n /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n function sendSequencerLimit() internal {\\n bytes memory data = abi.encodeCall(IArbitrumUpdatable.updateSequencerLimit, sequencerLimit);\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit SequencerLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x9948429dd367155ea338d03e19a9f5a7e2f6b6cdd69f3221a9c68787828a62b6\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/IArbitrumUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from the Arbitrum Bridge through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an IArbitrumUpdateable contract which receives updates from the router on Ethereum.\\ninterface IArbitrumUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Arbitrum Sequencer contract.\\n /// @param _newSequencerLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerLimit(uint256 _newSequencerLimit) external;\\n}\\n\",\"keccak256\":\"0x4d59f1de812ac1ddad033f03c7dc34b1325b5b6dd43d26b97cd4e0d2d14c371a\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101006040523480156200001257600080fd5b5060405162000fe138038062000fe1833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610d5d620002846000396000818160eb0152818161082401526109bd0152600081816101120152610649015260008181609d015281816107fb015261099401526000818161017b015281816102c1015281816103e5015281816105e701526106730152610d5d6000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80639c13b6b5116100665780639c13b6b514610134578063da456a0e1461014b578063dd5fdeaa1461016e578063e78cea9214610176578063f6ee5b761461019d57600080fd5b80631062b39a1461009857806325a2acb1146100dc5780632fa70aa7146100e65780638c5f173f1461010d575b600080fd5b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100e46101b0565b005b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b61013d60005481565b6040519081526020016100d3565b600154600254610159919082565b604080519283526020830191909152016100d3565b6100e46103e1565b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6100e46101ab366004610aca565b6105dc565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b0c565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b48565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610b6c565b50925050508181036103dd5760008290556040518281527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a16103dd610935565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610441573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104659190610b48565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c69190610b6c565b50925050506000548111156105185760008190556040518181527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a1610515610935565b50565b600054811015610515576002541561058c5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527f08b771dddc6449625c7cd99bccdaf915b9c891fb6fa03695a71175b69e376ebb910160405180910390a150565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106475760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f39190610b48565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107549190610b48565b6001600160a01b03161461079b5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008383836040516024016107b293929190610bf7565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561086d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108919190610ca9565b6040518463ffffffff1660e01b81526004016108af93929190610cc2565b6020604051808303816000875af11580156108ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f29190610ca9565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092691815260200190565b60405180910390a25050505050565b6000805460405160240161094b91815260200190565b60408051601f19818403018152918152602080830180516001600160e01b03166330a66b3160e21b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2a9190610ca9565b6040518463ffffffff1660e01b8152600401610a4893929190610cc2565b6020604051808303816000875af1158015610a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8b9190610ca9565b90507fd488b9f6b18ad9b161668081604f47fc1bf87885163d2220eb8e27e7c9c7b59381604051610abe91815260200190565b60405180910390a15050565b6000806000838503610120811215610ae157600080fd5b843593506020850135925060e0603f1982011215610afe57600080fd5b506040840190509250925092565b80820180821115610b2d57634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b038116811461051557600080fd5b600060208284031215610b5a57600080fd5b8151610b6581610b33565b9392505050565b60008060008060808587031215610b8257600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bad81610b33565b919050565b803563ffffffff81168114610bad57600080fd5b803560038110610bad57600080fd5b60038110610bf357634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1b81610b33565b6001600160a01b03166060830152610c3560408401610bb2565b63ffffffff808216608085015280610c4f60608701610bb2565b1660a085015280610c6260808701610bb2565b1660c08501525050610c7660a08401610bc6565b610c8360e0840182610bd5565b50610c9060c08401610ba2565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cbb57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cfe57868101830151858201608001528201610ce2565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220eb4ad4f2e9b0b72e4d19c4740089707442a5a4b35d3f482fe78ca0227afc31b364736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80639c13b6b5116100665780639c13b6b514610134578063da456a0e1461014b578063dd5fdeaa1461016e578063e78cea9214610176578063f6ee5b761461019d57600080fd5b80631062b39a1461009857806325a2acb1146100dc5780632fa70aa7146100e65780638c5f173f1461010d575b600080fd5b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100e46101b0565b005b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b61013d60005481565b6040519081526020016100d3565b600154600254610159919082565b604080519283526020830191909152016100d3565b6100e46103e1565b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6100e46101ab366004610aca565b6105dc565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b0c565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b48565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610b6c565b50925050508181036103dd5760008290556040518281527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a16103dd610935565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610441573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104659190610b48565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c69190610b6c565b50925050506000548111156105185760008190556040518181527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a1610515610935565b50565b600054811015610515576002541561058c5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527f08b771dddc6449625c7cd99bccdaf915b9c891fb6fa03695a71175b69e376ebb910160405180910390a150565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106475760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f39190610b48565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107549190610b48565b6001600160a01b03161461079b5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008383836040516024016107b293929190610bf7565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561086d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108919190610ca9565b6040518463ffffffff1660e01b81526004016108af93929190610cc2565b6020604051808303816000875af11580156108ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f29190610ca9565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092691815260200190565b60405180910390a25050505050565b6000805460405160240161094b91815260200190565b60408051601f19818403018152918152602080830180516001600160e01b03166330a66b3160e21b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2a9190610ca9565b6040518463ffffffff1660e01b8152600401610a4893929190610cc2565b6020604051808303816000875af1158015610a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8b9190610ca9565b90507fd488b9f6b18ad9b161668081604f47fc1bf87885163d2220eb8e27e7c9c7b59381604051610abe91815260200190565b60405180910390a15050565b6000806000838503610120811215610ae157600080fd5b843593506020850135925060e0603f1982011215610afe57600080fd5b506040840190509250925092565b80820180821115610b2d57634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b038116811461051557600080fd5b600060208284031215610b5a57600080fd5b8151610b6581610b33565b9392505050565b60008060008060808587031215610b8257600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bad81610b33565b919050565b803563ffffffff81168114610bad57600080fd5b803560038110610bad57600080fd5b60038110610bf357634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1b81610b33565b6001600160a01b03166060830152610c3560408401610bb2565b63ffffffff808216608085015280610c4f60608701610bb2565b1660a085015280610c6260808701610bb2565b1660c08501525050610c7660a08401610bc6565b610c8360e0840182610bd5565b50610c9060c08401610ba2565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cbb57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cfe57868101830151858201608001528201610ce2565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220eb4ad4f2e9b0b72e4d19c4740089707442a5a4b35d3f482fe78ca0227afc31b364736f6c63430008120033", + "numDeployments": 11, + "solcInputHash": "ad697f618f73759e1d99ca054913682f", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n sendsequencerDelayLimit();\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(sequencerDelayLimitDecreaseRequest.timestamp == 0, \\\"Sequencer limit decrease request already pending.\\\");\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n sendsequencerDelayLimit();\\n }\\n }\\n\\n /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n function sendsequencerDelayLimit() internal {\\n bytes memory data = abi.encodeCall(ISequencerDelayUpdatable.updateSequencerDelayLimit, sequencerDelayLimit);\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xcfbeaee85e255366b9ada686378d200a04fa63eadc6f925cae5056cdcac10e01\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Arbitrum Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit) external;\\n}\",\"keccak256\":\"0xcf2532733ecd20779e259f12452b75f0ebda4965bc8aa2c8af041df908e632d3\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b5060405162000fe238038062000fe2833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610d5d62000285600039600081816101040152818161082401526109bd01526000818161012b015261064901526000818160c5015281816107fb0152610994015260008181610164015281816101b4015281816104bc015281816105e701526106730152610d5d6000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806390784ae81161006657806390784ae81461014d578063cb93846814610157578063e78cea921461015f578063e813a75514610186578063f6ee5b761461019d57600080fd5b8063051d1970146100985780631062b39a146100c05780632fa70aa7146100ff5780638c5f173f14610126575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6101556101b0565b005b6101556103b0565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b61018f60005481565b6040519081526020016100b7565b6101556101ab366004610aca565b6105dc565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610210573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102349190610b21565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610271573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102959190610b45565b50925050506000548111156102e75760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a16102e4610935565b50565b6000548110156102e457600254156103605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a150565b6002546000036104175760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610357565b6000546002546104279190610b7b565b42116104905760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610357565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610507573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052b9190610b21565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610568573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058c9190610b45565b50925050508181036105d85760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a16105d8610935565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106475760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610357565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f39190610b21565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107549190610b21565b6001600160a01b03161461079b5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610357565b60008383836040516024016107b293929190610bf7565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561086d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108919190610ca9565b6040518463ffffffff1660e01b81526004016108af93929190610cc2565b6020604051808303816000875af11580156108ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f29190610ca9565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092691815260200190565b60405180910390a25050505050565b6000805460405160240161094b91815260200190565b60408051601f19818403018152918152602080830180516001600160e01b031663654bc96560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2a9190610ca9565b6040518463ffffffff1660e01b8152600401610a4893929190610cc2565b6020604051808303816000875af1158015610a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8b9190610ca9565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d68781604051610abe91815260200190565b60405180910390a15050565b6000806000838503610120811215610ae157600080fd5b843593506020850135925060e0603f1982011215610afe57600080fd5b506040840190509250925092565b6001600160a01b03811681146102e457600080fd5b600060208284031215610b3357600080fd5b8151610b3e81610b0c565b9392505050565b60008060008060808587031215610b5b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b80820180821115610b9c57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610bad81610b0c565b919050565b803563ffffffff81168114610bad57600080fd5b803560038110610bad57600080fd5b60038110610bf357634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1b81610b0c565b6001600160a01b03166060830152610c3560408401610bb2565b63ffffffff808216608085015280610c4f60608701610bb2565b1660a085015280610c6260808701610bb2565b1660c08501525050610c7660a08401610bc6565b610c8360e0840182610bd5565b50610c9060c08401610ba2565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cbb57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cfe57868101830151858201608001528201610ce2565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220ca5f95de8c0945391fbe8da8f400ec24c8072b75798aedd171f8357c61d8780264736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c806390784ae81161006657806390784ae81461014d578063cb93846814610157578063e78cea921461015f578063e813a75514610186578063f6ee5b761461019d57600080fd5b8063051d1970146100985780631062b39a146100c05780632fa70aa7146100ff5780638c5f173f14610126575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6101556101b0565b005b6101556103b0565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b61018f60005481565b6040519081526020016100b7565b6101556101ab366004610aca565b6105dc565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610210573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102349190610b21565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610271573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102959190610b45565b50925050506000548111156102e75760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a16102e4610935565b50565b6000548110156102e457600254156103605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a150565b6002546000036104175760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610357565b6000546002546104279190610b7b565b42116104905760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610357565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610507573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052b9190610b21565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610568573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058c9190610b45565b50925050508181036105d85760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a16105d8610935565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106475760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610357565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f39190610b21565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107549190610b21565b6001600160a01b03161461079b5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610357565b60008383836040516024016107b293929190610bf7565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561086d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108919190610ca9565b6040518463ffffffff1660e01b81526004016108af93929190610cc2565b6020604051808303816000875af11580156108ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f29190610ca9565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092691815260200190565b60405180910390a25050505050565b6000805460405160240161094b91815260200190565b60408051601f19818403018152918152602080830180516001600160e01b031663654bc96560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2a9190610ca9565b6040518463ffffffff1660e01b8152600401610a4893929190610cc2565b6020604051808303816000875af1158015610a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8b9190610ca9565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d68781604051610abe91815260200190565b60405180910390a15050565b6000806000838503610120811215610ae157600080fd5b843593506020850135925060e0603f1982011215610afe57600080fd5b506040840190509250925092565b6001600160a01b03811681146102e457600080fd5b600060208284031215610b3357600080fd5b8151610b3e81610b0c565b9392505050565b60008060008060808587031215610b5b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b80820180821115610b9c57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610bad81610b0c565b919050565b803563ffffffff81168114610bad57600080fd5b803560038110610bad57600080fd5b60038110610bf357634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1b81610b0c565b6001600160a01b03166060830152610c3560408401610bb2565b63ffffffff808216608085015280610c4f60608701610bb2565b1660a085015280610c6260808701610bb2565b1660c08501525050610c7660a08401610bc6565b610c8360e0840182610bd5565b50610c9060c08401610ba2565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cbb57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cfe57868101830151858201608001528201610ce2565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220ca5f95de8c0945391fbe8da8f400ec24c8072b75798aedd171f8357c61d8780264736f6c63430008120033", "devdoc": { "details": "Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.", "events": { @@ -280,22 +280,22 @@ "_ticketID": "The unique identifier provided by the underlying canonical bridge." } }, - "SequencerLimitDecreaseRequested(uint256)": { + "sequencerDelayLimitDecreaseRequested(uint256)": { "details": "This event indicates that a request to decrease the sequencer limit has been made.", "params": { - "_requestedSequencerLimit": "The new sequencer limit requested." + "_requestedsequencerDelayLimit": "The new sequencer limit requested." } }, - "SequencerLimitSent(bytes32)": { + "sequencerDelayLimitSent(bytes32)": { "details": "This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value", "params": { "_ticketID": "The ticketID from the AMB of the cross-chain message." } }, - "SequencerLimitUpdated(uint256)": { + "sequencerDelayLimitUpdated(uint256)": { "details": "This event indicates the sequencer limit updated.", "params": { - "_newSequencerLimit": "The new maxL2StateSyncDelay." + "_newsequencerDelayLimit": "The new maxL2StateSyncDelay." } } }, @@ -310,8 +310,8 @@ "_veaOutboxArbToGnosis": "The vea outbox on Gnosis Chain." } }, - "executeSequencerLimitDecreaseRequest()": { - "details": "execute SequencerLimitDecreaseRequest" + "executesequencerDelayLimitDecreaseRequest()": { + "details": "execute sequencerDelayLimitDecreaseRequest" }, "route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Resolves any challenge of the optimistic claim for '_epoch'.", @@ -321,8 +321,8 @@ "_stateroot": "The true batch merkle root for the epoch." } }, - "updateSequencerLimit()": { - "details": "Update the sequencerLimit. If decreasing, a delayed request is created for later execution." + "updatesequencerDelayLimit()": { + "details": "Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution." } }, "version": 1 @@ -339,37 +339,37 @@ "storageLayout": { "storage": [ { - "astId": 1835, + "astId": 1828, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", - "label": "sequencerLimit", + "label": "sequencerDelayLimit", "offset": 0, "slot": "0", "type": "t_uint256" }, { - "astId": 1838, + "astId": 1831, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", - "label": "sequencerLimitDecreaseRequest", + "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "1", - "type": "t_struct(SequencerLimitDecreaseRequest)1843_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)1836_storage" } ], "types": { - "t_struct(SequencerLimitDecreaseRequest)1843_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)1836_storage": { "encoding": "inplace", - "label": "struct RouterArbToGnosis.SequencerLimitDecreaseRequest", + "label": "struct RouterArbToGnosis.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 1840, + "astId": 1833, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", - "label": "requestedSequencerLimit", + "label": "requestedsequencerDelayLimit", "offset": 0, "slot": "0", "type": "t_uint256" }, { - "astId": 1842, + "astId": 1835, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/RouterArbToGnosisTestnet.json b/contracts/deployments/goerli/RouterArbToGnosisTestnet.json index 7d738e41..dfc258f1 100644 --- a/contracts/deployments/goerli/RouterArbToGnosisTestnet.json +++ b/contracts/deployments/goerli/RouterArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0xfF2B7048d673767754B798df1702C786E2c59F1F", + "address": "0xbB800a318b5CeE079ADdBC6141A0BB1665793014", "abi": [ { "inputs": [ @@ -52,11 +52,11 @@ { "indexed": false, "internalType": "uint256", - "name": "_requestedSequencerLimit", + "name": "_requestedsequencerDelayLimit", "type": "uint256" } ], - "name": "SequencerLimitDecreaseRequested", + "name": "sequencerDelayLimitDecreaseRequested", "type": "event" }, { @@ -69,7 +69,7 @@ "type": "bytes32" } ], - "name": "SequencerLimitSent", + "name": "sequencerDelayLimitSent", "type": "event" }, { @@ -78,11 +78,11 @@ { "indexed": false, "internalType": "uint256", - "name": "_newSequencerLimit", + "name": "_newsequencerDelayLimit", "type": "uint256" } ], - "name": "SequencerLimitUpdated", + "name": "sequencerDelayLimitUpdated", "type": "event" }, { @@ -113,7 +113,7 @@ }, { "inputs": [], - "name": "executeSequencerLimitDecreaseRequest", + "name": "executesequencerDelayLimitDecreaseRequest", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -180,7 +180,7 @@ }, { "inputs": [], - "name": "sequencerLimit", + "name": "sequencerDelayLimit", "outputs": [ { "internalType": "uint256", @@ -193,11 +193,11 @@ }, { "inputs": [], - "name": "sequencerLimitDecreaseRequest", + "name": "sequencerDelayLimitDecreaseRequest", "outputs": [ { "internalType": "uint256", - "name": "requestedSequencerLimit", + "name": "requestedsequencerDelayLimit", "type": "uint256" }, { @@ -211,7 +211,7 @@ }, { "inputs": [], - "name": "updateSequencerLimit", + "name": "updatesequencerDelayLimit", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -243,33 +243,33 @@ "type": "function" } ], - "transactionHash": "0x7dbe5f504a6d9104289dea858569d1ec89e014cdf833f56e41155292c16c59f4", + "transactionHash": "0x644a56aca076de5941a8db2235bd8968de7d1f8f4616e9edd5353e52b99948c1", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xfF2B7048d673767754B798df1702C786E2c59F1F", - "transactionIndex": 65, - "gasUsed": "852741", + "contractAddress": "0xbB800a318b5CeE079ADdBC6141A0BB1665793014", + "transactionIndex": 8, + "gasUsed": "852781", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xacd5a2fa3774512b4da23a14d99577be127f92be65faa2dc95f4c8d571198a56", - "transactionHash": "0x7dbe5f504a6d9104289dea858569d1ec89e014cdf833f56e41155292c16c59f4", + "blockHash": "0xaa6d7828accd39640db2293e59351d547a0a3e4b9028d8c95b8fc22984777f33", + "transactionHash": "0x644a56aca076de5941a8db2235bd8968de7d1f8f4616e9edd5353e52b99948c1", "logs": [], - "blockNumber": 9182229, - "cumulativeGasUsed": "16449276", + "blockNumber": 9186602, + "cumulativeGasUsed": "1383750", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", - "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0x773872EFbA47b926F4B2d42DaB4677431bDA02E4", - "0x53194Fa828ebEfa5cB515d23CC2467d88f6B0Be2" + "0x87A19d769D875964E9Cd41dDBfc397B2543764E6", + "0xD6ecb6618e8070462E2a6AB160fE1773b8996D3a", + "0xd7610CF459C13Ff22923692Ab023dF5a58DeA838" ], - "numDeployments": 2, - "solcInputHash": "c9836c6cb024801f3104e49f87086294", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"SequencerLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"SequencerLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"SequencerLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"SequencerLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerLimit\":\"The new sequencer limit requested.\"}},\"SequencerLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"SequencerLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerLimitDecreaseRequest()\":{\"details\":\"execute SequencerLimitDecreaseRequest\"},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updateSequencerLimit()\":{\"details\":\"Update the sequencerLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/IArbitrumUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerLimitDecreaseRequest; // Decreasing the sequencerLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event SequencerLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerLimit The new maxL2StateSyncDelay.\\n event SequencerLimitUpdated(uint256 _newSequencerLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerLimit The new sequencer limit requested.\\n event SequencerLimitDecreaseRequested(uint256 _requestedSequencerLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerLimit > sequencerLimit) {\\n // For sequencerLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerLimit = newSequencerLimit;\\n emit SequencerLimitUpdated(newSequencerLimit);\\n sendSequencerLimit();\\n } else if (newSequencerLimit < sequencerLimit) {\\n require(sequencerLimitDecreaseRequest.timestamp == 0, \\\"Sequencer limit decrease request already pending.\\\");\\n\\n sequencerLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerLimit, \\n timestamp: block.timestamp\\n });\\n emit SequencerLimitDecreaseRequested(newSequencerLimit);\\n }\\n }\\n\\n /// @dev execute SequencerLimitDecreaseRequest\\n function executeSequencerLimitDecreaseRequest() external {\\n require(sequencerLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerLimitDecreaseRequest.timestamp + sequencerLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerLimit = sequencerLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerLimit == requestedSequencerLimit) {\\n sequencerLimit = requestedSequencerLimit;\\n emit SequencerLimitUpdated(requestedSequencerLimit);\\n sendSequencerLimit();\\n }\\n }\\n\\n /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n function sendSequencerLimit() internal {\\n bytes memory data = abi.encodeCall(IArbitrumUpdatable.updateSequencerLimit, sequencerLimit);\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit SequencerLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x9948429dd367155ea338d03e19a9f5a7e2f6b6cdd69f3221a9c68787828a62b6\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/IArbitrumUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from the Arbitrum Bridge through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an IArbitrumUpdateable contract which receives updates from the router on Ethereum.\\ninterface IArbitrumUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Arbitrum Sequencer contract.\\n /// @param _newSequencerLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerLimit(uint256 _newSequencerLimit) external;\\n}\\n\",\"keccak256\":\"0x4d59f1de812ac1ddad033f03c7dc34b1325b5b6dd43d26b97cd4e0d2d14c371a\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101006040523480156200001257600080fd5b5060405162000fe138038062000fe1833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610d5d620002846000396000818160eb0152818161082401526109bd0152600081816101120152610649015260008181609d015281816107fb015261099401526000818161017b015281816102c1015281816103e5015281816105e701526106730152610d5d6000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80639c13b6b5116100665780639c13b6b514610134578063da456a0e1461014b578063dd5fdeaa1461016e578063e78cea9214610176578063f6ee5b761461019d57600080fd5b80631062b39a1461009857806325a2acb1146100dc5780632fa70aa7146100e65780638c5f173f1461010d575b600080fd5b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100e46101b0565b005b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b61013d60005481565b6040519081526020016100d3565b600154600254610159919082565b604080519283526020830191909152016100d3565b6100e46103e1565b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6100e46101ab366004610aca565b6105dc565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b0c565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b48565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610b6c565b50925050508181036103dd5760008290556040518281527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a16103dd610935565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610441573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104659190610b48565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c69190610b6c565b50925050506000548111156105185760008190556040518181527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a1610515610935565b50565b600054811015610515576002541561058c5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527f08b771dddc6449625c7cd99bccdaf915b9c891fb6fa03695a71175b69e376ebb910160405180910390a150565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106475760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f39190610b48565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107549190610b48565b6001600160a01b03161461079b5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008383836040516024016107b293929190610bf7565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561086d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108919190610ca9565b6040518463ffffffff1660e01b81526004016108af93929190610cc2565b6020604051808303816000875af11580156108ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f29190610ca9565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092691815260200190565b60405180910390a25050505050565b6000805460405160240161094b91815260200190565b60408051601f19818403018152918152602080830180516001600160e01b03166330a66b3160e21b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2a9190610ca9565b6040518463ffffffff1660e01b8152600401610a4893929190610cc2565b6020604051808303816000875af1158015610a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8b9190610ca9565b90507fd488b9f6b18ad9b161668081604f47fc1bf87885163d2220eb8e27e7c9c7b59381604051610abe91815260200190565b60405180910390a15050565b6000806000838503610120811215610ae157600080fd5b843593506020850135925060e0603f1982011215610afe57600080fd5b506040840190509250925092565b80820180821115610b2d57634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b038116811461051557600080fd5b600060208284031215610b5a57600080fd5b8151610b6581610b33565b9392505050565b60008060008060808587031215610b8257600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bad81610b33565b919050565b803563ffffffff81168114610bad57600080fd5b803560038110610bad57600080fd5b60038110610bf357634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1b81610b33565b6001600160a01b03166060830152610c3560408401610bb2565b63ffffffff808216608085015280610c4f60608701610bb2565b1660a085015280610c6260808701610bb2565b1660c08501525050610c7660a08401610bc6565b610c8360e0840182610bd5565b50610c9060c08401610ba2565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cbb57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cfe57868101830151858201608001528201610ce2565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220eb4ad4f2e9b0b72e4d19c4740089707442a5a4b35d3f482fe78ca0227afc31b364736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80639c13b6b5116100665780639c13b6b514610134578063da456a0e1461014b578063dd5fdeaa1461016e578063e78cea9214610176578063f6ee5b761461019d57600080fd5b80631062b39a1461009857806325a2acb1146100dc5780632fa70aa7146100e65780638c5f173f1461010d575b600080fd5b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100e46101b0565b005b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b61013d60005481565b6040519081526020016100d3565b600154600254610159919082565b604080519283526020830191909152016100d3565b6100e46103e1565b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6100e46101ab366004610aca565b6105dc565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b0c565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b48565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610b6c565b50925050508181036103dd5760008290556040518281527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a16103dd610935565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610441573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104659190610b48565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c69190610b6c565b50925050506000548111156105185760008190556040518181527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a1610515610935565b50565b600054811015610515576002541561058c5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527f08b771dddc6449625c7cd99bccdaf915b9c891fb6fa03695a71175b69e376ebb910160405180910390a150565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106475760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f39190610b48565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107549190610b48565b6001600160a01b03161461079b5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008383836040516024016107b293929190610bf7565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561086d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108919190610ca9565b6040518463ffffffff1660e01b81526004016108af93929190610cc2565b6020604051808303816000875af11580156108ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f29190610ca9565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092691815260200190565b60405180910390a25050505050565b6000805460405160240161094b91815260200190565b60408051601f19818403018152918152602080830180516001600160e01b03166330a66b3160e21b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2a9190610ca9565b6040518463ffffffff1660e01b8152600401610a4893929190610cc2565b6020604051808303816000875af1158015610a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8b9190610ca9565b90507fd488b9f6b18ad9b161668081604f47fc1bf87885163d2220eb8e27e7c9c7b59381604051610abe91815260200190565b60405180910390a15050565b6000806000838503610120811215610ae157600080fd5b843593506020850135925060e0603f1982011215610afe57600080fd5b506040840190509250925092565b80820180821115610b2d57634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b038116811461051557600080fd5b600060208284031215610b5a57600080fd5b8151610b6581610b33565b9392505050565b60008060008060808587031215610b8257600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bad81610b33565b919050565b803563ffffffff81168114610bad57600080fd5b803560038110610bad57600080fd5b60038110610bf357634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1b81610b33565b6001600160a01b03166060830152610c3560408401610bb2565b63ffffffff808216608085015280610c4f60608701610bb2565b1660a085015280610c6260808701610bb2565b1660c08501525050610c7660a08401610bc6565b610c8360e0840182610bd5565b50610c9060c08401610ba2565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cbb57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cfe57868101830151858201608001528201610ce2565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220eb4ad4f2e9b0b72e4d19c4740089707442a5a4b35d3f482fe78ca0227afc31b364736f6c63430008120033", + "numDeployments": 3, + "solcInputHash": "ad697f618f73759e1d99ca054913682f", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n sendsequencerDelayLimit();\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(sequencerDelayLimitDecreaseRequest.timestamp == 0, \\\"Sequencer limit decrease request already pending.\\\");\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n sendsequencerDelayLimit();\\n }\\n }\\n\\n /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n function sendsequencerDelayLimit() internal {\\n bytes memory data = abi.encodeCall(ISequencerDelayUpdatable.updateSequencerDelayLimit, sequencerDelayLimit);\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xcfbeaee85e255366b9ada686378d200a04fa63eadc6f925cae5056cdcac10e01\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Arbitrum Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit) external;\\n}\",\"keccak256\":\"0xcf2532733ecd20779e259f12452b75f0ebda4965bc8aa2c8af041df908e632d3\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b5060405162000fe238038062000fe2833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610d5d62000285600039600081816101040152818161082401526109bd01526000818161012b015261064901526000818160c5015281816107fb0152610994015260008181610164015281816101b4015281816104bc015281816105e701526106730152610d5d6000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806390784ae81161006657806390784ae81461014d578063cb93846814610157578063e78cea921461015f578063e813a75514610186578063f6ee5b761461019d57600080fd5b8063051d1970146100985780631062b39a146100c05780632fa70aa7146100ff5780638c5f173f14610126575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6101556101b0565b005b6101556103b0565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b61018f60005481565b6040519081526020016100b7565b6101556101ab366004610aca565b6105dc565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610210573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102349190610b21565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610271573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102959190610b45565b50925050506000548111156102e75760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a16102e4610935565b50565b6000548110156102e457600254156103605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a150565b6002546000036104175760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610357565b6000546002546104279190610b7b565b42116104905760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610357565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610507573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052b9190610b21565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610568573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058c9190610b45565b50925050508181036105d85760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a16105d8610935565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106475760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610357565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f39190610b21565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107549190610b21565b6001600160a01b03161461079b5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610357565b60008383836040516024016107b293929190610bf7565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561086d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108919190610ca9565b6040518463ffffffff1660e01b81526004016108af93929190610cc2565b6020604051808303816000875af11580156108ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f29190610ca9565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092691815260200190565b60405180910390a25050505050565b6000805460405160240161094b91815260200190565b60408051601f19818403018152918152602080830180516001600160e01b031663654bc96560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2a9190610ca9565b6040518463ffffffff1660e01b8152600401610a4893929190610cc2565b6020604051808303816000875af1158015610a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8b9190610ca9565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d68781604051610abe91815260200190565b60405180910390a15050565b6000806000838503610120811215610ae157600080fd5b843593506020850135925060e0603f1982011215610afe57600080fd5b506040840190509250925092565b6001600160a01b03811681146102e457600080fd5b600060208284031215610b3357600080fd5b8151610b3e81610b0c565b9392505050565b60008060008060808587031215610b5b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b80820180821115610b9c57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610bad81610b0c565b919050565b803563ffffffff81168114610bad57600080fd5b803560038110610bad57600080fd5b60038110610bf357634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1b81610b0c565b6001600160a01b03166060830152610c3560408401610bb2565b63ffffffff808216608085015280610c4f60608701610bb2565b1660a085015280610c6260808701610bb2565b1660c08501525050610c7660a08401610bc6565b610c8360e0840182610bd5565b50610c9060c08401610ba2565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cbb57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cfe57868101830151858201608001528201610ce2565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220ca5f95de8c0945391fbe8da8f400ec24c8072b75798aedd171f8357c61d8780264736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c806390784ae81161006657806390784ae81461014d578063cb93846814610157578063e78cea921461015f578063e813a75514610186578063f6ee5b761461019d57600080fd5b8063051d1970146100985780631062b39a146100c05780632fa70aa7146100ff5780638c5f173f14610126575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6101556101b0565b005b6101556103b0565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b61018f60005481565b6040519081526020016100b7565b6101556101ab366004610aca565b6105dc565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610210573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102349190610b21565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610271573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102959190610b45565b50925050506000548111156102e75760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a16102e4610935565b50565b6000548110156102e457600254156103605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a150565b6002546000036104175760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610357565b6000546002546104279190610b7b565b42116104905760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610357565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610507573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052b9190610b21565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610568573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058c9190610b45565b50925050508181036105d85760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a16105d8610935565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106475760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610357565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f39190610b21565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107549190610b21565b6001600160a01b03161461079b5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610357565b60008383836040516024016107b293929190610bf7565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561086d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108919190610ca9565b6040518463ffffffff1660e01b81526004016108af93929190610cc2565b6020604051808303816000875af11580156108ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f29190610ca9565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092691815260200190565b60405180910390a25050505050565b6000805460405160240161094b91815260200190565b60408051601f19818403018152918152602080830180516001600160e01b031663654bc96560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2a9190610ca9565b6040518463ffffffff1660e01b8152600401610a4893929190610cc2565b6020604051808303816000875af1158015610a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8b9190610ca9565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d68781604051610abe91815260200190565b60405180910390a15050565b6000806000838503610120811215610ae157600080fd5b843593506020850135925060e0603f1982011215610afe57600080fd5b506040840190509250925092565b6001600160a01b03811681146102e457600080fd5b600060208284031215610b3357600080fd5b8151610b3e81610b0c565b9392505050565b60008060008060808587031215610b5b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b80820180821115610b9c57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610bad81610b0c565b919050565b803563ffffffff81168114610bad57600080fd5b803560038110610bad57600080fd5b60038110610bf357634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1b81610b0c565b6001600160a01b03166060830152610c3560408401610bb2565b63ffffffff808216608085015280610c4f60608701610bb2565b1660a085015280610c6260808701610bb2565b1660c08501525050610c7660a08401610bc6565b610c8360e0840182610bd5565b50610c9060c08401610ba2565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cbb57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cfe57868101830151858201608001528201610ce2565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220ca5f95de8c0945391fbe8da8f400ec24c8072b75798aedd171f8357c61d8780264736f6c63430008120033", "devdoc": { "details": "Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.", "events": { @@ -280,22 +280,22 @@ "_ticketID": "The unique identifier provided by the underlying canonical bridge." } }, - "SequencerLimitDecreaseRequested(uint256)": { + "sequencerDelayLimitDecreaseRequested(uint256)": { "details": "This event indicates that a request to decrease the sequencer limit has been made.", "params": { - "_requestedSequencerLimit": "The new sequencer limit requested." + "_requestedsequencerDelayLimit": "The new sequencer limit requested." } }, - "SequencerLimitSent(bytes32)": { + "sequencerDelayLimitSent(bytes32)": { "details": "This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value", "params": { "_ticketID": "The ticketID from the AMB of the cross-chain message." } }, - "SequencerLimitUpdated(uint256)": { + "sequencerDelayLimitUpdated(uint256)": { "details": "This event indicates the sequencer limit updated.", "params": { - "_newSequencerLimit": "The new maxL2StateSyncDelay." + "_newsequencerDelayLimit": "The new maxL2StateSyncDelay." } } }, @@ -310,8 +310,8 @@ "_veaOutboxArbToGnosis": "The vea outbox on Gnosis Chain." } }, - "executeSequencerLimitDecreaseRequest()": { - "details": "execute SequencerLimitDecreaseRequest" + "executesequencerDelayLimitDecreaseRequest()": { + "details": "execute sequencerDelayLimitDecreaseRequest" }, "route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Resolves any challenge of the optimistic claim for '_epoch'.", @@ -321,8 +321,8 @@ "_stateroot": "The true batch merkle root for the epoch." } }, - "updateSequencerLimit()": { - "details": "Update the sequencerLimit. If decreasing, a delayed request is created for later execution." + "updatesequencerDelayLimit()": { + "details": "Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution." } }, "version": 1 @@ -339,37 +339,37 @@ "storageLayout": { "storage": [ { - "astId": 1835, + "astId": 1828, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", - "label": "sequencerLimit", + "label": "sequencerDelayLimit", "offset": 0, "slot": "0", "type": "t_uint256" }, { - "astId": 1838, + "astId": 1831, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", - "label": "sequencerLimitDecreaseRequest", + "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "1", - "type": "t_struct(SequencerLimitDecreaseRequest)1843_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)1836_storage" } ], "types": { - "t_struct(SequencerLimitDecreaseRequest)1843_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)1836_storage": { "encoding": "inplace", - "label": "struct RouterArbToGnosis.SequencerLimitDecreaseRequest", + "label": "struct RouterArbToGnosis.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 1840, + "astId": 1833, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", - "label": "requestedSequencerLimit", + "label": "requestedsequencerDelayLimit", "offset": 0, "slot": "0", "type": "t_uint256" }, { - "astId": 1842, + "astId": 1835, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json b/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json index cff1c814..6c403987 100644 --- a/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json +++ b/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xB32A65B4b0b18d231BA88c3E37F7f600683baD6D", + "address": "0x19F1fE9f34d3d6323FB9862a99F8A56542f879F0", "abi": [ { "inputs": [ @@ -99,11 +99,11 @@ { "indexed": false, "internalType": "uint256", - "name": "_requestedSequencerLimit", + "name": "_epoch", "type": "uint256" } ], - "name": "SequencerLimitDecreaseRequested", + "name": "VerificationStarted", "type": "event" }, { @@ -112,11 +112,11 @@ { "indexed": false, "internalType": "uint256", - "name": "_newSequencerLimit", + "name": "_epoch", "type": "uint256" } ], - "name": "SequencerLimitUpdated", + "name": "Verified", "type": "event" }, { @@ -125,11 +125,11 @@ { "indexed": false, "internalType": "uint256", - "name": "_epoch", + "name": "_requestedsequencerDelayLimit", "type": "uint256" } ], - "name": "VerificationStarted", + "name": "sequencerDelayLimitDecreaseRequested", "type": "event" }, { @@ -138,11 +138,11 @@ { "indexed": false, "internalType": "uint256", - "name": "_epoch", + "name": "_newsequencerDelayLimit", "type": "uint256" } ], - "name": "Verified", + "name": "sequencerDelayLimitUpdated", "type": "event" }, { @@ -410,7 +410,7 @@ }, { "inputs": [], - "name": "executeSequencerLimitDecreaseRequest", + "name": "executesequencerDelayLimitDecreaseRequest", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -619,7 +619,7 @@ }, { "inputs": [], - "name": "sequencerLimit", + "name": "sequencerDelayLimit", "outputs": [ { "internalType": "uint256", @@ -632,11 +632,11 @@ }, { "inputs": [], - "name": "sequencerLimitDecreaseRequest", + "name": "sequencerDelayLimitDecreaseRequest", "outputs": [ { "internalType": "uint256", - "name": "requestedSequencerLimit", + "name": "requestedsequencerDelayLimit", "type": "uint256" }, { @@ -731,7 +731,7 @@ }, { "inputs": [], - "name": "updateSequencerLimit", + "name": "updatesequencerDelayLimit", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -1025,32 +1025,32 @@ "type": "function" } ], - "transactionHash": "0x4d92349ef29cd1ffece5eda752ec94ccaa1a4842ff6beb84f37c55f7faa7acaa", + "transactionHash": "0xf56e3038a4dc7c120b6b0d53a3e38c6b50bbae16c5ed2a34e4fc0c986a237037", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xB32A65B4b0b18d231BA88c3E37F7f600683baD6D", - "transactionIndex": 48, - "gasUsed": "2205665", - "logsBloom": "0x00000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000002280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xd0432acc65704603b2c0c6b20b70eb297c03a618dc2c945b7c63c9bedbf8f97b", - "transactionHash": "0x4d92349ef29cd1ffece5eda752ec94ccaa1a4842ff6beb84f37c55f7faa7acaa", + "contractAddress": "0x19F1fE9f34d3d6323FB9862a99F8A56542f879F0", + "transactionIndex": 22, + "gasUsed": "2205677", + "logsBloom": "0x00000000000000000000000000000002000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000020000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x708241027734f29da76971b136c46c91419e3419c581b2f1633a3db17e45fb93", + "transactionHash": "0xf56e3038a4dc7c120b6b0d53a3e38c6b50bbae16c5ed2a34e4fc0c986a237037", "logs": [ { - "transactionIndex": 48, - "blockNumber": 9181945, - "transactionHash": "0x4d92349ef29cd1ffece5eda752ec94ccaa1a4842ff6beb84f37c55f7faa7acaa", - "address": "0xB32A65B4b0b18d231BA88c3E37F7f600683baD6D", + "transactionIndex": 22, + "blockNumber": 9186605, + "transactionHash": "0xf56e3038a4dc7c120b6b0d53a3e38c6b50bbae16c5ed2a34e4fc0c986a237037", + "address": "0x19F1fE9f34d3d6323FB9862a99F8A56542f879F0", "topics": [ - "0x5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c" + "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 151, - "blockHash": "0xd0432acc65704603b2c0c6b20b70eb297c03a618dc2c945b7c63c9bedbf8f97b" + "logIndex": 20, + "blockHash": "0x708241027734f29da76971b136c46c91419e3419c581b2f1633a3db17e45fb93" } ], - "blockNumber": 9181945, - "cumulativeGasUsed": "10656379", + "blockNumber": 9186605, + "cumulativeGasUsed": "3517092", "status": 1, "byzantium": true }, @@ -1059,15 +1059,15 @@ 1800, 0, 10000000000000, - "0x3aD2FfA09823de2f98F2f0aBA832a6b83521E2E6", + "0x63eBccD095a663f024B5336b8362A7fa836b7882", "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", 10000000000000 ], - "numDeployments": 8, - "solcInputHash": "c9836c6cb024801f3104e49f87086294", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEthDevnet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"SequencerLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"SequencerLimitUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"SequencerLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerLimit\":\"The new sequencer limit requested.\"}},\"SequencerLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerLimit\":\"The new maxL2StateSyncDelay.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_bridge\":\"The address of the Arbitrum bridge contract on Ethereum.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEthDevnet\":\"The address of the devnet vea inbox on Arbitrum to Ethereum.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executeSequencerLimitDecreaseRequest()\":{\"details\":\"execute SequencerLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerLimit()\":{\"details\":\"Request to decrease the sequencerLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":\"VeaOutboxArbToEthDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerLimitDecreaseRequest; // Decreasing the sequencerLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerLimit The new maxL2StateSyncDelay.\\n event SequencerLimitUpdated(uint256 _newSequencerLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerLimit The new sequencer limit requested.\\n event SequencerLimitDecreaseRequested(uint256 _requestedSequencerLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updateSequencerLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerLimit.\\n function updateSequencerLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerLimit > sequencerLimit) {\\n // For sequencerLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerLimit = newSequencerLimit;\\n emit SequencerLimitUpdated(newSequencerLimit);\\n } else if (newSequencerLimit < sequencerLimit) {\\n require(sequencerLimitDecreaseRequest.timestamp == 0, \\\"Sequencer limit decrease request already pending.\\\");\\n\\n sequencerLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerLimit, \\n timestamp: block.timestamp\\n });\\n\\n emit SequencerLimitDecreaseRequested(newSequencerLimit);\\n }\\n }\\n\\n /// @dev execute SequencerLimitDecreaseRequest\\n function executeSequencerLimitDecreaseRequest() external {\\n require(sequencerLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerLimitDecreaseRequest.timestamp + sequencerLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerLimit = sequencerLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerLimit == requestedSequencerLimit) {\\n sequencerLimit = requestedSequencerLimit;\\n emit SequencerLimitUpdated(requestedSequencerLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerLimit) {\\n // Allow claims to be made within the sequencerLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x1a7affa8f2ca1bf2ef5b7c57a5a07215282875209008f7dceee9eecfa4906db3\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToEth/VeaOutboxArbToEth.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Goerli.\\n/// Note: This contract is deployed on Goerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(\\n _epoch,\\n claim\\n );\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(\\n _epoch,\\n claim\\n );\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(\\n _epoch,\\n claim\\n );\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEthDevnet The address of the devnet vea inbox on Arbitrum to Ethereum.\\n /// @param _bridge The address of the Arbitrum bridge contract on Ethereum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEthDevnet,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n )\\n VeaOutboxArbToEth(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _veaInboxArbToEthDevnet,\\n _bridge,\\n _maxMissingBlocks\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x6af5ea9e63d2e395cc709d8421e6b92438bed5691693ac9c50c125c664460543\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002a4438038062002a448339810160408190526200003591620002ee565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190528686868686868662000076620000ee565b620000836002886200036c565b60e0819052620000958860026200038f565b620000a19190620003af565b6101005261012051600190620000b890426200036c565b620000c49190620003af565b6001555050600780546001600160a01b0319163317905550620004219a5050505050505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000131573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001579190620003c5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000195573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001bb9190620003ea565b5092505050600454811115620002065760048190556040518181527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a150565b600454811015620002ce5760065415620002805760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527f08b771dddc6449625c7cd99bccdaf915b9c891fb6fa03695a71175b69e376ebb910160405180910390a15b50565b80516001600160a01b0381168114620002e957600080fd5b919050565b600080600080600080600060e0888a0312156200030a57600080fd5b875196506020880151955060408801519450606088015193506200033160808901620002d1565b92506200034160a08901620002d1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200038a57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620003a957620003a962000356565b92915050565b81810381811115620003a957620003a962000356565b600060208284031215620003d857600080fd5b620003e382620002d1565b9392505050565b600080600080608085870312156200040157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516124f56200054f600039600081816104870152611ea90152600081816104bb015281816108b2015281816116dd015281816118680152611a740152600081816105430152611e3d0152600081816104ef015281816108d601528181610bdf015281816115cb015281816117010152818161188c0152611a9801526000818161135801526114910152600081816113050152611449015260008181610577015281816106b2015281816108390152818161086601528181610e47015281816114e1015281816119d201528181611a390152611bdf01526000818161038201526109c001526000818161063d01528181610951015281816109ea01528181610d150152611c2f01526124f56000f3fe6080604052600436106101e35760003560e01c806390df63b711610102578063c2114a1611610095578063dd5fdeaa11610064578063dd5fdeaa146105e9578063df19e6ff146105fe578063e78cea921461062b578063eedcf2a91461065f57600080fd5b8063c2114a1614610531578063d0e30db014610565578063da2b7bc414610599578063da456a0e146105b957600080fd5b8063aa22a1c6116100d1578063aa22a1c614610475578063b044397e146104a9578063b5b7a184146104dd578063b633b9441461051157600080fd5b806390df63b7146103fc578063930f28af146104295780639588eca2146104495780639c13b6b51461045f57600080fd5b80633ce43cfd1161017a578063541adcca11610149578063541adcca1461035057806369cd250d146103705780638a619a71146103bc5780638ad3a8f7146103dc57600080fd5b80633ce43cfd146102d05780634788cb38146102f057806349b4299e146103105780634a439cfe1461033057600080fd5b80632639c060116101b65780632639c0601461025a57806327ee6bdd1461028757806331d144571461029d57806331ddf743146102b057600080fd5b806301139b68146101e85780630f0adca5146101fd578063222ae7861461021d57806325a2acb114610245575b600080fd5b6101fb6101f6366004612063565b610672565b005b34801561020957600080fd5b506101fb610218366004612091565b6108b0565b34801561022957600080fd5b50610232610bd8565b6040519081526020015b60405180910390f35b34801561025157600080fd5b506101fb610c09565b34801561026657600080fd5b506102326102753660046120c8565b60026020526000908152604090205481565b34801561029357600080fd5b5061023260015481565b6101fb6102ab3660046120e1565b610e2e565b3480156102bc57600080fd5b506101fb6102cb366004612164565b610fae565b3480156102dc57600080fd5b506101fb6102eb366004612226565b61124e565b3480156102fc57600080fd5b506101fb61030b366004612063565b611395565b34801561031c57600080fd5b506101fb61032b366004612063565b611519565b34801561033c57600080fd5b5061023261034b3660046120c8565b6115c4565b34801561035c57600080fd5b5061023261036b36600461225f565b6115f6565b34801561037c57600080fd5b506103a47f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161023c565b3480156103c857600080fd5b506101fb6103d7366004612282565b611648565b3480156103e857600080fd5b506007546103a4906001600160a01b031681565b34801561040857600080fd5b506102326104173660046120c8565b60036020526000908152604090205481565b34801561043557600080fd5b506101fb610444366004612063565b6116db565b34801561045557600080fd5b5061023260005481565b34801561046b57600080fd5b5061023260045481565b34801561048157600080fd5b506102327f000000000000000000000000000000000000000000000000000000000000000081565b3480156104b557600080fd5b506102327f000000000000000000000000000000000000000000000000000000000000000081565b3480156104e957600080fd5b506102327f000000000000000000000000000000000000000000000000000000000000000081565b34801561051d57600080fd5b506101fb61052c366004612063565b611866565b34801561053d57600080fd5b506102327f000000000000000000000000000000000000000000000000000000000000000081565b34801561057157600080fd5b506102327f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a557600080fd5b506101fb6105b4366004612063565b611a72565b3480156105c557600080fd5b506005546006546105d4919082565b6040805192835260208301919091520161023c565b3480156105f557600080fd5b506101fb611c2b565b34801561060a57600080fd5b5061061e61061936600461225f565b611e1f565b60405161023c91906122b5565b34801561063757600080fd5b506103a47f000000000000000000000000000000000000000000000000000000000000000081565b6101fb61066d3660046120e1565b611ee6565b61067b816115f6565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122cf565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a0015160028111156107935761079361229f565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816115f6565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f00000000000000000000000000000000000000000000000000000000000000003461230d565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090357610903612320565b040311156109465760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109be5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612336565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612336565b6001600160a01b031614610b1a5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610b2a57508115155b15610b6d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b76816115f6565b60008481526002602052604090205403610bd3578051829003610b9f57600160a0820152610bba565b60c08101516001600160a01b031615610bba57600260a08201525b610bc3816115f6565b6000848152600260205260409020555b505050565b6000610c047f000000000000000000000000000000000000000000000000000000000000000042612353565b905090565b600654600003610c705760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b600454600654610c809190612375565b4211610ce95760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610d60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d849190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610dc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de59190612388565b50925050508181036108ac5760048290556040518281527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c906020015b60405180910390a15050565b6007546001600160a01b03163314610e4557600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610eb55760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610ed25760405162461bcd60e51b81526004016106a7906122cf565b60008281526002602052604090205415610f245760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610f6a906115f6565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161082f565b60408510610ff05760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b60008484848460405160200161100994939291906123be565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561108957600088888381811061104b5761104b612400565b9050602002013590508281111561107057826000528060205260406000209250611080565b8060005282602052604060002092505b5060010161102f565b5080600054146110cc5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156111415760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b038916906111719089908990612416565b6000604051808303816000865af19150503d80600081146111ae576040519150601f19603f3d011682016040523d82523d6000602084013e6111b3565b606091505b50509050806112045760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61126061036b3683900383018361225f565b6000838152600260205260409020541461128c5760405162461bcd60e51b81526004016106a7906122cf565b600261129e60c0830160a08401612426565b60028111156112af576112af61229f565b146112f05760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061134a93505060e0840191505060c08301612282565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61139e816115f6565b600083815260026020526040902054146113ca5760405162461bcd60e51b81526004016106a7906122cf565b60018160a0015160028111156113e2576113e261229f565b1461141f5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156114cb576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461153057600080fd5b611539816115f6565b600083815260026020526040902054146115655760405162461bcd60e51b81526004016106a7906122cf565b63ffffffff428116606083015243166080820152611582816115f6565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610e22565b60006115f07f000000000000000000000000000000000000000000000000000000000000000083612353565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861162b989097969101612441565b604051602081830303815290604052805190602001209050919050565b6007546001600160a01b0316331461165f57600080fd5b6007546001600160a01b031633146116b95760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161172e5761172e612320565b040311156117715760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b61177a816115f6565b600083815260026020526040902054146117a65760405162461bcd60e51b81526004016106a7906122cf565b60c08101516001600160a01b0316156117f85760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b60015482111561184057600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611850816115f6565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816118b9576118b9612320565b0403116118fa5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611903816115f6565b6000838152600260205260409020541461192f5760405162461bcd60e51b81526004016106a7906122cf565b60008160a0015160028111156119475761194761229f565b146119865760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b0316611a0a5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611a1e826115f6565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ac557611ac5612320565b040311611b065760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611b0f816115f6565b60008381526002602052604090205414611b3b5760405162461bcd60e51b81526004016106a7906122cf565b60008160a001516002811115611b5357611b5361229f565b14611b925760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611c175760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611a1e826115f6565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611caf9190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611cec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d109190612388565b5092505050600454811115611d5a5760048190556040518181527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a150565b600454811015611e1c5760065415611dce5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527f08b771dddc6449625c7cd99bccdaf915b9c891fb6fa03695a71175b69e376ebb910160405180910390a15b50565b6000816060015163ffffffff16600003611e3b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7757506003919050565b6000600c836060015163ffffffff16420381611e9557611e95612320565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ed95760019250611ede565b600092505b50505b919050565b611ef08282610e2e565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f378382611519565b63ffffffff428116606083015243166080820152611f5583826116db565b600160a0820152610bd38382611395565b6001600160a01b0381168114611e1c57600080fd5b8035611ee181611f66565b803563ffffffff81168114611ee157600080fd5b803560038110611ee157600080fd5b600060e08284031215611fbb57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fec57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200260208401611f7b565b602082015261201360408401611f86565b604082015261202460608401611f86565b606082015261203560808401611f86565b608082015261204660a08401611f9a565b60a082015261205760c08401611f7b565b60c08201525092915050565b600080610100838503121561207757600080fd5b823591506120888460208501611fa9565b90509250929050565b600080600061012084860312156120a757600080fd5b83359250602084013591506120bf8560408601611fa9565b90509250925092565b6000602082840312156120da57600080fd5b5035919050565b600080604083850312156120f457600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee157600080fd5b60008083601f84011261212d57600080fd5b50813567ffffffffffffffff81111561214557600080fd5b60208301915083602082850101111561215d57600080fd5b9250929050565b6000806000806000806080878903121561217d57600080fd5b863567ffffffffffffffff8082111561219557600080fd5b818901915089601f8301126121a957600080fd5b8135818111156121b857600080fd5b8a60208260051b85010111156121cd57600080fd5b602083019850809750506121e360208a01612103565b95506121f160408a01611f7b565b9450606089013591508082111561220757600080fd5b5061221489828a0161211b565b979a9699509497509295939492505050565b60008082840361010081121561223b57600080fd5b8335925060e0601f198201121561225157600080fd5b506020830190509250929050565b600060e0828403121561227157600080fd5b61227b8383611fa9565b9392505050565b60006020828403121561229457600080fd5b813561227b81611f66565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122c9576122c961229f565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156115f0576115f06122f7565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561234857600080fd5b815161227b81611f66565b60008261237057634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156115f0576115f06122f7565b6000806000806080858703121561239e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561243857600080fd5b61227b82611f9a565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124995761249961229f565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220deeffe1347d1160c62da9e56119a5cfb5e8e519e5e4f73d5390c93582172c2f464736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101e35760003560e01c806390df63b711610102578063c2114a1611610095578063dd5fdeaa11610064578063dd5fdeaa146105e9578063df19e6ff146105fe578063e78cea921461062b578063eedcf2a91461065f57600080fd5b8063c2114a1614610531578063d0e30db014610565578063da2b7bc414610599578063da456a0e146105b957600080fd5b8063aa22a1c6116100d1578063aa22a1c614610475578063b044397e146104a9578063b5b7a184146104dd578063b633b9441461051157600080fd5b806390df63b7146103fc578063930f28af146104295780639588eca2146104495780639c13b6b51461045f57600080fd5b80633ce43cfd1161017a578063541adcca11610149578063541adcca1461035057806369cd250d146103705780638a619a71146103bc5780638ad3a8f7146103dc57600080fd5b80633ce43cfd146102d05780634788cb38146102f057806349b4299e146103105780634a439cfe1461033057600080fd5b80632639c060116101b65780632639c0601461025a57806327ee6bdd1461028757806331d144571461029d57806331ddf743146102b057600080fd5b806301139b68146101e85780630f0adca5146101fd578063222ae7861461021d57806325a2acb114610245575b600080fd5b6101fb6101f6366004612063565b610672565b005b34801561020957600080fd5b506101fb610218366004612091565b6108b0565b34801561022957600080fd5b50610232610bd8565b6040519081526020015b60405180910390f35b34801561025157600080fd5b506101fb610c09565b34801561026657600080fd5b506102326102753660046120c8565b60026020526000908152604090205481565b34801561029357600080fd5b5061023260015481565b6101fb6102ab3660046120e1565b610e2e565b3480156102bc57600080fd5b506101fb6102cb366004612164565b610fae565b3480156102dc57600080fd5b506101fb6102eb366004612226565b61124e565b3480156102fc57600080fd5b506101fb61030b366004612063565b611395565b34801561031c57600080fd5b506101fb61032b366004612063565b611519565b34801561033c57600080fd5b5061023261034b3660046120c8565b6115c4565b34801561035c57600080fd5b5061023261036b36600461225f565b6115f6565b34801561037c57600080fd5b506103a47f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161023c565b3480156103c857600080fd5b506101fb6103d7366004612282565b611648565b3480156103e857600080fd5b506007546103a4906001600160a01b031681565b34801561040857600080fd5b506102326104173660046120c8565b60036020526000908152604090205481565b34801561043557600080fd5b506101fb610444366004612063565b6116db565b34801561045557600080fd5b5061023260005481565b34801561046b57600080fd5b5061023260045481565b34801561048157600080fd5b506102327f000000000000000000000000000000000000000000000000000000000000000081565b3480156104b557600080fd5b506102327f000000000000000000000000000000000000000000000000000000000000000081565b3480156104e957600080fd5b506102327f000000000000000000000000000000000000000000000000000000000000000081565b34801561051d57600080fd5b506101fb61052c366004612063565b611866565b34801561053d57600080fd5b506102327f000000000000000000000000000000000000000000000000000000000000000081565b34801561057157600080fd5b506102327f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a557600080fd5b506101fb6105b4366004612063565b611a72565b3480156105c557600080fd5b506005546006546105d4919082565b6040805192835260208301919091520161023c565b3480156105f557600080fd5b506101fb611c2b565b34801561060a57600080fd5b5061061e61061936600461225f565b611e1f565b60405161023c91906122b5565b34801561063757600080fd5b506103a47f000000000000000000000000000000000000000000000000000000000000000081565b6101fb61066d3660046120e1565b611ee6565b61067b816115f6565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122cf565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a0015160028111156107935761079361229f565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816115f6565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f00000000000000000000000000000000000000000000000000000000000000003461230d565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090357610903612320565b040311156109465760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109be5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612336565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612336565b6001600160a01b031614610b1a5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610b2a57508115155b15610b6d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b76816115f6565b60008481526002602052604090205403610bd3578051829003610b9f57600160a0820152610bba565b60c08101516001600160a01b031615610bba57600260a08201525b610bc3816115f6565b6000848152600260205260409020555b505050565b6000610c047f000000000000000000000000000000000000000000000000000000000000000042612353565b905090565b600654600003610c705760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b600454600654610c809190612375565b4211610ce95760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610d60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d849190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610dc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de59190612388565b50925050508181036108ac5760048290556040518281527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c906020015b60405180910390a15050565b6007546001600160a01b03163314610e4557600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610eb55760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610ed25760405162461bcd60e51b81526004016106a7906122cf565b60008281526002602052604090205415610f245760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610f6a906115f6565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161082f565b60408510610ff05760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b60008484848460405160200161100994939291906123be565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561108957600088888381811061104b5761104b612400565b9050602002013590508281111561107057826000528060205260406000209250611080565b8060005282602052604060002092505b5060010161102f565b5080600054146110cc5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156111415760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b038916906111719089908990612416565b6000604051808303816000865af19150503d80600081146111ae576040519150601f19603f3d011682016040523d82523d6000602084013e6111b3565b606091505b50509050806112045760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61126061036b3683900383018361225f565b6000838152600260205260409020541461128c5760405162461bcd60e51b81526004016106a7906122cf565b600261129e60c0830160a08401612426565b60028111156112af576112af61229f565b146112f05760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061134a93505060e0840191505060c08301612282565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61139e816115f6565b600083815260026020526040902054146113ca5760405162461bcd60e51b81526004016106a7906122cf565b60018160a0015160028111156113e2576113e261229f565b1461141f5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156114cb576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461153057600080fd5b611539816115f6565b600083815260026020526040902054146115655760405162461bcd60e51b81526004016106a7906122cf565b63ffffffff428116606083015243166080820152611582816115f6565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610e22565b60006115f07f000000000000000000000000000000000000000000000000000000000000000083612353565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861162b989097969101612441565b604051602081830303815290604052805190602001209050919050565b6007546001600160a01b0316331461165f57600080fd5b6007546001600160a01b031633146116b95760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161172e5761172e612320565b040311156117715760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b61177a816115f6565b600083815260026020526040902054146117a65760405162461bcd60e51b81526004016106a7906122cf565b60c08101516001600160a01b0316156117f85760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b60015482111561184057600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611850816115f6565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816118b9576118b9612320565b0403116118fa5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611903816115f6565b6000838152600260205260409020541461192f5760405162461bcd60e51b81526004016106a7906122cf565b60008160a0015160028111156119475761194761229f565b146119865760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b0316611a0a5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611a1e826115f6565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ac557611ac5612320565b040311611b065760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611b0f816115f6565b60008381526002602052604090205414611b3b5760405162461bcd60e51b81526004016106a7906122cf565b60008160a001516002811115611b5357611b5361229f565b14611b925760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611c175760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611a1e826115f6565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015611c8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611caf9190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611cec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d109190612388565b5092505050600454811115611d5a5760048190556040518181527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a150565b600454811015611e1c5760065415611dce5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527f08b771dddc6449625c7cd99bccdaf915b9c891fb6fa03695a71175b69e376ebb910160405180910390a15b50565b6000816060015163ffffffff16600003611e3b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7757506003919050565b6000600c836060015163ffffffff16420381611e9557611e95612320565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ed95760019250611ede565b600092505b50505b919050565b611ef08282610e2e565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f378382611519565b63ffffffff428116606083015243166080820152611f5583826116db565b600160a0820152610bd38382611395565b6001600160a01b0381168114611e1c57600080fd5b8035611ee181611f66565b803563ffffffff81168114611ee157600080fd5b803560038110611ee157600080fd5b600060e08284031215611fbb57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fec57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200260208401611f7b565b602082015261201360408401611f86565b604082015261202460608401611f86565b606082015261203560808401611f86565b608082015261204660a08401611f9a565b60a082015261205760c08401611f7b565b60c08201525092915050565b600080610100838503121561207757600080fd5b823591506120888460208501611fa9565b90509250929050565b600080600061012084860312156120a757600080fd5b83359250602084013591506120bf8560408601611fa9565b90509250925092565b6000602082840312156120da57600080fd5b5035919050565b600080604083850312156120f457600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee157600080fd5b60008083601f84011261212d57600080fd5b50813567ffffffffffffffff81111561214557600080fd5b60208301915083602082850101111561215d57600080fd5b9250929050565b6000806000806000806080878903121561217d57600080fd5b863567ffffffffffffffff8082111561219557600080fd5b818901915089601f8301126121a957600080fd5b8135818111156121b857600080fd5b8a60208260051b85010111156121cd57600080fd5b602083019850809750506121e360208a01612103565b95506121f160408a01611f7b565b9450606089013591508082111561220757600080fd5b5061221489828a0161211b565b979a9699509497509295939492505050565b60008082840361010081121561223b57600080fd5b8335925060e0601f198201121561225157600080fd5b506020830190509250929050565b600060e0828403121561227157600080fd5b61227b8383611fa9565b9392505050565b60006020828403121561229457600080fd5b813561227b81611f66565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122c9576122c961229f565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156115f0576115f06122f7565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561234857600080fd5b815161227b81611f66565b60008261237057634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156115f0576115f06122f7565b6000806000806080858703121561239e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561243857600080fd5b61227b82611f9a565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124995761249961229f565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220deeffe1347d1160c62da9e56119a5cfb5e8e519e5e4f73d5390c93582172c2f464736f6c63430008120033", + "numDeployments": 9, + "solcInputHash": "ad697f618f73759e1d99ca054913682f", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEthDevnet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_bridge\":\"The address of the Arbitrum bridge contract on Ethereum.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEthDevnet\":\"The address of the devnet vea inbox on Arbitrum to Ethereum.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":\"VeaOutboxArbToEthDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updatesequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(sequencerDelayLimitDecreaseRequest.timestamp == 0, \\\"Sequencer limit decrease request already pending.\\\");\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x8f3df1a06a21ec21f29c96de33c71aa5e51c30719998bc33f9b774325329311e\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToEth/VeaOutboxArbToEth.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Goerli.\\n/// Note: This contract is deployed on Goerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEthDevnet The address of the devnet vea inbox on Arbitrum to Ethereum.\\n /// @param _bridge The address of the Arbitrum bridge contract on Ethereum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEthDevnet,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n )\\n VeaOutboxArbToEth(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _veaInboxArbToEthDevnet,\\n _bridge,\\n _maxMissingBlocks\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xc790ada101869ca355f7e5f35d7480741189082573634b34c0a4464c69e043dd\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002a4438038062002a448339810160408190526200003591620002ee565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190528686868686868662000076620000ee565b620000836002886200036c565b60e0819052620000958860026200038f565b620000a19190620003af565b6101005261012051600190620000b890426200036c565b620000c49190620003af565b6001555050600780546001600160a01b0319163317905550620004219a5050505050505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000131573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001579190620003c5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000195573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001bb9190620003ea565b5092505050600454811115620002065760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ce5760065415620002805760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002e957600080fd5b919050565b600080600080600080600060e0888a0312156200030a57600080fd5b875196506020880151955060408801519450606088015193506200033160808901620002d1565b92506200034160a08901620002d1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200038a57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620003a957620003a962000356565b92915050565b81810381811115620003a957620003a962000356565b600060208284031215620003d857600080fd5b620003e382620002d1565b9392505050565b600080600080608085870312156200040157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516124f56200054f600039600081816104a10152611ea90152600081816104d5015281816108b2015281816116b40152818161183f0152611c6801526000818161055d0152611e3d015260008181610509015281816108d601528181610bdf015281816113ae015281816116d8015281816118630152611c8c015260008181611133015261126c0152600081816110e001526112240152600081816105a6015281816106b2015281816108390152818161086601528181610c22015281816112bc015281816119a901528181611a100152611dd301526000818161039d01526109c001526000818161062701528181610951015281816109ea015281816114c20152611b5501526124f56000f3fe6080604052600436106101e35760003560e01c806390784ae811610102578063c2114a1611610095578063df19e6ff11610064578063df19e6ff146105e8578063e78cea9214610615578063e813a75514610649578063eedcf2a91461065f57600080fd5b8063c2114a161461054b578063cb9384681461057f578063d0e30db014610594578063da2b7bc4146105c857600080fd5b8063aa22a1c6116100d1578063aa22a1c61461048f578063b044397e146104c3578063b5b7a184146104f7578063b633b9441461052b57600080fd5b806390784ae81461041757806390df63b71461042c578063930f28af146104595780639588eca21461047957600080fd5b80633ce43cfd1161017a578063541adcca11610149578063541adcca1461036b57806369cd250d1461038b5780638a619a71146103d75780638ad3a8f7146103f757600080fd5b80633ce43cfd146102eb5780634788cb381461030b57806349b4299e1461032b5780634a439cfe1461034b57600080fd5b80632639c060116101b65780632639c0601461027557806327ee6bdd146102a257806331d14457146102b857806331ddf743146102cb57600080fd5b806301139b68146101e8578063051d1970146101fd5780630f0adca514610232578063222ae78614610252575b600080fd5b6101fb6101f6366004612063565b610672565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb61024d366004612091565b6108b0565b34801561025e57600080fd5b50610267610bd8565b604051908152602001610229565b34801561028157600080fd5b506102676102903660046120c8565b60026020526000908152604090205481565b3480156102ae57600080fd5b5061026760015481565b6101fb6102c63660046120e1565b610c09565b3480156102d757600080fd5b506101fb6102e6366004612164565b610d89565b3480156102f757600080fd5b506101fb610306366004612226565b611029565b34801561031757600080fd5b506101fb610326366004612063565b611170565b34801561033757600080fd5b506101fb610346366004612063565b6112f4565b34801561035757600080fd5b506102676103663660046120c8565b6113a7565b34801561037757600080fd5b5061026761038636600461225f565b6113d9565b34801561039757600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b3480156103e357600080fd5b506101fb6103f2366004612282565b61142b565b34801561040357600080fd5b506007546103bf906001600160a01b031681565b34801561042357600080fd5b506101fb6114be565b34801561043857600080fd5b506102676104473660046120c8565b60036020526000908152604090205481565b34801561046557600080fd5b506101fb610474366004612063565b6116b2565b34801561048557600080fd5b5061026760005481565b34801561049b57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cf57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561050357600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561053757600080fd5b506101fb610546366004612063565b61183d565b34801561055757600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561058b57600080fd5b506101fb611a49565b3480156105a057600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d457600080fd5b506101fb6105e3366004612063565b611c66565b3480156105f457600080fd5b5061060861060336600461225f565b611e1f565b60405161022991906122b5565b34801561062157600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b34801561065557600080fd5b5061026760045481565b6101fb61066d3660046120e1565b611ee6565b61067b816113d9565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122cf565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a0015160028111156107935761079361229f565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816113d9565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f00000000000000000000000000000000000000000000000000000000000000003461230d565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090357610903612320565b040311156109465760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109be5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612336565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612336565b6001600160a01b031614610b1a5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610b2a57508115155b15610b6d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b76816113d9565b60008481526002602052604090205403610bd3578051829003610b9f57600160a0820152610bba565b60c08101516001600160a01b031615610bba57600260a08201525b610bc3816113d9565b6000848152600260205260409020555b505050565b6000610c047f000000000000000000000000000000000000000000000000000000000000000042612353565b905090565b6007546001600160a01b03163314610c2057600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610c905760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610cad5760405162461bcd60e51b81526004016106a7906122cf565b60008281526002602052604090205415610cff5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610d45906113d9565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161082f565b60408510610dcb5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b600084848484604051602001610de49493929190612375565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610e64576000888883818110610e2657610e266123b7565b90506020020135905082811115610e4b57826000528060205260406000209250610e5b565b8060005282602052604060002092505b50600101610e0a565b508060005414610ea75760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f1c5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610f4c90899089906123cd565b6000604051808303816000865af19150503d8060008114610f89576040519150601f19603f3d011682016040523d82523d6000602084013e610f8e565b606091505b5050905080610fdf5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61103b6103863683900383018361225f565b600083815260026020526040902054146110675760405162461bcd60e51b81526004016106a7906122cf565b600261107960c0830160a084016123dd565b600281111561108a5761108a61229f565b146110cb5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061112593505060e0840191505060c08301612282565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611179816113d9565b600083815260026020526040902054146111a55760405162461bcd60e51b81526004016106a7906122cf565b60018160a0015160028111156111bd576111bd61229f565b146111fa5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156112a6576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461130b57600080fd5b611314816113d9565b600083815260026020526040902054146113405760405162461bcd60e51b81526004016106a7906122cf565b63ffffffff42811660608301524316608082015261135d816113d9565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691015b60405180910390a15050565b60006113d37f000000000000000000000000000000000000000000000000000000000000000083612353565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861140e9890979691016123f8565b604051602081830303815290604052805190602001209050919050565b6007546001600160a01b0316331461144257600080fd5b6007546001600160a01b0316331461149c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561151e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115429190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561157f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a39190612476565b50925050506004548111156115ed5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156116af57600654156116615760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161170557611705612320565b040311156117485760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b611751816113d9565b6000838152600260205260409020541461177d5760405162461bcd60e51b81526004016106a7906122cf565b60c08101516001600160a01b0316156117cf5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b60015482111561181757600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611827816113d9565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161189057611890612320565b0403116118d15760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b6118da816113d9565b600083815260026020526040902054146119065760405162461bcd60e51b81526004016106a7906122cf565b60008160a00151600281111561191e5761191e61229f565b1461195d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b03166119e15760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c08101805160009091526119f5826113d9565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611ab05760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b600454600654611ac091906124ac565b4211611b295760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611ba0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc49190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c259190612476565b50925050508181036108ac5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200161139b565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cb957611cb9612320565b040311611cfa5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611d03816113d9565b60008381526002602052604090205414611d2f5760405162461bcd60e51b81526004016106a7906122cf565b60008160a001516002811115611d4757611d4761229f565b14611d865760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611e0b5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60208101805160009091526119f5826113d9565b6000816060015163ffffffff16600003611e3b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7757506003919050565b6000600c836060015163ffffffff16420381611e9557611e95612320565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ed95760019250611ede565b600092505b50505b919050565b611ef08282610c09565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f3783826112f4565b63ffffffff428116606083015243166080820152611f5583826116b2565b600160a0820152610bd38382611170565b6001600160a01b03811681146116af57600080fd5b8035611ee181611f66565b803563ffffffff81168114611ee157600080fd5b803560038110611ee157600080fd5b600060e08284031215611fbb57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fec57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200260208401611f7b565b602082015261201360408401611f86565b604082015261202460608401611f86565b606082015261203560808401611f86565b608082015261204660a08401611f9a565b60a082015261205760c08401611f7b565b60c08201525092915050565b600080610100838503121561207757600080fd5b823591506120888460208501611fa9565b90509250929050565b600080600061012084860312156120a757600080fd5b83359250602084013591506120bf8560408601611fa9565b90509250925092565b6000602082840312156120da57600080fd5b5035919050565b600080604083850312156120f457600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee157600080fd5b60008083601f84011261212d57600080fd5b50813567ffffffffffffffff81111561214557600080fd5b60208301915083602082850101111561215d57600080fd5b9250929050565b6000806000806000806080878903121561217d57600080fd5b863567ffffffffffffffff8082111561219557600080fd5b818901915089601f8301126121a957600080fd5b8135818111156121b857600080fd5b8a60208260051b85010111156121cd57600080fd5b602083019850809750506121e360208a01612103565b95506121f160408a01611f7b565b9450606089013591508082111561220757600080fd5b5061221489828a0161211b565b979a9699509497509295939492505050565b60008082840361010081121561223b57600080fd5b8335925060e0601f198201121561225157600080fd5b506020830190509250929050565b600060e0828403121561227157600080fd5b61227b8383611fa9565b9392505050565b60006020828403121561229457600080fd5b813561227b81611f66565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122c9576122c961229f565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156113d3576113d36122f7565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561234857600080fd5b815161227b81611f66565b60008261237057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123ef57600080fd5b61227b82611f9a565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124505761245061229f565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561248c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b808201808211156113d3576113d36122f756fea2646970667358221220163003b367a00903431c564c543e1c052f2466562bdced8fb37ae821f8d6f2fe64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101e35760003560e01c806390784ae811610102578063c2114a1611610095578063df19e6ff11610064578063df19e6ff146105e8578063e78cea9214610615578063e813a75514610649578063eedcf2a91461065f57600080fd5b8063c2114a161461054b578063cb9384681461057f578063d0e30db014610594578063da2b7bc4146105c857600080fd5b8063aa22a1c6116100d1578063aa22a1c61461048f578063b044397e146104c3578063b5b7a184146104f7578063b633b9441461052b57600080fd5b806390784ae81461041757806390df63b71461042c578063930f28af146104595780639588eca21461047957600080fd5b80633ce43cfd1161017a578063541adcca11610149578063541adcca1461036b57806369cd250d1461038b5780638a619a71146103d75780638ad3a8f7146103f757600080fd5b80633ce43cfd146102eb5780634788cb381461030b57806349b4299e1461032b5780634a439cfe1461034b57600080fd5b80632639c060116101b65780632639c0601461027557806327ee6bdd146102a257806331d14457146102b857806331ddf743146102cb57600080fd5b806301139b68146101e8578063051d1970146101fd5780630f0adca514610232578063222ae78614610252575b600080fd5b6101fb6101f6366004612063565b610672565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb61024d366004612091565b6108b0565b34801561025e57600080fd5b50610267610bd8565b604051908152602001610229565b34801561028157600080fd5b506102676102903660046120c8565b60026020526000908152604090205481565b3480156102ae57600080fd5b5061026760015481565b6101fb6102c63660046120e1565b610c09565b3480156102d757600080fd5b506101fb6102e6366004612164565b610d89565b3480156102f757600080fd5b506101fb610306366004612226565b611029565b34801561031757600080fd5b506101fb610326366004612063565b611170565b34801561033757600080fd5b506101fb610346366004612063565b6112f4565b34801561035757600080fd5b506102676103663660046120c8565b6113a7565b34801561037757600080fd5b5061026761038636600461225f565b6113d9565b34801561039757600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b3480156103e357600080fd5b506101fb6103f2366004612282565b61142b565b34801561040357600080fd5b506007546103bf906001600160a01b031681565b34801561042357600080fd5b506101fb6114be565b34801561043857600080fd5b506102676104473660046120c8565b60036020526000908152604090205481565b34801561046557600080fd5b506101fb610474366004612063565b6116b2565b34801561048557600080fd5b5061026760005481565b34801561049b57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cf57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561050357600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561053757600080fd5b506101fb610546366004612063565b61183d565b34801561055757600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561058b57600080fd5b506101fb611a49565b3480156105a057600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d457600080fd5b506101fb6105e3366004612063565b611c66565b3480156105f457600080fd5b5061060861060336600461225f565b611e1f565b60405161022991906122b5565b34801561062157600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b34801561065557600080fd5b5061026760045481565b6101fb61066d3660046120e1565b611ee6565b61067b816113d9565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122cf565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a0015160028111156107935761079361229f565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816113d9565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f00000000000000000000000000000000000000000000000000000000000000003461230d565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090357610903612320565b040311156109465760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109be5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612336565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612336565b6001600160a01b031614610b1a5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610b2a57508115155b15610b6d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b76816113d9565b60008481526002602052604090205403610bd3578051829003610b9f57600160a0820152610bba565b60c08101516001600160a01b031615610bba57600260a08201525b610bc3816113d9565b6000848152600260205260409020555b505050565b6000610c047f000000000000000000000000000000000000000000000000000000000000000042612353565b905090565b6007546001600160a01b03163314610c2057600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610c905760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610cad5760405162461bcd60e51b81526004016106a7906122cf565b60008281526002602052604090205415610cff5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610d45906113d9565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161082f565b60408510610dcb5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b600084848484604051602001610de49493929190612375565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610e64576000888883818110610e2657610e266123b7565b90506020020135905082811115610e4b57826000528060205260406000209250610e5b565b8060005282602052604060002092505b50600101610e0a565b508060005414610ea75760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f1c5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610f4c90899089906123cd565b6000604051808303816000865af19150503d8060008114610f89576040519150601f19603f3d011682016040523d82523d6000602084013e610f8e565b606091505b5050905080610fdf5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61103b6103863683900383018361225f565b600083815260026020526040902054146110675760405162461bcd60e51b81526004016106a7906122cf565b600261107960c0830160a084016123dd565b600281111561108a5761108a61229f565b146110cb5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061112593505060e0840191505060c08301612282565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611179816113d9565b600083815260026020526040902054146111a55760405162461bcd60e51b81526004016106a7906122cf565b60018160a0015160028111156111bd576111bd61229f565b146111fa5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156112a6576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461130b57600080fd5b611314816113d9565b600083815260026020526040902054146113405760405162461bcd60e51b81526004016106a7906122cf565b63ffffffff42811660608301524316608082015261135d816113d9565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691015b60405180910390a15050565b60006113d37f000000000000000000000000000000000000000000000000000000000000000083612353565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861140e9890979691016123f8565b604051602081830303815290604052805190602001209050919050565b6007546001600160a01b0316331461144257600080fd5b6007546001600160a01b0316331461149c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561151e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115429190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561157f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a39190612476565b50925050506004548111156115ed5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156116af57600654156116615760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161170557611705612320565b040311156117485760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b611751816113d9565b6000838152600260205260409020541461177d5760405162461bcd60e51b81526004016106a7906122cf565b60c08101516001600160a01b0316156117cf5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b60015482111561181757600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611827816113d9565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161189057611890612320565b0403116118d15760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b6118da816113d9565b600083815260026020526040902054146119065760405162461bcd60e51b81526004016106a7906122cf565b60008160a00151600281111561191e5761191e61229f565b1461195d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b03166119e15760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c08101805160009091526119f5826113d9565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611ab05760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b600454600654611ac091906124ac565b4211611b295760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611ba0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc49190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c259190612476565b50925050508181036108ac5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200161139b565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cb957611cb9612320565b040311611cfa5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611d03816113d9565b60008381526002602052604090205414611d2f5760405162461bcd60e51b81526004016106a7906122cf565b60008160a001516002811115611d4757611d4761229f565b14611d865760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611e0b5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60208101805160009091526119f5826113d9565b6000816060015163ffffffff16600003611e3b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7757506003919050565b6000600c836060015163ffffffff16420381611e9557611e95612320565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ed95760019250611ede565b600092505b50505b919050565b611ef08282610c09565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f3783826112f4565b63ffffffff428116606083015243166080820152611f5583826116b2565b600160a0820152610bd38382611170565b6001600160a01b03811681146116af57600080fd5b8035611ee181611f66565b803563ffffffff81168114611ee157600080fd5b803560038110611ee157600080fd5b600060e08284031215611fbb57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fec57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200260208401611f7b565b602082015261201360408401611f86565b604082015261202460608401611f86565b606082015261203560808401611f86565b608082015261204660a08401611f9a565b60a082015261205760c08401611f7b565b60c08201525092915050565b600080610100838503121561207757600080fd5b823591506120888460208501611fa9565b90509250929050565b600080600061012084860312156120a757600080fd5b83359250602084013591506120bf8560408601611fa9565b90509250925092565b6000602082840312156120da57600080fd5b5035919050565b600080604083850312156120f457600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee157600080fd5b60008083601f84011261212d57600080fd5b50813567ffffffffffffffff81111561214557600080fd5b60208301915083602082850101111561215d57600080fd5b9250929050565b6000806000806000806080878903121561217d57600080fd5b863567ffffffffffffffff8082111561219557600080fd5b818901915089601f8301126121a957600080fd5b8135818111156121b857600080fd5b8a60208260051b85010111156121cd57600080fd5b602083019850809750506121e360208a01612103565b95506121f160408a01611f7b565b9450606089013591508082111561220757600080fd5b5061221489828a0161211b565b979a9699509497509295939492505050565b60008082840361010081121561223b57600080fd5b8335925060e0601f198201121561225157600080fd5b506020830190509250929050565b600060e0828403121561227157600080fd5b61227b8383611fa9565b9392505050565b60006020828403121561229457600080fd5b813561227b81611f66565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122c9576122c961229f565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156113d3576113d36122f7565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561234857600080fd5b815161227b81611f66565b60008261237057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123ef57600080fd5b61227b82611f9a565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124505761245061229f565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561248c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b808201808211156113d3576113d36122f756fea2646970667358221220163003b367a00903431c564c543e1c052f2466562bdced8fb37ae821f8d6f2fe64736f6c63430008120033", "devdoc": { "details": "Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).", "events": { @@ -1091,18 +1091,6 @@ "_msgId": "The msgId of the message that was relayed." } }, - "SequencerLimitDecreaseRequested(uint256)": { - "details": "This event indicates that a request to decrease the sequencer limit has been made.", - "params": { - "_requestedSequencerLimit": "The new sequencer limit requested." - } - }, - "SequencerLimitUpdated(uint256)": { - "details": "This event indicates the sequencer limit updated.", - "params": { - "_newSequencerLimit": "The new maxL2StateSyncDelay." - } - }, "VerificationStarted(uint256)": { "details": "This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.", "params": { @@ -1114,6 +1102,18 @@ "params": { "_epoch": "The epoch that was verified." } + }, + "sequencerDelayLimitDecreaseRequested(uint256)": { + "details": "This event indicates that a request to decrease the sequencer limit has been made.", + "params": { + "_requestedsequencerDelayLimit": "The new sequencer limit requested." + } + }, + "sequencerDelayLimitUpdated(uint256)": { + "details": "This event indicates the sequencer limit updated.", + "params": { + "_newsequencerDelayLimit": "The new maxL2StateSyncDelay." + } } }, "kind": "dev", @@ -1178,8 +1178,8 @@ "epoch": "The hash of the claim." } }, - "executeSequencerLimitDecreaseRequest()": { - "details": "execute SequencerLimitDecreaseRequest" + "executesequencerDelayLimitDecreaseRequest()": { + "details": "execute sequencerDelayLimitDecreaseRequest" }, "hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Hashes the claim.", @@ -1214,8 +1214,8 @@ "_epoch": "The epoch of the claim to challenge." } }, - "updateSequencerLimit()": { - "details": "Request to decrease the sequencerLimit." + "updatesequencerDelayLimit()": { + "details": "Request to decrease the sequencerDelayLimit." }, "verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Resolves the optimistic claim for '_epoch'.", @@ -1267,7 +1267,7 @@ "storageLayout": { "storage": [ { - "astId": 437, + "astId": 430, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "stateRoot", "offset": 0, @@ -1275,7 +1275,7 @@ "type": "t_bytes32" }, { - "astId": 439, + "astId": 432, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "latestVerifiedEpoch", "offset": 0, @@ -1283,7 +1283,7 @@ "type": "t_uint256" }, { - "astId": 443, + "astId": 436, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "claimHashes", "offset": 0, @@ -1291,7 +1291,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 447, + "astId": 440, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "relayed", "offset": 0, @@ -1299,23 +1299,23 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 449, + "astId": 442, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", - "label": "sequencerLimit", + "label": "sequencerDelayLimit", "offset": 0, "slot": "4", "type": "t_uint256" }, { - "astId": 452, + "astId": 445, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", - "label": "sequencerLimitDecreaseRequest", + "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "5", - "type": "t_struct(SequencerLimitDecreaseRequest)457_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)450_storage" }, { - "astId": 3974, + "astId": 5449, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "devnetOperator", "offset": 0, @@ -1341,20 +1341,20 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_struct(SequencerLimitDecreaseRequest)457_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)450_storage": { "encoding": "inplace", - "label": "struct VeaOutboxArbToEth.SequencerLimitDecreaseRequest", + "label": "struct VeaOutboxArbToEth.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 454, + "astId": 447, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", - "label": "requestedSequencerLimit", + "label": "requestedsequencerDelayLimit", "offset": 0, "slot": "0", "type": "t_uint256" }, { - "astId": 456, + "astId": 449, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json b/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json index 81692378..dd0f06d3 100644 --- a/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json +++ b/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x9cF5c011e2A4CB7797413f311A35AcB021071c35", + "address": "0x2D2D210Bb504D4F8C226f780129a974C7CD56Ea0", "abi": [ { "inputs": [ @@ -99,11 +99,11 @@ { "indexed": false, "internalType": "uint256", - "name": "_requestedSequencerLimit", + "name": "_epoch", "type": "uint256" } ], - "name": "SequencerLimitDecreaseRequested", + "name": "VerificationStarted", "type": "event" }, { @@ -112,11 +112,11 @@ { "indexed": false, "internalType": "uint256", - "name": "_newSequencerLimit", + "name": "_epoch", "type": "uint256" } ], - "name": "SequencerLimitUpdated", + "name": "Verified", "type": "event" }, { @@ -125,11 +125,11 @@ { "indexed": false, "internalType": "uint256", - "name": "_epoch", + "name": "_requestedsequencerDelayLimit", "type": "uint256" } ], - "name": "VerificationStarted", + "name": "sequencerDelayLimitDecreaseRequested", "type": "event" }, { @@ -138,11 +138,11 @@ { "indexed": false, "internalType": "uint256", - "name": "_epoch", + "name": "_newsequencerDelayLimit", "type": "uint256" } ], - "name": "Verified", + "name": "sequencerDelayLimitUpdated", "type": "event" }, { @@ -366,7 +366,7 @@ }, { "inputs": [], - "name": "executeSequencerLimitDecreaseRequest", + "name": "executesequencerDelayLimitDecreaseRequest", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -575,7 +575,7 @@ }, { "inputs": [], - "name": "sequencerLimit", + "name": "sequencerDelayLimit", "outputs": [ { "internalType": "uint256", @@ -588,11 +588,11 @@ }, { "inputs": [], - "name": "sequencerLimitDecreaseRequest", + "name": "sequencerDelayLimitDecreaseRequest", "outputs": [ { "internalType": "uint256", - "name": "requestedSequencerLimit", + "name": "requestedsequencerDelayLimit", "type": "uint256" }, { @@ -687,7 +687,7 @@ }, { "inputs": [], - "name": "updateSequencerLimit", + "name": "updatesequencerDelayLimit", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -981,32 +981,32 @@ "type": "function" } ], - "transactionHash": "0xeca2566e580428b02088fc385aadf58ed9920fe21f2af39dc7de30ba32eed346", + "transactionHash": "0x5a27b40302efe07e17ee812baaeb9e4d0d3b29a09eb09dc17111e131811c060b", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x9cF5c011e2A4CB7797413f311A35AcB021071c35", - "transactionIndex": 61, - "gasUsed": "2236960", - "logsBloom": "0x00000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000012000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000", - "blockHash": "0xb5e35df11b606251c8cfa5368043cac7e874a2513f650c504cf0255940352b46", - "transactionHash": "0xeca2566e580428b02088fc385aadf58ed9920fe21f2af39dc7de30ba32eed346", + "contractAddress": "0x2D2D210Bb504D4F8C226f780129a974C7CD56Ea0", + "transactionIndex": 11, + "gasUsed": "2236936", + "logsBloom": "0x00000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000400000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2d7ba708a88d45c0ba9c503deae35e7cc02b0ec44bdb66b0b6f36588e070bd0e", + "transactionHash": "0x5a27b40302efe07e17ee812baaeb9e4d0d3b29a09eb09dc17111e131811c060b", "logs": [ { - "transactionIndex": 61, - "blockNumber": 9182226, - "transactionHash": "0xeca2566e580428b02088fc385aadf58ed9920fe21f2af39dc7de30ba32eed346", - "address": "0x9cF5c011e2A4CB7797413f311A35AcB021071c35", + "transactionIndex": 11, + "blockNumber": 9186597, + "transactionHash": "0x5a27b40302efe07e17ee812baaeb9e4d0d3b29a09eb09dc17111e131811c060b", + "address": "0x2D2D210Bb504D4F8C226f780129a974C7CD56Ea0", "topics": [ - "0x5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c" + "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 193, - "blockHash": "0xb5e35df11b606251c8cfa5368043cac7e874a2513f650c504cf0255940352b46" + "logIndex": 14, + "blockHash": "0x2d7ba708a88d45c0ba9c503deae35e7cc02b0ec44bdb66b0b6f36588e070bd0e" } ], - "blockNumber": 9182226, - "cumulativeGasUsed": "12032235", + "blockNumber": 9186597, + "cumulativeGasUsed": "3188923", "status": 1, "byzantium": true }, @@ -1015,15 +1015,15 @@ 3600, 10800, 1000000, - "0x8893441F219e2836D9c7E1c727CDA9ACFF84D069", + "0x7B6D027DC9e838E98258c2A77877De59B7F5a350", "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", 1000000 ], - "numDeployments": 4, - "solcInputHash": "c9836c6cb024801f3104e49f87086294", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"SequencerLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerLimit\",\"type\":\"uint256\"}],\"name\":\"SequencerLimitUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"SequencerLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerLimit\":\"The new sequencer limit requested.\"}},\"SequencerLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerLimit\":\"The new maxL2StateSyncDelay.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEth\":\"The address of the inbox contract on Arbitrum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executeSequencerLimitDecreaseRequest()\":{\"details\":\"execute SequencerLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerLimit()\":{\"details\":\"Request to decrease the sequencerLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":\"VeaOutboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerLimitDecreaseRequest; // Decreasing the sequencerLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerLimit The new maxL2StateSyncDelay.\\n event SequencerLimitUpdated(uint256 _newSequencerLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerLimit The new sequencer limit requested.\\n event SequencerLimitDecreaseRequested(uint256 _requestedSequencerLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updateSequencerLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerLimit.\\n function updateSequencerLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerLimit > sequencerLimit) {\\n // For sequencerLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerLimit = newSequencerLimit;\\n emit SequencerLimitUpdated(newSequencerLimit);\\n } else if (newSequencerLimit < sequencerLimit) {\\n require(sequencerLimitDecreaseRequest.timestamp == 0, \\\"Sequencer limit decrease request already pending.\\\");\\n\\n sequencerLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerLimit, \\n timestamp: block.timestamp\\n });\\n\\n emit SequencerLimitDecreaseRequested(newSequencerLimit);\\n }\\n }\\n\\n /// @dev execute SequencerLimitDecreaseRequest\\n function executeSequencerLimitDecreaseRequest() external {\\n require(sequencerLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerLimitDecreaseRequest.timestamp + sequencerLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerLimit = sequencerLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerLimit == requestedSequencerLimit) {\\n sequencerLimit = requestedSequencerLimit;\\n emit SequencerLimitUpdated(requestedSequencerLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerLimit) {\\n // Allow claims to be made within the sequencerLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x1a7affa8f2ca1bf2ef5b7c57a5a07215282875209008f7dceee9eecfa4906db3\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002b2e38038062002b2e8339810160408190526200003591620002ce565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190526200006f620000ce565b6200007c6002886200034c565b60e08190526200008e8860026200036f565b6200009a91906200038f565b6101005261012051600190620000b190426200034c565b620000bd91906200038f565b600155506200040195505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000111573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001379190620003a5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200019b9190620003ca565b5092505050600454811115620001e65760048190556040518181527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a150565b600454811015620002ae5760065415620002605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527f08b771dddc6449625c7cd99bccdaf915b9c891fb6fa03695a71175b69e376ebb910160405180910390a15b50565b80516001600160a01b0381168114620002c957600080fd5b919050565b600080600080600080600060e0888a031215620002ea57600080fd5b875196506020880151955060408801519450606088015193506200031160808901620002b1565b92506200032160a08901620002b1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200036a57634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000389576200038962000336565b92915050565b8181038181111562000389576200038962000336565b600060208284031215620003b857600080fd5b620003c382620002b1565b9392505050565b60008060008060808587031215620003e157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516125f16200053d60003960008181610426015261202501526000818161045a0152818161083e015281816117f0015281816119e40152611bf00152600081816104e20152611fb901526000818161048e0152818161086201528181610b6b01528181610e2b01528181610eb3015281816115b7015281816117710152818161181401528181611a080152611c14015260006113ce01526000818161137b01526114e00152600081816105160152818161063e015281816107c5015281816107f201528181610dbb0152818161154301528181611b4e01528181611bb50152611d5b015260008181610361015261094c0152600081816105dc015281816108dd0152818161097601528181610ca10152611dab01526125f16000f3fe6080604052600436106101c25760003560e01c806390df63b7116100f7578063b633b94411610095578063da456a0e11610064578063da456a0e14610558578063dd5fdeaa14610588578063df19e6ff1461059d578063e78cea92146105ca57600080fd5b8063b633b944146104b0578063c2114a16146104d0578063d0e30db014610504578063da2b7bc41461053857600080fd5b80639c13b6b5116100d15780639c13b6b5146103fe578063aa22a1c614610414578063b044397e14610448578063b5b7a1841461047c57600080fd5b806390df63b71461039b578063930f28af146103c85780639588eca2146103e857600080fd5b806331ddf7431161016457806349b4299e1161013e57806349b4299e146102ef5780634a439cfe1461030f578063541adcca1461032f57806369cd250d1461034f57600080fd5b806331ddf7431461028f5780633ce43cfd146102af5780634788cb38146102cf57600080fd5b806325a2acb1116101a057806325a2acb1146102245780632639c0601461023957806327ee6bdd1461026657806331d144571461027c57600080fd5b806301139b68146101c75780630f0adca5146101dc578063222ae786146101fc575b600080fd5b6101da6101d536600461215f565b6105fe565b005b3480156101e857600080fd5b506101da6101f736600461218d565b61083c565b34801561020857600080fd5b50610211610b64565b6040519081526020015b60405180910390f35b34801561023057600080fd5b506101da610b95565b34801561024557600080fd5b506102116102543660046121c4565b60026020526000908152604090205481565b34801561027257600080fd5b5061021160015481565b6101da61028a3660046121dd565b610db9565b34801561029b57600080fd5b506101da6102aa366004612260565b611024565b3480156102bb57600080fd5b506101da6102ca366004612322565b6112c4565b3480156102db57600080fd5b506101da6102ea366004612322565b61140b565b3480156102fb57600080fd5b506101da61030a36600461215f565b611580565b34801561031b57600080fd5b5061021161032a3660046121c4565b61176a565b34801561033b57600080fd5b5061021161034a36600461235b565b61179c565b34801561035b57600080fd5b506103837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161021b565b3480156103a757600080fd5b506102116103b63660046121c4565b60036020526000908152604090205481565b3480156103d457600080fd5b506101da6103e336600461215f565b6117ee565b3480156103f457600080fd5b5061021160005481565b34801561040a57600080fd5b5061021160045481565b34801561042057600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b34801561045457600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b34801561048857600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b3480156104bc57600080fd5b506101da6104cb36600461215f565b6119e2565b3480156104dc57600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b34801561051057600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b34801561054457600080fd5b506101da61055336600461215f565b611bee565b34801561056457600080fd5b50600554600654610573919082565b6040805192835260208301919091520161021b565b34801561059457600080fd5b506101da611da7565b3480156105a957600080fd5b506105bd6105b836600461235b565b611f9b565b60405161021b9190612394565b3480156105d657600080fd5b506103837f000000000000000000000000000000000000000000000000000000000000000081565b6106078161179c565b6000838152600260205260409020541461063c5760405162461bcd60e51b8152600401610633906123ae565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f61237e565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b8161179c565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f0000000000000000000000000000000000000000000000000000000000000000346123ec565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161088f5761088f6123ff565b040311156108d25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461094a5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f69190612415565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a579190612415565b6001600160a01b031614610aa65760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610ab657508115155b15610af957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b028161179c565b60008481526002602052604090205403610b5f578051829003610b2b57600160a0820152610b46565b60c08101516001600160a01b031615610b4657600260a08201525b610b4f8161179c565b6000848152600260205260409020555b505050565b6000610b907f000000000000000000000000000000000000000000000000000000000000000042612432565b905090565b600654600003610bfc5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b600454600654610c0c9190612454565b4211610c755760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610cec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d109190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610d4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d719190612467565b50925050508181036108385760048290556040518281527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a15050565b7f0000000000000000000000000000000000000000000000000000000000000000341015610e295760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000004281610e5857610e586123ff565b048210610ea75760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b600454421115610f2b577f0000000000000000000000000000000000000000000000000000000000000000600454420381610ee457610ee46123ff565b04826001011015610f2b5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610633565b80610f485760405162461bcd60e51b8152600401610633906123ae565b60008281526002602052604090205415610f9a5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610fe09061179c565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107bb565b604085106110665760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b60008484848460405160200161107f949392919061249d565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156110ff5760008888838181106110c1576110c16124df565b905060200201359050828111156110e6578260005280602052604060002092506110f6565b8060005282602052604060002092505b506001016110a5565b5080600054146111425760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156111b75760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b038916906111e790899089906124f5565b6000604051808303816000865af19150503d8060008114611224576040519150601f19603f3d011682016040523d82523d6000602084013e611229565b606091505b505090508061127a5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6112d661034a3683900383018361235b565b600083815260026020526040902054146113025760405162461bcd60e51b8152600401610633906123ae565b600261131460c0830160a08401612505565b60028111156113255761132561237e565b146113665760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506113c093505060e0840191505060c08301612520565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61141d61034a3683900383018361235b565b600083815260026020526040902054146114495760405162461bcd60e51b8152600401610633906123ae565b600161145b60c0830160a08401612505565b600281111561146c5761146c61237e565b146114a95760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b60008281526002602052604081208190556114ca60e0830160c08401612520565b6001600160a01b031614611525576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506113c09350506040840191505060208301612520565b6115356040820160208301612520565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6115898161179c565b600083815260026020526040902054146115b55760405162461bcd60e51b8152600401610633906123ae565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166115ee9190612454565b6115f89190612454565b42101561165c5760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b600061166782611f9b565b9050600281600381111561167d5761167d61237e565b148061169a575060008160038111156116985761169861237e565b145b6117035760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526117208261179c565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006117967f000000000000000000000000000000000000000000000000000000000000000083612432565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986117d198909796910161253d565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611841576118416123ff565b040311156118845760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b61188d8161179c565b600083815260026020526040902054146118b95760405162461bcd60e51b8152600401610633906123ae565b60c08101516001600160a01b03161561190b5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b600161191682611f9b565b60038111156119275761192761237e565b146119745760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b6001548211156119bc57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a08201526119cc8161179c565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a3557611a356123ff565b040311611a765760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611a7f8161179c565b60008381526002602052604090205414611aab5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ac357611ac361237e565b14611b025760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611b865760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b9a8261179c565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c4157611c416123ff565b040311611c825760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611c8b8161179c565b60008381526002602052604090205414611cb75760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ccf57611ccf61237e565b14611d0e5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611d935760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b9a8261179c565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2b9190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611e68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e8c9190612467565b5092505050600454811115611ed65760048190556040518181527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a150565b600454811015611f985760065415611f4a5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527f08b771dddc6449625c7cd99bccdaf915b9c891fb6fa03695a71175b69e376ebb910160405180910390a15b50565b6000816060015163ffffffff16600003611fb757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611ff357506003919050565b6000600c836060015163ffffffff16420381612011576120116123ff565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612055576001925061205a565b600092505b50505b919050565b6001600160a01b0381168114611f9857600080fd5b803561205d81612062565b803563ffffffff8116811461205d57600080fd5b80356003811061205d57600080fd5b600060e082840312156120b757600080fd5b60405160e0810181811067ffffffffffffffff821117156120e857634e487b7160e01b600052604160045260246000fd5b604052823581529050806120fe60208401612077565b602082015261210f60408401612082565b604082015261212060608401612082565b606082015261213160808401612082565b608082015261214260a08401612096565b60a082015261215360c08401612077565b60c08201525092915050565b600080610100838503121561217357600080fd5b8235915061218484602085016120a5565b90509250929050565b600080600061012084860312156121a357600080fd5b83359250602084013591506121bb85604086016120a5565b90509250925092565b6000602082840312156121d657600080fd5b5035919050565b600080604083850312156121f057600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461205d57600080fd5b60008083601f84011261222957600080fd5b50813567ffffffffffffffff81111561224157600080fd5b60208301915083602082850101111561225957600080fd5b9250929050565b6000806000806000806080878903121561227957600080fd5b863567ffffffffffffffff8082111561229157600080fd5b818901915089601f8301126122a557600080fd5b8135818111156122b457600080fd5b8a60208260051b85010111156122c957600080fd5b602083019850809750506122df60208a016121ff565b95506122ed60408a01612077565b9450606089013591508082111561230357600080fd5b5061231089828a01612217565b979a9699509497509295939492505050565b60008082840361010081121561233757600080fd5b8335925060e0601f198201121561234d57600080fd5b506020830190509250929050565b600060e0828403121561236d57600080fd5b61237783836120a5565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123a8576123a861237e565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611796576117966123d6565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561242757600080fd5b815161237781612062565b60008261244f57634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115611796576117966123d6565b6000806000806080858703121561247d57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561251757600080fd5b61237782612096565b60006020828403121561253257600080fd5b813561237781612062565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106125955761259561237e565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122093700a2c6c183d4eae9f8eb2c732ea7533c5d7603a33b7672eeea861efcd1c3564736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101c25760003560e01c806390df63b7116100f7578063b633b94411610095578063da456a0e11610064578063da456a0e14610558578063dd5fdeaa14610588578063df19e6ff1461059d578063e78cea92146105ca57600080fd5b8063b633b944146104b0578063c2114a16146104d0578063d0e30db014610504578063da2b7bc41461053857600080fd5b80639c13b6b5116100d15780639c13b6b5146103fe578063aa22a1c614610414578063b044397e14610448578063b5b7a1841461047c57600080fd5b806390df63b71461039b578063930f28af146103c85780639588eca2146103e857600080fd5b806331ddf7431161016457806349b4299e1161013e57806349b4299e146102ef5780634a439cfe1461030f578063541adcca1461032f57806369cd250d1461034f57600080fd5b806331ddf7431461028f5780633ce43cfd146102af5780634788cb38146102cf57600080fd5b806325a2acb1116101a057806325a2acb1146102245780632639c0601461023957806327ee6bdd1461026657806331d144571461027c57600080fd5b806301139b68146101c75780630f0adca5146101dc578063222ae786146101fc575b600080fd5b6101da6101d536600461215f565b6105fe565b005b3480156101e857600080fd5b506101da6101f736600461218d565b61083c565b34801561020857600080fd5b50610211610b64565b6040519081526020015b60405180910390f35b34801561023057600080fd5b506101da610b95565b34801561024557600080fd5b506102116102543660046121c4565b60026020526000908152604090205481565b34801561027257600080fd5b5061021160015481565b6101da61028a3660046121dd565b610db9565b34801561029b57600080fd5b506101da6102aa366004612260565b611024565b3480156102bb57600080fd5b506101da6102ca366004612322565b6112c4565b3480156102db57600080fd5b506101da6102ea366004612322565b61140b565b3480156102fb57600080fd5b506101da61030a36600461215f565b611580565b34801561031b57600080fd5b5061021161032a3660046121c4565b61176a565b34801561033b57600080fd5b5061021161034a36600461235b565b61179c565b34801561035b57600080fd5b506103837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161021b565b3480156103a757600080fd5b506102116103b63660046121c4565b60036020526000908152604090205481565b3480156103d457600080fd5b506101da6103e336600461215f565b6117ee565b3480156103f457600080fd5b5061021160005481565b34801561040a57600080fd5b5061021160045481565b34801561042057600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b34801561045457600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b34801561048857600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b3480156104bc57600080fd5b506101da6104cb36600461215f565b6119e2565b3480156104dc57600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b34801561051057600080fd5b506102117f000000000000000000000000000000000000000000000000000000000000000081565b34801561054457600080fd5b506101da61055336600461215f565b611bee565b34801561056457600080fd5b50600554600654610573919082565b6040805192835260208301919091520161021b565b34801561059457600080fd5b506101da611da7565b3480156105a957600080fd5b506105bd6105b836600461235b565b611f9b565b60405161021b9190612394565b3480156105d657600080fd5b506103837f000000000000000000000000000000000000000000000000000000000000000081565b6106078161179c565b6000838152600260205260409020541461063c5760405162461bcd60e51b8152600401610633906123ae565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f61237e565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b8161179c565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f0000000000000000000000000000000000000000000000000000000000000000346123ec565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161088f5761088f6123ff565b040311156108d25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461094a5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f69190612415565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a579190612415565b6001600160a01b031614610aa65760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610ab657508115155b15610af957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b028161179c565b60008481526002602052604090205403610b5f578051829003610b2b57600160a0820152610b46565b60c08101516001600160a01b031615610b4657600260a08201525b610b4f8161179c565b6000848152600260205260409020555b505050565b6000610b907f000000000000000000000000000000000000000000000000000000000000000042612432565b905090565b600654600003610bfc5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b600454600654610c0c9190612454565b4211610c755760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610cec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d109190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610d4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d719190612467565b50925050508181036108385760048290556040518281527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a15050565b7f0000000000000000000000000000000000000000000000000000000000000000341015610e295760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000004281610e5857610e586123ff565b048210610ea75760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b600454421115610f2b577f0000000000000000000000000000000000000000000000000000000000000000600454420381610ee457610ee46123ff565b04826001011015610f2b5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610633565b80610f485760405162461bcd60e51b8152600401610633906123ae565b60008281526002602052604090205415610f9a5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610fe09061179c565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107bb565b604085106110665760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b60008484848460405160200161107f949392919061249d565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156110ff5760008888838181106110c1576110c16124df565b905060200201359050828111156110e6578260005280602052604060002092506110f6565b8060005282602052604060002092505b506001016110a5565b5080600054146111425760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156111b75760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b038916906111e790899089906124f5565b6000604051808303816000865af19150503d8060008114611224576040519150601f19603f3d011682016040523d82523d6000602084013e611229565b606091505b505090508061127a5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6112d661034a3683900383018361235b565b600083815260026020526040902054146113025760405162461bcd60e51b8152600401610633906123ae565b600261131460c0830160a08401612505565b60028111156113255761132561237e565b146113665760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506113c093505060e0840191505060c08301612520565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61141d61034a3683900383018361235b565b600083815260026020526040902054146114495760405162461bcd60e51b8152600401610633906123ae565b600161145b60c0830160a08401612505565b600281111561146c5761146c61237e565b146114a95760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b60008281526002602052604081208190556114ca60e0830160c08401612520565b6001600160a01b031614611525576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506113c09350506040840191505060208301612520565b6115356040820160208301612520565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6115898161179c565b600083815260026020526040902054146115b55760405162461bcd60e51b8152600401610633906123ae565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166115ee9190612454565b6115f89190612454565b42101561165c5760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b600061166782611f9b565b9050600281600381111561167d5761167d61237e565b148061169a575060008160038111156116985761169861237e565b145b6117035760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526117208261179c565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006117967f000000000000000000000000000000000000000000000000000000000000000083612432565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986117d198909796910161253d565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611841576118416123ff565b040311156118845760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b61188d8161179c565b600083815260026020526040902054146118b95760405162461bcd60e51b8152600401610633906123ae565b60c08101516001600160a01b03161561190b5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b600161191682611f9b565b60038111156119275761192761237e565b146119745760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b6001548211156119bc57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a08201526119cc8161179c565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a3557611a356123ff565b040311611a765760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611a7f8161179c565b60008381526002602052604090205414611aab5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ac357611ac361237e565b14611b025760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611b865760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b9a8261179c565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c4157611c416123ff565b040311611c825760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611c8b8161179c565b60008381526002602052604090205414611cb75760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ccf57611ccf61237e565b14611d0e5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611d935760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b9a8261179c565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2b9190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611e68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e8c9190612467565b5092505050600454811115611ed65760048190556040518181527f5235f7b7d7d312ac3bdcf23fddb2cb8a6b24ee5de5e699d3f9f4bb8b893b408c9060200160405180910390a150565b600454811015611f985760065415611f4a5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527f08b771dddc6449625c7cd99bccdaf915b9c891fb6fa03695a71175b69e376ebb910160405180910390a15b50565b6000816060015163ffffffff16600003611fb757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611ff357506003919050565b6000600c836060015163ffffffff16420381612011576120116123ff565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612055576001925061205a565b600092505b50505b919050565b6001600160a01b0381168114611f9857600080fd5b803561205d81612062565b803563ffffffff8116811461205d57600080fd5b80356003811061205d57600080fd5b600060e082840312156120b757600080fd5b60405160e0810181811067ffffffffffffffff821117156120e857634e487b7160e01b600052604160045260246000fd5b604052823581529050806120fe60208401612077565b602082015261210f60408401612082565b604082015261212060608401612082565b606082015261213160808401612082565b608082015261214260a08401612096565b60a082015261215360c08401612077565b60c08201525092915050565b600080610100838503121561217357600080fd5b8235915061218484602085016120a5565b90509250929050565b600080600061012084860312156121a357600080fd5b83359250602084013591506121bb85604086016120a5565b90509250925092565b6000602082840312156121d657600080fd5b5035919050565b600080604083850312156121f057600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461205d57600080fd5b60008083601f84011261222957600080fd5b50813567ffffffffffffffff81111561224157600080fd5b60208301915083602082850101111561225957600080fd5b9250929050565b6000806000806000806080878903121561227957600080fd5b863567ffffffffffffffff8082111561229157600080fd5b818901915089601f8301126122a557600080fd5b8135818111156122b457600080fd5b8a60208260051b85010111156122c957600080fd5b602083019850809750506122df60208a016121ff565b95506122ed60408a01612077565b9450606089013591508082111561230357600080fd5b5061231089828a01612217565b979a9699509497509295939492505050565b60008082840361010081121561233757600080fd5b8335925060e0601f198201121561234d57600080fd5b506020830190509250929050565b600060e0828403121561236d57600080fd5b61237783836120a5565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123a8576123a861237e565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611796576117966123d6565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561242757600080fd5b815161237781612062565b60008261244f57634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115611796576117966123d6565b6000806000806080858703121561247d57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561251757600080fd5b61237782612096565b60006020828403121561253257600080fd5b813561237781612062565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106125955761259561237e565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122093700a2c6c183d4eae9f8eb2c732ea7533c5d7603a33b7672eeea861efcd1c3564736f6c63430008120033", + "numDeployments": 5, + "solcInputHash": "ad697f618f73759e1d99ca054913682f", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEth\":\"The address of the inbox contract on Arbitrum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":\"VeaOutboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updatesequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(sequencerDelayLimitDecreaseRequest.timestamp == 0, \\\"Sequencer limit decrease request already pending.\\\");\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x8f3df1a06a21ec21f29c96de33c71aa5e51c30719998bc33f9b774325329311e\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002b2e38038062002b2e8339810160408190526200003591620002ce565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190526200006f620000ce565b6200007c6002886200034c565b60e08190526200008e8860026200036f565b6200009a91906200038f565b6101005261012051600190620000b190426200034c565b620000bd91906200038f565b600155506200040195505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000111573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001379190620003a5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200019b9190620003ca565b5092505050600454811115620001e65760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ae5760065415620002605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002c957600080fd5b919050565b600080600080600080600060e0888a031215620002ea57600080fd5b875196506020880151955060408801519450606088015193506200031160808901620002b1565b92506200032160a08901620002b1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200036a57634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000389576200038962000336565b92915050565b8181038181111562000389576200038962000336565b600060208284031215620003b857600080fd5b620003c382620002b1565b9392505050565b60008060008060808587031215620003e157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516125f16200053d6000396000818161044001526120250152600081816104740152818161083e015281816117c0015281816119b40152611de40152600081816104fc0152611fb90152600081816104a80152818161086201528181610b6b01528181610c0701528181610c8f015281816113930152818161154d015281816117e4015281816119d80152611e08015260006111aa01526000818161115701526112bc0152600081816105450152818161063e015281816107c5015281816107f201528181610b970152818161131f01528181611b1e01528181611b850152611f4f01526000818161037c015261094c0152600081816105c6015281816108dd01528181610976015281816115ce0152611cca01526125f16000f3fe6080604052600436106101c25760003560e01c806390784ae8116100f7578063b633b94411610095578063da2b7bc411610064578063da2b7bc414610567578063df19e6ff14610587578063e78cea92146105b4578063e813a755146105e857600080fd5b8063b633b944146104ca578063c2114a16146104ea578063cb9384681461051e578063d0e30db01461053357600080fd5b80639588eca2116100d15780639588eca214610418578063aa22a1c61461042e578063b044397e14610462578063b5b7a1841461049657600080fd5b806390784ae8146103b657806390df63b7146103cb578063930f28af146103f857600080fd5b806331ddf7431161016457806349b4299e1161013e57806349b4299e1461030a5780634a439cfe1461032a578063541adcca1461034a57806369cd250d1461036a57600080fd5b806331ddf743146102aa5780633ce43cfd146102ca5780634788cb38146102ea57600080fd5b8063222ae786116101a0578063222ae786146102315780632639c0601461025457806327ee6bdd1461028157806331d144571461029757600080fd5b806301139b68146101c7578063051d1970146101dc5780630f0adca514610211575b600080fd5b6101da6101d536600461215f565b6105fe565b005b3480156101e857600080fd5b506005546006546101f7919082565b604080519283526020830191909152015b60405180910390f35b34801561021d57600080fd5b506101da61022c36600461218d565b61083c565b34801561023d57600080fd5b50610246610b64565b604051908152602001610208565b34801561026057600080fd5b5061024661026f3660046121c4565b60026020526000908152604090205481565b34801561028d57600080fd5b5061024660015481565b6101da6102a53660046121dd565b610b95565b3480156102b657600080fd5b506101da6102c5366004612260565b610e00565b3480156102d657600080fd5b506101da6102e5366004612322565b6110a0565b3480156102f657600080fd5b506101da610305366004612322565b6111e7565b34801561031657600080fd5b506101da61032536600461215f565b61135c565b34801561033657600080fd5b506102466103453660046121c4565b611546565b34801561035657600080fd5b5061024661036536600461235b565b611578565b34801561037657600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610208565b3480156103c257600080fd5b506101da6115ca565b3480156103d757600080fd5b506102466103e63660046121c4565b60036020526000908152604090205481565b34801561040457600080fd5b506101da61041336600461215f565b6117be565b34801561042457600080fd5b5061024660005481565b34801561043a57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561046e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a257600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d657600080fd5b506101da6104e536600461215f565b6119b2565b3480156104f657600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561052a57600080fd5b506101da611bbe565b34801561053f57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561057357600080fd5b506101da61058236600461215f565b611de2565b34801561059357600080fd5b506105a76105a236600461235b565b611f9b565b6040516102089190612394565b3480156105c057600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f457600080fd5b5061024660045481565b61060781611578565b6000838152600260205260409020541461063c5760405162461bcd60e51b8152600401610633906123ae565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f61237e565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b81611578565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f0000000000000000000000000000000000000000000000000000000000000000346123ec565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161088f5761088f6123ff565b040311156108d25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461094a5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f69190612415565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a579190612415565b6001600160a01b031614610aa65760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610ab657508115155b15610af957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b0281611578565b60008481526002602052604090205403610b5f578051829003610b2b57600160a0820152610b46565b60c08101516001600160a01b031615610b4657600260a08201525b610b4f81611578565b6000848152600260205260409020555b505050565b6000610b907f000000000000000000000000000000000000000000000000000000000000000042612432565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c055760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000004281610c3457610c346123ff565b048210610c835760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b600454421115610d07577f0000000000000000000000000000000000000000000000000000000000000000600454420381610cc057610cc06123ff565b04826001011015610d075760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610633565b80610d245760405162461bcd60e51b8152600401610633906123ae565b60008281526002602052604090205415610d765760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbc90611578565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107bb565b60408510610e425760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b600084848484604051602001610e5b9493929190612454565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610edb576000888883818110610e9d57610e9d612496565b90506020020135905082811115610ec257826000528060205260406000209250610ed2565b8060005282602052604060002092505b50600101610e81565b508060005414610f1e5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f935760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc390899089906124ac565b6000604051808303816000865af19150503d8060008114611000576040519150601f19603f3d011682016040523d82523d6000602084013e611005565b606091505b50509050806110565760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b26103653683900383018361235b565b600083815260026020526040902054146110de5760405162461bcd60e51b8152600401610633906123ae565b60026110f060c0830160a084016124bc565b60028111156111015761110161237e565b146111425760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060e0840191505060c083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f96103653683900383018361235b565b600083815260026020526040902054146112255760405162461bcd60e51b8152600401610633906123ae565b600161123760c0830160a084016124bc565b60028111156112485761124861237e565b146112855760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b60008281526002602052604081208190556112a660e0830160c084016124d7565b6001600160a01b031614611301576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060408401915050602083016124d7565b61131160408201602083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61136581611578565b600083815260026020526040902054146113915760405162461bcd60e51b8152600401610633906123ae565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166113ca91906124f4565b6113d491906124f4565b4210156114385760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b600061144382611f9b565b905060028160038111156114595761145961237e565b1480611476575060008160038111156114745761147461237e565b145b6114df5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526114fc82611578565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115727f000000000000000000000000000000000000000000000000000000000000000083612432565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986115ad989097969101612507565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561162a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164e9190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561168b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116af9190612585565b50925050506004548111156116f95760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156117bb576006541561176d5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611811576118116123ff565b040311156118545760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b61185d81611578565b600083815260026020526040902054146118895760405162461bcd60e51b8152600401610633906123ae565b60c08101516001600160a01b0316156118db5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b60016118e682611f9b565b60038111156118f7576118f761237e565b146119445760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b60015482111561198c57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261199c81611578565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a0557611a056123ff565b040311611a465760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611a4f81611578565b60008381526002602052604090205414611a7b5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611a9357611a9361237e565b14611ad25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611b565760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b6a82611578565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611c255760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b600454600654611c3591906124f4565b4211611c9e5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d399190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611d76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9a9190612585565b50925050508181036108385760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611e3557611e356123ff565b040311611e765760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611e7f81611578565b60008381526002602052604090205414611eab5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ec357611ec361237e565b14611f025760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611f875760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b6a82611578565b6000816060015163ffffffff16600003611fb757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611ff357506003919050565b6000600c836060015163ffffffff16420381612011576120116123ff565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612055576001925061205a565b600092505b50505b919050565b6001600160a01b03811681146117bb57600080fd5b803561205d81612062565b803563ffffffff8116811461205d57600080fd5b80356003811061205d57600080fd5b600060e082840312156120b757600080fd5b60405160e0810181811067ffffffffffffffff821117156120e857634e487b7160e01b600052604160045260246000fd5b604052823581529050806120fe60208401612077565b602082015261210f60408401612082565b604082015261212060608401612082565b606082015261213160808401612082565b608082015261214260a08401612096565b60a082015261215360c08401612077565b60c08201525092915050565b600080610100838503121561217357600080fd5b8235915061218484602085016120a5565b90509250929050565b600080600061012084860312156121a357600080fd5b83359250602084013591506121bb85604086016120a5565b90509250925092565b6000602082840312156121d657600080fd5b5035919050565b600080604083850312156121f057600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461205d57600080fd5b60008083601f84011261222957600080fd5b50813567ffffffffffffffff81111561224157600080fd5b60208301915083602082850101111561225957600080fd5b9250929050565b6000806000806000806080878903121561227957600080fd5b863567ffffffffffffffff8082111561229157600080fd5b818901915089601f8301126122a557600080fd5b8135818111156122b457600080fd5b8a60208260051b85010111156122c957600080fd5b602083019850809750506122df60208a016121ff565b95506122ed60408a01612077565b9450606089013591508082111561230357600080fd5b5061231089828a01612217565b979a9699509497509295939492505050565b60008082840361010081121561233757600080fd5b8335925060e0601f198201121561234d57600080fd5b506020830190509250929050565b600060e0828403121561236d57600080fd5b61237783836120a5565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123a8576123a861237e565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611572576115726123d6565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561242757600080fd5b815161237781612062565b60008261244f57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156124ce57600080fd5b61237782612096565b6000602082840312156124e957600080fd5b813561237781612062565b80820180821115611572576115726123d6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061255f5761255f61237e565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561259b57600080fd5b50508251602084015160408501516060909501519196909550909250905056fea26469706673582212203970b2e1a37c8065439bc0afeb8ebd312ac73ec70379039158f76beb9e43e35664736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101c25760003560e01c806390784ae8116100f7578063b633b94411610095578063da2b7bc411610064578063da2b7bc414610567578063df19e6ff14610587578063e78cea92146105b4578063e813a755146105e857600080fd5b8063b633b944146104ca578063c2114a16146104ea578063cb9384681461051e578063d0e30db01461053357600080fd5b80639588eca2116100d15780639588eca214610418578063aa22a1c61461042e578063b044397e14610462578063b5b7a1841461049657600080fd5b806390784ae8146103b657806390df63b7146103cb578063930f28af146103f857600080fd5b806331ddf7431161016457806349b4299e1161013e57806349b4299e1461030a5780634a439cfe1461032a578063541adcca1461034a57806369cd250d1461036a57600080fd5b806331ddf743146102aa5780633ce43cfd146102ca5780634788cb38146102ea57600080fd5b8063222ae786116101a0578063222ae786146102315780632639c0601461025457806327ee6bdd1461028157806331d144571461029757600080fd5b806301139b68146101c7578063051d1970146101dc5780630f0adca514610211575b600080fd5b6101da6101d536600461215f565b6105fe565b005b3480156101e857600080fd5b506005546006546101f7919082565b604080519283526020830191909152015b60405180910390f35b34801561021d57600080fd5b506101da61022c36600461218d565b61083c565b34801561023d57600080fd5b50610246610b64565b604051908152602001610208565b34801561026057600080fd5b5061024661026f3660046121c4565b60026020526000908152604090205481565b34801561028d57600080fd5b5061024660015481565b6101da6102a53660046121dd565b610b95565b3480156102b657600080fd5b506101da6102c5366004612260565b610e00565b3480156102d657600080fd5b506101da6102e5366004612322565b6110a0565b3480156102f657600080fd5b506101da610305366004612322565b6111e7565b34801561031657600080fd5b506101da61032536600461215f565b61135c565b34801561033657600080fd5b506102466103453660046121c4565b611546565b34801561035657600080fd5b5061024661036536600461235b565b611578565b34801561037657600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610208565b3480156103c257600080fd5b506101da6115ca565b3480156103d757600080fd5b506102466103e63660046121c4565b60036020526000908152604090205481565b34801561040457600080fd5b506101da61041336600461215f565b6117be565b34801561042457600080fd5b5061024660005481565b34801561043a57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561046e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a257600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d657600080fd5b506101da6104e536600461215f565b6119b2565b3480156104f657600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561052a57600080fd5b506101da611bbe565b34801561053f57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561057357600080fd5b506101da61058236600461215f565b611de2565b34801561059357600080fd5b506105a76105a236600461235b565b611f9b565b6040516102089190612394565b3480156105c057600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f457600080fd5b5061024660045481565b61060781611578565b6000838152600260205260409020541461063c5760405162461bcd60e51b8152600401610633906123ae565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f61237e565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b81611578565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f0000000000000000000000000000000000000000000000000000000000000000346123ec565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161088f5761088f6123ff565b040311156108d25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461094a5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f69190612415565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a579190612415565b6001600160a01b031614610aa65760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610ab657508115155b15610af957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b0281611578565b60008481526002602052604090205403610b5f578051829003610b2b57600160a0820152610b46565b60c08101516001600160a01b031615610b4657600260a08201525b610b4f81611578565b6000848152600260205260409020555b505050565b6000610b907f000000000000000000000000000000000000000000000000000000000000000042612432565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c055760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000004281610c3457610c346123ff565b048210610c835760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b600454421115610d07577f0000000000000000000000000000000000000000000000000000000000000000600454420381610cc057610cc06123ff565b04826001011015610d075760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610633565b80610d245760405162461bcd60e51b8152600401610633906123ae565b60008281526002602052604090205415610d765760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbc90611578565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107bb565b60408510610e425760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b600084848484604051602001610e5b9493929190612454565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610edb576000888883818110610e9d57610e9d612496565b90506020020135905082811115610ec257826000528060205260406000209250610ed2565b8060005282602052604060002092505b50600101610e81565b508060005414610f1e5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f935760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc390899089906124ac565b6000604051808303816000865af19150503d8060008114611000576040519150601f19603f3d011682016040523d82523d6000602084013e611005565b606091505b50509050806110565760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b26103653683900383018361235b565b600083815260026020526040902054146110de5760405162461bcd60e51b8152600401610633906123ae565b60026110f060c0830160a084016124bc565b60028111156111015761110161237e565b146111425760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060e0840191505060c083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f96103653683900383018361235b565b600083815260026020526040902054146112255760405162461bcd60e51b8152600401610633906123ae565b600161123760c0830160a084016124bc565b60028111156112485761124861237e565b146112855760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b60008281526002602052604081208190556112a660e0830160c084016124d7565b6001600160a01b031614611301576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060408401915050602083016124d7565b61131160408201602083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61136581611578565b600083815260026020526040902054146113915760405162461bcd60e51b8152600401610633906123ae565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166113ca91906124f4565b6113d491906124f4565b4210156114385760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b600061144382611f9b565b905060028160038111156114595761145961237e565b1480611476575060008160038111156114745761147461237e565b145b6114df5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526114fc82611578565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115727f000000000000000000000000000000000000000000000000000000000000000083612432565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986115ad989097969101612507565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561162a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164e9190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561168b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116af9190612585565b50925050506004548111156116f95760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156117bb576006541561176d5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611811576118116123ff565b040311156118545760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b61185d81611578565b600083815260026020526040902054146118895760405162461bcd60e51b8152600401610633906123ae565b60c08101516001600160a01b0316156118db5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b60016118e682611f9b565b60038111156118f7576118f761237e565b146119445760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b60015482111561198c57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261199c81611578565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a0557611a056123ff565b040311611a465760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611a4f81611578565b60008381526002602052604090205414611a7b5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611a9357611a9361237e565b14611ad25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611b565760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b6a82611578565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611c255760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b600454600654611c3591906124f4565b4211611c9e5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d399190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611d76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9a9190612585565b50925050508181036108385760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611e3557611e356123ff565b040311611e765760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611e7f81611578565b60008381526002602052604090205414611eab5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ec357611ec361237e565b14611f025760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611f875760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b6a82611578565b6000816060015163ffffffff16600003611fb757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611ff357506003919050565b6000600c836060015163ffffffff16420381612011576120116123ff565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612055576001925061205a565b600092505b50505b919050565b6001600160a01b03811681146117bb57600080fd5b803561205d81612062565b803563ffffffff8116811461205d57600080fd5b80356003811061205d57600080fd5b600060e082840312156120b757600080fd5b60405160e0810181811067ffffffffffffffff821117156120e857634e487b7160e01b600052604160045260246000fd5b604052823581529050806120fe60208401612077565b602082015261210f60408401612082565b604082015261212060608401612082565b606082015261213160808401612082565b608082015261214260a08401612096565b60a082015261215360c08401612077565b60c08201525092915050565b600080610100838503121561217357600080fd5b8235915061218484602085016120a5565b90509250929050565b600080600061012084860312156121a357600080fd5b83359250602084013591506121bb85604086016120a5565b90509250925092565b6000602082840312156121d657600080fd5b5035919050565b600080604083850312156121f057600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461205d57600080fd5b60008083601f84011261222957600080fd5b50813567ffffffffffffffff81111561224157600080fd5b60208301915083602082850101111561225957600080fd5b9250929050565b6000806000806000806080878903121561227957600080fd5b863567ffffffffffffffff8082111561229157600080fd5b818901915089601f8301126122a557600080fd5b8135818111156122b457600080fd5b8a60208260051b85010111156122c957600080fd5b602083019850809750506122df60208a016121ff565b95506122ed60408a01612077565b9450606089013591508082111561230357600080fd5b5061231089828a01612217565b979a9699509497509295939492505050565b60008082840361010081121561233757600080fd5b8335925060e0601f198201121561234d57600080fd5b506020830190509250929050565b600060e0828403121561236d57600080fd5b61237783836120a5565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123a8576123a861237e565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611572576115726123d6565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561242757600080fd5b815161237781612062565b60008261244f57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156124ce57600080fd5b61237782612096565b6000602082840312156124e957600080fd5b813561237781612062565b80820180821115611572576115726123d6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061255f5761255f61237e565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561259b57600080fd5b50508251602084015160408501516060909501519196909550909250905056fea26469706673582212203970b2e1a37c8065439bc0afeb8ebd312ac73ec70379039158f76beb9e43e35664736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.", "events": { @@ -1047,18 +1047,6 @@ "_msgId": "The msgId of the message that was relayed." } }, - "SequencerLimitDecreaseRequested(uint256)": { - "details": "This event indicates that a request to decrease the sequencer limit has been made.", - "params": { - "_requestedSequencerLimit": "The new sequencer limit requested." - } - }, - "SequencerLimitUpdated(uint256)": { - "details": "This event indicates the sequencer limit updated.", - "params": { - "_newSequencerLimit": "The new maxL2StateSyncDelay." - } - }, "VerificationStarted(uint256)": { "details": "This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.", "params": { @@ -1070,6 +1058,18 @@ "params": { "_epoch": "The epoch that was verified." } + }, + "sequencerDelayLimitDecreaseRequested(uint256)": { + "details": "This event indicates that a request to decrease the sequencer limit has been made.", + "params": { + "_requestedsequencerDelayLimit": "The new sequencer limit requested." + } + }, + "sequencerDelayLimitUpdated(uint256)": { + "details": "This event indicates the sequencer limit updated.", + "params": { + "_newsequencerDelayLimit": "The new maxL2StateSyncDelay." + } } }, "kind": "dev", @@ -1120,8 +1120,8 @@ "epoch": "The hash of the claim." } }, - "executeSequencerLimitDecreaseRequest()": { - "details": "execute SequencerLimitDecreaseRequest" + "executesequencerDelayLimitDecreaseRequest()": { + "details": "execute sequencerDelayLimitDecreaseRequest" }, "hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Hashes the claim.", @@ -1156,8 +1156,8 @@ "_epoch": "The epoch of the claim to challenge." } }, - "updateSequencerLimit()": { - "details": "Request to decrease the sequencerLimit." + "updatesequencerDelayLimit()": { + "details": "Request to decrease the sequencerDelayLimit." }, "verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Resolves the optimistic claim for '_epoch'.", @@ -1209,7 +1209,7 @@ "storageLayout": { "storage": [ { - "astId": 437, + "astId": 430, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "stateRoot", "offset": 0, @@ -1217,7 +1217,7 @@ "type": "t_bytes32" }, { - "astId": 439, + "astId": 432, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "latestVerifiedEpoch", "offset": 0, @@ -1225,7 +1225,7 @@ "type": "t_uint256" }, { - "astId": 443, + "astId": 436, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "claimHashes", "offset": 0, @@ -1233,7 +1233,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 447, + "astId": 440, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "relayed", "offset": 0, @@ -1241,20 +1241,20 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 449, + "astId": 442, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", - "label": "sequencerLimit", + "label": "sequencerDelayLimit", "offset": 0, "slot": "4", "type": "t_uint256" }, { - "astId": 452, + "astId": 445, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", - "label": "sequencerLimitDecreaseRequest", + "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "5", - "type": "t_struct(SequencerLimitDecreaseRequest)457_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)450_storage" } ], "types": { @@ -1270,20 +1270,20 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_struct(SequencerLimitDecreaseRequest)457_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)450_storage": { "encoding": "inplace", - "label": "struct VeaOutboxArbToEth.SequencerLimitDecreaseRequest", + "label": "struct VeaOutboxArbToEth.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 454, + "astId": 447, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", - "label": "requestedSequencerLimit", + "label": "requestedsequencerDelayLimit", "offset": 0, "slot": "0", "type": "t_uint256" }, { - "astId": 456, + "astId": 449, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "timestamp", "offset": 0, diff --git a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol index 9f668652..299f33f6 100644 --- a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol +++ b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol @@ -42,11 +42,11 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { mapping(uint256 => bytes32) public claimHashes; // epoch => claim mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message - uint256 public sequencerLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock. - SequencerLimitDecreaseRequest public sequencerLimitDecreaseRequest; // Decreasing the sequencerLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here. + uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock. + SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here. - struct SequencerLimitDecreaseRequest { - uint256 requestedSequencerLimit; + struct SequencerDelayLimitDecreaseRequest { + uint256 requestedsequencerDelayLimit; uint256 timestamp; } @@ -84,12 +84,12 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { event Verified(uint256 _epoch); /// @dev This event indicates the sequencer limit updated. - /// @param _newSequencerLimit The new maxL2StateSyncDelay. - event SequencerLimitUpdated(uint256 _newSequencerLimit); + /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay. + event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit); /// @dev This event indicates that a request to decrease the sequencer limit has been made. - /// @param _requestedSequencerLimit The new sequencer limit requested. - event SequencerLimitDecreaseRequested(uint256 _requestedSequencerLimit); + /// @param _requestedsequencerDelayLimit The new sequencer limit requested. + event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit); // ************************************* // // * Function Modifiers * // @@ -135,7 +135,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { bridge = IBridge(_bridge); maxMissingBlocks = _maxMissingBlocks; - updateSequencerLimit(); + updatesequencerDelayLimit(); // claimant and challenger are not sybil resistant // must burn half deposit to prevent zero cost griefing @@ -149,44 +149,47 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { // * Parameter Updates * // // ************************************* // - /// @dev Request to decrease the sequencerLimit. - function updateSequencerLimit() public { + /// @dev Request to decrease the sequencerDelayLimit. + function updatesequencerDelayLimit() public { // the maximum asynchronous lag between the L2 and L1 clocks - (, , uint256 newSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); - - if (newSequencerLimit > sequencerLimit) { - // For sequencerLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown. - sequencerLimit = newSequencerLimit; - emit SequencerLimitUpdated(newSequencerLimit); - } else if (newSequencerLimit < sequencerLimit) { - require(sequencerLimitDecreaseRequest.timestamp == 0, "Sequencer limit decrease request already pending."); + (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); + + if (newsequencerDelayLimit > sequencerDelayLimit) { + // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown. + sequencerDelayLimit = newsequencerDelayLimit; + emit sequencerDelayLimitUpdated(newsequencerDelayLimit); + } else if (newsequencerDelayLimit < sequencerDelayLimit) { + require( + sequencerDelayLimitDecreaseRequest.timestamp == 0, + "Sequencer limit decrease request already pending." + ); - sequencerLimitDecreaseRequest = SequencerLimitDecreaseRequest({ - requestedSequencerLimit: newSequencerLimit, + sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({ + requestedsequencerDelayLimit: newsequencerDelayLimit, timestamp: block.timestamp }); - emit SequencerLimitDecreaseRequested(newSequencerLimit); + emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit); } } - /// @dev execute SequencerLimitDecreaseRequest - function executeSequencerLimitDecreaseRequest() external { - require(sequencerLimitDecreaseRequest.timestamp != 0, "No pending sequencer limit decrease request."); + /// @dev execute sequencerDelayLimitDecreaseRequest + function executesequencerDelayLimitDecreaseRequest() external { + require(sequencerDelayLimitDecreaseRequest.timestamp != 0, "No pending sequencer limit decrease request."); require( - block.timestamp > sequencerLimitDecreaseRequest.timestamp + sequencerLimit, + block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit, "Sequencer limit decrease request is still pending." ); - uint256 requestedSequencerLimit = sequencerLimitDecreaseRequest.requestedSequencerLimit; - delete sequencerLimitDecreaseRequest; + uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit; + delete sequencerDelayLimitDecreaseRequest; - (, , uint256 currentSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); + (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); // check the request is still consistent with the arbiturm bridge - if (currentSequencerLimit == requestedSequencerLimit) { - sequencerLimit = requestedSequencerLimit; - emit SequencerLimitUpdated(requestedSequencerLimit); + if (currentsequencerDelayLimit == requestedsequencerDelayLimit) { + sequencerDelayLimit = requestedsequencerDelayLimit; + emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit); } } @@ -202,11 +205,11 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { unchecked { require(_epoch < block.timestamp / epochPeriod, "Epoch has not yet passed."); - // Note: block.timestamp should be much larger than sequencerLimit, but we check in case Arbiturm governance updated this value. - if (block.timestamp > sequencerLimit) { - // Allow claims to be made within the sequencerLimit. + // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value. + if (block.timestamp > sequencerDelayLimit) { + // Allow claims to be made within the sequencerDelayLimit. // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating. - require(_epoch + 1 >= (block.timestamp - sequencerLimit) / epochPeriod, "Epoch is too old."); + require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, "Epoch is too old."); } } @@ -261,10 +264,10 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { function startVerification(uint256 _epoch, Claim memory _claim) external virtual { require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); - // sequencerLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock. - // using checked arithmetic incase arbitrum governance sets sequencerLimit to a large value + // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock. + // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value require( - block.timestamp >= _claim.timestampClaimed + sequencerLimit + epochPeriod, + block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod, "Claim must wait atleast maxL2StateSyncDelay." ); diff --git a/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol b/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol index 4dc9a68f..934062b5 100644 --- a/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol @@ -14,7 +14,7 @@ import "../canonical/arbitrum/IOutbox.sol"; import "../canonical/arbitrum/ISequencerInbox.sol"; import "../interfaces/routers/IRouterToL1.sol"; import "../interfaces/outboxes/IVeaOutboxOnL1.sol"; -import "../interfaces/updaters/IArbitrumUpdatable.sol"; +import "../interfaces/updaters/ISequencerDelayUpdatable.sol"; /// @dev Router from Arbitrum to Gnosis Chain. /// Note: This contract is deployed on Ethereum. @@ -28,11 +28,11 @@ contract RouterArbToGnosis is IRouterToL1 { address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum. address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain. - uint256 public sequencerLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock. - SequencerLimitDecreaseRequest public sequencerLimitDecreaseRequest; // Decreasing the sequencerLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here. + uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock. + SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here. - struct SequencerLimitDecreaseRequest { - uint256 requestedSequencerLimit; + struct SequencerDelayLimitDecreaseRequest { + uint256 requestedsequencerDelayLimit; uint256 timestamp; } @@ -47,15 +47,15 @@ contract RouterArbToGnosis is IRouterToL1 { /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value /// @param _ticketID The ticketID from the AMB of the cross-chain message. - event SequencerLimitSent(bytes32 _ticketID); + event sequencerDelayLimitSent(bytes32 _ticketID); /// @dev This event indicates the sequencer limit updated. - /// @param _newSequencerLimit The new maxL2StateSyncDelay. - event SequencerLimitUpdated(uint256 _newSequencerLimit); + /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay. + event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit); /// @dev This event indicates that a request to decrease the sequencer limit has been made. - /// @param _requestedSequencerLimit The new sequencer limit requested. - event SequencerLimitDecreaseRequested(uint256 _requestedSequencerLimit); + /// @param _requestedsequencerDelayLimit The new sequencer limit requested. + event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit); /// @dev Constructor. /// @param _bridge The address of the arbitrum bridge contract on Ethereum. @@ -67,61 +67,64 @@ contract RouterArbToGnosis is IRouterToL1 { amb = _amb; veaInboxArbToGnosis = _veaInboxArbToGnosis; veaOutboxArbToGnosis = _veaOutboxArbToGnosis; - (, , sequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); + (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); } // ************************************* // // * Parameter Updates * // // ************************************* // - /// @dev Update the sequencerLimit. If decreasing, a delayed request is created for later execution. - function updateSequencerLimit() public { + /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution. + function updatesequencerDelayLimit() public { // the maximum asynchronous lag between the L2 and L1 clocks - (, , uint256 newSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); - - if (newSequencerLimit > sequencerLimit) { - // For sequencerLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown. - sequencerLimit = newSequencerLimit; - emit SequencerLimitUpdated(newSequencerLimit); - sendSequencerLimit(); - } else if (newSequencerLimit < sequencerLimit) { - require(sequencerLimitDecreaseRequest.timestamp == 0, "Sequencer limit decrease request already pending."); - - sequencerLimitDecreaseRequest = SequencerLimitDecreaseRequest({ - requestedSequencerLimit: newSequencerLimit, + (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); + + if (newsequencerDelayLimit > sequencerDelayLimit) { + // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown. + sequencerDelayLimit = newsequencerDelayLimit; + emit sequencerDelayLimitUpdated(newsequencerDelayLimit); + sendsequencerDelayLimit(); + } else if (newsequencerDelayLimit < sequencerDelayLimit) { + require( + sequencerDelayLimitDecreaseRequest.timestamp == 0, + "Sequencer limit decrease request already pending." + ); + + sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({ + requestedsequencerDelayLimit: newsequencerDelayLimit, timestamp: block.timestamp }); - emit SequencerLimitDecreaseRequested(newSequencerLimit); + emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit); } } - /// @dev execute SequencerLimitDecreaseRequest - function executeSequencerLimitDecreaseRequest() external { - require(sequencerLimitDecreaseRequest.timestamp != 0, "No pending sequencer limit decrease request."); + /// @dev execute sequencerDelayLimitDecreaseRequest + function executesequencerDelayLimitDecreaseRequest() external { + require(sequencerDelayLimitDecreaseRequest.timestamp != 0, "No pending sequencer limit decrease request."); require( - block.timestamp > sequencerLimitDecreaseRequest.timestamp + sequencerLimit, + block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit, "Sequencer limit decrease request is still pending." ); - uint256 requestedSequencerLimit = sequencerLimitDecreaseRequest.requestedSequencerLimit; - delete sequencerLimitDecreaseRequest; + uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit; + delete sequencerDelayLimitDecreaseRequest; - (, , uint256 currentSequencerLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); + (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); // check the request is still consistent with the arbiturm bridge - if (currentSequencerLimit == requestedSequencerLimit) { - sequencerLimit = requestedSequencerLimit; - emit SequencerLimitUpdated(requestedSequencerLimit); - sendSequencerLimit(); + if (currentsequencerDelayLimit == requestedsequencerDelayLimit) { + sequencerDelayLimit = requestedsequencerDelayLimit; + emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit); + sendsequencerDelayLimit(); } } /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge - function sendSequencerLimit() internal { - bytes memory data = abi.encodeCall(IArbitrumUpdatable.updateSequencerLimit, sequencerLimit); + function sendsequencerDelayLimit() internal { + bytes memory data = abi.encodeCall(ISequencerDelayUpdatable.updateSequencerDelayLimit, sequencerDelayLimit); // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit. bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx()); - emit SequencerLimitSent(ticketID); + emit sequencerDelayLimitSent(ticketID); } // ************************************* // diff --git a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol index 5388e80c..bc1354e4 100644 --- a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol @@ -10,11 +10,11 @@ pragma solidity 0.8.18; import "../canonical/gnosis-chain/IAMB.sol"; import "../interfaces/outboxes/IVeaOutboxOnL1.sol"; -import "../interfaces/updaters/IArbitrumUpdatable.sol"; +import "../interfaces/updaters/ISequencerDelayUpdatable.sol"; /// @dev Vea Outbox From Arbitrum to Gnosis. /// Note: This contract is deployed on Gnosis. -contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, IArbitrumUpdatable { +contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { // ************************************* // // * Storage * // // ************************************* // @@ -42,7 +42,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, IArbitrumUpdatable { mapping(uint256 => bytes32) public claimHashes; // epoch => claim mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message - uint256 public sequencerLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock. + uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock. enum CensorshipTestStatus { Failed, @@ -78,8 +78,8 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, IArbitrumUpdatable { event Verified(uint256 _epoch); /// @dev This event indicates the sequencer limit updated. - /// @param _newSequencerLimit The new maxL2StateSyncDelay. - event SequencerLimitUpdateReceived(uint256 _newSequencerLimit); + /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay. + event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit); // ************************************* // // * Function Modifiers * // @@ -107,7 +107,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, IArbitrumUpdatable { /// @param _timeoutEpochs The epochs before the bridge is considered shutdown. /// @param _amb The address of the AMB contract on Gnosis. /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis. - /// @param _sequencerLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions. + /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions. /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period. /// @param _routerChainId The chain id of the routerArbToGnosis. constructor( @@ -117,7 +117,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, IArbitrumUpdatable { uint256 _timeoutEpochs, IAMB _amb, address _routerArbToGnosis, - uint256 _sequencerLimit, + uint256 _sequencerDelayLimit, uint256 _maxMissingBlocks, uint256 _routerChainId ) { @@ -131,7 +131,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, IArbitrumUpdatable { maxMissingBlocks = _maxMissingBlocks; routerChainId = _routerChainId; // This value is on another chain, so we can't read it, we trust the deployer to set a correct value. - sequencerLimit = _sequencerLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox + sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox // claimant and challenger are not sybil resistant // must burn half deposit to prevent zero cost griefing @@ -146,15 +146,15 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, IArbitrumUpdatable { // ************************************* // /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge - /// @param _newSequencerLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract. - function updateSequencerLimit(uint256 _newSequencerLimit) external { + /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract. + function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit) external { require(msg.sender == address(amb), "Not from bridge."); require(bytes32(routerChainId) == amb.messageSourceChainId(), "Invalid chain id."); require(routerArbToGnosis == amb.messageSender(), "Not from router."); - if (sequencerLimit != _newSequencerLimit) { - sequencerLimit = _newSequencerLimit; - emit SequencerLimitUpdateReceived(_newSequencerLimit); + if (sequencerDelayLimit != _newSequencerDelayLimit) { + sequencerDelayLimit = _newSequencerDelayLimit; + emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit); } } @@ -170,11 +170,11 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, IArbitrumUpdatable { unchecked { require(_epoch < block.timestamp / epochPeriod, "Epoch has not yet passed."); - // Note: block.timestamp should be much larger than sequencerLimit, but we check in case Arbiturm governance updated this value. - if (block.timestamp > sequencerLimit) { - // Allow claims to be made within the sequencerLimit. + // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value. + if (block.timestamp > sequencerDelayLimit) { + // Allow claims to be made within the sequencerDelayLimit. // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating. - require(_epoch + 1 >= (block.timestamp - sequencerLimit) / epochPeriod, "Epoch is too old."); + require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, "Epoch is too old."); } } @@ -229,10 +229,10 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, IArbitrumUpdatable { function startVerification(uint256 _epoch, Claim memory _claim) external virtual { require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); - // sequencerLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock. - // using checked arithmetic incase arbitrum governance sets sequencerLimit to a large value + // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock. + // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value require( - block.timestamp >= _claim.timestampClaimed + sequencerLimit + epochPeriod, + block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod, "Claim must wait atleast maxL2StateSyncDelay." ); diff --git a/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol b/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol index c8e112b2..79531235 100644 --- a/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol +++ b/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol @@ -132,7 +132,7 @@ contract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis { /// @param _amb The address of the AMB contract on Gnosis. /// @param _routerArbToGnosisDevnet The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado. /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period. - /// @param _sequencerLimit The maximum number of sequencer messages that can be submitted in a challenge period. + /// @param _sequencerDelayLimit The maximum number of sequencer messages that can be submitted in a challenge period. /// @param _routerChainId The chain id of the router contract. constructor( uint256 _deposit, @@ -142,7 +142,7 @@ contract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis { IAMB _amb, address _routerArbToGnosisDevnet, uint256 _maxMissingBlocks, - uint256 _sequencerLimit, + uint256 _sequencerDelayLimit, uint256 _routerChainId ) VeaOutboxArbToGnosis( @@ -153,7 +153,7 @@ contract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis { _amb, _routerArbToGnosisDevnet, _maxMissingBlocks, - sequencerLimit, + _sequencerDelayLimit, _routerChainId ) { diff --git a/contracts/src/interfaces/updaters/IArbitrumUpdatable.sol b/contracts/src/interfaces/updaters/ISequencerDelayUpdatable.sol similarity index 53% rename from contracts/src/interfaces/updaters/IArbitrumUpdatable.sol rename to contracts/src/interfaces/updaters/ISequencerDelayUpdatable.sol index c71bd586..9584d855 100644 --- a/contracts/src/interfaces/updaters/IArbitrumUpdatable.sol +++ b/contracts/src/interfaces/updaters/ISequencerDelayUpdatable.sol @@ -8,11 +8,11 @@ pragma solidity 0.8.18; -/// @dev Interface of a contract which is updatable, receiving parameter updates from the Arbitrum Bridge through a cross-chain call. -/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an IArbitrumUpdateable contract which receives updates from the router on Ethereum. -interface IArbitrumUpdatable { +/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call. +/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum. +interface ISequencerDelayUpdatable { /// @dev Updates the sequencer limit. /// Note: Access restricted to ensure the argument is passed from the Arbitrum Sequencer contract. - /// @param _newSequencerLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract. - function updateSequencerLimit(uint256 _newSequencerLimit) external; + /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract. + function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit) external; } diff --git a/contracts/test/integration/ArbToEth.ts b/contracts/test/integration/ArbToEth.ts index b4ad068c..6cd011f3 100644 --- a/contracts/test/integration/ArbToEth.ts +++ b/contracts/test/integration/ArbToEth.ts @@ -191,7 +191,7 @@ describe("Integration tests", async () => { }) ).to.be.revertedWith("Claim must wait atleast maxL2StateSyncDelay."); - const maxL2StateSyncDelay = (await veaOutbox.sequencerLimit()).toNumber() + epochPeriod / 2; + const maxL2StateSyncDelay = (await veaOutbox.sequencerDelayLimit()).toNumber() + epochPeriod / 2; await network.provider.send("evm_increaseTime", [epochPeriod + maxL2StateSyncDelay]); await network.provider.send("evm_mine"); @@ -286,7 +286,7 @@ describe("Integration tests", async () => { const bridgerClaimTx = await veaOutbox.connect(bridger).claim(epoch, batchMerkleRoot, { value: TEN_ETH }); const blockClaim = await ethers.provider.getBlock(bridgerClaimTx.blockNumber!); - const maxL2StateSyncDelay = (await veaOutbox.sequencerLimit()).toNumber() + epochPeriod / 2; + const maxL2StateSyncDelay = (await veaOutbox.sequencerDelayLimit()).toNumber() + epochPeriod / 2; await network.provider.send("evm_increaseTime", [epochPeriod + maxL2StateSyncDelay]); await network.provider.send("evm_mine"); @@ -368,7 +368,7 @@ describe("Integration tests", async () => { const bridgerClaimTx = await veaOutbox.connect(bridger).claim(epoch, batchMerkleRoot, { value: TEN_ETH }); const blockClaim = await ethers.provider.getBlock(bridgerClaimTx.blockNumber!); - const maxL2StateSyncDelay = (await veaOutbox.sequencerLimit()).toNumber() + epochPeriod / 2; + const maxL2StateSyncDelay = (await veaOutbox.sequencerDelayLimit()).toNumber() + epochPeriod / 2; await network.provider.send("evm_increaseTime", [epochPeriod + maxL2StateSyncDelay]); await network.provider.send("evm_mine"); @@ -452,7 +452,7 @@ describe("Integration tests", async () => { const bridgerClaimTx = await veaOutbox.connect(bridger).claim(epoch, batchMerkleRoot, { value: TEN_ETH }); const blockClaim = await ethers.provider.getBlock(bridgerClaimTx.blockNumber!); - const maxL2StateSyncDelay = (await veaOutbox.sequencerLimit()).toNumber() + epochPeriod / 2; + const maxL2StateSyncDelay = (await veaOutbox.sequencerDelayLimit()).toNumber() + epochPeriod / 2; await network.provider.send("evm_increaseTime", [epochPeriod + maxL2StateSyncDelay]); await network.provider.send("evm_mine"); @@ -637,7 +637,7 @@ describe("Integration tests", async () => { }) ).to.be.revertedWith("Challenge failed."); - const maxL2StateSyncDelay = (await veaOutbox.sequencerLimit()).toNumber() + epochPeriod / 2; + const maxL2StateSyncDelay = (await veaOutbox.sequencerDelayLimit()).toNumber() + epochPeriod / 2; await network.provider.send("evm_increaseTime", [epochPeriod + maxL2StateSyncDelay]); await network.provider.send("evm_mine"); @@ -784,7 +784,7 @@ describe("Integration tests", async () => { { value: TEN_ETH } ); - const maxL2StateSyncDelay = (await veaOutbox.sequencerLimit()).toNumber() + epochPeriod / 2; + const maxL2StateSyncDelay = (await veaOutbox.sequencerDelayLimit()).toNumber() + epochPeriod / 2; await network.provider.send("evm_increaseTime", [epochPeriod + maxL2StateSyncDelay]); await network.provider.send("evm_mine"); From cc04592eb08ae025dbff4b491bde6551259d8084 Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Fri, 16 Jun 2023 13:43:22 +0900 Subject: [PATCH 08/58] chore(contracts): remove unused library --- .../src/libraries/gnosis-chain/Bytes.sol | 30 ------------------- 1 file changed, 30 deletions(-) delete mode 100644 contracts/src/libraries/gnosis-chain/Bytes.sol diff --git a/contracts/src/libraries/gnosis-chain/Bytes.sol b/contracts/src/libraries/gnosis-chain/Bytes.sol deleted file mode 100644 index d400642d..00000000 --- a/contracts/src/libraries/gnosis-chain/Bytes.sol +++ /dev/null @@ -1,30 +0,0 @@ -//https://github.com/poanetwork/tokenbridge-contracts/blob/master/contracts/libraries/Bytes.sol - -pragma solidity 0.8.18; - -/// @title Bytes -/// @dev Helper methods to transform bytes to other solidity types. -library Bytes { - /// @dev Converts bytes array to bytes32. Truncates bytes array if its size is more than 32 bytes. - /// NOTE: This function does not perform any checks on the received parameter. - /// Make sure that the _bytes argument has a correct length, not less than 32 bytes. - /// A case when _bytes has length less than 32 will lead to the undefined behaviour, - /// since assembly will read data from memory that is not related to the _bytes argument. - /// @param _bytes to be converted to bytes32 type - /// @return result bytes32 type of the firsts 32 bytes array in parameter. - function bytesToBytes32(bytes memory _bytes) internal pure returns (bytes32 result) { - assembly { - result := mload(add(_bytes, 32)) - } - } - - /// @dev Truncate bytes array if its size is more than 20 bytes. - /// NOTE: Similar to the bytesToBytes32 function, make sure that _bytes is not shorter than 20 bytes. - /// @param _bytes to be converted to address type - /// @return addr address included in the firsts 20 bytes of the bytes array in parameter. - function bytesToAddress(bytes memory _bytes) internal pure returns (address addr) { - assembly { - addr := mload(add(_bytes, 20)) - } - } -} From 02db10d9f2c9f836b2b3ee7d76be5560e52aa875 Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Fri, 16 Jun 2023 14:36:33 +0900 Subject: [PATCH 09/58] feat(contracts): sequencer limit relay timeout --- contracts/README.md | 20 +++--- .../VeaInboxArbToEthDevnet.json | 16 ++--- .../VeaInboxArbToEthTestnet.json | 16 ++--- .../VeaInboxArbToGnosisDevnet.json | 16 ++--- .../VeaInboxArbToGnosisTestnet.json | 16 ++--- .../chiado/VeaOutboxArbToGnosisDevnet.json | 52 ++++++++------- .../chiado/VeaOutboxArbToGnosisTestnet.json | 50 ++++++++------- .../goerli/RouterArbToGnosisDevnet.json | 54 +++++++++------- .../goerli/RouterArbToGnosisTestnet.json | 54 +++++++++------- .../goerli/VeaOutboxArbToEthDevnet.json | 64 +++++++++---------- .../goerli/VeaOutboxArbToEthTestnet.json | 64 +++++++++---------- .../arbitrumToGnosis/RouterArbToGnosis.sol | 9 +-- .../arbitrumToGnosis/VeaOutboxArbToGnosis.sol | 5 +- .../updaters/ISequencerDelayUpdatable.sol | 5 +- 14 files changed, 239 insertions(+), 202 deletions(-) diff --git a/contracts/README.md b/contracts/README.md index b1933ef5..2a352d23 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -10,22 +10,22 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments #### Goerli -- [RouterArbToGnosisDevnet](https://goerli.etherscan.io/address/0xF767226FD5d9A8BbC4d99462175905cB6c1adA04) -- [RouterArbToGnosisTestnet](https://goerli.etherscan.io/address/0xbB800a318b5CeE079ADdBC6141A0BB1665793014) -- [VeaOutboxArbToEthDevnet](https://goerli.etherscan.io/address/0x19F1fE9f34d3d6323FB9862a99F8A56542f879F0) -- [VeaOutboxArbToEthTestnet](https://goerli.etherscan.io/address/0x2D2D210Bb504D4F8C226f780129a974C7CD56Ea0) +- [RouterArbToGnosisDevnet](https://goerli.etherscan.io/address/0x696567a5F0A6DD4aAe1dBa6ddB4c977aB5B07CAC) +- [RouterArbToGnosisTestnet](https://goerli.etherscan.io/address/0x57566eBB95e855fdAeEe108Afa450005B12123Bb) +- [VeaOutboxArbToEthDevnet](https://goerli.etherscan.io/address/0xb594c5C4eE3bF976d59F5d3DB311A1ac99D20FBA) +- [VeaOutboxArbToEthTestnet](https://goerli.etherscan.io/address/0x64277c8c817b45B0e3CE45AbC222f16406920B9a) #### Arbitrum Goerli -- [VeaInboxArbToEthDevnet](https://goerli.arbiscan.io/address/0x63eBccD095a663f024B5336b8362A7fa836b7882) -- [VeaInboxArbToEthTestnet](https://goerli.arbiscan.io/address/0x7B6D027DC9e838E98258c2A77877De59B7F5a350) -- [VeaInboxArbToGnosisDevnet](https://goerli.arbiscan.io/address/0xf9F4501AF2447210219d1393450a83933293a4Fd) -- [VeaInboxArbToGnosisTestnet](https://goerli.arbiscan.io/address/0xD6ecb6618e8070462E2a6AB160fE1773b8996D3a) +- [VeaInboxArbToEthDevnet](https://goerli.arbiscan.io/address/0x3D9356FF595C2151513DFc520380d5A178224564) +- [VeaInboxArbToEthTestnet](https://goerli.arbiscan.io/address/0xa452Eecf27B545E4115E1cD3cC903aC361B1eE22) +- [VeaInboxArbToGnosisDevnet](https://goerli.arbiscan.io/address/0xEC337Fb9977848D0784dC4F01A69c237691755E0) +- [VeaInboxArbToGnosisTestnet](https://goerli.arbiscan.io/address/0xf2DDe00c51be42c74e3927A324928381f83da37f) #### Chiado -- [VeaOutboxArbToGnosisDevnet](https://blockscout.com/gnosis/chiado/address/0xa117A3B8527133EB4CC2006F3F5b7e0cCC7298B5) -- [VeaOutboxArbToGnosisTestnet](https://blockscout.com/gnosis/chiado/address/0xd7610CF459C13Ff22923692Ab023dF5a58DeA838) +- [VeaOutboxArbToGnosisDevnet](https://blockscout.com/gnosis/chiado/address/0x00f0A751C921B937208e49a92fAaeaF896733544) +- [VeaOutboxArbToGnosisTestnet](https://blockscout.com/gnosis/chiado/address/0x0C3Acd25FE091b02e8E9b30B9b51dBD5d58C8a41) ## Getting Started diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json index dc363d42..57af0b86 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x63eBccD095a663f024B5336b8362A7fa836b7882", + "address": "0x3D9356FF595C2151513DFc520380d5A178224564", "abi": [ { "inputs": [ @@ -275,27 +275,27 @@ "type": "function" } ], - "transactionHash": "0xa124de331771c7da45f547c7a157803d83ffc07092d63da3f4d615e8ec546fa6", + "transactionHash": "0x10e462dfcf37adcc47ab6676bee019ffa66a149d16a712ba4fec09f7058e7633", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x63eBccD095a663f024B5336b8362A7fa836b7882", + "contractAddress": "0x3D9356FF595C2151513DFc520380d5A178224564", "transactionIndex": 1, "gasUsed": "671421", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x856b39108025bdcf887902f10132066999bab87ffacffb704c12318677b2d91b", - "transactionHash": "0xa124de331771c7da45f547c7a157803d83ffc07092d63da3f4d615e8ec546fa6", + "blockHash": "0xfc8a6ec80ca1bc51ee45520c45d9ad9cd1b7f08adcd315446121be10dec4e9ac", + "transactionHash": "0x10e462dfcf37adcc47ab6676bee019ffa66a149d16a712ba4fec09f7058e7633", "logs": [], - "blockNumber": 26284763, + "blockNumber": 26290031, "cumulativeGasUsed": "671421", "status": 1, "byzantium": true }, "args": [ 1800, - "0x19F1fE9f34d3d6323FB9862a99F8A56542f879F0" + "0xb594c5C4eE3bF976d59F5d3DB311A1ac99D20FBA" ], - "numDeployments": 9, + "numDeployments": 10, "solcInputHash": "ad697f618f73759e1d99ca054913682f", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0xf7aedd98f0149c6f63c4d59ad9fd5d6d2d16b75a42fe95d2064a157ff181007b\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161012001526105b401526000818161015f015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220a0a2597c30b2d5058f2616d02e3665ca367e57c05fd79670bc724658fa4fe1fd64736f6c63430008120033", diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json index e1caaabe..27f4b4d4 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x7B6D027DC9e838E98258c2A77877De59B7F5a350", + "address": "0xa452Eecf27B545E4115E1cD3cC903aC361B1eE22", "abi": [ { "inputs": [ @@ -275,27 +275,27 @@ "type": "function" } ], - "transactionHash": "0x8b4c0cc923eaff48c1935547e5b48aafef6e135ae0d0c4b406d551ee2ad6f776", + "transactionHash": "0x69e9033d2c07a81b1da0ce4e7587e623d4d4a4bde1a0defe7e793294d9fc6a20", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x7B6D027DC9e838E98258c2A77877De59B7F5a350", + "contractAddress": "0xa452Eecf27B545E4115E1cD3cC903aC361B1eE22", "transactionIndex": 1, "gasUsed": "671421", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x58c4235820be0ecea038df623b80e2151a44ad7f8b8095d1240c362a18fd86e9", - "transactionHash": "0x8b4c0cc923eaff48c1935547e5b48aafef6e135ae0d0c4b406d551ee2ad6f776", + "blockHash": "0x93ba9211730a42781d6c7b99998b33d5a3fc278776db542c981dce8bb085c3c2", + "transactionHash": "0x69e9033d2c07a81b1da0ce4e7587e623d4d4a4bde1a0defe7e793294d9fc6a20", "logs": [], - "blockNumber": 26284492, + "blockNumber": 26289835, "cumulativeGasUsed": "671421", "status": 1, "byzantium": true }, "args": [ 7200, - "0x2D2D210Bb504D4F8C226f780129a974C7CD56Ea0" + "0x64277c8c817b45B0e3CE45AbC222f16406920B9a" ], - "numDeployments": 5, + "numDeployments": 6, "solcInputHash": "ad697f618f73759e1d99ca054913682f", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0xf7aedd98f0149c6f63c4d59ad9fd5d6d2d16b75a42fe95d2064a157ff181007b\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161012001526105b401526000818161015f015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220a0a2597c30b2d5058f2616d02e3665ca367e57c05fd79670bc724658fa4fe1fd64736f6c63430008120033", diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json index f9c84130..ad8a7e7b 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xf9F4501AF2447210219d1393450a83933293a4Fd", + "address": "0xEC337Fb9977848D0784dC4F01A69c237691755E0", "abi": [ { "inputs": [ @@ -275,27 +275,27 @@ "type": "function" } ], - "transactionHash": "0x6b2b34bed6f414303a3faebe4ab9f9160826aaddcd05a681c80c982f542eb9ed", + "transactionHash": "0x71cec675e8bbd6c4da19a14f1c64ab8c52676914e94195c86e340b0e9ed92b7b", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xf9F4501AF2447210219d1393450a83933293a4Fd", + "contractAddress": "0xEC337Fb9977848D0784dC4F01A69c237691755E0", "transactionIndex": 1, "gasUsed": "671409", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x6ae77a3947ccd7445954fadfcd58c86d59d64d13560052236f069e0aca795866", - "transactionHash": "0x6b2b34bed6f414303a3faebe4ab9f9160826aaddcd05a681c80c982f542eb9ed", + "blockHash": "0x582338aa5162fbf74bb962fb260172492e20461c8804fc170af20cf038393edb", + "transactionHash": "0x71cec675e8bbd6c4da19a14f1c64ab8c52676914e94195c86e340b0e9ed92b7b", "logs": [], - "blockNumber": 26284836, + "blockNumber": 26290084, "cumulativeGasUsed": "671409", "status": 1, "byzantium": true }, "args": [ 1800, - "0xa117A3B8527133EB4CC2006F3F5b7e0cCC7298B5" + "0x00f0A751C921B937208e49a92fAaeaF896733544" ], - "numDeployments": 10, + "numDeployments": 11, "solcInputHash": "ad697f618f73759e1d99ca054913682f", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToL1.route, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x48eecf0d4e478ce7860635a206ceee6535b4f4765f9d25dddae463666e2bd7cb\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161015a01526105b4015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220994c2014c4b68b5175d78f99d2fb730f4a377df08484a25fda20c640bbd2b32e64736f6c63430008120033", diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json index ea7584c1..13e7e155 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0xD6ecb6618e8070462E2a6AB160fE1773b8996D3a", + "address": "0xf2DDe00c51be42c74e3927A324928381f83da37f", "abi": [ { "inputs": [ @@ -275,27 +275,27 @@ "type": "function" } ], - "transactionHash": "0x03ec1c49033c62467654f622f476704bfe80285213c17343dfe3ab7cba08d898", + "transactionHash": "0xbfae6d80bc62d800b49a381c4f1568d3be876be1871c41e720a49faa10e3baa3", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xD6ecb6618e8070462E2a6AB160fE1773b8996D3a", + "contractAddress": "0xf2DDe00c51be42c74e3927A324928381f83da37f", "transactionIndex": 1, "gasUsed": "671421", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x6aa42d4f62d402bafcd25fa06b80ecfe94721158685684a8f4e130ac233927b4", - "transactionHash": "0x03ec1c49033c62467654f622f476704bfe80285213c17343dfe3ab7cba08d898", + "blockHash": "0xfd0197ca777be022fbe2759f50a01cf61c822a024b1c4038956f0beea1add7be", + "transactionHash": "0xbfae6d80bc62d800b49a381c4f1568d3be876be1871c41e720a49faa10e3baa3", "logs": [], - "blockNumber": 26284555, + "blockNumber": 26289882, "cumulativeGasUsed": "671421", "status": 1, "byzantium": true }, "args": [ 3600, - "0xd7610CF459C13Ff22923692Ab023dF5a58DeA838" + "0x0C3Acd25FE091b02e8E9b30B9b51dBD5d58C8a41" ], - "numDeployments": 3, + "numDeployments": 4, "solcInputHash": "ad697f618f73759e1d99ca054913682f", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToL1.route, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x48eecf0d4e478ce7860635a206ceee6535b4f4765f9d25dddae463666e2bd7cb\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161015a01526105b4015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220994c2014c4b68b5175d78f99d2fb730f4a377df08484a25fda20c640bbd2b32e64736f6c63430008120033", diff --git a/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json b/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json index 2e6747cc..e3327af0 100644 --- a/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json +++ b/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xa117A3B8527133EB4CC2006F3F5b7e0cCC7298B5", + "address": "0x00f0A751C921B937208e49a92fAaeaF896733544", "abi": [ { "inputs": [ @@ -733,6 +733,11 @@ "internalType": "uint256", "name": "_newSequencerDelayLimit", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" } ], "name": "updateSequencerDelayLimit", @@ -1016,19 +1021,19 @@ "type": "function" } ], - "transactionHash": "0x486151cc7b5e7d9f5ddb9551648cbae8137f1f4787338303ae7135ee896c0c82", + "transactionHash": "0xfad9a44384260e83c5c64ab6495fc978f59b62716044745fd5092d3f61a72453", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xa117A3B8527133EB4CC2006F3F5b7e0cCC7298B5", - "transactionIndex": 0, - "gasUsed": "2093258", + "contractAddress": "0x00f0A751C921B937208e49a92fAaeaF896733544", + "transactionIndex": 2, + "gasUsed": "2118351", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x606075b6b63e6064a6b9d7c061c51554ea9d4e746a95ac057e7d49a57adbd8ca", - "transactionHash": "0x486151cc7b5e7d9f5ddb9551648cbae8137f1f4787338303ae7135ee896c0c82", + "blockHash": "0x204847fc9d4e1f91f1dfb887127b0f62ca1470317b7b4057027cf17881ea86c6", + "transactionHash": "0xfad9a44384260e83c5c64ab6495fc978f59b62716044745fd5092d3f61a72453", "logs": [], - "blockNumber": 4486412, - "cumulativeGasUsed": "2093258", + "blockNumber": 4487091, + "cumulativeGasUsed": "2175395", "status": 1, "byzantium": true }, @@ -1038,16 +1043,16 @@ 0, 10000000000000, "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0xF767226FD5d9A8BbC4d99462175905cB6c1adA04", + "0x696567a5F0A6DD4aAe1dBa6ddB4c977aB5B07CAC", 86400, 10000000000000, 5 ], - "numDeployments": 12, - "solcInputHash": "ad697f618f73759e1d99ca054913682f", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosisDevnet\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_routerArbToGnosisDevnet\":\"The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\",\"_routerChainId\":\"The chain id of the router contract.\",\"_sequencerDelayLimit\":\"The maximum number of sequencer messages that can be submitted in a challenge period.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256)\":{\"details\":\"Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":\"VeaOutboxArbToGnosisDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x2fe0351f519bd619887915bbe25f2b18d52f1170d6640f49698b3d4dc56d2601\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToGnosis/VeaOutboxArbToGnosis.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Chiado.\\n/// Note: This contract is deployed on Chiado.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosisDevnet The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _sequencerDelayLimit The maximum number of sequencer messages that can be submitted in a challenge period.\\n /// @param _routerChainId The chain id of the router contract.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosisDevnet,\\n uint256 _maxMissingBlocks,\\n uint256 _sequencerDelayLimit,\\n uint256 _routerChainId\\n )\\n VeaOutboxArbToGnosis(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _amb,\\n _routerArbToGnosisDevnet,\\n _maxMissingBlocks,\\n _sequencerDelayLimit,\\n _routerChainId\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xab3a39d2515db68f62fde6addb1d845b20e04dc70fb5dcb329b69e8309dbc4d1\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Arbitrum Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit) external;\\n}\",\"keccak256\":\"0xcf2532733ecd20779e259f12452b75f0ebda4965bc8aa2c8af041df908e632d3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101c06040523480156200001257600080fd5b506040516200270d3803806200270d83398101604081905262000035916200010e565b60c08990526101408890526101808690526101608790526001600160a01b03808616608052841660a0526101a082905261012081905260048390558888888888888888886200008660028a620001a7565b60e0819052620000988a6002620001ca565b620000a49190620001ea565b6101005261014051600190620000bb9042620001a7565b620000c79190620001ea565b6001555050600580546001600160a01b0319163317905550620002009e505050505050505050505050505050565b6001600160a01b03811681146200010b57600080fd5b50565b60008060008060008060008060006101208a8c0312156200012e57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a01516200015781620000f5565b60a08b01519095506200016a81620000f5565b8094505060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001c557634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001e457620001e462000191565b92915050565b81810381811115620001e457620001e462000191565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516123b16200035c600039600081816104a50152611d9d0152600081816104d9015281816108a0015281816117c5015281816119500152611b5c0152600081816105610152611d3101526000818161050d015281816108c401528181610c550152818161142a015281816117e9015281816119740152611b8001526000818161040e01528181610a3b01526115960152600081816111b001526112e901526000818161115d01526112a1015260008181610595015281816106a1015281816108270152818161085401528181610c980152818161133901528181611aba01528181611b210152611cc70152600081816105c901528181610b2801526116830152600081816102240152818161093f015281816109b901528181610a9d015281816114b20152818161151401526115f801526123b16000f3fe6080604052600436106101d85760003560e01c80638ad3a8f711610102578063b633b94411610095578063da2b7bc411610064578063da2b7bc4146105eb578063df19e6ff1461060b578063e813a75514610638578063eedcf2a91461064e57600080fd5b8063b633b9441461052f578063c2114a161461054f578063d0e30db014610583578063d5e6a9df146105b757600080fd5b80639588eca2116100d15780639588eca21461047d578063aa22a1c614610493578063b044397e146104c7578063b5b7a184146104fb57600080fd5b80638ad3a8f7146103dc5780638d96fdea146103fc57806390df63b714610430578063930f28af1461045d57600080fd5b806331ddf7431161017a5780634a439cfe116101495780634a439cfe1461035c578063541adcca1461037c578063654bc9651461039c5780638a619a71146103bc57600080fd5b806331ddf743146102dc5780633ce43cfd146102fc5780634788cb381461031c57806349b4299e1461033c57600080fd5b8063222ae786116101b6578063222ae786146102635780632639c0601461028657806327ee6bdd146102b357806331d14457146102c957600080fd5b806301139b68146101dd5780630f0adca5146101f25780631062b39a14610212575b600080fd5b6101f06101eb366004611f57565b610661565b005b3480156101fe57600080fd5b506101f061020d366004611f85565b61089e565b34801561021e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561026f57600080fd5b50610278610c4e565b60405190815260200161025a565b34801561029257600080fd5b506102786102a1366004611fbc565b60026020526000908152604090205481565b3480156102bf57600080fd5b5061027860015481565b6101f06102d7366004611fd5565b610c7f565b3480156102e857600080fd5b506101f06102f7366004612058565b610e06565b34801561030857600080fd5b506101f061031736600461211a565b6110a6565b34801561032857600080fd5b506101f0610337366004611f57565b6111ed565b34801561034857600080fd5b506101f0610357366004611f57565b611371565b34801561036857600080fd5b50610278610377366004611fbc565b611423565b34801561038857600080fd5b50610278610397366004612153565b611455565b3480156103a857600080fd5b506101f06103b7366004611fbc565b6114a7565b3480156103c857600080fd5b506101f06103d7366004612176565b611730565b3480156103e857600080fd5b50600554610246906001600160a01b031681565b34801561040857600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561043c57600080fd5b5061027861044b366004611fbc565b60036020526000908152604090205481565b34801561046957600080fd5b506101f0610478366004611f57565b6117c3565b34801561048957600080fd5b5061027860005481565b34801561049f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d357600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561050757600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561053b57600080fd5b506101f061054a366004611f57565b61194e565b34801561055b57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561058f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c357600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f757600080fd5b506101f0610606366004611f57565b611b5a565b34801561061757600080fd5b5061062b610626366004612153565b611d13565b60405161025a91906121a9565b34801561064457600080fd5b5061027860045481565b6101f061065c366004611fd5565b611dda565b61066a81611455565b6000838152600260205260409020541461069f5760405162461bcd60e51b8152600401610696906121c3565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561070f5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610696565b60c08101516001600160a01b03161561076a5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610696565b60008160a00151600281111561078257610782612193565b146107cf5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610696565b3360c08201526107de81611455565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f000000000000000000000000000000000000000000000000000000000000000034111561089a5760006108797f0000000000000000000000000000000000000000000000000000000000000000346121eb565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816108f1576108f161220c565b040311156109345760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109b75760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190612222565b7f000000000000000000000000000000000000000000000000000000000000000014610a9b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1d919061223b565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b905760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b60015483118015610ba057508115155b15610be357600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610bec81611455565b60008481526002602052604090205403610c49578051829003610c1557600160a0820152610c30565b60c08101516001600160a01b031615610c3057600260a08201525b610c3981611455565b6000848152600260205260409020555b505050565b6000610c7a7f000000000000000000000000000000000000000000000000000000000000000042612258565b905090565b6005546001600160a01b03163314610c9657600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610d065760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610696565b80610d235760405162461bcd60e51b8152600401610696906121c3565b60008281526002602052604090205415610d755760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610696565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbb90611455565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050565b60408510610e485760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610696565b600084848484604051602001610e61949392919061227a565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610ee1576000888883818110610ea357610ea36122bc565b90506020020135905082811115610ec857826000528060205260406000209250610ed8565b8060005282602052604060002092505b50600101610e87565b508060005414610f245760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610696565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f995760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610696565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc990899089906122d2565b6000604051808303816000865af19150503d8060008114611006576040519150601f19603f3d011682016040523d82523d6000602084013e61100b565b606091505b505090508061105c5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610696565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b861039736839003830183612153565b600083815260026020526040902054146110e45760405162461bcd60e51b8152600401610696906121c3565b60026110f660c0830160a084016122e2565b600281111561110757611107612193565b146111485760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610696565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506111a293505060e0840191505060c08301612176565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f681611455565b600083815260026020526040902054146112225760405162461bcd60e51b8152600401610696906121c3565b60018160a00151600281111561123a5761123a612193565b146112775760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610696565b60008281526002602052604081205560c08101516001600160a01b031615611323576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6005546001600160a01b0316331461138857600080fd5b61139181611455565b600083815260026020526040902054146113bd5760405162461bcd60e51b8152600401610696906121c3565b63ffffffff4281166060830152431660808201526113da81611455565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a15050565b600061144f7f000000000000000000000000000000000000000000000000000000000000000083612258565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861148a9890979691016122fd565b604051602081830303815290604052805190602001209050919050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115125760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611570573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115949190612222565b7f0000000000000000000000000000000000000000000000000000000000000000146115f65760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015611654573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611678919061223b565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146116eb5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b806004541461172d5760048190556040518181527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b50565b6005546001600160a01b0316331461174757600080fd5b6005546001600160a01b031633146117a15760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610696565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816118165761181661220c565b040311156118595760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b61186281611455565b6000838152600260205260409020541461188e5760405162461bcd60e51b8152600401610696906121c3565b60c08101516001600160a01b0316156118e05760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610696565b60015482111561192857600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261193881611455565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119a1576119a161220c565b0403116119e25760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b6119eb81611455565b60008381526002602052604090205414611a175760405162461bcd60e51b8152600401610696906121c3565b60008160a001516002811115611a2f57611a2f612193565b14611a6e5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60c08101516001600160a01b03161561089a5760208101516001600160a01b0316611af25760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b0682611455565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bad57611bad61220c565b040311611bee5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611bf781611455565b60008381526002602052604090205414611c235760405162461bcd60e51b8152600401610696906121c3565b60008160a001516002811115611c3b57611c3b612193565b14611c7a5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60208101516001600160a01b03161561089a5760c08101516001600160a01b0316611cff5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b0682611455565b6000816060015163ffffffff16600003611d2f57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611d6b57506003919050565b60006005836060015163ffffffff16420381611d8957611d8961220c565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611dcd5760019250611dd2565b600092505b50505b919050565b611de48282610c7f565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611e2b8382611371565b63ffffffff428116606083015243166080820152611e4983826117c3565b600160a0820152610c4983826111ed565b6001600160a01b038116811461172d57600080fd5b8035611dd581611e5a565b803563ffffffff81168114611dd557600080fd5b803560038110611dd557600080fd5b600060e08284031215611eaf57600080fd5b60405160e0810181811067ffffffffffffffff82111715611ee057634e487b7160e01b600052604160045260246000fd5b60405282358152905080611ef660208401611e6f565b6020820152611f0760408401611e7a565b6040820152611f1860608401611e7a565b6060820152611f2960808401611e7a565b6080820152611f3a60a08401611e8e565b60a0820152611f4b60c08401611e6f565b60c08201525092915050565b6000806101008385031215611f6b57600080fd5b82359150611f7c8460208501611e9d565b90509250929050565b60008060006101208486031215611f9b57600080fd5b8335925060208401359150611fb38560408601611e9d565b90509250925092565b600060208284031215611fce57600080fd5b5035919050565b60008060408385031215611fe857600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611dd557600080fd5b60008083601f84011261202157600080fd5b50813567ffffffffffffffff81111561203957600080fd5b60208301915083602082850101111561205157600080fd5b9250929050565b6000806000806000806080878903121561207157600080fd5b863567ffffffffffffffff8082111561208957600080fd5b818901915089601f83011261209d57600080fd5b8135818111156120ac57600080fd5b8a60208260051b85010111156120c157600080fd5b602083019850809750506120d760208a01611ff7565b95506120e560408a01611e6f565b945060608901359150808211156120fb57600080fd5b5061210889828a0161200f565b979a9699509497509295939492505050565b60008082840361010081121561212f57600080fd5b8335925060e0601f198201121561214557600080fd5b506020830190509250929050565b600060e0828403121561216557600080fd5b61216f8383611e9d565b9392505050565b60006020828403121561218857600080fd5b813561216f81611e5a565b634e487b7160e01b600052602160045260246000fd5b60208101600483106121bd576121bd612193565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b8181038181111561144f57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60006020828403121561223457600080fd5b5051919050565b60006020828403121561224d57600080fd5b815161216f81611e5a565b60008261227557634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156122f457600080fd5b61216f82611e8e565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061235557612355612193565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122036459ebec58d3a58d557d1eced6662f003afbbc89580afca39609a7f839d2f6264736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101d85760003560e01c80638ad3a8f711610102578063b633b94411610095578063da2b7bc411610064578063da2b7bc4146105eb578063df19e6ff1461060b578063e813a75514610638578063eedcf2a91461064e57600080fd5b8063b633b9441461052f578063c2114a161461054f578063d0e30db014610583578063d5e6a9df146105b757600080fd5b80639588eca2116100d15780639588eca21461047d578063aa22a1c614610493578063b044397e146104c7578063b5b7a184146104fb57600080fd5b80638ad3a8f7146103dc5780638d96fdea146103fc57806390df63b714610430578063930f28af1461045d57600080fd5b806331ddf7431161017a5780634a439cfe116101495780634a439cfe1461035c578063541adcca1461037c578063654bc9651461039c5780638a619a71146103bc57600080fd5b806331ddf743146102dc5780633ce43cfd146102fc5780634788cb381461031c57806349b4299e1461033c57600080fd5b8063222ae786116101b6578063222ae786146102635780632639c0601461028657806327ee6bdd146102b357806331d14457146102c957600080fd5b806301139b68146101dd5780630f0adca5146101f25780631062b39a14610212575b600080fd5b6101f06101eb366004611f57565b610661565b005b3480156101fe57600080fd5b506101f061020d366004611f85565b61089e565b34801561021e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561026f57600080fd5b50610278610c4e565b60405190815260200161025a565b34801561029257600080fd5b506102786102a1366004611fbc565b60026020526000908152604090205481565b3480156102bf57600080fd5b5061027860015481565b6101f06102d7366004611fd5565b610c7f565b3480156102e857600080fd5b506101f06102f7366004612058565b610e06565b34801561030857600080fd5b506101f061031736600461211a565b6110a6565b34801561032857600080fd5b506101f0610337366004611f57565b6111ed565b34801561034857600080fd5b506101f0610357366004611f57565b611371565b34801561036857600080fd5b50610278610377366004611fbc565b611423565b34801561038857600080fd5b50610278610397366004612153565b611455565b3480156103a857600080fd5b506101f06103b7366004611fbc565b6114a7565b3480156103c857600080fd5b506101f06103d7366004612176565b611730565b3480156103e857600080fd5b50600554610246906001600160a01b031681565b34801561040857600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561043c57600080fd5b5061027861044b366004611fbc565b60036020526000908152604090205481565b34801561046957600080fd5b506101f0610478366004611f57565b6117c3565b34801561048957600080fd5b5061027860005481565b34801561049f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d357600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561050757600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561053b57600080fd5b506101f061054a366004611f57565b61194e565b34801561055b57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561058f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c357600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f757600080fd5b506101f0610606366004611f57565b611b5a565b34801561061757600080fd5b5061062b610626366004612153565b611d13565b60405161025a91906121a9565b34801561064457600080fd5b5061027860045481565b6101f061065c366004611fd5565b611dda565b61066a81611455565b6000838152600260205260409020541461069f5760405162461bcd60e51b8152600401610696906121c3565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561070f5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610696565b60c08101516001600160a01b03161561076a5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610696565b60008160a00151600281111561078257610782612193565b146107cf5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610696565b3360c08201526107de81611455565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f000000000000000000000000000000000000000000000000000000000000000034111561089a5760006108797f0000000000000000000000000000000000000000000000000000000000000000346121eb565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816108f1576108f161220c565b040311156109345760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109b75760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190612222565b7f000000000000000000000000000000000000000000000000000000000000000014610a9b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1d919061223b565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b905760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b60015483118015610ba057508115155b15610be357600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610bec81611455565b60008481526002602052604090205403610c49578051829003610c1557600160a0820152610c30565b60c08101516001600160a01b031615610c3057600260a08201525b610c3981611455565b6000848152600260205260409020555b505050565b6000610c7a7f000000000000000000000000000000000000000000000000000000000000000042612258565b905090565b6005546001600160a01b03163314610c9657600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610d065760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610696565b80610d235760405162461bcd60e51b8152600401610696906121c3565b60008281526002602052604090205415610d755760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610696565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbb90611455565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050565b60408510610e485760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610696565b600084848484604051602001610e61949392919061227a565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610ee1576000888883818110610ea357610ea36122bc565b90506020020135905082811115610ec857826000528060205260406000209250610ed8565b8060005282602052604060002092505b50600101610e87565b508060005414610f245760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610696565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f995760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610696565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc990899089906122d2565b6000604051808303816000865af19150503d8060008114611006576040519150601f19603f3d011682016040523d82523d6000602084013e61100b565b606091505b505090508061105c5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610696565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b861039736839003830183612153565b600083815260026020526040902054146110e45760405162461bcd60e51b8152600401610696906121c3565b60026110f660c0830160a084016122e2565b600281111561110757611107612193565b146111485760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610696565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506111a293505060e0840191505060c08301612176565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f681611455565b600083815260026020526040902054146112225760405162461bcd60e51b8152600401610696906121c3565b60018160a00151600281111561123a5761123a612193565b146112775760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610696565b60008281526002602052604081205560c08101516001600160a01b031615611323576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6005546001600160a01b0316331461138857600080fd5b61139181611455565b600083815260026020526040902054146113bd5760405162461bcd60e51b8152600401610696906121c3565b63ffffffff4281166060830152431660808201526113da81611455565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a15050565b600061144f7f000000000000000000000000000000000000000000000000000000000000000083612258565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861148a9890979691016122fd565b604051602081830303815290604052805190602001209050919050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115125760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611570573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115949190612222565b7f0000000000000000000000000000000000000000000000000000000000000000146115f65760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015611654573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611678919061223b565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146116eb5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b806004541461172d5760048190556040518181527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b50565b6005546001600160a01b0316331461174757600080fd5b6005546001600160a01b031633146117a15760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610696565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816118165761181661220c565b040311156118595760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b61186281611455565b6000838152600260205260409020541461188e5760405162461bcd60e51b8152600401610696906121c3565b60c08101516001600160a01b0316156118e05760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610696565b60015482111561192857600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261193881611455565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119a1576119a161220c565b0403116119e25760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b6119eb81611455565b60008381526002602052604090205414611a175760405162461bcd60e51b8152600401610696906121c3565b60008160a001516002811115611a2f57611a2f612193565b14611a6e5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60c08101516001600160a01b03161561089a5760208101516001600160a01b0316611af25760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b0682611455565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bad57611bad61220c565b040311611bee5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611bf781611455565b60008381526002602052604090205414611c235760405162461bcd60e51b8152600401610696906121c3565b60008160a001516002811115611c3b57611c3b612193565b14611c7a5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60208101516001600160a01b03161561089a5760c08101516001600160a01b0316611cff5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b0682611455565b6000816060015163ffffffff16600003611d2f57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611d6b57506003919050565b60006005836060015163ffffffff16420381611d8957611d8961220c565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611dcd5760019250611dd2565b600092505b50505b919050565b611de48282610c7f565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611e2b8382611371565b63ffffffff428116606083015243166080820152611e4983826117c3565b600160a0820152610c4983826111ed565b6001600160a01b038116811461172d57600080fd5b8035611dd581611e5a565b803563ffffffff81168114611dd557600080fd5b803560038110611dd557600080fd5b600060e08284031215611eaf57600080fd5b60405160e0810181811067ffffffffffffffff82111715611ee057634e487b7160e01b600052604160045260246000fd5b60405282358152905080611ef660208401611e6f565b6020820152611f0760408401611e7a565b6040820152611f1860608401611e7a565b6060820152611f2960808401611e7a565b6080820152611f3a60a08401611e8e565b60a0820152611f4b60c08401611e6f565b60c08201525092915050565b6000806101008385031215611f6b57600080fd5b82359150611f7c8460208501611e9d565b90509250929050565b60008060006101208486031215611f9b57600080fd5b8335925060208401359150611fb38560408601611e9d565b90509250925092565b600060208284031215611fce57600080fd5b5035919050565b60008060408385031215611fe857600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611dd557600080fd5b60008083601f84011261202157600080fd5b50813567ffffffffffffffff81111561203957600080fd5b60208301915083602082850101111561205157600080fd5b9250929050565b6000806000806000806080878903121561207157600080fd5b863567ffffffffffffffff8082111561208957600080fd5b818901915089601f83011261209d57600080fd5b8135818111156120ac57600080fd5b8a60208260051b85010111156120c157600080fd5b602083019850809750506120d760208a01611ff7565b95506120e560408a01611e6f565b945060608901359150808211156120fb57600080fd5b5061210889828a0161200f565b979a9699509497509295939492505050565b60008082840361010081121561212f57600080fd5b8335925060e0601f198201121561214557600080fd5b506020830190509250929050565b600060e0828403121561216557600080fd5b61216f8383611e9d565b9392505050565b60006020828403121561218857600080fd5b813561216f81611e5a565b634e487b7160e01b600052602160045260246000fd5b60208101600483106121bd576121bd612193565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b8181038181111561144f57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60006020828403121561223457600080fd5b5051919050565b60006020828403121561224d57600080fd5b815161216f81611e5a565b60008261227557634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156122f457600080fd5b61216f82611e8e565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061235557612355612193565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122036459ebec58d3a58d557d1eced6662f003afbbc89580afca39609a7f839d2f6264736f6c63430008120033", + "numDeployments": 13, + "solcInputHash": "cf76e8aad7d9ce9f21e3b6b1180c6852", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosisDevnet\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_routerArbToGnosisDevnet\":\"The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\",\"_routerChainId\":\"The chain id of the router contract.\",\"_sequencerDelayLimit\":\"The maximum number of sequencer messages that can be submitted in a challenge period.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":\"VeaOutboxArbToGnosisDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n uint256 internal constant RELAY_TIMEOUT = 604800; // 7 days\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(_timestamp + RELAY_TIMEOUT <= block.timestamp, \\\"Stale message. Timeout exceeded.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x4664c71e751b8e200bbd7e12e3a8fd371576b28dacbae1551350843c6682ecf9\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToGnosis/VeaOutboxArbToGnosis.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Chiado.\\n/// Note: This contract is deployed on Chiado.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosisDevnet The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _sequencerDelayLimit The maximum number of sequencer messages that can be submitted in a challenge period.\\n /// @param _routerChainId The chain id of the router contract.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosisDevnet,\\n uint256 _maxMissingBlocks,\\n uint256 _sequencerDelayLimit,\\n uint256 _routerChainId\\n )\\n VeaOutboxArbToGnosis(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _amb,\\n _routerArbToGnosisDevnet,\\n _maxMissingBlocks,\\n _sequencerDelayLimit,\\n _routerChainId\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xab3a39d2515db68f62fde6addb1d845b20e04dc70fb5dcb329b69e8309dbc4d1\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101c06040523480156200001257600080fd5b50604051620027813803806200278183398101604081905262000035916200010e565b60c08990526101408890526101808690526101608790526001600160a01b03808616608052841660a0526101a082905261012081905260048390558888888888888888886200008660028a620001a7565b60e0819052620000988a6002620001ca565b620000a49190620001ea565b6101005261014051600190620000bb9042620001a7565b620000c79190620001ea565b6001555050600580546001600160a01b0319163317905550620002009e505050505050505050505050505050565b6001600160a01b03811681146200010b57600080fd5b50565b60008060008060008060008060006101208a8c0312156200012e57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a01516200015781620000f5565b60a08b01519095506200016a81620000f5565b8094505060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001c557634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001e457620001e462000191565b92915050565b81810381811115620001e457620001e462000191565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516124256200035c600039600081816104a50152611df30152600081816104d9015281816108a00152818161181b015281816119a60152611bb20152600081816105610152611d8701526000818161050d015281816108c401528181610c55015281816117090152818161183f015281816119ca0152611bd601526000818161040e01528181610a3b0152610d6e01526000818161149601526115cf0152600081816114430152611587015260008181610595015281816106a1015281816108270152818161085401528181610f7e0152818161161f01528181611b1001528181611b770152611d1d0152600081816105c901528181610b280152610e5b0152600081816102240152818161093f015281816109b901528181610a9d01528181610c8a01528181610cec0152610dd001526124256000f3fe6080604052600436106101d85760003560e01c80638ad3a8f711610102578063b633b94411610095578063da2b7bc411610064578063da2b7bc4146105eb578063df19e6ff1461060b578063e813a75514610638578063eedcf2a91461064e57600080fd5b8063b633b9441461052f578063c2114a161461054f578063d0e30db014610583578063d5e6a9df146105b757600080fd5b80639588eca2116100d15780639588eca21461047d578063aa22a1c614610493578063b044397e146104c7578063b5b7a184146104fb57600080fd5b80638ad3a8f7146103dc5780638d96fdea146103fc57806390df63b714610430578063930f28af1461045d57600080fd5b806331d144571161017a57806349b4299e1161014957806349b4299e1461035c5780634a439cfe1461037c578063541adcca1461039c5780638a619a71146103bc57600080fd5b806331d14457146102e957806331ddf743146102fc5780633ce43cfd1461031c5780634788cb381461033c57600080fd5b8063222ae786116101b6578063222ae786146102635780632639c0601461028657806327ee6bdd146102b35780632c192519146102c957600080fd5b806301139b68146101dd5780630f0adca5146101f25780631062b39a14610212575b600080fd5b6101f06101eb366004611fb0565b610661565b005b3480156101fe57600080fd5b506101f061020d366004611fde565b61089e565b34801561021e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561026f57600080fd5b50610278610c4e565b60405190815260200161025a565b34801561029257600080fd5b506102786102a1366004612015565b60026020526000908152604090205481565b3480156102bf57600080fd5b5061027860015481565b3480156102d557600080fd5b506101f06102e436600461202e565b610c7f565b6101f06102f736600461202e565b610f65565b34801561030857600080fd5b506101f06103173660046120b1565b6110ec565b34801561032857600080fd5b506101f0610337366004612173565b61138c565b34801561034857600080fd5b506101f0610357366004611fb0565b6114d3565b34801561036857600080fd5b506101f0610377366004611fb0565b611657565b34801561038857600080fd5b50610278610397366004612015565b611702565b3480156103a857600080fd5b506102786103b73660046121ac565b611734565b3480156103c857600080fd5b506101f06103d73660046121cf565b611786565b3480156103e857600080fd5b50600554610246906001600160a01b031681565b34801561040857600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561043c57600080fd5b5061027861044b366004612015565b60036020526000908152604090205481565b34801561046957600080fd5b506101f0610478366004611fb0565b611819565b34801561048957600080fd5b5061027860005481565b34801561049f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d357600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561050757600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561053b57600080fd5b506101f061054a366004611fb0565b6119a4565b34801561055b57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561058f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c357600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f757600080fd5b506101f0610606366004611fb0565b611bb0565b34801561061757600080fd5b5061062b6106263660046121ac565b611d69565b60405161025a9190612202565b34801561064457600080fd5b5061027860045481565b6101f061065c36600461202e565b611e30565b61066a81611734565b6000838152600260205260409020541461069f5760405162461bcd60e51b81526004016106969061221c565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561070f5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610696565b60c08101516001600160a01b03161561076a5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610696565b60008160a001516002811115610782576107826121ec565b146107cf5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610696565b3360c08201526107de81611734565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f000000000000000000000000000000000000000000000000000000000000000034111561089a5760006108797f00000000000000000000000000000000000000000000000000000000000000003461225a565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816108f1576108f161226d565b040311156109345760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109b75760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190612283565b7f000000000000000000000000000000000000000000000000000000000000000014610a9b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1d919061229c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b905760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b60015483118015610ba057508115155b15610be357600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610bec81611734565b60008481526002602052604090205403610c49578051829003610c1557600160a0820152610c30565b60c08101516001600160a01b031615610c3057600260a08201525b610c3981611734565b6000848152600260205260409020555b505050565b6000610c7a7f0000000000000000000000000000000000000000000000000000000000000000426122b9565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cea5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6c9190612283565b7f000000000000000000000000000000000000000000000000000000000000000014610dce5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e50919061229c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610ec35760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b42610ed162093a80836122db565b1115610f1f5760405162461bcd60e51b815260206004820181905260248201527f5374616c65206d6573736167652e2054696d656f75742065786365656465642e6044820152606401610696565b816004541461089a5760048290556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6005546001600160a01b03163314610f7c57600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610fec5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610696565b806110095760405162461bcd60e51b81526004016106969061221c565b6000828152600260205260409020541561105b5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610696565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526110a190611734565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050565b6040851061112e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610696565b60008484848460405160200161114794939291906122ee565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156111c757600088888381811061118957611189612330565b905060200201359050828111156111ae578260005280602052604060002092506111be565b8060005282602052604060002092505b5060010161116d565b50806000541461120a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610696565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561127f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610696565b6000838152600360205260408082206001851b84179055516001600160a01b038916906112af9089908990612346565b6000604051808303816000865af19150503d80600081146112ec576040519150601f19603f3d011682016040523d82523d6000602084013e6112f1565b606091505b50509050806113425760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610696565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61139e6103b7368390038301836121ac565b600083815260026020526040902054146113ca5760405162461bcd60e51b81526004016106969061221c565b60026113dc60c0830160a08401612356565b60028111156113ed576113ed6121ec565b1461142e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610696565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061148893505060e0840191505060c083016121cf565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114dc81611734565b600083815260026020526040902054146115085760405162461bcd60e51b81526004016106969061221c565b60018160a001516002811115611520576115206121ec565b1461155d5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610696565b60008281526002602052604081205560c08101516001600160a01b031615611609576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6005546001600160a01b0316331461166e57600080fd5b61167781611734565b600083815260026020526040902054146116a35760405162461bcd60e51b81526004016106969061221c565b63ffffffff4281166060830152431660808201526116c081611734565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610f59565b600061172e7f0000000000000000000000000000000000000000000000000000000000000000836122b9565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611769989097969101612371565b604051602081830303815290604052805190602001209050919050565b6005546001600160a01b0316331461179d57600080fd5b6005546001600160a01b031633146117f75760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610696565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161186c5761186c61226d565b040311156118af5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b6118b881611734565b600083815260026020526040902054146118e45760405162461bcd60e51b81526004016106969061221c565b60c08101516001600160a01b0316156119365760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610696565b60015482111561197e57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261198e81611734565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119f7576119f761226d565b040311611a385760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611a4181611734565b60008381526002602052604090205414611a6d5760405162461bcd60e51b81526004016106969061221c565b60008160a001516002811115611a8557611a856121ec565b14611ac45760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60c08101516001600160a01b03161561089a5760208101516001600160a01b0316611b485760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b5c82611734565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c0357611c0361226d565b040311611c445760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611c4d81611734565b60008381526002602052604090205414611c795760405162461bcd60e51b81526004016106969061221c565b60008160a001516002811115611c9157611c916121ec565b14611cd05760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60208101516001600160a01b03161561089a5760c08101516001600160a01b0316611d555760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b5c82611734565b6000816060015163ffffffff16600003611d8557506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611dc157506003919050565b60006005836060015163ffffffff16420381611ddf57611ddf61226d565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611e235760019250611e28565b600092505b50505b919050565b611e3a8282610f65565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611e818382611657565b63ffffffff428116606083015243166080820152611e9f8382611819565b600160a0820152610c4983826114d3565b6001600160a01b0381168114611ec557600080fd5b50565b8035611e2b81611eb0565b803563ffffffff81168114611e2b57600080fd5b803560038110611e2b57600080fd5b600060e08284031215611f0857600080fd5b60405160e0810181811067ffffffffffffffff82111715611f3957634e487b7160e01b600052604160045260246000fd5b60405282358152905080611f4f60208401611ec8565b6020820152611f6060408401611ed3565b6040820152611f7160608401611ed3565b6060820152611f8260808401611ed3565b6080820152611f9360a08401611ee7565b60a0820152611fa460c08401611ec8565b60c08201525092915050565b6000806101008385031215611fc457600080fd5b82359150611fd58460208501611ef6565b90509250929050565b60008060006101208486031215611ff457600080fd5b833592506020840135915061200c8560408601611ef6565b90509250925092565b60006020828403121561202757600080fd5b5035919050565b6000806040838503121561204157600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611e2b57600080fd5b60008083601f84011261207a57600080fd5b50813567ffffffffffffffff81111561209257600080fd5b6020830191508360208285010111156120aa57600080fd5b9250929050565b600080600080600080608087890312156120ca57600080fd5b863567ffffffffffffffff808211156120e257600080fd5b818901915089601f8301126120f657600080fd5b81358181111561210557600080fd5b8a60208260051b850101111561211a57600080fd5b6020830198508097505061213060208a01612050565b955061213e60408a01611ec8565b9450606089013591508082111561215457600080fd5b5061216189828a01612068565b979a9699509497509295939492505050565b60008082840361010081121561218857600080fd5b8335925060e0601f198201121561219e57600080fd5b506020830190509250929050565b600060e082840312156121be57600080fd5b6121c88383611ef6565b9392505050565b6000602082840312156121e157600080fd5b81356121c881611eb0565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612216576122166121ec565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561172e5761172e612244565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561229557600080fd5b5051919050565b6000602082840312156122ae57600080fd5b81516121c881611eb0565b6000826122d657634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561172e5761172e612244565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561236857600080fd5b6121c882611ee7565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106123c9576123c96121ec565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220c7e915c2891f4ad92ffb181e2f021e77c9afd9d9dcb76bb23e8b47d577fec11c64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101d85760003560e01c80638ad3a8f711610102578063b633b94411610095578063da2b7bc411610064578063da2b7bc4146105eb578063df19e6ff1461060b578063e813a75514610638578063eedcf2a91461064e57600080fd5b8063b633b9441461052f578063c2114a161461054f578063d0e30db014610583578063d5e6a9df146105b757600080fd5b80639588eca2116100d15780639588eca21461047d578063aa22a1c614610493578063b044397e146104c7578063b5b7a184146104fb57600080fd5b80638ad3a8f7146103dc5780638d96fdea146103fc57806390df63b714610430578063930f28af1461045d57600080fd5b806331d144571161017a57806349b4299e1161014957806349b4299e1461035c5780634a439cfe1461037c578063541adcca1461039c5780638a619a71146103bc57600080fd5b806331d14457146102e957806331ddf743146102fc5780633ce43cfd1461031c5780634788cb381461033c57600080fd5b8063222ae786116101b6578063222ae786146102635780632639c0601461028657806327ee6bdd146102b35780632c192519146102c957600080fd5b806301139b68146101dd5780630f0adca5146101f25780631062b39a14610212575b600080fd5b6101f06101eb366004611fb0565b610661565b005b3480156101fe57600080fd5b506101f061020d366004611fde565b61089e565b34801561021e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561026f57600080fd5b50610278610c4e565b60405190815260200161025a565b34801561029257600080fd5b506102786102a1366004612015565b60026020526000908152604090205481565b3480156102bf57600080fd5b5061027860015481565b3480156102d557600080fd5b506101f06102e436600461202e565b610c7f565b6101f06102f736600461202e565b610f65565b34801561030857600080fd5b506101f06103173660046120b1565b6110ec565b34801561032857600080fd5b506101f0610337366004612173565b61138c565b34801561034857600080fd5b506101f0610357366004611fb0565b6114d3565b34801561036857600080fd5b506101f0610377366004611fb0565b611657565b34801561038857600080fd5b50610278610397366004612015565b611702565b3480156103a857600080fd5b506102786103b73660046121ac565b611734565b3480156103c857600080fd5b506101f06103d73660046121cf565b611786565b3480156103e857600080fd5b50600554610246906001600160a01b031681565b34801561040857600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561043c57600080fd5b5061027861044b366004612015565b60036020526000908152604090205481565b34801561046957600080fd5b506101f0610478366004611fb0565b611819565b34801561048957600080fd5b5061027860005481565b34801561049f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d357600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561050757600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561053b57600080fd5b506101f061054a366004611fb0565b6119a4565b34801561055b57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561058f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c357600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f757600080fd5b506101f0610606366004611fb0565b611bb0565b34801561061757600080fd5b5061062b6106263660046121ac565b611d69565b60405161025a9190612202565b34801561064457600080fd5b5061027860045481565b6101f061065c36600461202e565b611e30565b61066a81611734565b6000838152600260205260409020541461069f5760405162461bcd60e51b81526004016106969061221c565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561070f5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610696565b60c08101516001600160a01b03161561076a5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610696565b60008160a001516002811115610782576107826121ec565b146107cf5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610696565b3360c08201526107de81611734565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f000000000000000000000000000000000000000000000000000000000000000034111561089a5760006108797f00000000000000000000000000000000000000000000000000000000000000003461225a565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816108f1576108f161226d565b040311156109345760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109b75760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190612283565b7f000000000000000000000000000000000000000000000000000000000000000014610a9b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1d919061229c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b905760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b60015483118015610ba057508115155b15610be357600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610bec81611734565b60008481526002602052604090205403610c49578051829003610c1557600160a0820152610c30565b60c08101516001600160a01b031615610c3057600260a08201525b610c3981611734565b6000848152600260205260409020555b505050565b6000610c7a7f0000000000000000000000000000000000000000000000000000000000000000426122b9565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cea5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6c9190612283565b7f000000000000000000000000000000000000000000000000000000000000000014610dce5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e50919061229c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610ec35760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b42610ed162093a80836122db565b1115610f1f5760405162461bcd60e51b815260206004820181905260248201527f5374616c65206d6573736167652e2054696d656f75742065786365656465642e6044820152606401610696565b816004541461089a5760048290556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6005546001600160a01b03163314610f7c57600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610fec5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610696565b806110095760405162461bcd60e51b81526004016106969061221c565b6000828152600260205260409020541561105b5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610696565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526110a190611734565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050565b6040851061112e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610696565b60008484848460405160200161114794939291906122ee565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156111c757600088888381811061118957611189612330565b905060200201359050828111156111ae578260005280602052604060002092506111be565b8060005282602052604060002092505b5060010161116d565b50806000541461120a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610696565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561127f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610696565b6000838152600360205260408082206001851b84179055516001600160a01b038916906112af9089908990612346565b6000604051808303816000865af19150503d80600081146112ec576040519150601f19603f3d011682016040523d82523d6000602084013e6112f1565b606091505b50509050806113425760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610696565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61139e6103b7368390038301836121ac565b600083815260026020526040902054146113ca5760405162461bcd60e51b81526004016106969061221c565b60026113dc60c0830160a08401612356565b60028111156113ed576113ed6121ec565b1461142e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610696565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061148893505060e0840191505060c083016121cf565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114dc81611734565b600083815260026020526040902054146115085760405162461bcd60e51b81526004016106969061221c565b60018160a001516002811115611520576115206121ec565b1461155d5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610696565b60008281526002602052604081205560c08101516001600160a01b031615611609576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6005546001600160a01b0316331461166e57600080fd5b61167781611734565b600083815260026020526040902054146116a35760405162461bcd60e51b81526004016106969061221c565b63ffffffff4281166060830152431660808201526116c081611734565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610f59565b600061172e7f0000000000000000000000000000000000000000000000000000000000000000836122b9565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611769989097969101612371565b604051602081830303815290604052805190602001209050919050565b6005546001600160a01b0316331461179d57600080fd5b6005546001600160a01b031633146117f75760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610696565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161186c5761186c61226d565b040311156118af5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b6118b881611734565b600083815260026020526040902054146118e45760405162461bcd60e51b81526004016106969061221c565b60c08101516001600160a01b0316156119365760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610696565b60015482111561197e57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261198e81611734565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119f7576119f761226d565b040311611a385760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611a4181611734565b60008381526002602052604090205414611a6d5760405162461bcd60e51b81526004016106969061221c565b60008160a001516002811115611a8557611a856121ec565b14611ac45760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60c08101516001600160a01b03161561089a5760208101516001600160a01b0316611b485760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b5c82611734565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c0357611c0361226d565b040311611c445760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611c4d81611734565b60008381526002602052604090205414611c795760405162461bcd60e51b81526004016106969061221c565b60008160a001516002811115611c9157611c916121ec565b14611cd05760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60208101516001600160a01b03161561089a5760c08101516001600160a01b0316611d555760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b5c82611734565b6000816060015163ffffffff16600003611d8557506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611dc157506003919050565b60006005836060015163ffffffff16420381611ddf57611ddf61226d565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611e235760019250611e28565b600092505b50505b919050565b611e3a8282610f65565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611e818382611657565b63ffffffff428116606083015243166080820152611e9f8382611819565b600160a0820152610c4983826114d3565b6001600160a01b0381168114611ec557600080fd5b50565b8035611e2b81611eb0565b803563ffffffff81168114611e2b57600080fd5b803560038110611e2b57600080fd5b600060e08284031215611f0857600080fd5b60405160e0810181811067ffffffffffffffff82111715611f3957634e487b7160e01b600052604160045260246000fd5b60405282358152905080611f4f60208401611ec8565b6020820152611f6060408401611ed3565b6040820152611f7160608401611ed3565b6060820152611f8260808401611ed3565b6080820152611f9360a08401611ee7565b60a0820152611fa460c08401611ec8565b60c08201525092915050565b6000806101008385031215611fc457600080fd5b82359150611fd58460208501611ef6565b90509250929050565b60008060006101208486031215611ff457600080fd5b833592506020840135915061200c8560408601611ef6565b90509250925092565b60006020828403121561202757600080fd5b5035919050565b6000806040838503121561204157600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611e2b57600080fd5b60008083601f84011261207a57600080fd5b50813567ffffffffffffffff81111561209257600080fd5b6020830191508360208285010111156120aa57600080fd5b9250929050565b600080600080600080608087890312156120ca57600080fd5b863567ffffffffffffffff808211156120e257600080fd5b818901915089601f8301126120f657600080fd5b81358181111561210557600080fd5b8a60208260051b850101111561211a57600080fd5b6020830198508097505061213060208a01612050565b955061213e60408a01611ec8565b9450606089013591508082111561215457600080fd5b5061216189828a01612068565b979a9699509497509295939492505050565b60008082840361010081121561218857600080fd5b8335925060e0601f198201121561219e57600080fd5b506020830190509250929050565b600060e082840312156121be57600080fd5b6121c88383611ef6565b9392505050565b6000602082840312156121e157600080fd5b81356121c881611eb0565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612216576122166121ec565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561172e5761172e612244565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561229557600080fd5b5051919050565b6000602082840312156122ae57600080fd5b81516121c881611eb0565b6000826122d657634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561172e5761172e612244565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561236857600080fd5b6121c882611ee7565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106123c9576123c96121ec565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220c7e915c2891f4ad92ffb181e2f021e77c9afd9d9dcb76bb23e8b47d577fec11c64736f6c63430008120033", "devdoc": { "details": "Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).", "events": { @@ -1187,10 +1192,11 @@ "_epoch": "The epoch of the claim to challenge." } }, - "updateSequencerDelayLimit(uint256)": { + "updateSequencerDelayLimit(uint256,uint256)": { "details": "Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge", "params": { - "_newSequencerDelayLimit": "The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract." + "_newSequencerDelayLimit": "The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.", + "_timestamp": "The timestamp of the message." } }, "verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { @@ -1243,7 +1249,7 @@ "storageLayout": { "storage": [ { - "astId": 2542, + "astId": 1758, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "stateRoot", "offset": 0, @@ -1251,7 +1257,7 @@ "type": "t_bytes32" }, { - "astId": 2544, + "astId": 1760, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "latestVerifiedEpoch", "offset": 0, @@ -1259,7 +1265,7 @@ "type": "t_uint256" }, { - "astId": 2548, + "astId": 1764, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "claimHashes", "offset": 0, @@ -1267,7 +1273,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2552, + "astId": 1768, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "relayed", "offset": 0, @@ -1275,7 +1281,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2554, + "astId": 1770, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "sequencerDelayLimit", "offset": 0, @@ -1283,7 +1289,7 @@ "type": "t_uint256" }, { - "astId": 5915, + "astId": 3654, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "devnetOperator", "offset": 0, diff --git a/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json b/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json index c981bed3..86d7b7f6 100644 --- a/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json +++ b/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0xd7610CF459C13Ff22923692Ab023dF5a58DeA838", + "address": "0x0C3Acd25FE091b02e8E9b30B9b51dBD5d58C8a41", "abi": [ { "inputs": [ @@ -689,6 +689,11 @@ "internalType": "uint256", "name": "_newSequencerDelayLimit", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" } ], "name": "updateSequencerDelayLimit", @@ -972,19 +977,19 @@ "type": "function" } ], - "transactionHash": "0xedba060f9d5450f69b19698bbfa2b5322a20c0363b2f4646f179fd0a212d99f0", + "transactionHash": "0x22b51ce0806eb57ad174ea27d5d055183141e2d60a1c93a33c4a4ed605202911", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xd7610CF459C13Ff22923692Ab023dF5a58DeA838", - "transactionIndex": 0, - "gasUsed": "2127685", + "contractAddress": "0x0C3Acd25FE091b02e8E9b30B9b51dBD5d58C8a41", + "transactionIndex": 2, + "gasUsed": "2148221", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x4aa5277514da0accdd1dad27cff8c4a53fd016f0fc291e41b59f5d041ef4c3da", - "transactionHash": "0xedba060f9d5450f69b19698bbfa2b5322a20c0363b2f4646f179fd0a212d99f0", + "blockHash": "0x8634d00d14685fd8bcbe4bd4510dc49ceecf45654ad0806efb00945cd6ac0390", + "transactionHash": "0x22b51ce0806eb57ad174ea27d5d055183141e2d60a1c93a33c4a4ed605202911", "logs": [], - "blockNumber": 4486384, - "cumulativeGasUsed": "2127685", + "blockNumber": 4487064, + "cumulativeGasUsed": "2205785", "status": 1, "byzantium": true }, @@ -994,16 +999,16 @@ 10800, 1000000, "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0xbB800a318b5CeE079ADdBC6141A0BB1665793014", + "0x57566eBB95e855fdAeEe108Afa450005B12123Bb", 86400, 1000000, 5 ], - "numDeployments": 3, - "solcInputHash": "ad697f618f73759e1d99ca054913682f", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256)\":{\"details\":\"Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":\"VeaOutboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x2fe0351f519bd619887915bbe25f2b18d52f1170d6640f49698b3d4dc56d2601\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Arbitrum Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit) external;\\n}\",\"keccak256\":\"0xcf2532733ecd20779e259f12452b75f0ebda4965bc8aa2c8af041df908e632d3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101c06040523480156200001257600080fd5b5060405162002802380380620028028339810160408190526200003591620000ea565b60c08990526101408890526101808690526101608790526001600160a01b03808616608052841660a0526101a082905261012081905260048390556200007d60028a62000183565b60e08190526200008f8a6002620001a6565b6200009b9190620001c6565b6101005261014051600190620000b2904262000183565b620000be9190620001c6565b60015550620001dc975050505050505050565b6001600160a01b0381168114620000e757600080fd5b50565b60008060008060008060008060006101208a8c0312156200010a57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a01516200013381620000d1565b60a08b01519095506200014681620000d1565b8094505060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001a157634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001c057620001c06200016d565b92915050565b81810381811115620001c057620001c06200016d565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516124bc62000346600039600081816104440152611f0d0152600081816104780152818161082d015281816118cc01528181611ac00152611ccc0152600081816105000152611ea10152600081816104ac0152818161085101528181610be201528181610c7e01528181610d060152818161140a015281816115c4015281816118f001528181611ae40152611cf00152600081816103ad015281816109c80152611730015260006112210152600081816111ce01526113330152600081816105340152818161062d015281816107b4015281816107e101528181610c0e0152818161139601528181611c2a01528181611c910152611e3701526000818161056801528181610ab5015261181d015260008181610203015281816108cc0152818161094601528181610a2a0152818161164c015281816116ae015261179201526124bc6000f3fe6080604052600436106101b75760003560e01c80638d96fdea116100ec578063b633b9441161008a578063d5e6a9df11610064578063d5e6a9df14610556578063da2b7bc41461058a578063df19e6ff146105aa578063e813a755146105d757600080fd5b8063b633b944146104ce578063c2114a16146104ee578063d0e30db01461052257600080fd5b80639588eca2116100c65780639588eca21461041c578063aa22a1c614610432578063b044397e14610466578063b5b7a1841461049a57600080fd5b80638d96fdea1461039b57806390df63b7146103cf578063930f28af146103fc57600080fd5b806331ddf7431161015957806349b4299e1161013357806349b4299e1461031b5780634a439cfe1461033b578063541adcca1461035b578063654bc9651461037b57600080fd5b806331ddf743146102bb5780633ce43cfd146102db5780634788cb38146102fb57600080fd5b8063222ae78611610195578063222ae786146102425780632639c0601461026557806327ee6bdd1461029257806331d14457146102a857600080fd5b806301139b68146101bc5780630f0adca5146101d15780631062b39a146101f1575b600080fd5b6101cf6101ca366004612047565b6105ed565b005b3480156101dd57600080fd5b506101cf6101ec366004612075565b61082b565b3480156101fd57600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024e57600080fd5b50610257610bdb565b604051908152602001610239565b34801561027157600080fd5b506102576102803660046120ac565b60026020526000908152604090205481565b34801561029e57600080fd5b5061025760015481565b6101cf6102b63660046120c5565b610c0c565b3480156102c757600080fd5b506101cf6102d6366004612148565b610e77565b3480156102e757600080fd5b506101cf6102f636600461220a565b611117565b34801561030757600080fd5b506101cf61031636600461220a565b61125e565b34801561032757600080fd5b506101cf610336366004612047565b6113d3565b34801561034757600080fd5b506102576103563660046120ac565b6115bd565b34801561036757600080fd5b50610257610376366004612243565b6115ef565b34801561038757600080fd5b506101cf6103963660046120ac565b611641565b3480156103a757600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156103db57600080fd5b506102576103ea3660046120ac565b60036020526000908152604090205481565b34801561040857600080fd5b506101cf610417366004612047565b6118ca565b34801561042857600080fd5b5061025760005481565b34801561043e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561047257600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a657600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104da57600080fd5b506101cf6104e9366004612047565b611abe565b3480156104fa57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561052e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561056257600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b34801561059657600080fd5b506101cf6105a5366004612047565b611cca565b3480156105b657600080fd5b506105ca6105c5366004612243565b611e83565b604051610239919061227c565b3480156105e357600080fd5b5061025760045481565b6105f6816115ef565b6000838152600260205260409020541461062b5760405162461bcd60e51b815260040161062290612296565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561069b5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610622565b60c08101516001600160a01b0316156106f65760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610622565b60008160a00151600281111561070e5761070e612266565b1461075b5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610622565b3360c082015261076a816115ef565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108275760006108067f0000000000000000000000000000000000000000000000000000000000000000346122d4565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161087e5761087e6122e7565b040311156108c15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109445760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c691906122fd565b7f000000000000000000000000000000000000000000000000000000000000000014610a285760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aaa9190612316565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b1d5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b60015483118015610b2d57508115155b15610b7057600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b79816115ef565b60008481526002602052604090205403610bd6578051829003610ba257600160a0820152610bbd565b60c08101516001600160a01b031615610bbd57600260a08201525b610bc6816115ef565b6000848152600260205260409020555b505050565b6000610c077f000000000000000000000000000000000000000000000000000000000000000042612333565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c7c5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000004281610cab57610cab6122e7565b048210610cfa5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610622565b600454421115610d7e577f0000000000000000000000000000000000000000000000000000000000000000600454420381610d3757610d376122e7565b04826001011015610d7e5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610622565b80610d9b5760405162461bcd60e51b815260040161062290612296565b60008281526002602052604090205415610ded5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610622565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610e33906115ef565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107aa565b60408510610eb95760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610622565b600084848484604051602001610ed29493929190612355565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610f52576000888883818110610f1457610f14612397565b90506020020135905082811115610f3957826000528060205260406000209250610f49565b8060005282602052604060002092505b50600101610ef8565b508060005414610f955760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610622565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561100a5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610622565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061103a90899089906123ad565b6000604051808303816000865af19150503d8060008114611077576040519150601f19603f3d011682016040523d82523d6000602084013e61107c565b606091505b50509050806110cd5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610622565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61112961037636839003830183612243565b600083815260026020526040902054146111555760405162461bcd60e51b815260040161062290612296565b600261116760c0830160a084016123bd565b600281111561117857611178612266565b146111b95760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610622565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061121393505060e0840191505060c083016123d8565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61127061037636839003830183612243565b6000838152600260205260409020541461129c5760405162461bcd60e51b815260040161062290612296565b60016112ae60c0830160a084016123bd565b60028111156112bf576112bf612266565b146112fc5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610622565b600082815260026020526040812081905561131d60e0830160c084016123d8565b6001600160a01b031614611378576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061121393505060408401915050602083016123d8565b61138860408201602083016123d8565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6113dc816115ef565b600083815260026020526040902054146114085760405162461bcd60e51b815260040161062290612296565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff1661144191906123f5565b61144b91906123f5565b4210156114af5760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610622565b60006114ba82611e83565b905060028160038111156114d0576114d0612266565b14806114ed575060008160038111156114eb576114eb612266565b145b6115565760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610622565b63ffffffff428116606084015243166080830152611573826115ef565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115e97f000000000000000000000000000000000000000000000000000000000000000083612333565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611624989097969101612408565b604051602081830303815290604052805190602001209050919050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146116ac5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561170a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061172e91906122fd565b7f0000000000000000000000000000000000000000000000000000000000000000146117905760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118129190612316565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146118855760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b80600454146118c75760048190556040518181527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161191d5761191d6122e7565b040311156119605760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b611969816115ef565b600083815260026020526040902054146119955760405162461bcd60e51b815260040161062290612296565b60c08101516001600160a01b0316156119e75760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610622565b60016119f282611e83565b6003811115611a0357611a03612266565b14611a505760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610622565b600154821115611a9857600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611aa8816115ef565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b1157611b116122e7565b040311611b525760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611b5b816115ef565b60008381526002602052604090205414611b875760405162461bcd60e51b815260040161062290612296565b60008160a001516002811115611b9f57611b9f612266565b14611bde5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60c08101516001600160a01b0316156108275760208101516001600160a01b0316611c625760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611c76826115ef565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d1d57611d1d6122e7565b040311611d5e5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611d67816115ef565b60008381526002602052604090205414611d935760405162461bcd60e51b815260040161062290612296565b60008160a001516002811115611dab57611dab612266565b14611dea5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60208101516001600160a01b0316156108275760c08101516001600160a01b0316611e6f5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611c76826115ef565b6000816060015163ffffffff16600003611e9f57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611edb57506003919050565b60006005836060015163ffffffff16420381611ef957611ef96122e7565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611f3d5760019250611f42565b600092505b50505b919050565b6001600160a01b03811681146118c757600080fd5b8035611f4581611f4a565b803563ffffffff81168114611f4557600080fd5b803560038110611f4557600080fd5b600060e08284031215611f9f57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fd057634e487b7160e01b600052604160045260246000fd5b60405282358152905080611fe660208401611f5f565b6020820152611ff760408401611f6a565b604082015261200860608401611f6a565b606082015261201960808401611f6a565b608082015261202a60a08401611f7e565b60a082015261203b60c08401611f5f565b60c08201525092915050565b600080610100838503121561205b57600080fd5b8235915061206c8460208501611f8d565b90509250929050565b6000806000610120848603121561208b57600080fd5b83359250602084013591506120a38560408601611f8d565b90509250925092565b6000602082840312156120be57600080fd5b5035919050565b600080604083850312156120d857600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611f4557600080fd5b60008083601f84011261211157600080fd5b50813567ffffffffffffffff81111561212957600080fd5b60208301915083602082850101111561214157600080fd5b9250929050565b6000806000806000806080878903121561216157600080fd5b863567ffffffffffffffff8082111561217957600080fd5b818901915089601f83011261218d57600080fd5b81358181111561219c57600080fd5b8a60208260051b85010111156121b157600080fd5b602083019850809750506121c760208a016120e7565b95506121d560408a01611f5f565b945060608901359150808211156121eb57600080fd5b506121f889828a016120ff565b979a9699509497509295939492505050565b60008082840361010081121561221f57600080fd5b8335925060e0601f198201121561223557600080fd5b506020830190509250929050565b600060e0828403121561225557600080fd5b61225f8383611f8d565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061229057612290612266565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156115e9576115e96122be565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561230f57600080fd5b5051919050565b60006020828403121561232857600080fd5b815161225f81611f4a565b60008261235057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123cf57600080fd5b61225f82611f7e565b6000602082840312156123ea57600080fd5b813561225f81611f4a565b808201808211156115e9576115e96122be565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061246057612460612266565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212202f48efbf6c30927844c0e13e6d286c5c2cb35f34d6e8950bd36524eeadb3f08564736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101b75760003560e01c80638d96fdea116100ec578063b633b9441161008a578063d5e6a9df11610064578063d5e6a9df14610556578063da2b7bc41461058a578063df19e6ff146105aa578063e813a755146105d757600080fd5b8063b633b944146104ce578063c2114a16146104ee578063d0e30db01461052257600080fd5b80639588eca2116100c65780639588eca21461041c578063aa22a1c614610432578063b044397e14610466578063b5b7a1841461049a57600080fd5b80638d96fdea1461039b57806390df63b7146103cf578063930f28af146103fc57600080fd5b806331ddf7431161015957806349b4299e1161013357806349b4299e1461031b5780634a439cfe1461033b578063541adcca1461035b578063654bc9651461037b57600080fd5b806331ddf743146102bb5780633ce43cfd146102db5780634788cb38146102fb57600080fd5b8063222ae78611610195578063222ae786146102425780632639c0601461026557806327ee6bdd1461029257806331d14457146102a857600080fd5b806301139b68146101bc5780630f0adca5146101d15780631062b39a146101f1575b600080fd5b6101cf6101ca366004612047565b6105ed565b005b3480156101dd57600080fd5b506101cf6101ec366004612075565b61082b565b3480156101fd57600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024e57600080fd5b50610257610bdb565b604051908152602001610239565b34801561027157600080fd5b506102576102803660046120ac565b60026020526000908152604090205481565b34801561029e57600080fd5b5061025760015481565b6101cf6102b63660046120c5565b610c0c565b3480156102c757600080fd5b506101cf6102d6366004612148565b610e77565b3480156102e757600080fd5b506101cf6102f636600461220a565b611117565b34801561030757600080fd5b506101cf61031636600461220a565b61125e565b34801561032757600080fd5b506101cf610336366004612047565b6113d3565b34801561034757600080fd5b506102576103563660046120ac565b6115bd565b34801561036757600080fd5b50610257610376366004612243565b6115ef565b34801561038757600080fd5b506101cf6103963660046120ac565b611641565b3480156103a757600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156103db57600080fd5b506102576103ea3660046120ac565b60036020526000908152604090205481565b34801561040857600080fd5b506101cf610417366004612047565b6118ca565b34801561042857600080fd5b5061025760005481565b34801561043e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561047257600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a657600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104da57600080fd5b506101cf6104e9366004612047565b611abe565b3480156104fa57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561052e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561056257600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b34801561059657600080fd5b506101cf6105a5366004612047565b611cca565b3480156105b657600080fd5b506105ca6105c5366004612243565b611e83565b604051610239919061227c565b3480156105e357600080fd5b5061025760045481565b6105f6816115ef565b6000838152600260205260409020541461062b5760405162461bcd60e51b815260040161062290612296565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561069b5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610622565b60c08101516001600160a01b0316156106f65760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610622565b60008160a00151600281111561070e5761070e612266565b1461075b5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610622565b3360c082015261076a816115ef565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108275760006108067f0000000000000000000000000000000000000000000000000000000000000000346122d4565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161087e5761087e6122e7565b040311156108c15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109445760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c691906122fd565b7f000000000000000000000000000000000000000000000000000000000000000014610a285760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aaa9190612316565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b1d5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b60015483118015610b2d57508115155b15610b7057600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b79816115ef565b60008481526002602052604090205403610bd6578051829003610ba257600160a0820152610bbd565b60c08101516001600160a01b031615610bbd57600260a08201525b610bc6816115ef565b6000848152600260205260409020555b505050565b6000610c077f000000000000000000000000000000000000000000000000000000000000000042612333565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c7c5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000004281610cab57610cab6122e7565b048210610cfa5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610622565b600454421115610d7e577f0000000000000000000000000000000000000000000000000000000000000000600454420381610d3757610d376122e7565b04826001011015610d7e5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610622565b80610d9b5760405162461bcd60e51b815260040161062290612296565b60008281526002602052604090205415610ded5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610622565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610e33906115ef565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107aa565b60408510610eb95760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610622565b600084848484604051602001610ed29493929190612355565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610f52576000888883818110610f1457610f14612397565b90506020020135905082811115610f3957826000528060205260406000209250610f49565b8060005282602052604060002092505b50600101610ef8565b508060005414610f955760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610622565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561100a5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610622565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061103a90899089906123ad565b6000604051808303816000865af19150503d8060008114611077576040519150601f19603f3d011682016040523d82523d6000602084013e61107c565b606091505b50509050806110cd5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610622565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61112961037636839003830183612243565b600083815260026020526040902054146111555760405162461bcd60e51b815260040161062290612296565b600261116760c0830160a084016123bd565b600281111561117857611178612266565b146111b95760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610622565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061121393505060e0840191505060c083016123d8565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61127061037636839003830183612243565b6000838152600260205260409020541461129c5760405162461bcd60e51b815260040161062290612296565b60016112ae60c0830160a084016123bd565b60028111156112bf576112bf612266565b146112fc5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610622565b600082815260026020526040812081905561131d60e0830160c084016123d8565b6001600160a01b031614611378576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061121393505060408401915050602083016123d8565b61138860408201602083016123d8565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6113dc816115ef565b600083815260026020526040902054146114085760405162461bcd60e51b815260040161062290612296565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff1661144191906123f5565b61144b91906123f5565b4210156114af5760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610622565b60006114ba82611e83565b905060028160038111156114d0576114d0612266565b14806114ed575060008160038111156114eb576114eb612266565b145b6115565760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610622565b63ffffffff428116606084015243166080830152611573826115ef565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115e97f000000000000000000000000000000000000000000000000000000000000000083612333565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611624989097969101612408565b604051602081830303815290604052805190602001209050919050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146116ac5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561170a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061172e91906122fd565b7f0000000000000000000000000000000000000000000000000000000000000000146117905760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118129190612316565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146118855760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b80600454146118c75760048190556040518181527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161191d5761191d6122e7565b040311156119605760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b611969816115ef565b600083815260026020526040902054146119955760405162461bcd60e51b815260040161062290612296565b60c08101516001600160a01b0316156119e75760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610622565b60016119f282611e83565b6003811115611a0357611a03612266565b14611a505760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610622565b600154821115611a9857600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611aa8816115ef565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b1157611b116122e7565b040311611b525760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611b5b816115ef565b60008381526002602052604090205414611b875760405162461bcd60e51b815260040161062290612296565b60008160a001516002811115611b9f57611b9f612266565b14611bde5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60c08101516001600160a01b0316156108275760208101516001600160a01b0316611c625760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611c76826115ef565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d1d57611d1d6122e7565b040311611d5e5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611d67816115ef565b60008381526002602052604090205414611d935760405162461bcd60e51b815260040161062290612296565b60008160a001516002811115611dab57611dab612266565b14611dea5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60208101516001600160a01b0316156108275760c08101516001600160a01b0316611e6f5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611c76826115ef565b6000816060015163ffffffff16600003611e9f57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611edb57506003919050565b60006005836060015163ffffffff16420381611ef957611ef96122e7565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611f3d5760019250611f42565b600092505b50505b919050565b6001600160a01b03811681146118c757600080fd5b8035611f4581611f4a565b803563ffffffff81168114611f4557600080fd5b803560038110611f4557600080fd5b600060e08284031215611f9f57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fd057634e487b7160e01b600052604160045260246000fd5b60405282358152905080611fe660208401611f5f565b6020820152611ff760408401611f6a565b604082015261200860608401611f6a565b606082015261201960808401611f6a565b608082015261202a60a08401611f7e565b60a082015261203b60c08401611f5f565b60c08201525092915050565b600080610100838503121561205b57600080fd5b8235915061206c8460208501611f8d565b90509250929050565b6000806000610120848603121561208b57600080fd5b83359250602084013591506120a38560408601611f8d565b90509250925092565b6000602082840312156120be57600080fd5b5035919050565b600080604083850312156120d857600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611f4557600080fd5b60008083601f84011261211157600080fd5b50813567ffffffffffffffff81111561212957600080fd5b60208301915083602082850101111561214157600080fd5b9250929050565b6000806000806000806080878903121561216157600080fd5b863567ffffffffffffffff8082111561217957600080fd5b818901915089601f83011261218d57600080fd5b81358181111561219c57600080fd5b8a60208260051b85010111156121b157600080fd5b602083019850809750506121c760208a016120e7565b95506121d560408a01611f5f565b945060608901359150808211156121eb57600080fd5b506121f889828a016120ff565b979a9699509497509295939492505050565b60008082840361010081121561221f57600080fd5b8335925060e0601f198201121561223557600080fd5b506020830190509250929050565b600060e0828403121561225557600080fd5b61225f8383611f8d565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061229057612290612266565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156115e9576115e96122be565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561230f57600080fd5b5051919050565b60006020828403121561232857600080fd5b815161225f81611f4a565b60008261235057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123cf57600080fd5b61225f82611f7e565b6000602082840312156123ea57600080fd5b813561225f81611f4a565b808201808211156115e9576115e96122be565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061246057612460612266565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212202f48efbf6c30927844c0e13e6d286c5c2cb35f34d6e8950bd36524eeadb3f08564736f6c63430008120033", + "numDeployments": 4, + "solcInputHash": "cf76e8aad7d9ce9f21e3b6b1180c6852", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":\"VeaOutboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n uint256 internal constant RELAY_TIMEOUT = 604800; // 7 days\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(_timestamp + RELAY_TIMEOUT <= block.timestamp, \\\"Stale message. Timeout exceeded.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x4664c71e751b8e200bbd7e12e3a8fd371576b28dacbae1551350843c6682ecf9\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101c06040523480156200001257600080fd5b5060405162002861380380620028618339810160408190526200003591620000ea565b60c08990526101408890526101808690526101608790526001600160a01b03808616608052841660a0526101a082905261012081905260048390556200007d60028a62000183565b60e08190526200008f8a6002620001a6565b6200009b9190620001c6565b6101005261014051600190620000b2904262000183565b620000be9190620001c6565b60015550620001dc975050505050505050565b6001600160a01b0381168114620000e757600080fd5b50565b60008060008060008060008060006101208a8c0312156200010a57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a01516200013381620000d1565b60a08b01519095506200014681620000d1565b8094505060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001a157634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001c057620001c06200016d565b92915050565b81810381811115620001c057620001c06200016d565b60805160a05160c05160e05161010051610120516101405161016051610180516101a05161251b62000346600039600081816104440152611f690152600081816104780152818161082d0152818161192801528181611b1c0152611d280152600081816105000152611efd0152600081816104ac0152818161085101528181610be201528181610f6301528181610feb015281816116ef015281816118a90152818161194c01528181611b400152611d4c0152600081816103ad015281816109c80152610cfb015260006115060152600081816114b301526116180152600081816105340152818161062d015281816107b4015281816107e101528181610ef30152818161167b01528181611c8601528181611ced0152611e9301526000818161056801528181610ab50152610de8015260008181610203015281816108cc0152818161094601528181610a2a01528181610c1701528181610c790152610d5d015261251b6000f3fe6080604052600436106101b75760003560e01c80638d96fdea116100ec578063b633b9441161008a578063d5e6a9df11610064578063d5e6a9df14610556578063da2b7bc41461058a578063df19e6ff146105aa578063e813a755146105d757600080fd5b8063b633b944146104ce578063c2114a16146104ee578063d0e30db01461052257600080fd5b80639588eca2116100c65780639588eca21461041c578063aa22a1c614610432578063b044397e14610466578063b5b7a1841461049a57600080fd5b80638d96fdea1461039b57806390df63b7146103cf578063930f28af146103fc57600080fd5b806331d14457116101595780634788cb38116101335780634788cb381461031b57806349b4299e1461033b5780634a439cfe1461035b578063541adcca1461037b57600080fd5b806331d14457146102c857806331ddf743146102db5780633ce43cfd146102fb57600080fd5b8063222ae78611610195578063222ae786146102425780632639c0601461026557806327ee6bdd146102925780632c192519146102a857600080fd5b806301139b68146101bc5780630f0adca5146101d15780631062b39a146101f1575b600080fd5b6101cf6101ca3660046120a6565b6105ed565b005b3480156101dd57600080fd5b506101cf6101ec3660046120d4565b61082b565b3480156101fd57600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024e57600080fd5b50610257610bdb565b604051908152602001610239565b34801561027157600080fd5b5061025761028036600461210b565b60026020526000908152604090205481565b34801561029e57600080fd5b5061025760015481565b3480156102b457600080fd5b506101cf6102c3366004612124565b610c0c565b6101cf6102d6366004612124565b610ef1565b3480156102e757600080fd5b506101cf6102f63660046121a7565b61115c565b34801561030757600080fd5b506101cf610316366004612269565b6113fc565b34801561032757600080fd5b506101cf610336366004612269565b611543565b34801561034757600080fd5b506101cf6103563660046120a6565b6116b8565b34801561036757600080fd5b5061025761037636600461210b565b6118a2565b34801561038757600080fd5b506102576103963660046122a2565b6118d4565b3480156103a757600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156103db57600080fd5b506102576103ea36600461210b565b60036020526000908152604090205481565b34801561040857600080fd5b506101cf6104173660046120a6565b611926565b34801561042857600080fd5b5061025760005481565b34801561043e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561047257600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a657600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104da57600080fd5b506101cf6104e93660046120a6565b611b1a565b3480156104fa57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561052e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561056257600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b34801561059657600080fd5b506101cf6105a53660046120a6565b611d26565b3480156105b657600080fd5b506105ca6105c53660046122a2565b611edf565b60405161023991906122db565b3480156105e357600080fd5b5061025760045481565b6105f6816118d4565b6000838152600260205260409020541461062b5760405162461bcd60e51b8152600401610622906122f5565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561069b5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610622565b60c08101516001600160a01b0316156106f65760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610622565b60008160a00151600281111561070e5761070e6122c5565b1461075b5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610622565b3360c082015261076a816118d4565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108275760006108067f000000000000000000000000000000000000000000000000000000000000000034612333565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161087e5761087e612346565b040311156108c15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109445760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c6919061235c565b7f000000000000000000000000000000000000000000000000000000000000000014610a285760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aaa9190612375565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b1d5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b60015483118015610b2d57508115155b15610b7057600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b79816118d4565b60008481526002602052604090205403610bd6578051829003610ba257600160a0820152610bbd565b60c08101516001600160a01b031615610bbd57600260a08201525b610bc6816118d4565b6000848152600260205260409020555b505050565b6000610c077f000000000000000000000000000000000000000000000000000000000000000042612392565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c775760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf9919061235c565b7f000000000000000000000000000000000000000000000000000000000000000014610d5b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610db9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddd9190612375565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610e505760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b42610e5e62093a80836123b4565b1115610eac5760405162461bcd60e51b815260206004820181905260248201527f5374616c65206d6573736167652e2054696d656f75742065786365656465642e6044820152606401610622565b81600454146108275760048290556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15050565b7f0000000000000000000000000000000000000000000000000000000000000000341015610f615760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000004281610f9057610f90612346565b048210610fdf5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610622565b600454421115611063577f000000000000000000000000000000000000000000000000000000000000000060045442038161101c5761101c612346565b048260010110156110635760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610622565b806110805760405162461bcd60e51b8152600401610622906122f5565b600082815260026020526040902054156110d25760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610622565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611118906118d4565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107aa565b6040851061119e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610622565b6000848484846040516020016111b794939291906123c7565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156112375760008888838181106111f9576111f9612409565b9050602002013590508281111561121e5782600052806020526040600020925061122e565b8060005282602052604060002092505b506001016111dd565b50806000541461127a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610622565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112ef5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610622565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061131f908990899061241f565b6000604051808303816000865af19150503d806000811461135c576040519150601f19603f3d011682016040523d82523d6000602084013e611361565b606091505b50509050806113b25760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610622565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61140e610396368390038301836122a2565b6000838152600260205260409020541461143a5760405162461bcd60e51b8152600401610622906122f5565b600261144c60c0830160a0840161242f565b600281111561145d5761145d6122c5565b1461149e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610622565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114f893505060e0840191505060c0830161244a565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611555610396368390038301836122a2565b600083815260026020526040902054146115815760405162461bcd60e51b8152600401610622906122f5565b600161159360c0830160a0840161242f565b60028111156115a4576115a46122c5565b146115e15760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610622565b600082815260026020526040812081905561160260e0830160c0840161244a565b6001600160a01b03161461165d576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114f8935050604084019150506020830161244a565b61166d604082016020830161244a565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6116c1816118d4565b600083815260026020526040902054146116ed5760405162461bcd60e51b8152600401610622906122f5565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff1661172691906123b4565b61173091906123b4565b4210156117945760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610622565b600061179f82611edf565b905060028160038111156117b5576117b56122c5565b14806117d2575060008160038111156117d0576117d06122c5565b145b61183b5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610622565b63ffffffff428116606084015243166080830152611858826118d4565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006118ce7f000000000000000000000000000000000000000000000000000000000000000083612392565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611909989097969101612467565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161197957611979612346565b040311156119bc5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b6119c5816118d4565b600083815260026020526040902054146119f15760405162461bcd60e51b8152600401610622906122f5565b60c08101516001600160a01b031615611a435760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610622565b6001611a4e82611edf565b6003811115611a5f57611a5f6122c5565b14611aac5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610622565b600154821115611af457600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b04816118d4565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b6d57611b6d612346565b040311611bae5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611bb7816118d4565b60008381526002602052604090205414611be35760405162461bcd60e51b8152600401610622906122f5565b60008160a001516002811115611bfb57611bfb6122c5565b14611c3a5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60c08101516001600160a01b0316156108275760208101516001600160a01b0316611cbe5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611cd2826118d4565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d7957611d79612346565b040311611dba5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611dc3816118d4565b60008381526002602052604090205414611def5760405162461bcd60e51b8152600401610622906122f5565b60008160a001516002811115611e0757611e076122c5565b14611e465760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60208101516001600160a01b0316156108275760c08101516001600160a01b0316611ecb5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611cd2826118d4565b6000816060015163ffffffff16600003611efb57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f3757506003919050565b60006005836060015163ffffffff16420381611f5557611f55612346565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611f995760019250611f9e565b600092505b50505b919050565b6001600160a01b0381168114611fbb57600080fd5b50565b8035611fa181611fa6565b803563ffffffff81168114611fa157600080fd5b803560038110611fa157600080fd5b600060e08284031215611ffe57600080fd5b60405160e0810181811067ffffffffffffffff8211171561202f57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061204560208401611fbe565b602082015261205660408401611fc9565b604082015261206760608401611fc9565b606082015261207860808401611fc9565b608082015261208960a08401611fdd565b60a082015261209a60c08401611fbe565b60c08201525092915050565b60008061010083850312156120ba57600080fd5b823591506120cb8460208501611fec565b90509250929050565b600080600061012084860312156120ea57600080fd5b83359250602084013591506121028560408601611fec565b90509250925092565b60006020828403121561211d57600080fd5b5035919050565b6000806040838503121561213757600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611fa157600080fd5b60008083601f84011261217057600080fd5b50813567ffffffffffffffff81111561218857600080fd5b6020830191508360208285010111156121a057600080fd5b9250929050565b600080600080600080608087890312156121c057600080fd5b863567ffffffffffffffff808211156121d857600080fd5b818901915089601f8301126121ec57600080fd5b8135818111156121fb57600080fd5b8a60208260051b850101111561221057600080fd5b6020830198508097505061222660208a01612146565b955061223460408a01611fbe565b9450606089013591508082111561224a57600080fd5b5061225789828a0161215e565b979a9699509497509295939492505050565b60008082840361010081121561227e57600080fd5b8335925060e0601f198201121561229457600080fd5b506020830190509250929050565b600060e082840312156122b457600080fd5b6122be8383611fec565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122ef576122ef6122c5565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156118ce576118ce61231d565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561236e57600080fd5b5051919050565b60006020828403121561238757600080fd5b81516122be81611fa6565b6000826123af57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156118ce576118ce61231d565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561244157600080fd5b6122be82611fdd565b60006020828403121561245c57600080fd5b81356122be81611fa6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124bf576124bf6122c5565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220dc52a083027e3b0a5f0b7e6947ea2cb170949ac24beb520f37f652ab5b1e0d1b64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101b75760003560e01c80638d96fdea116100ec578063b633b9441161008a578063d5e6a9df11610064578063d5e6a9df14610556578063da2b7bc41461058a578063df19e6ff146105aa578063e813a755146105d757600080fd5b8063b633b944146104ce578063c2114a16146104ee578063d0e30db01461052257600080fd5b80639588eca2116100c65780639588eca21461041c578063aa22a1c614610432578063b044397e14610466578063b5b7a1841461049a57600080fd5b80638d96fdea1461039b57806390df63b7146103cf578063930f28af146103fc57600080fd5b806331d14457116101595780634788cb38116101335780634788cb381461031b57806349b4299e1461033b5780634a439cfe1461035b578063541adcca1461037b57600080fd5b806331d14457146102c857806331ddf743146102db5780633ce43cfd146102fb57600080fd5b8063222ae78611610195578063222ae786146102425780632639c0601461026557806327ee6bdd146102925780632c192519146102a857600080fd5b806301139b68146101bc5780630f0adca5146101d15780631062b39a146101f1575b600080fd5b6101cf6101ca3660046120a6565b6105ed565b005b3480156101dd57600080fd5b506101cf6101ec3660046120d4565b61082b565b3480156101fd57600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024e57600080fd5b50610257610bdb565b604051908152602001610239565b34801561027157600080fd5b5061025761028036600461210b565b60026020526000908152604090205481565b34801561029e57600080fd5b5061025760015481565b3480156102b457600080fd5b506101cf6102c3366004612124565b610c0c565b6101cf6102d6366004612124565b610ef1565b3480156102e757600080fd5b506101cf6102f63660046121a7565b61115c565b34801561030757600080fd5b506101cf610316366004612269565b6113fc565b34801561032757600080fd5b506101cf610336366004612269565b611543565b34801561034757600080fd5b506101cf6103563660046120a6565b6116b8565b34801561036757600080fd5b5061025761037636600461210b565b6118a2565b34801561038757600080fd5b506102576103963660046122a2565b6118d4565b3480156103a757600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156103db57600080fd5b506102576103ea36600461210b565b60036020526000908152604090205481565b34801561040857600080fd5b506101cf6104173660046120a6565b611926565b34801561042857600080fd5b5061025760005481565b34801561043e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561047257600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a657600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104da57600080fd5b506101cf6104e93660046120a6565b611b1a565b3480156104fa57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561052e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561056257600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b34801561059657600080fd5b506101cf6105a53660046120a6565b611d26565b3480156105b657600080fd5b506105ca6105c53660046122a2565b611edf565b60405161023991906122db565b3480156105e357600080fd5b5061025760045481565b6105f6816118d4565b6000838152600260205260409020541461062b5760405162461bcd60e51b8152600401610622906122f5565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561069b5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610622565b60c08101516001600160a01b0316156106f65760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610622565b60008160a00151600281111561070e5761070e6122c5565b1461075b5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610622565b3360c082015261076a816118d4565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108275760006108067f000000000000000000000000000000000000000000000000000000000000000034612333565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161087e5761087e612346565b040311156108c15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109445760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c6919061235c565b7f000000000000000000000000000000000000000000000000000000000000000014610a285760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aaa9190612375565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b1d5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b60015483118015610b2d57508115155b15610b7057600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b79816118d4565b60008481526002602052604090205403610bd6578051829003610ba257600160a0820152610bbd565b60c08101516001600160a01b031615610bbd57600260a08201525b610bc6816118d4565b6000848152600260205260409020555b505050565b6000610c077f000000000000000000000000000000000000000000000000000000000000000042612392565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c775760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf9919061235c565b7f000000000000000000000000000000000000000000000000000000000000000014610d5b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610db9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddd9190612375565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610e505760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b42610e5e62093a80836123b4565b1115610eac5760405162461bcd60e51b815260206004820181905260248201527f5374616c65206d6573736167652e2054696d656f75742065786365656465642e6044820152606401610622565b81600454146108275760048290556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15050565b7f0000000000000000000000000000000000000000000000000000000000000000341015610f615760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000004281610f9057610f90612346565b048210610fdf5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610622565b600454421115611063577f000000000000000000000000000000000000000000000000000000000000000060045442038161101c5761101c612346565b048260010110156110635760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610622565b806110805760405162461bcd60e51b8152600401610622906122f5565b600082815260026020526040902054156110d25760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610622565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611118906118d4565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107aa565b6040851061119e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610622565b6000848484846040516020016111b794939291906123c7565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156112375760008888838181106111f9576111f9612409565b9050602002013590508281111561121e5782600052806020526040600020925061122e565b8060005282602052604060002092505b506001016111dd565b50806000541461127a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610622565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112ef5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610622565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061131f908990899061241f565b6000604051808303816000865af19150503d806000811461135c576040519150601f19603f3d011682016040523d82523d6000602084013e611361565b606091505b50509050806113b25760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610622565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61140e610396368390038301836122a2565b6000838152600260205260409020541461143a5760405162461bcd60e51b8152600401610622906122f5565b600261144c60c0830160a0840161242f565b600281111561145d5761145d6122c5565b1461149e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610622565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114f893505060e0840191505060c0830161244a565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611555610396368390038301836122a2565b600083815260026020526040902054146115815760405162461bcd60e51b8152600401610622906122f5565b600161159360c0830160a0840161242f565b60028111156115a4576115a46122c5565b146115e15760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610622565b600082815260026020526040812081905561160260e0830160c0840161244a565b6001600160a01b03161461165d576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114f8935050604084019150506020830161244a565b61166d604082016020830161244a565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6116c1816118d4565b600083815260026020526040902054146116ed5760405162461bcd60e51b8152600401610622906122f5565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff1661172691906123b4565b61173091906123b4565b4210156117945760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610622565b600061179f82611edf565b905060028160038111156117b5576117b56122c5565b14806117d2575060008160038111156117d0576117d06122c5565b145b61183b5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610622565b63ffffffff428116606084015243166080830152611858826118d4565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006118ce7f000000000000000000000000000000000000000000000000000000000000000083612392565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611909989097969101612467565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161197957611979612346565b040311156119bc5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b6119c5816118d4565b600083815260026020526040902054146119f15760405162461bcd60e51b8152600401610622906122f5565b60c08101516001600160a01b031615611a435760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610622565b6001611a4e82611edf565b6003811115611a5f57611a5f6122c5565b14611aac5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610622565b600154821115611af457600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b04816118d4565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b6d57611b6d612346565b040311611bae5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611bb7816118d4565b60008381526002602052604090205414611be35760405162461bcd60e51b8152600401610622906122f5565b60008160a001516002811115611bfb57611bfb6122c5565b14611c3a5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60c08101516001600160a01b0316156108275760208101516001600160a01b0316611cbe5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611cd2826118d4565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d7957611d79612346565b040311611dba5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611dc3816118d4565b60008381526002602052604090205414611def5760405162461bcd60e51b8152600401610622906122f5565b60008160a001516002811115611e0757611e076122c5565b14611e465760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60208101516001600160a01b0316156108275760c08101516001600160a01b0316611ecb5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611cd2826118d4565b6000816060015163ffffffff16600003611efb57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f3757506003919050565b60006005836060015163ffffffff16420381611f5557611f55612346565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611f995760019250611f9e565b600092505b50505b919050565b6001600160a01b0381168114611fbb57600080fd5b50565b8035611fa181611fa6565b803563ffffffff81168114611fa157600080fd5b803560038110611fa157600080fd5b600060e08284031215611ffe57600080fd5b60405160e0810181811067ffffffffffffffff8211171561202f57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061204560208401611fbe565b602082015261205660408401611fc9565b604082015261206760608401611fc9565b606082015261207860808401611fc9565b608082015261208960a08401611fdd565b60a082015261209a60c08401611fbe565b60c08201525092915050565b60008061010083850312156120ba57600080fd5b823591506120cb8460208501611fec565b90509250929050565b600080600061012084860312156120ea57600080fd5b83359250602084013591506121028560408601611fec565b90509250925092565b60006020828403121561211d57600080fd5b5035919050565b6000806040838503121561213757600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611fa157600080fd5b60008083601f84011261217057600080fd5b50813567ffffffffffffffff81111561218857600080fd5b6020830191508360208285010111156121a057600080fd5b9250929050565b600080600080600080608087890312156121c057600080fd5b863567ffffffffffffffff808211156121d857600080fd5b818901915089601f8301126121ec57600080fd5b8135818111156121fb57600080fd5b8a60208260051b850101111561221057600080fd5b6020830198508097505061222660208a01612146565b955061223460408a01611fbe565b9450606089013591508082111561224a57600080fd5b5061225789828a0161215e565b979a9699509497509295939492505050565b60008082840361010081121561227e57600080fd5b8335925060e0601f198201121561229457600080fd5b506020830190509250929050565b600060e082840312156122b457600080fd5b6122be8383611fec565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122ef576122ef6122c5565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156118ce576118ce61231d565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561236e57600080fd5b5051919050565b60006020828403121561238757600080fd5b81516122be81611fa6565b6000826123af57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156118ce576118ce61231d565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561244157600080fd5b6122be82611fdd565b60006020828403121561245c57600080fd5b81356122be81611fa6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124bf576124bf6122c5565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220dc52a083027e3b0a5f0b7e6947ea2cb170949ac24beb520f37f652ab5b1e0d1b64736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.", "events": { @@ -1130,10 +1135,11 @@ "_epoch": "The epoch of the claim to challenge." } }, - "updateSequencerDelayLimit(uint256)": { + "updateSequencerDelayLimit(uint256,uint256)": { "details": "Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge", "params": { - "_newSequencerDelayLimit": "The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract." + "_newSequencerDelayLimit": "The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.", + "_timestamp": "The timestamp of the message." } }, "verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { @@ -1186,7 +1192,7 @@ "storageLayout": { "storage": [ { - "astId": 2542, + "astId": 1758, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "stateRoot", "offset": 0, @@ -1194,7 +1200,7 @@ "type": "t_bytes32" }, { - "astId": 2544, + "astId": 1760, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "latestVerifiedEpoch", "offset": 0, @@ -1202,7 +1208,7 @@ "type": "t_uint256" }, { - "astId": 2548, + "astId": 1764, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "claimHashes", "offset": 0, @@ -1210,7 +1216,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2552, + "astId": 1768, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "relayed", "offset": 0, @@ -1218,7 +1224,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2554, + "astId": 1770, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "sequencerDelayLimit", "offset": 0, diff --git a/contracts/deployments/goerli/RouterArbToGnosisDevnet.json b/contracts/deployments/goerli/RouterArbToGnosisDevnet.json index e9e6f485..02f9526b 100644 --- a/contracts/deployments/goerli/RouterArbToGnosisDevnet.json +++ b/contracts/deployments/goerli/RouterArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xF767226FD5d9A8BbC4d99462175905cB6c1adA04", + "address": "0x696567a5F0A6DD4aAe1dBa6ddB4c977aB5B07CAC", "abi": [ { "inputs": [ @@ -178,6 +178,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "sendSequencerDelayLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "sequencerDelayLimit", @@ -243,33 +250,33 @@ "type": "function" } ], - "transactionHash": "0x7d3e99aecdc8ea7e61688aa0115a38859f3db688fad94f6288ab7642174c7f25", + "transactionHash": "0xb59090074f39a2e01aa2764da827b1bfbdc7b77c769a9df5128b4f1d011b29bb", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xF767226FD5d9A8BbC4d99462175905cB6c1adA04", - "transactionIndex": 56, - "gasUsed": "852769", + "contractAddress": "0x696567a5F0A6DD4aAe1dBa6ddB4c977aB5B07CAC", + "transactionIndex": 34, + "gasUsed": "853441", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7c4e0320332d6dbf0a4f5d8b212bcbcab8d200a995ccd217754cf882f67ac262", - "transactionHash": "0x7d3e99aecdc8ea7e61688aa0115a38859f3db688fad94f6288ab7642174c7f25", + "blockHash": "0x96acf68d33958b271dd8b71ef577ab923454b92ebad52065e616bbd3ddb64403", + "transactionHash": "0xb59090074f39a2e01aa2764da827b1bfbdc7b77c769a9df5128b4f1d011b29bb", "logs": [], - "blockNumber": 9186609, - "cumulativeGasUsed": "6009492", + "blockNumber": 9186823, + "cumulativeGasUsed": "7521312", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0xf9F4501AF2447210219d1393450a83933293a4Fd", - "0xa117A3B8527133EB4CC2006F3F5b7e0cCC7298B5" + "0xEC337Fb9977848D0784dC4F01A69c237691755E0", + "0x00f0A751C921B937208e49a92fAaeaF896733544" ], - "numDeployments": 11, - "solcInputHash": "ad697f618f73759e1d99ca054913682f", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n sendsequencerDelayLimit();\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(sequencerDelayLimitDecreaseRequest.timestamp == 0, \\\"Sequencer limit decrease request already pending.\\\");\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n sendsequencerDelayLimit();\\n }\\n }\\n\\n /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n function sendsequencerDelayLimit() internal {\\n bytes memory data = abi.encodeCall(ISequencerDelayUpdatable.updateSequencerDelayLimit, sequencerDelayLimit);\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xcfbeaee85e255366b9ada686378d200a04fa63eadc6f925cae5056cdcac10e01\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Arbitrum Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit) external;\\n}\",\"keccak256\":\"0xcf2532733ecd20779e259f12452b75f0ebda4965bc8aa2c8af041df908e632d3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101006040523480156200001257600080fd5b5060405162000fe238038062000fe2833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610d5d62000285600039600081816101040152818161082401526109bd01526000818161012b015261064901526000818160c5015281816107fb0152610994015260008181610164015281816101b4015281816104bc015281816105e701526106730152610d5d6000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806390784ae81161006657806390784ae81461014d578063cb93846814610157578063e78cea921461015f578063e813a75514610186578063f6ee5b761461019d57600080fd5b8063051d1970146100985780631062b39a146100c05780632fa70aa7146100ff5780638c5f173f14610126575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6101556101b0565b005b6101556103b0565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b61018f60005481565b6040519081526020016100b7565b6101556101ab366004610aca565b6105dc565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610210573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102349190610b21565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610271573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102959190610b45565b50925050506000548111156102e75760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a16102e4610935565b50565b6000548110156102e457600254156103605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a150565b6002546000036104175760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610357565b6000546002546104279190610b7b565b42116104905760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610357565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610507573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052b9190610b21565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610568573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058c9190610b45565b50925050508181036105d85760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a16105d8610935565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106475760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610357565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f39190610b21565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107549190610b21565b6001600160a01b03161461079b5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610357565b60008383836040516024016107b293929190610bf7565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561086d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108919190610ca9565b6040518463ffffffff1660e01b81526004016108af93929190610cc2565b6020604051808303816000875af11580156108ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f29190610ca9565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092691815260200190565b60405180910390a25050505050565b6000805460405160240161094b91815260200190565b60408051601f19818403018152918152602080830180516001600160e01b031663654bc96560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2a9190610ca9565b6040518463ffffffff1660e01b8152600401610a4893929190610cc2565b6020604051808303816000875af1158015610a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8b9190610ca9565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d68781604051610abe91815260200190565b60405180910390a15050565b6000806000838503610120811215610ae157600080fd5b843593506020850135925060e0603f1982011215610afe57600080fd5b506040840190509250925092565b6001600160a01b03811681146102e457600080fd5b600060208284031215610b3357600080fd5b8151610b3e81610b0c565b9392505050565b60008060008060808587031215610b5b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b80820180821115610b9c57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610bad81610b0c565b919050565b803563ffffffff81168114610bad57600080fd5b803560038110610bad57600080fd5b60038110610bf357634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1b81610b0c565b6001600160a01b03166060830152610c3560408401610bb2565b63ffffffff808216608085015280610c4f60608701610bb2565b1660a085015280610c6260808701610bb2565b1660c08501525050610c7660a08401610bc6565b610c8360e0840182610bd5565b50610c9060c08401610ba2565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cbb57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cfe57868101830151858201608001528201610ce2565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220ca5f95de8c0945391fbe8da8f400ec24c8072b75798aedd171f8357c61d8780264736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c806390784ae81161006657806390784ae81461014d578063cb93846814610157578063e78cea921461015f578063e813a75514610186578063f6ee5b761461019d57600080fd5b8063051d1970146100985780631062b39a146100c05780632fa70aa7146100ff5780638c5f173f14610126575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6101556101b0565b005b6101556103b0565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b61018f60005481565b6040519081526020016100b7565b6101556101ab366004610aca565b6105dc565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610210573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102349190610b21565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610271573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102959190610b45565b50925050506000548111156102e75760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a16102e4610935565b50565b6000548110156102e457600254156103605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a150565b6002546000036104175760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610357565b6000546002546104279190610b7b565b42116104905760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610357565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610507573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052b9190610b21565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610568573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058c9190610b45565b50925050508181036105d85760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a16105d8610935565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106475760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610357565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f39190610b21565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107549190610b21565b6001600160a01b03161461079b5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610357565b60008383836040516024016107b293929190610bf7565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561086d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108919190610ca9565b6040518463ffffffff1660e01b81526004016108af93929190610cc2565b6020604051808303816000875af11580156108ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f29190610ca9565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092691815260200190565b60405180910390a25050505050565b6000805460405160240161094b91815260200190565b60408051601f19818403018152918152602080830180516001600160e01b031663654bc96560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2a9190610ca9565b6040518463ffffffff1660e01b8152600401610a4893929190610cc2565b6020604051808303816000875af1158015610a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8b9190610ca9565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d68781604051610abe91815260200190565b60405180910390a15050565b6000806000838503610120811215610ae157600080fd5b843593506020850135925060e0603f1982011215610afe57600080fd5b506040840190509250925092565b6001600160a01b03811681146102e457600080fd5b600060208284031215610b3357600080fd5b8151610b3e81610b0c565b9392505050565b60008060008060808587031215610b5b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b80820180821115610b9c57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610bad81610b0c565b919050565b803563ffffffff81168114610bad57600080fd5b803560038110610bad57600080fd5b60038110610bf357634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1b81610b0c565b6001600160a01b03166060830152610c3560408401610bb2565b63ffffffff808216608085015280610c4f60608701610bb2565b1660a085015280610c6260808701610bb2565b1660c08501525050610c7660a08401610bc6565b610c8360e0840182610bd5565b50610c9060c08401610ba2565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cbb57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cfe57868101830151858201608001528201610ce2565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220ca5f95de8c0945391fbe8da8f400ec24c8072b75798aedd171f8357c61d8780264736f6c63430008120033", + "numDeployments": 12, + "solcInputHash": "cf76e8aad7d9ce9f21e3b6b1180c6852", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sendSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"sendSequencerDelayLimit()\":{\"details\":\"Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\"},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n function sendSequencerDelayLimit() public {\\n bytes memory data = abi.encodeCall(ISequencerDelayUpdatable.updateSequencerDelayLimit, (sequencerDelayLimit, block.timestamp));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xf96670a60b3706d0e80ed951e7c4dac37317c439419fc0638dcddb3dc99a0d38\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b5060405162000fe538038062000fe5833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610d60620002856000396000818161010f0152818161044601526109bc01526000818161013601526107e101526000818160d00152818161041d0152610993015260008181610177015281816101c70152818161065f0152818161077f015261080b0152610d606000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a41a2faa11610066578063a41a2faa14610162578063cb9384681461016a578063e78cea9214610172578063e813a75514610199578063f6ee5b76146101b057600080fd5b8063051d1970146100a35780631062b39a146100cb5780632fa70aa71461010a5780638c5f173f1461013157806390784ae814610158575b600080fd5b6001546002546100b1919082565b604080519283526020830191909152015b60405180910390f35b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101606101c3565b005b6101606103bc565b610160610553565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100c2565b6101606101be366004610acd565b610774565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a89190610b48565b50925050506000548111156102f25760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156103b9576002541561036b5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561048f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b39190610b7e565b6040518463ffffffff1660e01b81526004016104d193929190610b97565b6020604051808303816000875af11580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190610b7e565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d6878160405161054791815260200190565b60405180910390a15050565b6002546000036105ba5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610362565b6000546002546105ca9190610bfc565b42116106335760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610362565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156106aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce9190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561070b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072f9190610b48565b50925050508181036107705760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b90602001610547565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107df5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610362565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088b9190610b24565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ec9190610b24565b6001600160a01b0316146109335760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610362565b600083838360405160240161094a93929190610c78565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a299190610b7e565b6040518463ffffffff1660e01b8152600401610a4793929190610b97565b6020604051808303816000875af1158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a9190610b7e565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d99355482604051610abe91815260200190565b60405180910390a25050505050565b6000806000838503610120811215610ae457600080fd5b843593506020850135925060e0603f1982011215610b0157600080fd5b506040840190509250925092565b6001600160a01b03811681146103b957600080fd5b600060208284031215610b3657600080fd5b8151610b4181610b0f565b9392505050565b60008060008060808587031215610b5e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b600060208284031215610b9057600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610bd357868101830151858201608001528201610bb7565b506000608082860101526080601f19601f83011685010192505050826040830152949350505050565b80820180821115610c1d57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610c2e81610b0f565b919050565b803563ffffffff81168114610c2e57600080fd5b803560038110610c2e57600080fd5b60038110610c7457634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c9c81610b0f565b6001600160a01b03166060830152610cb660408401610c33565b63ffffffff808216608085015280610cd060608701610c33565b1660a085015280610ce360808701610c33565b1660c08501525050610cf760a08401610c47565b610d0460e0840182610c56565b50610d1160c08401610c23565b6001600160a01b0381166101008401525094935050505056fea26469706673582212207cb55b40610a180f18a841525380bad6ae05812ccbd20da0962c409dcb5df76264736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a41a2faa11610066578063a41a2faa14610162578063cb9384681461016a578063e78cea9214610172578063e813a75514610199578063f6ee5b76146101b057600080fd5b8063051d1970146100a35780631062b39a146100cb5780632fa70aa71461010a5780638c5f173f1461013157806390784ae814610158575b600080fd5b6001546002546100b1919082565b604080519283526020830191909152015b60405180910390f35b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101606101c3565b005b6101606103bc565b610160610553565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100c2565b6101606101be366004610acd565b610774565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a89190610b48565b50925050506000548111156102f25760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156103b9576002541561036b5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561048f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b39190610b7e565b6040518463ffffffff1660e01b81526004016104d193929190610b97565b6020604051808303816000875af11580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190610b7e565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d6878160405161054791815260200190565b60405180910390a15050565b6002546000036105ba5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610362565b6000546002546105ca9190610bfc565b42116106335760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610362565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156106aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce9190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561070b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072f9190610b48565b50925050508181036107705760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b90602001610547565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107df5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610362565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088b9190610b24565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ec9190610b24565b6001600160a01b0316146109335760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610362565b600083838360405160240161094a93929190610c78565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a299190610b7e565b6040518463ffffffff1660e01b8152600401610a4793929190610b97565b6020604051808303816000875af1158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a9190610b7e565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d99355482604051610abe91815260200190565b60405180910390a25050505050565b6000806000838503610120811215610ae457600080fd5b843593506020850135925060e0603f1982011215610b0157600080fd5b506040840190509250925092565b6001600160a01b03811681146103b957600080fd5b600060208284031215610b3657600080fd5b8151610b4181610b0f565b9392505050565b60008060008060808587031215610b5e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b600060208284031215610b9057600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610bd357868101830151858201608001528201610bb7565b506000608082860101526080601f19601f83011685010192505050826040830152949350505050565b80820180821115610c1d57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610c2e81610b0f565b919050565b803563ffffffff81168114610c2e57600080fd5b803560038110610c2e57600080fd5b60038110610c7457634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c9c81610b0f565b6001600160a01b03166060830152610cb660408401610c33565b63ffffffff808216608085015280610cd060608701610c33565b1660a085015280610ce360808701610c33565b1660c08501525050610cf760a08401610c47565b610d0460e0840182610c56565b50610d1160c08401610c23565b6001600160a01b0381166101008401525094935050505056fea26469706673582212207cb55b40610a180f18a841525380bad6ae05812ccbd20da0962c409dcb5df76264736f6c63430008120033", "devdoc": { "details": "Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.", "events": { @@ -321,6 +328,9 @@ "_stateroot": "The true batch merkle root for the epoch." } }, + "sendSequencerDelayLimit()": { + "details": "Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge" + }, "updatesequencerDelayLimit()": { "details": "Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution." } @@ -339,7 +349,7 @@ "storageLayout": { "storage": [ { - "astId": 1828, + "astId": 1436, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "sequencerDelayLimit", "offset": 0, @@ -347,21 +357,21 @@ "type": "t_uint256" }, { - "astId": 1831, + "astId": 1439, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "1", - "type": "t_struct(SequencerDelayLimitDecreaseRequest)1836_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)1444_storage" } ], "types": { - "t_struct(SequencerDelayLimitDecreaseRequest)1836_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)1444_storage": { "encoding": "inplace", "label": "struct RouterArbToGnosis.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 1833, + "astId": 1441, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "requestedsequencerDelayLimit", "offset": 0, @@ -369,7 +379,7 @@ "type": "t_uint256" }, { - "astId": 1835, + "astId": 1443, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/RouterArbToGnosisTestnet.json b/contracts/deployments/goerli/RouterArbToGnosisTestnet.json index dfc258f1..8db3ae26 100644 --- a/contracts/deployments/goerli/RouterArbToGnosisTestnet.json +++ b/contracts/deployments/goerli/RouterArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0xbB800a318b5CeE079ADdBC6141A0BB1665793014", + "address": "0x57566eBB95e855fdAeEe108Afa450005B12123Bb", "abi": [ { "inputs": [ @@ -178,6 +178,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "sendSequencerDelayLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "sequencerDelayLimit", @@ -243,33 +250,33 @@ "type": "function" } ], - "transactionHash": "0x644a56aca076de5941a8db2235bd8968de7d1f8f4616e9edd5353e52b99948c1", + "transactionHash": "0x8ed29dc4b80983e0bfbc79ad3e6baf190ce2ef5ba135cbee0b4e9d3897ebad4d", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xbB800a318b5CeE079ADdBC6141A0BB1665793014", - "transactionIndex": 8, - "gasUsed": "852781", + "contractAddress": "0x57566eBB95e855fdAeEe108Afa450005B12123Bb", + "transactionIndex": 14, + "gasUsed": "853453", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xaa6d7828accd39640db2293e59351d547a0a3e4b9028d8c95b8fc22984777f33", - "transactionHash": "0x644a56aca076de5941a8db2235bd8968de7d1f8f4616e9edd5353e52b99948c1", + "blockHash": "0x43c862440f256fb77f2bf3e006f897f5319d064434e1894212856b532b3eed03", + "transactionHash": "0x8ed29dc4b80983e0bfbc79ad3e6baf190ce2ef5ba135cbee0b4e9d3897ebad4d", "logs": [], - "blockNumber": 9186602, - "cumulativeGasUsed": "1383750", + "blockNumber": 9186815, + "cumulativeGasUsed": "7561008", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x87A19d769D875964E9Cd41dDBfc397B2543764E6", - "0xD6ecb6618e8070462E2a6AB160fE1773b8996D3a", - "0xd7610CF459C13Ff22923692Ab023dF5a58DeA838" + "0xf2DDe00c51be42c74e3927A324928381f83da37f", + "0x0C3Acd25FE091b02e8E9b30B9b51dBD5d58C8a41" ], - "numDeployments": 3, - "solcInputHash": "ad697f618f73759e1d99ca054913682f", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n sendsequencerDelayLimit();\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(sequencerDelayLimitDecreaseRequest.timestamp == 0, \\\"Sequencer limit decrease request already pending.\\\");\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n sendsequencerDelayLimit();\\n }\\n }\\n\\n /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n function sendsequencerDelayLimit() internal {\\n bytes memory data = abi.encodeCall(ISequencerDelayUpdatable.updateSequencerDelayLimit, sequencerDelayLimit);\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xcfbeaee85e255366b9ada686378d200a04fa63eadc6f925cae5056cdcac10e01\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Arbitrum Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit) external;\\n}\",\"keccak256\":\"0xcf2532733ecd20779e259f12452b75f0ebda4965bc8aa2c8af041df908e632d3\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101006040523480156200001257600080fd5b5060405162000fe238038062000fe2833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610d5d62000285600039600081816101040152818161082401526109bd01526000818161012b015261064901526000818160c5015281816107fb0152610994015260008181610164015281816101b4015281816104bc015281816105e701526106730152610d5d6000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806390784ae81161006657806390784ae81461014d578063cb93846814610157578063e78cea921461015f578063e813a75514610186578063f6ee5b761461019d57600080fd5b8063051d1970146100985780631062b39a146100c05780632fa70aa7146100ff5780638c5f173f14610126575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6101556101b0565b005b6101556103b0565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b61018f60005481565b6040519081526020016100b7565b6101556101ab366004610aca565b6105dc565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610210573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102349190610b21565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610271573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102959190610b45565b50925050506000548111156102e75760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a16102e4610935565b50565b6000548110156102e457600254156103605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a150565b6002546000036104175760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610357565b6000546002546104279190610b7b565b42116104905760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610357565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610507573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052b9190610b21565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610568573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058c9190610b45565b50925050508181036105d85760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a16105d8610935565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106475760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610357565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f39190610b21565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107549190610b21565b6001600160a01b03161461079b5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610357565b60008383836040516024016107b293929190610bf7565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561086d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108919190610ca9565b6040518463ffffffff1660e01b81526004016108af93929190610cc2565b6020604051808303816000875af11580156108ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f29190610ca9565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092691815260200190565b60405180910390a25050505050565b6000805460405160240161094b91815260200190565b60408051601f19818403018152918152602080830180516001600160e01b031663654bc96560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2a9190610ca9565b6040518463ffffffff1660e01b8152600401610a4893929190610cc2565b6020604051808303816000875af1158015610a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8b9190610ca9565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d68781604051610abe91815260200190565b60405180910390a15050565b6000806000838503610120811215610ae157600080fd5b843593506020850135925060e0603f1982011215610afe57600080fd5b506040840190509250925092565b6001600160a01b03811681146102e457600080fd5b600060208284031215610b3357600080fd5b8151610b3e81610b0c565b9392505050565b60008060008060808587031215610b5b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b80820180821115610b9c57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610bad81610b0c565b919050565b803563ffffffff81168114610bad57600080fd5b803560038110610bad57600080fd5b60038110610bf357634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1b81610b0c565b6001600160a01b03166060830152610c3560408401610bb2565b63ffffffff808216608085015280610c4f60608701610bb2565b1660a085015280610c6260808701610bb2565b1660c08501525050610c7660a08401610bc6565b610c8360e0840182610bd5565b50610c9060c08401610ba2565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cbb57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cfe57868101830151858201608001528201610ce2565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220ca5f95de8c0945391fbe8da8f400ec24c8072b75798aedd171f8357c61d8780264736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c806390784ae81161006657806390784ae81461014d578063cb93846814610157578063e78cea921461015f578063e813a75514610186578063f6ee5b761461019d57600080fd5b8063051d1970146100985780631062b39a146100c05780632fa70aa7146100ff5780638c5f173f14610126575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6101556101b0565b005b6101556103b0565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b61018f60005481565b6040519081526020016100b7565b6101556101ab366004610aca565b6105dc565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610210573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102349190610b21565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610271573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102959190610b45565b50925050506000548111156102e75760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a16102e4610935565b50565b6000548110156102e457600254156103605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a150565b6002546000036104175760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610357565b6000546002546104279190610b7b565b42116104905760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610357565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610507573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052b9190610b21565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610568573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058c9190610b45565b50925050508181036105d85760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a16105d8610935565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106475760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610357565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f39190610b21565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107549190610b21565b6001600160a01b03161461079b5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610357565b60008383836040516024016107b293929190610bf7565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561086d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108919190610ca9565b6040518463ffffffff1660e01b81526004016108af93929190610cc2565b6020604051808303816000875af11580156108ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f29190610ca9565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092691815260200190565b60405180910390a25050505050565b6000805460405160240161094b91815260200190565b60408051601f19818403018152918152602080830180516001600160e01b031663654bc96560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2a9190610ca9565b6040518463ffffffff1660e01b8152600401610a4893929190610cc2565b6020604051808303816000875af1158015610a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8b9190610ca9565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d68781604051610abe91815260200190565b60405180910390a15050565b6000806000838503610120811215610ae157600080fd5b843593506020850135925060e0603f1982011215610afe57600080fd5b506040840190509250925092565b6001600160a01b03811681146102e457600080fd5b600060208284031215610b3357600080fd5b8151610b3e81610b0c565b9392505050565b60008060008060808587031215610b5b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b80820180821115610b9c57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610bad81610b0c565b919050565b803563ffffffff81168114610bad57600080fd5b803560038110610bad57600080fd5b60038110610bf357634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1b81610b0c565b6001600160a01b03166060830152610c3560408401610bb2565b63ffffffff808216608085015280610c4f60608701610bb2565b1660a085015280610c6260808701610bb2565b1660c08501525050610c7660a08401610bc6565b610c8360e0840182610bd5565b50610c9060c08401610ba2565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cbb57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cfe57868101830151858201608001528201610ce2565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220ca5f95de8c0945391fbe8da8f400ec24c8072b75798aedd171f8357c61d8780264736f6c63430008120033", + "numDeployments": 4, + "solcInputHash": "cf76e8aad7d9ce9f21e3b6b1180c6852", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sendSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"sendSequencerDelayLimit()\":{\"details\":\"Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\"},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n function sendSequencerDelayLimit() public {\\n bytes memory data = abi.encodeCall(ISequencerDelayUpdatable.updateSequencerDelayLimit, (sequencerDelayLimit, block.timestamp));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xf96670a60b3706d0e80ed951e7c4dac37317c439419fc0638dcddb3dc99a0d38\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b5060405162000fe538038062000fe5833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610d60620002856000396000818161010f0152818161044601526109bc01526000818161013601526107e101526000818160d00152818161041d0152610993015260008181610177015281816101c70152818161065f0152818161077f015261080b0152610d606000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a41a2faa11610066578063a41a2faa14610162578063cb9384681461016a578063e78cea9214610172578063e813a75514610199578063f6ee5b76146101b057600080fd5b8063051d1970146100a35780631062b39a146100cb5780632fa70aa71461010a5780638c5f173f1461013157806390784ae814610158575b600080fd5b6001546002546100b1919082565b604080519283526020830191909152015b60405180910390f35b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101606101c3565b005b6101606103bc565b610160610553565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100c2565b6101606101be366004610acd565b610774565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a89190610b48565b50925050506000548111156102f25760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156103b9576002541561036b5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561048f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b39190610b7e565b6040518463ffffffff1660e01b81526004016104d193929190610b97565b6020604051808303816000875af11580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190610b7e565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d6878160405161054791815260200190565b60405180910390a15050565b6002546000036105ba5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610362565b6000546002546105ca9190610bfc565b42116106335760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610362565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156106aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce9190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561070b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072f9190610b48565b50925050508181036107705760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b90602001610547565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107df5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610362565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088b9190610b24565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ec9190610b24565b6001600160a01b0316146109335760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610362565b600083838360405160240161094a93929190610c78565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a299190610b7e565b6040518463ffffffff1660e01b8152600401610a4793929190610b97565b6020604051808303816000875af1158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a9190610b7e565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d99355482604051610abe91815260200190565b60405180910390a25050505050565b6000806000838503610120811215610ae457600080fd5b843593506020850135925060e0603f1982011215610b0157600080fd5b506040840190509250925092565b6001600160a01b03811681146103b957600080fd5b600060208284031215610b3657600080fd5b8151610b4181610b0f565b9392505050565b60008060008060808587031215610b5e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b600060208284031215610b9057600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610bd357868101830151858201608001528201610bb7565b506000608082860101526080601f19601f83011685010192505050826040830152949350505050565b80820180821115610c1d57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610c2e81610b0f565b919050565b803563ffffffff81168114610c2e57600080fd5b803560038110610c2e57600080fd5b60038110610c7457634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c9c81610b0f565b6001600160a01b03166060830152610cb660408401610c33565b63ffffffff808216608085015280610cd060608701610c33565b1660a085015280610ce360808701610c33565b1660c08501525050610cf760a08401610c47565b610d0460e0840182610c56565b50610d1160c08401610c23565b6001600160a01b0381166101008401525094935050505056fea26469706673582212207cb55b40610a180f18a841525380bad6ae05812ccbd20da0962c409dcb5df76264736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a41a2faa11610066578063a41a2faa14610162578063cb9384681461016a578063e78cea9214610172578063e813a75514610199578063f6ee5b76146101b057600080fd5b8063051d1970146100a35780631062b39a146100cb5780632fa70aa71461010a5780638c5f173f1461013157806390784ae814610158575b600080fd5b6001546002546100b1919082565b604080519283526020830191909152015b60405180910390f35b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101606101c3565b005b6101606103bc565b610160610553565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100c2565b6101606101be366004610acd565b610774565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a89190610b48565b50925050506000548111156102f25760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156103b9576002541561036b5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561048f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b39190610b7e565b6040518463ffffffff1660e01b81526004016104d193929190610b97565b6020604051808303816000875af11580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190610b7e565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d6878160405161054791815260200190565b60405180910390a15050565b6002546000036105ba5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610362565b6000546002546105ca9190610bfc565b42116106335760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610362565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156106aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce9190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561070b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072f9190610b48565b50925050508181036107705760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b90602001610547565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107df5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610362565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088b9190610b24565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ec9190610b24565b6001600160a01b0316146109335760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610362565b600083838360405160240161094a93929190610c78565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a299190610b7e565b6040518463ffffffff1660e01b8152600401610a4793929190610b97565b6020604051808303816000875af1158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a9190610b7e565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d99355482604051610abe91815260200190565b60405180910390a25050505050565b6000806000838503610120811215610ae457600080fd5b843593506020850135925060e0603f1982011215610b0157600080fd5b506040840190509250925092565b6001600160a01b03811681146103b957600080fd5b600060208284031215610b3657600080fd5b8151610b4181610b0f565b9392505050565b60008060008060808587031215610b5e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b600060208284031215610b9057600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610bd357868101830151858201608001528201610bb7565b506000608082860101526080601f19601f83011685010192505050826040830152949350505050565b80820180821115610c1d57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610c2e81610b0f565b919050565b803563ffffffff81168114610c2e57600080fd5b803560038110610c2e57600080fd5b60038110610c7457634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c9c81610b0f565b6001600160a01b03166060830152610cb660408401610c33565b63ffffffff808216608085015280610cd060608701610c33565b1660a085015280610ce360808701610c33565b1660c08501525050610cf760a08401610c47565b610d0460e0840182610c56565b50610d1160c08401610c23565b6001600160a01b0381166101008401525094935050505056fea26469706673582212207cb55b40610a180f18a841525380bad6ae05812ccbd20da0962c409dcb5df76264736f6c63430008120033", "devdoc": { "details": "Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.", "events": { @@ -321,6 +328,9 @@ "_stateroot": "The true batch merkle root for the epoch." } }, + "sendSequencerDelayLimit()": { + "details": "Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge" + }, "updatesequencerDelayLimit()": { "details": "Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution." } @@ -339,7 +349,7 @@ "storageLayout": { "storage": [ { - "astId": 1828, + "astId": 1436, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "sequencerDelayLimit", "offset": 0, @@ -347,21 +357,21 @@ "type": "t_uint256" }, { - "astId": 1831, + "astId": 1439, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "1", - "type": "t_struct(SequencerDelayLimitDecreaseRequest)1836_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)1444_storage" } ], "types": { - "t_struct(SequencerDelayLimitDecreaseRequest)1836_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)1444_storage": { "encoding": "inplace", "label": "struct RouterArbToGnosis.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 1833, + "astId": 1441, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "requestedsequencerDelayLimit", "offset": 0, @@ -369,7 +379,7 @@ "type": "t_uint256" }, { - "astId": 1835, + "astId": 1443, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json b/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json index 6c403987..3e0c3f67 100644 --- a/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json +++ b/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x19F1fE9f34d3d6323FB9862a99F8A56542f879F0", + "address": "0xb594c5C4eE3bF976d59F5d3DB311A1ac99D20FBA", "abi": [ { "inputs": [ @@ -1025,32 +1025,32 @@ "type": "function" } ], - "transactionHash": "0xf56e3038a4dc7c120b6b0d53a3e38c6b50bbae16c5ed2a34e4fc0c986a237037", + "transactionHash": "0xfc24fff53416e0e18c452650711fc8e11c0ff67519c0feddb0040efd061a00d1", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x19F1fE9f34d3d6323FB9862a99F8A56542f879F0", - "transactionIndex": 22, + "contractAddress": "0xb594c5C4eE3bF976d59F5d3DB311A1ac99D20FBA", + "transactionIndex": 5, "gasUsed": "2205677", - "logsBloom": "0x00000000000000000000000000000002000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000020000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x708241027734f29da76971b136c46c91419e3419c581b2f1633a3db17e45fb93", - "transactionHash": "0xf56e3038a4dc7c120b6b0d53a3e38c6b50bbae16c5ed2a34e4fc0c986a237037", + "logsBloom": "0x00000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000", + "blockHash": "0x3915d078c228115b722e57e6e4eae7bb757de34dc39b4699cacefb15c731ad8c", + "transactionHash": "0xfc24fff53416e0e18c452650711fc8e11c0ff67519c0feddb0040efd061a00d1", "logs": [ { - "transactionIndex": 22, - "blockNumber": 9186605, - "transactionHash": "0xf56e3038a4dc7c120b6b0d53a3e38c6b50bbae16c5ed2a34e4fc0c986a237037", - "address": "0x19F1fE9f34d3d6323FB9862a99F8A56542f879F0", + "transactionIndex": 5, + "blockNumber": 9186819, + "transactionHash": "0xfc24fff53416e0e18c452650711fc8e11c0ff67519c0feddb0040efd061a00d1", + "address": "0xb594c5C4eE3bF976d59F5d3DB311A1ac99D20FBA", "topics": [ "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 20, - "blockHash": "0x708241027734f29da76971b136c46c91419e3419c581b2f1633a3db17e45fb93" + "logIndex": 10, + "blockHash": "0x3915d078c228115b722e57e6e4eae7bb757de34dc39b4699cacefb15c731ad8c" } ], - "blockNumber": 9186605, - "cumulativeGasUsed": "3517092", + "blockNumber": 9186819, + "cumulativeGasUsed": "3321023", "status": 1, "byzantium": true }, @@ -1059,15 +1059,15 @@ 1800, 0, 10000000000000, - "0x63eBccD095a663f024B5336b8362A7fa836b7882", + "0x3D9356FF595C2151513DFc520380d5A178224564", "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", 10000000000000 ], - "numDeployments": 9, - "solcInputHash": "ad697f618f73759e1d99ca054913682f", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEthDevnet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_bridge\":\"The address of the Arbitrum bridge contract on Ethereum.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEthDevnet\":\"The address of the devnet vea inbox on Arbitrum to Ethereum.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":\"VeaOutboxArbToEthDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updatesequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(sequencerDelayLimitDecreaseRequest.timestamp == 0, \\\"Sequencer limit decrease request already pending.\\\");\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x8f3df1a06a21ec21f29c96de33c71aa5e51c30719998bc33f9b774325329311e\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToEth/VeaOutboxArbToEth.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Goerli.\\n/// Note: This contract is deployed on Goerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEthDevnet The address of the devnet vea inbox on Arbitrum to Ethereum.\\n /// @param _bridge The address of the Arbitrum bridge contract on Ethereum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEthDevnet,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n )\\n VeaOutboxArbToEth(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _veaInboxArbToEthDevnet,\\n _bridge,\\n _maxMissingBlocks\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xc790ada101869ca355f7e5f35d7480741189082573634b34c0a4464c69e043dd\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002a4438038062002a448339810160408190526200003591620002ee565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190528686868686868662000076620000ee565b620000836002886200036c565b60e0819052620000958860026200038f565b620000a19190620003af565b6101005261012051600190620000b890426200036c565b620000c49190620003af565b6001555050600780546001600160a01b0319163317905550620004219a5050505050505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000131573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001579190620003c5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000195573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001bb9190620003ea565b5092505050600454811115620002065760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ce5760065415620002805760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002e957600080fd5b919050565b600080600080600080600060e0888a0312156200030a57600080fd5b875196506020880151955060408801519450606088015193506200033160808901620002d1565b92506200034160a08901620002d1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200038a57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620003a957620003a962000356565b92915050565b81810381811115620003a957620003a962000356565b600060208284031215620003d857600080fd5b620003e382620002d1565b9392505050565b600080600080608085870312156200040157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516124f56200054f600039600081816104a10152611ea90152600081816104d5015281816108b2015281816116b40152818161183f0152611c6801526000818161055d0152611e3d015260008181610509015281816108d601528181610bdf015281816113ae015281816116d8015281816118630152611c8c015260008181611133015261126c0152600081816110e001526112240152600081816105a6015281816106b2015281816108390152818161086601528181610c22015281816112bc015281816119a901528181611a100152611dd301526000818161039d01526109c001526000818161062701528181610951015281816109ea015281816114c20152611b5501526124f56000f3fe6080604052600436106101e35760003560e01c806390784ae811610102578063c2114a1611610095578063df19e6ff11610064578063df19e6ff146105e8578063e78cea9214610615578063e813a75514610649578063eedcf2a91461065f57600080fd5b8063c2114a161461054b578063cb9384681461057f578063d0e30db014610594578063da2b7bc4146105c857600080fd5b8063aa22a1c6116100d1578063aa22a1c61461048f578063b044397e146104c3578063b5b7a184146104f7578063b633b9441461052b57600080fd5b806390784ae81461041757806390df63b71461042c578063930f28af146104595780639588eca21461047957600080fd5b80633ce43cfd1161017a578063541adcca11610149578063541adcca1461036b57806369cd250d1461038b5780638a619a71146103d75780638ad3a8f7146103f757600080fd5b80633ce43cfd146102eb5780634788cb381461030b57806349b4299e1461032b5780634a439cfe1461034b57600080fd5b80632639c060116101b65780632639c0601461027557806327ee6bdd146102a257806331d14457146102b857806331ddf743146102cb57600080fd5b806301139b68146101e8578063051d1970146101fd5780630f0adca514610232578063222ae78614610252575b600080fd5b6101fb6101f6366004612063565b610672565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb61024d366004612091565b6108b0565b34801561025e57600080fd5b50610267610bd8565b604051908152602001610229565b34801561028157600080fd5b506102676102903660046120c8565b60026020526000908152604090205481565b3480156102ae57600080fd5b5061026760015481565b6101fb6102c63660046120e1565b610c09565b3480156102d757600080fd5b506101fb6102e6366004612164565b610d89565b3480156102f757600080fd5b506101fb610306366004612226565b611029565b34801561031757600080fd5b506101fb610326366004612063565b611170565b34801561033757600080fd5b506101fb610346366004612063565b6112f4565b34801561035757600080fd5b506102676103663660046120c8565b6113a7565b34801561037757600080fd5b5061026761038636600461225f565b6113d9565b34801561039757600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b3480156103e357600080fd5b506101fb6103f2366004612282565b61142b565b34801561040357600080fd5b506007546103bf906001600160a01b031681565b34801561042357600080fd5b506101fb6114be565b34801561043857600080fd5b506102676104473660046120c8565b60036020526000908152604090205481565b34801561046557600080fd5b506101fb610474366004612063565b6116b2565b34801561048557600080fd5b5061026760005481565b34801561049b57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cf57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561050357600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561053757600080fd5b506101fb610546366004612063565b61183d565b34801561055757600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561058b57600080fd5b506101fb611a49565b3480156105a057600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d457600080fd5b506101fb6105e3366004612063565b611c66565b3480156105f457600080fd5b5061060861060336600461225f565b611e1f565b60405161022991906122b5565b34801561062157600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b34801561065557600080fd5b5061026760045481565b6101fb61066d3660046120e1565b611ee6565b61067b816113d9565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122cf565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a0015160028111156107935761079361229f565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816113d9565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f00000000000000000000000000000000000000000000000000000000000000003461230d565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090357610903612320565b040311156109465760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109be5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612336565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612336565b6001600160a01b031614610b1a5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610b2a57508115155b15610b6d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b76816113d9565b60008481526002602052604090205403610bd3578051829003610b9f57600160a0820152610bba565b60c08101516001600160a01b031615610bba57600260a08201525b610bc3816113d9565b6000848152600260205260409020555b505050565b6000610c047f000000000000000000000000000000000000000000000000000000000000000042612353565b905090565b6007546001600160a01b03163314610c2057600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610c905760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610cad5760405162461bcd60e51b81526004016106a7906122cf565b60008281526002602052604090205415610cff5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610d45906113d9565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161082f565b60408510610dcb5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b600084848484604051602001610de49493929190612375565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610e64576000888883818110610e2657610e266123b7565b90506020020135905082811115610e4b57826000528060205260406000209250610e5b565b8060005282602052604060002092505b50600101610e0a565b508060005414610ea75760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f1c5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610f4c90899089906123cd565b6000604051808303816000865af19150503d8060008114610f89576040519150601f19603f3d011682016040523d82523d6000602084013e610f8e565b606091505b5050905080610fdf5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61103b6103863683900383018361225f565b600083815260026020526040902054146110675760405162461bcd60e51b81526004016106a7906122cf565b600261107960c0830160a084016123dd565b600281111561108a5761108a61229f565b146110cb5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061112593505060e0840191505060c08301612282565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611179816113d9565b600083815260026020526040902054146111a55760405162461bcd60e51b81526004016106a7906122cf565b60018160a0015160028111156111bd576111bd61229f565b146111fa5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156112a6576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461130b57600080fd5b611314816113d9565b600083815260026020526040902054146113405760405162461bcd60e51b81526004016106a7906122cf565b63ffffffff42811660608301524316608082015261135d816113d9565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691015b60405180910390a15050565b60006113d37f000000000000000000000000000000000000000000000000000000000000000083612353565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861140e9890979691016123f8565b604051602081830303815290604052805190602001209050919050565b6007546001600160a01b0316331461144257600080fd5b6007546001600160a01b0316331461149c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561151e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115429190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561157f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a39190612476565b50925050506004548111156115ed5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156116af57600654156116615760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161170557611705612320565b040311156117485760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b611751816113d9565b6000838152600260205260409020541461177d5760405162461bcd60e51b81526004016106a7906122cf565b60c08101516001600160a01b0316156117cf5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b60015482111561181757600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611827816113d9565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161189057611890612320565b0403116118d15760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b6118da816113d9565b600083815260026020526040902054146119065760405162461bcd60e51b81526004016106a7906122cf565b60008160a00151600281111561191e5761191e61229f565b1461195d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b03166119e15760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c08101805160009091526119f5826113d9565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611ab05760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b600454600654611ac091906124ac565b4211611b295760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611ba0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc49190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c259190612476565b50925050508181036108ac5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200161139b565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cb957611cb9612320565b040311611cfa5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611d03816113d9565b60008381526002602052604090205414611d2f5760405162461bcd60e51b81526004016106a7906122cf565b60008160a001516002811115611d4757611d4761229f565b14611d865760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611e0b5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60208101805160009091526119f5826113d9565b6000816060015163ffffffff16600003611e3b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7757506003919050565b6000600c836060015163ffffffff16420381611e9557611e95612320565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ed95760019250611ede565b600092505b50505b919050565b611ef08282610c09565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f3783826112f4565b63ffffffff428116606083015243166080820152611f5583826116b2565b600160a0820152610bd38382611170565b6001600160a01b03811681146116af57600080fd5b8035611ee181611f66565b803563ffffffff81168114611ee157600080fd5b803560038110611ee157600080fd5b600060e08284031215611fbb57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fec57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200260208401611f7b565b602082015261201360408401611f86565b604082015261202460608401611f86565b606082015261203560808401611f86565b608082015261204660a08401611f9a565b60a082015261205760c08401611f7b565b60c08201525092915050565b600080610100838503121561207757600080fd5b823591506120888460208501611fa9565b90509250929050565b600080600061012084860312156120a757600080fd5b83359250602084013591506120bf8560408601611fa9565b90509250925092565b6000602082840312156120da57600080fd5b5035919050565b600080604083850312156120f457600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee157600080fd5b60008083601f84011261212d57600080fd5b50813567ffffffffffffffff81111561214557600080fd5b60208301915083602082850101111561215d57600080fd5b9250929050565b6000806000806000806080878903121561217d57600080fd5b863567ffffffffffffffff8082111561219557600080fd5b818901915089601f8301126121a957600080fd5b8135818111156121b857600080fd5b8a60208260051b85010111156121cd57600080fd5b602083019850809750506121e360208a01612103565b95506121f160408a01611f7b565b9450606089013591508082111561220757600080fd5b5061221489828a0161211b565b979a9699509497509295939492505050565b60008082840361010081121561223b57600080fd5b8335925060e0601f198201121561225157600080fd5b506020830190509250929050565b600060e0828403121561227157600080fd5b61227b8383611fa9565b9392505050565b60006020828403121561229457600080fd5b813561227b81611f66565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122c9576122c961229f565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156113d3576113d36122f7565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561234857600080fd5b815161227b81611f66565b60008261237057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123ef57600080fd5b61227b82611f9a565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124505761245061229f565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561248c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b808201808211156113d3576113d36122f756fea2646970667358221220163003b367a00903431c564c543e1c052f2466562bdced8fb37ae821f8d6f2fe64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101e35760003560e01c806390784ae811610102578063c2114a1611610095578063df19e6ff11610064578063df19e6ff146105e8578063e78cea9214610615578063e813a75514610649578063eedcf2a91461065f57600080fd5b8063c2114a161461054b578063cb9384681461057f578063d0e30db014610594578063da2b7bc4146105c857600080fd5b8063aa22a1c6116100d1578063aa22a1c61461048f578063b044397e146104c3578063b5b7a184146104f7578063b633b9441461052b57600080fd5b806390784ae81461041757806390df63b71461042c578063930f28af146104595780639588eca21461047957600080fd5b80633ce43cfd1161017a578063541adcca11610149578063541adcca1461036b57806369cd250d1461038b5780638a619a71146103d75780638ad3a8f7146103f757600080fd5b80633ce43cfd146102eb5780634788cb381461030b57806349b4299e1461032b5780634a439cfe1461034b57600080fd5b80632639c060116101b65780632639c0601461027557806327ee6bdd146102a257806331d14457146102b857806331ddf743146102cb57600080fd5b806301139b68146101e8578063051d1970146101fd5780630f0adca514610232578063222ae78614610252575b600080fd5b6101fb6101f6366004612063565b610672565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb61024d366004612091565b6108b0565b34801561025e57600080fd5b50610267610bd8565b604051908152602001610229565b34801561028157600080fd5b506102676102903660046120c8565b60026020526000908152604090205481565b3480156102ae57600080fd5b5061026760015481565b6101fb6102c63660046120e1565b610c09565b3480156102d757600080fd5b506101fb6102e6366004612164565b610d89565b3480156102f757600080fd5b506101fb610306366004612226565b611029565b34801561031757600080fd5b506101fb610326366004612063565b611170565b34801561033757600080fd5b506101fb610346366004612063565b6112f4565b34801561035757600080fd5b506102676103663660046120c8565b6113a7565b34801561037757600080fd5b5061026761038636600461225f565b6113d9565b34801561039757600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b3480156103e357600080fd5b506101fb6103f2366004612282565b61142b565b34801561040357600080fd5b506007546103bf906001600160a01b031681565b34801561042357600080fd5b506101fb6114be565b34801561043857600080fd5b506102676104473660046120c8565b60036020526000908152604090205481565b34801561046557600080fd5b506101fb610474366004612063565b6116b2565b34801561048557600080fd5b5061026760005481565b34801561049b57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cf57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561050357600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561053757600080fd5b506101fb610546366004612063565b61183d565b34801561055757600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561058b57600080fd5b506101fb611a49565b3480156105a057600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d457600080fd5b506101fb6105e3366004612063565b611c66565b3480156105f457600080fd5b5061060861060336600461225f565b611e1f565b60405161022991906122b5565b34801561062157600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b34801561065557600080fd5b5061026760045481565b6101fb61066d3660046120e1565b611ee6565b61067b816113d9565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122cf565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a0015160028111156107935761079361229f565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816113d9565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f00000000000000000000000000000000000000000000000000000000000000003461230d565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090357610903612320565b040311156109465760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109be5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612336565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612336565b6001600160a01b031614610b1a5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610b2a57508115155b15610b6d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b76816113d9565b60008481526002602052604090205403610bd3578051829003610b9f57600160a0820152610bba565b60c08101516001600160a01b031615610bba57600260a08201525b610bc3816113d9565b6000848152600260205260409020555b505050565b6000610c047f000000000000000000000000000000000000000000000000000000000000000042612353565b905090565b6007546001600160a01b03163314610c2057600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610c905760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610cad5760405162461bcd60e51b81526004016106a7906122cf565b60008281526002602052604090205415610cff5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610d45906113d9565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161082f565b60408510610dcb5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b600084848484604051602001610de49493929190612375565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610e64576000888883818110610e2657610e266123b7565b90506020020135905082811115610e4b57826000528060205260406000209250610e5b565b8060005282602052604060002092505b50600101610e0a565b508060005414610ea75760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f1c5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610f4c90899089906123cd565b6000604051808303816000865af19150503d8060008114610f89576040519150601f19603f3d011682016040523d82523d6000602084013e610f8e565b606091505b5050905080610fdf5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61103b6103863683900383018361225f565b600083815260026020526040902054146110675760405162461bcd60e51b81526004016106a7906122cf565b600261107960c0830160a084016123dd565b600281111561108a5761108a61229f565b146110cb5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061112593505060e0840191505060c08301612282565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611179816113d9565b600083815260026020526040902054146111a55760405162461bcd60e51b81526004016106a7906122cf565b60018160a0015160028111156111bd576111bd61229f565b146111fa5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156112a6576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461130b57600080fd5b611314816113d9565b600083815260026020526040902054146113405760405162461bcd60e51b81526004016106a7906122cf565b63ffffffff42811660608301524316608082015261135d816113d9565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691015b60405180910390a15050565b60006113d37f000000000000000000000000000000000000000000000000000000000000000083612353565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861140e9890979691016123f8565b604051602081830303815290604052805190602001209050919050565b6007546001600160a01b0316331461144257600080fd5b6007546001600160a01b0316331461149c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561151e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115429190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561157f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a39190612476565b50925050506004548111156115ed5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156116af57600654156116615760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161170557611705612320565b040311156117485760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b611751816113d9565b6000838152600260205260409020541461177d5760405162461bcd60e51b81526004016106a7906122cf565b60c08101516001600160a01b0316156117cf5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b60015482111561181757600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611827816113d9565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161189057611890612320565b0403116118d15760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b6118da816113d9565b600083815260026020526040902054146119065760405162461bcd60e51b81526004016106a7906122cf565b60008160a00151600281111561191e5761191e61229f565b1461195d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b03166119e15760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c08101805160009091526119f5826113d9565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611ab05760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b600454600654611ac091906124ac565b4211611b295760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611ba0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc49190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c259190612476565b50925050508181036108ac5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200161139b565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cb957611cb9612320565b040311611cfa5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611d03816113d9565b60008381526002602052604090205414611d2f5760405162461bcd60e51b81526004016106a7906122cf565b60008160a001516002811115611d4757611d4761229f565b14611d865760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611e0b5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60208101805160009091526119f5826113d9565b6000816060015163ffffffff16600003611e3b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7757506003919050565b6000600c836060015163ffffffff16420381611e9557611e95612320565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ed95760019250611ede565b600092505b50505b919050565b611ef08282610c09565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f3783826112f4565b63ffffffff428116606083015243166080820152611f5583826116b2565b600160a0820152610bd38382611170565b6001600160a01b03811681146116af57600080fd5b8035611ee181611f66565b803563ffffffff81168114611ee157600080fd5b803560038110611ee157600080fd5b600060e08284031215611fbb57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fec57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200260208401611f7b565b602082015261201360408401611f86565b604082015261202460608401611f86565b606082015261203560808401611f86565b608082015261204660a08401611f9a565b60a082015261205760c08401611f7b565b60c08201525092915050565b600080610100838503121561207757600080fd5b823591506120888460208501611fa9565b90509250929050565b600080600061012084860312156120a757600080fd5b83359250602084013591506120bf8560408601611fa9565b90509250925092565b6000602082840312156120da57600080fd5b5035919050565b600080604083850312156120f457600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee157600080fd5b60008083601f84011261212d57600080fd5b50813567ffffffffffffffff81111561214557600080fd5b60208301915083602082850101111561215d57600080fd5b9250929050565b6000806000806000806080878903121561217d57600080fd5b863567ffffffffffffffff8082111561219557600080fd5b818901915089601f8301126121a957600080fd5b8135818111156121b857600080fd5b8a60208260051b85010111156121cd57600080fd5b602083019850809750506121e360208a01612103565b95506121f160408a01611f7b565b9450606089013591508082111561220757600080fd5b5061221489828a0161211b565b979a9699509497509295939492505050565b60008082840361010081121561223b57600080fd5b8335925060e0601f198201121561225157600080fd5b506020830190509250929050565b600060e0828403121561227157600080fd5b61227b8383611fa9565b9392505050565b60006020828403121561229457600080fd5b813561227b81611f66565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122c9576122c961229f565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156113d3576113d36122f7565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561234857600080fd5b815161227b81611f66565b60008261237057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123ef57600080fd5b61227b82611f9a565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124505761245061229f565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561248c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b808201808211156113d3576113d36122f756fea2646970667358221220163003b367a00903431c564c543e1c052f2466562bdced8fb37ae821f8d6f2fe64736f6c63430008120033", + "numDeployments": 10, + "solcInputHash": "cf76e8aad7d9ce9f21e3b6b1180c6852", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEthDevnet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_bridge\":\"The address of the Arbitrum bridge contract on Ethereum.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEthDevnet\":\"The address of the devnet vea inbox on Arbitrum to Ethereum.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":\"VeaOutboxArbToEthDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updatesequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x36147b323b9b28537749fc38c75ad7d3e1b3fa7f180aecb3ab90d35c6718b9e3\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToEth/VeaOutboxArbToEth.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Goerli.\\n/// Note: This contract is deployed on Goerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEthDevnet The address of the devnet vea inbox on Arbitrum to Ethereum.\\n /// @param _bridge The address of the Arbitrum bridge contract on Ethereum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEthDevnet,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n )\\n VeaOutboxArbToEth(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _veaInboxArbToEthDevnet,\\n _bridge,\\n _maxMissingBlocks\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xc790ada101869ca355f7e5f35d7480741189082573634b34c0a4464c69e043dd\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002a4438038062002a448339810160408190526200003591620002ee565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190528686868686868662000076620000ee565b620000836002886200036c565b60e0819052620000958860026200038f565b620000a19190620003af565b6101005261012051600190620000b890426200036c565b620000c49190620003af565b6001555050600780546001600160a01b0319163317905550620004219a5050505050505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000131573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001579190620003c5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000195573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001bb9190620003ea565b5092505050600454811115620002065760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ce5760065415620002805760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002e957600080fd5b919050565b600080600080600080600060e0888a0312156200030a57600080fd5b875196506020880151955060408801519450606088015193506200033160808901620002d1565b92506200034160a08901620002d1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200038a57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620003a957620003a962000356565b92915050565b81810381811115620003a957620003a962000356565b600060208284031215620003d857600080fd5b620003e382620002d1565b9392505050565b600080600080608085870312156200040157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516124f56200054f600039600081816104a10152611ea90152600081816104d5015281816108b2015281816116b40152818161183f0152611c6801526000818161055d0152611e3d015260008181610509015281816108d601528181610bdf015281816113ae015281816116d8015281816118630152611c8c015260008181611133015261126c0152600081816110e001526112240152600081816105a6015281816106b2015281816108390152818161086601528181610c22015281816112bc015281816119a901528181611a100152611dd301526000818161039d01526109c001526000818161062701528181610951015281816109ea015281816114c20152611b5501526124f56000f3fe6080604052600436106101e35760003560e01c806390784ae811610102578063c2114a1611610095578063df19e6ff11610064578063df19e6ff146105e8578063e78cea9214610615578063e813a75514610649578063eedcf2a91461065f57600080fd5b8063c2114a161461054b578063cb9384681461057f578063d0e30db014610594578063da2b7bc4146105c857600080fd5b8063aa22a1c6116100d1578063aa22a1c61461048f578063b044397e146104c3578063b5b7a184146104f7578063b633b9441461052b57600080fd5b806390784ae81461041757806390df63b71461042c578063930f28af146104595780639588eca21461047957600080fd5b80633ce43cfd1161017a578063541adcca11610149578063541adcca1461036b57806369cd250d1461038b5780638a619a71146103d75780638ad3a8f7146103f757600080fd5b80633ce43cfd146102eb5780634788cb381461030b57806349b4299e1461032b5780634a439cfe1461034b57600080fd5b80632639c060116101b65780632639c0601461027557806327ee6bdd146102a257806331d14457146102b857806331ddf743146102cb57600080fd5b806301139b68146101e8578063051d1970146101fd5780630f0adca514610232578063222ae78614610252575b600080fd5b6101fb6101f6366004612063565b610672565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb61024d366004612091565b6108b0565b34801561025e57600080fd5b50610267610bd8565b604051908152602001610229565b34801561028157600080fd5b506102676102903660046120c8565b60026020526000908152604090205481565b3480156102ae57600080fd5b5061026760015481565b6101fb6102c63660046120e1565b610c09565b3480156102d757600080fd5b506101fb6102e6366004612164565b610d89565b3480156102f757600080fd5b506101fb610306366004612226565b611029565b34801561031757600080fd5b506101fb610326366004612063565b611170565b34801561033757600080fd5b506101fb610346366004612063565b6112f4565b34801561035757600080fd5b506102676103663660046120c8565b6113a7565b34801561037757600080fd5b5061026761038636600461225f565b6113d9565b34801561039757600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b3480156103e357600080fd5b506101fb6103f2366004612282565b61142b565b34801561040357600080fd5b506007546103bf906001600160a01b031681565b34801561042357600080fd5b506101fb6114be565b34801561043857600080fd5b506102676104473660046120c8565b60036020526000908152604090205481565b34801561046557600080fd5b506101fb610474366004612063565b6116b2565b34801561048557600080fd5b5061026760005481565b34801561049b57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cf57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561050357600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561053757600080fd5b506101fb610546366004612063565b61183d565b34801561055757600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561058b57600080fd5b506101fb611a49565b3480156105a057600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d457600080fd5b506101fb6105e3366004612063565b611c66565b3480156105f457600080fd5b5061060861060336600461225f565b611e1f565b60405161022991906122b5565b34801561062157600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b34801561065557600080fd5b5061026760045481565b6101fb61066d3660046120e1565b611ee6565b61067b816113d9565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122cf565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a0015160028111156107935761079361229f565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816113d9565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f00000000000000000000000000000000000000000000000000000000000000003461230d565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090357610903612320565b040311156109465760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109be5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612336565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612336565b6001600160a01b031614610b1a5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610b2a57508115155b15610b6d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b76816113d9565b60008481526002602052604090205403610bd3578051829003610b9f57600160a0820152610bba565b60c08101516001600160a01b031615610bba57600260a08201525b610bc3816113d9565b6000848152600260205260409020555b505050565b6000610c047f000000000000000000000000000000000000000000000000000000000000000042612353565b905090565b6007546001600160a01b03163314610c2057600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610c905760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610cad5760405162461bcd60e51b81526004016106a7906122cf565b60008281526002602052604090205415610cff5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610d45906113d9565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161082f565b60408510610dcb5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b600084848484604051602001610de49493929190612375565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610e64576000888883818110610e2657610e266123b7565b90506020020135905082811115610e4b57826000528060205260406000209250610e5b565b8060005282602052604060002092505b50600101610e0a565b508060005414610ea75760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f1c5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610f4c90899089906123cd565b6000604051808303816000865af19150503d8060008114610f89576040519150601f19603f3d011682016040523d82523d6000602084013e610f8e565b606091505b5050905080610fdf5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61103b6103863683900383018361225f565b600083815260026020526040902054146110675760405162461bcd60e51b81526004016106a7906122cf565b600261107960c0830160a084016123dd565b600281111561108a5761108a61229f565b146110cb5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061112593505060e0840191505060c08301612282565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611179816113d9565b600083815260026020526040902054146111a55760405162461bcd60e51b81526004016106a7906122cf565b60018160a0015160028111156111bd576111bd61229f565b146111fa5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156112a6576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461130b57600080fd5b611314816113d9565b600083815260026020526040902054146113405760405162461bcd60e51b81526004016106a7906122cf565b63ffffffff42811660608301524316608082015261135d816113d9565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691015b60405180910390a15050565b60006113d37f000000000000000000000000000000000000000000000000000000000000000083612353565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861140e9890979691016123f8565b604051602081830303815290604052805190602001209050919050565b6007546001600160a01b0316331461144257600080fd5b6007546001600160a01b0316331461149c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561151e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115429190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561157f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a39190612476565b50925050506004548111156115ed5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156116af57600654156116615760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161170557611705612320565b040311156117485760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b611751816113d9565b6000838152600260205260409020541461177d5760405162461bcd60e51b81526004016106a7906122cf565b60c08101516001600160a01b0316156117cf5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b60015482111561181757600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611827816113d9565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161189057611890612320565b0403116118d15760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b6118da816113d9565b600083815260026020526040902054146119065760405162461bcd60e51b81526004016106a7906122cf565b60008160a00151600281111561191e5761191e61229f565b1461195d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b03166119e15760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c08101805160009091526119f5826113d9565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611ab05760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b600454600654611ac091906124ac565b4211611b295760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611ba0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc49190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c259190612476565b50925050508181036108ac5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200161139b565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cb957611cb9612320565b040311611cfa5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611d03816113d9565b60008381526002602052604090205414611d2f5760405162461bcd60e51b81526004016106a7906122cf565b60008160a001516002811115611d4757611d4761229f565b14611d865760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611e0b5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60208101805160009091526119f5826113d9565b6000816060015163ffffffff16600003611e3b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7757506003919050565b6000600c836060015163ffffffff16420381611e9557611e95612320565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ed95760019250611ede565b600092505b50505b919050565b611ef08282610c09565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f3783826112f4565b63ffffffff428116606083015243166080820152611f5583826116b2565b600160a0820152610bd38382611170565b6001600160a01b03811681146116af57600080fd5b8035611ee181611f66565b803563ffffffff81168114611ee157600080fd5b803560038110611ee157600080fd5b600060e08284031215611fbb57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fec57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200260208401611f7b565b602082015261201360408401611f86565b604082015261202460608401611f86565b606082015261203560808401611f86565b608082015261204660a08401611f9a565b60a082015261205760c08401611f7b565b60c08201525092915050565b600080610100838503121561207757600080fd5b823591506120888460208501611fa9565b90509250929050565b600080600061012084860312156120a757600080fd5b83359250602084013591506120bf8560408601611fa9565b90509250925092565b6000602082840312156120da57600080fd5b5035919050565b600080604083850312156120f457600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee157600080fd5b60008083601f84011261212d57600080fd5b50813567ffffffffffffffff81111561214557600080fd5b60208301915083602082850101111561215d57600080fd5b9250929050565b6000806000806000806080878903121561217d57600080fd5b863567ffffffffffffffff8082111561219557600080fd5b818901915089601f8301126121a957600080fd5b8135818111156121b857600080fd5b8a60208260051b85010111156121cd57600080fd5b602083019850809750506121e360208a01612103565b95506121f160408a01611f7b565b9450606089013591508082111561220757600080fd5b5061221489828a0161211b565b979a9699509497509295939492505050565b60008082840361010081121561223b57600080fd5b8335925060e0601f198201121561225157600080fd5b506020830190509250929050565b600060e0828403121561227157600080fd5b61227b8383611fa9565b9392505050565b60006020828403121561229457600080fd5b813561227b81611f66565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122c9576122c961229f565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156113d3576113d36122f7565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561234857600080fd5b815161227b81611f66565b60008261237057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123ef57600080fd5b61227b82611f9a565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124505761245061229f565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561248c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b808201808211156113d3576113d36122f756fea26469706673582212207d86c610ede58da4186508bbc0d95e341df5920dfbf645c9138e5d3f55b2379364736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101e35760003560e01c806390784ae811610102578063c2114a1611610095578063df19e6ff11610064578063df19e6ff146105e8578063e78cea9214610615578063e813a75514610649578063eedcf2a91461065f57600080fd5b8063c2114a161461054b578063cb9384681461057f578063d0e30db014610594578063da2b7bc4146105c857600080fd5b8063aa22a1c6116100d1578063aa22a1c61461048f578063b044397e146104c3578063b5b7a184146104f7578063b633b9441461052b57600080fd5b806390784ae81461041757806390df63b71461042c578063930f28af146104595780639588eca21461047957600080fd5b80633ce43cfd1161017a578063541adcca11610149578063541adcca1461036b57806369cd250d1461038b5780638a619a71146103d75780638ad3a8f7146103f757600080fd5b80633ce43cfd146102eb5780634788cb381461030b57806349b4299e1461032b5780634a439cfe1461034b57600080fd5b80632639c060116101b65780632639c0601461027557806327ee6bdd146102a257806331d14457146102b857806331ddf743146102cb57600080fd5b806301139b68146101e8578063051d1970146101fd5780630f0adca514610232578063222ae78614610252575b600080fd5b6101fb6101f6366004612063565b610672565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb61024d366004612091565b6108b0565b34801561025e57600080fd5b50610267610bd8565b604051908152602001610229565b34801561028157600080fd5b506102676102903660046120c8565b60026020526000908152604090205481565b3480156102ae57600080fd5b5061026760015481565b6101fb6102c63660046120e1565b610c09565b3480156102d757600080fd5b506101fb6102e6366004612164565b610d89565b3480156102f757600080fd5b506101fb610306366004612226565b611029565b34801561031757600080fd5b506101fb610326366004612063565b611170565b34801561033757600080fd5b506101fb610346366004612063565b6112f4565b34801561035757600080fd5b506102676103663660046120c8565b6113a7565b34801561037757600080fd5b5061026761038636600461225f565b6113d9565b34801561039757600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b3480156103e357600080fd5b506101fb6103f2366004612282565b61142b565b34801561040357600080fd5b506007546103bf906001600160a01b031681565b34801561042357600080fd5b506101fb6114be565b34801561043857600080fd5b506102676104473660046120c8565b60036020526000908152604090205481565b34801561046557600080fd5b506101fb610474366004612063565b6116b2565b34801561048557600080fd5b5061026760005481565b34801561049b57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cf57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561050357600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561053757600080fd5b506101fb610546366004612063565b61183d565b34801561055757600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561058b57600080fd5b506101fb611a49565b3480156105a057600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d457600080fd5b506101fb6105e3366004612063565b611c66565b3480156105f457600080fd5b5061060861060336600461225f565b611e1f565b60405161022991906122b5565b34801561062157600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b34801561065557600080fd5b5061026760045481565b6101fb61066d3660046120e1565b611ee6565b61067b816113d9565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122cf565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a0015160028111156107935761079361229f565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816113d9565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f00000000000000000000000000000000000000000000000000000000000000003461230d565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090357610903612320565b040311156109465760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109be5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612336565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612336565b6001600160a01b031614610b1a5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610b2a57508115155b15610b6d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b76816113d9565b60008481526002602052604090205403610bd3578051829003610b9f57600160a0820152610bba565b60c08101516001600160a01b031615610bba57600260a08201525b610bc3816113d9565b6000848152600260205260409020555b505050565b6000610c047f000000000000000000000000000000000000000000000000000000000000000042612353565b905090565b6007546001600160a01b03163314610c2057600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610c905760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610cad5760405162461bcd60e51b81526004016106a7906122cf565b60008281526002602052604090205415610cff5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610d45906113d9565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161082f565b60408510610dcb5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b600084848484604051602001610de49493929190612375565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610e64576000888883818110610e2657610e266123b7565b90506020020135905082811115610e4b57826000528060205260406000209250610e5b565b8060005282602052604060002092505b50600101610e0a565b508060005414610ea75760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f1c5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610f4c90899089906123cd565b6000604051808303816000865af19150503d8060008114610f89576040519150601f19603f3d011682016040523d82523d6000602084013e610f8e565b606091505b5050905080610fdf5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61103b6103863683900383018361225f565b600083815260026020526040902054146110675760405162461bcd60e51b81526004016106a7906122cf565b600261107960c0830160a084016123dd565b600281111561108a5761108a61229f565b146110cb5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061112593505060e0840191505060c08301612282565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611179816113d9565b600083815260026020526040902054146111a55760405162461bcd60e51b81526004016106a7906122cf565b60018160a0015160028111156111bd576111bd61229f565b146111fa5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156112a6576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461130b57600080fd5b611314816113d9565b600083815260026020526040902054146113405760405162461bcd60e51b81526004016106a7906122cf565b63ffffffff42811660608301524316608082015261135d816113d9565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691015b60405180910390a15050565b60006113d37f000000000000000000000000000000000000000000000000000000000000000083612353565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861140e9890979691016123f8565b604051602081830303815290604052805190602001209050919050565b6007546001600160a01b0316331461144257600080fd5b6007546001600160a01b0316331461149c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561151e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115429190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561157f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a39190612476565b50925050506004548111156115ed5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156116af57600654156116615760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161170557611705612320565b040311156117485760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b611751816113d9565b6000838152600260205260409020541461177d5760405162461bcd60e51b81526004016106a7906122cf565b60c08101516001600160a01b0316156117cf5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b60015482111561181757600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611827816113d9565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161189057611890612320565b0403116118d15760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b6118da816113d9565b600083815260026020526040902054146119065760405162461bcd60e51b81526004016106a7906122cf565b60008160a00151600281111561191e5761191e61229f565b1461195d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b03166119e15760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c08101805160009091526119f5826113d9565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611ab05760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b600454600654611ac091906124ac565b4211611b295760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611ba0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc49190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c259190612476565b50925050508181036108ac5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200161139b565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cb957611cb9612320565b040311611cfa5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611d03816113d9565b60008381526002602052604090205414611d2f5760405162461bcd60e51b81526004016106a7906122cf565b60008160a001516002811115611d4757611d4761229f565b14611d865760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611e0b5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60208101805160009091526119f5826113d9565b6000816060015163ffffffff16600003611e3b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7757506003919050565b6000600c836060015163ffffffff16420381611e9557611e95612320565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ed95760019250611ede565b600092505b50505b919050565b611ef08282610c09565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f3783826112f4565b63ffffffff428116606083015243166080820152611f5583826116b2565b600160a0820152610bd38382611170565b6001600160a01b03811681146116af57600080fd5b8035611ee181611f66565b803563ffffffff81168114611ee157600080fd5b803560038110611ee157600080fd5b600060e08284031215611fbb57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fec57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200260208401611f7b565b602082015261201360408401611f86565b604082015261202460608401611f86565b606082015261203560808401611f86565b608082015261204660a08401611f9a565b60a082015261205760c08401611f7b565b60c08201525092915050565b600080610100838503121561207757600080fd5b823591506120888460208501611fa9565b90509250929050565b600080600061012084860312156120a757600080fd5b83359250602084013591506120bf8560408601611fa9565b90509250925092565b6000602082840312156120da57600080fd5b5035919050565b600080604083850312156120f457600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee157600080fd5b60008083601f84011261212d57600080fd5b50813567ffffffffffffffff81111561214557600080fd5b60208301915083602082850101111561215d57600080fd5b9250929050565b6000806000806000806080878903121561217d57600080fd5b863567ffffffffffffffff8082111561219557600080fd5b818901915089601f8301126121a957600080fd5b8135818111156121b857600080fd5b8a60208260051b85010111156121cd57600080fd5b602083019850809750506121e360208a01612103565b95506121f160408a01611f7b565b9450606089013591508082111561220757600080fd5b5061221489828a0161211b565b979a9699509497509295939492505050565b60008082840361010081121561223b57600080fd5b8335925060e0601f198201121561225157600080fd5b506020830190509250929050565b600060e0828403121561227157600080fd5b61227b8383611fa9565b9392505050565b60006020828403121561229457600080fd5b813561227b81611f66565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122c9576122c961229f565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156113d3576113d36122f7565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561234857600080fd5b815161227b81611f66565b60008261237057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123ef57600080fd5b61227b82611f9a565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124505761245061229f565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561248c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b808201808211156113d3576113d36122f756fea26469706673582212207d86c610ede58da4186508bbc0d95e341df5920dfbf645c9138e5d3f55b2379364736f6c63430008120033", "devdoc": { "details": "Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).", "events": { @@ -1267,7 +1267,7 @@ "storageLayout": { "storage": [ { - "astId": 430, + "astId": 38, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "stateRoot", "offset": 0, @@ -1275,7 +1275,7 @@ "type": "t_bytes32" }, { - "astId": 432, + "astId": 40, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "latestVerifiedEpoch", "offset": 0, @@ -1283,7 +1283,7 @@ "type": "t_uint256" }, { - "astId": 436, + "astId": 44, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "claimHashes", "offset": 0, @@ -1291,7 +1291,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 440, + "astId": 48, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "relayed", "offset": 0, @@ -1299,7 +1299,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 442, + "astId": 50, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "sequencerDelayLimit", "offset": 0, @@ -1307,15 +1307,15 @@ "type": "t_uint256" }, { - "astId": 445, + "astId": 53, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "5", - "type": "t_struct(SequencerDelayLimitDecreaseRequest)450_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)58_storage" }, { - "astId": 5449, + "astId": 3188, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "devnetOperator", "offset": 0, @@ -1341,12 +1341,12 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_struct(SequencerDelayLimitDecreaseRequest)450_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)58_storage": { "encoding": "inplace", "label": "struct VeaOutboxArbToEth.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 447, + "astId": 55, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "requestedsequencerDelayLimit", "offset": 0, @@ -1354,7 +1354,7 @@ "type": "t_uint256" }, { - "astId": 449, + "astId": 57, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json b/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json index dd0f06d3..7372dfd0 100644 --- a/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json +++ b/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x2D2D210Bb504D4F8C226f780129a974C7CD56Ea0", + "address": "0x64277c8c817b45B0e3CE45AbC222f16406920B9a", "abi": [ { "inputs": [ @@ -981,32 +981,32 @@ "type": "function" } ], - "transactionHash": "0x5a27b40302efe07e17ee812baaeb9e4d0d3b29a09eb09dc17111e131811c060b", + "transactionHash": "0xc481c4f04ce3368c62c1a100e04597c2828a8bf8da8d8bd703c3c3f354dffb8e", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x2D2D210Bb504D4F8C226f780129a974C7CD56Ea0", - "transactionIndex": 11, - "gasUsed": "2236936", - "logsBloom": "0x00000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000400000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2d7ba708a88d45c0ba9c503deae35e7cc02b0ec44bdb66b0b6f36588e070bd0e", - "transactionHash": "0x5a27b40302efe07e17ee812baaeb9e4d0d3b29a09eb09dc17111e131811c060b", + "contractAddress": "0x64277c8c817b45B0e3CE45AbC222f16406920B9a", + "transactionIndex": 23, + "gasUsed": "2236924", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000010000000000000200000000000000000000000000000000000000000800000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x7bcbe928b1ccd694eaf4c0357ddcfc6c7d6f4fbe4766371a68da0cda3afcfaf8", + "transactionHash": "0xc481c4f04ce3368c62c1a100e04597c2828a8bf8da8d8bd703c3c3f354dffb8e", "logs": [ { - "transactionIndex": 11, - "blockNumber": 9186597, - "transactionHash": "0x5a27b40302efe07e17ee812baaeb9e4d0d3b29a09eb09dc17111e131811c060b", - "address": "0x2D2D210Bb504D4F8C226f780129a974C7CD56Ea0", + "transactionIndex": 23, + "blockNumber": 9186809, + "transactionHash": "0xc481c4f04ce3368c62c1a100e04597c2828a8bf8da8d8bd703c3c3f354dffb8e", + "address": "0x64277c8c817b45B0e3CE45AbC222f16406920B9a", "topics": [ "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 14, - "blockHash": "0x2d7ba708a88d45c0ba9c503deae35e7cc02b0ec44bdb66b0b6f36588e070bd0e" + "logIndex": 40, + "blockHash": "0x7bcbe928b1ccd694eaf4c0357ddcfc6c7d6f4fbe4766371a68da0cda3afcfaf8" } ], - "blockNumber": 9186597, - "cumulativeGasUsed": "3188923", + "blockNumber": 9186809, + "cumulativeGasUsed": "4004648", "status": 1, "byzantium": true }, @@ -1015,15 +1015,15 @@ 3600, 10800, 1000000, - "0x7B6D027DC9e838E98258c2A77877De59B7F5a350", + "0xa452Eecf27B545E4115E1cD3cC903aC361B1eE22", "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", 1000000 ], - "numDeployments": 5, - "solcInputHash": "ad697f618f73759e1d99ca054913682f", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEth\":\"The address of the inbox contract on Arbitrum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":\"VeaOutboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updatesequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(sequencerDelayLimitDecreaseRequest.timestamp == 0, \\\"Sequencer limit decrease request already pending.\\\");\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x8f3df1a06a21ec21f29c96de33c71aa5e51c30719998bc33f9b774325329311e\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002b2e38038062002b2e8339810160408190526200003591620002ce565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190526200006f620000ce565b6200007c6002886200034c565b60e08190526200008e8860026200036f565b6200009a91906200038f565b6101005261012051600190620000b190426200034c565b620000bd91906200038f565b600155506200040195505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000111573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001379190620003a5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200019b9190620003ca565b5092505050600454811115620001e65760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ae5760065415620002605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002c957600080fd5b919050565b600080600080600080600060e0888a031215620002ea57600080fd5b875196506020880151955060408801519450606088015193506200031160808901620002b1565b92506200032160a08901620002b1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200036a57634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000389576200038962000336565b92915050565b8181038181111562000389576200038962000336565b600060208284031215620003b857600080fd5b620003c382620002b1565b9392505050565b60008060008060808587031215620003e157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516125f16200053d6000396000818161044001526120250152600081816104740152818161083e015281816117c0015281816119b40152611de40152600081816104fc0152611fb90152600081816104a80152818161086201528181610b6b01528181610c0701528181610c8f015281816113930152818161154d015281816117e4015281816119d80152611e08015260006111aa01526000818161115701526112bc0152600081816105450152818161063e015281816107c5015281816107f201528181610b970152818161131f01528181611b1e01528181611b850152611f4f01526000818161037c015261094c0152600081816105c6015281816108dd01528181610976015281816115ce0152611cca01526125f16000f3fe6080604052600436106101c25760003560e01c806390784ae8116100f7578063b633b94411610095578063da2b7bc411610064578063da2b7bc414610567578063df19e6ff14610587578063e78cea92146105b4578063e813a755146105e857600080fd5b8063b633b944146104ca578063c2114a16146104ea578063cb9384681461051e578063d0e30db01461053357600080fd5b80639588eca2116100d15780639588eca214610418578063aa22a1c61461042e578063b044397e14610462578063b5b7a1841461049657600080fd5b806390784ae8146103b657806390df63b7146103cb578063930f28af146103f857600080fd5b806331ddf7431161016457806349b4299e1161013e57806349b4299e1461030a5780634a439cfe1461032a578063541adcca1461034a57806369cd250d1461036a57600080fd5b806331ddf743146102aa5780633ce43cfd146102ca5780634788cb38146102ea57600080fd5b8063222ae786116101a0578063222ae786146102315780632639c0601461025457806327ee6bdd1461028157806331d144571461029757600080fd5b806301139b68146101c7578063051d1970146101dc5780630f0adca514610211575b600080fd5b6101da6101d536600461215f565b6105fe565b005b3480156101e857600080fd5b506005546006546101f7919082565b604080519283526020830191909152015b60405180910390f35b34801561021d57600080fd5b506101da61022c36600461218d565b61083c565b34801561023d57600080fd5b50610246610b64565b604051908152602001610208565b34801561026057600080fd5b5061024661026f3660046121c4565b60026020526000908152604090205481565b34801561028d57600080fd5b5061024660015481565b6101da6102a53660046121dd565b610b95565b3480156102b657600080fd5b506101da6102c5366004612260565b610e00565b3480156102d657600080fd5b506101da6102e5366004612322565b6110a0565b3480156102f657600080fd5b506101da610305366004612322565b6111e7565b34801561031657600080fd5b506101da61032536600461215f565b61135c565b34801561033657600080fd5b506102466103453660046121c4565b611546565b34801561035657600080fd5b5061024661036536600461235b565b611578565b34801561037657600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610208565b3480156103c257600080fd5b506101da6115ca565b3480156103d757600080fd5b506102466103e63660046121c4565b60036020526000908152604090205481565b34801561040457600080fd5b506101da61041336600461215f565b6117be565b34801561042457600080fd5b5061024660005481565b34801561043a57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561046e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a257600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d657600080fd5b506101da6104e536600461215f565b6119b2565b3480156104f657600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561052a57600080fd5b506101da611bbe565b34801561053f57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561057357600080fd5b506101da61058236600461215f565b611de2565b34801561059357600080fd5b506105a76105a236600461235b565b611f9b565b6040516102089190612394565b3480156105c057600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f457600080fd5b5061024660045481565b61060781611578565b6000838152600260205260409020541461063c5760405162461bcd60e51b8152600401610633906123ae565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f61237e565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b81611578565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f0000000000000000000000000000000000000000000000000000000000000000346123ec565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161088f5761088f6123ff565b040311156108d25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461094a5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f69190612415565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a579190612415565b6001600160a01b031614610aa65760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610ab657508115155b15610af957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b0281611578565b60008481526002602052604090205403610b5f578051829003610b2b57600160a0820152610b46565b60c08101516001600160a01b031615610b4657600260a08201525b610b4f81611578565b6000848152600260205260409020555b505050565b6000610b907f000000000000000000000000000000000000000000000000000000000000000042612432565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c055760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000004281610c3457610c346123ff565b048210610c835760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b600454421115610d07577f0000000000000000000000000000000000000000000000000000000000000000600454420381610cc057610cc06123ff565b04826001011015610d075760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610633565b80610d245760405162461bcd60e51b8152600401610633906123ae565b60008281526002602052604090205415610d765760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbc90611578565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107bb565b60408510610e425760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b600084848484604051602001610e5b9493929190612454565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610edb576000888883818110610e9d57610e9d612496565b90506020020135905082811115610ec257826000528060205260406000209250610ed2565b8060005282602052604060002092505b50600101610e81565b508060005414610f1e5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f935760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc390899089906124ac565b6000604051808303816000865af19150503d8060008114611000576040519150601f19603f3d011682016040523d82523d6000602084013e611005565b606091505b50509050806110565760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b26103653683900383018361235b565b600083815260026020526040902054146110de5760405162461bcd60e51b8152600401610633906123ae565b60026110f060c0830160a084016124bc565b60028111156111015761110161237e565b146111425760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060e0840191505060c083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f96103653683900383018361235b565b600083815260026020526040902054146112255760405162461bcd60e51b8152600401610633906123ae565b600161123760c0830160a084016124bc565b60028111156112485761124861237e565b146112855760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b60008281526002602052604081208190556112a660e0830160c084016124d7565b6001600160a01b031614611301576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060408401915050602083016124d7565b61131160408201602083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61136581611578565b600083815260026020526040902054146113915760405162461bcd60e51b8152600401610633906123ae565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166113ca91906124f4565b6113d491906124f4565b4210156114385760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b600061144382611f9b565b905060028160038111156114595761145961237e565b1480611476575060008160038111156114745761147461237e565b145b6114df5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526114fc82611578565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115727f000000000000000000000000000000000000000000000000000000000000000083612432565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986115ad989097969101612507565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561162a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164e9190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561168b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116af9190612585565b50925050506004548111156116f95760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156117bb576006541561176d5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611811576118116123ff565b040311156118545760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b61185d81611578565b600083815260026020526040902054146118895760405162461bcd60e51b8152600401610633906123ae565b60c08101516001600160a01b0316156118db5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b60016118e682611f9b565b60038111156118f7576118f761237e565b146119445760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b60015482111561198c57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261199c81611578565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a0557611a056123ff565b040311611a465760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611a4f81611578565b60008381526002602052604090205414611a7b5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611a9357611a9361237e565b14611ad25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611b565760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b6a82611578565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611c255760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b600454600654611c3591906124f4565b4211611c9e5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d399190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611d76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9a9190612585565b50925050508181036108385760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611e3557611e356123ff565b040311611e765760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611e7f81611578565b60008381526002602052604090205414611eab5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ec357611ec361237e565b14611f025760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611f875760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b6a82611578565b6000816060015163ffffffff16600003611fb757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611ff357506003919050565b6000600c836060015163ffffffff16420381612011576120116123ff565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612055576001925061205a565b600092505b50505b919050565b6001600160a01b03811681146117bb57600080fd5b803561205d81612062565b803563ffffffff8116811461205d57600080fd5b80356003811061205d57600080fd5b600060e082840312156120b757600080fd5b60405160e0810181811067ffffffffffffffff821117156120e857634e487b7160e01b600052604160045260246000fd5b604052823581529050806120fe60208401612077565b602082015261210f60408401612082565b604082015261212060608401612082565b606082015261213160808401612082565b608082015261214260a08401612096565b60a082015261215360c08401612077565b60c08201525092915050565b600080610100838503121561217357600080fd5b8235915061218484602085016120a5565b90509250929050565b600080600061012084860312156121a357600080fd5b83359250602084013591506121bb85604086016120a5565b90509250925092565b6000602082840312156121d657600080fd5b5035919050565b600080604083850312156121f057600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461205d57600080fd5b60008083601f84011261222957600080fd5b50813567ffffffffffffffff81111561224157600080fd5b60208301915083602082850101111561225957600080fd5b9250929050565b6000806000806000806080878903121561227957600080fd5b863567ffffffffffffffff8082111561229157600080fd5b818901915089601f8301126122a557600080fd5b8135818111156122b457600080fd5b8a60208260051b85010111156122c957600080fd5b602083019850809750506122df60208a016121ff565b95506122ed60408a01612077565b9450606089013591508082111561230357600080fd5b5061231089828a01612217565b979a9699509497509295939492505050565b60008082840361010081121561233757600080fd5b8335925060e0601f198201121561234d57600080fd5b506020830190509250929050565b600060e0828403121561236d57600080fd5b61237783836120a5565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123a8576123a861237e565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611572576115726123d6565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561242757600080fd5b815161237781612062565b60008261244f57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156124ce57600080fd5b61237782612096565b6000602082840312156124e957600080fd5b813561237781612062565b80820180821115611572576115726123d6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061255f5761255f61237e565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561259b57600080fd5b50508251602084015160408501516060909501519196909550909250905056fea26469706673582212203970b2e1a37c8065439bc0afeb8ebd312ac73ec70379039158f76beb9e43e35664736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101c25760003560e01c806390784ae8116100f7578063b633b94411610095578063da2b7bc411610064578063da2b7bc414610567578063df19e6ff14610587578063e78cea92146105b4578063e813a755146105e857600080fd5b8063b633b944146104ca578063c2114a16146104ea578063cb9384681461051e578063d0e30db01461053357600080fd5b80639588eca2116100d15780639588eca214610418578063aa22a1c61461042e578063b044397e14610462578063b5b7a1841461049657600080fd5b806390784ae8146103b657806390df63b7146103cb578063930f28af146103f857600080fd5b806331ddf7431161016457806349b4299e1161013e57806349b4299e1461030a5780634a439cfe1461032a578063541adcca1461034a57806369cd250d1461036a57600080fd5b806331ddf743146102aa5780633ce43cfd146102ca5780634788cb38146102ea57600080fd5b8063222ae786116101a0578063222ae786146102315780632639c0601461025457806327ee6bdd1461028157806331d144571461029757600080fd5b806301139b68146101c7578063051d1970146101dc5780630f0adca514610211575b600080fd5b6101da6101d536600461215f565b6105fe565b005b3480156101e857600080fd5b506005546006546101f7919082565b604080519283526020830191909152015b60405180910390f35b34801561021d57600080fd5b506101da61022c36600461218d565b61083c565b34801561023d57600080fd5b50610246610b64565b604051908152602001610208565b34801561026057600080fd5b5061024661026f3660046121c4565b60026020526000908152604090205481565b34801561028d57600080fd5b5061024660015481565b6101da6102a53660046121dd565b610b95565b3480156102b657600080fd5b506101da6102c5366004612260565b610e00565b3480156102d657600080fd5b506101da6102e5366004612322565b6110a0565b3480156102f657600080fd5b506101da610305366004612322565b6111e7565b34801561031657600080fd5b506101da61032536600461215f565b61135c565b34801561033657600080fd5b506102466103453660046121c4565b611546565b34801561035657600080fd5b5061024661036536600461235b565b611578565b34801561037657600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610208565b3480156103c257600080fd5b506101da6115ca565b3480156103d757600080fd5b506102466103e63660046121c4565b60036020526000908152604090205481565b34801561040457600080fd5b506101da61041336600461215f565b6117be565b34801561042457600080fd5b5061024660005481565b34801561043a57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561046e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a257600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d657600080fd5b506101da6104e536600461215f565b6119b2565b3480156104f657600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561052a57600080fd5b506101da611bbe565b34801561053f57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561057357600080fd5b506101da61058236600461215f565b611de2565b34801561059357600080fd5b506105a76105a236600461235b565b611f9b565b6040516102089190612394565b3480156105c057600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f457600080fd5b5061024660045481565b61060781611578565b6000838152600260205260409020541461063c5760405162461bcd60e51b8152600401610633906123ae565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f61237e565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b81611578565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f0000000000000000000000000000000000000000000000000000000000000000346123ec565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161088f5761088f6123ff565b040311156108d25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461094a5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f69190612415565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a579190612415565b6001600160a01b031614610aa65760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610ab657508115155b15610af957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b0281611578565b60008481526002602052604090205403610b5f578051829003610b2b57600160a0820152610b46565b60c08101516001600160a01b031615610b4657600260a08201525b610b4f81611578565b6000848152600260205260409020555b505050565b6000610b907f000000000000000000000000000000000000000000000000000000000000000042612432565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c055760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000004281610c3457610c346123ff565b048210610c835760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b600454421115610d07577f0000000000000000000000000000000000000000000000000000000000000000600454420381610cc057610cc06123ff565b04826001011015610d075760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610633565b80610d245760405162461bcd60e51b8152600401610633906123ae565b60008281526002602052604090205415610d765760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbc90611578565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107bb565b60408510610e425760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b600084848484604051602001610e5b9493929190612454565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610edb576000888883818110610e9d57610e9d612496565b90506020020135905082811115610ec257826000528060205260406000209250610ed2565b8060005282602052604060002092505b50600101610e81565b508060005414610f1e5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f935760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc390899089906124ac565b6000604051808303816000865af19150503d8060008114611000576040519150601f19603f3d011682016040523d82523d6000602084013e611005565b606091505b50509050806110565760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b26103653683900383018361235b565b600083815260026020526040902054146110de5760405162461bcd60e51b8152600401610633906123ae565b60026110f060c0830160a084016124bc565b60028111156111015761110161237e565b146111425760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060e0840191505060c083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f96103653683900383018361235b565b600083815260026020526040902054146112255760405162461bcd60e51b8152600401610633906123ae565b600161123760c0830160a084016124bc565b60028111156112485761124861237e565b146112855760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b60008281526002602052604081208190556112a660e0830160c084016124d7565b6001600160a01b031614611301576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060408401915050602083016124d7565b61131160408201602083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61136581611578565b600083815260026020526040902054146113915760405162461bcd60e51b8152600401610633906123ae565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166113ca91906124f4565b6113d491906124f4565b4210156114385760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b600061144382611f9b565b905060028160038111156114595761145961237e565b1480611476575060008160038111156114745761147461237e565b145b6114df5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526114fc82611578565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115727f000000000000000000000000000000000000000000000000000000000000000083612432565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986115ad989097969101612507565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561162a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164e9190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561168b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116af9190612585565b50925050506004548111156116f95760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156117bb576006541561176d5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611811576118116123ff565b040311156118545760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b61185d81611578565b600083815260026020526040902054146118895760405162461bcd60e51b8152600401610633906123ae565b60c08101516001600160a01b0316156118db5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b60016118e682611f9b565b60038111156118f7576118f761237e565b146119445760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b60015482111561198c57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261199c81611578565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a0557611a056123ff565b040311611a465760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611a4f81611578565b60008381526002602052604090205414611a7b5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611a9357611a9361237e565b14611ad25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611b565760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b6a82611578565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611c255760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b600454600654611c3591906124f4565b4211611c9e5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d399190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611d76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9a9190612585565b50925050508181036108385760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611e3557611e356123ff565b040311611e765760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611e7f81611578565b60008381526002602052604090205414611eab5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ec357611ec361237e565b14611f025760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611f875760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b6a82611578565b6000816060015163ffffffff16600003611fb757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611ff357506003919050565b6000600c836060015163ffffffff16420381612011576120116123ff565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612055576001925061205a565b600092505b50505b919050565b6001600160a01b03811681146117bb57600080fd5b803561205d81612062565b803563ffffffff8116811461205d57600080fd5b80356003811061205d57600080fd5b600060e082840312156120b757600080fd5b60405160e0810181811067ffffffffffffffff821117156120e857634e487b7160e01b600052604160045260246000fd5b604052823581529050806120fe60208401612077565b602082015261210f60408401612082565b604082015261212060608401612082565b606082015261213160808401612082565b608082015261214260a08401612096565b60a082015261215360c08401612077565b60c08201525092915050565b600080610100838503121561217357600080fd5b8235915061218484602085016120a5565b90509250929050565b600080600061012084860312156121a357600080fd5b83359250602084013591506121bb85604086016120a5565b90509250925092565b6000602082840312156121d657600080fd5b5035919050565b600080604083850312156121f057600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461205d57600080fd5b60008083601f84011261222957600080fd5b50813567ffffffffffffffff81111561224157600080fd5b60208301915083602082850101111561225957600080fd5b9250929050565b6000806000806000806080878903121561227957600080fd5b863567ffffffffffffffff8082111561229157600080fd5b818901915089601f8301126122a557600080fd5b8135818111156122b457600080fd5b8a60208260051b85010111156122c957600080fd5b602083019850809750506122df60208a016121ff565b95506122ed60408a01612077565b9450606089013591508082111561230357600080fd5b5061231089828a01612217565b979a9699509497509295939492505050565b60008082840361010081121561233757600080fd5b8335925060e0601f198201121561234d57600080fd5b506020830190509250929050565b600060e0828403121561236d57600080fd5b61237783836120a5565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123a8576123a861237e565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611572576115726123d6565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561242757600080fd5b815161237781612062565b60008261244f57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156124ce57600080fd5b61237782612096565b6000602082840312156124e957600080fd5b813561237781612062565b80820180821115611572576115726123d6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061255f5761255f61237e565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561259b57600080fd5b50508251602084015160408501516060909501519196909550909250905056fea26469706673582212203970b2e1a37c8065439bc0afeb8ebd312ac73ec70379039158f76beb9e43e35664736f6c63430008120033", + "numDeployments": 6, + "solcInputHash": "cf76e8aad7d9ce9f21e3b6b1180c6852", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEth\":\"The address of the inbox contract on Arbitrum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":\"VeaOutboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updatesequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x36147b323b9b28537749fc38c75ad7d3e1b3fa7f180aecb3ab90d35c6718b9e3\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002b2e38038062002b2e8339810160408190526200003591620002ce565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190526200006f620000ce565b6200007c6002886200034c565b60e08190526200008e8860026200036f565b6200009a91906200038f565b6101005261012051600190620000b190426200034c565b620000bd91906200038f565b600155506200040195505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000111573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001379190620003a5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200019b9190620003ca565b5092505050600454811115620001e65760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ae5760065415620002605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002c957600080fd5b919050565b600080600080600080600060e0888a031215620002ea57600080fd5b875196506020880151955060408801519450606088015193506200031160808901620002b1565b92506200032160a08901620002b1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200036a57634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000389576200038962000336565b92915050565b8181038181111562000389576200038962000336565b600060208284031215620003b857600080fd5b620003c382620002b1565b9392505050565b60008060008060808587031215620003e157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516125f16200053d6000396000818161044001526120250152600081816104740152818161083e015281816117c0015281816119b40152611de40152600081816104fc0152611fb90152600081816104a80152818161086201528181610b6b01528181610c0701528181610c8f015281816113930152818161154d015281816117e4015281816119d80152611e08015260006111aa01526000818161115701526112bc0152600081816105450152818161063e015281816107c5015281816107f201528181610b970152818161131f01528181611b1e01528181611b850152611f4f01526000818161037c015261094c0152600081816105c6015281816108dd01528181610976015281816115ce0152611cca01526125f16000f3fe6080604052600436106101c25760003560e01c806390784ae8116100f7578063b633b94411610095578063da2b7bc411610064578063da2b7bc414610567578063df19e6ff14610587578063e78cea92146105b4578063e813a755146105e857600080fd5b8063b633b944146104ca578063c2114a16146104ea578063cb9384681461051e578063d0e30db01461053357600080fd5b80639588eca2116100d15780639588eca214610418578063aa22a1c61461042e578063b044397e14610462578063b5b7a1841461049657600080fd5b806390784ae8146103b657806390df63b7146103cb578063930f28af146103f857600080fd5b806331ddf7431161016457806349b4299e1161013e57806349b4299e1461030a5780634a439cfe1461032a578063541adcca1461034a57806369cd250d1461036a57600080fd5b806331ddf743146102aa5780633ce43cfd146102ca5780634788cb38146102ea57600080fd5b8063222ae786116101a0578063222ae786146102315780632639c0601461025457806327ee6bdd1461028157806331d144571461029757600080fd5b806301139b68146101c7578063051d1970146101dc5780630f0adca514610211575b600080fd5b6101da6101d536600461215f565b6105fe565b005b3480156101e857600080fd5b506005546006546101f7919082565b604080519283526020830191909152015b60405180910390f35b34801561021d57600080fd5b506101da61022c36600461218d565b61083c565b34801561023d57600080fd5b50610246610b64565b604051908152602001610208565b34801561026057600080fd5b5061024661026f3660046121c4565b60026020526000908152604090205481565b34801561028d57600080fd5b5061024660015481565b6101da6102a53660046121dd565b610b95565b3480156102b657600080fd5b506101da6102c5366004612260565b610e00565b3480156102d657600080fd5b506101da6102e5366004612322565b6110a0565b3480156102f657600080fd5b506101da610305366004612322565b6111e7565b34801561031657600080fd5b506101da61032536600461215f565b61135c565b34801561033657600080fd5b506102466103453660046121c4565b611546565b34801561035657600080fd5b5061024661036536600461235b565b611578565b34801561037657600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610208565b3480156103c257600080fd5b506101da6115ca565b3480156103d757600080fd5b506102466103e63660046121c4565b60036020526000908152604090205481565b34801561040457600080fd5b506101da61041336600461215f565b6117be565b34801561042457600080fd5b5061024660005481565b34801561043a57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561046e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a257600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d657600080fd5b506101da6104e536600461215f565b6119b2565b3480156104f657600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561052a57600080fd5b506101da611bbe565b34801561053f57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561057357600080fd5b506101da61058236600461215f565b611de2565b34801561059357600080fd5b506105a76105a236600461235b565b611f9b565b6040516102089190612394565b3480156105c057600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f457600080fd5b5061024660045481565b61060781611578565b6000838152600260205260409020541461063c5760405162461bcd60e51b8152600401610633906123ae565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f61237e565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b81611578565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f0000000000000000000000000000000000000000000000000000000000000000346123ec565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161088f5761088f6123ff565b040311156108d25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461094a5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f69190612415565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a579190612415565b6001600160a01b031614610aa65760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610ab657508115155b15610af957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b0281611578565b60008481526002602052604090205403610b5f578051829003610b2b57600160a0820152610b46565b60c08101516001600160a01b031615610b4657600260a08201525b610b4f81611578565b6000848152600260205260409020555b505050565b6000610b907f000000000000000000000000000000000000000000000000000000000000000042612432565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c055760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000004281610c3457610c346123ff565b048210610c835760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b600454421115610d07577f0000000000000000000000000000000000000000000000000000000000000000600454420381610cc057610cc06123ff565b04826001011015610d075760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610633565b80610d245760405162461bcd60e51b8152600401610633906123ae565b60008281526002602052604090205415610d765760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbc90611578565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107bb565b60408510610e425760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b600084848484604051602001610e5b9493929190612454565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610edb576000888883818110610e9d57610e9d612496565b90506020020135905082811115610ec257826000528060205260406000209250610ed2565b8060005282602052604060002092505b50600101610e81565b508060005414610f1e5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f935760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc390899089906124ac565b6000604051808303816000865af19150503d8060008114611000576040519150601f19603f3d011682016040523d82523d6000602084013e611005565b606091505b50509050806110565760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b26103653683900383018361235b565b600083815260026020526040902054146110de5760405162461bcd60e51b8152600401610633906123ae565b60026110f060c0830160a084016124bc565b60028111156111015761110161237e565b146111425760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060e0840191505060c083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f96103653683900383018361235b565b600083815260026020526040902054146112255760405162461bcd60e51b8152600401610633906123ae565b600161123760c0830160a084016124bc565b60028111156112485761124861237e565b146112855760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b60008281526002602052604081208190556112a660e0830160c084016124d7565b6001600160a01b031614611301576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060408401915050602083016124d7565b61131160408201602083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61136581611578565b600083815260026020526040902054146113915760405162461bcd60e51b8152600401610633906123ae565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166113ca91906124f4565b6113d491906124f4565b4210156114385760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b600061144382611f9b565b905060028160038111156114595761145961237e565b1480611476575060008160038111156114745761147461237e565b145b6114df5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526114fc82611578565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115727f000000000000000000000000000000000000000000000000000000000000000083612432565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986115ad989097969101612507565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561162a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164e9190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561168b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116af9190612585565b50925050506004548111156116f95760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156117bb576006541561176d5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611811576118116123ff565b040311156118545760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b61185d81611578565b600083815260026020526040902054146118895760405162461bcd60e51b8152600401610633906123ae565b60c08101516001600160a01b0316156118db5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b60016118e682611f9b565b60038111156118f7576118f761237e565b146119445760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b60015482111561198c57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261199c81611578565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a0557611a056123ff565b040311611a465760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611a4f81611578565b60008381526002602052604090205414611a7b5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611a9357611a9361237e565b14611ad25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611b565760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b6a82611578565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611c255760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b600454600654611c3591906124f4565b4211611c9e5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d399190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611d76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9a9190612585565b50925050508181036108385760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611e3557611e356123ff565b040311611e765760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611e7f81611578565b60008381526002602052604090205414611eab5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ec357611ec361237e565b14611f025760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611f875760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b6a82611578565b6000816060015163ffffffff16600003611fb757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611ff357506003919050565b6000600c836060015163ffffffff16420381612011576120116123ff565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612055576001925061205a565b600092505b50505b919050565b6001600160a01b03811681146117bb57600080fd5b803561205d81612062565b803563ffffffff8116811461205d57600080fd5b80356003811061205d57600080fd5b600060e082840312156120b757600080fd5b60405160e0810181811067ffffffffffffffff821117156120e857634e487b7160e01b600052604160045260246000fd5b604052823581529050806120fe60208401612077565b602082015261210f60408401612082565b604082015261212060608401612082565b606082015261213160808401612082565b608082015261214260a08401612096565b60a082015261215360c08401612077565b60c08201525092915050565b600080610100838503121561217357600080fd5b8235915061218484602085016120a5565b90509250929050565b600080600061012084860312156121a357600080fd5b83359250602084013591506121bb85604086016120a5565b90509250925092565b6000602082840312156121d657600080fd5b5035919050565b600080604083850312156121f057600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461205d57600080fd5b60008083601f84011261222957600080fd5b50813567ffffffffffffffff81111561224157600080fd5b60208301915083602082850101111561225957600080fd5b9250929050565b6000806000806000806080878903121561227957600080fd5b863567ffffffffffffffff8082111561229157600080fd5b818901915089601f8301126122a557600080fd5b8135818111156122b457600080fd5b8a60208260051b85010111156122c957600080fd5b602083019850809750506122df60208a016121ff565b95506122ed60408a01612077565b9450606089013591508082111561230357600080fd5b5061231089828a01612217565b979a9699509497509295939492505050565b60008082840361010081121561233757600080fd5b8335925060e0601f198201121561234d57600080fd5b506020830190509250929050565b600060e0828403121561236d57600080fd5b61237783836120a5565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123a8576123a861237e565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611572576115726123d6565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561242757600080fd5b815161237781612062565b60008261244f57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156124ce57600080fd5b61237782612096565b6000602082840312156124e957600080fd5b813561237781612062565b80820180821115611572576115726123d6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061255f5761255f61237e565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561259b57600080fd5b50508251602084015160408501516060909501519196909550909250905056fea264697066735822122071aedac7c8889d76113727eb2311f8f03036054a400bcec3b8bf230cbe983e0064736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101c25760003560e01c806390784ae8116100f7578063b633b94411610095578063da2b7bc411610064578063da2b7bc414610567578063df19e6ff14610587578063e78cea92146105b4578063e813a755146105e857600080fd5b8063b633b944146104ca578063c2114a16146104ea578063cb9384681461051e578063d0e30db01461053357600080fd5b80639588eca2116100d15780639588eca214610418578063aa22a1c61461042e578063b044397e14610462578063b5b7a1841461049657600080fd5b806390784ae8146103b657806390df63b7146103cb578063930f28af146103f857600080fd5b806331ddf7431161016457806349b4299e1161013e57806349b4299e1461030a5780634a439cfe1461032a578063541adcca1461034a57806369cd250d1461036a57600080fd5b806331ddf743146102aa5780633ce43cfd146102ca5780634788cb38146102ea57600080fd5b8063222ae786116101a0578063222ae786146102315780632639c0601461025457806327ee6bdd1461028157806331d144571461029757600080fd5b806301139b68146101c7578063051d1970146101dc5780630f0adca514610211575b600080fd5b6101da6101d536600461215f565b6105fe565b005b3480156101e857600080fd5b506005546006546101f7919082565b604080519283526020830191909152015b60405180910390f35b34801561021d57600080fd5b506101da61022c36600461218d565b61083c565b34801561023d57600080fd5b50610246610b64565b604051908152602001610208565b34801561026057600080fd5b5061024661026f3660046121c4565b60026020526000908152604090205481565b34801561028d57600080fd5b5061024660015481565b6101da6102a53660046121dd565b610b95565b3480156102b657600080fd5b506101da6102c5366004612260565b610e00565b3480156102d657600080fd5b506101da6102e5366004612322565b6110a0565b3480156102f657600080fd5b506101da610305366004612322565b6111e7565b34801561031657600080fd5b506101da61032536600461215f565b61135c565b34801561033657600080fd5b506102466103453660046121c4565b611546565b34801561035657600080fd5b5061024661036536600461235b565b611578565b34801561037657600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610208565b3480156103c257600080fd5b506101da6115ca565b3480156103d757600080fd5b506102466103e63660046121c4565b60036020526000908152604090205481565b34801561040457600080fd5b506101da61041336600461215f565b6117be565b34801561042457600080fd5b5061024660005481565b34801561043a57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561046e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a257600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d657600080fd5b506101da6104e536600461215f565b6119b2565b3480156104f657600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561052a57600080fd5b506101da611bbe565b34801561053f57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561057357600080fd5b506101da61058236600461215f565b611de2565b34801561059357600080fd5b506105a76105a236600461235b565b611f9b565b6040516102089190612394565b3480156105c057600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f457600080fd5b5061024660045481565b61060781611578565b6000838152600260205260409020541461063c5760405162461bcd60e51b8152600401610633906123ae565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f61237e565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b81611578565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f0000000000000000000000000000000000000000000000000000000000000000346123ec565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161088f5761088f6123ff565b040311156108d25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461094a5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f69190612415565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a579190612415565b6001600160a01b031614610aa65760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610ab657508115155b15610af957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b0281611578565b60008481526002602052604090205403610b5f578051829003610b2b57600160a0820152610b46565b60c08101516001600160a01b031615610b4657600260a08201525b610b4f81611578565b6000848152600260205260409020555b505050565b6000610b907f000000000000000000000000000000000000000000000000000000000000000042612432565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c055760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000004281610c3457610c346123ff565b048210610c835760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b600454421115610d07577f0000000000000000000000000000000000000000000000000000000000000000600454420381610cc057610cc06123ff565b04826001011015610d075760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610633565b80610d245760405162461bcd60e51b8152600401610633906123ae565b60008281526002602052604090205415610d765760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbc90611578565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107bb565b60408510610e425760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b600084848484604051602001610e5b9493929190612454565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610edb576000888883818110610e9d57610e9d612496565b90506020020135905082811115610ec257826000528060205260406000209250610ed2565b8060005282602052604060002092505b50600101610e81565b508060005414610f1e5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f935760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc390899089906124ac565b6000604051808303816000865af19150503d8060008114611000576040519150601f19603f3d011682016040523d82523d6000602084013e611005565b606091505b50509050806110565760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b26103653683900383018361235b565b600083815260026020526040902054146110de5760405162461bcd60e51b8152600401610633906123ae565b60026110f060c0830160a084016124bc565b60028111156111015761110161237e565b146111425760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060e0840191505060c083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f96103653683900383018361235b565b600083815260026020526040902054146112255760405162461bcd60e51b8152600401610633906123ae565b600161123760c0830160a084016124bc565b60028111156112485761124861237e565b146112855760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b60008281526002602052604081208190556112a660e0830160c084016124d7565b6001600160a01b031614611301576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060408401915050602083016124d7565b61131160408201602083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61136581611578565b600083815260026020526040902054146113915760405162461bcd60e51b8152600401610633906123ae565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166113ca91906124f4565b6113d491906124f4565b4210156114385760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b600061144382611f9b565b905060028160038111156114595761145961237e565b1480611476575060008160038111156114745761147461237e565b145b6114df5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526114fc82611578565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115727f000000000000000000000000000000000000000000000000000000000000000083612432565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986115ad989097969101612507565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561162a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164e9190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561168b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116af9190612585565b50925050506004548111156116f95760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156117bb576006541561176d5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611811576118116123ff565b040311156118545760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b61185d81611578565b600083815260026020526040902054146118895760405162461bcd60e51b8152600401610633906123ae565b60c08101516001600160a01b0316156118db5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b60016118e682611f9b565b60038111156118f7576118f761237e565b146119445760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b60015482111561198c57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261199c81611578565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a0557611a056123ff565b040311611a465760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611a4f81611578565b60008381526002602052604090205414611a7b5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611a9357611a9361237e565b14611ad25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611b565760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b6a82611578565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611c255760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b600454600654611c3591906124f4565b4211611c9e5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d399190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611d76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9a9190612585565b50925050508181036108385760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611e3557611e356123ff565b040311611e765760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611e7f81611578565b60008381526002602052604090205414611eab5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ec357611ec361237e565b14611f025760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611f875760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b6a82611578565b6000816060015163ffffffff16600003611fb757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611ff357506003919050565b6000600c836060015163ffffffff16420381612011576120116123ff565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612055576001925061205a565b600092505b50505b919050565b6001600160a01b03811681146117bb57600080fd5b803561205d81612062565b803563ffffffff8116811461205d57600080fd5b80356003811061205d57600080fd5b600060e082840312156120b757600080fd5b60405160e0810181811067ffffffffffffffff821117156120e857634e487b7160e01b600052604160045260246000fd5b604052823581529050806120fe60208401612077565b602082015261210f60408401612082565b604082015261212060608401612082565b606082015261213160808401612082565b608082015261214260a08401612096565b60a082015261215360c08401612077565b60c08201525092915050565b600080610100838503121561217357600080fd5b8235915061218484602085016120a5565b90509250929050565b600080600061012084860312156121a357600080fd5b83359250602084013591506121bb85604086016120a5565b90509250925092565b6000602082840312156121d657600080fd5b5035919050565b600080604083850312156121f057600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461205d57600080fd5b60008083601f84011261222957600080fd5b50813567ffffffffffffffff81111561224157600080fd5b60208301915083602082850101111561225957600080fd5b9250929050565b6000806000806000806080878903121561227957600080fd5b863567ffffffffffffffff8082111561229157600080fd5b818901915089601f8301126122a557600080fd5b8135818111156122b457600080fd5b8a60208260051b85010111156122c957600080fd5b602083019850809750506122df60208a016121ff565b95506122ed60408a01612077565b9450606089013591508082111561230357600080fd5b5061231089828a01612217565b979a9699509497509295939492505050565b60008082840361010081121561233757600080fd5b8335925060e0601f198201121561234d57600080fd5b506020830190509250929050565b600060e0828403121561236d57600080fd5b61237783836120a5565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123a8576123a861237e565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611572576115726123d6565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561242757600080fd5b815161237781612062565b60008261244f57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156124ce57600080fd5b61237782612096565b6000602082840312156124e957600080fd5b813561237781612062565b80820180821115611572576115726123d6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061255f5761255f61237e565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561259b57600080fd5b50508251602084015160408501516060909501519196909550909250905056fea264697066735822122071aedac7c8889d76113727eb2311f8f03036054a400bcec3b8bf230cbe983e0064736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.", "events": { @@ -1209,7 +1209,7 @@ "storageLayout": { "storage": [ { - "astId": 430, + "astId": 38, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "stateRoot", "offset": 0, @@ -1217,7 +1217,7 @@ "type": "t_bytes32" }, { - "astId": 432, + "astId": 40, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "latestVerifiedEpoch", "offset": 0, @@ -1225,7 +1225,7 @@ "type": "t_uint256" }, { - "astId": 436, + "astId": 44, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "claimHashes", "offset": 0, @@ -1233,7 +1233,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 440, + "astId": 48, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "relayed", "offset": 0, @@ -1241,7 +1241,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 442, + "astId": 50, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "sequencerDelayLimit", "offset": 0, @@ -1249,12 +1249,12 @@ "type": "t_uint256" }, { - "astId": 445, + "astId": 53, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "5", - "type": "t_struct(SequencerDelayLimitDecreaseRequest)450_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)58_storage" } ], "types": { @@ -1270,12 +1270,12 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_struct(SequencerDelayLimitDecreaseRequest)450_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)58_storage": { "encoding": "inplace", "label": "struct VeaOutboxArbToEth.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 447, + "astId": 55, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "requestedsequencerDelayLimit", "offset": 0, @@ -1283,7 +1283,7 @@ "type": "t_uint256" }, { - "astId": 449, + "astId": 57, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "timestamp", "offset": 0, diff --git a/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol b/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol index 934062b5..d18fdd22 100644 --- a/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol @@ -83,7 +83,6 @@ contract RouterArbToGnosis is IRouterToL1 { // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown. sequencerDelayLimit = newsequencerDelayLimit; emit sequencerDelayLimitUpdated(newsequencerDelayLimit); - sendsequencerDelayLimit(); } else if (newsequencerDelayLimit < sequencerDelayLimit) { require( sequencerDelayLimitDecreaseRequest.timestamp == 0, @@ -115,13 +114,15 @@ contract RouterArbToGnosis is IRouterToL1 { if (currentsequencerDelayLimit == requestedsequencerDelayLimit) { sequencerDelayLimit = requestedsequencerDelayLimit; emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit); - sendsequencerDelayLimit(); } } /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge - function sendsequencerDelayLimit() internal { - bytes memory data = abi.encodeCall(ISequencerDelayUpdatable.updateSequencerDelayLimit, sequencerDelayLimit); + function sendSequencerDelayLimit() public { + bytes memory data = abi.encodeCall( + ISequencerDelayUpdatable.updateSequencerDelayLimit, + (sequencerDelayLimit, block.timestamp) + ); // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit. bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx()); emit sequencerDelayLimitSent(ticketID); diff --git a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol index bc1354e4..db09aae6 100644 --- a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol @@ -28,6 +28,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { address internal constant BURN_ADDRESS = address(0); // Address to send burned eth uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time + uint256 internal constant RELAY_TIMEOUT = 604800; // 7 days uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB. uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots. @@ -147,10 +148,12 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract. - function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit) external { + /// @param _timestamp The timestamp of the message. + function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external { require(msg.sender == address(amb), "Not from bridge."); require(bytes32(routerChainId) == amb.messageSourceChainId(), "Invalid chain id."); require(routerArbToGnosis == amb.messageSender(), "Not from router."); + require(_timestamp + RELAY_TIMEOUT <= block.timestamp, "Stale message. Timeout exceeded."); if (sequencerDelayLimit != _newSequencerDelayLimit) { sequencerDelayLimit = _newSequencerDelayLimit; diff --git a/contracts/src/interfaces/updaters/ISequencerDelayUpdatable.sol b/contracts/src/interfaces/updaters/ISequencerDelayUpdatable.sol index 9584d855..4cae6246 100644 --- a/contracts/src/interfaces/updaters/ISequencerDelayUpdatable.sol +++ b/contracts/src/interfaces/updaters/ISequencerDelayUpdatable.sol @@ -12,7 +12,8 @@ pragma solidity 0.8.18; /// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum. interface ISequencerDelayUpdatable { /// @dev Updates the sequencer limit. - /// Note: Access restricted to ensure the argument is passed from the Arbitrum Sequencer contract. + /// Note: Access restricted to ensure the argument is passed from the Sequencer contract. /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract. - function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit) external; + /// @param _timestamp The timestamp of the message. + function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external; } From d15c3a8e8103b977cff671b5b222189d44d41242 Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Fri, 16 Jun 2023 14:55:47 +0900 Subject: [PATCH 10/58] fix(contracts): typo --- contracts/README.md | 20 +++--- .../VeaInboxArbToEthDevnet.json | 28 ++++---- .../VeaInboxArbToEthTestnet.json | 24 +++---- .../VeaInboxArbToGnosisDevnet.json | 34 +++++----- .../VeaInboxArbToGnosisTestnet.json | 30 ++++----- .../chiado/VeaOutboxArbToGnosisDevnet.json | 38 +++++------ .../chiado/VeaOutboxArbToGnosisTestnet.json | 38 +++++------ .../goerli/RouterArbToGnosisDevnet.json | 44 ++++++------- .../goerli/RouterArbToGnosisTestnet.json | 42 ++++++------ .../goerli/VeaOutboxArbToEthDevnet.json | 64 +++++++++---------- .../goerli/VeaOutboxArbToEthTestnet.json | 58 ++++++++--------- .../arbitrumToGnosis/VeaOutboxArbToGnosis.sol | 2 +- 12 files changed, 211 insertions(+), 211 deletions(-) diff --git a/contracts/README.md b/contracts/README.md index 2a352d23..ce7eea31 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -10,22 +10,22 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments #### Goerli -- [RouterArbToGnosisDevnet](https://goerli.etherscan.io/address/0x696567a5F0A6DD4aAe1dBa6ddB4c977aB5B07CAC) -- [RouterArbToGnosisTestnet](https://goerli.etherscan.io/address/0x57566eBB95e855fdAeEe108Afa450005B12123Bb) -- [VeaOutboxArbToEthDevnet](https://goerli.etherscan.io/address/0xb594c5C4eE3bF976d59F5d3DB311A1ac99D20FBA) -- [VeaOutboxArbToEthTestnet](https://goerli.etherscan.io/address/0x64277c8c817b45B0e3CE45AbC222f16406920B9a) +- [RouterArbToGnosisDevnet](https://goerli.etherscan.io/address/0x770cDAF7284B8838c699910433A927a49bB6765A) +- [RouterArbToGnosisTestnet](https://goerli.etherscan.io/address/0x8228116e0d5Fd2611788E68fF77D5f21b005cE11) +- [VeaOutboxArbToEthDevnet](https://goerli.etherscan.io/address/0x8dC6CCd123E680018923000854dE7E293E744DA0) +- [VeaOutboxArbToEthTestnet](https://goerli.etherscan.io/address/0x6dfc228652A6eE943eA37c269E2602BF2e198Ae9) #### Arbitrum Goerli -- [VeaInboxArbToEthDevnet](https://goerli.arbiscan.io/address/0x3D9356FF595C2151513DFc520380d5A178224564) -- [VeaInboxArbToEthTestnet](https://goerli.arbiscan.io/address/0xa452Eecf27B545E4115E1cD3cC903aC361B1eE22) -- [VeaInboxArbToGnosisDevnet](https://goerli.arbiscan.io/address/0xEC337Fb9977848D0784dC4F01A69c237691755E0) -- [VeaInboxArbToGnosisTestnet](https://goerli.arbiscan.io/address/0xf2DDe00c51be42c74e3927A324928381f83da37f) +- [VeaInboxArbToEthDevnet](https://goerli.arbiscan.io/address/0x1224E83DF410b43A65ed3e375a6442813B1aea14) +- [VeaInboxArbToEthTestnet](https://goerli.arbiscan.io/address/0xb7d2C76641B21718cC8A0b595be438c863A6e031) +- [VeaInboxArbToGnosisDevnet](https://goerli.arbiscan.io/address/0x84de475fed07406aA3B05248f1a7b0Fca11DA012) +- [VeaInboxArbToGnosisTestnet](https://goerli.arbiscan.io/address/0x4738A566706eDd30Fe175e20eDDd21c5c7bD79Ea) #### Chiado -- [VeaOutboxArbToGnosisDevnet](https://blockscout.com/gnosis/chiado/address/0x00f0A751C921B937208e49a92fAaeaF896733544) -- [VeaOutboxArbToGnosisTestnet](https://blockscout.com/gnosis/chiado/address/0x0C3Acd25FE091b02e8E9b30B9b51dBD5d58C8a41) +- [VeaOutboxArbToGnosisDevnet](https://blockscout.com/gnosis/chiado/address/0xEe27226A8fa11Ba851410EB09d32884aEE219D75) +- [VeaOutboxArbToGnosisTestnet](https://blockscout.com/gnosis/chiado/address/0x359c4E8225866aB97ab054ec36aBe923e70eF741) ## Getting Started diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json index 57af0b86..d7ecd194 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x3D9356FF595C2151513DFc520380d5A178224564", + "address": "0x1224E83DF410b43A65ed3e375a6442813B1aea14", "abi": [ { "inputs": [ @@ -275,31 +275,31 @@ "type": "function" } ], - "transactionHash": "0x10e462dfcf37adcc47ab6676bee019ffa66a149d16a712ba4fec09f7058e7633", + "transactionHash": "0x73d7aa3d34df16d3b5d4690fa37c81898400a0bebd1d8c0d3b10b2ce6ac3707b", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x3D9356FF595C2151513DFc520380d5A178224564", + "contractAddress": "0x1224E83DF410b43A65ed3e375a6442813B1aea14", "transactionIndex": 1, - "gasUsed": "671421", + "gasUsed": "671409", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xfc8a6ec80ca1bc51ee45520c45d9ad9cd1b7f08adcd315446121be10dec4e9ac", - "transactionHash": "0x10e462dfcf37adcc47ab6676bee019ffa66a149d16a712ba4fec09f7058e7633", + "blockHash": "0xb022fc01eb20ecdf4cee41efa9e9495699b69f1ef5aaaeae5f52539517773a11", + "transactionHash": "0x73d7aa3d34df16d3b5d4690fa37c81898400a0bebd1d8c0d3b10b2ce6ac3707b", "logs": [], - "blockNumber": 26290031, - "cumulativeGasUsed": "671421", + "blockNumber": 26291916, + "cumulativeGasUsed": "671409", "status": 1, "byzantium": true }, "args": [ 1800, - "0xb594c5C4eE3bF976d59F5d3DB311A1ac99D20FBA" + "0x8dC6CCd123E680018923000854dE7E293E744DA0" ], - "numDeployments": 10, - "solcInputHash": "ad697f618f73759e1d99ca054913682f", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0xf7aedd98f0149c6f63c4d59ad9fd5d6d2d16b75a42fe95d2064a157ff181007b\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161012001526105b401526000818161015f015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220a0a2597c30b2d5058f2616d02e3665ca367e57c05fd79670bc724658fa4fe1fd64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220a0a2597c30b2d5058f2616d02e3665ca367e57c05fd79670bc724658fa4fe1fd64736f6c63430008120033", + "numDeployments": 11, + "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0xf7aedd98f0149c6f63c4d59ad9fd5d6d2d16b75a42fe95d2064a157ff181007b\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161012001526105b401526000818161015f015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122091c8e50a4eb68a04b97bfd09e6eedc0e624aaef5954f963f1f6df55f1f0da9cf64736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122091c8e50a4eb68a04b97bfd09e6eedc0e624aaef5954f963f1f6df55f1f0da9cf64736f6c63430008120033", "devdoc": { "details": "Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.", "events": { diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json index 27f4b4d4..6aca3e95 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json @@ -1,5 +1,5 @@ { - "address": "0xa452Eecf27B545E4115E1cD3cC903aC361B1eE22", + "address": "0xb7d2C76641B21718cC8A0b595be438c863A6e031", "abi": [ { "inputs": [ @@ -275,31 +275,31 @@ "type": "function" } ], - "transactionHash": "0x69e9033d2c07a81b1da0ce4e7587e623d4d4a4bde1a0defe7e793294d9fc6a20", + "transactionHash": "0x621ce6c91a841c5f53081f66d2317b777fa769bb1eb7834b0a12aaa623555a8b", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xa452Eecf27B545E4115E1cD3cC903aC361B1eE22", + "contractAddress": "0xb7d2C76641B21718cC8A0b595be438c863A6e031", "transactionIndex": 1, "gasUsed": "671421", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x93ba9211730a42781d6c7b99998b33d5a3fc278776db542c981dce8bb085c3c2", - "transactionHash": "0x69e9033d2c07a81b1da0ce4e7587e623d4d4a4bde1a0defe7e793294d9fc6a20", + "blockHash": "0x9d88469049a4d41024c8280470e60bbf27c63e816ade963698bb66fa430ef479", + "transactionHash": "0x621ce6c91a841c5f53081f66d2317b777fa769bb1eb7834b0a12aaa623555a8b", "logs": [], - "blockNumber": 26289835, + "blockNumber": 26291751, "cumulativeGasUsed": "671421", "status": 1, "byzantium": true }, "args": [ 7200, - "0x64277c8c817b45B0e3CE45AbC222f16406920B9a" + "0x6dfc228652A6eE943eA37c269E2602BF2e198Ae9" ], - "numDeployments": 6, - "solcInputHash": "ad697f618f73759e1d99ca054913682f", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0xf7aedd98f0149c6f63c4d59ad9fd5d6d2d16b75a42fe95d2064a157ff181007b\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161012001526105b401526000818161015f015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220a0a2597c30b2d5058f2616d02e3665ca367e57c05fd79670bc724658fa4fe1fd64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220a0a2597c30b2d5058f2616d02e3665ca367e57c05fd79670bc724658fa4fe1fd64736f6c63430008120033", + "numDeployments": 7, + "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0xf7aedd98f0149c6f63c4d59ad9fd5d6d2d16b75a42fe95d2064a157ff181007b\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161012001526105b401526000818161015f015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122091c8e50a4eb68a04b97bfd09e6eedc0e624aaef5954f963f1f6df55f1f0da9cf64736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122091c8e50a4eb68a04b97bfd09e6eedc0e624aaef5954f963f1f6df55f1f0da9cf64736f6c63430008120033", "devdoc": { "details": "Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.", "events": { diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json index ad8a7e7b..bfcbf5d3 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xEC337Fb9977848D0784dC4F01A69c237691755E0", + "address": "0x84de475fed07406aA3B05248f1a7b0Fca11DA012", "abi": [ { "inputs": [ @@ -275,31 +275,31 @@ "type": "function" } ], - "transactionHash": "0x71cec675e8bbd6c4da19a14f1c64ab8c52676914e94195c86e340b0e9ed92b7b", + "transactionHash": "0xbc89595b1938802f1c49baebde8dee4c1ba33e60424fc6980ac8c6d4fcbeb071", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xEC337Fb9977848D0784dC4F01A69c237691755E0", + "contractAddress": "0x84de475fed07406aA3B05248f1a7b0Fca11DA012", "transactionIndex": 1, - "gasUsed": "671409", + "gasUsed": "671421", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x582338aa5162fbf74bb962fb260172492e20461c8804fc170af20cf038393edb", - "transactionHash": "0x71cec675e8bbd6c4da19a14f1c64ab8c52676914e94195c86e340b0e9ed92b7b", + "blockHash": "0x831e8546976f890d50c86061bdf3548dbd27c621d0aa2774271de03d561767c6", + "transactionHash": "0xbc89595b1938802f1c49baebde8dee4c1ba33e60424fc6980ac8c6d4fcbeb071", "logs": [], - "blockNumber": 26290084, - "cumulativeGasUsed": "671409", + "blockNumber": 26291957, + "cumulativeGasUsed": "671421", "status": 1, "byzantium": true }, "args": [ 1800, - "0x00f0A751C921B937208e49a92fAaeaF896733544" + "0xEe27226A8fa11Ba851410EB09d32884aEE219D75" ], - "numDeployments": 11, - "solcInputHash": "ad697f618f73759e1d99ca054913682f", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToL1.route, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x48eecf0d4e478ce7860635a206ceee6535b4f4765f9d25dddae463666e2bd7cb\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161015a01526105b4015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220994c2014c4b68b5175d78f99d2fb730f4a377df08484a25fda20c640bbd2b32e64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220994c2014c4b68b5175d78f99d2fb730f4a377df08484a25fda20c640bbd2b32e64736f6c63430008120033", + "numDeployments": 12, + "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToL1.route, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x48eecf0d4e478ce7860635a206ceee6535b4f4765f9d25dddae463666e2bd7cb\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161015a01526105b4015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220dc892c5af7180a16c7f018e369629c54bb0e298b1b18d9b76c200daa89ba2be064736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220dc892c5af7180a16c7f018e369629c54bb0e298b1b18d9b76c200daa89ba2be064736f6c63430008120033", "devdoc": { "details": "Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.", "events": { @@ -385,7 +385,7 @@ "storageLayout": { "storage": [ { - "astId": 2133, + "astId": 2130, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "snapshots", "offset": 0, @@ -393,7 +393,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2137, + "astId": 2134, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "inbox", "offset": 0, @@ -401,7 +401,7 @@ "type": "t_array(t_bytes32)64_storage" }, { - "astId": 2139, + "astId": 2136, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "count", "offset": 0, diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json index 13e7e155..430e5bc5 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0xf2DDe00c51be42c74e3927A324928381f83da37f", + "address": "0x4738A566706eDd30Fe175e20eDDd21c5c7bD79Ea", "abi": [ { "inputs": [ @@ -275,31 +275,31 @@ "type": "function" } ], - "transactionHash": "0xbfae6d80bc62d800b49a381c4f1568d3be876be1871c41e720a49faa10e3baa3", + "transactionHash": "0x7f1d46ed3c14e3f9408cc82f929bcff49165905a1fc0b6972d96811432b6e63a", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xf2DDe00c51be42c74e3927A324928381f83da37f", + "contractAddress": "0x4738A566706eDd30Fe175e20eDDd21c5c7bD79Ea", "transactionIndex": 1, "gasUsed": "671421", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xfd0197ca777be022fbe2759f50a01cf61c822a024b1c4038956f0beea1add7be", - "transactionHash": "0xbfae6d80bc62d800b49a381c4f1568d3be876be1871c41e720a49faa10e3baa3", + "blockHash": "0x4188992b1e3d431c84758a567287197ed89c3f4a6ae2fab378310aa6f662fbb6", + "transactionHash": "0x7f1d46ed3c14e3f9408cc82f929bcff49165905a1fc0b6972d96811432b6e63a", "logs": [], - "blockNumber": 26289882, + "blockNumber": 26291803, "cumulativeGasUsed": "671421", "status": 1, "byzantium": true }, "args": [ 3600, - "0x0C3Acd25FE091b02e8E9b30B9b51dBD5d58C8a41" + "0x359c4E8225866aB97ab054ec36aBe923e70eF741" ], - "numDeployments": 4, - "solcInputHash": "ad697f618f73759e1d99ca054913682f", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToL1.route, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x48eecf0d4e478ce7860635a206ceee6535b4f4765f9d25dddae463666e2bd7cb\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161015a01526105b4015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220994c2014c4b68b5175d78f99d2fb730f4a377df08484a25fda20c640bbd2b32e64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220994c2014c4b68b5175d78f99d2fb730f4a377df08484a25fda20c640bbd2b32e64736f6c63430008120033", + "numDeployments": 5, + "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToL1.route, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x48eecf0d4e478ce7860635a206ceee6535b4f4765f9d25dddae463666e2bd7cb\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161015a01526105b4015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220dc892c5af7180a16c7f018e369629c54bb0e298b1b18d9b76c200daa89ba2be064736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220dc892c5af7180a16c7f018e369629c54bb0e298b1b18d9b76c200daa89ba2be064736f6c63430008120033", "devdoc": { "details": "Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.", "events": { @@ -385,7 +385,7 @@ "storageLayout": { "storage": [ { - "astId": 2133, + "astId": 2130, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "snapshots", "offset": 0, @@ -393,7 +393,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2137, + "astId": 2134, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "inbox", "offset": 0, @@ -401,7 +401,7 @@ "type": "t_array(t_bytes32)64_storage" }, { - "astId": 2139, + "astId": 2136, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "count", "offset": 0, diff --git a/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json b/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json index e3327af0..e8af7282 100644 --- a/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json +++ b/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x00f0A751C921B937208e49a92fAaeaF896733544", + "address": "0xEe27226A8fa11Ba851410EB09d32884aEE219D75", "abi": [ { "inputs": [ @@ -1021,19 +1021,19 @@ "type": "function" } ], - "transactionHash": "0xfad9a44384260e83c5c64ab6495fc978f59b62716044745fd5092d3f61a72453", + "transactionHash": "0x39beb3d7c01432e4d547e8644e3a5f2740b3db69d1e58e4414f344b160c9ef89", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x00f0A751C921B937208e49a92fAaeaF896733544", + "contractAddress": "0xEe27226A8fa11Ba851410EB09d32884aEE219D75", "transactionIndex": 2, "gasUsed": "2118351", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x204847fc9d4e1f91f1dfb887127b0f62ca1470317b7b4057027cf17881ea86c6", - "transactionHash": "0xfad9a44384260e83c5c64ab6495fc978f59b62716044745fd5092d3f61a72453", + "blockHash": "0xecf9b5fd1ae480771ab2c633448ad8b17e312760c77c0c085c8e2ba9ad589bd1", + "transactionHash": "0x39beb3d7c01432e4d547e8644e3a5f2740b3db69d1e58e4414f344b160c9ef89", "logs": [], - "blockNumber": 4487091, - "cumulativeGasUsed": "2175395", + "blockNumber": 4487332, + "cumulativeGasUsed": "2306378", "status": 1, "byzantium": true }, @@ -1043,16 +1043,16 @@ 0, 10000000000000, "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0x696567a5F0A6DD4aAe1dBa6ddB4c977aB5B07CAC", + "0x770cDAF7284B8838c699910433A927a49bB6765A", 86400, 10000000000000, 5 ], - "numDeployments": 13, - "solcInputHash": "cf76e8aad7d9ce9f21e3b6b1180c6852", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosisDevnet\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_routerArbToGnosisDevnet\":\"The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\",\"_routerChainId\":\"The chain id of the router contract.\",\"_sequencerDelayLimit\":\"The maximum number of sequencer messages that can be submitted in a challenge period.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":\"VeaOutboxArbToGnosisDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n uint256 internal constant RELAY_TIMEOUT = 604800; // 7 days\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(_timestamp + RELAY_TIMEOUT <= block.timestamp, \\\"Stale message. Timeout exceeded.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x4664c71e751b8e200bbd7e12e3a8fd371576b28dacbae1551350843c6682ecf9\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToGnosis/VeaOutboxArbToGnosis.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Chiado.\\n/// Note: This contract is deployed on Chiado.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosisDevnet The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _sequencerDelayLimit The maximum number of sequencer messages that can be submitted in a challenge period.\\n /// @param _routerChainId The chain id of the router contract.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosisDevnet,\\n uint256 _maxMissingBlocks,\\n uint256 _sequencerDelayLimit,\\n uint256 _routerChainId\\n )\\n VeaOutboxArbToGnosis(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _amb,\\n _routerArbToGnosisDevnet,\\n _maxMissingBlocks,\\n _sequencerDelayLimit,\\n _routerChainId\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xab3a39d2515db68f62fde6addb1d845b20e04dc70fb5dcb329b69e8309dbc4d1\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101c06040523480156200001257600080fd5b50604051620027813803806200278183398101604081905262000035916200010e565b60c08990526101408890526101808690526101608790526001600160a01b03808616608052841660a0526101a082905261012081905260048390558888888888888888886200008660028a620001a7565b60e0819052620000988a6002620001ca565b620000a49190620001ea565b6101005261014051600190620000bb9042620001a7565b620000c79190620001ea565b6001555050600580546001600160a01b0319163317905550620002009e505050505050505050505050505050565b6001600160a01b03811681146200010b57600080fd5b50565b60008060008060008060008060006101208a8c0312156200012e57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a01516200015781620000f5565b60a08b01519095506200016a81620000f5565b8094505060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001c557634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001e457620001e462000191565b92915050565b81810381811115620001e457620001e462000191565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516124256200035c600039600081816104a50152611df30152600081816104d9015281816108a00152818161181b015281816119a60152611bb20152600081816105610152611d8701526000818161050d015281816108c401528181610c55015281816117090152818161183f015281816119ca0152611bd601526000818161040e01528181610a3b0152610d6e01526000818161149601526115cf0152600081816114430152611587015260008181610595015281816106a1015281816108270152818161085401528181610f7e0152818161161f01528181611b1001528181611b770152611d1d0152600081816105c901528181610b280152610e5b0152600081816102240152818161093f015281816109b901528181610a9d01528181610c8a01528181610cec0152610dd001526124256000f3fe6080604052600436106101d85760003560e01c80638ad3a8f711610102578063b633b94411610095578063da2b7bc411610064578063da2b7bc4146105eb578063df19e6ff1461060b578063e813a75514610638578063eedcf2a91461064e57600080fd5b8063b633b9441461052f578063c2114a161461054f578063d0e30db014610583578063d5e6a9df146105b757600080fd5b80639588eca2116100d15780639588eca21461047d578063aa22a1c614610493578063b044397e146104c7578063b5b7a184146104fb57600080fd5b80638ad3a8f7146103dc5780638d96fdea146103fc57806390df63b714610430578063930f28af1461045d57600080fd5b806331d144571161017a57806349b4299e1161014957806349b4299e1461035c5780634a439cfe1461037c578063541adcca1461039c5780638a619a71146103bc57600080fd5b806331d14457146102e957806331ddf743146102fc5780633ce43cfd1461031c5780634788cb381461033c57600080fd5b8063222ae786116101b6578063222ae786146102635780632639c0601461028657806327ee6bdd146102b35780632c192519146102c957600080fd5b806301139b68146101dd5780630f0adca5146101f25780631062b39a14610212575b600080fd5b6101f06101eb366004611fb0565b610661565b005b3480156101fe57600080fd5b506101f061020d366004611fde565b61089e565b34801561021e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561026f57600080fd5b50610278610c4e565b60405190815260200161025a565b34801561029257600080fd5b506102786102a1366004612015565b60026020526000908152604090205481565b3480156102bf57600080fd5b5061027860015481565b3480156102d557600080fd5b506101f06102e436600461202e565b610c7f565b6101f06102f736600461202e565b610f65565b34801561030857600080fd5b506101f06103173660046120b1565b6110ec565b34801561032857600080fd5b506101f0610337366004612173565b61138c565b34801561034857600080fd5b506101f0610357366004611fb0565b6114d3565b34801561036857600080fd5b506101f0610377366004611fb0565b611657565b34801561038857600080fd5b50610278610397366004612015565b611702565b3480156103a857600080fd5b506102786103b73660046121ac565b611734565b3480156103c857600080fd5b506101f06103d73660046121cf565b611786565b3480156103e857600080fd5b50600554610246906001600160a01b031681565b34801561040857600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561043c57600080fd5b5061027861044b366004612015565b60036020526000908152604090205481565b34801561046957600080fd5b506101f0610478366004611fb0565b611819565b34801561048957600080fd5b5061027860005481565b34801561049f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d357600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561050757600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561053b57600080fd5b506101f061054a366004611fb0565b6119a4565b34801561055b57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561058f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c357600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f757600080fd5b506101f0610606366004611fb0565b611bb0565b34801561061757600080fd5b5061062b6106263660046121ac565b611d69565b60405161025a9190612202565b34801561064457600080fd5b5061027860045481565b6101f061065c36600461202e565b611e30565b61066a81611734565b6000838152600260205260409020541461069f5760405162461bcd60e51b81526004016106969061221c565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561070f5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610696565b60c08101516001600160a01b03161561076a5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610696565b60008160a001516002811115610782576107826121ec565b146107cf5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610696565b3360c08201526107de81611734565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f000000000000000000000000000000000000000000000000000000000000000034111561089a5760006108797f00000000000000000000000000000000000000000000000000000000000000003461225a565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816108f1576108f161226d565b040311156109345760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109b75760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190612283565b7f000000000000000000000000000000000000000000000000000000000000000014610a9b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1d919061229c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b905760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b60015483118015610ba057508115155b15610be357600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610bec81611734565b60008481526002602052604090205403610c49578051829003610c1557600160a0820152610c30565b60c08101516001600160a01b031615610c3057600260a08201525b610c3981611734565b6000848152600260205260409020555b505050565b6000610c7a7f0000000000000000000000000000000000000000000000000000000000000000426122b9565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cea5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6c9190612283565b7f000000000000000000000000000000000000000000000000000000000000000014610dce5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e50919061229c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610ec35760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b42610ed162093a80836122db565b1115610f1f5760405162461bcd60e51b815260206004820181905260248201527f5374616c65206d6573736167652e2054696d656f75742065786365656465642e6044820152606401610696565b816004541461089a5760048290556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6005546001600160a01b03163314610f7c57600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610fec5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610696565b806110095760405162461bcd60e51b81526004016106969061221c565b6000828152600260205260409020541561105b5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610696565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526110a190611734565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050565b6040851061112e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610696565b60008484848460405160200161114794939291906122ee565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156111c757600088888381811061118957611189612330565b905060200201359050828111156111ae578260005280602052604060002092506111be565b8060005282602052604060002092505b5060010161116d565b50806000541461120a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610696565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561127f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610696565b6000838152600360205260408082206001851b84179055516001600160a01b038916906112af9089908990612346565b6000604051808303816000865af19150503d80600081146112ec576040519150601f19603f3d011682016040523d82523d6000602084013e6112f1565b606091505b50509050806113425760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610696565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61139e6103b7368390038301836121ac565b600083815260026020526040902054146113ca5760405162461bcd60e51b81526004016106969061221c565b60026113dc60c0830160a08401612356565b60028111156113ed576113ed6121ec565b1461142e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610696565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061148893505060e0840191505060c083016121cf565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114dc81611734565b600083815260026020526040902054146115085760405162461bcd60e51b81526004016106969061221c565b60018160a001516002811115611520576115206121ec565b1461155d5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610696565b60008281526002602052604081205560c08101516001600160a01b031615611609576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6005546001600160a01b0316331461166e57600080fd5b61167781611734565b600083815260026020526040902054146116a35760405162461bcd60e51b81526004016106969061221c565b63ffffffff4281166060830152431660808201526116c081611734565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610f59565b600061172e7f0000000000000000000000000000000000000000000000000000000000000000836122b9565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611769989097969101612371565b604051602081830303815290604052805190602001209050919050565b6005546001600160a01b0316331461179d57600080fd5b6005546001600160a01b031633146117f75760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610696565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161186c5761186c61226d565b040311156118af5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b6118b881611734565b600083815260026020526040902054146118e45760405162461bcd60e51b81526004016106969061221c565b60c08101516001600160a01b0316156119365760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610696565b60015482111561197e57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261198e81611734565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119f7576119f761226d565b040311611a385760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611a4181611734565b60008381526002602052604090205414611a6d5760405162461bcd60e51b81526004016106969061221c565b60008160a001516002811115611a8557611a856121ec565b14611ac45760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60c08101516001600160a01b03161561089a5760208101516001600160a01b0316611b485760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b5c82611734565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c0357611c0361226d565b040311611c445760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611c4d81611734565b60008381526002602052604090205414611c795760405162461bcd60e51b81526004016106969061221c565b60008160a001516002811115611c9157611c916121ec565b14611cd05760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60208101516001600160a01b03161561089a5760c08101516001600160a01b0316611d555760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b5c82611734565b6000816060015163ffffffff16600003611d8557506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611dc157506003919050565b60006005836060015163ffffffff16420381611ddf57611ddf61226d565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611e235760019250611e28565b600092505b50505b919050565b611e3a8282610f65565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611e818382611657565b63ffffffff428116606083015243166080820152611e9f8382611819565b600160a0820152610c4983826114d3565b6001600160a01b0381168114611ec557600080fd5b50565b8035611e2b81611eb0565b803563ffffffff81168114611e2b57600080fd5b803560038110611e2b57600080fd5b600060e08284031215611f0857600080fd5b60405160e0810181811067ffffffffffffffff82111715611f3957634e487b7160e01b600052604160045260246000fd5b60405282358152905080611f4f60208401611ec8565b6020820152611f6060408401611ed3565b6040820152611f7160608401611ed3565b6060820152611f8260808401611ed3565b6080820152611f9360a08401611ee7565b60a0820152611fa460c08401611ec8565b60c08201525092915050565b6000806101008385031215611fc457600080fd5b82359150611fd58460208501611ef6565b90509250929050565b60008060006101208486031215611ff457600080fd5b833592506020840135915061200c8560408601611ef6565b90509250925092565b60006020828403121561202757600080fd5b5035919050565b6000806040838503121561204157600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611e2b57600080fd5b60008083601f84011261207a57600080fd5b50813567ffffffffffffffff81111561209257600080fd5b6020830191508360208285010111156120aa57600080fd5b9250929050565b600080600080600080608087890312156120ca57600080fd5b863567ffffffffffffffff808211156120e257600080fd5b818901915089601f8301126120f657600080fd5b81358181111561210557600080fd5b8a60208260051b850101111561211a57600080fd5b6020830198508097505061213060208a01612050565b955061213e60408a01611ec8565b9450606089013591508082111561215457600080fd5b5061216189828a01612068565b979a9699509497509295939492505050565b60008082840361010081121561218857600080fd5b8335925060e0601f198201121561219e57600080fd5b506020830190509250929050565b600060e082840312156121be57600080fd5b6121c88383611ef6565b9392505050565b6000602082840312156121e157600080fd5b81356121c881611eb0565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612216576122166121ec565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561172e5761172e612244565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561229557600080fd5b5051919050565b6000602082840312156122ae57600080fd5b81516121c881611eb0565b6000826122d657634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561172e5761172e612244565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561236857600080fd5b6121c882611ee7565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106123c9576123c96121ec565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220c7e915c2891f4ad92ffb181e2f021e77c9afd9d9dcb76bb23e8b47d577fec11c64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101d85760003560e01c80638ad3a8f711610102578063b633b94411610095578063da2b7bc411610064578063da2b7bc4146105eb578063df19e6ff1461060b578063e813a75514610638578063eedcf2a91461064e57600080fd5b8063b633b9441461052f578063c2114a161461054f578063d0e30db014610583578063d5e6a9df146105b757600080fd5b80639588eca2116100d15780639588eca21461047d578063aa22a1c614610493578063b044397e146104c7578063b5b7a184146104fb57600080fd5b80638ad3a8f7146103dc5780638d96fdea146103fc57806390df63b714610430578063930f28af1461045d57600080fd5b806331d144571161017a57806349b4299e1161014957806349b4299e1461035c5780634a439cfe1461037c578063541adcca1461039c5780638a619a71146103bc57600080fd5b806331d14457146102e957806331ddf743146102fc5780633ce43cfd1461031c5780634788cb381461033c57600080fd5b8063222ae786116101b6578063222ae786146102635780632639c0601461028657806327ee6bdd146102b35780632c192519146102c957600080fd5b806301139b68146101dd5780630f0adca5146101f25780631062b39a14610212575b600080fd5b6101f06101eb366004611fb0565b610661565b005b3480156101fe57600080fd5b506101f061020d366004611fde565b61089e565b34801561021e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561026f57600080fd5b50610278610c4e565b60405190815260200161025a565b34801561029257600080fd5b506102786102a1366004612015565b60026020526000908152604090205481565b3480156102bf57600080fd5b5061027860015481565b3480156102d557600080fd5b506101f06102e436600461202e565b610c7f565b6101f06102f736600461202e565b610f65565b34801561030857600080fd5b506101f06103173660046120b1565b6110ec565b34801561032857600080fd5b506101f0610337366004612173565b61138c565b34801561034857600080fd5b506101f0610357366004611fb0565b6114d3565b34801561036857600080fd5b506101f0610377366004611fb0565b611657565b34801561038857600080fd5b50610278610397366004612015565b611702565b3480156103a857600080fd5b506102786103b73660046121ac565b611734565b3480156103c857600080fd5b506101f06103d73660046121cf565b611786565b3480156103e857600080fd5b50600554610246906001600160a01b031681565b34801561040857600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561043c57600080fd5b5061027861044b366004612015565b60036020526000908152604090205481565b34801561046957600080fd5b506101f0610478366004611fb0565b611819565b34801561048957600080fd5b5061027860005481565b34801561049f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d357600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561050757600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561053b57600080fd5b506101f061054a366004611fb0565b6119a4565b34801561055b57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561058f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c357600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f757600080fd5b506101f0610606366004611fb0565b611bb0565b34801561061757600080fd5b5061062b6106263660046121ac565b611d69565b60405161025a9190612202565b34801561064457600080fd5b5061027860045481565b6101f061065c36600461202e565b611e30565b61066a81611734565b6000838152600260205260409020541461069f5760405162461bcd60e51b81526004016106969061221c565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561070f5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610696565b60c08101516001600160a01b03161561076a5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610696565b60008160a001516002811115610782576107826121ec565b146107cf5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610696565b3360c08201526107de81611734565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f000000000000000000000000000000000000000000000000000000000000000034111561089a5760006108797f00000000000000000000000000000000000000000000000000000000000000003461225a565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816108f1576108f161226d565b040311156109345760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109b75760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190612283565b7f000000000000000000000000000000000000000000000000000000000000000014610a9b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1d919061229c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b905760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b60015483118015610ba057508115155b15610be357600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610bec81611734565b60008481526002602052604090205403610c49578051829003610c1557600160a0820152610c30565b60c08101516001600160a01b031615610c3057600260a08201525b610c3981611734565b6000848152600260205260409020555b505050565b6000610c7a7f0000000000000000000000000000000000000000000000000000000000000000426122b9565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cea5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6c9190612283565b7f000000000000000000000000000000000000000000000000000000000000000014610dce5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e50919061229c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610ec35760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b42610ed162093a80836122db565b1115610f1f5760405162461bcd60e51b815260206004820181905260248201527f5374616c65206d6573736167652e2054696d656f75742065786365656465642e6044820152606401610696565b816004541461089a5760048290556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6005546001600160a01b03163314610f7c57600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610fec5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610696565b806110095760405162461bcd60e51b81526004016106969061221c565b6000828152600260205260409020541561105b5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610696565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526110a190611734565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050565b6040851061112e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610696565b60008484848460405160200161114794939291906122ee565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156111c757600088888381811061118957611189612330565b905060200201359050828111156111ae578260005280602052604060002092506111be565b8060005282602052604060002092505b5060010161116d565b50806000541461120a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610696565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561127f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610696565b6000838152600360205260408082206001851b84179055516001600160a01b038916906112af9089908990612346565b6000604051808303816000865af19150503d80600081146112ec576040519150601f19603f3d011682016040523d82523d6000602084013e6112f1565b606091505b50509050806113425760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610696565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61139e6103b7368390038301836121ac565b600083815260026020526040902054146113ca5760405162461bcd60e51b81526004016106969061221c565b60026113dc60c0830160a08401612356565b60028111156113ed576113ed6121ec565b1461142e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610696565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061148893505060e0840191505060c083016121cf565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114dc81611734565b600083815260026020526040902054146115085760405162461bcd60e51b81526004016106969061221c565b60018160a001516002811115611520576115206121ec565b1461155d5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610696565b60008281526002602052604081205560c08101516001600160a01b031615611609576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6005546001600160a01b0316331461166e57600080fd5b61167781611734565b600083815260026020526040902054146116a35760405162461bcd60e51b81526004016106969061221c565b63ffffffff4281166060830152431660808201526116c081611734565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610f59565b600061172e7f0000000000000000000000000000000000000000000000000000000000000000836122b9565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611769989097969101612371565b604051602081830303815290604052805190602001209050919050565b6005546001600160a01b0316331461179d57600080fd5b6005546001600160a01b031633146117f75760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610696565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161186c5761186c61226d565b040311156118af5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b6118b881611734565b600083815260026020526040902054146118e45760405162461bcd60e51b81526004016106969061221c565b60c08101516001600160a01b0316156119365760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610696565b60015482111561197e57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261198e81611734565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119f7576119f761226d565b040311611a385760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611a4181611734565b60008381526002602052604090205414611a6d5760405162461bcd60e51b81526004016106969061221c565b60008160a001516002811115611a8557611a856121ec565b14611ac45760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60c08101516001600160a01b03161561089a5760208101516001600160a01b0316611b485760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b5c82611734565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c0357611c0361226d565b040311611c445760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611c4d81611734565b60008381526002602052604090205414611c795760405162461bcd60e51b81526004016106969061221c565b60008160a001516002811115611c9157611c916121ec565b14611cd05760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60208101516001600160a01b03161561089a5760c08101516001600160a01b0316611d555760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b5c82611734565b6000816060015163ffffffff16600003611d8557506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611dc157506003919050565b60006005836060015163ffffffff16420381611ddf57611ddf61226d565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611e235760019250611e28565b600092505b50505b919050565b611e3a8282610f65565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611e818382611657565b63ffffffff428116606083015243166080820152611e9f8382611819565b600160a0820152610c4983826114d3565b6001600160a01b0381168114611ec557600080fd5b50565b8035611e2b81611eb0565b803563ffffffff81168114611e2b57600080fd5b803560038110611e2b57600080fd5b600060e08284031215611f0857600080fd5b60405160e0810181811067ffffffffffffffff82111715611f3957634e487b7160e01b600052604160045260246000fd5b60405282358152905080611f4f60208401611ec8565b6020820152611f6060408401611ed3565b6040820152611f7160608401611ed3565b6060820152611f8260808401611ed3565b6080820152611f9360a08401611ee7565b60a0820152611fa460c08401611ec8565b60c08201525092915050565b6000806101008385031215611fc457600080fd5b82359150611fd58460208501611ef6565b90509250929050565b60008060006101208486031215611ff457600080fd5b833592506020840135915061200c8560408601611ef6565b90509250925092565b60006020828403121561202757600080fd5b5035919050565b6000806040838503121561204157600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611e2b57600080fd5b60008083601f84011261207a57600080fd5b50813567ffffffffffffffff81111561209257600080fd5b6020830191508360208285010111156120aa57600080fd5b9250929050565b600080600080600080608087890312156120ca57600080fd5b863567ffffffffffffffff808211156120e257600080fd5b818901915089601f8301126120f657600080fd5b81358181111561210557600080fd5b8a60208260051b850101111561211a57600080fd5b6020830198508097505061213060208a01612050565b955061213e60408a01611ec8565b9450606089013591508082111561215457600080fd5b5061216189828a01612068565b979a9699509497509295939492505050565b60008082840361010081121561218857600080fd5b8335925060e0601f198201121561219e57600080fd5b506020830190509250929050565b600060e082840312156121be57600080fd5b6121c88383611ef6565b9392505050565b6000602082840312156121e157600080fd5b81356121c881611eb0565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612216576122166121ec565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561172e5761172e612244565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561229557600080fd5b5051919050565b6000602082840312156122ae57600080fd5b81516121c881611eb0565b6000826122d657634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561172e5761172e612244565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561236857600080fd5b6121c882611ee7565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106123c9576123c96121ec565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220c7e915c2891f4ad92ffb181e2f021e77c9afd9d9dcb76bb23e8b47d577fec11c64736f6c63430008120033", + "numDeployments": 14, + "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosisDevnet\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_routerArbToGnosisDevnet\":\"The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\",\"_routerChainId\":\"The chain id of the router contract.\",\"_sequencerDelayLimit\":\"The maximum number of sequencer messages that can be submitted in a challenge period.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":\"VeaOutboxArbToGnosisDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n uint256 internal constant RELAY_TIMEOUT = 604800; // 7 days\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(_timestamp + RELAY_TIMEOUT >= block.timestamp, \\\"Stale message. Timeout exceeded.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x4071f3ea552af8995a457452838f14493645a15b9eed12ae248ed5ab22316b4b\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToGnosis/VeaOutboxArbToGnosis.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Chiado.\\n/// Note: This contract is deployed on Chiado.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosisDevnet The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _sequencerDelayLimit The maximum number of sequencer messages that can be submitted in a challenge period.\\n /// @param _routerChainId The chain id of the router contract.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosisDevnet,\\n uint256 _maxMissingBlocks,\\n uint256 _sequencerDelayLimit,\\n uint256 _routerChainId\\n )\\n VeaOutboxArbToGnosis(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _amb,\\n _routerArbToGnosisDevnet,\\n _maxMissingBlocks,\\n _sequencerDelayLimit,\\n _routerChainId\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xab3a39d2515db68f62fde6addb1d845b20e04dc70fb5dcb329b69e8309dbc4d1\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101c06040523480156200001257600080fd5b50604051620027813803806200278183398101604081905262000035916200010e565b60c08990526101408890526101808690526101608790526001600160a01b03808616608052841660a0526101a082905261012081905260048390558888888888888888886200008660028a620001a7565b60e0819052620000988a6002620001ca565b620000a49190620001ea565b6101005261014051600190620000bb9042620001a7565b620000c79190620001ea565b6001555050600580546001600160a01b0319163317905550620002009e505050505050505050505050505050565b6001600160a01b03811681146200010b57600080fd5b50565b60008060008060008060008060006101208a8c0312156200012e57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a01516200015781620000f5565b60a08b01519095506200016a81620000f5565b8094505060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001c557634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001e457620001e462000191565b92915050565b81810381811115620001e457620001e462000191565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516124256200035c600039600081816104a50152611df30152600081816104d9015281816108a00152818161181b015281816119a60152611bb20152600081816105610152611d8701526000818161050d015281816108c401528181610c55015281816117090152818161183f015281816119ca0152611bd601526000818161040e01528181610a3b0152610d6e01526000818161149601526115cf0152600081816114430152611587015260008181610595015281816106a1015281816108270152818161085401528181610f7e0152818161161f01528181611b1001528181611b770152611d1d0152600081816105c901528181610b280152610e5b0152600081816102240152818161093f015281816109b901528181610a9d01528181610c8a01528181610cec0152610dd001526124256000f3fe6080604052600436106101d85760003560e01c80638ad3a8f711610102578063b633b94411610095578063da2b7bc411610064578063da2b7bc4146105eb578063df19e6ff1461060b578063e813a75514610638578063eedcf2a91461064e57600080fd5b8063b633b9441461052f578063c2114a161461054f578063d0e30db014610583578063d5e6a9df146105b757600080fd5b80639588eca2116100d15780639588eca21461047d578063aa22a1c614610493578063b044397e146104c7578063b5b7a184146104fb57600080fd5b80638ad3a8f7146103dc5780638d96fdea146103fc57806390df63b714610430578063930f28af1461045d57600080fd5b806331d144571161017a57806349b4299e1161014957806349b4299e1461035c5780634a439cfe1461037c578063541adcca1461039c5780638a619a71146103bc57600080fd5b806331d14457146102e957806331ddf743146102fc5780633ce43cfd1461031c5780634788cb381461033c57600080fd5b8063222ae786116101b6578063222ae786146102635780632639c0601461028657806327ee6bdd146102b35780632c192519146102c957600080fd5b806301139b68146101dd5780630f0adca5146101f25780631062b39a14610212575b600080fd5b6101f06101eb366004611fb0565b610661565b005b3480156101fe57600080fd5b506101f061020d366004611fde565b61089e565b34801561021e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561026f57600080fd5b50610278610c4e565b60405190815260200161025a565b34801561029257600080fd5b506102786102a1366004612015565b60026020526000908152604090205481565b3480156102bf57600080fd5b5061027860015481565b3480156102d557600080fd5b506101f06102e436600461202e565b610c7f565b6101f06102f736600461202e565b610f65565b34801561030857600080fd5b506101f06103173660046120b1565b6110ec565b34801561032857600080fd5b506101f0610337366004612173565b61138c565b34801561034857600080fd5b506101f0610357366004611fb0565b6114d3565b34801561036857600080fd5b506101f0610377366004611fb0565b611657565b34801561038857600080fd5b50610278610397366004612015565b611702565b3480156103a857600080fd5b506102786103b73660046121ac565b611734565b3480156103c857600080fd5b506101f06103d73660046121cf565b611786565b3480156103e857600080fd5b50600554610246906001600160a01b031681565b34801561040857600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561043c57600080fd5b5061027861044b366004612015565b60036020526000908152604090205481565b34801561046957600080fd5b506101f0610478366004611fb0565b611819565b34801561048957600080fd5b5061027860005481565b34801561049f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d357600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561050757600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561053b57600080fd5b506101f061054a366004611fb0565b6119a4565b34801561055b57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561058f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c357600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f757600080fd5b506101f0610606366004611fb0565b611bb0565b34801561061757600080fd5b5061062b6106263660046121ac565b611d69565b60405161025a9190612202565b34801561064457600080fd5b5061027860045481565b6101f061065c36600461202e565b611e30565b61066a81611734565b6000838152600260205260409020541461069f5760405162461bcd60e51b81526004016106969061221c565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561070f5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610696565b60c08101516001600160a01b03161561076a5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610696565b60008160a001516002811115610782576107826121ec565b146107cf5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610696565b3360c08201526107de81611734565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f000000000000000000000000000000000000000000000000000000000000000034111561089a5760006108797f00000000000000000000000000000000000000000000000000000000000000003461225a565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816108f1576108f161226d565b040311156109345760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109b75760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190612283565b7f000000000000000000000000000000000000000000000000000000000000000014610a9b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1d919061229c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b905760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b60015483118015610ba057508115155b15610be357600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610bec81611734565b60008481526002602052604090205403610c49578051829003610c1557600160a0820152610c30565b60c08101516001600160a01b031615610c3057600260a08201525b610c3981611734565b6000848152600260205260409020555b505050565b6000610c7a7f0000000000000000000000000000000000000000000000000000000000000000426122b9565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cea5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6c9190612283565b7f000000000000000000000000000000000000000000000000000000000000000014610dce5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e50919061229c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610ec35760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b42610ed162093a80836122db565b1015610f1f5760405162461bcd60e51b815260206004820181905260248201527f5374616c65206d6573736167652e2054696d656f75742065786365656465642e6044820152606401610696565b816004541461089a5760048290556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6005546001600160a01b03163314610f7c57600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610fec5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610696565b806110095760405162461bcd60e51b81526004016106969061221c565b6000828152600260205260409020541561105b5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610696565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526110a190611734565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050565b6040851061112e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610696565b60008484848460405160200161114794939291906122ee565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156111c757600088888381811061118957611189612330565b905060200201359050828111156111ae578260005280602052604060002092506111be565b8060005282602052604060002092505b5060010161116d565b50806000541461120a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610696565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561127f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610696565b6000838152600360205260408082206001851b84179055516001600160a01b038916906112af9089908990612346565b6000604051808303816000865af19150503d80600081146112ec576040519150601f19603f3d011682016040523d82523d6000602084013e6112f1565b606091505b50509050806113425760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610696565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61139e6103b7368390038301836121ac565b600083815260026020526040902054146113ca5760405162461bcd60e51b81526004016106969061221c565b60026113dc60c0830160a08401612356565b60028111156113ed576113ed6121ec565b1461142e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610696565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061148893505060e0840191505060c083016121cf565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114dc81611734565b600083815260026020526040902054146115085760405162461bcd60e51b81526004016106969061221c565b60018160a001516002811115611520576115206121ec565b1461155d5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610696565b60008281526002602052604081205560c08101516001600160a01b031615611609576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6005546001600160a01b0316331461166e57600080fd5b61167781611734565b600083815260026020526040902054146116a35760405162461bcd60e51b81526004016106969061221c565b63ffffffff4281166060830152431660808201526116c081611734565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610f59565b600061172e7f0000000000000000000000000000000000000000000000000000000000000000836122b9565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611769989097969101612371565b604051602081830303815290604052805190602001209050919050565b6005546001600160a01b0316331461179d57600080fd5b6005546001600160a01b031633146117f75760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610696565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161186c5761186c61226d565b040311156118af5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b6118b881611734565b600083815260026020526040902054146118e45760405162461bcd60e51b81526004016106969061221c565b60c08101516001600160a01b0316156119365760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610696565b60015482111561197e57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261198e81611734565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119f7576119f761226d565b040311611a385760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611a4181611734565b60008381526002602052604090205414611a6d5760405162461bcd60e51b81526004016106969061221c565b60008160a001516002811115611a8557611a856121ec565b14611ac45760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60c08101516001600160a01b03161561089a5760208101516001600160a01b0316611b485760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b5c82611734565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c0357611c0361226d565b040311611c445760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611c4d81611734565b60008381526002602052604090205414611c795760405162461bcd60e51b81526004016106969061221c565b60008160a001516002811115611c9157611c916121ec565b14611cd05760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60208101516001600160a01b03161561089a5760c08101516001600160a01b0316611d555760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b5c82611734565b6000816060015163ffffffff16600003611d8557506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611dc157506003919050565b60006005836060015163ffffffff16420381611ddf57611ddf61226d565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611e235760019250611e28565b600092505b50505b919050565b611e3a8282610f65565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611e818382611657565b63ffffffff428116606083015243166080820152611e9f8382611819565b600160a0820152610c4983826114d3565b6001600160a01b0381168114611ec557600080fd5b50565b8035611e2b81611eb0565b803563ffffffff81168114611e2b57600080fd5b803560038110611e2b57600080fd5b600060e08284031215611f0857600080fd5b60405160e0810181811067ffffffffffffffff82111715611f3957634e487b7160e01b600052604160045260246000fd5b60405282358152905080611f4f60208401611ec8565b6020820152611f6060408401611ed3565b6040820152611f7160608401611ed3565b6060820152611f8260808401611ed3565b6080820152611f9360a08401611ee7565b60a0820152611fa460c08401611ec8565b60c08201525092915050565b6000806101008385031215611fc457600080fd5b82359150611fd58460208501611ef6565b90509250929050565b60008060006101208486031215611ff457600080fd5b833592506020840135915061200c8560408601611ef6565b90509250925092565b60006020828403121561202757600080fd5b5035919050565b6000806040838503121561204157600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611e2b57600080fd5b60008083601f84011261207a57600080fd5b50813567ffffffffffffffff81111561209257600080fd5b6020830191508360208285010111156120aa57600080fd5b9250929050565b600080600080600080608087890312156120ca57600080fd5b863567ffffffffffffffff808211156120e257600080fd5b818901915089601f8301126120f657600080fd5b81358181111561210557600080fd5b8a60208260051b850101111561211a57600080fd5b6020830198508097505061213060208a01612050565b955061213e60408a01611ec8565b9450606089013591508082111561215457600080fd5b5061216189828a01612068565b979a9699509497509295939492505050565b60008082840361010081121561218857600080fd5b8335925060e0601f198201121561219e57600080fd5b506020830190509250929050565b600060e082840312156121be57600080fd5b6121c88383611ef6565b9392505050565b6000602082840312156121e157600080fd5b81356121c881611eb0565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612216576122166121ec565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561172e5761172e612244565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561229557600080fd5b5051919050565b6000602082840312156122ae57600080fd5b81516121c881611eb0565b6000826122d657634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561172e5761172e612244565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561236857600080fd5b6121c882611ee7565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106123c9576123c96121ec565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220dcbe1b24e9c4d98ae26b359eacec08cf99164f7cb3fadf04b8845933d2d69d7964736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101d85760003560e01c80638ad3a8f711610102578063b633b94411610095578063da2b7bc411610064578063da2b7bc4146105eb578063df19e6ff1461060b578063e813a75514610638578063eedcf2a91461064e57600080fd5b8063b633b9441461052f578063c2114a161461054f578063d0e30db014610583578063d5e6a9df146105b757600080fd5b80639588eca2116100d15780639588eca21461047d578063aa22a1c614610493578063b044397e146104c7578063b5b7a184146104fb57600080fd5b80638ad3a8f7146103dc5780638d96fdea146103fc57806390df63b714610430578063930f28af1461045d57600080fd5b806331d144571161017a57806349b4299e1161014957806349b4299e1461035c5780634a439cfe1461037c578063541adcca1461039c5780638a619a71146103bc57600080fd5b806331d14457146102e957806331ddf743146102fc5780633ce43cfd1461031c5780634788cb381461033c57600080fd5b8063222ae786116101b6578063222ae786146102635780632639c0601461028657806327ee6bdd146102b35780632c192519146102c957600080fd5b806301139b68146101dd5780630f0adca5146101f25780631062b39a14610212575b600080fd5b6101f06101eb366004611fb0565b610661565b005b3480156101fe57600080fd5b506101f061020d366004611fde565b61089e565b34801561021e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561026f57600080fd5b50610278610c4e565b60405190815260200161025a565b34801561029257600080fd5b506102786102a1366004612015565b60026020526000908152604090205481565b3480156102bf57600080fd5b5061027860015481565b3480156102d557600080fd5b506101f06102e436600461202e565b610c7f565b6101f06102f736600461202e565b610f65565b34801561030857600080fd5b506101f06103173660046120b1565b6110ec565b34801561032857600080fd5b506101f0610337366004612173565b61138c565b34801561034857600080fd5b506101f0610357366004611fb0565b6114d3565b34801561036857600080fd5b506101f0610377366004611fb0565b611657565b34801561038857600080fd5b50610278610397366004612015565b611702565b3480156103a857600080fd5b506102786103b73660046121ac565b611734565b3480156103c857600080fd5b506101f06103d73660046121cf565b611786565b3480156103e857600080fd5b50600554610246906001600160a01b031681565b34801561040857600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561043c57600080fd5b5061027861044b366004612015565b60036020526000908152604090205481565b34801561046957600080fd5b506101f0610478366004611fb0565b611819565b34801561048957600080fd5b5061027860005481565b34801561049f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d357600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561050757600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561053b57600080fd5b506101f061054a366004611fb0565b6119a4565b34801561055b57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561058f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c357600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f757600080fd5b506101f0610606366004611fb0565b611bb0565b34801561061757600080fd5b5061062b6106263660046121ac565b611d69565b60405161025a9190612202565b34801561064457600080fd5b5061027860045481565b6101f061065c36600461202e565b611e30565b61066a81611734565b6000838152600260205260409020541461069f5760405162461bcd60e51b81526004016106969061221c565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561070f5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610696565b60c08101516001600160a01b03161561076a5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610696565b60008160a001516002811115610782576107826121ec565b146107cf5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610696565b3360c08201526107de81611734565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f000000000000000000000000000000000000000000000000000000000000000034111561089a5760006108797f00000000000000000000000000000000000000000000000000000000000000003461225a565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816108f1576108f161226d565b040311156109345760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109b75760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190612283565b7f000000000000000000000000000000000000000000000000000000000000000014610a9b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1d919061229c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b905760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b60015483118015610ba057508115155b15610be357600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610bec81611734565b60008481526002602052604090205403610c49578051829003610c1557600160a0820152610c30565b60c08101516001600160a01b031615610c3057600260a08201525b610c3981611734565b6000848152600260205260409020555b505050565b6000610c7a7f0000000000000000000000000000000000000000000000000000000000000000426122b9565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cea5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6c9190612283565b7f000000000000000000000000000000000000000000000000000000000000000014610dce5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e50919061229c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610ec35760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b42610ed162093a80836122db565b1015610f1f5760405162461bcd60e51b815260206004820181905260248201527f5374616c65206d6573736167652e2054696d656f75742065786365656465642e6044820152606401610696565b816004541461089a5760048290556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6005546001600160a01b03163314610f7c57600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610fec5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610696565b806110095760405162461bcd60e51b81526004016106969061221c565b6000828152600260205260409020541561105b5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610696565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526110a190611734565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050565b6040851061112e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610696565b60008484848460405160200161114794939291906122ee565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156111c757600088888381811061118957611189612330565b905060200201359050828111156111ae578260005280602052604060002092506111be565b8060005282602052604060002092505b5060010161116d565b50806000541461120a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610696565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561127f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610696565b6000838152600360205260408082206001851b84179055516001600160a01b038916906112af9089908990612346565b6000604051808303816000865af19150503d80600081146112ec576040519150601f19603f3d011682016040523d82523d6000602084013e6112f1565b606091505b50509050806113425760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610696565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61139e6103b7368390038301836121ac565b600083815260026020526040902054146113ca5760405162461bcd60e51b81526004016106969061221c565b60026113dc60c0830160a08401612356565b60028111156113ed576113ed6121ec565b1461142e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610696565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061148893505060e0840191505060c083016121cf565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114dc81611734565b600083815260026020526040902054146115085760405162461bcd60e51b81526004016106969061221c565b60018160a001516002811115611520576115206121ec565b1461155d5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610696565b60008281526002602052604081205560c08101516001600160a01b031615611609576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6005546001600160a01b0316331461166e57600080fd5b61167781611734565b600083815260026020526040902054146116a35760405162461bcd60e51b81526004016106969061221c565b63ffffffff4281166060830152431660808201526116c081611734565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610f59565b600061172e7f0000000000000000000000000000000000000000000000000000000000000000836122b9565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611769989097969101612371565b604051602081830303815290604052805190602001209050919050565b6005546001600160a01b0316331461179d57600080fd5b6005546001600160a01b031633146117f75760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610696565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161186c5761186c61226d565b040311156118af5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b6118b881611734565b600083815260026020526040902054146118e45760405162461bcd60e51b81526004016106969061221c565b60c08101516001600160a01b0316156119365760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610696565b60015482111561197e57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261198e81611734565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119f7576119f761226d565b040311611a385760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611a4181611734565b60008381526002602052604090205414611a6d5760405162461bcd60e51b81526004016106969061221c565b60008160a001516002811115611a8557611a856121ec565b14611ac45760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60c08101516001600160a01b03161561089a5760208101516001600160a01b0316611b485760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b5c82611734565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c0357611c0361226d565b040311611c445760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611c4d81611734565b60008381526002602052604090205414611c795760405162461bcd60e51b81526004016106969061221c565b60008160a001516002811115611c9157611c916121ec565b14611cd05760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60208101516001600160a01b03161561089a5760c08101516001600160a01b0316611d555760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b5c82611734565b6000816060015163ffffffff16600003611d8557506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611dc157506003919050565b60006005836060015163ffffffff16420381611ddf57611ddf61226d565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611e235760019250611e28565b600092505b50505b919050565b611e3a8282610f65565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611e818382611657565b63ffffffff428116606083015243166080820152611e9f8382611819565b600160a0820152610c4983826114d3565b6001600160a01b0381168114611ec557600080fd5b50565b8035611e2b81611eb0565b803563ffffffff81168114611e2b57600080fd5b803560038110611e2b57600080fd5b600060e08284031215611f0857600080fd5b60405160e0810181811067ffffffffffffffff82111715611f3957634e487b7160e01b600052604160045260246000fd5b60405282358152905080611f4f60208401611ec8565b6020820152611f6060408401611ed3565b6040820152611f7160608401611ed3565b6060820152611f8260808401611ed3565b6080820152611f9360a08401611ee7565b60a0820152611fa460c08401611ec8565b60c08201525092915050565b6000806101008385031215611fc457600080fd5b82359150611fd58460208501611ef6565b90509250929050565b60008060006101208486031215611ff457600080fd5b833592506020840135915061200c8560408601611ef6565b90509250925092565b60006020828403121561202757600080fd5b5035919050565b6000806040838503121561204157600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611e2b57600080fd5b60008083601f84011261207a57600080fd5b50813567ffffffffffffffff81111561209257600080fd5b6020830191508360208285010111156120aa57600080fd5b9250929050565b600080600080600080608087890312156120ca57600080fd5b863567ffffffffffffffff808211156120e257600080fd5b818901915089601f8301126120f657600080fd5b81358181111561210557600080fd5b8a60208260051b850101111561211a57600080fd5b6020830198508097505061213060208a01612050565b955061213e60408a01611ec8565b9450606089013591508082111561215457600080fd5b5061216189828a01612068565b979a9699509497509295939492505050565b60008082840361010081121561218857600080fd5b8335925060e0601f198201121561219e57600080fd5b506020830190509250929050565b600060e082840312156121be57600080fd5b6121c88383611ef6565b9392505050565b6000602082840312156121e157600080fd5b81356121c881611eb0565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612216576122166121ec565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561172e5761172e612244565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561229557600080fd5b5051919050565b6000602082840312156122ae57600080fd5b81516121c881611eb0565b6000826122d657634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561172e5761172e612244565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561236857600080fd5b6121c882611ee7565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106123c9576123c96121ec565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220dcbe1b24e9c4d98ae26b359eacec08cf99164f7cb3fadf04b8845933d2d69d7964736f6c63430008120033", "devdoc": { "details": "Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).", "events": { @@ -1249,7 +1249,7 @@ "storageLayout": { "storage": [ { - "astId": 1758, + "astId": 2542, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "stateRoot", "offset": 0, @@ -1257,7 +1257,7 @@ "type": "t_bytes32" }, { - "astId": 1760, + "astId": 2544, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "latestVerifiedEpoch", "offset": 0, @@ -1265,7 +1265,7 @@ "type": "t_uint256" }, { - "astId": 1764, + "astId": 2548, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "claimHashes", "offset": 0, @@ -1273,7 +1273,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 1768, + "astId": 2552, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "relayed", "offset": 0, @@ -1281,7 +1281,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 1770, + "astId": 2554, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "sequencerDelayLimit", "offset": 0, @@ -1289,7 +1289,7 @@ "type": "t_uint256" }, { - "astId": 3654, + "astId": 5927, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "devnetOperator", "offset": 0, diff --git a/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json b/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json index 86d7b7f6..ae647e40 100644 --- a/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json +++ b/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x0C3Acd25FE091b02e8E9b30B9b51dBD5d58C8a41", + "address": "0x359c4E8225866aB97ab054ec36aBe923e70eF741", "abi": [ { "inputs": [ @@ -977,19 +977,19 @@ "type": "function" } ], - "transactionHash": "0x22b51ce0806eb57ad174ea27d5d055183141e2d60a1c93a33c4a4ed605202911", + "transactionHash": "0x24c8d94912cd08beb1fd1cfba4e11ad4b1fa8e73f67b0ef8a6aa246ff632b5f6", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x0C3Acd25FE091b02e8E9b30B9b51dBD5d58C8a41", + "contractAddress": "0x359c4E8225866aB97ab054ec36aBe923e70eF741", "transactionIndex": 2, - "gasUsed": "2148221", + "gasUsed": "2148233", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x8634d00d14685fd8bcbe4bd4510dc49ceecf45654ad0806efb00945cd6ac0390", - "transactionHash": "0x22b51ce0806eb57ad174ea27d5d055183141e2d60a1c93a33c4a4ed605202911", + "blockHash": "0xa8bc2e9bee7c2f3c68ce447d791e1b691169ffb028ab5317b0019a31b758467f", + "transactionHash": "0x24c8d94912cd08beb1fd1cfba4e11ad4b1fa8e73f67b0ef8a6aa246ff632b5f6", "logs": [], - "blockNumber": 4487064, - "cumulativeGasUsed": "2205785", + "blockNumber": 4487311, + "cumulativeGasUsed": "2396668", "status": 1, "byzantium": true }, @@ -999,16 +999,16 @@ 10800, 1000000, "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0x57566eBB95e855fdAeEe108Afa450005B12123Bb", + "0x8228116e0d5Fd2611788E68fF77D5f21b005cE11", 86400, 1000000, 5 ], - "numDeployments": 4, - "solcInputHash": "cf76e8aad7d9ce9f21e3b6b1180c6852", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":\"VeaOutboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n uint256 internal constant RELAY_TIMEOUT = 604800; // 7 days\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(_timestamp + RELAY_TIMEOUT <= block.timestamp, \\\"Stale message. Timeout exceeded.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x4664c71e751b8e200bbd7e12e3a8fd371576b28dacbae1551350843c6682ecf9\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101c06040523480156200001257600080fd5b5060405162002861380380620028618339810160408190526200003591620000ea565b60c08990526101408890526101808690526101608790526001600160a01b03808616608052841660a0526101a082905261012081905260048390556200007d60028a62000183565b60e08190526200008f8a6002620001a6565b6200009b9190620001c6565b6101005261014051600190620000b2904262000183565b620000be9190620001c6565b60015550620001dc975050505050505050565b6001600160a01b0381168114620000e757600080fd5b50565b60008060008060008060008060006101208a8c0312156200010a57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a01516200013381620000d1565b60a08b01519095506200014681620000d1565b8094505060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001a157634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001c057620001c06200016d565b92915050565b81810381811115620001c057620001c06200016d565b60805160a05160c05160e05161010051610120516101405161016051610180516101a05161251b62000346600039600081816104440152611f690152600081816104780152818161082d0152818161192801528181611b1c0152611d280152600081816105000152611efd0152600081816104ac0152818161085101528181610be201528181610f6301528181610feb015281816116ef015281816118a90152818161194c01528181611b400152611d4c0152600081816103ad015281816109c80152610cfb015260006115060152600081816114b301526116180152600081816105340152818161062d015281816107b4015281816107e101528181610ef30152818161167b01528181611c8601528181611ced0152611e9301526000818161056801528181610ab50152610de8015260008181610203015281816108cc0152818161094601528181610a2a01528181610c1701528181610c790152610d5d015261251b6000f3fe6080604052600436106101b75760003560e01c80638d96fdea116100ec578063b633b9441161008a578063d5e6a9df11610064578063d5e6a9df14610556578063da2b7bc41461058a578063df19e6ff146105aa578063e813a755146105d757600080fd5b8063b633b944146104ce578063c2114a16146104ee578063d0e30db01461052257600080fd5b80639588eca2116100c65780639588eca21461041c578063aa22a1c614610432578063b044397e14610466578063b5b7a1841461049a57600080fd5b80638d96fdea1461039b57806390df63b7146103cf578063930f28af146103fc57600080fd5b806331d14457116101595780634788cb38116101335780634788cb381461031b57806349b4299e1461033b5780634a439cfe1461035b578063541adcca1461037b57600080fd5b806331d14457146102c857806331ddf743146102db5780633ce43cfd146102fb57600080fd5b8063222ae78611610195578063222ae786146102425780632639c0601461026557806327ee6bdd146102925780632c192519146102a857600080fd5b806301139b68146101bc5780630f0adca5146101d15780631062b39a146101f1575b600080fd5b6101cf6101ca3660046120a6565b6105ed565b005b3480156101dd57600080fd5b506101cf6101ec3660046120d4565b61082b565b3480156101fd57600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024e57600080fd5b50610257610bdb565b604051908152602001610239565b34801561027157600080fd5b5061025761028036600461210b565b60026020526000908152604090205481565b34801561029e57600080fd5b5061025760015481565b3480156102b457600080fd5b506101cf6102c3366004612124565b610c0c565b6101cf6102d6366004612124565b610ef1565b3480156102e757600080fd5b506101cf6102f63660046121a7565b61115c565b34801561030757600080fd5b506101cf610316366004612269565b6113fc565b34801561032757600080fd5b506101cf610336366004612269565b611543565b34801561034757600080fd5b506101cf6103563660046120a6565b6116b8565b34801561036757600080fd5b5061025761037636600461210b565b6118a2565b34801561038757600080fd5b506102576103963660046122a2565b6118d4565b3480156103a757600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156103db57600080fd5b506102576103ea36600461210b565b60036020526000908152604090205481565b34801561040857600080fd5b506101cf6104173660046120a6565b611926565b34801561042857600080fd5b5061025760005481565b34801561043e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561047257600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a657600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104da57600080fd5b506101cf6104e93660046120a6565b611b1a565b3480156104fa57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561052e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561056257600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b34801561059657600080fd5b506101cf6105a53660046120a6565b611d26565b3480156105b657600080fd5b506105ca6105c53660046122a2565b611edf565b60405161023991906122db565b3480156105e357600080fd5b5061025760045481565b6105f6816118d4565b6000838152600260205260409020541461062b5760405162461bcd60e51b8152600401610622906122f5565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561069b5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610622565b60c08101516001600160a01b0316156106f65760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610622565b60008160a00151600281111561070e5761070e6122c5565b1461075b5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610622565b3360c082015261076a816118d4565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108275760006108067f000000000000000000000000000000000000000000000000000000000000000034612333565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161087e5761087e612346565b040311156108c15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109445760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c6919061235c565b7f000000000000000000000000000000000000000000000000000000000000000014610a285760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aaa9190612375565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b1d5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b60015483118015610b2d57508115155b15610b7057600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b79816118d4565b60008481526002602052604090205403610bd6578051829003610ba257600160a0820152610bbd565b60c08101516001600160a01b031615610bbd57600260a08201525b610bc6816118d4565b6000848152600260205260409020555b505050565b6000610c077f000000000000000000000000000000000000000000000000000000000000000042612392565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c775760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf9919061235c565b7f000000000000000000000000000000000000000000000000000000000000000014610d5b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610db9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddd9190612375565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610e505760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b42610e5e62093a80836123b4565b1115610eac5760405162461bcd60e51b815260206004820181905260248201527f5374616c65206d6573736167652e2054696d656f75742065786365656465642e6044820152606401610622565b81600454146108275760048290556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15050565b7f0000000000000000000000000000000000000000000000000000000000000000341015610f615760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000004281610f9057610f90612346565b048210610fdf5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610622565b600454421115611063577f000000000000000000000000000000000000000000000000000000000000000060045442038161101c5761101c612346565b048260010110156110635760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610622565b806110805760405162461bcd60e51b8152600401610622906122f5565b600082815260026020526040902054156110d25760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610622565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611118906118d4565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107aa565b6040851061119e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610622565b6000848484846040516020016111b794939291906123c7565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156112375760008888838181106111f9576111f9612409565b9050602002013590508281111561121e5782600052806020526040600020925061122e565b8060005282602052604060002092505b506001016111dd565b50806000541461127a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610622565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112ef5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610622565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061131f908990899061241f565b6000604051808303816000865af19150503d806000811461135c576040519150601f19603f3d011682016040523d82523d6000602084013e611361565b606091505b50509050806113b25760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610622565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61140e610396368390038301836122a2565b6000838152600260205260409020541461143a5760405162461bcd60e51b8152600401610622906122f5565b600261144c60c0830160a0840161242f565b600281111561145d5761145d6122c5565b1461149e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610622565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114f893505060e0840191505060c0830161244a565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611555610396368390038301836122a2565b600083815260026020526040902054146115815760405162461bcd60e51b8152600401610622906122f5565b600161159360c0830160a0840161242f565b60028111156115a4576115a46122c5565b146115e15760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610622565b600082815260026020526040812081905561160260e0830160c0840161244a565b6001600160a01b03161461165d576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114f8935050604084019150506020830161244a565b61166d604082016020830161244a565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6116c1816118d4565b600083815260026020526040902054146116ed5760405162461bcd60e51b8152600401610622906122f5565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff1661172691906123b4565b61173091906123b4565b4210156117945760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610622565b600061179f82611edf565b905060028160038111156117b5576117b56122c5565b14806117d2575060008160038111156117d0576117d06122c5565b145b61183b5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610622565b63ffffffff428116606084015243166080830152611858826118d4565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006118ce7f000000000000000000000000000000000000000000000000000000000000000083612392565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611909989097969101612467565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161197957611979612346565b040311156119bc5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b6119c5816118d4565b600083815260026020526040902054146119f15760405162461bcd60e51b8152600401610622906122f5565b60c08101516001600160a01b031615611a435760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610622565b6001611a4e82611edf565b6003811115611a5f57611a5f6122c5565b14611aac5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610622565b600154821115611af457600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b04816118d4565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b6d57611b6d612346565b040311611bae5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611bb7816118d4565b60008381526002602052604090205414611be35760405162461bcd60e51b8152600401610622906122f5565b60008160a001516002811115611bfb57611bfb6122c5565b14611c3a5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60c08101516001600160a01b0316156108275760208101516001600160a01b0316611cbe5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611cd2826118d4565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d7957611d79612346565b040311611dba5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611dc3816118d4565b60008381526002602052604090205414611def5760405162461bcd60e51b8152600401610622906122f5565b60008160a001516002811115611e0757611e076122c5565b14611e465760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60208101516001600160a01b0316156108275760c08101516001600160a01b0316611ecb5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611cd2826118d4565b6000816060015163ffffffff16600003611efb57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f3757506003919050565b60006005836060015163ffffffff16420381611f5557611f55612346565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611f995760019250611f9e565b600092505b50505b919050565b6001600160a01b0381168114611fbb57600080fd5b50565b8035611fa181611fa6565b803563ffffffff81168114611fa157600080fd5b803560038110611fa157600080fd5b600060e08284031215611ffe57600080fd5b60405160e0810181811067ffffffffffffffff8211171561202f57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061204560208401611fbe565b602082015261205660408401611fc9565b604082015261206760608401611fc9565b606082015261207860808401611fc9565b608082015261208960a08401611fdd565b60a082015261209a60c08401611fbe565b60c08201525092915050565b60008061010083850312156120ba57600080fd5b823591506120cb8460208501611fec565b90509250929050565b600080600061012084860312156120ea57600080fd5b83359250602084013591506121028560408601611fec565b90509250925092565b60006020828403121561211d57600080fd5b5035919050565b6000806040838503121561213757600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611fa157600080fd5b60008083601f84011261217057600080fd5b50813567ffffffffffffffff81111561218857600080fd5b6020830191508360208285010111156121a057600080fd5b9250929050565b600080600080600080608087890312156121c057600080fd5b863567ffffffffffffffff808211156121d857600080fd5b818901915089601f8301126121ec57600080fd5b8135818111156121fb57600080fd5b8a60208260051b850101111561221057600080fd5b6020830198508097505061222660208a01612146565b955061223460408a01611fbe565b9450606089013591508082111561224a57600080fd5b5061225789828a0161215e565b979a9699509497509295939492505050565b60008082840361010081121561227e57600080fd5b8335925060e0601f198201121561229457600080fd5b506020830190509250929050565b600060e082840312156122b457600080fd5b6122be8383611fec565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122ef576122ef6122c5565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156118ce576118ce61231d565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561236e57600080fd5b5051919050565b60006020828403121561238757600080fd5b81516122be81611fa6565b6000826123af57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156118ce576118ce61231d565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561244157600080fd5b6122be82611fdd565b60006020828403121561245c57600080fd5b81356122be81611fa6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124bf576124bf6122c5565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220dc52a083027e3b0a5f0b7e6947ea2cb170949ac24beb520f37f652ab5b1e0d1b64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101b75760003560e01c80638d96fdea116100ec578063b633b9441161008a578063d5e6a9df11610064578063d5e6a9df14610556578063da2b7bc41461058a578063df19e6ff146105aa578063e813a755146105d757600080fd5b8063b633b944146104ce578063c2114a16146104ee578063d0e30db01461052257600080fd5b80639588eca2116100c65780639588eca21461041c578063aa22a1c614610432578063b044397e14610466578063b5b7a1841461049a57600080fd5b80638d96fdea1461039b57806390df63b7146103cf578063930f28af146103fc57600080fd5b806331d14457116101595780634788cb38116101335780634788cb381461031b57806349b4299e1461033b5780634a439cfe1461035b578063541adcca1461037b57600080fd5b806331d14457146102c857806331ddf743146102db5780633ce43cfd146102fb57600080fd5b8063222ae78611610195578063222ae786146102425780632639c0601461026557806327ee6bdd146102925780632c192519146102a857600080fd5b806301139b68146101bc5780630f0adca5146101d15780631062b39a146101f1575b600080fd5b6101cf6101ca3660046120a6565b6105ed565b005b3480156101dd57600080fd5b506101cf6101ec3660046120d4565b61082b565b3480156101fd57600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024e57600080fd5b50610257610bdb565b604051908152602001610239565b34801561027157600080fd5b5061025761028036600461210b565b60026020526000908152604090205481565b34801561029e57600080fd5b5061025760015481565b3480156102b457600080fd5b506101cf6102c3366004612124565b610c0c565b6101cf6102d6366004612124565b610ef1565b3480156102e757600080fd5b506101cf6102f63660046121a7565b61115c565b34801561030757600080fd5b506101cf610316366004612269565b6113fc565b34801561032757600080fd5b506101cf610336366004612269565b611543565b34801561034757600080fd5b506101cf6103563660046120a6565b6116b8565b34801561036757600080fd5b5061025761037636600461210b565b6118a2565b34801561038757600080fd5b506102576103963660046122a2565b6118d4565b3480156103a757600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156103db57600080fd5b506102576103ea36600461210b565b60036020526000908152604090205481565b34801561040857600080fd5b506101cf6104173660046120a6565b611926565b34801561042857600080fd5b5061025760005481565b34801561043e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561047257600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a657600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104da57600080fd5b506101cf6104e93660046120a6565b611b1a565b3480156104fa57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561052e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561056257600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b34801561059657600080fd5b506101cf6105a53660046120a6565b611d26565b3480156105b657600080fd5b506105ca6105c53660046122a2565b611edf565b60405161023991906122db565b3480156105e357600080fd5b5061025760045481565b6105f6816118d4565b6000838152600260205260409020541461062b5760405162461bcd60e51b8152600401610622906122f5565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561069b5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610622565b60c08101516001600160a01b0316156106f65760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610622565b60008160a00151600281111561070e5761070e6122c5565b1461075b5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610622565b3360c082015261076a816118d4565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108275760006108067f000000000000000000000000000000000000000000000000000000000000000034612333565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161087e5761087e612346565b040311156108c15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109445760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c6919061235c565b7f000000000000000000000000000000000000000000000000000000000000000014610a285760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aaa9190612375565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b1d5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b60015483118015610b2d57508115155b15610b7057600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b79816118d4565b60008481526002602052604090205403610bd6578051829003610ba257600160a0820152610bbd565b60c08101516001600160a01b031615610bbd57600260a08201525b610bc6816118d4565b6000848152600260205260409020555b505050565b6000610c077f000000000000000000000000000000000000000000000000000000000000000042612392565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c775760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf9919061235c565b7f000000000000000000000000000000000000000000000000000000000000000014610d5b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610db9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddd9190612375565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610e505760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b42610e5e62093a80836123b4565b1115610eac5760405162461bcd60e51b815260206004820181905260248201527f5374616c65206d6573736167652e2054696d656f75742065786365656465642e6044820152606401610622565b81600454146108275760048290556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15050565b7f0000000000000000000000000000000000000000000000000000000000000000341015610f615760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000004281610f9057610f90612346565b048210610fdf5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610622565b600454421115611063577f000000000000000000000000000000000000000000000000000000000000000060045442038161101c5761101c612346565b048260010110156110635760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610622565b806110805760405162461bcd60e51b8152600401610622906122f5565b600082815260026020526040902054156110d25760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610622565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611118906118d4565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107aa565b6040851061119e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610622565b6000848484846040516020016111b794939291906123c7565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156112375760008888838181106111f9576111f9612409565b9050602002013590508281111561121e5782600052806020526040600020925061122e565b8060005282602052604060002092505b506001016111dd565b50806000541461127a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610622565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112ef5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610622565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061131f908990899061241f565b6000604051808303816000865af19150503d806000811461135c576040519150601f19603f3d011682016040523d82523d6000602084013e611361565b606091505b50509050806113b25760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610622565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61140e610396368390038301836122a2565b6000838152600260205260409020541461143a5760405162461bcd60e51b8152600401610622906122f5565b600261144c60c0830160a0840161242f565b600281111561145d5761145d6122c5565b1461149e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610622565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114f893505060e0840191505060c0830161244a565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611555610396368390038301836122a2565b600083815260026020526040902054146115815760405162461bcd60e51b8152600401610622906122f5565b600161159360c0830160a0840161242f565b60028111156115a4576115a46122c5565b146115e15760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610622565b600082815260026020526040812081905561160260e0830160c0840161244a565b6001600160a01b03161461165d576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114f8935050604084019150506020830161244a565b61166d604082016020830161244a565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6116c1816118d4565b600083815260026020526040902054146116ed5760405162461bcd60e51b8152600401610622906122f5565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff1661172691906123b4565b61173091906123b4565b4210156117945760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610622565b600061179f82611edf565b905060028160038111156117b5576117b56122c5565b14806117d2575060008160038111156117d0576117d06122c5565b145b61183b5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610622565b63ffffffff428116606084015243166080830152611858826118d4565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006118ce7f000000000000000000000000000000000000000000000000000000000000000083612392565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611909989097969101612467565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161197957611979612346565b040311156119bc5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b6119c5816118d4565b600083815260026020526040902054146119f15760405162461bcd60e51b8152600401610622906122f5565b60c08101516001600160a01b031615611a435760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610622565b6001611a4e82611edf565b6003811115611a5f57611a5f6122c5565b14611aac5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610622565b600154821115611af457600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b04816118d4565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b6d57611b6d612346565b040311611bae5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611bb7816118d4565b60008381526002602052604090205414611be35760405162461bcd60e51b8152600401610622906122f5565b60008160a001516002811115611bfb57611bfb6122c5565b14611c3a5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60c08101516001600160a01b0316156108275760208101516001600160a01b0316611cbe5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611cd2826118d4565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d7957611d79612346565b040311611dba5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611dc3816118d4565b60008381526002602052604090205414611def5760405162461bcd60e51b8152600401610622906122f5565b60008160a001516002811115611e0757611e076122c5565b14611e465760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60208101516001600160a01b0316156108275760c08101516001600160a01b0316611ecb5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611cd2826118d4565b6000816060015163ffffffff16600003611efb57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f3757506003919050565b60006005836060015163ffffffff16420381611f5557611f55612346565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611f995760019250611f9e565b600092505b50505b919050565b6001600160a01b0381168114611fbb57600080fd5b50565b8035611fa181611fa6565b803563ffffffff81168114611fa157600080fd5b803560038110611fa157600080fd5b600060e08284031215611ffe57600080fd5b60405160e0810181811067ffffffffffffffff8211171561202f57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061204560208401611fbe565b602082015261205660408401611fc9565b604082015261206760608401611fc9565b606082015261207860808401611fc9565b608082015261208960a08401611fdd565b60a082015261209a60c08401611fbe565b60c08201525092915050565b60008061010083850312156120ba57600080fd5b823591506120cb8460208501611fec565b90509250929050565b600080600061012084860312156120ea57600080fd5b83359250602084013591506121028560408601611fec565b90509250925092565b60006020828403121561211d57600080fd5b5035919050565b6000806040838503121561213757600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611fa157600080fd5b60008083601f84011261217057600080fd5b50813567ffffffffffffffff81111561218857600080fd5b6020830191508360208285010111156121a057600080fd5b9250929050565b600080600080600080608087890312156121c057600080fd5b863567ffffffffffffffff808211156121d857600080fd5b818901915089601f8301126121ec57600080fd5b8135818111156121fb57600080fd5b8a60208260051b850101111561221057600080fd5b6020830198508097505061222660208a01612146565b955061223460408a01611fbe565b9450606089013591508082111561224a57600080fd5b5061225789828a0161215e565b979a9699509497509295939492505050565b60008082840361010081121561227e57600080fd5b8335925060e0601f198201121561229457600080fd5b506020830190509250929050565b600060e082840312156122b457600080fd5b6122be8383611fec565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122ef576122ef6122c5565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156118ce576118ce61231d565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561236e57600080fd5b5051919050565b60006020828403121561238757600080fd5b81516122be81611fa6565b6000826123af57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156118ce576118ce61231d565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561244157600080fd5b6122be82611fdd565b60006020828403121561245c57600080fd5b81356122be81611fa6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124bf576124bf6122c5565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220dc52a083027e3b0a5f0b7e6947ea2cb170949ac24beb520f37f652ab5b1e0d1b64736f6c63430008120033", + "numDeployments": 5, + "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":\"VeaOutboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n uint256 internal constant RELAY_TIMEOUT = 604800; // 7 days\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(_timestamp + RELAY_TIMEOUT >= block.timestamp, \\\"Stale message. Timeout exceeded.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x4071f3ea552af8995a457452838f14493645a15b9eed12ae248ed5ab22316b4b\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101c06040523480156200001257600080fd5b5060405162002861380380620028618339810160408190526200003591620000ea565b60c08990526101408890526101808690526101608790526001600160a01b03808616608052841660a0526101a082905261012081905260048390556200007d60028a62000183565b60e08190526200008f8a6002620001a6565b6200009b9190620001c6565b6101005261014051600190620000b2904262000183565b620000be9190620001c6565b60015550620001dc975050505050505050565b6001600160a01b0381168114620000e757600080fd5b50565b60008060008060008060008060006101208a8c0312156200010a57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a01516200013381620000d1565b60a08b01519095506200014681620000d1565b8094505060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001a157634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001c057620001c06200016d565b92915050565b81810381811115620001c057620001c06200016d565b60805160a05160c05160e05161010051610120516101405161016051610180516101a05161251b62000346600039600081816104440152611f690152600081816104780152818161082d0152818161192801528181611b1c0152611d280152600081816105000152611efd0152600081816104ac0152818161085101528181610be201528181610f6301528181610feb015281816116ef015281816118a90152818161194c01528181611b400152611d4c0152600081816103ad015281816109c80152610cfb015260006115060152600081816114b301526116180152600081816105340152818161062d015281816107b4015281816107e101528181610ef30152818161167b01528181611c8601528181611ced0152611e9301526000818161056801528181610ab50152610de8015260008181610203015281816108cc0152818161094601528181610a2a01528181610c1701528181610c790152610d5d015261251b6000f3fe6080604052600436106101b75760003560e01c80638d96fdea116100ec578063b633b9441161008a578063d5e6a9df11610064578063d5e6a9df14610556578063da2b7bc41461058a578063df19e6ff146105aa578063e813a755146105d757600080fd5b8063b633b944146104ce578063c2114a16146104ee578063d0e30db01461052257600080fd5b80639588eca2116100c65780639588eca21461041c578063aa22a1c614610432578063b044397e14610466578063b5b7a1841461049a57600080fd5b80638d96fdea1461039b57806390df63b7146103cf578063930f28af146103fc57600080fd5b806331d14457116101595780634788cb38116101335780634788cb381461031b57806349b4299e1461033b5780634a439cfe1461035b578063541adcca1461037b57600080fd5b806331d14457146102c857806331ddf743146102db5780633ce43cfd146102fb57600080fd5b8063222ae78611610195578063222ae786146102425780632639c0601461026557806327ee6bdd146102925780632c192519146102a857600080fd5b806301139b68146101bc5780630f0adca5146101d15780631062b39a146101f1575b600080fd5b6101cf6101ca3660046120a6565b6105ed565b005b3480156101dd57600080fd5b506101cf6101ec3660046120d4565b61082b565b3480156101fd57600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024e57600080fd5b50610257610bdb565b604051908152602001610239565b34801561027157600080fd5b5061025761028036600461210b565b60026020526000908152604090205481565b34801561029e57600080fd5b5061025760015481565b3480156102b457600080fd5b506101cf6102c3366004612124565b610c0c565b6101cf6102d6366004612124565b610ef1565b3480156102e757600080fd5b506101cf6102f63660046121a7565b61115c565b34801561030757600080fd5b506101cf610316366004612269565b6113fc565b34801561032757600080fd5b506101cf610336366004612269565b611543565b34801561034757600080fd5b506101cf6103563660046120a6565b6116b8565b34801561036757600080fd5b5061025761037636600461210b565b6118a2565b34801561038757600080fd5b506102576103963660046122a2565b6118d4565b3480156103a757600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156103db57600080fd5b506102576103ea36600461210b565b60036020526000908152604090205481565b34801561040857600080fd5b506101cf6104173660046120a6565b611926565b34801561042857600080fd5b5061025760005481565b34801561043e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561047257600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a657600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104da57600080fd5b506101cf6104e93660046120a6565b611b1a565b3480156104fa57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561052e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561056257600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b34801561059657600080fd5b506101cf6105a53660046120a6565b611d26565b3480156105b657600080fd5b506105ca6105c53660046122a2565b611edf565b60405161023991906122db565b3480156105e357600080fd5b5061025760045481565b6105f6816118d4565b6000838152600260205260409020541461062b5760405162461bcd60e51b8152600401610622906122f5565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561069b5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610622565b60c08101516001600160a01b0316156106f65760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610622565b60008160a00151600281111561070e5761070e6122c5565b1461075b5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610622565b3360c082015261076a816118d4565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108275760006108067f000000000000000000000000000000000000000000000000000000000000000034612333565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161087e5761087e612346565b040311156108c15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109445760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c6919061235c565b7f000000000000000000000000000000000000000000000000000000000000000014610a285760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aaa9190612375565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b1d5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b60015483118015610b2d57508115155b15610b7057600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b79816118d4565b60008481526002602052604090205403610bd6578051829003610ba257600160a0820152610bbd565b60c08101516001600160a01b031615610bbd57600260a08201525b610bc6816118d4565b6000848152600260205260409020555b505050565b6000610c077f000000000000000000000000000000000000000000000000000000000000000042612392565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c775760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf9919061235c565b7f000000000000000000000000000000000000000000000000000000000000000014610d5b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610db9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddd9190612375565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610e505760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b42610e5e62093a80836123b4565b1015610eac5760405162461bcd60e51b815260206004820181905260248201527f5374616c65206d6573736167652e2054696d656f75742065786365656465642e6044820152606401610622565b81600454146108275760048290556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15050565b7f0000000000000000000000000000000000000000000000000000000000000000341015610f615760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000004281610f9057610f90612346565b048210610fdf5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610622565b600454421115611063577f000000000000000000000000000000000000000000000000000000000000000060045442038161101c5761101c612346565b048260010110156110635760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610622565b806110805760405162461bcd60e51b8152600401610622906122f5565b600082815260026020526040902054156110d25760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610622565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611118906118d4565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107aa565b6040851061119e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610622565b6000848484846040516020016111b794939291906123c7565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156112375760008888838181106111f9576111f9612409565b9050602002013590508281111561121e5782600052806020526040600020925061122e565b8060005282602052604060002092505b506001016111dd565b50806000541461127a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610622565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112ef5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610622565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061131f908990899061241f565b6000604051808303816000865af19150503d806000811461135c576040519150601f19603f3d011682016040523d82523d6000602084013e611361565b606091505b50509050806113b25760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610622565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61140e610396368390038301836122a2565b6000838152600260205260409020541461143a5760405162461bcd60e51b8152600401610622906122f5565b600261144c60c0830160a0840161242f565b600281111561145d5761145d6122c5565b1461149e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610622565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114f893505060e0840191505060c0830161244a565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611555610396368390038301836122a2565b600083815260026020526040902054146115815760405162461bcd60e51b8152600401610622906122f5565b600161159360c0830160a0840161242f565b60028111156115a4576115a46122c5565b146115e15760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610622565b600082815260026020526040812081905561160260e0830160c0840161244a565b6001600160a01b03161461165d576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114f8935050604084019150506020830161244a565b61166d604082016020830161244a565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6116c1816118d4565b600083815260026020526040902054146116ed5760405162461bcd60e51b8152600401610622906122f5565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff1661172691906123b4565b61173091906123b4565b4210156117945760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610622565b600061179f82611edf565b905060028160038111156117b5576117b56122c5565b14806117d2575060008160038111156117d0576117d06122c5565b145b61183b5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610622565b63ffffffff428116606084015243166080830152611858826118d4565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006118ce7f000000000000000000000000000000000000000000000000000000000000000083612392565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611909989097969101612467565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161197957611979612346565b040311156119bc5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b6119c5816118d4565b600083815260026020526040902054146119f15760405162461bcd60e51b8152600401610622906122f5565b60c08101516001600160a01b031615611a435760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610622565b6001611a4e82611edf565b6003811115611a5f57611a5f6122c5565b14611aac5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610622565b600154821115611af457600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b04816118d4565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b6d57611b6d612346565b040311611bae5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611bb7816118d4565b60008381526002602052604090205414611be35760405162461bcd60e51b8152600401610622906122f5565b60008160a001516002811115611bfb57611bfb6122c5565b14611c3a5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60c08101516001600160a01b0316156108275760208101516001600160a01b0316611cbe5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611cd2826118d4565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d7957611d79612346565b040311611dba5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611dc3816118d4565b60008381526002602052604090205414611def5760405162461bcd60e51b8152600401610622906122f5565b60008160a001516002811115611e0757611e076122c5565b14611e465760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60208101516001600160a01b0316156108275760c08101516001600160a01b0316611ecb5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611cd2826118d4565b6000816060015163ffffffff16600003611efb57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f3757506003919050565b60006005836060015163ffffffff16420381611f5557611f55612346565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611f995760019250611f9e565b600092505b50505b919050565b6001600160a01b0381168114611fbb57600080fd5b50565b8035611fa181611fa6565b803563ffffffff81168114611fa157600080fd5b803560038110611fa157600080fd5b600060e08284031215611ffe57600080fd5b60405160e0810181811067ffffffffffffffff8211171561202f57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061204560208401611fbe565b602082015261205660408401611fc9565b604082015261206760608401611fc9565b606082015261207860808401611fc9565b608082015261208960a08401611fdd565b60a082015261209a60c08401611fbe565b60c08201525092915050565b60008061010083850312156120ba57600080fd5b823591506120cb8460208501611fec565b90509250929050565b600080600061012084860312156120ea57600080fd5b83359250602084013591506121028560408601611fec565b90509250925092565b60006020828403121561211d57600080fd5b5035919050565b6000806040838503121561213757600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611fa157600080fd5b60008083601f84011261217057600080fd5b50813567ffffffffffffffff81111561218857600080fd5b6020830191508360208285010111156121a057600080fd5b9250929050565b600080600080600080608087890312156121c057600080fd5b863567ffffffffffffffff808211156121d857600080fd5b818901915089601f8301126121ec57600080fd5b8135818111156121fb57600080fd5b8a60208260051b850101111561221057600080fd5b6020830198508097505061222660208a01612146565b955061223460408a01611fbe565b9450606089013591508082111561224a57600080fd5b5061225789828a0161215e565b979a9699509497509295939492505050565b60008082840361010081121561227e57600080fd5b8335925060e0601f198201121561229457600080fd5b506020830190509250929050565b600060e082840312156122b457600080fd5b6122be8383611fec565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122ef576122ef6122c5565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156118ce576118ce61231d565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561236e57600080fd5b5051919050565b60006020828403121561238757600080fd5b81516122be81611fa6565b6000826123af57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156118ce576118ce61231d565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561244157600080fd5b6122be82611fdd565b60006020828403121561245c57600080fd5b81356122be81611fa6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124bf576124bf6122c5565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122006831bcf0ac6e1dd77b38f610cc19ea30b6cd65d9a52fdf2610dd2affdf3a61264736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101b75760003560e01c80638d96fdea116100ec578063b633b9441161008a578063d5e6a9df11610064578063d5e6a9df14610556578063da2b7bc41461058a578063df19e6ff146105aa578063e813a755146105d757600080fd5b8063b633b944146104ce578063c2114a16146104ee578063d0e30db01461052257600080fd5b80639588eca2116100c65780639588eca21461041c578063aa22a1c614610432578063b044397e14610466578063b5b7a1841461049a57600080fd5b80638d96fdea1461039b57806390df63b7146103cf578063930f28af146103fc57600080fd5b806331d14457116101595780634788cb38116101335780634788cb381461031b57806349b4299e1461033b5780634a439cfe1461035b578063541adcca1461037b57600080fd5b806331d14457146102c857806331ddf743146102db5780633ce43cfd146102fb57600080fd5b8063222ae78611610195578063222ae786146102425780632639c0601461026557806327ee6bdd146102925780632c192519146102a857600080fd5b806301139b68146101bc5780630f0adca5146101d15780631062b39a146101f1575b600080fd5b6101cf6101ca3660046120a6565b6105ed565b005b3480156101dd57600080fd5b506101cf6101ec3660046120d4565b61082b565b3480156101fd57600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024e57600080fd5b50610257610bdb565b604051908152602001610239565b34801561027157600080fd5b5061025761028036600461210b565b60026020526000908152604090205481565b34801561029e57600080fd5b5061025760015481565b3480156102b457600080fd5b506101cf6102c3366004612124565b610c0c565b6101cf6102d6366004612124565b610ef1565b3480156102e757600080fd5b506101cf6102f63660046121a7565b61115c565b34801561030757600080fd5b506101cf610316366004612269565b6113fc565b34801561032757600080fd5b506101cf610336366004612269565b611543565b34801561034757600080fd5b506101cf6103563660046120a6565b6116b8565b34801561036757600080fd5b5061025761037636600461210b565b6118a2565b34801561038757600080fd5b506102576103963660046122a2565b6118d4565b3480156103a757600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156103db57600080fd5b506102576103ea36600461210b565b60036020526000908152604090205481565b34801561040857600080fd5b506101cf6104173660046120a6565b611926565b34801561042857600080fd5b5061025760005481565b34801561043e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561047257600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a657600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104da57600080fd5b506101cf6104e93660046120a6565b611b1a565b3480156104fa57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561052e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561056257600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b34801561059657600080fd5b506101cf6105a53660046120a6565b611d26565b3480156105b657600080fd5b506105ca6105c53660046122a2565b611edf565b60405161023991906122db565b3480156105e357600080fd5b5061025760045481565b6105f6816118d4565b6000838152600260205260409020541461062b5760405162461bcd60e51b8152600401610622906122f5565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561069b5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610622565b60c08101516001600160a01b0316156106f65760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610622565b60008160a00151600281111561070e5761070e6122c5565b1461075b5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610622565b3360c082015261076a816118d4565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108275760006108067f000000000000000000000000000000000000000000000000000000000000000034612333565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161087e5761087e612346565b040311156108c15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109445760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c6919061235c565b7f000000000000000000000000000000000000000000000000000000000000000014610a285760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aaa9190612375565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b1d5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b60015483118015610b2d57508115155b15610b7057600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b79816118d4565b60008481526002602052604090205403610bd6578051829003610ba257600160a0820152610bbd565b60c08101516001600160a01b031615610bbd57600260a08201525b610bc6816118d4565b6000848152600260205260409020555b505050565b6000610c077f000000000000000000000000000000000000000000000000000000000000000042612392565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c775760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf9919061235c565b7f000000000000000000000000000000000000000000000000000000000000000014610d5b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610db9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddd9190612375565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610e505760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b42610e5e62093a80836123b4565b1015610eac5760405162461bcd60e51b815260206004820181905260248201527f5374616c65206d6573736167652e2054696d656f75742065786365656465642e6044820152606401610622565b81600454146108275760048290556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15050565b7f0000000000000000000000000000000000000000000000000000000000000000341015610f615760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000004281610f9057610f90612346565b048210610fdf5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610622565b600454421115611063577f000000000000000000000000000000000000000000000000000000000000000060045442038161101c5761101c612346565b048260010110156110635760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610622565b806110805760405162461bcd60e51b8152600401610622906122f5565b600082815260026020526040902054156110d25760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610622565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611118906118d4565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107aa565b6040851061119e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610622565b6000848484846040516020016111b794939291906123c7565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156112375760008888838181106111f9576111f9612409565b9050602002013590508281111561121e5782600052806020526040600020925061122e565b8060005282602052604060002092505b506001016111dd565b50806000541461127a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610622565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112ef5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610622565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061131f908990899061241f565b6000604051808303816000865af19150503d806000811461135c576040519150601f19603f3d011682016040523d82523d6000602084013e611361565b606091505b50509050806113b25760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610622565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61140e610396368390038301836122a2565b6000838152600260205260409020541461143a5760405162461bcd60e51b8152600401610622906122f5565b600261144c60c0830160a0840161242f565b600281111561145d5761145d6122c5565b1461149e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610622565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114f893505060e0840191505060c0830161244a565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611555610396368390038301836122a2565b600083815260026020526040902054146115815760405162461bcd60e51b8152600401610622906122f5565b600161159360c0830160a0840161242f565b60028111156115a4576115a46122c5565b146115e15760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610622565b600082815260026020526040812081905561160260e0830160c0840161244a565b6001600160a01b03161461165d576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114f8935050604084019150506020830161244a565b61166d604082016020830161244a565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6116c1816118d4565b600083815260026020526040902054146116ed5760405162461bcd60e51b8152600401610622906122f5565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff1661172691906123b4565b61173091906123b4565b4210156117945760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610622565b600061179f82611edf565b905060028160038111156117b5576117b56122c5565b14806117d2575060008160038111156117d0576117d06122c5565b145b61183b5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610622565b63ffffffff428116606084015243166080830152611858826118d4565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006118ce7f000000000000000000000000000000000000000000000000000000000000000083612392565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611909989097969101612467565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161197957611979612346565b040311156119bc5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b6119c5816118d4565b600083815260026020526040902054146119f15760405162461bcd60e51b8152600401610622906122f5565b60c08101516001600160a01b031615611a435760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610622565b6001611a4e82611edf565b6003811115611a5f57611a5f6122c5565b14611aac5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610622565b600154821115611af457600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b04816118d4565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b6d57611b6d612346565b040311611bae5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611bb7816118d4565b60008381526002602052604090205414611be35760405162461bcd60e51b8152600401610622906122f5565b60008160a001516002811115611bfb57611bfb6122c5565b14611c3a5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60c08101516001600160a01b0316156108275760208101516001600160a01b0316611cbe5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611cd2826118d4565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d7957611d79612346565b040311611dba5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611dc3816118d4565b60008381526002602052604090205414611def5760405162461bcd60e51b8152600401610622906122f5565b60008160a001516002811115611e0757611e076122c5565b14611e465760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60208101516001600160a01b0316156108275760c08101516001600160a01b0316611ecb5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611cd2826118d4565b6000816060015163ffffffff16600003611efb57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f3757506003919050565b60006005836060015163ffffffff16420381611f5557611f55612346565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611f995760019250611f9e565b600092505b50505b919050565b6001600160a01b0381168114611fbb57600080fd5b50565b8035611fa181611fa6565b803563ffffffff81168114611fa157600080fd5b803560038110611fa157600080fd5b600060e08284031215611ffe57600080fd5b60405160e0810181811067ffffffffffffffff8211171561202f57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061204560208401611fbe565b602082015261205660408401611fc9565b604082015261206760608401611fc9565b606082015261207860808401611fc9565b608082015261208960a08401611fdd565b60a082015261209a60c08401611fbe565b60c08201525092915050565b60008061010083850312156120ba57600080fd5b823591506120cb8460208501611fec565b90509250929050565b600080600061012084860312156120ea57600080fd5b83359250602084013591506121028560408601611fec565b90509250925092565b60006020828403121561211d57600080fd5b5035919050565b6000806040838503121561213757600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611fa157600080fd5b60008083601f84011261217057600080fd5b50813567ffffffffffffffff81111561218857600080fd5b6020830191508360208285010111156121a057600080fd5b9250929050565b600080600080600080608087890312156121c057600080fd5b863567ffffffffffffffff808211156121d857600080fd5b818901915089601f8301126121ec57600080fd5b8135818111156121fb57600080fd5b8a60208260051b850101111561221057600080fd5b6020830198508097505061222660208a01612146565b955061223460408a01611fbe565b9450606089013591508082111561224a57600080fd5b5061225789828a0161215e565b979a9699509497509295939492505050565b60008082840361010081121561227e57600080fd5b8335925060e0601f198201121561229457600080fd5b506020830190509250929050565b600060e082840312156122b457600080fd5b6122be8383611fec565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122ef576122ef6122c5565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156118ce576118ce61231d565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561236e57600080fd5b5051919050565b60006020828403121561238757600080fd5b81516122be81611fa6565b6000826123af57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156118ce576118ce61231d565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561244157600080fd5b6122be82611fdd565b60006020828403121561245c57600080fd5b81356122be81611fa6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124bf576124bf6122c5565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122006831bcf0ac6e1dd77b38f610cc19ea30b6cd65d9a52fdf2610dd2affdf3a61264736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.", "events": { @@ -1192,7 +1192,7 @@ "storageLayout": { "storage": [ { - "astId": 1758, + "astId": 2542, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "stateRoot", "offset": 0, @@ -1200,7 +1200,7 @@ "type": "t_bytes32" }, { - "astId": 1760, + "astId": 2544, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "latestVerifiedEpoch", "offset": 0, @@ -1208,7 +1208,7 @@ "type": "t_uint256" }, { - "astId": 1764, + "astId": 2548, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "claimHashes", "offset": 0, @@ -1216,7 +1216,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 1768, + "astId": 2552, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "relayed", "offset": 0, @@ -1224,7 +1224,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 1770, + "astId": 2554, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "sequencerDelayLimit", "offset": 0, diff --git a/contracts/deployments/goerli/RouterArbToGnosisDevnet.json b/contracts/deployments/goerli/RouterArbToGnosisDevnet.json index 02f9526b..9d62a9ce 100644 --- a/contracts/deployments/goerli/RouterArbToGnosisDevnet.json +++ b/contracts/deployments/goerli/RouterArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x696567a5F0A6DD4aAe1dBa6ddB4c977aB5B07CAC", + "address": "0x770cDAF7284B8838c699910433A927a49bB6765A", "abi": [ { "inputs": [ @@ -250,33 +250,33 @@ "type": "function" } ], - "transactionHash": "0xb59090074f39a2e01aa2764da827b1bfbdc7b77c769a9df5128b4f1d011b29bb", + "transactionHash": "0x787eb737d9949baa97771d5ece69ccde73f898f6310561d5cc9a1f5e1ff173bd", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x696567a5F0A6DD4aAe1dBa6ddB4c977aB5B07CAC", - "transactionIndex": 34, - "gasUsed": "853441", + "contractAddress": "0x770cDAF7284B8838c699910433A927a49bB6765A", + "transactionIndex": 92, + "gasUsed": "853453", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x96acf68d33958b271dd8b71ef577ab923454b92ebad52065e616bbd3ddb64403", - "transactionHash": "0xb59090074f39a2e01aa2764da827b1bfbdc7b77c769a9df5128b4f1d011b29bb", + "blockHash": "0xe6fa0d88b2d19f8af3f2bc3521bb87c41165aeb121c32a53b3a25b6a04677175", + "transactionHash": "0x787eb737d9949baa97771d5ece69ccde73f898f6310561d5cc9a1f5e1ff173bd", "logs": [], - "blockNumber": 9186823, - "cumulativeGasUsed": "7521312", + "blockNumber": 9186893, + "cumulativeGasUsed": "19001159", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0xEC337Fb9977848D0784dC4F01A69c237691755E0", - "0x00f0A751C921B937208e49a92fAaeaF896733544" + "0x84de475fed07406aA3B05248f1a7b0Fca11DA012", + "0xEe27226A8fa11Ba851410EB09d32884aEE219D75" ], - "numDeployments": 12, - "solcInputHash": "cf76e8aad7d9ce9f21e3b6b1180c6852", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sendSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"sendSequencerDelayLimit()\":{\"details\":\"Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\"},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n function sendSequencerDelayLimit() public {\\n bytes memory data = abi.encodeCall(ISequencerDelayUpdatable.updateSequencerDelayLimit, (sequencerDelayLimit, block.timestamp));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xf96670a60b3706d0e80ed951e7c4dac37317c439419fc0638dcddb3dc99a0d38\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101006040523480156200001257600080fd5b5060405162000fe538038062000fe5833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610d60620002856000396000818161010f0152818161044601526109bc01526000818161013601526107e101526000818160d00152818161041d0152610993015260008181610177015281816101c70152818161065f0152818161077f015261080b0152610d606000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a41a2faa11610066578063a41a2faa14610162578063cb9384681461016a578063e78cea9214610172578063e813a75514610199578063f6ee5b76146101b057600080fd5b8063051d1970146100a35780631062b39a146100cb5780632fa70aa71461010a5780638c5f173f1461013157806390784ae814610158575b600080fd5b6001546002546100b1919082565b604080519283526020830191909152015b60405180910390f35b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101606101c3565b005b6101606103bc565b610160610553565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100c2565b6101606101be366004610acd565b610774565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a89190610b48565b50925050506000548111156102f25760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156103b9576002541561036b5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561048f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b39190610b7e565b6040518463ffffffff1660e01b81526004016104d193929190610b97565b6020604051808303816000875af11580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190610b7e565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d6878160405161054791815260200190565b60405180910390a15050565b6002546000036105ba5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610362565b6000546002546105ca9190610bfc565b42116106335760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610362565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156106aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce9190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561070b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072f9190610b48565b50925050508181036107705760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b90602001610547565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107df5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610362565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088b9190610b24565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ec9190610b24565b6001600160a01b0316146109335760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610362565b600083838360405160240161094a93929190610c78565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a299190610b7e565b6040518463ffffffff1660e01b8152600401610a4793929190610b97565b6020604051808303816000875af1158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a9190610b7e565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d99355482604051610abe91815260200190565b60405180910390a25050505050565b6000806000838503610120811215610ae457600080fd5b843593506020850135925060e0603f1982011215610b0157600080fd5b506040840190509250925092565b6001600160a01b03811681146103b957600080fd5b600060208284031215610b3657600080fd5b8151610b4181610b0f565b9392505050565b60008060008060808587031215610b5e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b600060208284031215610b9057600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610bd357868101830151858201608001528201610bb7565b506000608082860101526080601f19601f83011685010192505050826040830152949350505050565b80820180821115610c1d57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610c2e81610b0f565b919050565b803563ffffffff81168114610c2e57600080fd5b803560038110610c2e57600080fd5b60038110610c7457634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c9c81610b0f565b6001600160a01b03166060830152610cb660408401610c33565b63ffffffff808216608085015280610cd060608701610c33565b1660a085015280610ce360808701610c33565b1660c08501525050610cf760a08401610c47565b610d0460e0840182610c56565b50610d1160c08401610c23565b6001600160a01b0381166101008401525094935050505056fea26469706673582212207cb55b40610a180f18a841525380bad6ae05812ccbd20da0962c409dcb5df76264736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a41a2faa11610066578063a41a2faa14610162578063cb9384681461016a578063e78cea9214610172578063e813a75514610199578063f6ee5b76146101b057600080fd5b8063051d1970146100a35780631062b39a146100cb5780632fa70aa71461010a5780638c5f173f1461013157806390784ae814610158575b600080fd5b6001546002546100b1919082565b604080519283526020830191909152015b60405180910390f35b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101606101c3565b005b6101606103bc565b610160610553565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100c2565b6101606101be366004610acd565b610774565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a89190610b48565b50925050506000548111156102f25760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156103b9576002541561036b5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561048f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b39190610b7e565b6040518463ffffffff1660e01b81526004016104d193929190610b97565b6020604051808303816000875af11580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190610b7e565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d6878160405161054791815260200190565b60405180910390a15050565b6002546000036105ba5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610362565b6000546002546105ca9190610bfc565b42116106335760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610362565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156106aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce9190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561070b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072f9190610b48565b50925050508181036107705760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b90602001610547565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107df5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610362565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088b9190610b24565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ec9190610b24565b6001600160a01b0316146109335760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610362565b600083838360405160240161094a93929190610c78565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a299190610b7e565b6040518463ffffffff1660e01b8152600401610a4793929190610b97565b6020604051808303816000875af1158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a9190610b7e565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d99355482604051610abe91815260200190565b60405180910390a25050505050565b6000806000838503610120811215610ae457600080fd5b843593506020850135925060e0603f1982011215610b0157600080fd5b506040840190509250925092565b6001600160a01b03811681146103b957600080fd5b600060208284031215610b3657600080fd5b8151610b4181610b0f565b9392505050565b60008060008060808587031215610b5e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b600060208284031215610b9057600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610bd357868101830151858201608001528201610bb7565b506000608082860101526080601f19601f83011685010192505050826040830152949350505050565b80820180821115610c1d57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610c2e81610b0f565b919050565b803563ffffffff81168114610c2e57600080fd5b803560038110610c2e57600080fd5b60038110610c7457634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c9c81610b0f565b6001600160a01b03166060830152610cb660408401610c33565b63ffffffff808216608085015280610cd060608701610c33565b1660a085015280610ce360808701610c33565b1660c08501525050610cf760a08401610c47565b610d0460e0840182610c56565b50610d1160c08401610c23565b6001600160a01b0381166101008401525094935050505056fea26469706673582212207cb55b40610a180f18a841525380bad6ae05812ccbd20da0962c409dcb5df76264736f6c63430008120033", + "numDeployments": 13, + "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sendSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"sendSequencerDelayLimit()\":{\"details\":\"Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\"},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n function sendSequencerDelayLimit() public {\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x5d0fed5ff8ea2771aaf2b8cbf6db27c9f7af6eae441a973ef05ec340f0bff6e8\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b5060405162000fe538038062000fe5833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610d60620002856000396000818161010f0152818161044601526109bc01526000818161013601526107e101526000818160d00152818161041d0152610993015260008181610177015281816101c70152818161065f0152818161077f015261080b0152610d606000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a41a2faa11610066578063a41a2faa14610162578063cb9384681461016a578063e78cea9214610172578063e813a75514610199578063f6ee5b76146101b057600080fd5b8063051d1970146100a35780631062b39a146100cb5780632fa70aa71461010a5780638c5f173f1461013157806390784ae814610158575b600080fd5b6001546002546100b1919082565b604080519283526020830191909152015b60405180910390f35b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101606101c3565b005b6101606103bc565b610160610553565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100c2565b6101606101be366004610acd565b610774565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a89190610b48565b50925050506000548111156102f25760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156103b9576002541561036b5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561048f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b39190610b7e565b6040518463ffffffff1660e01b81526004016104d193929190610b97565b6020604051808303816000875af11580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190610b7e565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d6878160405161054791815260200190565b60405180910390a15050565b6002546000036105ba5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610362565b6000546002546105ca9190610bfc565b42116106335760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610362565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156106aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce9190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561070b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072f9190610b48565b50925050508181036107705760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b90602001610547565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107df5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610362565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088b9190610b24565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ec9190610b24565b6001600160a01b0316146109335760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610362565b600083838360405160240161094a93929190610c78565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a299190610b7e565b6040518463ffffffff1660e01b8152600401610a4793929190610b97565b6020604051808303816000875af1158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a9190610b7e565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d99355482604051610abe91815260200190565b60405180910390a25050505050565b6000806000838503610120811215610ae457600080fd5b843593506020850135925060e0603f1982011215610b0157600080fd5b506040840190509250925092565b6001600160a01b03811681146103b957600080fd5b600060208284031215610b3657600080fd5b8151610b4181610b0f565b9392505050565b60008060008060808587031215610b5e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b600060208284031215610b9057600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610bd357868101830151858201608001528201610bb7565b506000608082860101526080601f19601f83011685010192505050826040830152949350505050565b80820180821115610c1d57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610c2e81610b0f565b919050565b803563ffffffff81168114610c2e57600080fd5b803560038110610c2e57600080fd5b60038110610c7457634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c9c81610b0f565b6001600160a01b03166060830152610cb660408401610c33565b63ffffffff808216608085015280610cd060608701610c33565b1660a085015280610ce360808701610c33565b1660c08501525050610cf760a08401610c47565b610d0460e0840182610c56565b50610d1160c08401610c23565b6001600160a01b0381166101008401525094935050505056fea2646970667358221220830f75059c07d8833e8be7a35b8e7642a1bf1c9d29d45d76adb2fdecd6bf588e64736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a41a2faa11610066578063a41a2faa14610162578063cb9384681461016a578063e78cea9214610172578063e813a75514610199578063f6ee5b76146101b057600080fd5b8063051d1970146100a35780631062b39a146100cb5780632fa70aa71461010a5780638c5f173f1461013157806390784ae814610158575b600080fd5b6001546002546100b1919082565b604080519283526020830191909152015b60405180910390f35b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101606101c3565b005b6101606103bc565b610160610553565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100c2565b6101606101be366004610acd565b610774565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a89190610b48565b50925050506000548111156102f25760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156103b9576002541561036b5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561048f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b39190610b7e565b6040518463ffffffff1660e01b81526004016104d193929190610b97565b6020604051808303816000875af11580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190610b7e565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d6878160405161054791815260200190565b60405180910390a15050565b6002546000036105ba5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610362565b6000546002546105ca9190610bfc565b42116106335760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610362565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156106aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce9190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561070b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072f9190610b48565b50925050508181036107705760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b90602001610547565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107df5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610362565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088b9190610b24565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ec9190610b24565b6001600160a01b0316146109335760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610362565b600083838360405160240161094a93929190610c78565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a299190610b7e565b6040518463ffffffff1660e01b8152600401610a4793929190610b97565b6020604051808303816000875af1158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a9190610b7e565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d99355482604051610abe91815260200190565b60405180910390a25050505050565b6000806000838503610120811215610ae457600080fd5b843593506020850135925060e0603f1982011215610b0157600080fd5b506040840190509250925092565b6001600160a01b03811681146103b957600080fd5b600060208284031215610b3657600080fd5b8151610b4181610b0f565b9392505050565b60008060008060808587031215610b5e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b600060208284031215610b9057600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610bd357868101830151858201608001528201610bb7565b506000608082860101526080601f19601f83011685010192505050826040830152949350505050565b80820180821115610c1d57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610c2e81610b0f565b919050565b803563ffffffff81168114610c2e57600080fd5b803560038110610c2e57600080fd5b60038110610c7457634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c9c81610b0f565b6001600160a01b03166060830152610cb660408401610c33565b63ffffffff808216608085015280610cd060608701610c33565b1660a085015280610ce360808701610c33565b1660c08501525050610cf760a08401610c47565b610d0460e0840182610c56565b50610d1160c08401610c23565b6001600160a01b0381166101008401525094935050505056fea2646970667358221220830f75059c07d8833e8be7a35b8e7642a1bf1c9d29d45d76adb2fdecd6bf588e64736f6c63430008120033", "devdoc": { "details": "Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.", "events": { @@ -349,7 +349,7 @@ "storageLayout": { "storage": [ { - "astId": 1436, + "astId": 1828, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "sequencerDelayLimit", "offset": 0, @@ -357,21 +357,21 @@ "type": "t_uint256" }, { - "astId": 1439, + "astId": 1831, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "1", - "type": "t_struct(SequencerDelayLimitDecreaseRequest)1444_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)1836_storage" } ], "types": { - "t_struct(SequencerDelayLimitDecreaseRequest)1444_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)1836_storage": { "encoding": "inplace", "label": "struct RouterArbToGnosis.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 1441, + "astId": 1833, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "requestedsequencerDelayLimit", "offset": 0, @@ -379,7 +379,7 @@ "type": "t_uint256" }, { - "astId": 1443, + "astId": 1835, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/RouterArbToGnosisTestnet.json b/contracts/deployments/goerli/RouterArbToGnosisTestnet.json index 8db3ae26..38172fa6 100644 --- a/contracts/deployments/goerli/RouterArbToGnosisTestnet.json +++ b/contracts/deployments/goerli/RouterArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x57566eBB95e855fdAeEe108Afa450005B12123Bb", + "address": "0x8228116e0d5Fd2611788E68fF77D5f21b005cE11", "abi": [ { "inputs": [ @@ -250,33 +250,33 @@ "type": "function" } ], - "transactionHash": "0x8ed29dc4b80983e0bfbc79ad3e6baf190ce2ef5ba135cbee0b4e9d3897ebad4d", + "transactionHash": "0xcf3f034175f27b21f19ac5d0c9bde592e257f55e09ac400ac8867215c59da3f8", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x57566eBB95e855fdAeEe108Afa450005B12123Bb", - "transactionIndex": 14, + "contractAddress": "0x8228116e0d5Fd2611788E68fF77D5f21b005cE11", + "transactionIndex": 30, "gasUsed": "853453", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x43c862440f256fb77f2bf3e006f897f5319d064434e1894212856b532b3eed03", - "transactionHash": "0x8ed29dc4b80983e0bfbc79ad3e6baf190ce2ef5ba135cbee0b4e9d3897ebad4d", + "blockHash": "0x876ded6cc4849afb128ef67d1b0365e0125d5f83695e9febd3fc114ef1b3755f", + "transactionHash": "0xcf3f034175f27b21f19ac5d0c9bde592e257f55e09ac400ac8867215c59da3f8", "logs": [], - "blockNumber": 9186815, - "cumulativeGasUsed": "7561008", + "blockNumber": 9186886, + "cumulativeGasUsed": "7849917", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x87A19d769D875964E9Cd41dDBfc397B2543764E6", - "0xf2DDe00c51be42c74e3927A324928381f83da37f", - "0x0C3Acd25FE091b02e8E9b30B9b51dBD5d58C8a41" + "0x4738A566706eDd30Fe175e20eDDd21c5c7bD79Ea", + "0x359c4E8225866aB97ab054ec36aBe923e70eF741" ], - "numDeployments": 4, - "solcInputHash": "cf76e8aad7d9ce9f21e3b6b1180c6852", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sendSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"sendSequencerDelayLimit()\":{\"details\":\"Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\"},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n function sendSequencerDelayLimit() public {\\n bytes memory data = abi.encodeCall(ISequencerDelayUpdatable.updateSequencerDelayLimit, (sequencerDelayLimit, block.timestamp));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xf96670a60b3706d0e80ed951e7c4dac37317c439419fc0638dcddb3dc99a0d38\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101006040523480156200001257600080fd5b5060405162000fe538038062000fe5833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610d60620002856000396000818161010f0152818161044601526109bc01526000818161013601526107e101526000818160d00152818161041d0152610993015260008181610177015281816101c70152818161065f0152818161077f015261080b0152610d606000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a41a2faa11610066578063a41a2faa14610162578063cb9384681461016a578063e78cea9214610172578063e813a75514610199578063f6ee5b76146101b057600080fd5b8063051d1970146100a35780631062b39a146100cb5780632fa70aa71461010a5780638c5f173f1461013157806390784ae814610158575b600080fd5b6001546002546100b1919082565b604080519283526020830191909152015b60405180910390f35b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101606101c3565b005b6101606103bc565b610160610553565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100c2565b6101606101be366004610acd565b610774565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a89190610b48565b50925050506000548111156102f25760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156103b9576002541561036b5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561048f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b39190610b7e565b6040518463ffffffff1660e01b81526004016104d193929190610b97565b6020604051808303816000875af11580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190610b7e565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d6878160405161054791815260200190565b60405180910390a15050565b6002546000036105ba5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610362565b6000546002546105ca9190610bfc565b42116106335760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610362565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156106aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce9190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561070b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072f9190610b48565b50925050508181036107705760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b90602001610547565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107df5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610362565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088b9190610b24565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ec9190610b24565b6001600160a01b0316146109335760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610362565b600083838360405160240161094a93929190610c78565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a299190610b7e565b6040518463ffffffff1660e01b8152600401610a4793929190610b97565b6020604051808303816000875af1158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a9190610b7e565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d99355482604051610abe91815260200190565b60405180910390a25050505050565b6000806000838503610120811215610ae457600080fd5b843593506020850135925060e0603f1982011215610b0157600080fd5b506040840190509250925092565b6001600160a01b03811681146103b957600080fd5b600060208284031215610b3657600080fd5b8151610b4181610b0f565b9392505050565b60008060008060808587031215610b5e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b600060208284031215610b9057600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610bd357868101830151858201608001528201610bb7565b506000608082860101526080601f19601f83011685010192505050826040830152949350505050565b80820180821115610c1d57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610c2e81610b0f565b919050565b803563ffffffff81168114610c2e57600080fd5b803560038110610c2e57600080fd5b60038110610c7457634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c9c81610b0f565b6001600160a01b03166060830152610cb660408401610c33565b63ffffffff808216608085015280610cd060608701610c33565b1660a085015280610ce360808701610c33565b1660c08501525050610cf760a08401610c47565b610d0460e0840182610c56565b50610d1160c08401610c23565b6001600160a01b0381166101008401525094935050505056fea26469706673582212207cb55b40610a180f18a841525380bad6ae05812ccbd20da0962c409dcb5df76264736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a41a2faa11610066578063a41a2faa14610162578063cb9384681461016a578063e78cea9214610172578063e813a75514610199578063f6ee5b76146101b057600080fd5b8063051d1970146100a35780631062b39a146100cb5780632fa70aa71461010a5780638c5f173f1461013157806390784ae814610158575b600080fd5b6001546002546100b1919082565b604080519283526020830191909152015b60405180910390f35b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101606101c3565b005b6101606103bc565b610160610553565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100c2565b6101606101be366004610acd565b610774565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a89190610b48565b50925050506000548111156102f25760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156103b9576002541561036b5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561048f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b39190610b7e565b6040518463ffffffff1660e01b81526004016104d193929190610b97565b6020604051808303816000875af11580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190610b7e565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d6878160405161054791815260200190565b60405180910390a15050565b6002546000036105ba5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610362565b6000546002546105ca9190610bfc565b42116106335760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610362565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156106aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce9190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561070b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072f9190610b48565b50925050508181036107705760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b90602001610547565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107df5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610362565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088b9190610b24565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ec9190610b24565b6001600160a01b0316146109335760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610362565b600083838360405160240161094a93929190610c78565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a299190610b7e565b6040518463ffffffff1660e01b8152600401610a4793929190610b97565b6020604051808303816000875af1158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a9190610b7e565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d99355482604051610abe91815260200190565b60405180910390a25050505050565b6000806000838503610120811215610ae457600080fd5b843593506020850135925060e0603f1982011215610b0157600080fd5b506040840190509250925092565b6001600160a01b03811681146103b957600080fd5b600060208284031215610b3657600080fd5b8151610b4181610b0f565b9392505050565b60008060008060808587031215610b5e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b600060208284031215610b9057600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610bd357868101830151858201608001528201610bb7565b506000608082860101526080601f19601f83011685010192505050826040830152949350505050565b80820180821115610c1d57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610c2e81610b0f565b919050565b803563ffffffff81168114610c2e57600080fd5b803560038110610c2e57600080fd5b60038110610c7457634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c9c81610b0f565b6001600160a01b03166060830152610cb660408401610c33565b63ffffffff808216608085015280610cd060608701610c33565b1660a085015280610ce360808701610c33565b1660c08501525050610cf760a08401610c47565b610d0460e0840182610c56565b50610d1160c08401610c23565b6001600160a01b0381166101008401525094935050505056fea26469706673582212207cb55b40610a180f18a841525380bad6ae05812ccbd20da0962c409dcb5df76264736f6c63430008120033", + "numDeployments": 5, + "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sendSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"sendSequencerDelayLimit()\":{\"details\":\"Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\"},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n function sendSequencerDelayLimit() public {\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x5d0fed5ff8ea2771aaf2b8cbf6db27c9f7af6eae441a973ef05ec340f0bff6e8\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b5060405162000fe538038062000fe5833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610d60620002856000396000818161010f0152818161044601526109bc01526000818161013601526107e101526000818160d00152818161041d0152610993015260008181610177015281816101c70152818161065f0152818161077f015261080b0152610d606000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a41a2faa11610066578063a41a2faa14610162578063cb9384681461016a578063e78cea9214610172578063e813a75514610199578063f6ee5b76146101b057600080fd5b8063051d1970146100a35780631062b39a146100cb5780632fa70aa71461010a5780638c5f173f1461013157806390784ae814610158575b600080fd5b6001546002546100b1919082565b604080519283526020830191909152015b60405180910390f35b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101606101c3565b005b6101606103bc565b610160610553565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100c2565b6101606101be366004610acd565b610774565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a89190610b48565b50925050506000548111156102f25760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156103b9576002541561036b5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561048f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b39190610b7e565b6040518463ffffffff1660e01b81526004016104d193929190610b97565b6020604051808303816000875af11580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190610b7e565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d6878160405161054791815260200190565b60405180910390a15050565b6002546000036105ba5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610362565b6000546002546105ca9190610bfc565b42116106335760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610362565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156106aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce9190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561070b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072f9190610b48565b50925050508181036107705760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b90602001610547565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107df5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610362565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088b9190610b24565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ec9190610b24565b6001600160a01b0316146109335760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610362565b600083838360405160240161094a93929190610c78565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a299190610b7e565b6040518463ffffffff1660e01b8152600401610a4793929190610b97565b6020604051808303816000875af1158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a9190610b7e565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d99355482604051610abe91815260200190565b60405180910390a25050505050565b6000806000838503610120811215610ae457600080fd5b843593506020850135925060e0603f1982011215610b0157600080fd5b506040840190509250925092565b6001600160a01b03811681146103b957600080fd5b600060208284031215610b3657600080fd5b8151610b4181610b0f565b9392505050565b60008060008060808587031215610b5e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b600060208284031215610b9057600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610bd357868101830151858201608001528201610bb7565b506000608082860101526080601f19601f83011685010192505050826040830152949350505050565b80820180821115610c1d57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610c2e81610b0f565b919050565b803563ffffffff81168114610c2e57600080fd5b803560038110610c2e57600080fd5b60038110610c7457634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c9c81610b0f565b6001600160a01b03166060830152610cb660408401610c33565b63ffffffff808216608085015280610cd060608701610c33565b1660a085015280610ce360808701610c33565b1660c08501525050610cf760a08401610c47565b610d0460e0840182610c56565b50610d1160c08401610c23565b6001600160a01b0381166101008401525094935050505056fea2646970667358221220830f75059c07d8833e8be7a35b8e7642a1bf1c9d29d45d76adb2fdecd6bf588e64736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a41a2faa11610066578063a41a2faa14610162578063cb9384681461016a578063e78cea9214610172578063e813a75514610199578063f6ee5b76146101b057600080fd5b8063051d1970146100a35780631062b39a146100cb5780632fa70aa71461010a5780638c5f173f1461013157806390784ae814610158575b600080fd5b6001546002546100b1919082565b604080519283526020830191909152015b60405180910390f35b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101606101c3565b005b6101606103bc565b610160610553565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100c2565b6101606101be366004610acd565b610774565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a89190610b48565b50925050506000548111156102f25760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156103b9576002541561036b5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561048f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b39190610b7e565b6040518463ffffffff1660e01b81526004016104d193929190610b97565b6020604051808303816000875af11580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190610b7e565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d6878160405161054791815260200190565b60405180910390a15050565b6002546000036105ba5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610362565b6000546002546105ca9190610bfc565b42116106335760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610362565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156106aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce9190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561070b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072f9190610b48565b50925050508181036107705760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b90602001610547565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107df5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610362565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088b9190610b24565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ec9190610b24565b6001600160a01b0316146109335760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610362565b600083838360405160240161094a93929190610c78565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a299190610b7e565b6040518463ffffffff1660e01b8152600401610a4793929190610b97565b6020604051808303816000875af1158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a9190610b7e565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d99355482604051610abe91815260200190565b60405180910390a25050505050565b6000806000838503610120811215610ae457600080fd5b843593506020850135925060e0603f1982011215610b0157600080fd5b506040840190509250925092565b6001600160a01b03811681146103b957600080fd5b600060208284031215610b3657600080fd5b8151610b4181610b0f565b9392505050565b60008060008060808587031215610b5e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b600060208284031215610b9057600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610bd357868101830151858201608001528201610bb7565b506000608082860101526080601f19601f83011685010192505050826040830152949350505050565b80820180821115610c1d57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610c2e81610b0f565b919050565b803563ffffffff81168114610c2e57600080fd5b803560038110610c2e57600080fd5b60038110610c7457634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c9c81610b0f565b6001600160a01b03166060830152610cb660408401610c33565b63ffffffff808216608085015280610cd060608701610c33565b1660a085015280610ce360808701610c33565b1660c08501525050610cf760a08401610c47565b610d0460e0840182610c56565b50610d1160c08401610c23565b6001600160a01b0381166101008401525094935050505056fea2646970667358221220830f75059c07d8833e8be7a35b8e7642a1bf1c9d29d45d76adb2fdecd6bf588e64736f6c63430008120033", "devdoc": { "details": "Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.", "events": { @@ -349,7 +349,7 @@ "storageLayout": { "storage": [ { - "astId": 1436, + "astId": 1828, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "sequencerDelayLimit", "offset": 0, @@ -357,21 +357,21 @@ "type": "t_uint256" }, { - "astId": 1439, + "astId": 1831, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "1", - "type": "t_struct(SequencerDelayLimitDecreaseRequest)1444_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)1836_storage" } ], "types": { - "t_struct(SequencerDelayLimitDecreaseRequest)1444_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)1836_storage": { "encoding": "inplace", "label": "struct RouterArbToGnosis.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 1441, + "astId": 1833, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "requestedsequencerDelayLimit", "offset": 0, @@ -379,7 +379,7 @@ "type": "t_uint256" }, { - "astId": 1443, + "astId": 1835, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json b/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json index 3e0c3f67..9d6e0526 100644 --- a/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json +++ b/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xb594c5C4eE3bF976d59F5d3DB311A1ac99D20FBA", + "address": "0x8dC6CCd123E680018923000854dE7E293E744DA0", "abi": [ { "inputs": [ @@ -1025,32 +1025,32 @@ "type": "function" } ], - "transactionHash": "0xfc24fff53416e0e18c452650711fc8e11c0ff67519c0feddb0040efd061a00d1", + "transactionHash": "0x6e59e266a405c153f2fbc504d0a5d9690597a94ef4cc5548db366e32f142ea08", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xb594c5C4eE3bF976d59F5d3DB311A1ac99D20FBA", - "transactionIndex": 5, + "contractAddress": "0x8dC6CCd123E680018923000854dE7E293E744DA0", + "transactionIndex": 39, "gasUsed": "2205677", - "logsBloom": "0x00000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000", - "blockHash": "0x3915d078c228115b722e57e6e4eae7bb757de34dc39b4699cacefb15c731ad8c", - "transactionHash": "0xfc24fff53416e0e18c452650711fc8e11c0ff67519c0feddb0040efd061a00d1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000004000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000020000000000000", + "blockHash": "0x53af67e71d5ab2f99082db682cef49c0592b217324e7d609d789d48efd6f24ba", + "transactionHash": "0x6e59e266a405c153f2fbc504d0a5d9690597a94ef4cc5548db366e32f142ea08", "logs": [ { - "transactionIndex": 5, - "blockNumber": 9186819, - "transactionHash": "0xfc24fff53416e0e18c452650711fc8e11c0ff67519c0feddb0040efd061a00d1", - "address": "0xb594c5C4eE3bF976d59F5d3DB311A1ac99D20FBA", + "transactionIndex": 39, + "blockNumber": 9186889, + "transactionHash": "0x6e59e266a405c153f2fbc504d0a5d9690597a94ef4cc5548db366e32f142ea08", + "address": "0x8dC6CCd123E680018923000854dE7E293E744DA0", "topics": [ "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 10, - "blockHash": "0x3915d078c228115b722e57e6e4eae7bb757de34dc39b4699cacefb15c731ad8c" + "logIndex": 62, + "blockHash": "0x53af67e71d5ab2f99082db682cef49c0592b217324e7d609d789d48efd6f24ba" } ], - "blockNumber": 9186819, - "cumulativeGasUsed": "3321023", + "blockNumber": 9186889, + "cumulativeGasUsed": "16341745", "status": 1, "byzantium": true }, @@ -1059,15 +1059,15 @@ 1800, 0, 10000000000000, - "0x3D9356FF595C2151513DFc520380d5A178224564", + "0x1224E83DF410b43A65ed3e375a6442813B1aea14", "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", 10000000000000 ], - "numDeployments": 10, - "solcInputHash": "cf76e8aad7d9ce9f21e3b6b1180c6852", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEthDevnet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_bridge\":\"The address of the Arbitrum bridge contract on Ethereum.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEthDevnet\":\"The address of the devnet vea inbox on Arbitrum to Ethereum.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":\"VeaOutboxArbToEthDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updatesequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x36147b323b9b28537749fc38c75ad7d3e1b3fa7f180aecb3ab90d35c6718b9e3\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToEth/VeaOutboxArbToEth.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Goerli.\\n/// Note: This contract is deployed on Goerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEthDevnet The address of the devnet vea inbox on Arbitrum to Ethereum.\\n /// @param _bridge The address of the Arbitrum bridge contract on Ethereum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEthDevnet,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n )\\n VeaOutboxArbToEth(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _veaInboxArbToEthDevnet,\\n _bridge,\\n _maxMissingBlocks\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xc790ada101869ca355f7e5f35d7480741189082573634b34c0a4464c69e043dd\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002a4438038062002a448339810160408190526200003591620002ee565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190528686868686868662000076620000ee565b620000836002886200036c565b60e0819052620000958860026200038f565b620000a19190620003af565b6101005261012051600190620000b890426200036c565b620000c49190620003af565b6001555050600780546001600160a01b0319163317905550620004219a5050505050505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000131573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001579190620003c5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000195573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001bb9190620003ea565b5092505050600454811115620002065760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ce5760065415620002805760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002e957600080fd5b919050565b600080600080600080600060e0888a0312156200030a57600080fd5b875196506020880151955060408801519450606088015193506200033160808901620002d1565b92506200034160a08901620002d1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200038a57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620003a957620003a962000356565b92915050565b81810381811115620003a957620003a962000356565b600060208284031215620003d857600080fd5b620003e382620002d1565b9392505050565b600080600080608085870312156200040157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516124f56200054f600039600081816104a10152611ea90152600081816104d5015281816108b2015281816116b40152818161183f0152611c6801526000818161055d0152611e3d015260008181610509015281816108d601528181610bdf015281816113ae015281816116d8015281816118630152611c8c015260008181611133015261126c0152600081816110e001526112240152600081816105a6015281816106b2015281816108390152818161086601528181610c22015281816112bc015281816119a901528181611a100152611dd301526000818161039d01526109c001526000818161062701528181610951015281816109ea015281816114c20152611b5501526124f56000f3fe6080604052600436106101e35760003560e01c806390784ae811610102578063c2114a1611610095578063df19e6ff11610064578063df19e6ff146105e8578063e78cea9214610615578063e813a75514610649578063eedcf2a91461065f57600080fd5b8063c2114a161461054b578063cb9384681461057f578063d0e30db014610594578063da2b7bc4146105c857600080fd5b8063aa22a1c6116100d1578063aa22a1c61461048f578063b044397e146104c3578063b5b7a184146104f7578063b633b9441461052b57600080fd5b806390784ae81461041757806390df63b71461042c578063930f28af146104595780639588eca21461047957600080fd5b80633ce43cfd1161017a578063541adcca11610149578063541adcca1461036b57806369cd250d1461038b5780638a619a71146103d75780638ad3a8f7146103f757600080fd5b80633ce43cfd146102eb5780634788cb381461030b57806349b4299e1461032b5780634a439cfe1461034b57600080fd5b80632639c060116101b65780632639c0601461027557806327ee6bdd146102a257806331d14457146102b857806331ddf743146102cb57600080fd5b806301139b68146101e8578063051d1970146101fd5780630f0adca514610232578063222ae78614610252575b600080fd5b6101fb6101f6366004612063565b610672565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb61024d366004612091565b6108b0565b34801561025e57600080fd5b50610267610bd8565b604051908152602001610229565b34801561028157600080fd5b506102676102903660046120c8565b60026020526000908152604090205481565b3480156102ae57600080fd5b5061026760015481565b6101fb6102c63660046120e1565b610c09565b3480156102d757600080fd5b506101fb6102e6366004612164565b610d89565b3480156102f757600080fd5b506101fb610306366004612226565b611029565b34801561031757600080fd5b506101fb610326366004612063565b611170565b34801561033757600080fd5b506101fb610346366004612063565b6112f4565b34801561035757600080fd5b506102676103663660046120c8565b6113a7565b34801561037757600080fd5b5061026761038636600461225f565b6113d9565b34801561039757600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b3480156103e357600080fd5b506101fb6103f2366004612282565b61142b565b34801561040357600080fd5b506007546103bf906001600160a01b031681565b34801561042357600080fd5b506101fb6114be565b34801561043857600080fd5b506102676104473660046120c8565b60036020526000908152604090205481565b34801561046557600080fd5b506101fb610474366004612063565b6116b2565b34801561048557600080fd5b5061026760005481565b34801561049b57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cf57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561050357600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561053757600080fd5b506101fb610546366004612063565b61183d565b34801561055757600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561058b57600080fd5b506101fb611a49565b3480156105a057600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d457600080fd5b506101fb6105e3366004612063565b611c66565b3480156105f457600080fd5b5061060861060336600461225f565b611e1f565b60405161022991906122b5565b34801561062157600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b34801561065557600080fd5b5061026760045481565b6101fb61066d3660046120e1565b611ee6565b61067b816113d9565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122cf565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a0015160028111156107935761079361229f565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816113d9565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f00000000000000000000000000000000000000000000000000000000000000003461230d565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090357610903612320565b040311156109465760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109be5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612336565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612336565b6001600160a01b031614610b1a5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610b2a57508115155b15610b6d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b76816113d9565b60008481526002602052604090205403610bd3578051829003610b9f57600160a0820152610bba565b60c08101516001600160a01b031615610bba57600260a08201525b610bc3816113d9565b6000848152600260205260409020555b505050565b6000610c047f000000000000000000000000000000000000000000000000000000000000000042612353565b905090565b6007546001600160a01b03163314610c2057600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610c905760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610cad5760405162461bcd60e51b81526004016106a7906122cf565b60008281526002602052604090205415610cff5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610d45906113d9565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161082f565b60408510610dcb5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b600084848484604051602001610de49493929190612375565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610e64576000888883818110610e2657610e266123b7565b90506020020135905082811115610e4b57826000528060205260406000209250610e5b565b8060005282602052604060002092505b50600101610e0a565b508060005414610ea75760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f1c5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610f4c90899089906123cd565b6000604051808303816000865af19150503d8060008114610f89576040519150601f19603f3d011682016040523d82523d6000602084013e610f8e565b606091505b5050905080610fdf5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61103b6103863683900383018361225f565b600083815260026020526040902054146110675760405162461bcd60e51b81526004016106a7906122cf565b600261107960c0830160a084016123dd565b600281111561108a5761108a61229f565b146110cb5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061112593505060e0840191505060c08301612282565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611179816113d9565b600083815260026020526040902054146111a55760405162461bcd60e51b81526004016106a7906122cf565b60018160a0015160028111156111bd576111bd61229f565b146111fa5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156112a6576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461130b57600080fd5b611314816113d9565b600083815260026020526040902054146113405760405162461bcd60e51b81526004016106a7906122cf565b63ffffffff42811660608301524316608082015261135d816113d9565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691015b60405180910390a15050565b60006113d37f000000000000000000000000000000000000000000000000000000000000000083612353565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861140e9890979691016123f8565b604051602081830303815290604052805190602001209050919050565b6007546001600160a01b0316331461144257600080fd5b6007546001600160a01b0316331461149c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561151e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115429190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561157f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a39190612476565b50925050506004548111156115ed5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156116af57600654156116615760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161170557611705612320565b040311156117485760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b611751816113d9565b6000838152600260205260409020541461177d5760405162461bcd60e51b81526004016106a7906122cf565b60c08101516001600160a01b0316156117cf5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b60015482111561181757600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611827816113d9565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161189057611890612320565b0403116118d15760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b6118da816113d9565b600083815260026020526040902054146119065760405162461bcd60e51b81526004016106a7906122cf565b60008160a00151600281111561191e5761191e61229f565b1461195d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b03166119e15760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c08101805160009091526119f5826113d9565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611ab05760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b600454600654611ac091906124ac565b4211611b295760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611ba0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc49190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c259190612476565b50925050508181036108ac5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200161139b565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cb957611cb9612320565b040311611cfa5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611d03816113d9565b60008381526002602052604090205414611d2f5760405162461bcd60e51b81526004016106a7906122cf565b60008160a001516002811115611d4757611d4761229f565b14611d865760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611e0b5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60208101805160009091526119f5826113d9565b6000816060015163ffffffff16600003611e3b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7757506003919050565b6000600c836060015163ffffffff16420381611e9557611e95612320565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ed95760019250611ede565b600092505b50505b919050565b611ef08282610c09565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f3783826112f4565b63ffffffff428116606083015243166080820152611f5583826116b2565b600160a0820152610bd38382611170565b6001600160a01b03811681146116af57600080fd5b8035611ee181611f66565b803563ffffffff81168114611ee157600080fd5b803560038110611ee157600080fd5b600060e08284031215611fbb57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fec57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200260208401611f7b565b602082015261201360408401611f86565b604082015261202460608401611f86565b606082015261203560808401611f86565b608082015261204660a08401611f9a565b60a082015261205760c08401611f7b565b60c08201525092915050565b600080610100838503121561207757600080fd5b823591506120888460208501611fa9565b90509250929050565b600080600061012084860312156120a757600080fd5b83359250602084013591506120bf8560408601611fa9565b90509250925092565b6000602082840312156120da57600080fd5b5035919050565b600080604083850312156120f457600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee157600080fd5b60008083601f84011261212d57600080fd5b50813567ffffffffffffffff81111561214557600080fd5b60208301915083602082850101111561215d57600080fd5b9250929050565b6000806000806000806080878903121561217d57600080fd5b863567ffffffffffffffff8082111561219557600080fd5b818901915089601f8301126121a957600080fd5b8135818111156121b857600080fd5b8a60208260051b85010111156121cd57600080fd5b602083019850809750506121e360208a01612103565b95506121f160408a01611f7b565b9450606089013591508082111561220757600080fd5b5061221489828a0161211b565b979a9699509497509295939492505050565b60008082840361010081121561223b57600080fd5b8335925060e0601f198201121561225157600080fd5b506020830190509250929050565b600060e0828403121561227157600080fd5b61227b8383611fa9565b9392505050565b60006020828403121561229457600080fd5b813561227b81611f66565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122c9576122c961229f565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156113d3576113d36122f7565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561234857600080fd5b815161227b81611f66565b60008261237057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123ef57600080fd5b61227b82611f9a565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124505761245061229f565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561248c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b808201808211156113d3576113d36122f756fea26469706673582212207d86c610ede58da4186508bbc0d95e341df5920dfbf645c9138e5d3f55b2379364736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101e35760003560e01c806390784ae811610102578063c2114a1611610095578063df19e6ff11610064578063df19e6ff146105e8578063e78cea9214610615578063e813a75514610649578063eedcf2a91461065f57600080fd5b8063c2114a161461054b578063cb9384681461057f578063d0e30db014610594578063da2b7bc4146105c857600080fd5b8063aa22a1c6116100d1578063aa22a1c61461048f578063b044397e146104c3578063b5b7a184146104f7578063b633b9441461052b57600080fd5b806390784ae81461041757806390df63b71461042c578063930f28af146104595780639588eca21461047957600080fd5b80633ce43cfd1161017a578063541adcca11610149578063541adcca1461036b57806369cd250d1461038b5780638a619a71146103d75780638ad3a8f7146103f757600080fd5b80633ce43cfd146102eb5780634788cb381461030b57806349b4299e1461032b5780634a439cfe1461034b57600080fd5b80632639c060116101b65780632639c0601461027557806327ee6bdd146102a257806331d14457146102b857806331ddf743146102cb57600080fd5b806301139b68146101e8578063051d1970146101fd5780630f0adca514610232578063222ae78614610252575b600080fd5b6101fb6101f6366004612063565b610672565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb61024d366004612091565b6108b0565b34801561025e57600080fd5b50610267610bd8565b604051908152602001610229565b34801561028157600080fd5b506102676102903660046120c8565b60026020526000908152604090205481565b3480156102ae57600080fd5b5061026760015481565b6101fb6102c63660046120e1565b610c09565b3480156102d757600080fd5b506101fb6102e6366004612164565b610d89565b3480156102f757600080fd5b506101fb610306366004612226565b611029565b34801561031757600080fd5b506101fb610326366004612063565b611170565b34801561033757600080fd5b506101fb610346366004612063565b6112f4565b34801561035757600080fd5b506102676103663660046120c8565b6113a7565b34801561037757600080fd5b5061026761038636600461225f565b6113d9565b34801561039757600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b3480156103e357600080fd5b506101fb6103f2366004612282565b61142b565b34801561040357600080fd5b506007546103bf906001600160a01b031681565b34801561042357600080fd5b506101fb6114be565b34801561043857600080fd5b506102676104473660046120c8565b60036020526000908152604090205481565b34801561046557600080fd5b506101fb610474366004612063565b6116b2565b34801561048557600080fd5b5061026760005481565b34801561049b57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cf57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561050357600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561053757600080fd5b506101fb610546366004612063565b61183d565b34801561055757600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561058b57600080fd5b506101fb611a49565b3480156105a057600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d457600080fd5b506101fb6105e3366004612063565b611c66565b3480156105f457600080fd5b5061060861060336600461225f565b611e1f565b60405161022991906122b5565b34801561062157600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b34801561065557600080fd5b5061026760045481565b6101fb61066d3660046120e1565b611ee6565b61067b816113d9565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122cf565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a0015160028111156107935761079361229f565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816113d9565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f00000000000000000000000000000000000000000000000000000000000000003461230d565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090357610903612320565b040311156109465760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109be5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612336565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612336565b6001600160a01b031614610b1a5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610b2a57508115155b15610b6d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b76816113d9565b60008481526002602052604090205403610bd3578051829003610b9f57600160a0820152610bba565b60c08101516001600160a01b031615610bba57600260a08201525b610bc3816113d9565b6000848152600260205260409020555b505050565b6000610c047f000000000000000000000000000000000000000000000000000000000000000042612353565b905090565b6007546001600160a01b03163314610c2057600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610c905760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610cad5760405162461bcd60e51b81526004016106a7906122cf565b60008281526002602052604090205415610cff5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610d45906113d9565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161082f565b60408510610dcb5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b600084848484604051602001610de49493929190612375565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610e64576000888883818110610e2657610e266123b7565b90506020020135905082811115610e4b57826000528060205260406000209250610e5b565b8060005282602052604060002092505b50600101610e0a565b508060005414610ea75760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f1c5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610f4c90899089906123cd565b6000604051808303816000865af19150503d8060008114610f89576040519150601f19603f3d011682016040523d82523d6000602084013e610f8e565b606091505b5050905080610fdf5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61103b6103863683900383018361225f565b600083815260026020526040902054146110675760405162461bcd60e51b81526004016106a7906122cf565b600261107960c0830160a084016123dd565b600281111561108a5761108a61229f565b146110cb5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061112593505060e0840191505060c08301612282565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611179816113d9565b600083815260026020526040902054146111a55760405162461bcd60e51b81526004016106a7906122cf565b60018160a0015160028111156111bd576111bd61229f565b146111fa5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156112a6576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461130b57600080fd5b611314816113d9565b600083815260026020526040902054146113405760405162461bcd60e51b81526004016106a7906122cf565b63ffffffff42811660608301524316608082015261135d816113d9565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691015b60405180910390a15050565b60006113d37f000000000000000000000000000000000000000000000000000000000000000083612353565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861140e9890979691016123f8565b604051602081830303815290604052805190602001209050919050565b6007546001600160a01b0316331461144257600080fd5b6007546001600160a01b0316331461149c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561151e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115429190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561157f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a39190612476565b50925050506004548111156115ed5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156116af57600654156116615760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161170557611705612320565b040311156117485760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b611751816113d9565b6000838152600260205260409020541461177d5760405162461bcd60e51b81526004016106a7906122cf565b60c08101516001600160a01b0316156117cf5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b60015482111561181757600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611827816113d9565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161189057611890612320565b0403116118d15760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b6118da816113d9565b600083815260026020526040902054146119065760405162461bcd60e51b81526004016106a7906122cf565b60008160a00151600281111561191e5761191e61229f565b1461195d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b03166119e15760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c08101805160009091526119f5826113d9565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611ab05760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b600454600654611ac091906124ac565b4211611b295760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611ba0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc49190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c259190612476565b50925050508181036108ac5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200161139b565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cb957611cb9612320565b040311611cfa5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611d03816113d9565b60008381526002602052604090205414611d2f5760405162461bcd60e51b81526004016106a7906122cf565b60008160a001516002811115611d4757611d4761229f565b14611d865760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611e0b5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60208101805160009091526119f5826113d9565b6000816060015163ffffffff16600003611e3b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7757506003919050565b6000600c836060015163ffffffff16420381611e9557611e95612320565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ed95760019250611ede565b600092505b50505b919050565b611ef08282610c09565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f3783826112f4565b63ffffffff428116606083015243166080820152611f5583826116b2565b600160a0820152610bd38382611170565b6001600160a01b03811681146116af57600080fd5b8035611ee181611f66565b803563ffffffff81168114611ee157600080fd5b803560038110611ee157600080fd5b600060e08284031215611fbb57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fec57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200260208401611f7b565b602082015261201360408401611f86565b604082015261202460608401611f86565b606082015261203560808401611f86565b608082015261204660a08401611f9a565b60a082015261205760c08401611f7b565b60c08201525092915050565b600080610100838503121561207757600080fd5b823591506120888460208501611fa9565b90509250929050565b600080600061012084860312156120a757600080fd5b83359250602084013591506120bf8560408601611fa9565b90509250925092565b6000602082840312156120da57600080fd5b5035919050565b600080604083850312156120f457600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee157600080fd5b60008083601f84011261212d57600080fd5b50813567ffffffffffffffff81111561214557600080fd5b60208301915083602082850101111561215d57600080fd5b9250929050565b6000806000806000806080878903121561217d57600080fd5b863567ffffffffffffffff8082111561219557600080fd5b818901915089601f8301126121a957600080fd5b8135818111156121b857600080fd5b8a60208260051b85010111156121cd57600080fd5b602083019850809750506121e360208a01612103565b95506121f160408a01611f7b565b9450606089013591508082111561220757600080fd5b5061221489828a0161211b565b979a9699509497509295939492505050565b60008082840361010081121561223b57600080fd5b8335925060e0601f198201121561225157600080fd5b506020830190509250929050565b600060e0828403121561227157600080fd5b61227b8383611fa9565b9392505050565b60006020828403121561229457600080fd5b813561227b81611f66565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122c9576122c961229f565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156113d3576113d36122f7565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561234857600080fd5b815161227b81611f66565b60008261237057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123ef57600080fd5b61227b82611f9a565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124505761245061229f565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561248c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b808201808211156113d3576113d36122f756fea26469706673582212207d86c610ede58da4186508bbc0d95e341df5920dfbf645c9138e5d3f55b2379364736f6c63430008120033", + "numDeployments": 11, + "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEthDevnet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_bridge\":\"The address of the Arbitrum bridge contract on Ethereum.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEthDevnet\":\"The address of the devnet vea inbox on Arbitrum to Ethereum.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":\"VeaOutboxArbToEthDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updatesequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x36147b323b9b28537749fc38c75ad7d3e1b3fa7f180aecb3ab90d35c6718b9e3\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToEth/VeaOutboxArbToEth.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Goerli.\\n/// Note: This contract is deployed on Goerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEthDevnet The address of the devnet vea inbox on Arbitrum to Ethereum.\\n /// @param _bridge The address of the Arbitrum bridge contract on Ethereum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEthDevnet,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n )\\n VeaOutboxArbToEth(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _veaInboxArbToEthDevnet,\\n _bridge,\\n _maxMissingBlocks\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xc790ada101869ca355f7e5f35d7480741189082573634b34c0a4464c69e043dd\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002a4438038062002a448339810160408190526200003591620002ee565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190528686868686868662000076620000ee565b620000836002886200036c565b60e0819052620000958860026200038f565b620000a19190620003af565b6101005261012051600190620000b890426200036c565b620000c49190620003af565b6001555050600780546001600160a01b0319163317905550620004219a5050505050505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000131573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001579190620003c5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000195573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001bb9190620003ea565b5092505050600454811115620002065760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ce5760065415620002805760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002e957600080fd5b919050565b600080600080600080600060e0888a0312156200030a57600080fd5b875196506020880151955060408801519450606088015193506200033160808901620002d1565b92506200034160a08901620002d1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200038a57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620003a957620003a962000356565b92915050565b81810381811115620003a957620003a962000356565b600060208284031215620003d857600080fd5b620003e382620002d1565b9392505050565b600080600080608085870312156200040157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516124f56200054f600039600081816104a10152611ea90152600081816104d5015281816108b2015281816116b40152818161183f0152611c6801526000818161055d0152611e3d015260008181610509015281816108d601528181610bdf015281816113ae015281816116d8015281816118630152611c8c015260008181611133015261126c0152600081816110e001526112240152600081816105a6015281816106b2015281816108390152818161086601528181610c22015281816112bc015281816119a901528181611a100152611dd301526000818161039d01526109c001526000818161062701528181610951015281816109ea015281816114c20152611b5501526124f56000f3fe6080604052600436106101e35760003560e01c806390784ae811610102578063c2114a1611610095578063df19e6ff11610064578063df19e6ff146105e8578063e78cea9214610615578063e813a75514610649578063eedcf2a91461065f57600080fd5b8063c2114a161461054b578063cb9384681461057f578063d0e30db014610594578063da2b7bc4146105c857600080fd5b8063aa22a1c6116100d1578063aa22a1c61461048f578063b044397e146104c3578063b5b7a184146104f7578063b633b9441461052b57600080fd5b806390784ae81461041757806390df63b71461042c578063930f28af146104595780639588eca21461047957600080fd5b80633ce43cfd1161017a578063541adcca11610149578063541adcca1461036b57806369cd250d1461038b5780638a619a71146103d75780638ad3a8f7146103f757600080fd5b80633ce43cfd146102eb5780634788cb381461030b57806349b4299e1461032b5780634a439cfe1461034b57600080fd5b80632639c060116101b65780632639c0601461027557806327ee6bdd146102a257806331d14457146102b857806331ddf743146102cb57600080fd5b806301139b68146101e8578063051d1970146101fd5780630f0adca514610232578063222ae78614610252575b600080fd5b6101fb6101f6366004612063565b610672565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb61024d366004612091565b6108b0565b34801561025e57600080fd5b50610267610bd8565b604051908152602001610229565b34801561028157600080fd5b506102676102903660046120c8565b60026020526000908152604090205481565b3480156102ae57600080fd5b5061026760015481565b6101fb6102c63660046120e1565b610c09565b3480156102d757600080fd5b506101fb6102e6366004612164565b610d89565b3480156102f757600080fd5b506101fb610306366004612226565b611029565b34801561031757600080fd5b506101fb610326366004612063565b611170565b34801561033757600080fd5b506101fb610346366004612063565b6112f4565b34801561035757600080fd5b506102676103663660046120c8565b6113a7565b34801561037757600080fd5b5061026761038636600461225f565b6113d9565b34801561039757600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b3480156103e357600080fd5b506101fb6103f2366004612282565b61142b565b34801561040357600080fd5b506007546103bf906001600160a01b031681565b34801561042357600080fd5b506101fb6114be565b34801561043857600080fd5b506102676104473660046120c8565b60036020526000908152604090205481565b34801561046557600080fd5b506101fb610474366004612063565b6116b2565b34801561048557600080fd5b5061026760005481565b34801561049b57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cf57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561050357600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561053757600080fd5b506101fb610546366004612063565b61183d565b34801561055757600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561058b57600080fd5b506101fb611a49565b3480156105a057600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d457600080fd5b506101fb6105e3366004612063565b611c66565b3480156105f457600080fd5b5061060861060336600461225f565b611e1f565b60405161022991906122b5565b34801561062157600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b34801561065557600080fd5b5061026760045481565b6101fb61066d3660046120e1565b611ee6565b61067b816113d9565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122cf565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a0015160028111156107935761079361229f565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816113d9565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f00000000000000000000000000000000000000000000000000000000000000003461230d565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090357610903612320565b040311156109465760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109be5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612336565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612336565b6001600160a01b031614610b1a5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610b2a57508115155b15610b6d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b76816113d9565b60008481526002602052604090205403610bd3578051829003610b9f57600160a0820152610bba565b60c08101516001600160a01b031615610bba57600260a08201525b610bc3816113d9565b6000848152600260205260409020555b505050565b6000610c047f000000000000000000000000000000000000000000000000000000000000000042612353565b905090565b6007546001600160a01b03163314610c2057600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610c905760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610cad5760405162461bcd60e51b81526004016106a7906122cf565b60008281526002602052604090205415610cff5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610d45906113d9565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161082f565b60408510610dcb5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b600084848484604051602001610de49493929190612375565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610e64576000888883818110610e2657610e266123b7565b90506020020135905082811115610e4b57826000528060205260406000209250610e5b565b8060005282602052604060002092505b50600101610e0a565b508060005414610ea75760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f1c5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610f4c90899089906123cd565b6000604051808303816000865af19150503d8060008114610f89576040519150601f19603f3d011682016040523d82523d6000602084013e610f8e565b606091505b5050905080610fdf5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61103b6103863683900383018361225f565b600083815260026020526040902054146110675760405162461bcd60e51b81526004016106a7906122cf565b600261107960c0830160a084016123dd565b600281111561108a5761108a61229f565b146110cb5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061112593505060e0840191505060c08301612282565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611179816113d9565b600083815260026020526040902054146111a55760405162461bcd60e51b81526004016106a7906122cf565b60018160a0015160028111156111bd576111bd61229f565b146111fa5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156112a6576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461130b57600080fd5b611314816113d9565b600083815260026020526040902054146113405760405162461bcd60e51b81526004016106a7906122cf565b63ffffffff42811660608301524316608082015261135d816113d9565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691015b60405180910390a15050565b60006113d37f000000000000000000000000000000000000000000000000000000000000000083612353565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861140e9890979691016123f8565b604051602081830303815290604052805190602001209050919050565b6007546001600160a01b0316331461144257600080fd5b6007546001600160a01b0316331461149c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561151e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115429190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561157f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a39190612476565b50925050506004548111156115ed5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156116af57600654156116615760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161170557611705612320565b040311156117485760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b611751816113d9565b6000838152600260205260409020541461177d5760405162461bcd60e51b81526004016106a7906122cf565b60c08101516001600160a01b0316156117cf5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b60015482111561181757600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611827816113d9565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161189057611890612320565b0403116118d15760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b6118da816113d9565b600083815260026020526040902054146119065760405162461bcd60e51b81526004016106a7906122cf565b60008160a00151600281111561191e5761191e61229f565b1461195d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b03166119e15760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c08101805160009091526119f5826113d9565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611ab05760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b600454600654611ac091906124ac565b4211611b295760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611ba0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc49190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c259190612476565b50925050508181036108ac5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200161139b565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cb957611cb9612320565b040311611cfa5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611d03816113d9565b60008381526002602052604090205414611d2f5760405162461bcd60e51b81526004016106a7906122cf565b60008160a001516002811115611d4757611d4761229f565b14611d865760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611e0b5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60208101805160009091526119f5826113d9565b6000816060015163ffffffff16600003611e3b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7757506003919050565b6000600c836060015163ffffffff16420381611e9557611e95612320565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ed95760019250611ede565b600092505b50505b919050565b611ef08282610c09565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f3783826112f4565b63ffffffff428116606083015243166080820152611f5583826116b2565b600160a0820152610bd38382611170565b6001600160a01b03811681146116af57600080fd5b8035611ee181611f66565b803563ffffffff81168114611ee157600080fd5b803560038110611ee157600080fd5b600060e08284031215611fbb57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fec57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200260208401611f7b565b602082015261201360408401611f86565b604082015261202460608401611f86565b606082015261203560808401611f86565b608082015261204660a08401611f9a565b60a082015261205760c08401611f7b565b60c08201525092915050565b600080610100838503121561207757600080fd5b823591506120888460208501611fa9565b90509250929050565b600080600061012084860312156120a757600080fd5b83359250602084013591506120bf8560408601611fa9565b90509250925092565b6000602082840312156120da57600080fd5b5035919050565b600080604083850312156120f457600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee157600080fd5b60008083601f84011261212d57600080fd5b50813567ffffffffffffffff81111561214557600080fd5b60208301915083602082850101111561215d57600080fd5b9250929050565b6000806000806000806080878903121561217d57600080fd5b863567ffffffffffffffff8082111561219557600080fd5b818901915089601f8301126121a957600080fd5b8135818111156121b857600080fd5b8a60208260051b85010111156121cd57600080fd5b602083019850809750506121e360208a01612103565b95506121f160408a01611f7b565b9450606089013591508082111561220757600080fd5b5061221489828a0161211b565b979a9699509497509295939492505050565b60008082840361010081121561223b57600080fd5b8335925060e0601f198201121561225157600080fd5b506020830190509250929050565b600060e0828403121561227157600080fd5b61227b8383611fa9565b9392505050565b60006020828403121561229457600080fd5b813561227b81611f66565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122c9576122c961229f565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156113d3576113d36122f7565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561234857600080fd5b815161227b81611f66565b60008261237057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123ef57600080fd5b61227b82611f9a565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124505761245061229f565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561248c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b808201808211156113d3576113d36122f756fea2646970667358221220dc7a01b69a5db83d52ee68c35352849e950b5e5dd89fab8bf6b9e3291a0befbd64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101e35760003560e01c806390784ae811610102578063c2114a1611610095578063df19e6ff11610064578063df19e6ff146105e8578063e78cea9214610615578063e813a75514610649578063eedcf2a91461065f57600080fd5b8063c2114a161461054b578063cb9384681461057f578063d0e30db014610594578063da2b7bc4146105c857600080fd5b8063aa22a1c6116100d1578063aa22a1c61461048f578063b044397e146104c3578063b5b7a184146104f7578063b633b9441461052b57600080fd5b806390784ae81461041757806390df63b71461042c578063930f28af146104595780639588eca21461047957600080fd5b80633ce43cfd1161017a578063541adcca11610149578063541adcca1461036b57806369cd250d1461038b5780638a619a71146103d75780638ad3a8f7146103f757600080fd5b80633ce43cfd146102eb5780634788cb381461030b57806349b4299e1461032b5780634a439cfe1461034b57600080fd5b80632639c060116101b65780632639c0601461027557806327ee6bdd146102a257806331d14457146102b857806331ddf743146102cb57600080fd5b806301139b68146101e8578063051d1970146101fd5780630f0adca514610232578063222ae78614610252575b600080fd5b6101fb6101f6366004612063565b610672565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb61024d366004612091565b6108b0565b34801561025e57600080fd5b50610267610bd8565b604051908152602001610229565b34801561028157600080fd5b506102676102903660046120c8565b60026020526000908152604090205481565b3480156102ae57600080fd5b5061026760015481565b6101fb6102c63660046120e1565b610c09565b3480156102d757600080fd5b506101fb6102e6366004612164565b610d89565b3480156102f757600080fd5b506101fb610306366004612226565b611029565b34801561031757600080fd5b506101fb610326366004612063565b611170565b34801561033757600080fd5b506101fb610346366004612063565b6112f4565b34801561035757600080fd5b506102676103663660046120c8565b6113a7565b34801561037757600080fd5b5061026761038636600461225f565b6113d9565b34801561039757600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b3480156103e357600080fd5b506101fb6103f2366004612282565b61142b565b34801561040357600080fd5b506007546103bf906001600160a01b031681565b34801561042357600080fd5b506101fb6114be565b34801561043857600080fd5b506102676104473660046120c8565b60036020526000908152604090205481565b34801561046557600080fd5b506101fb610474366004612063565b6116b2565b34801561048557600080fd5b5061026760005481565b34801561049b57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cf57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561050357600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561053757600080fd5b506101fb610546366004612063565b61183d565b34801561055757600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561058b57600080fd5b506101fb611a49565b3480156105a057600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d457600080fd5b506101fb6105e3366004612063565b611c66565b3480156105f457600080fd5b5061060861060336600461225f565b611e1f565b60405161022991906122b5565b34801561062157600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b34801561065557600080fd5b5061026760045481565b6101fb61066d3660046120e1565b611ee6565b61067b816113d9565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122cf565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a0015160028111156107935761079361229f565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816113d9565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f00000000000000000000000000000000000000000000000000000000000000003461230d565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090357610903612320565b040311156109465760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109be5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612336565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612336565b6001600160a01b031614610b1a5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610b2a57508115155b15610b6d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b76816113d9565b60008481526002602052604090205403610bd3578051829003610b9f57600160a0820152610bba565b60c08101516001600160a01b031615610bba57600260a08201525b610bc3816113d9565b6000848152600260205260409020555b505050565b6000610c047f000000000000000000000000000000000000000000000000000000000000000042612353565b905090565b6007546001600160a01b03163314610c2057600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610c905760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610cad5760405162461bcd60e51b81526004016106a7906122cf565b60008281526002602052604090205415610cff5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610d45906113d9565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161082f565b60408510610dcb5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b600084848484604051602001610de49493929190612375565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610e64576000888883818110610e2657610e266123b7565b90506020020135905082811115610e4b57826000528060205260406000209250610e5b565b8060005282602052604060002092505b50600101610e0a565b508060005414610ea75760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f1c5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610f4c90899089906123cd565b6000604051808303816000865af19150503d8060008114610f89576040519150601f19603f3d011682016040523d82523d6000602084013e610f8e565b606091505b5050905080610fdf5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61103b6103863683900383018361225f565b600083815260026020526040902054146110675760405162461bcd60e51b81526004016106a7906122cf565b600261107960c0830160a084016123dd565b600281111561108a5761108a61229f565b146110cb5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061112593505060e0840191505060c08301612282565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611179816113d9565b600083815260026020526040902054146111a55760405162461bcd60e51b81526004016106a7906122cf565b60018160a0015160028111156111bd576111bd61229f565b146111fa5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156112a6576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461130b57600080fd5b611314816113d9565b600083815260026020526040902054146113405760405162461bcd60e51b81526004016106a7906122cf565b63ffffffff42811660608301524316608082015261135d816113d9565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691015b60405180910390a15050565b60006113d37f000000000000000000000000000000000000000000000000000000000000000083612353565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861140e9890979691016123f8565b604051602081830303815290604052805190602001209050919050565b6007546001600160a01b0316331461144257600080fd5b6007546001600160a01b0316331461149c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561151e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115429190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561157f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a39190612476565b50925050506004548111156115ed5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156116af57600654156116615760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161170557611705612320565b040311156117485760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b611751816113d9565b6000838152600260205260409020541461177d5760405162461bcd60e51b81526004016106a7906122cf565b60c08101516001600160a01b0316156117cf5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b60015482111561181757600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611827816113d9565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161189057611890612320565b0403116118d15760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b6118da816113d9565b600083815260026020526040902054146119065760405162461bcd60e51b81526004016106a7906122cf565b60008160a00151600281111561191e5761191e61229f565b1461195d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b03166119e15760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c08101805160009091526119f5826113d9565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611ab05760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b600454600654611ac091906124ac565b4211611b295760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611ba0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc49190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c259190612476565b50925050508181036108ac5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200161139b565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cb957611cb9612320565b040311611cfa5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611d03816113d9565b60008381526002602052604090205414611d2f5760405162461bcd60e51b81526004016106a7906122cf565b60008160a001516002811115611d4757611d4761229f565b14611d865760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611e0b5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60208101805160009091526119f5826113d9565b6000816060015163ffffffff16600003611e3b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7757506003919050565b6000600c836060015163ffffffff16420381611e9557611e95612320565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ed95760019250611ede565b600092505b50505b919050565b611ef08282610c09565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f3783826112f4565b63ffffffff428116606083015243166080820152611f5583826116b2565b600160a0820152610bd38382611170565b6001600160a01b03811681146116af57600080fd5b8035611ee181611f66565b803563ffffffff81168114611ee157600080fd5b803560038110611ee157600080fd5b600060e08284031215611fbb57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fec57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200260208401611f7b565b602082015261201360408401611f86565b604082015261202460608401611f86565b606082015261203560808401611f86565b608082015261204660a08401611f9a565b60a082015261205760c08401611f7b565b60c08201525092915050565b600080610100838503121561207757600080fd5b823591506120888460208501611fa9565b90509250929050565b600080600061012084860312156120a757600080fd5b83359250602084013591506120bf8560408601611fa9565b90509250925092565b6000602082840312156120da57600080fd5b5035919050565b600080604083850312156120f457600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee157600080fd5b60008083601f84011261212d57600080fd5b50813567ffffffffffffffff81111561214557600080fd5b60208301915083602082850101111561215d57600080fd5b9250929050565b6000806000806000806080878903121561217d57600080fd5b863567ffffffffffffffff8082111561219557600080fd5b818901915089601f8301126121a957600080fd5b8135818111156121b857600080fd5b8a60208260051b85010111156121cd57600080fd5b602083019850809750506121e360208a01612103565b95506121f160408a01611f7b565b9450606089013591508082111561220757600080fd5b5061221489828a0161211b565b979a9699509497509295939492505050565b60008082840361010081121561223b57600080fd5b8335925060e0601f198201121561225157600080fd5b506020830190509250929050565b600060e0828403121561227157600080fd5b61227b8383611fa9565b9392505050565b60006020828403121561229457600080fd5b813561227b81611f66565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122c9576122c961229f565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156113d3576113d36122f7565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561234857600080fd5b815161227b81611f66565b60008261237057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123ef57600080fd5b61227b82611f9a565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124505761245061229f565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561248c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b808201808211156113d3576113d36122f756fea2646970667358221220dc7a01b69a5db83d52ee68c35352849e950b5e5dd89fab8bf6b9e3291a0befbd64736f6c63430008120033", "devdoc": { "details": "Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).", "events": { @@ -1267,7 +1267,7 @@ "storageLayout": { "storage": [ { - "astId": 38, + "astId": 430, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "stateRoot", "offset": 0, @@ -1275,7 +1275,7 @@ "type": "t_bytes32" }, { - "astId": 40, + "astId": 432, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "latestVerifiedEpoch", "offset": 0, @@ -1283,7 +1283,7 @@ "type": "t_uint256" }, { - "astId": 44, + "astId": 436, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "claimHashes", "offset": 0, @@ -1291,7 +1291,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 48, + "astId": 440, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "relayed", "offset": 0, @@ -1299,7 +1299,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 50, + "astId": 442, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "sequencerDelayLimit", "offset": 0, @@ -1307,15 +1307,15 @@ "type": "t_uint256" }, { - "astId": 53, + "astId": 445, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "5", - "type": "t_struct(SequencerDelayLimitDecreaseRequest)58_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)450_storage" }, { - "astId": 3188, + "astId": 5461, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "devnetOperator", "offset": 0, @@ -1341,12 +1341,12 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_struct(SequencerDelayLimitDecreaseRequest)58_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)450_storage": { "encoding": "inplace", "label": "struct VeaOutboxArbToEth.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 55, + "astId": 447, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "requestedsequencerDelayLimit", "offset": 0, @@ -1354,7 +1354,7 @@ "type": "t_uint256" }, { - "astId": 57, + "astId": 449, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json b/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json index 7372dfd0..dfb509be 100644 --- a/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json +++ b/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x64277c8c817b45B0e3CE45AbC222f16406920B9a", + "address": "0x6dfc228652A6eE943eA37c269E2602BF2e198Ae9", "abi": [ { "inputs": [ @@ -981,32 +981,32 @@ "type": "function" } ], - "transactionHash": "0xc481c4f04ce3368c62c1a100e04597c2828a8bf8da8d8bd703c3c3f354dffb8e", + "transactionHash": "0xe81aa735dbd529a50583f978a070ab5de4ac1b0ff9236feb3c03f2861f9f921b", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x64277c8c817b45B0e3CE45AbC222f16406920B9a", + "contractAddress": "0x6dfc228652A6eE943eA37c269E2602BF2e198Ae9", "transactionIndex": 23, "gasUsed": "2236924", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000010000000000000200000000000000000000000000000000000000000800000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7bcbe928b1ccd694eaf4c0357ddcfc6c7d6f4fbe4766371a68da0cda3afcfaf8", - "transactionHash": "0xc481c4f04ce3368c62c1a100e04597c2828a8bf8da8d8bd703c3c3f354dffb8e", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000", + "blockHash": "0x073a5a3464381dcf3dd71c67d61d70b197cd23e4d4a0a4570df996da06d1e918", + "transactionHash": "0xe81aa735dbd529a50583f978a070ab5de4ac1b0ff9236feb3c03f2861f9f921b", "logs": [ { "transactionIndex": 23, - "blockNumber": 9186809, - "transactionHash": "0xc481c4f04ce3368c62c1a100e04597c2828a8bf8da8d8bd703c3c3f354dffb8e", - "address": "0x64277c8c817b45B0e3CE45AbC222f16406920B9a", + "blockNumber": 9186881, + "transactionHash": "0xe81aa735dbd529a50583f978a070ab5de4ac1b0ff9236feb3c03f2861f9f921b", + "address": "0x6dfc228652A6eE943eA37c269E2602BF2e198Ae9", "topics": [ "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 40, - "blockHash": "0x7bcbe928b1ccd694eaf4c0357ddcfc6c7d6f4fbe4766371a68da0cda3afcfaf8" + "logIndex": 30, + "blockHash": "0x073a5a3464381dcf3dd71c67d61d70b197cd23e4d4a0a4570df996da06d1e918" } ], - "blockNumber": 9186809, - "cumulativeGasUsed": "4004648", + "blockNumber": 9186881, + "cumulativeGasUsed": "4556399", "status": 1, "byzantium": true }, @@ -1015,15 +1015,15 @@ 3600, 10800, 1000000, - "0xa452Eecf27B545E4115E1cD3cC903aC361B1eE22", + "0xb7d2C76641B21718cC8A0b595be438c863A6e031", "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", 1000000 ], - "numDeployments": 6, - "solcInputHash": "cf76e8aad7d9ce9f21e3b6b1180c6852", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEth\":\"The address of the inbox contract on Arbitrum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":\"VeaOutboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updatesequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x36147b323b9b28537749fc38c75ad7d3e1b3fa7f180aecb3ab90d35c6718b9e3\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\",\"keccak256\":\"0x6c7e61ecfda97488a37b4d720022fd3708d1eac86eb7360f060664ab910ea46e\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002b2e38038062002b2e8339810160408190526200003591620002ce565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190526200006f620000ce565b6200007c6002886200034c565b60e08190526200008e8860026200036f565b6200009a91906200038f565b6101005261012051600190620000b190426200034c565b620000bd91906200038f565b600155506200040195505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000111573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001379190620003a5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200019b9190620003ca565b5092505050600454811115620001e65760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ae5760065415620002605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002c957600080fd5b919050565b600080600080600080600060e0888a031215620002ea57600080fd5b875196506020880151955060408801519450606088015193506200031160808901620002b1565b92506200032160a08901620002b1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200036a57634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000389576200038962000336565b92915050565b8181038181111562000389576200038962000336565b600060208284031215620003b857600080fd5b620003c382620002b1565b9392505050565b60008060008060808587031215620003e157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516125f16200053d6000396000818161044001526120250152600081816104740152818161083e015281816117c0015281816119b40152611de40152600081816104fc0152611fb90152600081816104a80152818161086201528181610b6b01528181610c0701528181610c8f015281816113930152818161154d015281816117e4015281816119d80152611e08015260006111aa01526000818161115701526112bc0152600081816105450152818161063e015281816107c5015281816107f201528181610b970152818161131f01528181611b1e01528181611b850152611f4f01526000818161037c015261094c0152600081816105c6015281816108dd01528181610976015281816115ce0152611cca01526125f16000f3fe6080604052600436106101c25760003560e01c806390784ae8116100f7578063b633b94411610095578063da2b7bc411610064578063da2b7bc414610567578063df19e6ff14610587578063e78cea92146105b4578063e813a755146105e857600080fd5b8063b633b944146104ca578063c2114a16146104ea578063cb9384681461051e578063d0e30db01461053357600080fd5b80639588eca2116100d15780639588eca214610418578063aa22a1c61461042e578063b044397e14610462578063b5b7a1841461049657600080fd5b806390784ae8146103b657806390df63b7146103cb578063930f28af146103f857600080fd5b806331ddf7431161016457806349b4299e1161013e57806349b4299e1461030a5780634a439cfe1461032a578063541adcca1461034a57806369cd250d1461036a57600080fd5b806331ddf743146102aa5780633ce43cfd146102ca5780634788cb38146102ea57600080fd5b8063222ae786116101a0578063222ae786146102315780632639c0601461025457806327ee6bdd1461028157806331d144571461029757600080fd5b806301139b68146101c7578063051d1970146101dc5780630f0adca514610211575b600080fd5b6101da6101d536600461215f565b6105fe565b005b3480156101e857600080fd5b506005546006546101f7919082565b604080519283526020830191909152015b60405180910390f35b34801561021d57600080fd5b506101da61022c36600461218d565b61083c565b34801561023d57600080fd5b50610246610b64565b604051908152602001610208565b34801561026057600080fd5b5061024661026f3660046121c4565b60026020526000908152604090205481565b34801561028d57600080fd5b5061024660015481565b6101da6102a53660046121dd565b610b95565b3480156102b657600080fd5b506101da6102c5366004612260565b610e00565b3480156102d657600080fd5b506101da6102e5366004612322565b6110a0565b3480156102f657600080fd5b506101da610305366004612322565b6111e7565b34801561031657600080fd5b506101da61032536600461215f565b61135c565b34801561033657600080fd5b506102466103453660046121c4565b611546565b34801561035657600080fd5b5061024661036536600461235b565b611578565b34801561037657600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610208565b3480156103c257600080fd5b506101da6115ca565b3480156103d757600080fd5b506102466103e63660046121c4565b60036020526000908152604090205481565b34801561040457600080fd5b506101da61041336600461215f565b6117be565b34801561042457600080fd5b5061024660005481565b34801561043a57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561046e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a257600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d657600080fd5b506101da6104e536600461215f565b6119b2565b3480156104f657600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561052a57600080fd5b506101da611bbe565b34801561053f57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561057357600080fd5b506101da61058236600461215f565b611de2565b34801561059357600080fd5b506105a76105a236600461235b565b611f9b565b6040516102089190612394565b3480156105c057600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f457600080fd5b5061024660045481565b61060781611578565b6000838152600260205260409020541461063c5760405162461bcd60e51b8152600401610633906123ae565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f61237e565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b81611578565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f0000000000000000000000000000000000000000000000000000000000000000346123ec565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161088f5761088f6123ff565b040311156108d25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461094a5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f69190612415565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a579190612415565b6001600160a01b031614610aa65760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610ab657508115155b15610af957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b0281611578565b60008481526002602052604090205403610b5f578051829003610b2b57600160a0820152610b46565b60c08101516001600160a01b031615610b4657600260a08201525b610b4f81611578565b6000848152600260205260409020555b505050565b6000610b907f000000000000000000000000000000000000000000000000000000000000000042612432565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c055760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000004281610c3457610c346123ff565b048210610c835760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b600454421115610d07577f0000000000000000000000000000000000000000000000000000000000000000600454420381610cc057610cc06123ff565b04826001011015610d075760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610633565b80610d245760405162461bcd60e51b8152600401610633906123ae565b60008281526002602052604090205415610d765760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbc90611578565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107bb565b60408510610e425760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b600084848484604051602001610e5b9493929190612454565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610edb576000888883818110610e9d57610e9d612496565b90506020020135905082811115610ec257826000528060205260406000209250610ed2565b8060005282602052604060002092505b50600101610e81565b508060005414610f1e5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f935760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc390899089906124ac565b6000604051808303816000865af19150503d8060008114611000576040519150601f19603f3d011682016040523d82523d6000602084013e611005565b606091505b50509050806110565760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b26103653683900383018361235b565b600083815260026020526040902054146110de5760405162461bcd60e51b8152600401610633906123ae565b60026110f060c0830160a084016124bc565b60028111156111015761110161237e565b146111425760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060e0840191505060c083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f96103653683900383018361235b565b600083815260026020526040902054146112255760405162461bcd60e51b8152600401610633906123ae565b600161123760c0830160a084016124bc565b60028111156112485761124861237e565b146112855760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b60008281526002602052604081208190556112a660e0830160c084016124d7565b6001600160a01b031614611301576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060408401915050602083016124d7565b61131160408201602083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61136581611578565b600083815260026020526040902054146113915760405162461bcd60e51b8152600401610633906123ae565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166113ca91906124f4565b6113d491906124f4565b4210156114385760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b600061144382611f9b565b905060028160038111156114595761145961237e565b1480611476575060008160038111156114745761147461237e565b145b6114df5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526114fc82611578565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115727f000000000000000000000000000000000000000000000000000000000000000083612432565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986115ad989097969101612507565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561162a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164e9190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561168b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116af9190612585565b50925050506004548111156116f95760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156117bb576006541561176d5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611811576118116123ff565b040311156118545760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b61185d81611578565b600083815260026020526040902054146118895760405162461bcd60e51b8152600401610633906123ae565b60c08101516001600160a01b0316156118db5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b60016118e682611f9b565b60038111156118f7576118f761237e565b146119445760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b60015482111561198c57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261199c81611578565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a0557611a056123ff565b040311611a465760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611a4f81611578565b60008381526002602052604090205414611a7b5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611a9357611a9361237e565b14611ad25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611b565760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b6a82611578565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611c255760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b600454600654611c3591906124f4565b4211611c9e5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d399190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611d76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9a9190612585565b50925050508181036108385760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611e3557611e356123ff565b040311611e765760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611e7f81611578565b60008381526002602052604090205414611eab5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ec357611ec361237e565b14611f025760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611f875760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b6a82611578565b6000816060015163ffffffff16600003611fb757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611ff357506003919050565b6000600c836060015163ffffffff16420381612011576120116123ff565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612055576001925061205a565b600092505b50505b919050565b6001600160a01b03811681146117bb57600080fd5b803561205d81612062565b803563ffffffff8116811461205d57600080fd5b80356003811061205d57600080fd5b600060e082840312156120b757600080fd5b60405160e0810181811067ffffffffffffffff821117156120e857634e487b7160e01b600052604160045260246000fd5b604052823581529050806120fe60208401612077565b602082015261210f60408401612082565b604082015261212060608401612082565b606082015261213160808401612082565b608082015261214260a08401612096565b60a082015261215360c08401612077565b60c08201525092915050565b600080610100838503121561217357600080fd5b8235915061218484602085016120a5565b90509250929050565b600080600061012084860312156121a357600080fd5b83359250602084013591506121bb85604086016120a5565b90509250925092565b6000602082840312156121d657600080fd5b5035919050565b600080604083850312156121f057600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461205d57600080fd5b60008083601f84011261222957600080fd5b50813567ffffffffffffffff81111561224157600080fd5b60208301915083602082850101111561225957600080fd5b9250929050565b6000806000806000806080878903121561227957600080fd5b863567ffffffffffffffff8082111561229157600080fd5b818901915089601f8301126122a557600080fd5b8135818111156122b457600080fd5b8a60208260051b85010111156122c957600080fd5b602083019850809750506122df60208a016121ff565b95506122ed60408a01612077565b9450606089013591508082111561230357600080fd5b5061231089828a01612217565b979a9699509497509295939492505050565b60008082840361010081121561233757600080fd5b8335925060e0601f198201121561234d57600080fd5b506020830190509250929050565b600060e0828403121561236d57600080fd5b61237783836120a5565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123a8576123a861237e565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611572576115726123d6565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561242757600080fd5b815161237781612062565b60008261244f57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156124ce57600080fd5b61237782612096565b6000602082840312156124e957600080fd5b813561237781612062565b80820180821115611572576115726123d6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061255f5761255f61237e565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561259b57600080fd5b50508251602084015160408501516060909501519196909550909250905056fea264697066735822122071aedac7c8889d76113727eb2311f8f03036054a400bcec3b8bf230cbe983e0064736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101c25760003560e01c806390784ae8116100f7578063b633b94411610095578063da2b7bc411610064578063da2b7bc414610567578063df19e6ff14610587578063e78cea92146105b4578063e813a755146105e857600080fd5b8063b633b944146104ca578063c2114a16146104ea578063cb9384681461051e578063d0e30db01461053357600080fd5b80639588eca2116100d15780639588eca214610418578063aa22a1c61461042e578063b044397e14610462578063b5b7a1841461049657600080fd5b806390784ae8146103b657806390df63b7146103cb578063930f28af146103f857600080fd5b806331ddf7431161016457806349b4299e1161013e57806349b4299e1461030a5780634a439cfe1461032a578063541adcca1461034a57806369cd250d1461036a57600080fd5b806331ddf743146102aa5780633ce43cfd146102ca5780634788cb38146102ea57600080fd5b8063222ae786116101a0578063222ae786146102315780632639c0601461025457806327ee6bdd1461028157806331d144571461029757600080fd5b806301139b68146101c7578063051d1970146101dc5780630f0adca514610211575b600080fd5b6101da6101d536600461215f565b6105fe565b005b3480156101e857600080fd5b506005546006546101f7919082565b604080519283526020830191909152015b60405180910390f35b34801561021d57600080fd5b506101da61022c36600461218d565b61083c565b34801561023d57600080fd5b50610246610b64565b604051908152602001610208565b34801561026057600080fd5b5061024661026f3660046121c4565b60026020526000908152604090205481565b34801561028d57600080fd5b5061024660015481565b6101da6102a53660046121dd565b610b95565b3480156102b657600080fd5b506101da6102c5366004612260565b610e00565b3480156102d657600080fd5b506101da6102e5366004612322565b6110a0565b3480156102f657600080fd5b506101da610305366004612322565b6111e7565b34801561031657600080fd5b506101da61032536600461215f565b61135c565b34801561033657600080fd5b506102466103453660046121c4565b611546565b34801561035657600080fd5b5061024661036536600461235b565b611578565b34801561037657600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610208565b3480156103c257600080fd5b506101da6115ca565b3480156103d757600080fd5b506102466103e63660046121c4565b60036020526000908152604090205481565b34801561040457600080fd5b506101da61041336600461215f565b6117be565b34801561042457600080fd5b5061024660005481565b34801561043a57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561046e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a257600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d657600080fd5b506101da6104e536600461215f565b6119b2565b3480156104f657600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561052a57600080fd5b506101da611bbe565b34801561053f57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561057357600080fd5b506101da61058236600461215f565b611de2565b34801561059357600080fd5b506105a76105a236600461235b565b611f9b565b6040516102089190612394565b3480156105c057600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f457600080fd5b5061024660045481565b61060781611578565b6000838152600260205260409020541461063c5760405162461bcd60e51b8152600401610633906123ae565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f61237e565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b81611578565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f0000000000000000000000000000000000000000000000000000000000000000346123ec565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161088f5761088f6123ff565b040311156108d25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461094a5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f69190612415565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a579190612415565b6001600160a01b031614610aa65760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610ab657508115155b15610af957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b0281611578565b60008481526002602052604090205403610b5f578051829003610b2b57600160a0820152610b46565b60c08101516001600160a01b031615610b4657600260a08201525b610b4f81611578565b6000848152600260205260409020555b505050565b6000610b907f000000000000000000000000000000000000000000000000000000000000000042612432565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c055760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000004281610c3457610c346123ff565b048210610c835760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b600454421115610d07577f0000000000000000000000000000000000000000000000000000000000000000600454420381610cc057610cc06123ff565b04826001011015610d075760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610633565b80610d245760405162461bcd60e51b8152600401610633906123ae565b60008281526002602052604090205415610d765760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbc90611578565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107bb565b60408510610e425760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b600084848484604051602001610e5b9493929190612454565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610edb576000888883818110610e9d57610e9d612496565b90506020020135905082811115610ec257826000528060205260406000209250610ed2565b8060005282602052604060002092505b50600101610e81565b508060005414610f1e5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f935760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc390899089906124ac565b6000604051808303816000865af19150503d8060008114611000576040519150601f19603f3d011682016040523d82523d6000602084013e611005565b606091505b50509050806110565760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b26103653683900383018361235b565b600083815260026020526040902054146110de5760405162461bcd60e51b8152600401610633906123ae565b60026110f060c0830160a084016124bc565b60028111156111015761110161237e565b146111425760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060e0840191505060c083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f96103653683900383018361235b565b600083815260026020526040902054146112255760405162461bcd60e51b8152600401610633906123ae565b600161123760c0830160a084016124bc565b60028111156112485761124861237e565b146112855760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b60008281526002602052604081208190556112a660e0830160c084016124d7565b6001600160a01b031614611301576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060408401915050602083016124d7565b61131160408201602083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61136581611578565b600083815260026020526040902054146113915760405162461bcd60e51b8152600401610633906123ae565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166113ca91906124f4565b6113d491906124f4565b4210156114385760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b600061144382611f9b565b905060028160038111156114595761145961237e565b1480611476575060008160038111156114745761147461237e565b145b6114df5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526114fc82611578565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115727f000000000000000000000000000000000000000000000000000000000000000083612432565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986115ad989097969101612507565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561162a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164e9190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561168b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116af9190612585565b50925050506004548111156116f95760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156117bb576006541561176d5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611811576118116123ff565b040311156118545760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b61185d81611578565b600083815260026020526040902054146118895760405162461bcd60e51b8152600401610633906123ae565b60c08101516001600160a01b0316156118db5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b60016118e682611f9b565b60038111156118f7576118f761237e565b146119445760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b60015482111561198c57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261199c81611578565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a0557611a056123ff565b040311611a465760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611a4f81611578565b60008381526002602052604090205414611a7b5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611a9357611a9361237e565b14611ad25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611b565760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b6a82611578565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611c255760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b600454600654611c3591906124f4565b4211611c9e5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d399190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611d76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9a9190612585565b50925050508181036108385760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611e3557611e356123ff565b040311611e765760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611e7f81611578565b60008381526002602052604090205414611eab5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ec357611ec361237e565b14611f025760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611f875760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b6a82611578565b6000816060015163ffffffff16600003611fb757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611ff357506003919050565b6000600c836060015163ffffffff16420381612011576120116123ff565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612055576001925061205a565b600092505b50505b919050565b6001600160a01b03811681146117bb57600080fd5b803561205d81612062565b803563ffffffff8116811461205d57600080fd5b80356003811061205d57600080fd5b600060e082840312156120b757600080fd5b60405160e0810181811067ffffffffffffffff821117156120e857634e487b7160e01b600052604160045260246000fd5b604052823581529050806120fe60208401612077565b602082015261210f60408401612082565b604082015261212060608401612082565b606082015261213160808401612082565b608082015261214260a08401612096565b60a082015261215360c08401612077565b60c08201525092915050565b600080610100838503121561217357600080fd5b8235915061218484602085016120a5565b90509250929050565b600080600061012084860312156121a357600080fd5b83359250602084013591506121bb85604086016120a5565b90509250925092565b6000602082840312156121d657600080fd5b5035919050565b600080604083850312156121f057600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461205d57600080fd5b60008083601f84011261222957600080fd5b50813567ffffffffffffffff81111561224157600080fd5b60208301915083602082850101111561225957600080fd5b9250929050565b6000806000806000806080878903121561227957600080fd5b863567ffffffffffffffff8082111561229157600080fd5b818901915089601f8301126122a557600080fd5b8135818111156122b457600080fd5b8a60208260051b85010111156122c957600080fd5b602083019850809750506122df60208a016121ff565b95506122ed60408a01612077565b9450606089013591508082111561230357600080fd5b5061231089828a01612217565b979a9699509497509295939492505050565b60008082840361010081121561233757600080fd5b8335925060e0601f198201121561234d57600080fd5b506020830190509250929050565b600060e0828403121561236d57600080fd5b61237783836120a5565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123a8576123a861237e565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611572576115726123d6565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561242757600080fd5b815161237781612062565b60008261244f57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156124ce57600080fd5b61237782612096565b6000602082840312156124e957600080fd5b813561237781612062565b80820180821115611572576115726123d6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061255f5761255f61237e565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561259b57600080fd5b50508251602084015160408501516060909501519196909550909250905056fea264697066735822122071aedac7c8889d76113727eb2311f8f03036054a400bcec3b8bf230cbe983e0064736f6c63430008120033", + "numDeployments": 7, + "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEth\":\"The address of the inbox contract on Arbitrum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":\"VeaOutboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updatesequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x36147b323b9b28537749fc38c75ad7d3e1b3fa7f180aecb3ab90d35c6718b9e3\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002b2e38038062002b2e8339810160408190526200003591620002ce565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190526200006f620000ce565b6200007c6002886200034c565b60e08190526200008e8860026200036f565b6200009a91906200038f565b6101005261012051600190620000b190426200034c565b620000bd91906200038f565b600155506200040195505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000111573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001379190620003a5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200019b9190620003ca565b5092505050600454811115620001e65760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ae5760065415620002605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002c957600080fd5b919050565b600080600080600080600060e0888a031215620002ea57600080fd5b875196506020880151955060408801519450606088015193506200031160808901620002b1565b92506200032160a08901620002b1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200036a57634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000389576200038962000336565b92915050565b8181038181111562000389576200038962000336565b600060208284031215620003b857600080fd5b620003c382620002b1565b9392505050565b60008060008060808587031215620003e157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516125f16200053d6000396000818161044001526120250152600081816104740152818161083e015281816117c0015281816119b40152611de40152600081816104fc0152611fb90152600081816104a80152818161086201528181610b6b01528181610c0701528181610c8f015281816113930152818161154d015281816117e4015281816119d80152611e08015260006111aa01526000818161115701526112bc0152600081816105450152818161063e015281816107c5015281816107f201528181610b970152818161131f01528181611b1e01528181611b850152611f4f01526000818161037c015261094c0152600081816105c6015281816108dd01528181610976015281816115ce0152611cca01526125f16000f3fe6080604052600436106101c25760003560e01c806390784ae8116100f7578063b633b94411610095578063da2b7bc411610064578063da2b7bc414610567578063df19e6ff14610587578063e78cea92146105b4578063e813a755146105e857600080fd5b8063b633b944146104ca578063c2114a16146104ea578063cb9384681461051e578063d0e30db01461053357600080fd5b80639588eca2116100d15780639588eca214610418578063aa22a1c61461042e578063b044397e14610462578063b5b7a1841461049657600080fd5b806390784ae8146103b657806390df63b7146103cb578063930f28af146103f857600080fd5b806331ddf7431161016457806349b4299e1161013e57806349b4299e1461030a5780634a439cfe1461032a578063541adcca1461034a57806369cd250d1461036a57600080fd5b806331ddf743146102aa5780633ce43cfd146102ca5780634788cb38146102ea57600080fd5b8063222ae786116101a0578063222ae786146102315780632639c0601461025457806327ee6bdd1461028157806331d144571461029757600080fd5b806301139b68146101c7578063051d1970146101dc5780630f0adca514610211575b600080fd5b6101da6101d536600461215f565b6105fe565b005b3480156101e857600080fd5b506005546006546101f7919082565b604080519283526020830191909152015b60405180910390f35b34801561021d57600080fd5b506101da61022c36600461218d565b61083c565b34801561023d57600080fd5b50610246610b64565b604051908152602001610208565b34801561026057600080fd5b5061024661026f3660046121c4565b60026020526000908152604090205481565b34801561028d57600080fd5b5061024660015481565b6101da6102a53660046121dd565b610b95565b3480156102b657600080fd5b506101da6102c5366004612260565b610e00565b3480156102d657600080fd5b506101da6102e5366004612322565b6110a0565b3480156102f657600080fd5b506101da610305366004612322565b6111e7565b34801561031657600080fd5b506101da61032536600461215f565b61135c565b34801561033657600080fd5b506102466103453660046121c4565b611546565b34801561035657600080fd5b5061024661036536600461235b565b611578565b34801561037657600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610208565b3480156103c257600080fd5b506101da6115ca565b3480156103d757600080fd5b506102466103e63660046121c4565b60036020526000908152604090205481565b34801561040457600080fd5b506101da61041336600461215f565b6117be565b34801561042457600080fd5b5061024660005481565b34801561043a57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561046e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a257600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d657600080fd5b506101da6104e536600461215f565b6119b2565b3480156104f657600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561052a57600080fd5b506101da611bbe565b34801561053f57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561057357600080fd5b506101da61058236600461215f565b611de2565b34801561059357600080fd5b506105a76105a236600461235b565b611f9b565b6040516102089190612394565b3480156105c057600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f457600080fd5b5061024660045481565b61060781611578565b6000838152600260205260409020541461063c5760405162461bcd60e51b8152600401610633906123ae565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f61237e565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b81611578565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f0000000000000000000000000000000000000000000000000000000000000000346123ec565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161088f5761088f6123ff565b040311156108d25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461094a5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f69190612415565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a579190612415565b6001600160a01b031614610aa65760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610ab657508115155b15610af957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b0281611578565b60008481526002602052604090205403610b5f578051829003610b2b57600160a0820152610b46565b60c08101516001600160a01b031615610b4657600260a08201525b610b4f81611578565b6000848152600260205260409020555b505050565b6000610b907f000000000000000000000000000000000000000000000000000000000000000042612432565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c055760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000004281610c3457610c346123ff565b048210610c835760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b600454421115610d07577f0000000000000000000000000000000000000000000000000000000000000000600454420381610cc057610cc06123ff565b04826001011015610d075760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610633565b80610d245760405162461bcd60e51b8152600401610633906123ae565b60008281526002602052604090205415610d765760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbc90611578565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107bb565b60408510610e425760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b600084848484604051602001610e5b9493929190612454565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610edb576000888883818110610e9d57610e9d612496565b90506020020135905082811115610ec257826000528060205260406000209250610ed2565b8060005282602052604060002092505b50600101610e81565b508060005414610f1e5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f935760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc390899089906124ac565b6000604051808303816000865af19150503d8060008114611000576040519150601f19603f3d011682016040523d82523d6000602084013e611005565b606091505b50509050806110565760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b26103653683900383018361235b565b600083815260026020526040902054146110de5760405162461bcd60e51b8152600401610633906123ae565b60026110f060c0830160a084016124bc565b60028111156111015761110161237e565b146111425760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060e0840191505060c083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f96103653683900383018361235b565b600083815260026020526040902054146112255760405162461bcd60e51b8152600401610633906123ae565b600161123760c0830160a084016124bc565b60028111156112485761124861237e565b146112855760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b60008281526002602052604081208190556112a660e0830160c084016124d7565b6001600160a01b031614611301576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060408401915050602083016124d7565b61131160408201602083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61136581611578565b600083815260026020526040902054146113915760405162461bcd60e51b8152600401610633906123ae565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166113ca91906124f4565b6113d491906124f4565b4210156114385760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b600061144382611f9b565b905060028160038111156114595761145961237e565b1480611476575060008160038111156114745761147461237e565b145b6114df5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526114fc82611578565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115727f000000000000000000000000000000000000000000000000000000000000000083612432565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986115ad989097969101612507565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561162a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164e9190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561168b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116af9190612585565b50925050506004548111156116f95760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156117bb576006541561176d5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611811576118116123ff565b040311156118545760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b61185d81611578565b600083815260026020526040902054146118895760405162461bcd60e51b8152600401610633906123ae565b60c08101516001600160a01b0316156118db5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b60016118e682611f9b565b60038111156118f7576118f761237e565b146119445760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b60015482111561198c57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261199c81611578565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a0557611a056123ff565b040311611a465760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611a4f81611578565b60008381526002602052604090205414611a7b5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611a9357611a9361237e565b14611ad25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611b565760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b6a82611578565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611c255760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b600454600654611c3591906124f4565b4211611c9e5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d399190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611d76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9a9190612585565b50925050508181036108385760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611e3557611e356123ff565b040311611e765760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611e7f81611578565b60008381526002602052604090205414611eab5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ec357611ec361237e565b14611f025760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611f875760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b6a82611578565b6000816060015163ffffffff16600003611fb757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611ff357506003919050565b6000600c836060015163ffffffff16420381612011576120116123ff565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612055576001925061205a565b600092505b50505b919050565b6001600160a01b03811681146117bb57600080fd5b803561205d81612062565b803563ffffffff8116811461205d57600080fd5b80356003811061205d57600080fd5b600060e082840312156120b757600080fd5b60405160e0810181811067ffffffffffffffff821117156120e857634e487b7160e01b600052604160045260246000fd5b604052823581529050806120fe60208401612077565b602082015261210f60408401612082565b604082015261212060608401612082565b606082015261213160808401612082565b608082015261214260a08401612096565b60a082015261215360c08401612077565b60c08201525092915050565b600080610100838503121561217357600080fd5b8235915061218484602085016120a5565b90509250929050565b600080600061012084860312156121a357600080fd5b83359250602084013591506121bb85604086016120a5565b90509250925092565b6000602082840312156121d657600080fd5b5035919050565b600080604083850312156121f057600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461205d57600080fd5b60008083601f84011261222957600080fd5b50813567ffffffffffffffff81111561224157600080fd5b60208301915083602082850101111561225957600080fd5b9250929050565b6000806000806000806080878903121561227957600080fd5b863567ffffffffffffffff8082111561229157600080fd5b818901915089601f8301126122a557600080fd5b8135818111156122b457600080fd5b8a60208260051b85010111156122c957600080fd5b602083019850809750506122df60208a016121ff565b95506122ed60408a01612077565b9450606089013591508082111561230357600080fd5b5061231089828a01612217565b979a9699509497509295939492505050565b60008082840361010081121561233757600080fd5b8335925060e0601f198201121561234d57600080fd5b506020830190509250929050565b600060e0828403121561236d57600080fd5b61237783836120a5565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123a8576123a861237e565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611572576115726123d6565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561242757600080fd5b815161237781612062565b60008261244f57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156124ce57600080fd5b61237782612096565b6000602082840312156124e957600080fd5b813561237781612062565b80820180821115611572576115726123d6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061255f5761255f61237e565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561259b57600080fd5b50508251602084015160408501516060909501519196909550909250905056fea26469706673582212204314ec468d95ad31fe7eafafdb876c007cf6b72384de11516dd93c0e0c209c5264736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101c25760003560e01c806390784ae8116100f7578063b633b94411610095578063da2b7bc411610064578063da2b7bc414610567578063df19e6ff14610587578063e78cea92146105b4578063e813a755146105e857600080fd5b8063b633b944146104ca578063c2114a16146104ea578063cb9384681461051e578063d0e30db01461053357600080fd5b80639588eca2116100d15780639588eca214610418578063aa22a1c61461042e578063b044397e14610462578063b5b7a1841461049657600080fd5b806390784ae8146103b657806390df63b7146103cb578063930f28af146103f857600080fd5b806331ddf7431161016457806349b4299e1161013e57806349b4299e1461030a5780634a439cfe1461032a578063541adcca1461034a57806369cd250d1461036a57600080fd5b806331ddf743146102aa5780633ce43cfd146102ca5780634788cb38146102ea57600080fd5b8063222ae786116101a0578063222ae786146102315780632639c0601461025457806327ee6bdd1461028157806331d144571461029757600080fd5b806301139b68146101c7578063051d1970146101dc5780630f0adca514610211575b600080fd5b6101da6101d536600461215f565b6105fe565b005b3480156101e857600080fd5b506005546006546101f7919082565b604080519283526020830191909152015b60405180910390f35b34801561021d57600080fd5b506101da61022c36600461218d565b61083c565b34801561023d57600080fd5b50610246610b64565b604051908152602001610208565b34801561026057600080fd5b5061024661026f3660046121c4565b60026020526000908152604090205481565b34801561028d57600080fd5b5061024660015481565b6101da6102a53660046121dd565b610b95565b3480156102b657600080fd5b506101da6102c5366004612260565b610e00565b3480156102d657600080fd5b506101da6102e5366004612322565b6110a0565b3480156102f657600080fd5b506101da610305366004612322565b6111e7565b34801561031657600080fd5b506101da61032536600461215f565b61135c565b34801561033657600080fd5b506102466103453660046121c4565b611546565b34801561035657600080fd5b5061024661036536600461235b565b611578565b34801561037657600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610208565b3480156103c257600080fd5b506101da6115ca565b3480156103d757600080fd5b506102466103e63660046121c4565b60036020526000908152604090205481565b34801561040457600080fd5b506101da61041336600461215f565b6117be565b34801561042457600080fd5b5061024660005481565b34801561043a57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561046e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a257600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d657600080fd5b506101da6104e536600461215f565b6119b2565b3480156104f657600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561052a57600080fd5b506101da611bbe565b34801561053f57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561057357600080fd5b506101da61058236600461215f565b611de2565b34801561059357600080fd5b506105a76105a236600461235b565b611f9b565b6040516102089190612394565b3480156105c057600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f457600080fd5b5061024660045481565b61060781611578565b6000838152600260205260409020541461063c5760405162461bcd60e51b8152600401610633906123ae565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f61237e565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b81611578565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f0000000000000000000000000000000000000000000000000000000000000000346123ec565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161088f5761088f6123ff565b040311156108d25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461094a5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f69190612415565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a579190612415565b6001600160a01b031614610aa65760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610ab657508115155b15610af957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b0281611578565b60008481526002602052604090205403610b5f578051829003610b2b57600160a0820152610b46565b60c08101516001600160a01b031615610b4657600260a08201525b610b4f81611578565b6000848152600260205260409020555b505050565b6000610b907f000000000000000000000000000000000000000000000000000000000000000042612432565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c055760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000004281610c3457610c346123ff565b048210610c835760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b600454421115610d07577f0000000000000000000000000000000000000000000000000000000000000000600454420381610cc057610cc06123ff565b04826001011015610d075760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610633565b80610d245760405162461bcd60e51b8152600401610633906123ae565b60008281526002602052604090205415610d765760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbc90611578565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107bb565b60408510610e425760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b600084848484604051602001610e5b9493929190612454565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610edb576000888883818110610e9d57610e9d612496565b90506020020135905082811115610ec257826000528060205260406000209250610ed2565b8060005282602052604060002092505b50600101610e81565b508060005414610f1e5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f935760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc390899089906124ac565b6000604051808303816000865af19150503d8060008114611000576040519150601f19603f3d011682016040523d82523d6000602084013e611005565b606091505b50509050806110565760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b26103653683900383018361235b565b600083815260026020526040902054146110de5760405162461bcd60e51b8152600401610633906123ae565b60026110f060c0830160a084016124bc565b60028111156111015761110161237e565b146111425760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060e0840191505060c083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f96103653683900383018361235b565b600083815260026020526040902054146112255760405162461bcd60e51b8152600401610633906123ae565b600161123760c0830160a084016124bc565b60028111156112485761124861237e565b146112855760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b60008281526002602052604081208190556112a660e0830160c084016124d7565b6001600160a01b031614611301576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060408401915050602083016124d7565b61131160408201602083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61136581611578565b600083815260026020526040902054146113915760405162461bcd60e51b8152600401610633906123ae565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166113ca91906124f4565b6113d491906124f4565b4210156114385760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b600061144382611f9b565b905060028160038111156114595761145961237e565b1480611476575060008160038111156114745761147461237e565b145b6114df5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526114fc82611578565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115727f000000000000000000000000000000000000000000000000000000000000000083612432565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986115ad989097969101612507565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561162a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164e9190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561168b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116af9190612585565b50925050506004548111156116f95760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156117bb576006541561176d5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611811576118116123ff565b040311156118545760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b61185d81611578565b600083815260026020526040902054146118895760405162461bcd60e51b8152600401610633906123ae565b60c08101516001600160a01b0316156118db5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b60016118e682611f9b565b60038111156118f7576118f761237e565b146119445760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b60015482111561198c57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261199c81611578565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a0557611a056123ff565b040311611a465760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611a4f81611578565b60008381526002602052604090205414611a7b5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611a9357611a9361237e565b14611ad25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611b565760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b6a82611578565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611c255760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b600454600654611c3591906124f4565b4211611c9e5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d399190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611d76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9a9190612585565b50925050508181036108385760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611e3557611e356123ff565b040311611e765760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611e7f81611578565b60008381526002602052604090205414611eab5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ec357611ec361237e565b14611f025760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611f875760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b6a82611578565b6000816060015163ffffffff16600003611fb757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611ff357506003919050565b6000600c836060015163ffffffff16420381612011576120116123ff565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612055576001925061205a565b600092505b50505b919050565b6001600160a01b03811681146117bb57600080fd5b803561205d81612062565b803563ffffffff8116811461205d57600080fd5b80356003811061205d57600080fd5b600060e082840312156120b757600080fd5b60405160e0810181811067ffffffffffffffff821117156120e857634e487b7160e01b600052604160045260246000fd5b604052823581529050806120fe60208401612077565b602082015261210f60408401612082565b604082015261212060608401612082565b606082015261213160808401612082565b608082015261214260a08401612096565b60a082015261215360c08401612077565b60c08201525092915050565b600080610100838503121561217357600080fd5b8235915061218484602085016120a5565b90509250929050565b600080600061012084860312156121a357600080fd5b83359250602084013591506121bb85604086016120a5565b90509250925092565b6000602082840312156121d657600080fd5b5035919050565b600080604083850312156121f057600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461205d57600080fd5b60008083601f84011261222957600080fd5b50813567ffffffffffffffff81111561224157600080fd5b60208301915083602082850101111561225957600080fd5b9250929050565b6000806000806000806080878903121561227957600080fd5b863567ffffffffffffffff8082111561229157600080fd5b818901915089601f8301126122a557600080fd5b8135818111156122b457600080fd5b8a60208260051b85010111156122c957600080fd5b602083019850809750506122df60208a016121ff565b95506122ed60408a01612077565b9450606089013591508082111561230357600080fd5b5061231089828a01612217565b979a9699509497509295939492505050565b60008082840361010081121561233757600080fd5b8335925060e0601f198201121561234d57600080fd5b506020830190509250929050565b600060e0828403121561236d57600080fd5b61237783836120a5565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123a8576123a861237e565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611572576115726123d6565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561242757600080fd5b815161237781612062565b60008261244f57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156124ce57600080fd5b61237782612096565b6000602082840312156124e957600080fd5b813561237781612062565b80820180821115611572576115726123d6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061255f5761255f61237e565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561259b57600080fd5b50508251602084015160408501516060909501519196909550909250905056fea26469706673582212204314ec468d95ad31fe7eafafdb876c007cf6b72384de11516dd93c0e0c209c5264736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.", "events": { @@ -1209,7 +1209,7 @@ "storageLayout": { "storage": [ { - "astId": 38, + "astId": 430, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "stateRoot", "offset": 0, @@ -1217,7 +1217,7 @@ "type": "t_bytes32" }, { - "astId": 40, + "astId": 432, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "latestVerifiedEpoch", "offset": 0, @@ -1225,7 +1225,7 @@ "type": "t_uint256" }, { - "astId": 44, + "astId": 436, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "claimHashes", "offset": 0, @@ -1233,7 +1233,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 48, + "astId": 440, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "relayed", "offset": 0, @@ -1241,7 +1241,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 50, + "astId": 442, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "sequencerDelayLimit", "offset": 0, @@ -1249,12 +1249,12 @@ "type": "t_uint256" }, { - "astId": 53, + "astId": 445, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "5", - "type": "t_struct(SequencerDelayLimitDecreaseRequest)58_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)450_storage" } ], "types": { @@ -1270,12 +1270,12 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_struct(SequencerDelayLimitDecreaseRequest)58_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)450_storage": { "encoding": "inplace", "label": "struct VeaOutboxArbToEth.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 55, + "astId": 447, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "requestedsequencerDelayLimit", "offset": 0, @@ -1283,7 +1283,7 @@ "type": "t_uint256" }, { - "astId": 57, + "astId": 449, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "timestamp", "offset": 0, diff --git a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol index db09aae6..ca40c802 100644 --- a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol @@ -153,7 +153,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { require(msg.sender == address(amb), "Not from bridge."); require(bytes32(routerChainId) == amb.messageSourceChainId(), "Invalid chain id."); require(routerArbToGnosis == amb.messageSender(), "Not from router."); - require(_timestamp + RELAY_TIMEOUT <= block.timestamp, "Stale message. Timeout exceeded."); + require(_timestamp + RELAY_TIMEOUT >= block.timestamp, "Stale message. Timeout exceeded."); if (sequencerDelayLimit != _newSequencerDelayLimit) { sequencerDelayLimit = _newSequencerDelayLimit; From 7e21dad5c5f710f192a7370b39f6cc936a0729cd Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Fri, 16 Jun 2023 16:09:12 +0900 Subject: [PATCH 11/58] fix(contracts): update sequence limit bug --- contracts/README.md | 20 +++--- .../VeaInboxArbToEthDevnet.json | 16 ++--- .../VeaInboxArbToEthTestnet.json | 16 ++--- .../VeaInboxArbToGnosisDevnet.json | 16 ++--- .../VeaInboxArbToGnosisTestnet.json | 16 ++--- .../chiado/VeaOutboxArbToGnosisDevnet.json | 65 ++++++++++++------- .../chiado/VeaOutboxArbToGnosisTestnet.json | 59 +++++++++++------ .../goerli/RouterArbToGnosisDevnet.json | 62 ++++++++---------- .../goerli/RouterArbToGnosisTestnet.json | 62 ++++++++---------- .../goerli/VeaOutboxArbToEthDevnet.json | 34 +++++----- .../goerli/VeaOutboxArbToEthTestnet.json | 34 +++++----- .../arbitrumToGnosis/RouterArbToGnosis.sol | 20 +++--- .../arbitrumToGnosis/VeaOutboxArbToGnosis.sol | 5 +- .../src/test/bridge-mocks/gnosis/MockAMB.sol | 1 - 14 files changed, 225 insertions(+), 201 deletions(-) diff --git a/contracts/README.md b/contracts/README.md index ce7eea31..0d696611 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -10,22 +10,22 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments #### Goerli -- [RouterArbToGnosisDevnet](https://goerli.etherscan.io/address/0x770cDAF7284B8838c699910433A927a49bB6765A) -- [RouterArbToGnosisTestnet](https://goerli.etherscan.io/address/0x8228116e0d5Fd2611788E68fF77D5f21b005cE11) -- [VeaOutboxArbToEthDevnet](https://goerli.etherscan.io/address/0x8dC6CCd123E680018923000854dE7E293E744DA0) -- [VeaOutboxArbToEthTestnet](https://goerli.etherscan.io/address/0x6dfc228652A6eE943eA37c269E2602BF2e198Ae9) +- [RouterArbToGnosisDevnet](https://goerli.etherscan.io/address/0x9F4407785DFf95c08Bf9a0d9d4A5a164C48eC5CB) +- [RouterArbToGnosisTestnet](https://goerli.etherscan.io/address/0xF04354D2286C8Db33aE6F454728C2F935ae5CD82) +- [VeaOutboxArbToEthDevnet](https://goerli.etherscan.io/address/0xb0263478A46d885D715B01fbac745500B9576634) +- [VeaOutboxArbToEthTestnet](https://goerli.etherscan.io/address/0x63d66abf907E7AF1516fF0DFb9849cb3CBAF3780) #### Arbitrum Goerli -- [VeaInboxArbToEthDevnet](https://goerli.arbiscan.io/address/0x1224E83DF410b43A65ed3e375a6442813B1aea14) -- [VeaInboxArbToEthTestnet](https://goerli.arbiscan.io/address/0xb7d2C76641B21718cC8A0b595be438c863A6e031) -- [VeaInboxArbToGnosisDevnet](https://goerli.arbiscan.io/address/0x84de475fed07406aA3B05248f1a7b0Fca11DA012) -- [VeaInboxArbToGnosisTestnet](https://goerli.arbiscan.io/address/0x4738A566706eDd30Fe175e20eDDd21c5c7bD79Ea) +- [VeaInboxArbToEthDevnet](https://goerli.arbiscan.io/address/0x5Df4452965cd2ff87f205AE5b10b5d0F65223116) +- [VeaInboxArbToEthTestnet](https://goerli.arbiscan.io/address/0xc8c44fb196aF9C5E41B48f74E1A86A379b70bd70) +- [VeaInboxArbToGnosisDevnet](https://goerli.arbiscan.io/address/0x6bC3C7Bcd2C6C2d8BFEAA3642c425cAE25F7fe17) +- [VeaInboxArbToGnosisTestnet](https://goerli.arbiscan.io/address/0xDF216C98773DA7998EE49AE8106BFe9724cf2944) #### Chiado -- [VeaOutboxArbToGnosisDevnet](https://blockscout.com/gnosis/chiado/address/0xEe27226A8fa11Ba851410EB09d32884aEE219D75) -- [VeaOutboxArbToGnosisTestnet](https://blockscout.com/gnosis/chiado/address/0x359c4E8225866aB97ab054ec36aBe923e70eF741) +- [VeaOutboxArbToGnosisDevnet](https://blockscout.com/gnosis/chiado/address/0xDBa4fb8C75816CF9DcDbC66eDA361AD198314577) +- [VeaOutboxArbToGnosisTestnet](https://blockscout.com/gnosis/chiado/address/0xb61BEB66796Bbf59BBa3e5feE4Bab2304B889590) ## Getting Started diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json index d7ecd194..3b42df8d 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x1224E83DF410b43A65ed3e375a6442813B1aea14", + "address": "0x5Df4452965cd2ff87f205AE5b10b5d0F65223116", "abi": [ { "inputs": [ @@ -275,27 +275,27 @@ "type": "function" } ], - "transactionHash": "0x73d7aa3d34df16d3b5d4690fa37c81898400a0bebd1d8c0d3b10b2ce6ac3707b", + "transactionHash": "0xef2790720fe83fe9ee06ba518184fa7a6568e78ae900c7aa12b9127cb2b0c9b8", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x1224E83DF410b43A65ed3e375a6442813B1aea14", + "contractAddress": "0x5Df4452965cd2ff87f205AE5b10b5d0F65223116", "transactionIndex": 1, "gasUsed": "671409", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xb022fc01eb20ecdf4cee41efa9e9495699b69f1ef5aaaeae5f52539517773a11", - "transactionHash": "0x73d7aa3d34df16d3b5d4690fa37c81898400a0bebd1d8c0d3b10b2ce6ac3707b", + "blockHash": "0xa3588eab3d75f1164e3c96c2a6aabb025926fbcce501c89a449049162089eb05", + "transactionHash": "0xef2790720fe83fe9ee06ba518184fa7a6568e78ae900c7aa12b9127cb2b0c9b8", "logs": [], - "blockNumber": 26291916, + "blockNumber": 26299176, "cumulativeGasUsed": "671409", "status": 1, "byzantium": true }, "args": [ 1800, - "0x8dC6CCd123E680018923000854dE7E293E744DA0" + "0xb0263478A46d885D715B01fbac745500B9576634" ], - "numDeployments": 11, + "numDeployments": 12, "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0xf7aedd98f0149c6f63c4d59ad9fd5d6d2d16b75a42fe95d2064a157ff181007b\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161012001526105b401526000818161015f015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122091c8e50a4eb68a04b97bfd09e6eedc0e624aaef5954f963f1f6df55f1f0da9cf64736f6c63430008120033", diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json index 6aca3e95..8e2977c3 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json @@ -1,5 +1,5 @@ { - "address": "0xb7d2C76641B21718cC8A0b595be438c863A6e031", + "address": "0xc8c44fb196aF9C5E41B48f74E1A86A379b70bd70", "abi": [ { "inputs": [ @@ -275,27 +275,27 @@ "type": "function" } ], - "transactionHash": "0x621ce6c91a841c5f53081f66d2317b777fa769bb1eb7834b0a12aaa623555a8b", + "transactionHash": "0x0f4880d34ee4ca999ea552b8b5aa4ecf907fc045cf9a0a65bf26f1762aedf82c", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xb7d2C76641B21718cC8A0b595be438c863A6e031", + "contractAddress": "0xc8c44fb196aF9C5E41B48f74E1A86A379b70bd70", "transactionIndex": 1, "gasUsed": "671421", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x9d88469049a4d41024c8280470e60bbf27c63e816ade963698bb66fa430ef479", - "transactionHash": "0x621ce6c91a841c5f53081f66d2317b777fa769bb1eb7834b0a12aaa623555a8b", + "blockHash": "0x1a2eaade15fb32bb115ea1b4f44a89e3bd305f7c3aaf544e2e906fc92821d4cc", + "transactionHash": "0x0f4880d34ee4ca999ea552b8b5aa4ecf907fc045cf9a0a65bf26f1762aedf82c", "logs": [], - "blockNumber": 26291751, + "blockNumber": 26298910, "cumulativeGasUsed": "671421", "status": 1, "byzantium": true }, "args": [ 7200, - "0x6dfc228652A6eE943eA37c269E2602BF2e198Ae9" + "0x63d66abf907E7AF1516fF0DFb9849cb3CBAF3780" ], - "numDeployments": 7, + "numDeployments": 8, "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0xf7aedd98f0149c6f63c4d59ad9fd5d6d2d16b75a42fe95d2064a157ff181007b\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161012001526105b401526000818161015f015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122091c8e50a4eb68a04b97bfd09e6eedc0e624aaef5954f963f1f6df55f1f0da9cf64736f6c63430008120033", diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json index bfcbf5d3..d4e6fef5 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x84de475fed07406aA3B05248f1a7b0Fca11DA012", + "address": "0x6bC3C7Bcd2C6C2d8BFEAA3642c425cAE25F7fe17", "abi": [ { "inputs": [ @@ -275,27 +275,27 @@ "type": "function" } ], - "transactionHash": "0xbc89595b1938802f1c49baebde8dee4c1ba33e60424fc6980ac8c6d4fcbeb071", + "transactionHash": "0xfef6673ab138dd1e57f6de97635168c324c54ac73f25751d94850cf8e881ff72", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x84de475fed07406aA3B05248f1a7b0Fca11DA012", + "contractAddress": "0x6bC3C7Bcd2C6C2d8BFEAA3642c425cAE25F7fe17", "transactionIndex": 1, "gasUsed": "671421", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x831e8546976f890d50c86061bdf3548dbd27c621d0aa2774271de03d561767c6", - "transactionHash": "0xbc89595b1938802f1c49baebde8dee4c1ba33e60424fc6980ac8c6d4fcbeb071", + "blockHash": "0xd4386125a5cd48a86fcbccb9c13ff2ce01f64d128269814cb54197ed0ffd2945", + "transactionHash": "0xfef6673ab138dd1e57f6de97635168c324c54ac73f25751d94850cf8e881ff72", "logs": [], - "blockNumber": 26291957, + "blockNumber": 26299235, "cumulativeGasUsed": "671421", "status": 1, "byzantium": true }, "args": [ 1800, - "0xEe27226A8fa11Ba851410EB09d32884aEE219D75" + "0xDBa4fb8C75816CF9DcDbC66eDA361AD198314577" ], - "numDeployments": 12, + "numDeployments": 13, "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToL1.route, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x48eecf0d4e478ce7860635a206ceee6535b4f4765f9d25dddae463666e2bd7cb\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161015a01526105b4015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220dc892c5af7180a16c7f018e369629c54bb0e298b1b18d9b76c200daa89ba2be064736f6c63430008120033", diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json index 430e5bc5..4d7c0d34 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x4738A566706eDd30Fe175e20eDDd21c5c7bD79Ea", + "address": "0xDF216C98773DA7998EE49AE8106BFe9724cf2944", "abi": [ { "inputs": [ @@ -275,27 +275,27 @@ "type": "function" } ], - "transactionHash": "0x7f1d46ed3c14e3f9408cc82f929bcff49165905a1fc0b6972d96811432b6e63a", + "transactionHash": "0x583d25c9f5f60eee29114f04e0ba433878149fac9ab2f32c7397d795190b7e7c", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x4738A566706eDd30Fe175e20eDDd21c5c7bD79Ea", + "contractAddress": "0xDF216C98773DA7998EE49AE8106BFe9724cf2944", "transactionIndex": 1, "gasUsed": "671421", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x4188992b1e3d431c84758a567287197ed89c3f4a6ae2fab378310aa6f662fbb6", - "transactionHash": "0x7f1d46ed3c14e3f9408cc82f929bcff49165905a1fc0b6972d96811432b6e63a", + "blockHash": "0xb6850da428c732294113e30987fa53e70350ba3478c0ffc07d19eaa5b22e7a3d", + "transactionHash": "0x583d25c9f5f60eee29114f04e0ba433878149fac9ab2f32c7397d795190b7e7c", "logs": [], - "blockNumber": 26291803, + "blockNumber": 26298947, "cumulativeGasUsed": "671421", "status": 1, "byzantium": true }, "args": [ 3600, - "0x359c4E8225866aB97ab054ec36aBe923e70eF741" + "0xb61BEB66796Bbf59BBa3e5feE4Bab2304B889590" ], - "numDeployments": 5, + "numDeployments": 6, "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToL1.route, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x48eecf0d4e478ce7860635a206ceee6535b4f4765f9d25dddae463666e2bd7cb\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161015a01526105b4015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220dc892c5af7180a16c7f018e369629c54bb0e298b1b18d9b76c200daa89ba2be064736f6c63430008120033", diff --git a/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json b/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json index e8af7282..2e69bdd2 100644 --- a/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json +++ b/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xEe27226A8fa11Ba851410EB09d32884aEE219D75", + "address": "0xDBa4fb8C75816CF9DcDbC66eDA361AD198314577", "abi": [ { "inputs": [ @@ -727,6 +727,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "timestampDelayUpdated", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -1021,19 +1034,19 @@ "type": "function" } ], - "transactionHash": "0x39beb3d7c01432e4d547e8644e3a5f2740b3db69d1e58e4414f344b160c9ef89", + "transactionHash": "0x57bd6b3abc10d2a23ccde315267b7d1bbcda5fcb0c1dc1793b3b614dad803c9f", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xEe27226A8fa11Ba851410EB09d32884aEE219D75", - "transactionIndex": 2, - "gasUsed": "2118351", + "contractAddress": "0xDBa4fb8C75816CF9DcDbC66eDA361AD198314577", + "transactionIndex": 0, + "gasUsed": "2116386", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xecf9b5fd1ae480771ab2c633448ad8b17e312760c77c0c085c8e2ba9ad589bd1", - "transactionHash": "0x39beb3d7c01432e4d547e8644e3a5f2740b3db69d1e58e4414f344b160c9ef89", + "blockHash": "0xb780182a5b20b0ea1d3bb53b734acb40017bb91c62c9c1a02ef7652008163ddb", + "transactionHash": "0x57bd6b3abc10d2a23ccde315267b7d1bbcda5fcb0c1dc1793b3b614dad803c9f", "logs": [], - "blockNumber": 4487332, - "cumulativeGasUsed": "2306378", + "blockNumber": 4488160, + "cumulativeGasUsed": "2116386", "status": 1, "byzantium": true }, @@ -1043,16 +1056,16 @@ 0, 10000000000000, "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0x770cDAF7284B8838c699910433A927a49bB6765A", + "0x9F4407785DFf95c08Bf9a0d9d4A5a164C48eC5CB", 86400, 10000000000000, 5 ], - "numDeployments": 14, - "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosisDevnet\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_routerArbToGnosisDevnet\":\"The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\",\"_routerChainId\":\"The chain id of the router contract.\",\"_sequencerDelayLimit\":\"The maximum number of sequencer messages that can be submitted in a challenge period.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":\"VeaOutboxArbToGnosisDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n uint256 internal constant RELAY_TIMEOUT = 604800; // 7 days\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(_timestamp + RELAY_TIMEOUT >= block.timestamp, \\\"Stale message. Timeout exceeded.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x4071f3ea552af8995a457452838f14493645a15b9eed12ae248ed5ab22316b4b\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToGnosis/VeaOutboxArbToGnosis.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Chiado.\\n/// Note: This contract is deployed on Chiado.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosisDevnet The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _sequencerDelayLimit The maximum number of sequencer messages that can be submitted in a challenge period.\\n /// @param _routerChainId The chain id of the router contract.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosisDevnet,\\n uint256 _maxMissingBlocks,\\n uint256 _sequencerDelayLimit,\\n uint256 _routerChainId\\n )\\n VeaOutboxArbToGnosis(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _amb,\\n _routerArbToGnosisDevnet,\\n _maxMissingBlocks,\\n _sequencerDelayLimit,\\n _routerChainId\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xab3a39d2515db68f62fde6addb1d845b20e04dc70fb5dcb329b69e8309dbc4d1\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101c06040523480156200001257600080fd5b50604051620027813803806200278183398101604081905262000035916200010e565b60c08990526101408890526101808690526101608790526001600160a01b03808616608052841660a0526101a082905261012081905260048390558888888888888888886200008660028a620001a7565b60e0819052620000988a6002620001ca565b620000a49190620001ea565b6101005261014051600190620000bb9042620001a7565b620000c79190620001ea565b6001555050600580546001600160a01b0319163317905550620002009e505050505050505050505050505050565b6001600160a01b03811681146200010b57600080fd5b50565b60008060008060008060008060006101208a8c0312156200012e57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a01516200015781620000f5565b60a08b01519095506200016a81620000f5565b8094505060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001c557634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001e457620001e462000191565b92915050565b81810381811115620001e457620001e462000191565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516124256200035c600039600081816104a50152611df30152600081816104d9015281816108a00152818161181b015281816119a60152611bb20152600081816105610152611d8701526000818161050d015281816108c401528181610c55015281816117090152818161183f015281816119ca0152611bd601526000818161040e01528181610a3b0152610d6e01526000818161149601526115cf0152600081816114430152611587015260008181610595015281816106a1015281816108270152818161085401528181610f7e0152818161161f01528181611b1001528181611b770152611d1d0152600081816105c901528181610b280152610e5b0152600081816102240152818161093f015281816109b901528181610a9d01528181610c8a01528181610cec0152610dd001526124256000f3fe6080604052600436106101d85760003560e01c80638ad3a8f711610102578063b633b94411610095578063da2b7bc411610064578063da2b7bc4146105eb578063df19e6ff1461060b578063e813a75514610638578063eedcf2a91461064e57600080fd5b8063b633b9441461052f578063c2114a161461054f578063d0e30db014610583578063d5e6a9df146105b757600080fd5b80639588eca2116100d15780639588eca21461047d578063aa22a1c614610493578063b044397e146104c7578063b5b7a184146104fb57600080fd5b80638ad3a8f7146103dc5780638d96fdea146103fc57806390df63b714610430578063930f28af1461045d57600080fd5b806331d144571161017a57806349b4299e1161014957806349b4299e1461035c5780634a439cfe1461037c578063541adcca1461039c5780638a619a71146103bc57600080fd5b806331d14457146102e957806331ddf743146102fc5780633ce43cfd1461031c5780634788cb381461033c57600080fd5b8063222ae786116101b6578063222ae786146102635780632639c0601461028657806327ee6bdd146102b35780632c192519146102c957600080fd5b806301139b68146101dd5780630f0adca5146101f25780631062b39a14610212575b600080fd5b6101f06101eb366004611fb0565b610661565b005b3480156101fe57600080fd5b506101f061020d366004611fde565b61089e565b34801561021e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561026f57600080fd5b50610278610c4e565b60405190815260200161025a565b34801561029257600080fd5b506102786102a1366004612015565b60026020526000908152604090205481565b3480156102bf57600080fd5b5061027860015481565b3480156102d557600080fd5b506101f06102e436600461202e565b610c7f565b6101f06102f736600461202e565b610f65565b34801561030857600080fd5b506101f06103173660046120b1565b6110ec565b34801561032857600080fd5b506101f0610337366004612173565b61138c565b34801561034857600080fd5b506101f0610357366004611fb0565b6114d3565b34801561036857600080fd5b506101f0610377366004611fb0565b611657565b34801561038857600080fd5b50610278610397366004612015565b611702565b3480156103a857600080fd5b506102786103b73660046121ac565b611734565b3480156103c857600080fd5b506101f06103d73660046121cf565b611786565b3480156103e857600080fd5b50600554610246906001600160a01b031681565b34801561040857600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561043c57600080fd5b5061027861044b366004612015565b60036020526000908152604090205481565b34801561046957600080fd5b506101f0610478366004611fb0565b611819565b34801561048957600080fd5b5061027860005481565b34801561049f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d357600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561050757600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561053b57600080fd5b506101f061054a366004611fb0565b6119a4565b34801561055b57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561058f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c357600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f757600080fd5b506101f0610606366004611fb0565b611bb0565b34801561061757600080fd5b5061062b6106263660046121ac565b611d69565b60405161025a9190612202565b34801561064457600080fd5b5061027860045481565b6101f061065c36600461202e565b611e30565b61066a81611734565b6000838152600260205260409020541461069f5760405162461bcd60e51b81526004016106969061221c565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561070f5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610696565b60c08101516001600160a01b03161561076a5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610696565b60008160a001516002811115610782576107826121ec565b146107cf5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610696565b3360c08201526107de81611734565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f000000000000000000000000000000000000000000000000000000000000000034111561089a5760006108797f00000000000000000000000000000000000000000000000000000000000000003461225a565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816108f1576108f161226d565b040311156109345760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109b75760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190612283565b7f000000000000000000000000000000000000000000000000000000000000000014610a9b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1d919061229c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b905760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b60015483118015610ba057508115155b15610be357600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610bec81611734565b60008481526002602052604090205403610c49578051829003610c1557600160a0820152610c30565b60c08101516001600160a01b031615610c3057600260a08201525b610c3981611734565b6000848152600260205260409020555b505050565b6000610c7a7f0000000000000000000000000000000000000000000000000000000000000000426122b9565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cea5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6c9190612283565b7f000000000000000000000000000000000000000000000000000000000000000014610dce5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e50919061229c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610ec35760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b42610ed162093a80836122db565b1015610f1f5760405162461bcd60e51b815260206004820181905260248201527f5374616c65206d6573736167652e2054696d656f75742065786365656465642e6044820152606401610696565b816004541461089a5760048290556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6005546001600160a01b03163314610f7c57600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610fec5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610696565b806110095760405162461bcd60e51b81526004016106969061221c565b6000828152600260205260409020541561105b5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610696565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526110a190611734565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050565b6040851061112e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610696565b60008484848460405160200161114794939291906122ee565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156111c757600088888381811061118957611189612330565b905060200201359050828111156111ae578260005280602052604060002092506111be565b8060005282602052604060002092505b5060010161116d565b50806000541461120a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610696565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561127f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610696565b6000838152600360205260408082206001851b84179055516001600160a01b038916906112af9089908990612346565b6000604051808303816000865af19150503d80600081146112ec576040519150601f19603f3d011682016040523d82523d6000602084013e6112f1565b606091505b50509050806113425760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610696565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61139e6103b7368390038301836121ac565b600083815260026020526040902054146113ca5760405162461bcd60e51b81526004016106969061221c565b60026113dc60c0830160a08401612356565b60028111156113ed576113ed6121ec565b1461142e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610696565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061148893505060e0840191505060c083016121cf565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114dc81611734565b600083815260026020526040902054146115085760405162461bcd60e51b81526004016106969061221c565b60018160a001516002811115611520576115206121ec565b1461155d5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610696565b60008281526002602052604081205560c08101516001600160a01b031615611609576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6005546001600160a01b0316331461166e57600080fd5b61167781611734565b600083815260026020526040902054146116a35760405162461bcd60e51b81526004016106969061221c565b63ffffffff4281166060830152431660808201526116c081611734565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610f59565b600061172e7f0000000000000000000000000000000000000000000000000000000000000000836122b9565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611769989097969101612371565b604051602081830303815290604052805190602001209050919050565b6005546001600160a01b0316331461179d57600080fd5b6005546001600160a01b031633146117f75760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610696565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161186c5761186c61226d565b040311156118af5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b6118b881611734565b600083815260026020526040902054146118e45760405162461bcd60e51b81526004016106969061221c565b60c08101516001600160a01b0316156119365760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610696565b60015482111561197e57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261198e81611734565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119f7576119f761226d565b040311611a385760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611a4181611734565b60008381526002602052604090205414611a6d5760405162461bcd60e51b81526004016106969061221c565b60008160a001516002811115611a8557611a856121ec565b14611ac45760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60c08101516001600160a01b03161561089a5760208101516001600160a01b0316611b485760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b5c82611734565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c0357611c0361226d565b040311611c445760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611c4d81611734565b60008381526002602052604090205414611c795760405162461bcd60e51b81526004016106969061221c565b60008160a001516002811115611c9157611c916121ec565b14611cd05760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60208101516001600160a01b03161561089a5760c08101516001600160a01b0316611d555760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b5c82611734565b6000816060015163ffffffff16600003611d8557506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611dc157506003919050565b60006005836060015163ffffffff16420381611ddf57611ddf61226d565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611e235760019250611e28565b600092505b50505b919050565b611e3a8282610f65565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611e818382611657565b63ffffffff428116606083015243166080820152611e9f8382611819565b600160a0820152610c4983826114d3565b6001600160a01b0381168114611ec557600080fd5b50565b8035611e2b81611eb0565b803563ffffffff81168114611e2b57600080fd5b803560038110611e2b57600080fd5b600060e08284031215611f0857600080fd5b60405160e0810181811067ffffffffffffffff82111715611f3957634e487b7160e01b600052604160045260246000fd5b60405282358152905080611f4f60208401611ec8565b6020820152611f6060408401611ed3565b6040820152611f7160608401611ed3565b6060820152611f8260808401611ed3565b6080820152611f9360a08401611ee7565b60a0820152611fa460c08401611ec8565b60c08201525092915050565b6000806101008385031215611fc457600080fd5b82359150611fd58460208501611ef6565b90509250929050565b60008060006101208486031215611ff457600080fd5b833592506020840135915061200c8560408601611ef6565b90509250925092565b60006020828403121561202757600080fd5b5035919050565b6000806040838503121561204157600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611e2b57600080fd5b60008083601f84011261207a57600080fd5b50813567ffffffffffffffff81111561209257600080fd5b6020830191508360208285010111156120aa57600080fd5b9250929050565b600080600080600080608087890312156120ca57600080fd5b863567ffffffffffffffff808211156120e257600080fd5b818901915089601f8301126120f657600080fd5b81358181111561210557600080fd5b8a60208260051b850101111561211a57600080fd5b6020830198508097505061213060208a01612050565b955061213e60408a01611ec8565b9450606089013591508082111561215457600080fd5b5061216189828a01612068565b979a9699509497509295939492505050565b60008082840361010081121561218857600080fd5b8335925060e0601f198201121561219e57600080fd5b506020830190509250929050565b600060e082840312156121be57600080fd5b6121c88383611ef6565b9392505050565b6000602082840312156121e157600080fd5b81356121c881611eb0565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612216576122166121ec565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561172e5761172e612244565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561229557600080fd5b5051919050565b6000602082840312156122ae57600080fd5b81516121c881611eb0565b6000826122d657634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561172e5761172e612244565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561236857600080fd5b6121c882611ee7565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106123c9576123c96121ec565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220dcbe1b24e9c4d98ae26b359eacec08cf99164f7cb3fadf04b8845933d2d69d7964736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101d85760003560e01c80638ad3a8f711610102578063b633b94411610095578063da2b7bc411610064578063da2b7bc4146105eb578063df19e6ff1461060b578063e813a75514610638578063eedcf2a91461064e57600080fd5b8063b633b9441461052f578063c2114a161461054f578063d0e30db014610583578063d5e6a9df146105b757600080fd5b80639588eca2116100d15780639588eca21461047d578063aa22a1c614610493578063b044397e146104c7578063b5b7a184146104fb57600080fd5b80638ad3a8f7146103dc5780638d96fdea146103fc57806390df63b714610430578063930f28af1461045d57600080fd5b806331d144571161017a57806349b4299e1161014957806349b4299e1461035c5780634a439cfe1461037c578063541adcca1461039c5780638a619a71146103bc57600080fd5b806331d14457146102e957806331ddf743146102fc5780633ce43cfd1461031c5780634788cb381461033c57600080fd5b8063222ae786116101b6578063222ae786146102635780632639c0601461028657806327ee6bdd146102b35780632c192519146102c957600080fd5b806301139b68146101dd5780630f0adca5146101f25780631062b39a14610212575b600080fd5b6101f06101eb366004611fb0565b610661565b005b3480156101fe57600080fd5b506101f061020d366004611fde565b61089e565b34801561021e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561026f57600080fd5b50610278610c4e565b60405190815260200161025a565b34801561029257600080fd5b506102786102a1366004612015565b60026020526000908152604090205481565b3480156102bf57600080fd5b5061027860015481565b3480156102d557600080fd5b506101f06102e436600461202e565b610c7f565b6101f06102f736600461202e565b610f65565b34801561030857600080fd5b506101f06103173660046120b1565b6110ec565b34801561032857600080fd5b506101f0610337366004612173565b61138c565b34801561034857600080fd5b506101f0610357366004611fb0565b6114d3565b34801561036857600080fd5b506101f0610377366004611fb0565b611657565b34801561038857600080fd5b50610278610397366004612015565b611702565b3480156103a857600080fd5b506102786103b73660046121ac565b611734565b3480156103c857600080fd5b506101f06103d73660046121cf565b611786565b3480156103e857600080fd5b50600554610246906001600160a01b031681565b34801561040857600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561043c57600080fd5b5061027861044b366004612015565b60036020526000908152604090205481565b34801561046957600080fd5b506101f0610478366004611fb0565b611819565b34801561048957600080fd5b5061027860005481565b34801561049f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d357600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561050757600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561053b57600080fd5b506101f061054a366004611fb0565b6119a4565b34801561055b57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b34801561058f57600080fd5b506102787f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c357600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f757600080fd5b506101f0610606366004611fb0565b611bb0565b34801561061757600080fd5b5061062b6106263660046121ac565b611d69565b60405161025a9190612202565b34801561064457600080fd5b5061027860045481565b6101f061065c36600461202e565b611e30565b61066a81611734565b6000838152600260205260409020541461069f5760405162461bcd60e51b81526004016106969061221c565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561070f5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610696565b60c08101516001600160a01b03161561076a5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610696565b60008160a001516002811115610782576107826121ec565b146107cf5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610696565b3360c08201526107de81611734565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f000000000000000000000000000000000000000000000000000000000000000034111561089a5760006108797f00000000000000000000000000000000000000000000000000000000000000003461225a565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816108f1576108f161226d565b040311156109345760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109b75760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190612283565b7f000000000000000000000000000000000000000000000000000000000000000014610a9b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610af9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1d919061229c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b905760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b60015483118015610ba057508115155b15610be357600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610bec81611734565b60008481526002602052604090205403610c49578051829003610c1557600160a0820152610c30565b60c08101516001600160a01b031615610c3057600260a08201525b610c3981611734565b6000848152600260205260409020555b505050565b6000610c7a7f0000000000000000000000000000000000000000000000000000000000000000426122b9565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cea5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6c9190612283565b7f000000000000000000000000000000000000000000000000000000000000000014610dce5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610696565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e50919061229c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610ec35760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610696565b42610ed162093a80836122db565b1015610f1f5760405162461bcd60e51b815260206004820181905260248201527f5374616c65206d6573736167652e2054696d656f75742065786365656465642e6044820152606401610696565b816004541461089a5760048290556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6005546001600160a01b03163314610f7c57600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610fec5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610696565b806110095760405162461bcd60e51b81526004016106969061221c565b6000828152600260205260409020541561105b5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610696565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526110a190611734565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050565b6040851061112e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610696565b60008484848460405160200161114794939291906122ee565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156111c757600088888381811061118957611189612330565b905060200201359050828111156111ae578260005280602052604060002092506111be565b8060005282602052604060002092505b5060010161116d565b50806000541461120a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610696565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561127f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610696565b6000838152600360205260408082206001851b84179055516001600160a01b038916906112af9089908990612346565b6000604051808303816000865af19150503d80600081146112ec576040519150601f19603f3d011682016040523d82523d6000602084013e6112f1565b606091505b50509050806113425760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610696565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61139e6103b7368390038301836121ac565b600083815260026020526040902054146113ca5760405162461bcd60e51b81526004016106969061221c565b60026113dc60c0830160a08401612356565b60028111156113ed576113ed6121ec565b1461142e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610696565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061148893505060e0840191505060c083016121cf565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114dc81611734565b600083815260026020526040902054146115085760405162461bcd60e51b81526004016106969061221c565b60018160a001516002811115611520576115206121ec565b1461155d5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610696565b60008281526002602052604081205560c08101516001600160a01b031615611609576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6005546001600160a01b0316331461166e57600080fd5b61167781611734565b600083815260026020526040902054146116a35760405162461bcd60e51b81526004016106969061221c565b63ffffffff4281166060830152431660808201526116c081611734565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610f59565b600061172e7f0000000000000000000000000000000000000000000000000000000000000000836122b9565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611769989097969101612371565b604051602081830303815290604052805190602001209050919050565b6005546001600160a01b0316331461179d57600080fd5b6005546001600160a01b031633146117f75760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610696565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161186c5761186c61226d565b040311156118af5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610696565b6118b881611734565b600083815260026020526040902054146118e45760405162461bcd60e51b81526004016106969061221c565b60c08101516001600160a01b0316156119365760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610696565b60015482111561197e57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261198e81611734565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119f7576119f761226d565b040311611a385760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611a4181611734565b60008381526002602052604090205414611a6d5760405162461bcd60e51b81526004016106969061221c565b60008160a001516002811115611a8557611a856121ec565b14611ac45760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60c08101516001600160a01b03161561089a5760208101516001600160a01b0316611b485760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b5c82611734565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c0357611c0361226d565b040311611c445760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610696565b611c4d81611734565b60008381526002602052604090205414611c795760405162461bcd60e51b81526004016106969061221c565b60008160a001516002811115611c9157611c916121ec565b14611cd05760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610696565b60208101516001600160a01b03161561089a5760c08101516001600160a01b0316611d555760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b5c82611734565b6000816060015163ffffffff16600003611d8557506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611dc157506003919050565b60006005836060015163ffffffff16420381611ddf57611ddf61226d565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611e235760019250611e28565b600092505b50505b919050565b611e3a8282610f65565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611e818382611657565b63ffffffff428116606083015243166080820152611e9f8382611819565b600160a0820152610c4983826114d3565b6001600160a01b0381168114611ec557600080fd5b50565b8035611e2b81611eb0565b803563ffffffff81168114611e2b57600080fd5b803560038110611e2b57600080fd5b600060e08284031215611f0857600080fd5b60405160e0810181811067ffffffffffffffff82111715611f3957634e487b7160e01b600052604160045260246000fd5b60405282358152905080611f4f60208401611ec8565b6020820152611f6060408401611ed3565b6040820152611f7160608401611ed3565b6060820152611f8260808401611ed3565b6080820152611f9360a08401611ee7565b60a0820152611fa460c08401611ec8565b60c08201525092915050565b6000806101008385031215611fc457600080fd5b82359150611fd58460208501611ef6565b90509250929050565b60008060006101208486031215611ff457600080fd5b833592506020840135915061200c8560408601611ef6565b90509250925092565b60006020828403121561202757600080fd5b5035919050565b6000806040838503121561204157600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611e2b57600080fd5b60008083601f84011261207a57600080fd5b50813567ffffffffffffffff81111561209257600080fd5b6020830191508360208285010111156120aa57600080fd5b9250929050565b600080600080600080608087890312156120ca57600080fd5b863567ffffffffffffffff808211156120e257600080fd5b818901915089601f8301126120f657600080fd5b81358181111561210557600080fd5b8a60208260051b850101111561211a57600080fd5b6020830198508097505061213060208a01612050565b955061213e60408a01611ec8565b9450606089013591508082111561215457600080fd5b5061216189828a01612068565b979a9699509497509295939492505050565b60008082840361010081121561218857600080fd5b8335925060e0601f198201121561219e57600080fd5b506020830190509250929050565b600060e082840312156121be57600080fd5b6121c88383611ef6565b9392505050565b6000602082840312156121e157600080fd5b81356121c881611eb0565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612216576122166121ec565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561172e5761172e612244565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561229557600080fd5b5051919050565b6000602082840312156122ae57600080fd5b81516121c881611eb0565b6000826122d657634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561172e5761172e612244565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561236857600080fd5b6121c882611ee7565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106123c9576123c96121ec565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220dcbe1b24e9c4d98ae26b359eacec08cf99164f7cb3fadf04b8845933d2d69d7964736f6c63430008120033", + "numDeployments": 15, + "solcInputHash": "26a65a18c178d77477789f8130b0944b", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosisDevnet\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_routerArbToGnosisDevnet\":\"The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\",\"_routerChainId\":\"The chain id of the router contract.\",\"_sequencerDelayLimit\":\"The maximum number of sequencer messages that can be submitted in a challenge period.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":\"VeaOutboxArbToGnosisDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x5e9eaf576f7ebe3aca5fa0c442c96bd201999d5e3b27ec731572fe927b6d84a0\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToGnosis/VeaOutboxArbToGnosis.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Chiado.\\n/// Note: This contract is deployed on Chiado.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosisDevnet The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _sequencerDelayLimit The maximum number of sequencer messages that can be submitted in a challenge period.\\n /// @param _routerChainId The chain id of the router contract.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosisDevnet,\\n uint256 _maxMissingBlocks,\\n uint256 _sequencerDelayLimit,\\n uint256 _routerChainId\\n )\\n VeaOutboxArbToGnosis(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _amb,\\n _routerArbToGnosisDevnet,\\n _maxMissingBlocks,\\n _sequencerDelayLimit,\\n _routerChainId\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xab3a39d2515db68f62fde6addb1d845b20e04dc70fb5dcb329b69e8309dbc4d1\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101c06040523480156200001257600080fd5b50604051620027783803806200277883398101604081905262000035916200010e565b60c08990526101408890526101808690526101608790526001600160a01b03808616608052841660a0526101a082905261012081905260048390558888888888888888886200008660028a620001a7565b60e0819052620000988a6002620001ca565b620000a49190620001ea565b6101005261014051600190620000bb9042620001a7565b620000c79190620001ea565b6001555050600680546001600160a01b0319163317905550620002009e505050505050505050505050505050565b6001600160a01b03811681146200010b57600080fd5b50565b60008060008060008060008060006101208a8c0312156200012e57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a01516200015781620000f5565b60a08b01519095506200016a81620000f5565b8094505060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001c557634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001e457620001e462000191565b92915050565b81810381811115620001e457620001e462000191565b60805160a05160c05160e05161010051610120516101405161016051610180516101a05161241c6200035c600039600081816104c60152611e050152600081816104fa015281816108c10152818161182d015281816119b80152611bc40152600081816105820152611d9901526000818161052e015281816108e501528181610c760152818161171b01528181611851015281816119dc0152611be801526000818161042f01528181610a5c0152610d8f0152600081816114a801526115e101526000818161145501526115990152600081816105b6015281816106c2015281816108480152818161087501528181610f900152818161163101528181611b2201528181611b890152611d2f0152600081816105ea01528181610b490152610e7c01526000818161022f01528181610960015281816109da01528181610abe01528181610cab01528181610d0d0152610df1015261241c6000f3fe6080604052600436106101e35760003560e01c80638ad3a8f711610102578063b633b94411610095578063da2b7bc411610064578063da2b7bc41461060c578063df19e6ff1461062c578063e813a75514610659578063eedcf2a91461066f57600080fd5b8063b633b94414610550578063c2114a1614610570578063d0e30db0146105a4578063d5e6a9df146105d857600080fd5b80639588eca2116100d15780639588eca21461049e578063aa22a1c6146104b4578063b044397e146104e8578063b5b7a1841461051c57600080fd5b80638ad3a8f7146103fd5780638d96fdea1461041d57806390df63b714610451578063930f28af1461047e57600080fd5b806331ddf7431161017a5780634a439cfe116101495780634a439cfe14610387578063541adcca146103a75780637ffc2a6e146103c75780638a619a71146103dd57600080fd5b806331ddf743146103075780633ce43cfd146103275780634788cb381461034757806349b4299e1461036757600080fd5b80632639c060116101b65780632639c0601461029157806327ee6bdd146102be5780632c192519146102d457806331d14457146102f457600080fd5b806301139b68146101e85780630f0adca5146101fd5780631062b39a1461021d578063222ae7861461026e575b600080fd5b6101fb6101f6366004611fc2565b610682565b005b34801561020957600080fd5b506101fb610218366004611ff0565b6108bf565b34801561022957600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561027a57600080fd5b50610283610c6f565b604051908152602001610265565b34801561029d57600080fd5b506102836102ac366004612027565b60026020526000908152604090205481565b3480156102ca57600080fd5b5061028360015481565b3480156102e057600080fd5b506101fb6102ef366004612040565b610ca0565b6101fb610302366004612040565b610f77565b34801561031357600080fd5b506101fb6103223660046120c3565b6110fe565b34801561033357600080fd5b506101fb610342366004612185565b61139e565b34801561035357600080fd5b506101fb610362366004611fc2565b6114e5565b34801561037357600080fd5b506101fb610382366004611fc2565b611669565b34801561039357600080fd5b506102836103a2366004612027565b611714565b3480156103b357600080fd5b506102836103c23660046121be565b611746565b3480156103d357600080fd5b5061028360055481565b3480156103e957600080fd5b506101fb6103f83660046121e1565b611798565b34801561040957600080fd5b50600654610251906001600160a01b031681565b34801561042957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561045d57600080fd5b5061028361046c366004612027565b60036020526000908152604090205481565b34801561048a57600080fd5b506101fb610499366004611fc2565b61182b565b3480156104aa57600080fd5b5061028360005481565b3480156104c057600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156104f457600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561052857600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561055c57600080fd5b506101fb61056b366004611fc2565b6119b6565b34801561057c57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105b057600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e457600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b34801561061857600080fd5b506101fb610627366004611fc2565b611bc2565b34801561063857600080fd5b5061064c6106473660046121be565b611d7b565b6040516102659190612214565b34801561066557600080fd5b5061028360045481565b6101fb61067d366004612040565b611e42565b61068b81611746565b600083815260026020526040902054146106c05760405162461bcd60e51b81526004016106b79061222e565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107305760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106b7565b60c08101516001600160a01b03161561078b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106b7565b60008160a0015160028111156107a3576107a36121fe565b146107f05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106b7565b3360c08201526107ff81611746565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108bb57600061089a7f000000000000000000000000000000000000000000000000000000000000000034612256565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161091257610912612277565b040311156109555760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106b7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109d85760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016106b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5a919061228d565b7f000000000000000000000000000000000000000000000000000000000000000014610abc5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016106b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3e91906122a6565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610bb15760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016106b7565b60015483118015610bc157508115155b15610c0457600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610c0d81611746565b60008481526002602052604090205403610c6a578051829003610c3657600160a0820152610c51565b60c08101516001600160a01b031615610c5157600260a08201525b610c5a81611746565b6000848152600260205260409020555b505050565b6000610c9b7f0000000000000000000000000000000000000000000000000000000000000000426122c3565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d0b5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b60448201526064016106b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8d919061228d565b7f000000000000000000000000000000000000000000000000000000000000000014610def5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016106b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7191906122a6565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610ee45760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016106b7565b8060055410610f2c5760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106b7565b81600454146108bb57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6006546001600160a01b03163314610f8e57600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610ffe5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106b7565b8061101b5760405162461bcd60e51b81526004016106b79061222e565b6000828152600260205260409020541561106d5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106b7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526110b390611746565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050565b604085106111405760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106b7565b60008484848460405160200161115994939291906122e5565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156111d957600088888381811061119b5761119b612327565b905060200201359050828111156111c0578260005280602052604060002092506111d0565b8060005282602052604060002092505b5060010161117f565b50806000541461121c5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106b7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112915760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106b7565b6000838152600360205260408082206001851b84179055516001600160a01b038916906112c1908990899061233d565b6000604051808303816000865af19150503d80600081146112fe576040519150601f19603f3d011682016040523d82523d6000602084013e611303565b606091505b50509050806113545760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106b7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6113b06103c2368390038301836121be565b600083815260026020526040902054146113dc5760405162461bcd60e51b81526004016106b79061222e565b60026113ee60c0830160a0840161234d565b60028111156113ff576113ff6121fe565b146114405760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106b7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061149a93505060e0840191505060c083016121e1565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114ee81611746565b6000838152600260205260409020541461151a5760405162461bcd60e51b81526004016106b79061222e565b60018160a001516002811115611532576115326121fe565b1461156f5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106b7565b60008281526002602052604081205560c08101516001600160a01b03161561161b576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6006546001600160a01b0316331461168057600080fd5b61168981611746565b600083815260026020526040902054146116b55760405162461bcd60e51b81526004016106b79061222e565b63ffffffff4281166060830152431660808201526116d281611746565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610f6b565b60006117407f0000000000000000000000000000000000000000000000000000000000000000836122c3565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861177b989097969101612368565b604051602081830303815290604052805190602001209050919050565b6006546001600160a01b031633146117af57600080fd5b6006546001600160a01b031633146118095760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106b7565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161187e5761187e612277565b040311156118c15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106b7565b6118ca81611746565b600083815260026020526040902054146118f65760405162461bcd60e51b81526004016106b79061222e565b60c08101516001600160a01b0316156119485760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106b7565b60015482111561199057600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a08201526119a081611746565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a0957611a09612277565b040311611a4a5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106b7565b611a5381611746565b60008381526002602052604090205414611a7f5760405162461bcd60e51b81526004016106b79061222e565b60008160a001516002811115611a9757611a976121fe565b14611ad65760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106b7565b60c08101516001600160a01b0316156108bb5760208101516001600160a01b0316611b5a5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b6e82611746565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c1557611c15612277565b040311611c565760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106b7565b611c5f81611746565b60008381526002602052604090205414611c8b5760405162461bcd60e51b81526004016106b79061222e565b60008160a001516002811115611ca357611ca36121fe565b14611ce25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106b7565b60208101516001600160a01b0316156108bb5760c08101516001600160a01b0316611d675760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b6e82611746565b6000816060015163ffffffff16600003611d9757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611dd357506003919050565b60006005836060015163ffffffff16420381611df157611df1612277565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611e355760019250611e3a565b600092505b50505b919050565b611e4c8282610f77565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611e938382611669565b63ffffffff428116606083015243166080820152611eb1838261182b565b600160a0820152610c6a83826114e5565b6001600160a01b0381168114611ed757600080fd5b50565b8035611e3d81611ec2565b803563ffffffff81168114611e3d57600080fd5b803560038110611e3d57600080fd5b600060e08284031215611f1a57600080fd5b60405160e0810181811067ffffffffffffffff82111715611f4b57634e487b7160e01b600052604160045260246000fd5b60405282358152905080611f6160208401611eda565b6020820152611f7260408401611ee5565b6040820152611f8360608401611ee5565b6060820152611f9460808401611ee5565b6080820152611fa560a08401611ef9565b60a0820152611fb660c08401611eda565b60c08201525092915050565b6000806101008385031215611fd657600080fd5b82359150611fe78460208501611f08565b90509250929050565b6000806000610120848603121561200657600080fd5b833592506020840135915061201e8560408601611f08565b90509250925092565b60006020828403121561203957600080fd5b5035919050565b6000806040838503121561205357600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611e3d57600080fd5b60008083601f84011261208c57600080fd5b50813567ffffffffffffffff8111156120a457600080fd5b6020830191508360208285010111156120bc57600080fd5b9250929050565b600080600080600080608087890312156120dc57600080fd5b863567ffffffffffffffff808211156120f457600080fd5b818901915089601f83011261210857600080fd5b81358181111561211757600080fd5b8a60208260051b850101111561212c57600080fd5b6020830198508097505061214260208a01612062565b955061215060408a01611eda565b9450606089013591508082111561216657600080fd5b5061217389828a0161207a565b979a9699509497509295939492505050565b60008082840361010081121561219a57600080fd5b8335925060e0601f19820112156121b057600080fd5b506020830190509250929050565b600060e082840312156121d057600080fd5b6121da8383611f08565b9392505050565b6000602082840312156121f357600080fd5b81356121da81611ec2565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612228576122286121fe565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b8181038181111561174057634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60006020828403121561229f57600080fd5b5051919050565b6000602082840312156122b857600080fd5b81516121da81611ec2565b6000826122e057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561235f57600080fd5b6121da82611ef9565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106123c0576123c06121fe565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212200454cdd50c4f8ef4c5777954d7020a06e3c68dbbe80e8a98085a22451950e63f64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101e35760003560e01c80638ad3a8f711610102578063b633b94411610095578063da2b7bc411610064578063da2b7bc41461060c578063df19e6ff1461062c578063e813a75514610659578063eedcf2a91461066f57600080fd5b8063b633b94414610550578063c2114a1614610570578063d0e30db0146105a4578063d5e6a9df146105d857600080fd5b80639588eca2116100d15780639588eca21461049e578063aa22a1c6146104b4578063b044397e146104e8578063b5b7a1841461051c57600080fd5b80638ad3a8f7146103fd5780638d96fdea1461041d57806390df63b714610451578063930f28af1461047e57600080fd5b806331ddf7431161017a5780634a439cfe116101495780634a439cfe14610387578063541adcca146103a75780637ffc2a6e146103c75780638a619a71146103dd57600080fd5b806331ddf743146103075780633ce43cfd146103275780634788cb381461034757806349b4299e1461036757600080fd5b80632639c060116101b65780632639c0601461029157806327ee6bdd146102be5780632c192519146102d457806331d14457146102f457600080fd5b806301139b68146101e85780630f0adca5146101fd5780631062b39a1461021d578063222ae7861461026e575b600080fd5b6101fb6101f6366004611fc2565b610682565b005b34801561020957600080fd5b506101fb610218366004611ff0565b6108bf565b34801561022957600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561027a57600080fd5b50610283610c6f565b604051908152602001610265565b34801561029d57600080fd5b506102836102ac366004612027565b60026020526000908152604090205481565b3480156102ca57600080fd5b5061028360015481565b3480156102e057600080fd5b506101fb6102ef366004612040565b610ca0565b6101fb610302366004612040565b610f77565b34801561031357600080fd5b506101fb6103223660046120c3565b6110fe565b34801561033357600080fd5b506101fb610342366004612185565b61139e565b34801561035357600080fd5b506101fb610362366004611fc2565b6114e5565b34801561037357600080fd5b506101fb610382366004611fc2565b611669565b34801561039357600080fd5b506102836103a2366004612027565b611714565b3480156103b357600080fd5b506102836103c23660046121be565b611746565b3480156103d357600080fd5b5061028360055481565b3480156103e957600080fd5b506101fb6103f83660046121e1565b611798565b34801561040957600080fd5b50600654610251906001600160a01b031681565b34801561042957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561045d57600080fd5b5061028361046c366004612027565b60036020526000908152604090205481565b34801561048a57600080fd5b506101fb610499366004611fc2565b61182b565b3480156104aa57600080fd5b5061028360005481565b3480156104c057600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156104f457600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561052857600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561055c57600080fd5b506101fb61056b366004611fc2565b6119b6565b34801561057c57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105b057600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e457600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b34801561061857600080fd5b506101fb610627366004611fc2565b611bc2565b34801561063857600080fd5b5061064c6106473660046121be565b611d7b565b6040516102659190612214565b34801561066557600080fd5b5061028360045481565b6101fb61067d366004612040565b611e42565b61068b81611746565b600083815260026020526040902054146106c05760405162461bcd60e51b81526004016106b79061222e565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107305760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106b7565b60c08101516001600160a01b03161561078b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106b7565b60008160a0015160028111156107a3576107a36121fe565b146107f05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106b7565b3360c08201526107ff81611746565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108bb57600061089a7f000000000000000000000000000000000000000000000000000000000000000034612256565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161091257610912612277565b040311156109555760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106b7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109d85760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016106b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5a919061228d565b7f000000000000000000000000000000000000000000000000000000000000000014610abc5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016106b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3e91906122a6565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610bb15760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016106b7565b60015483118015610bc157508115155b15610c0457600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610c0d81611746565b60008481526002602052604090205403610c6a578051829003610c3657600160a0820152610c51565b60c08101516001600160a01b031615610c5157600260a08201525b610c5a81611746565b6000848152600260205260409020555b505050565b6000610c9b7f0000000000000000000000000000000000000000000000000000000000000000426122c3565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d0b5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b60448201526064016106b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8d919061228d565b7f000000000000000000000000000000000000000000000000000000000000000014610def5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016106b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7191906122a6565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610ee45760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016106b7565b8060055410610f2c5760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106b7565b81600454146108bb57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6006546001600160a01b03163314610f8e57600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610ffe5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106b7565b8061101b5760405162461bcd60e51b81526004016106b79061222e565b6000828152600260205260409020541561106d5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106b7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526110b390611746565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050565b604085106111405760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106b7565b60008484848460405160200161115994939291906122e5565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156111d957600088888381811061119b5761119b612327565b905060200201359050828111156111c0578260005280602052604060002092506111d0565b8060005282602052604060002092505b5060010161117f565b50806000541461121c5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106b7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112915760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106b7565b6000838152600360205260408082206001851b84179055516001600160a01b038916906112c1908990899061233d565b6000604051808303816000865af19150503d80600081146112fe576040519150601f19603f3d011682016040523d82523d6000602084013e611303565b606091505b50509050806113545760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106b7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6113b06103c2368390038301836121be565b600083815260026020526040902054146113dc5760405162461bcd60e51b81526004016106b79061222e565b60026113ee60c0830160a0840161234d565b60028111156113ff576113ff6121fe565b146114405760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106b7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061149a93505060e0840191505060c083016121e1565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114ee81611746565b6000838152600260205260409020541461151a5760405162461bcd60e51b81526004016106b79061222e565b60018160a001516002811115611532576115326121fe565b1461156f5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106b7565b60008281526002602052604081205560c08101516001600160a01b03161561161b576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6006546001600160a01b0316331461168057600080fd5b61168981611746565b600083815260026020526040902054146116b55760405162461bcd60e51b81526004016106b79061222e565b63ffffffff4281166060830152431660808201526116d281611746565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610f6b565b60006117407f0000000000000000000000000000000000000000000000000000000000000000836122c3565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861177b989097969101612368565b604051602081830303815290604052805190602001209050919050565b6006546001600160a01b031633146117af57600080fd5b6006546001600160a01b031633146118095760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106b7565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161187e5761187e612277565b040311156118c15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106b7565b6118ca81611746565b600083815260026020526040902054146118f65760405162461bcd60e51b81526004016106b79061222e565b60c08101516001600160a01b0316156119485760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106b7565b60015482111561199057600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a08201526119a081611746565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a0957611a09612277565b040311611a4a5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106b7565b611a5381611746565b60008381526002602052604090205414611a7f5760405162461bcd60e51b81526004016106b79061222e565b60008160a001516002811115611a9757611a976121fe565b14611ad65760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106b7565b60c08101516001600160a01b0316156108bb5760208101516001600160a01b0316611b5a5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b6e82611746565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c1557611c15612277565b040311611c565760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106b7565b611c5f81611746565b60008381526002602052604090205414611c8b5760405162461bcd60e51b81526004016106b79061222e565b60008160a001516002811115611ca357611ca36121fe565b14611ce25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106b7565b60208101516001600160a01b0316156108bb5760c08101516001600160a01b0316611d675760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b6e82611746565b6000816060015163ffffffff16600003611d9757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611dd357506003919050565b60006005836060015163ffffffff16420381611df157611df1612277565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611e355760019250611e3a565b600092505b50505b919050565b611e4c8282610f77565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611e938382611669565b63ffffffff428116606083015243166080820152611eb1838261182b565b600160a0820152610c6a83826114e5565b6001600160a01b0381168114611ed757600080fd5b50565b8035611e3d81611ec2565b803563ffffffff81168114611e3d57600080fd5b803560038110611e3d57600080fd5b600060e08284031215611f1a57600080fd5b60405160e0810181811067ffffffffffffffff82111715611f4b57634e487b7160e01b600052604160045260246000fd5b60405282358152905080611f6160208401611eda565b6020820152611f7260408401611ee5565b6040820152611f8360608401611ee5565b6060820152611f9460808401611ee5565b6080820152611fa560a08401611ef9565b60a0820152611fb660c08401611eda565b60c08201525092915050565b6000806101008385031215611fd657600080fd5b82359150611fe78460208501611f08565b90509250929050565b6000806000610120848603121561200657600080fd5b833592506020840135915061201e8560408601611f08565b90509250925092565b60006020828403121561203957600080fd5b5035919050565b6000806040838503121561205357600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611e3d57600080fd5b60008083601f84011261208c57600080fd5b50813567ffffffffffffffff8111156120a457600080fd5b6020830191508360208285010111156120bc57600080fd5b9250929050565b600080600080600080608087890312156120dc57600080fd5b863567ffffffffffffffff808211156120f457600080fd5b818901915089601f83011261210857600080fd5b81358181111561211757600080fd5b8a60208260051b850101111561212c57600080fd5b6020830198508097505061214260208a01612062565b955061215060408a01611eda565b9450606089013591508082111561216657600080fd5b5061217389828a0161207a565b979a9699509497509295939492505050565b60008082840361010081121561219a57600080fd5b8335925060e0601f19820112156121b057600080fd5b506020830190509250929050565b600060e082840312156121d057600080fd5b6121da8383611f08565b9392505050565b6000602082840312156121f357600080fd5b81356121da81611ec2565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612228576122286121fe565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b8181038181111561174057634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60006020828403121561229f57600080fd5b5051919050565b6000602082840312156122b857600080fd5b81516121da81611ec2565b6000826122e057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561235f57600080fd5b6121da82611ef9565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106123c0576123c06121fe565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212200454cdd50c4f8ef4c5777954d7020a06e3c68dbbe80e8a98085a22451950e63f64736f6c63430008120033", "devdoc": { "details": "Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).", "events": { @@ -1249,7 +1262,7 @@ "storageLayout": { "storage": [ { - "astId": 2542, + "astId": 401, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "stateRoot", "offset": 0, @@ -1257,7 +1270,7 @@ "type": "t_bytes32" }, { - "astId": 2544, + "astId": 403, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "latestVerifiedEpoch", "offset": 0, @@ -1265,7 +1278,7 @@ "type": "t_uint256" }, { - "astId": 2548, + "astId": 407, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "claimHashes", "offset": 0, @@ -1273,7 +1286,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2552, + "astId": 411, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "relayed", "offset": 0, @@ -1281,7 +1294,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2554, + "astId": 413, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "sequencerDelayLimit", "offset": 0, @@ -1289,11 +1302,19 @@ "type": "t_uint256" }, { - "astId": 5927, + "astId": 415, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", - "label": "devnetOperator", + "label": "timestampDelayUpdated", "offset": 0, "slot": "5", + "type": "t_uint256" + }, + { + "astId": 1834, + "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", + "label": "devnetOperator", + "offset": 0, + "slot": "6", "type": "t_address" } ], diff --git a/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json b/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json index ae647e40..c900953d 100644 --- a/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json +++ b/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x359c4E8225866aB97ab054ec36aBe923e70eF741", + "address": "0xb61BEB66796Bbf59BBa3e5feE4Bab2304B889590", "abi": [ { "inputs": [ @@ -683,6 +683,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "timestampDelayUpdated", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -977,19 +990,19 @@ "type": "function" } ], - "transactionHash": "0x24c8d94912cd08beb1fd1cfba4e11ad4b1fa8e73f67b0ef8a6aa246ff632b5f6", + "transactionHash": "0xc72f29f288a9416393c3b615503aaf94e0de8b2d93da779606000314148107ea", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x359c4E8225866aB97ab054ec36aBe923e70eF741", + "contractAddress": "0xb61BEB66796Bbf59BBa3e5feE4Bab2304B889590", "transactionIndex": 2, - "gasUsed": "2148233", + "gasUsed": "2152128", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa8bc2e9bee7c2f3c68ce447d791e1b691169ffb028ab5317b0019a31b758467f", - "transactionHash": "0x24c8d94912cd08beb1fd1cfba4e11ad4b1fa8e73f67b0ef8a6aa246ff632b5f6", + "blockHash": "0x4a0f9b104a2ad838380817f2d7084500a797ff53cef68254414da1bc113be7c4", + "transactionHash": "0xc72f29f288a9416393c3b615503aaf94e0de8b2d93da779606000314148107ea", "logs": [], - "blockNumber": 4487311, - "cumulativeGasUsed": "2396668", + "blockNumber": 4488129, + "cumulativeGasUsed": "2208472", "status": 1, "byzantium": true }, @@ -999,16 +1012,16 @@ 10800, 1000000, "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0x8228116e0d5Fd2611788E68fF77D5f21b005cE11", + "0xF04354D2286C8Db33aE6F454728C2F935ae5CD82", 86400, 1000000, 5 ], - "numDeployments": 5, - "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":\"VeaOutboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n uint256 internal constant RELAY_TIMEOUT = 604800; // 7 days\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(_timestamp + RELAY_TIMEOUT >= block.timestamp, \\\"Stale message. Timeout exceeded.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x4071f3ea552af8995a457452838f14493645a15b9eed12ae248ed5ab22316b4b\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101c06040523480156200001257600080fd5b5060405162002861380380620028618339810160408190526200003591620000ea565b60c08990526101408890526101808690526101608790526001600160a01b03808616608052841660a0526101a082905261012081905260048390556200007d60028a62000183565b60e08190526200008f8a6002620001a6565b6200009b9190620001c6565b6101005261014051600190620000b2904262000183565b620000be9190620001c6565b60015550620001dc975050505050505050565b6001600160a01b0381168114620000e757600080fd5b50565b60008060008060008060008060006101208a8c0312156200010a57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a01516200013381620000d1565b60a08b01519095506200014681620000d1565b8094505060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001a157634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001c057620001c06200016d565b92915050565b81810381811115620001c057620001c06200016d565b60805160a05160c05160e05161010051610120516101405161016051610180516101a05161251b62000346600039600081816104440152611f690152600081816104780152818161082d0152818161192801528181611b1c0152611d280152600081816105000152611efd0152600081816104ac0152818161085101528181610be201528181610f6301528181610feb015281816116ef015281816118a90152818161194c01528181611b400152611d4c0152600081816103ad015281816109c80152610cfb015260006115060152600081816114b301526116180152600081816105340152818161062d015281816107b4015281816107e101528181610ef30152818161167b01528181611c8601528181611ced0152611e9301526000818161056801528181610ab50152610de8015260008181610203015281816108cc0152818161094601528181610a2a01528181610c1701528181610c790152610d5d015261251b6000f3fe6080604052600436106101b75760003560e01c80638d96fdea116100ec578063b633b9441161008a578063d5e6a9df11610064578063d5e6a9df14610556578063da2b7bc41461058a578063df19e6ff146105aa578063e813a755146105d757600080fd5b8063b633b944146104ce578063c2114a16146104ee578063d0e30db01461052257600080fd5b80639588eca2116100c65780639588eca21461041c578063aa22a1c614610432578063b044397e14610466578063b5b7a1841461049a57600080fd5b80638d96fdea1461039b57806390df63b7146103cf578063930f28af146103fc57600080fd5b806331d14457116101595780634788cb38116101335780634788cb381461031b57806349b4299e1461033b5780634a439cfe1461035b578063541adcca1461037b57600080fd5b806331d14457146102c857806331ddf743146102db5780633ce43cfd146102fb57600080fd5b8063222ae78611610195578063222ae786146102425780632639c0601461026557806327ee6bdd146102925780632c192519146102a857600080fd5b806301139b68146101bc5780630f0adca5146101d15780631062b39a146101f1575b600080fd5b6101cf6101ca3660046120a6565b6105ed565b005b3480156101dd57600080fd5b506101cf6101ec3660046120d4565b61082b565b3480156101fd57600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024e57600080fd5b50610257610bdb565b604051908152602001610239565b34801561027157600080fd5b5061025761028036600461210b565b60026020526000908152604090205481565b34801561029e57600080fd5b5061025760015481565b3480156102b457600080fd5b506101cf6102c3366004612124565b610c0c565b6101cf6102d6366004612124565b610ef1565b3480156102e757600080fd5b506101cf6102f63660046121a7565b61115c565b34801561030757600080fd5b506101cf610316366004612269565b6113fc565b34801561032757600080fd5b506101cf610336366004612269565b611543565b34801561034757600080fd5b506101cf6103563660046120a6565b6116b8565b34801561036757600080fd5b5061025761037636600461210b565b6118a2565b34801561038757600080fd5b506102576103963660046122a2565b6118d4565b3480156103a757600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156103db57600080fd5b506102576103ea36600461210b565b60036020526000908152604090205481565b34801561040857600080fd5b506101cf6104173660046120a6565b611926565b34801561042857600080fd5b5061025760005481565b34801561043e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561047257600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a657600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104da57600080fd5b506101cf6104e93660046120a6565b611b1a565b3480156104fa57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561052e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561056257600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b34801561059657600080fd5b506101cf6105a53660046120a6565b611d26565b3480156105b657600080fd5b506105ca6105c53660046122a2565b611edf565b60405161023991906122db565b3480156105e357600080fd5b5061025760045481565b6105f6816118d4565b6000838152600260205260409020541461062b5760405162461bcd60e51b8152600401610622906122f5565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561069b5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610622565b60c08101516001600160a01b0316156106f65760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610622565b60008160a00151600281111561070e5761070e6122c5565b1461075b5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610622565b3360c082015261076a816118d4565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108275760006108067f000000000000000000000000000000000000000000000000000000000000000034612333565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161087e5761087e612346565b040311156108c15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109445760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c6919061235c565b7f000000000000000000000000000000000000000000000000000000000000000014610a285760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aaa9190612375565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b1d5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b60015483118015610b2d57508115155b15610b7057600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b79816118d4565b60008481526002602052604090205403610bd6578051829003610ba257600160a0820152610bbd565b60c08101516001600160a01b031615610bbd57600260a08201525b610bc6816118d4565b6000848152600260205260409020555b505050565b6000610c077f000000000000000000000000000000000000000000000000000000000000000042612392565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c775760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf9919061235c565b7f000000000000000000000000000000000000000000000000000000000000000014610d5b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610db9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddd9190612375565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610e505760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b42610e5e62093a80836123b4565b1015610eac5760405162461bcd60e51b815260206004820181905260248201527f5374616c65206d6573736167652e2054696d656f75742065786365656465642e6044820152606401610622565b81600454146108275760048290556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15050565b7f0000000000000000000000000000000000000000000000000000000000000000341015610f615760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000004281610f9057610f90612346565b048210610fdf5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610622565b600454421115611063577f000000000000000000000000000000000000000000000000000000000000000060045442038161101c5761101c612346565b048260010110156110635760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610622565b806110805760405162461bcd60e51b8152600401610622906122f5565b600082815260026020526040902054156110d25760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610622565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611118906118d4565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107aa565b6040851061119e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610622565b6000848484846040516020016111b794939291906123c7565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156112375760008888838181106111f9576111f9612409565b9050602002013590508281111561121e5782600052806020526040600020925061122e565b8060005282602052604060002092505b506001016111dd565b50806000541461127a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610622565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112ef5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610622565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061131f908990899061241f565b6000604051808303816000865af19150503d806000811461135c576040519150601f19603f3d011682016040523d82523d6000602084013e611361565b606091505b50509050806113b25760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610622565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61140e610396368390038301836122a2565b6000838152600260205260409020541461143a5760405162461bcd60e51b8152600401610622906122f5565b600261144c60c0830160a0840161242f565b600281111561145d5761145d6122c5565b1461149e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610622565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114f893505060e0840191505060c0830161244a565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611555610396368390038301836122a2565b600083815260026020526040902054146115815760405162461bcd60e51b8152600401610622906122f5565b600161159360c0830160a0840161242f565b60028111156115a4576115a46122c5565b146115e15760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610622565b600082815260026020526040812081905561160260e0830160c0840161244a565b6001600160a01b03161461165d576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114f8935050604084019150506020830161244a565b61166d604082016020830161244a565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6116c1816118d4565b600083815260026020526040902054146116ed5760405162461bcd60e51b8152600401610622906122f5565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff1661172691906123b4565b61173091906123b4565b4210156117945760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610622565b600061179f82611edf565b905060028160038111156117b5576117b56122c5565b14806117d2575060008160038111156117d0576117d06122c5565b145b61183b5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610622565b63ffffffff428116606084015243166080830152611858826118d4565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006118ce7f000000000000000000000000000000000000000000000000000000000000000083612392565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611909989097969101612467565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161197957611979612346565b040311156119bc5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b6119c5816118d4565b600083815260026020526040902054146119f15760405162461bcd60e51b8152600401610622906122f5565b60c08101516001600160a01b031615611a435760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610622565b6001611a4e82611edf565b6003811115611a5f57611a5f6122c5565b14611aac5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610622565b600154821115611af457600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b04816118d4565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b6d57611b6d612346565b040311611bae5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611bb7816118d4565b60008381526002602052604090205414611be35760405162461bcd60e51b8152600401610622906122f5565b60008160a001516002811115611bfb57611bfb6122c5565b14611c3a5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60c08101516001600160a01b0316156108275760208101516001600160a01b0316611cbe5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611cd2826118d4565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d7957611d79612346565b040311611dba5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611dc3816118d4565b60008381526002602052604090205414611def5760405162461bcd60e51b8152600401610622906122f5565b60008160a001516002811115611e0757611e076122c5565b14611e465760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60208101516001600160a01b0316156108275760c08101516001600160a01b0316611ecb5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611cd2826118d4565b6000816060015163ffffffff16600003611efb57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f3757506003919050565b60006005836060015163ffffffff16420381611f5557611f55612346565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611f995760019250611f9e565b600092505b50505b919050565b6001600160a01b0381168114611fbb57600080fd5b50565b8035611fa181611fa6565b803563ffffffff81168114611fa157600080fd5b803560038110611fa157600080fd5b600060e08284031215611ffe57600080fd5b60405160e0810181811067ffffffffffffffff8211171561202f57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061204560208401611fbe565b602082015261205660408401611fc9565b604082015261206760608401611fc9565b606082015261207860808401611fc9565b608082015261208960a08401611fdd565b60a082015261209a60c08401611fbe565b60c08201525092915050565b60008061010083850312156120ba57600080fd5b823591506120cb8460208501611fec565b90509250929050565b600080600061012084860312156120ea57600080fd5b83359250602084013591506121028560408601611fec565b90509250925092565b60006020828403121561211d57600080fd5b5035919050565b6000806040838503121561213757600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611fa157600080fd5b60008083601f84011261217057600080fd5b50813567ffffffffffffffff81111561218857600080fd5b6020830191508360208285010111156121a057600080fd5b9250929050565b600080600080600080608087890312156121c057600080fd5b863567ffffffffffffffff808211156121d857600080fd5b818901915089601f8301126121ec57600080fd5b8135818111156121fb57600080fd5b8a60208260051b850101111561221057600080fd5b6020830198508097505061222660208a01612146565b955061223460408a01611fbe565b9450606089013591508082111561224a57600080fd5b5061225789828a0161215e565b979a9699509497509295939492505050565b60008082840361010081121561227e57600080fd5b8335925060e0601f198201121561229457600080fd5b506020830190509250929050565b600060e082840312156122b457600080fd5b6122be8383611fec565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122ef576122ef6122c5565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156118ce576118ce61231d565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561236e57600080fd5b5051919050565b60006020828403121561238757600080fd5b81516122be81611fa6565b6000826123af57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156118ce576118ce61231d565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561244157600080fd5b6122be82611fdd565b60006020828403121561245c57600080fd5b81356122be81611fa6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124bf576124bf6122c5565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122006831bcf0ac6e1dd77b38f610cc19ea30b6cd65d9a52fdf2610dd2affdf3a61264736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101b75760003560e01c80638d96fdea116100ec578063b633b9441161008a578063d5e6a9df11610064578063d5e6a9df14610556578063da2b7bc41461058a578063df19e6ff146105aa578063e813a755146105d757600080fd5b8063b633b944146104ce578063c2114a16146104ee578063d0e30db01461052257600080fd5b80639588eca2116100c65780639588eca21461041c578063aa22a1c614610432578063b044397e14610466578063b5b7a1841461049a57600080fd5b80638d96fdea1461039b57806390df63b7146103cf578063930f28af146103fc57600080fd5b806331d14457116101595780634788cb38116101335780634788cb381461031b57806349b4299e1461033b5780634a439cfe1461035b578063541adcca1461037b57600080fd5b806331d14457146102c857806331ddf743146102db5780633ce43cfd146102fb57600080fd5b8063222ae78611610195578063222ae786146102425780632639c0601461026557806327ee6bdd146102925780632c192519146102a857600080fd5b806301139b68146101bc5780630f0adca5146101d15780631062b39a146101f1575b600080fd5b6101cf6101ca3660046120a6565b6105ed565b005b3480156101dd57600080fd5b506101cf6101ec3660046120d4565b61082b565b3480156101fd57600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561024e57600080fd5b50610257610bdb565b604051908152602001610239565b34801561027157600080fd5b5061025761028036600461210b565b60026020526000908152604090205481565b34801561029e57600080fd5b5061025760015481565b3480156102b457600080fd5b506101cf6102c3366004612124565b610c0c565b6101cf6102d6366004612124565b610ef1565b3480156102e757600080fd5b506101cf6102f63660046121a7565b61115c565b34801561030757600080fd5b506101cf610316366004612269565b6113fc565b34801561032757600080fd5b506101cf610336366004612269565b611543565b34801561034757600080fd5b506101cf6103563660046120a6565b6116b8565b34801561036757600080fd5b5061025761037636600461210b565b6118a2565b34801561038757600080fd5b506102576103963660046122a2565b6118d4565b3480156103a757600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156103db57600080fd5b506102576103ea36600461210b565b60036020526000908152604090205481565b34801561040857600080fd5b506101cf6104173660046120a6565b611926565b34801561042857600080fd5b5061025760005481565b34801561043e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561047257600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a657600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b3480156104da57600080fd5b506101cf6104e93660046120a6565b611b1a565b3480156104fa57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561052e57600080fd5b506102577f000000000000000000000000000000000000000000000000000000000000000081565b34801561056257600080fd5b506102257f000000000000000000000000000000000000000000000000000000000000000081565b34801561059657600080fd5b506101cf6105a53660046120a6565b611d26565b3480156105b657600080fd5b506105ca6105c53660046122a2565b611edf565b60405161023991906122db565b3480156105e357600080fd5b5061025760045481565b6105f6816118d4565b6000838152600260205260409020541461062b5760405162461bcd60e51b8152600401610622906122f5565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561069b5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610622565b60c08101516001600160a01b0316156106f65760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610622565b60008160a00151600281111561070e5761070e6122c5565b1461075b5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610622565b3360c082015261076a816118d4565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108275760006108067f000000000000000000000000000000000000000000000000000000000000000034612333565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161087e5761087e612346565b040311156108c15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109445760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c6919061235c565b7f000000000000000000000000000000000000000000000000000000000000000014610a285760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aaa9190612375565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b1d5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b60015483118015610b2d57508115155b15610b7057600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b79816118d4565b60008481526002602052604090205403610bd6578051829003610ba257600160a0820152610bbd565b60c08101516001600160a01b031615610bbd57600260a08201525b610bc6816118d4565b6000848152600260205260409020555b505050565b6000610c077f000000000000000000000000000000000000000000000000000000000000000042612392565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c775760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf9919061235c565b7f000000000000000000000000000000000000000000000000000000000000000014610d5b5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610db9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddd9190612375565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610e505760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610622565b42610e5e62093a80836123b4565b1015610eac5760405162461bcd60e51b815260206004820181905260248201527f5374616c65206d6573736167652e2054696d656f75742065786365656465642e6044820152606401610622565b81600454146108275760048290556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15050565b7f0000000000000000000000000000000000000000000000000000000000000000341015610f615760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610622565b7f00000000000000000000000000000000000000000000000000000000000000004281610f9057610f90612346565b048210610fdf5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610622565b600454421115611063577f000000000000000000000000000000000000000000000000000000000000000060045442038161101c5761101c612346565b048260010110156110635760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610622565b806110805760405162461bcd60e51b8152600401610622906122f5565b600082815260026020526040902054156110d25760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610622565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611118906118d4565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107aa565b6040851061119e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610622565b6000848484846040516020016111b794939291906123c7565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156112375760008888838181106111f9576111f9612409565b9050602002013590508281111561121e5782600052806020526040600020925061122e565b8060005282602052604060002092505b506001016111dd565b50806000541461127a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610622565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112ef5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610622565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061131f908990899061241f565b6000604051808303816000865af19150503d806000811461135c576040519150601f19603f3d011682016040523d82523d6000602084013e611361565b606091505b50509050806113b25760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610622565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61140e610396368390038301836122a2565b6000838152600260205260409020541461143a5760405162461bcd60e51b8152600401610622906122f5565b600261144c60c0830160a0840161242f565b600281111561145d5761145d6122c5565b1461149e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610622565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114f893505060e0840191505060c0830161244a565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611555610396368390038301836122a2565b600083815260026020526040902054146115815760405162461bcd60e51b8152600401610622906122f5565b600161159360c0830160a0840161242f565b60028111156115a4576115a46122c5565b146115e15760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610622565b600082815260026020526040812081905561160260e0830160c0840161244a565b6001600160a01b03161461165d576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114f8935050604084019150506020830161244a565b61166d604082016020830161244a565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6116c1816118d4565b600083815260026020526040902054146116ed5760405162461bcd60e51b8152600401610622906122f5565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff1661172691906123b4565b61173091906123b4565b4210156117945760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610622565b600061179f82611edf565b905060028160038111156117b5576117b56122c5565b14806117d2575060008160038111156117d0576117d06122c5565b145b61183b5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610622565b63ffffffff428116606084015243166080830152611858826118d4565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006118ce7f000000000000000000000000000000000000000000000000000000000000000083612392565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611909989097969101612467565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161197957611979612346565b040311156119bc5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610622565b6119c5816118d4565b600083815260026020526040902054146119f15760405162461bcd60e51b8152600401610622906122f5565b60c08101516001600160a01b031615611a435760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610622565b6001611a4e82611edf565b6003811115611a5f57611a5f6122c5565b14611aac5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610622565b600154821115611af457600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b04816118d4565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b6d57611b6d612346565b040311611bae5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611bb7816118d4565b60008381526002602052604090205414611be35760405162461bcd60e51b8152600401610622906122f5565b60008160a001516002811115611bfb57611bfb6122c5565b14611c3a5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60c08101516001600160a01b0316156108275760208101516001600160a01b0316611cbe5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611cd2826118d4565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d7957611d79612346565b040311611dba5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610622565b611dc3816118d4565b60008381526002602052604090205414611def5760405162461bcd60e51b8152600401610622906122f5565b60008160a001516002811115611e0757611e076122c5565b14611e465760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610622565b60208101516001600160a01b0316156108275760c08101516001600160a01b0316611ecb5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611cd2826118d4565b6000816060015163ffffffff16600003611efb57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f3757506003919050565b60006005836060015163ffffffff16420381611f5557611f55612346565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611f995760019250611f9e565b600092505b50505b919050565b6001600160a01b0381168114611fbb57600080fd5b50565b8035611fa181611fa6565b803563ffffffff81168114611fa157600080fd5b803560038110611fa157600080fd5b600060e08284031215611ffe57600080fd5b60405160e0810181811067ffffffffffffffff8211171561202f57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061204560208401611fbe565b602082015261205660408401611fc9565b604082015261206760608401611fc9565b606082015261207860808401611fc9565b608082015261208960a08401611fdd565b60a082015261209a60c08401611fbe565b60c08201525092915050565b60008061010083850312156120ba57600080fd5b823591506120cb8460208501611fec565b90509250929050565b600080600061012084860312156120ea57600080fd5b83359250602084013591506121028560408601611fec565b90509250925092565b60006020828403121561211d57600080fd5b5035919050565b6000806040838503121561213757600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611fa157600080fd5b60008083601f84011261217057600080fd5b50813567ffffffffffffffff81111561218857600080fd5b6020830191508360208285010111156121a057600080fd5b9250929050565b600080600080600080608087890312156121c057600080fd5b863567ffffffffffffffff808211156121d857600080fd5b818901915089601f8301126121ec57600080fd5b8135818111156121fb57600080fd5b8a60208260051b850101111561221057600080fd5b6020830198508097505061222660208a01612146565b955061223460408a01611fbe565b9450606089013591508082111561224a57600080fd5b5061225789828a0161215e565b979a9699509497509295939492505050565b60008082840361010081121561227e57600080fd5b8335925060e0601f198201121561229457600080fd5b506020830190509250929050565b600060e082840312156122b457600080fd5b6122be8383611fec565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122ef576122ef6122c5565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156118ce576118ce61231d565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561236e57600080fd5b5051919050565b60006020828403121561238757600080fd5b81516122be81611fa6565b6000826123af57634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156118ce576118ce61231d565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561244157600080fd5b6122be82611fdd565b60006020828403121561245c57600080fd5b81356122be81611fa6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124bf576124bf6122c5565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122006831bcf0ac6e1dd77b38f610cc19ea30b6cd65d9a52fdf2610dd2affdf3a61264736f6c63430008120033", + "numDeployments": 6, + "solcInputHash": "26a65a18c178d77477789f8130b0944b", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":\"VeaOutboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x5e9eaf576f7ebe3aca5fa0c442c96bd201999d5e3b27ec731572fe927b6d84a0\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101c06040523480156200001257600080fd5b5060405162002873380380620028738339810160408190526200003591620000ea565b60c08990526101408890526101808690526101608790526001600160a01b03808616608052841660a0526101a082905261012081905260048390556200007d60028a62000183565b60e08190526200008f8a6002620001a6565b6200009b9190620001c6565b6101005261014051600190620000b2904262000183565b620000be9190620001c6565b60015550620001dc975050505050505050565b6001600160a01b0381168114620000e757600080fd5b50565b60008060008060008060008060006101208a8c0312156200010a57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a01516200013381620000d1565b60a08b01519095506200014681620000d1565b8094505060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001a157634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001c057620001c06200016d565b92915050565b81810381811115620001c057620001c06200016d565b60805160a05160c05160e05161010051610120516101405161016051610180516101a05161252d62000346600039600081816104650152611f7b0152600081816104990152818161084e0152818161193a01528181611b2e0152611d3a0152600081816105210152611f0f0152600081816104cd0152818161087201528181610c0301528181610f7501528181610ffd01528181611701015281816118bb0152818161195e01528181611b520152611d5e0152600081816103ce015281816109e90152610d1c015260006115180152600081816114c5015261162a0152600081816105550152818161064e015281816107d50152818161080201528181610f050152818161168d01528181611c9801528181611cff0152611ea501526000818161058901528181610ad60152610e0901526000818161020e015281816108ed0152818161096701528181610a4b01528181610c3801528181610c9a0152610d7e015261252d6000f3fe6080604052600436106101c25760003560e01c80637ffc2a6e116100f7578063b5b7a18411610095578063d5e6a9df11610064578063d5e6a9df14610577578063da2b7bc4146105ab578063df19e6ff146105cb578063e813a755146105f857600080fd5b8063b5b7a184146104bb578063b633b944146104ef578063c2114a161461050f578063d0e30db01461054357600080fd5b8063930f28af116100d1578063930f28af1461041d5780639588eca21461043d578063aa22a1c614610453578063b044397e1461048757600080fd5b80637ffc2a6e146103a65780638d96fdea146103bc57806390df63b7146103f057600080fd5b806331d14457116101645780634788cb381161013e5780634788cb381461032657806349b4299e146103465780634a439cfe14610366578063541adcca1461038657600080fd5b806331d14457146102d357806331ddf743146102e65780633ce43cfd1461030657600080fd5b8063222ae786116101a0578063222ae7861461024d5780632639c0601461027057806327ee6bdd1461029d5780632c192519146102b357600080fd5b806301139b68146101c75780630f0adca5146101dc5780631062b39a146101fc575b600080fd5b6101da6101d53660046120b8565b61060e565b005b3480156101e857600080fd5b506101da6101f73660046120e6565b61084c565b34801561020857600080fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561025957600080fd5b50610262610bfc565b604051908152602001610244565b34801561027c57600080fd5b5061026261028b36600461211d565b60026020526000908152604090205481565b3480156102a957600080fd5b5061026260015481565b3480156102bf57600080fd5b506101da6102ce366004612136565b610c2d565b6101da6102e1366004612136565b610f03565b3480156102f257600080fd5b506101da6103013660046121b9565b61116e565b34801561031257600080fd5b506101da61032136600461227b565b61140e565b34801561033257600080fd5b506101da61034136600461227b565b611555565b34801561035257600080fd5b506101da6103613660046120b8565b6116ca565b34801561037257600080fd5b5061026261038136600461211d565b6118b4565b34801561039257600080fd5b506102626103a13660046122b4565b6118e6565b3480156103b257600080fd5b5061026260055481565b3480156103c857600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b3480156103fc57600080fd5b5061026261040b36600461211d565b60036020526000908152604090205481565b34801561042957600080fd5b506101da6104383660046120b8565b611938565b34801561044957600080fd5b5061026260005481565b34801561045f57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561049357600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c757600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b3480156104fb57600080fd5b506101da61050a3660046120b8565b611b2c565b34801561051b57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561054f57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561058357600080fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b3480156105b757600080fd5b506101da6105c63660046120b8565b611d38565b3480156105d757600080fd5b506105eb6105e63660046122b4565b611ef1565b60405161024491906122ed565b34801561060457600080fd5b5061026260045481565b610617816118e6565b6000838152600260205260409020541461064c5760405162461bcd60e51b815260040161064390612307565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106bc5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610643565b60c08101516001600160a01b0316156107175760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610643565b60008160a00151600281111561072f5761072f6122d7565b1461077c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610643565b3360c082015261078b816118e6565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108485760006108277f000000000000000000000000000000000000000000000000000000000000000034612345565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161089f5761089f612358565b040311156108e25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610643565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109655760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610643565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e7919061236e565b7f000000000000000000000000000000000000000000000000000000000000000014610a495760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610643565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612387565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b3e5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610643565b60015483118015610b4e57508115155b15610b9157600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b9a816118e6565b60008481526002602052604090205403610bf7578051829003610bc357600160a0820152610bde565b60c08101516001600160a01b031615610bde57600260a08201525b610be7816118e6565b6000848152600260205260409020555b505050565b6000610c287f0000000000000000000000000000000000000000000000000000000000000000426123a4565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c985760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610643565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cf6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1a919061236e565b7f000000000000000000000000000000000000000000000000000000000000000014610d7c5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610643565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfe9190612387565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610e715760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610643565b8060055410610eb95760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b6044820152606401610643565b816004541461084857600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15050565b7f0000000000000000000000000000000000000000000000000000000000000000341015610f735760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610643565b7f00000000000000000000000000000000000000000000000000000000000000004281610fa257610fa2612358565b048210610ff15760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610643565b600454421115611075577f000000000000000000000000000000000000000000000000000000000000000060045442038161102e5761102e612358565b048260010110156110755760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610643565b806110925760405162461bcd60e51b815260040161064390612307565b600082815260026020526040902054156110e45760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610643565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261112a906118e6565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107cb565b604085106111b05760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610643565b6000848484846040516020016111c994939291906123c6565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561124957600088888381811061120b5761120b612408565b9050602002013590508281111561123057826000528060205260406000209250611240565b8060005282602052604060002092505b506001016111ef565b50806000541461128c5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610643565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156113015760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610643565b6000838152600360205260408082206001851b84179055516001600160a01b03891690611331908990899061241e565b6000604051808303816000865af19150503d806000811461136e576040519150601f19603f3d011682016040523d82523d6000602084013e611373565b606091505b50509050806113c45760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610643565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6114206103a1368390038301836122b4565b6000838152600260205260409020541461144c5760405162461bcd60e51b815260040161064390612307565b600261145e60c0830160a0840161242e565b600281111561146f5761146f6122d7565b146114b05760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610643565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061150a93505060e0840191505060c08301612449565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6115676103a1368390038301836122b4565b600083815260026020526040902054146115935760405162461bcd60e51b815260040161064390612307565b60016115a560c0830160a0840161242e565b60028111156115b6576115b66122d7565b146115f35760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610643565b600082815260026020526040812081905561161460e0830160c08401612449565b6001600160a01b03161461166f576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061150a9350506040840191505060208301612449565b61167f6040820160208301612449565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6116d3816118e6565b600083815260026020526040902054146116ff5760405162461bcd60e51b815260040161064390612307565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166117389190612466565b6117429190612466565b4210156117a65760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610643565b60006117b182611ef1565b905060028160038111156117c7576117c76122d7565b14806117e4575060008160038111156117e2576117e26122d7565b145b61184d5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610643565b63ffffffff42811660608401524316608083015261186a826118e6565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006118e07f0000000000000000000000000000000000000000000000000000000000000000836123a4565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861191b989097969101612479565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161198b5761198b612358565b040311156119ce5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610643565b6119d7816118e6565b60008381526002602052604090205414611a035760405162461bcd60e51b815260040161064390612307565b60c08101516001600160a01b031615611a555760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610643565b6001611a6082611ef1565b6003811115611a7157611a716122d7565b14611abe5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610643565b600154821115611b0657600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b16816118e6565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b7f57611b7f612358565b040311611bc05760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610643565b611bc9816118e6565b60008381526002602052604090205414611bf55760405162461bcd60e51b815260040161064390612307565b60008160a001516002811115611c0d57611c0d6122d7565b14611c4c5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610643565b60c08101516001600160a01b0316156108485760208101516001600160a01b0316611cd05760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611ce4826118e6565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d8b57611d8b612358565b040311611dcc5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610643565b611dd5816118e6565b60008381526002602052604090205414611e015760405162461bcd60e51b815260040161064390612307565b60008160a001516002811115611e1957611e196122d7565b14611e585760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610643565b60208101516001600160a01b0316156108485760c08101516001600160a01b0316611edd5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611ce4826118e6565b6000816060015163ffffffff16600003611f0d57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f4957506003919050565b60006005836060015163ffffffff16420381611f6757611f67612358565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611fab5760019250611fb0565b600092505b50505b919050565b6001600160a01b0381168114611fcd57600080fd5b50565b8035611fb381611fb8565b803563ffffffff81168114611fb357600080fd5b803560038110611fb357600080fd5b600060e0828403121561201057600080fd5b60405160e0810181811067ffffffffffffffff8211171561204157634e487b7160e01b600052604160045260246000fd5b6040528235815290508061205760208401611fd0565b602082015261206860408401611fdb565b604082015261207960608401611fdb565b606082015261208a60808401611fdb565b608082015261209b60a08401611fef565b60a08201526120ac60c08401611fd0565b60c08201525092915050565b60008061010083850312156120cc57600080fd5b823591506120dd8460208501611ffe565b90509250929050565b600080600061012084860312156120fc57600080fd5b83359250602084013591506121148560408601611ffe565b90509250925092565b60006020828403121561212f57600080fd5b5035919050565b6000806040838503121561214957600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611fb357600080fd5b60008083601f84011261218257600080fd5b50813567ffffffffffffffff81111561219a57600080fd5b6020830191508360208285010111156121b257600080fd5b9250929050565b600080600080600080608087890312156121d257600080fd5b863567ffffffffffffffff808211156121ea57600080fd5b818901915089601f8301126121fe57600080fd5b81358181111561220d57600080fd5b8a60208260051b850101111561222257600080fd5b6020830198508097505061223860208a01612158565b955061224660408a01611fd0565b9450606089013591508082111561225c57600080fd5b5061226989828a01612170565b979a9699509497509295939492505050565b60008082840361010081121561229057600080fd5b8335925060e0601f19820112156122a657600080fd5b506020830190509250929050565b600060e082840312156122c657600080fd5b6122d08383611ffe565b9392505050565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612301576123016122d7565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156118e0576118e061232f565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561238057600080fd5b5051919050565b60006020828403121561239957600080fd5b81516122d081611fb8565b6000826123c157634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561244057600080fd5b6122d082611fef565b60006020828403121561245b57600080fd5b81356122d081611fb8565b808201808211156118e0576118e061232f565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124d1576124d16122d7565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220ee7ca9cb524c4095445fa31d263819f589b328cdbaa5041b2012ecd77747f56f64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101c25760003560e01c80637ffc2a6e116100f7578063b5b7a18411610095578063d5e6a9df11610064578063d5e6a9df14610577578063da2b7bc4146105ab578063df19e6ff146105cb578063e813a755146105f857600080fd5b8063b5b7a184146104bb578063b633b944146104ef578063c2114a161461050f578063d0e30db01461054357600080fd5b8063930f28af116100d1578063930f28af1461041d5780639588eca21461043d578063aa22a1c614610453578063b044397e1461048757600080fd5b80637ffc2a6e146103a65780638d96fdea146103bc57806390df63b7146103f057600080fd5b806331d14457116101645780634788cb381161013e5780634788cb381461032657806349b4299e146103465780634a439cfe14610366578063541adcca1461038657600080fd5b806331d14457146102d357806331ddf743146102e65780633ce43cfd1461030657600080fd5b8063222ae786116101a0578063222ae7861461024d5780632639c0601461027057806327ee6bdd1461029d5780632c192519146102b357600080fd5b806301139b68146101c75780630f0adca5146101dc5780631062b39a146101fc575b600080fd5b6101da6101d53660046120b8565b61060e565b005b3480156101e857600080fd5b506101da6101f73660046120e6565b61084c565b34801561020857600080fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561025957600080fd5b50610262610bfc565b604051908152602001610244565b34801561027c57600080fd5b5061026261028b36600461211d565b60026020526000908152604090205481565b3480156102a957600080fd5b5061026260015481565b3480156102bf57600080fd5b506101da6102ce366004612136565b610c2d565b6101da6102e1366004612136565b610f03565b3480156102f257600080fd5b506101da6103013660046121b9565b61116e565b34801561031257600080fd5b506101da61032136600461227b565b61140e565b34801561033257600080fd5b506101da61034136600461227b565b611555565b34801561035257600080fd5b506101da6103613660046120b8565b6116ca565b34801561037257600080fd5b5061026261038136600461211d565b6118b4565b34801561039257600080fd5b506102626103a13660046122b4565b6118e6565b3480156103b257600080fd5b5061026260055481565b3480156103c857600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b3480156103fc57600080fd5b5061026261040b36600461211d565b60036020526000908152604090205481565b34801561042957600080fd5b506101da6104383660046120b8565b611938565b34801561044957600080fd5b5061026260005481565b34801561045f57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561049357600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c757600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b3480156104fb57600080fd5b506101da61050a3660046120b8565b611b2c565b34801561051b57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561054f57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561058357600080fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b3480156105b757600080fd5b506101da6105c63660046120b8565b611d38565b3480156105d757600080fd5b506105eb6105e63660046122b4565b611ef1565b60405161024491906122ed565b34801561060457600080fd5b5061026260045481565b610617816118e6565b6000838152600260205260409020541461064c5760405162461bcd60e51b815260040161064390612307565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106bc5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610643565b60c08101516001600160a01b0316156107175760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610643565b60008160a00151600281111561072f5761072f6122d7565b1461077c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610643565b3360c082015261078b816118e6565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108485760006108277f000000000000000000000000000000000000000000000000000000000000000034612345565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161089f5761089f612358565b040311156108e25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610643565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109655760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610643565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e7919061236e565b7f000000000000000000000000000000000000000000000000000000000000000014610a495760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610643565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612387565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b3e5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610643565b60015483118015610b4e57508115155b15610b9157600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b9a816118e6565b60008481526002602052604090205403610bf7578051829003610bc357600160a0820152610bde565b60c08101516001600160a01b031615610bde57600260a08201525b610be7816118e6565b6000848152600260205260409020555b505050565b6000610c287f0000000000000000000000000000000000000000000000000000000000000000426123a4565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c985760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610643565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cf6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1a919061236e565b7f000000000000000000000000000000000000000000000000000000000000000014610d7c5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610643565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfe9190612387565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610e715760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610643565b8060055410610eb95760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b6044820152606401610643565b816004541461084857600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15050565b7f0000000000000000000000000000000000000000000000000000000000000000341015610f735760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610643565b7f00000000000000000000000000000000000000000000000000000000000000004281610fa257610fa2612358565b048210610ff15760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610643565b600454421115611075577f000000000000000000000000000000000000000000000000000000000000000060045442038161102e5761102e612358565b048260010110156110755760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610643565b806110925760405162461bcd60e51b815260040161064390612307565b600082815260026020526040902054156110e45760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610643565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261112a906118e6565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107cb565b604085106111b05760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610643565b6000848484846040516020016111c994939291906123c6565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561124957600088888381811061120b5761120b612408565b9050602002013590508281111561123057826000528060205260406000209250611240565b8060005282602052604060002092505b506001016111ef565b50806000541461128c5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610643565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156113015760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610643565b6000838152600360205260408082206001851b84179055516001600160a01b03891690611331908990899061241e565b6000604051808303816000865af19150503d806000811461136e576040519150601f19603f3d011682016040523d82523d6000602084013e611373565b606091505b50509050806113c45760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610643565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6114206103a1368390038301836122b4565b6000838152600260205260409020541461144c5760405162461bcd60e51b815260040161064390612307565b600261145e60c0830160a0840161242e565b600281111561146f5761146f6122d7565b146114b05760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610643565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061150a93505060e0840191505060c08301612449565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6115676103a1368390038301836122b4565b600083815260026020526040902054146115935760405162461bcd60e51b815260040161064390612307565b60016115a560c0830160a0840161242e565b60028111156115b6576115b66122d7565b146115f35760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610643565b600082815260026020526040812081905561161460e0830160c08401612449565b6001600160a01b03161461166f576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061150a9350506040840191505060208301612449565b61167f6040820160208301612449565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6116d3816118e6565b600083815260026020526040902054146116ff5760405162461bcd60e51b815260040161064390612307565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166117389190612466565b6117429190612466565b4210156117a65760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610643565b60006117b182611ef1565b905060028160038111156117c7576117c76122d7565b14806117e4575060008160038111156117e2576117e26122d7565b145b61184d5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610643565b63ffffffff42811660608401524316608083015261186a826118e6565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006118e07f0000000000000000000000000000000000000000000000000000000000000000836123a4565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861191b989097969101612479565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161198b5761198b612358565b040311156119ce5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610643565b6119d7816118e6565b60008381526002602052604090205414611a035760405162461bcd60e51b815260040161064390612307565b60c08101516001600160a01b031615611a555760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610643565b6001611a6082611ef1565b6003811115611a7157611a716122d7565b14611abe5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610643565b600154821115611b0657600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b16816118e6565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b7f57611b7f612358565b040311611bc05760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610643565b611bc9816118e6565b60008381526002602052604090205414611bf55760405162461bcd60e51b815260040161064390612307565b60008160a001516002811115611c0d57611c0d6122d7565b14611c4c5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610643565b60c08101516001600160a01b0316156108485760208101516001600160a01b0316611cd05760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611ce4826118e6565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d8b57611d8b612358565b040311611dcc5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610643565b611dd5816118e6565b60008381526002602052604090205414611e015760405162461bcd60e51b815260040161064390612307565b60008160a001516002811115611e1957611e196122d7565b14611e585760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610643565b60208101516001600160a01b0316156108485760c08101516001600160a01b0316611edd5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611ce4826118e6565b6000816060015163ffffffff16600003611f0d57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f4957506003919050565b60006005836060015163ffffffff16420381611f6757611f67612358565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611fab5760019250611fb0565b600092505b50505b919050565b6001600160a01b0381168114611fcd57600080fd5b50565b8035611fb381611fb8565b803563ffffffff81168114611fb357600080fd5b803560038110611fb357600080fd5b600060e0828403121561201057600080fd5b60405160e0810181811067ffffffffffffffff8211171561204157634e487b7160e01b600052604160045260246000fd5b6040528235815290508061205760208401611fd0565b602082015261206860408401611fdb565b604082015261207960608401611fdb565b606082015261208a60808401611fdb565b608082015261209b60a08401611fef565b60a08201526120ac60c08401611fd0565b60c08201525092915050565b60008061010083850312156120cc57600080fd5b823591506120dd8460208501611ffe565b90509250929050565b600080600061012084860312156120fc57600080fd5b83359250602084013591506121148560408601611ffe565b90509250925092565b60006020828403121561212f57600080fd5b5035919050565b6000806040838503121561214957600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611fb357600080fd5b60008083601f84011261218257600080fd5b50813567ffffffffffffffff81111561219a57600080fd5b6020830191508360208285010111156121b257600080fd5b9250929050565b600080600080600080608087890312156121d257600080fd5b863567ffffffffffffffff808211156121ea57600080fd5b818901915089601f8301126121fe57600080fd5b81358181111561220d57600080fd5b8a60208260051b850101111561222257600080fd5b6020830198508097505061223860208a01612158565b955061224660408a01611fd0565b9450606089013591508082111561225c57600080fd5b5061226989828a01612170565b979a9699509497509295939492505050565b60008082840361010081121561229057600080fd5b8335925060e0601f19820112156122a657600080fd5b506020830190509250929050565b600060e082840312156122c657600080fd5b6122d08383611ffe565b9392505050565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612301576123016122d7565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156118e0576118e061232f565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561238057600080fd5b5051919050565b60006020828403121561239957600080fd5b81516122d081611fb8565b6000826123c157634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561244057600080fd5b6122d082611fef565b60006020828403121561245b57600080fd5b81356122d081611fb8565b808201808211156118e0576118e061232f565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124d1576124d16122d7565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220ee7ca9cb524c4095445fa31d263819f589b328cdbaa5041b2012ecd77747f56f64736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.", "events": { @@ -1192,7 +1205,7 @@ "storageLayout": { "storage": [ { - "astId": 2542, + "astId": 401, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "stateRoot", "offset": 0, @@ -1200,7 +1213,7 @@ "type": "t_bytes32" }, { - "astId": 2544, + "astId": 403, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "latestVerifiedEpoch", "offset": 0, @@ -1208,7 +1221,7 @@ "type": "t_uint256" }, { - "astId": 2548, + "astId": 407, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "claimHashes", "offset": 0, @@ -1216,7 +1229,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2552, + "astId": 411, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "relayed", "offset": 0, @@ -1224,12 +1237,20 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2554, + "astId": 413, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "sequencerDelayLimit", "offset": 0, "slot": "4", "type": "t_uint256" + }, + { + "astId": 415, + "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", + "label": "timestampDelayUpdated", + "offset": 0, + "slot": "5", + "type": "t_uint256" } ], "types": { diff --git a/contracts/deployments/goerli/RouterArbToGnosisDevnet.json b/contracts/deployments/goerli/RouterArbToGnosisDevnet.json index 9d62a9ce..c4eb6cf8 100644 --- a/contracts/deployments/goerli/RouterArbToGnosisDevnet.json +++ b/contracts/deployments/goerli/RouterArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x770cDAF7284B8838c699910433A927a49bB6765A", + "address": "0x9F4407785DFf95c08Bf9a0d9d4A5a164C48eC5CB", "abi": [ { "inputs": [ @@ -113,7 +113,7 @@ }, { "inputs": [], - "name": "executesequencerDelayLimitDecreaseRequest", + "name": "executeSequencerDelayLimitDecreaseRequest", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -178,13 +178,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "sendSequencerDelayLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "sequencerDelayLimit", @@ -204,7 +197,7 @@ "outputs": [ { "internalType": "uint256", - "name": "requestedsequencerDelayLimit", + "name": "requestedSequencerDelayLimit", "type": "uint256" }, { @@ -250,33 +243,33 @@ "type": "function" } ], - "transactionHash": "0x787eb737d9949baa97771d5ece69ccde73f898f6310561d5cc9a1f5e1ff173bd", + "transactionHash": "0xde10a0097c19ecb8deed2781ed1e4990fc34053a54684f637961a48871110aa0", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x770cDAF7284B8838c699910433A927a49bB6765A", - "transactionIndex": 92, - "gasUsed": "853453", + "contractAddress": "0x9F4407785DFf95c08Bf9a0d9d4A5a164C48eC5CB", + "transactionIndex": 8, + "gasUsed": "851243", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xe6fa0d88b2d19f8af3f2bc3521bb87c41165aeb121c32a53b3a25b6a04677175", - "transactionHash": "0x787eb737d9949baa97771d5ece69ccde73f898f6310561d5cc9a1f5e1ff173bd", + "blockHash": "0xc8875d23c01aa2e3e2034bfb5b636fe503763b86699d7bd6d984d5cb7cf3c4e3", + "transactionHash": "0xde10a0097c19ecb8deed2781ed1e4990fc34053a54684f637961a48871110aa0", "logs": [], - "blockNumber": 9186893, - "cumulativeGasUsed": "19001159", + "blockNumber": 9187161, + "cumulativeGasUsed": "1702384", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0x84de475fed07406aA3B05248f1a7b0Fca11DA012", - "0xEe27226A8fa11Ba851410EB09d32884aEE219D75" + "0x6bC3C7Bcd2C6C2d8BFEAA3642c425cAE25F7fe17", + "0xDBa4fb8C75816CF9DcDbC66eDA361AD198314577" ], - "numDeployments": 13, - "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sendSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"sendSequencerDelayLimit()\":{\"details\":\"Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\"},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n function sendSequencerDelayLimit() public {\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x5d0fed5ff8ea2771aaf2b8cbf6db27c9f7af6eae441a973ef05ec340f0bff6e8\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101006040523480156200001257600080fd5b5060405162000fe538038062000fe5833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610d60620002856000396000818161010f0152818161044601526109bc01526000818161013601526107e101526000818160d00152818161041d0152610993015260008181610177015281816101c70152818161065f0152818161077f015261080b0152610d606000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a41a2faa11610066578063a41a2faa14610162578063cb9384681461016a578063e78cea9214610172578063e813a75514610199578063f6ee5b76146101b057600080fd5b8063051d1970146100a35780631062b39a146100cb5780632fa70aa71461010a5780638c5f173f1461013157806390784ae814610158575b600080fd5b6001546002546100b1919082565b604080519283526020830191909152015b60405180910390f35b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101606101c3565b005b6101606103bc565b610160610553565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100c2565b6101606101be366004610acd565b610774565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a89190610b48565b50925050506000548111156102f25760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156103b9576002541561036b5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561048f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b39190610b7e565b6040518463ffffffff1660e01b81526004016104d193929190610b97565b6020604051808303816000875af11580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190610b7e565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d6878160405161054791815260200190565b60405180910390a15050565b6002546000036105ba5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610362565b6000546002546105ca9190610bfc565b42116106335760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610362565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156106aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce9190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561070b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072f9190610b48565b50925050508181036107705760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b90602001610547565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107df5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610362565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088b9190610b24565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ec9190610b24565b6001600160a01b0316146109335760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610362565b600083838360405160240161094a93929190610c78565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a299190610b7e565b6040518463ffffffff1660e01b8152600401610a4793929190610b97565b6020604051808303816000875af1158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a9190610b7e565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d99355482604051610abe91815260200190565b60405180910390a25050505050565b6000806000838503610120811215610ae457600080fd5b843593506020850135925060e0603f1982011215610b0157600080fd5b506040840190509250925092565b6001600160a01b03811681146103b957600080fd5b600060208284031215610b3657600080fd5b8151610b4181610b0f565b9392505050565b60008060008060808587031215610b5e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b600060208284031215610b9057600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610bd357868101830151858201608001528201610bb7565b506000608082860101526080601f19601f83011685010192505050826040830152949350505050565b80820180821115610c1d57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610c2e81610b0f565b919050565b803563ffffffff81168114610c2e57600080fd5b803560038110610c2e57600080fd5b60038110610c7457634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c9c81610b0f565b6001600160a01b03166060830152610cb660408401610c33565b63ffffffff808216608085015280610cd060608701610c33565b1660a085015280610ce360808701610c33565b1660c08501525050610cf760a08401610c47565b610d0460e0840182610c56565b50610d1160c08401610c23565b6001600160a01b0381166101008401525094935050505056fea2646970667358221220830f75059c07d8833e8be7a35b8e7642a1bf1c9d29d45d76adb2fdecd6bf588e64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a41a2faa11610066578063a41a2faa14610162578063cb9384681461016a578063e78cea9214610172578063e813a75514610199578063f6ee5b76146101b057600080fd5b8063051d1970146100a35780631062b39a146100cb5780632fa70aa71461010a5780638c5f173f1461013157806390784ae814610158575b600080fd5b6001546002546100b1919082565b604080519283526020830191909152015b60405180910390f35b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101606101c3565b005b6101606103bc565b610160610553565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100c2565b6101606101be366004610acd565b610774565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a89190610b48565b50925050506000548111156102f25760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156103b9576002541561036b5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561048f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b39190610b7e565b6040518463ffffffff1660e01b81526004016104d193929190610b97565b6020604051808303816000875af11580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190610b7e565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d6878160405161054791815260200190565b60405180910390a15050565b6002546000036105ba5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610362565b6000546002546105ca9190610bfc565b42116106335760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610362565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156106aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce9190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561070b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072f9190610b48565b50925050508181036107705760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b90602001610547565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107df5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610362565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088b9190610b24565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ec9190610b24565b6001600160a01b0316146109335760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610362565b600083838360405160240161094a93929190610c78565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a299190610b7e565b6040518463ffffffff1660e01b8152600401610a4793929190610b97565b6020604051808303816000875af1158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a9190610b7e565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d99355482604051610abe91815260200190565b60405180910390a25050505050565b6000806000838503610120811215610ae457600080fd5b843593506020850135925060e0603f1982011215610b0157600080fd5b506040840190509250925092565b6001600160a01b03811681146103b957600080fd5b600060208284031215610b3657600080fd5b8151610b4181610b0f565b9392505050565b60008060008060808587031215610b5e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b600060208284031215610b9057600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610bd357868101830151858201608001528201610bb7565b506000608082860101526080601f19601f83011685010192505050826040830152949350505050565b80820180821115610c1d57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610c2e81610b0f565b919050565b803563ffffffff81168114610c2e57600080fd5b803560038110610c2e57600080fd5b60038110610c7457634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c9c81610b0f565b6001600160a01b03166060830152610cb660408401610c33565b63ffffffff808216608085015280610cd060608701610c33565b1660a085015280610ce360808701610c33565b1660c08501525050610cf760a08401610c47565b610d0460e0840182610c56565b50610d1160c08401610c23565b6001600160a01b0381166101008401525094935050505056fea2646970667358221220830f75059c07d8833e8be7a35b8e7642a1bf1c9d29d45d76adb2fdecd6bf588e64736f6c63430008120033", + "numDeployments": 14, + "solcInputHash": "26a65a18c178d77477789f8130b0944b", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedSequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedSequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n function sendSequencerDelayLimit() internal {\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x4a7f9bf6b94ca435c2c402934e97d9f69dd082b91d34d9634ad40be9cbc9db96\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b5060405162000fdb38038062000fdb833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610d56620002856000396000818161010e0152818161082701526109c2015260008181610135015261064c01526000818160cf015281816107fe0152610999015260008181610164015281816102c1015281816103e7015281816105ea01526106760152610d566000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063e78cea921461015f578063e813a75514610186578063f6ee5b761461019d57600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b61018f60005481565b6040519081526020016100b7565b6100c86101ab366004610ac3565b6105df565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b05565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b41565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610b65565b50925050508181036103df5760008290556103aa610938565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b41565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610b65565b509250505060005481111561051a5760008190556104e4610938565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b41565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b41565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008383836040516024016107b593929190610bf0565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610870573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108949190610ca2565b6040518463ffffffff1660e01b81526004016108b293929190610cbb565b6020604051808303816000875af11580156108d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f59190610ca2565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092991815260200190565b60405180910390a25050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f9190610ca2565b6040518463ffffffff1660e01b8152600401610a4d93929190610cbb565b6020604051808303816000875af1158015610a6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a909190610ca2565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b6000806000838503610120811215610ada57600080fd5b843593506020850135925060e0603f1982011215610af757600080fd5b506040840190509250925092565b80820180821115610b2657634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b5357600080fd5b8151610b5e81610b2c565b9392505050565b60008060008060808587031215610b7b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610ba681610b2c565b919050565b803563ffffffff81168114610ba657600080fd5b803560038110610ba657600080fd5b60038110610bec57634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1481610b2c565b6001600160a01b03166060830152610c2e60408401610bab565b63ffffffff808216608085015280610c4860608701610bab565b1660a085015280610c5b60808701610bab565b1660c08501525050610c6f60a08401610bbf565b610c7c60e0840182610bce565b50610c8960c08401610b9b565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cb457600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cf757868101830151858201608001528201610cdb565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220cef3d8b1424fc3a5cdb956bd340ffabf81932e2198be0d092d456f13cc6ebdf764736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063e78cea921461015f578063e813a75514610186578063f6ee5b761461019d57600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b61018f60005481565b6040519081526020016100b7565b6100c86101ab366004610ac3565b6105df565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b05565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b41565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610b65565b50925050508181036103df5760008290556103aa610938565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b41565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610b65565b509250505060005481111561051a5760008190556104e4610938565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b41565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b41565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008383836040516024016107b593929190610bf0565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610870573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108949190610ca2565b6040518463ffffffff1660e01b81526004016108b293929190610cbb565b6020604051808303816000875af11580156108d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f59190610ca2565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092991815260200190565b60405180910390a25050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f9190610ca2565b6040518463ffffffff1660e01b8152600401610a4d93929190610cbb565b6020604051808303816000875af1158015610a6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a909190610ca2565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b6000806000838503610120811215610ada57600080fd5b843593506020850135925060e0603f1982011215610af757600080fd5b506040840190509250925092565b80820180821115610b2657634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b5357600080fd5b8151610b5e81610b2c565b9392505050565b60008060008060808587031215610b7b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610ba681610b2c565b919050565b803563ffffffff81168114610ba657600080fd5b803560038110610ba657600080fd5b60038110610bec57634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1481610b2c565b6001600160a01b03166060830152610c2e60408401610bab565b63ffffffff808216608085015280610c4860608701610bab565b1660a085015280610c5b60808701610bab565b1660c08501525050610c6f60a08401610bbf565b610c7c60e0840182610bce565b50610c8960c08401610b9b565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cb457600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cf757868101830151858201608001528201610cdb565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220cef3d8b1424fc3a5cdb956bd340ffabf81932e2198be0d092d456f13cc6ebdf764736f6c63430008120033", "devdoc": { "details": "Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.", "events": { @@ -317,7 +310,7 @@ "_veaOutboxArbToGnosis": "The vea outbox on Gnosis Chain." } }, - "executesequencerDelayLimitDecreaseRequest()": { + "executeSequencerDelayLimitDecreaseRequest()": { "details": "execute sequencerDelayLimitDecreaseRequest" }, "route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { @@ -328,9 +321,6 @@ "_stateroot": "The true batch merkle root for the epoch." } }, - "sendSequencerDelayLimit()": { - "details": "Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge" - }, "updatesequencerDelayLimit()": { "details": "Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution." } @@ -349,7 +339,7 @@ "storageLayout": { "storage": [ { - "astId": 1828, + "astId": 76, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "sequencerDelayLimit", "offset": 0, @@ -357,29 +347,29 @@ "type": "t_uint256" }, { - "astId": 1831, + "astId": 79, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "1", - "type": "t_struct(SequencerDelayLimitDecreaseRequest)1836_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)84_storage" } ], "types": { - "t_struct(SequencerDelayLimitDecreaseRequest)1836_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)84_storage": { "encoding": "inplace", "label": "struct RouterArbToGnosis.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 1833, + "astId": 81, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", - "label": "requestedsequencerDelayLimit", + "label": "requestedSequencerDelayLimit", "offset": 0, "slot": "0", "type": "t_uint256" }, { - "astId": 1835, + "astId": 83, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/RouterArbToGnosisTestnet.json b/contracts/deployments/goerli/RouterArbToGnosisTestnet.json index 38172fa6..c2b89a28 100644 --- a/contracts/deployments/goerli/RouterArbToGnosisTestnet.json +++ b/contracts/deployments/goerli/RouterArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x8228116e0d5Fd2611788E68fF77D5f21b005cE11", + "address": "0xF04354D2286C8Db33aE6F454728C2F935ae5CD82", "abi": [ { "inputs": [ @@ -113,7 +113,7 @@ }, { "inputs": [], - "name": "executesequencerDelayLimitDecreaseRequest", + "name": "executeSequencerDelayLimitDecreaseRequest", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -178,13 +178,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "sendSequencerDelayLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [], "name": "sequencerDelayLimit", @@ -204,7 +197,7 @@ "outputs": [ { "internalType": "uint256", - "name": "requestedsequencerDelayLimit", + "name": "requestedSequencerDelayLimit", "type": "uint256" }, { @@ -250,33 +243,33 @@ "type": "function" } ], - "transactionHash": "0xcf3f034175f27b21f19ac5d0c9bde592e257f55e09ac400ac8867215c59da3f8", + "transactionHash": "0xa88b701ba1f52edcde1114a444172fd0b680cd6cbc7484cc4845a6c59a3477a0", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x8228116e0d5Fd2611788E68fF77D5f21b005cE11", - "transactionIndex": 30, - "gasUsed": "853453", + "contractAddress": "0xF04354D2286C8Db33aE6F454728C2F935ae5CD82", + "transactionIndex": 32, + "gasUsed": "851243", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x876ded6cc4849afb128ef67d1b0365e0125d5f83695e9febd3fc114ef1b3755f", - "transactionHash": "0xcf3f034175f27b21f19ac5d0c9bde592e257f55e09ac400ac8867215c59da3f8", + "blockHash": "0x77ee4cde01a6868a587efb4b07f24b74b42a3add4e92b5333ffbf32daa0be75e", + "transactionHash": "0xa88b701ba1f52edcde1114a444172fd0b680cd6cbc7484cc4845a6c59a3477a0", "logs": [], - "blockNumber": 9186886, - "cumulativeGasUsed": "7849917", + "blockNumber": 9187150, + "cumulativeGasUsed": "11149282", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x87A19d769D875964E9Cd41dDBfc397B2543764E6", - "0x4738A566706eDd30Fe175e20eDDd21c5c7bD79Ea", - "0x359c4E8225866aB97ab054ec36aBe923e70eF741" + "0xDF216C98773DA7998EE49AE8106BFe9724cf2944", + "0xb61BEB66796Bbf59BBa3e5feE4Bab2304B889590" ], - "numDeployments": 5, - "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sendSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"sendSequencerDelayLimit()\":{\"details\":\"Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\"},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n function sendSequencerDelayLimit() public {\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x5d0fed5ff8ea2771aaf2b8cbf6db27c9f7af6eae441a973ef05ec340f0bff6e8\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101006040523480156200001257600080fd5b5060405162000fe538038062000fe5833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610d60620002856000396000818161010f0152818161044601526109bc01526000818161013601526107e101526000818160d00152818161041d0152610993015260008181610177015281816101c70152818161065f0152818161077f015261080b0152610d606000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a41a2faa11610066578063a41a2faa14610162578063cb9384681461016a578063e78cea9214610172578063e813a75514610199578063f6ee5b76146101b057600080fd5b8063051d1970146100a35780631062b39a146100cb5780632fa70aa71461010a5780638c5f173f1461013157806390784ae814610158575b600080fd5b6001546002546100b1919082565b604080519283526020830191909152015b60405180910390f35b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101606101c3565b005b6101606103bc565b610160610553565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100c2565b6101606101be366004610acd565b610774565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a89190610b48565b50925050506000548111156102f25760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156103b9576002541561036b5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561048f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b39190610b7e565b6040518463ffffffff1660e01b81526004016104d193929190610b97565b6020604051808303816000875af11580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190610b7e565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d6878160405161054791815260200190565b60405180910390a15050565b6002546000036105ba5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610362565b6000546002546105ca9190610bfc565b42116106335760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610362565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156106aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce9190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561070b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072f9190610b48565b50925050508181036107705760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b90602001610547565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107df5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610362565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088b9190610b24565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ec9190610b24565b6001600160a01b0316146109335760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610362565b600083838360405160240161094a93929190610c78565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a299190610b7e565b6040518463ffffffff1660e01b8152600401610a4793929190610b97565b6020604051808303816000875af1158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a9190610b7e565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d99355482604051610abe91815260200190565b60405180910390a25050505050565b6000806000838503610120811215610ae457600080fd5b843593506020850135925060e0603f1982011215610b0157600080fd5b506040840190509250925092565b6001600160a01b03811681146103b957600080fd5b600060208284031215610b3657600080fd5b8151610b4181610b0f565b9392505050565b60008060008060808587031215610b5e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b600060208284031215610b9057600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610bd357868101830151858201608001528201610bb7565b506000608082860101526080601f19601f83011685010192505050826040830152949350505050565b80820180821115610c1d57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610c2e81610b0f565b919050565b803563ffffffff81168114610c2e57600080fd5b803560038110610c2e57600080fd5b60038110610c7457634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c9c81610b0f565b6001600160a01b03166060830152610cb660408401610c33565b63ffffffff808216608085015280610cd060608701610c33565b1660a085015280610ce360808701610c33565b1660c08501525050610cf760a08401610c47565b610d0460e0840182610c56565b50610d1160c08401610c23565b6001600160a01b0381166101008401525094935050505056fea2646970667358221220830f75059c07d8833e8be7a35b8e7642a1bf1c9d29d45d76adb2fdecd6bf588e64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a41a2faa11610066578063a41a2faa14610162578063cb9384681461016a578063e78cea9214610172578063e813a75514610199578063f6ee5b76146101b057600080fd5b8063051d1970146100a35780631062b39a146100cb5780632fa70aa71461010a5780638c5f173f1461013157806390784ae814610158575b600080fd5b6001546002546100b1919082565b604080519283526020830191909152015b60405180910390f35b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c2565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101606101c3565b005b6101606103bc565b610160610553565b6100f27f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100c2565b6101606101be366004610acd565b610774565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610223573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102479190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a89190610b48565b50925050506000548111156102f25760008190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156103b9576002541561036b5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084015b60405180910390fd5b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa15801561048f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b39190610b7e565b6040518463ffffffff1660e01b81526004016104d193929190610b97565b6020604051808303816000875af11580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105149190610b7e565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d6878160405161054791815260200190565b60405180910390a15050565b6002546000036105ba5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610362565b6000546002546105ca9190610bfc565b42116106335760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610362565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156106aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce9190610b24565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561070b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072f9190610b48565b50925050508181036107705760008290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b90602001610547565b5050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107df5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610362565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088b9190610b24565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ec9190610b24565b6001600160a01b0316146109335760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610362565b600083838360405160240161094a93929190610c78565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a299190610b7e565b6040518463ffffffff1660e01b8152600401610a4793929190610b97565b6020604051808303816000875af1158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a9190610b7e565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d99355482604051610abe91815260200190565b60405180910390a25050505050565b6000806000838503610120811215610ae457600080fd5b843593506020850135925060e0603f1982011215610b0157600080fd5b506040840190509250925092565b6001600160a01b03811681146103b957600080fd5b600060208284031215610b3657600080fd5b8151610b4181610b0f565b9392505050565b60008060008060808587031215610b5e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b600060208284031215610b9057600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610bd357868101830151858201608001528201610bb7565b506000608082860101526080601f19601f83011685010192505050826040830152949350505050565b80820180821115610c1d57634e487b7160e01b600052601160045260246000fd5b92915050565b8035610c2e81610b0f565b919050565b803563ffffffff81168114610c2e57600080fd5b803560038110610c2e57600080fd5b60038110610c7457634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c9c81610b0f565b6001600160a01b03166060830152610cb660408401610c33565b63ffffffff808216608085015280610cd060608701610c33565b1660a085015280610ce360808701610c33565b1660c08501525050610cf760a08401610c47565b610d0460e0840182610c56565b50610d1160c08401610c23565b6001600160a01b0381166101008401525094935050505056fea2646970667358221220830f75059c07d8833e8be7a35b8e7642a1bf1c9d29d45d76adb2fdecd6bf588e64736f6c63430008120033", + "numDeployments": 6, + "solcInputHash": "26a65a18c178d77477789f8130b0944b", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedSequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedSequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n function sendSequencerDelayLimit() internal {\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x4a7f9bf6b94ca435c2c402934e97d9f69dd082b91d34d9634ad40be9cbc9db96\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b5060405162000fdb38038062000fdb833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610d56620002856000396000818161010e0152818161082701526109c2015260008181610135015261064c01526000818160cf015281816107fe0152610999015260008181610164015281816102c1015281816103e7015281816105ea01526106760152610d566000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063e78cea921461015f578063e813a75514610186578063f6ee5b761461019d57600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b61018f60005481565b6040519081526020016100b7565b6100c86101ab366004610ac3565b6105df565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b05565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b41565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610b65565b50925050508181036103df5760008290556103aa610938565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b41565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610b65565b509250505060005481111561051a5760008190556104e4610938565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b41565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b41565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008383836040516024016107b593929190610bf0565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610870573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108949190610ca2565b6040518463ffffffff1660e01b81526004016108b293929190610cbb565b6020604051808303816000875af11580156108d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f59190610ca2565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092991815260200190565b60405180910390a25050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f9190610ca2565b6040518463ffffffff1660e01b8152600401610a4d93929190610cbb565b6020604051808303816000875af1158015610a6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a909190610ca2565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b6000806000838503610120811215610ada57600080fd5b843593506020850135925060e0603f1982011215610af757600080fd5b506040840190509250925092565b80820180821115610b2657634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b5357600080fd5b8151610b5e81610b2c565b9392505050565b60008060008060808587031215610b7b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610ba681610b2c565b919050565b803563ffffffff81168114610ba657600080fd5b803560038110610ba657600080fd5b60038110610bec57634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1481610b2c565b6001600160a01b03166060830152610c2e60408401610bab565b63ffffffff808216608085015280610c4860608701610bab565b1660a085015280610c5b60808701610bab565b1660c08501525050610c6f60a08401610bbf565b610c7c60e0840182610bce565b50610c8960c08401610b9b565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cb457600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cf757868101830151858201608001528201610cdb565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220cef3d8b1424fc3a5cdb956bd340ffabf81932e2198be0d092d456f13cc6ebdf764736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063e78cea921461015f578063e813a75514610186578063f6ee5b761461019d57600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b61018f60005481565b6040519081526020016100b7565b6100c86101ab366004610ac3565b6105df565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b05565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b41565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610b65565b50925050508181036103df5760008290556103aa610938565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b41565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610b65565b509250505060005481111561051a5760008190556104e4610938565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b41565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b41565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008383836040516024016107b593929190610bf0565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610870573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108949190610ca2565b6040518463ffffffff1660e01b81526004016108b293929190610cbb565b6020604051808303816000875af11580156108d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f59190610ca2565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092991815260200190565b60405180910390a25050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f9190610ca2565b6040518463ffffffff1660e01b8152600401610a4d93929190610cbb565b6020604051808303816000875af1158015610a6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a909190610ca2565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b6000806000838503610120811215610ada57600080fd5b843593506020850135925060e0603f1982011215610af757600080fd5b506040840190509250925092565b80820180821115610b2657634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b5357600080fd5b8151610b5e81610b2c565b9392505050565b60008060008060808587031215610b7b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610ba681610b2c565b919050565b803563ffffffff81168114610ba657600080fd5b803560038110610ba657600080fd5b60038110610bec57634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1481610b2c565b6001600160a01b03166060830152610c2e60408401610bab565b63ffffffff808216608085015280610c4860608701610bab565b1660a085015280610c5b60808701610bab565b1660c08501525050610c6f60a08401610bbf565b610c7c60e0840182610bce565b50610c8960c08401610b9b565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cb457600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cf757868101830151858201608001528201610cdb565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220cef3d8b1424fc3a5cdb956bd340ffabf81932e2198be0d092d456f13cc6ebdf764736f6c63430008120033", "devdoc": { "details": "Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.", "events": { @@ -317,7 +310,7 @@ "_veaOutboxArbToGnosis": "The vea outbox on Gnosis Chain." } }, - "executesequencerDelayLimitDecreaseRequest()": { + "executeSequencerDelayLimitDecreaseRequest()": { "details": "execute sequencerDelayLimitDecreaseRequest" }, "route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { @@ -328,9 +321,6 @@ "_stateroot": "The true batch merkle root for the epoch." } }, - "sendSequencerDelayLimit()": { - "details": "Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge" - }, "updatesequencerDelayLimit()": { "details": "Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution." } @@ -349,7 +339,7 @@ "storageLayout": { "storage": [ { - "astId": 1828, + "astId": 76, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "sequencerDelayLimit", "offset": 0, @@ -357,29 +347,29 @@ "type": "t_uint256" }, { - "astId": 1831, + "astId": 79, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "1", - "type": "t_struct(SequencerDelayLimitDecreaseRequest)1836_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)84_storage" } ], "types": { - "t_struct(SequencerDelayLimitDecreaseRequest)1836_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)84_storage": { "encoding": "inplace", "label": "struct RouterArbToGnosis.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 1833, + "astId": 81, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", - "label": "requestedsequencerDelayLimit", + "label": "requestedSequencerDelayLimit", "offset": 0, "slot": "0", "type": "t_uint256" }, { - "astId": 1835, + "astId": 83, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json b/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json index 9d6e0526..4996ac51 100644 --- a/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json +++ b/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x8dC6CCd123E680018923000854dE7E293E744DA0", + "address": "0xb0263478A46d885D715B01fbac745500B9576634", "abi": [ { "inputs": [ @@ -1025,32 +1025,32 @@ "type": "function" } ], - "transactionHash": "0x6e59e266a405c153f2fbc504d0a5d9690597a94ef4cc5548db366e32f142ea08", + "transactionHash": "0x308b3d8528175eb97dff6be055dcbaa933dcad3d2ff91597280d534b1d964578", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x8dC6CCd123E680018923000854dE7E293E744DA0", - "transactionIndex": 39, + "contractAddress": "0xb0263478A46d885D715B01fbac745500B9576634", + "transactionIndex": 21, "gasUsed": "2205677", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000004000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000020000000000000", - "blockHash": "0x53af67e71d5ab2f99082db682cef49c0592b217324e7d609d789d48efd6f24ba", - "transactionHash": "0x6e59e266a405c153f2fbc504d0a5d9690597a94ef4cc5548db366e32f142ea08", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x76a3a297bd8529e553474ee30e3aece9de1e473b7418e373df9ccb70e4315f71", + "transactionHash": "0x308b3d8528175eb97dff6be055dcbaa933dcad3d2ff91597280d534b1d964578", "logs": [ { - "transactionIndex": 39, - "blockNumber": 9186889, - "transactionHash": "0x6e59e266a405c153f2fbc504d0a5d9690597a94ef4cc5548db366e32f142ea08", - "address": "0x8dC6CCd123E680018923000854dE7E293E744DA0", + "transactionIndex": 21, + "blockNumber": 9187157, + "transactionHash": "0x308b3d8528175eb97dff6be055dcbaa933dcad3d2ff91597280d534b1d964578", + "address": "0xb0263478A46d885D715B01fbac745500B9576634", "topics": [ "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 62, - "blockHash": "0x53af67e71d5ab2f99082db682cef49c0592b217324e7d609d789d48efd6f24ba" + "logIndex": 37, + "blockHash": "0x76a3a297bd8529e553474ee30e3aece9de1e473b7418e373df9ccb70e4315f71" } ], - "blockNumber": 9186889, - "cumulativeGasUsed": "16341745", + "blockNumber": 9187157, + "cumulativeGasUsed": "5571122", "status": 1, "byzantium": true }, @@ -1059,11 +1059,11 @@ 1800, 0, 10000000000000, - "0x1224E83DF410b43A65ed3e375a6442813B1aea14", + "0x5Df4452965cd2ff87f205AE5b10b5d0F65223116", "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", 10000000000000 ], - "numDeployments": 11, + "numDeployments": 12, "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEthDevnet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_bridge\":\"The address of the Arbitrum bridge contract on Ethereum.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEthDevnet\":\"The address of the devnet vea inbox on Arbitrum to Ethereum.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":\"VeaOutboxArbToEthDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updatesequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x36147b323b9b28537749fc38c75ad7d3e1b3fa7f180aecb3ab90d35c6718b9e3\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToEth/VeaOutboxArbToEth.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Goerli.\\n/// Note: This contract is deployed on Goerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEthDevnet The address of the devnet vea inbox on Arbitrum to Ethereum.\\n /// @param _bridge The address of the Arbitrum bridge contract on Ethereum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEthDevnet,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n )\\n VeaOutboxArbToEth(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _veaInboxArbToEthDevnet,\\n _bridge,\\n _maxMissingBlocks\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xc790ada101869ca355f7e5f35d7480741189082573634b34c0a4464c69e043dd\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002a4438038062002a448339810160408190526200003591620002ee565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190528686868686868662000076620000ee565b620000836002886200036c565b60e0819052620000958860026200038f565b620000a19190620003af565b6101005261012051600190620000b890426200036c565b620000c49190620003af565b6001555050600780546001600160a01b0319163317905550620004219a5050505050505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000131573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001579190620003c5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000195573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001bb9190620003ea565b5092505050600454811115620002065760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ce5760065415620002805760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002e957600080fd5b919050565b600080600080600080600060e0888a0312156200030a57600080fd5b875196506020880151955060408801519450606088015193506200033160808901620002d1565b92506200034160a08901620002d1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200038a57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620003a957620003a962000356565b92915050565b81810381811115620003a957620003a962000356565b600060208284031215620003d857600080fd5b620003e382620002d1565b9392505050565b600080600080608085870312156200040157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516124f56200054f600039600081816104a10152611ea90152600081816104d5015281816108b2015281816116b40152818161183f0152611c6801526000818161055d0152611e3d015260008181610509015281816108d601528181610bdf015281816113ae015281816116d8015281816118630152611c8c015260008181611133015261126c0152600081816110e001526112240152600081816105a6015281816106b2015281816108390152818161086601528181610c22015281816112bc015281816119a901528181611a100152611dd301526000818161039d01526109c001526000818161062701528181610951015281816109ea015281816114c20152611b5501526124f56000f3fe6080604052600436106101e35760003560e01c806390784ae811610102578063c2114a1611610095578063df19e6ff11610064578063df19e6ff146105e8578063e78cea9214610615578063e813a75514610649578063eedcf2a91461065f57600080fd5b8063c2114a161461054b578063cb9384681461057f578063d0e30db014610594578063da2b7bc4146105c857600080fd5b8063aa22a1c6116100d1578063aa22a1c61461048f578063b044397e146104c3578063b5b7a184146104f7578063b633b9441461052b57600080fd5b806390784ae81461041757806390df63b71461042c578063930f28af146104595780639588eca21461047957600080fd5b80633ce43cfd1161017a578063541adcca11610149578063541adcca1461036b57806369cd250d1461038b5780638a619a71146103d75780638ad3a8f7146103f757600080fd5b80633ce43cfd146102eb5780634788cb381461030b57806349b4299e1461032b5780634a439cfe1461034b57600080fd5b80632639c060116101b65780632639c0601461027557806327ee6bdd146102a257806331d14457146102b857806331ddf743146102cb57600080fd5b806301139b68146101e8578063051d1970146101fd5780630f0adca514610232578063222ae78614610252575b600080fd5b6101fb6101f6366004612063565b610672565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb61024d366004612091565b6108b0565b34801561025e57600080fd5b50610267610bd8565b604051908152602001610229565b34801561028157600080fd5b506102676102903660046120c8565b60026020526000908152604090205481565b3480156102ae57600080fd5b5061026760015481565b6101fb6102c63660046120e1565b610c09565b3480156102d757600080fd5b506101fb6102e6366004612164565b610d89565b3480156102f757600080fd5b506101fb610306366004612226565b611029565b34801561031757600080fd5b506101fb610326366004612063565b611170565b34801561033757600080fd5b506101fb610346366004612063565b6112f4565b34801561035757600080fd5b506102676103663660046120c8565b6113a7565b34801561037757600080fd5b5061026761038636600461225f565b6113d9565b34801561039757600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b3480156103e357600080fd5b506101fb6103f2366004612282565b61142b565b34801561040357600080fd5b506007546103bf906001600160a01b031681565b34801561042357600080fd5b506101fb6114be565b34801561043857600080fd5b506102676104473660046120c8565b60036020526000908152604090205481565b34801561046557600080fd5b506101fb610474366004612063565b6116b2565b34801561048557600080fd5b5061026760005481565b34801561049b57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cf57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561050357600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561053757600080fd5b506101fb610546366004612063565b61183d565b34801561055757600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561058b57600080fd5b506101fb611a49565b3480156105a057600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d457600080fd5b506101fb6105e3366004612063565b611c66565b3480156105f457600080fd5b5061060861060336600461225f565b611e1f565b60405161022991906122b5565b34801561062157600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b34801561065557600080fd5b5061026760045481565b6101fb61066d3660046120e1565b611ee6565b61067b816113d9565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122cf565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a0015160028111156107935761079361229f565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816113d9565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f00000000000000000000000000000000000000000000000000000000000000003461230d565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090357610903612320565b040311156109465760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109be5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612336565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612336565b6001600160a01b031614610b1a5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610b2a57508115155b15610b6d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b76816113d9565b60008481526002602052604090205403610bd3578051829003610b9f57600160a0820152610bba565b60c08101516001600160a01b031615610bba57600260a08201525b610bc3816113d9565b6000848152600260205260409020555b505050565b6000610c047f000000000000000000000000000000000000000000000000000000000000000042612353565b905090565b6007546001600160a01b03163314610c2057600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610c905760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610cad5760405162461bcd60e51b81526004016106a7906122cf565b60008281526002602052604090205415610cff5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610d45906113d9565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161082f565b60408510610dcb5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b600084848484604051602001610de49493929190612375565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610e64576000888883818110610e2657610e266123b7565b90506020020135905082811115610e4b57826000528060205260406000209250610e5b565b8060005282602052604060002092505b50600101610e0a565b508060005414610ea75760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f1c5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610f4c90899089906123cd565b6000604051808303816000865af19150503d8060008114610f89576040519150601f19603f3d011682016040523d82523d6000602084013e610f8e565b606091505b5050905080610fdf5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61103b6103863683900383018361225f565b600083815260026020526040902054146110675760405162461bcd60e51b81526004016106a7906122cf565b600261107960c0830160a084016123dd565b600281111561108a5761108a61229f565b146110cb5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061112593505060e0840191505060c08301612282565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611179816113d9565b600083815260026020526040902054146111a55760405162461bcd60e51b81526004016106a7906122cf565b60018160a0015160028111156111bd576111bd61229f565b146111fa5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156112a6576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461130b57600080fd5b611314816113d9565b600083815260026020526040902054146113405760405162461bcd60e51b81526004016106a7906122cf565b63ffffffff42811660608301524316608082015261135d816113d9565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691015b60405180910390a15050565b60006113d37f000000000000000000000000000000000000000000000000000000000000000083612353565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861140e9890979691016123f8565b604051602081830303815290604052805190602001209050919050565b6007546001600160a01b0316331461144257600080fd5b6007546001600160a01b0316331461149c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561151e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115429190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561157f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a39190612476565b50925050506004548111156115ed5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156116af57600654156116615760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161170557611705612320565b040311156117485760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b611751816113d9565b6000838152600260205260409020541461177d5760405162461bcd60e51b81526004016106a7906122cf565b60c08101516001600160a01b0316156117cf5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b60015482111561181757600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611827816113d9565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161189057611890612320565b0403116118d15760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b6118da816113d9565b600083815260026020526040902054146119065760405162461bcd60e51b81526004016106a7906122cf565b60008160a00151600281111561191e5761191e61229f565b1461195d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b03166119e15760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c08101805160009091526119f5826113d9565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611ab05760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b600454600654611ac091906124ac565b4211611b295760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611ba0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc49190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c259190612476565b50925050508181036108ac5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200161139b565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cb957611cb9612320565b040311611cfa5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611d03816113d9565b60008381526002602052604090205414611d2f5760405162461bcd60e51b81526004016106a7906122cf565b60008160a001516002811115611d4757611d4761229f565b14611d865760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611e0b5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60208101805160009091526119f5826113d9565b6000816060015163ffffffff16600003611e3b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7757506003919050565b6000600c836060015163ffffffff16420381611e9557611e95612320565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ed95760019250611ede565b600092505b50505b919050565b611ef08282610c09565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f3783826112f4565b63ffffffff428116606083015243166080820152611f5583826116b2565b600160a0820152610bd38382611170565b6001600160a01b03811681146116af57600080fd5b8035611ee181611f66565b803563ffffffff81168114611ee157600080fd5b803560038110611ee157600080fd5b600060e08284031215611fbb57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fec57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200260208401611f7b565b602082015261201360408401611f86565b604082015261202460608401611f86565b606082015261203560808401611f86565b608082015261204660a08401611f9a565b60a082015261205760c08401611f7b565b60c08201525092915050565b600080610100838503121561207757600080fd5b823591506120888460208501611fa9565b90509250929050565b600080600061012084860312156120a757600080fd5b83359250602084013591506120bf8560408601611fa9565b90509250925092565b6000602082840312156120da57600080fd5b5035919050565b600080604083850312156120f457600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee157600080fd5b60008083601f84011261212d57600080fd5b50813567ffffffffffffffff81111561214557600080fd5b60208301915083602082850101111561215d57600080fd5b9250929050565b6000806000806000806080878903121561217d57600080fd5b863567ffffffffffffffff8082111561219557600080fd5b818901915089601f8301126121a957600080fd5b8135818111156121b857600080fd5b8a60208260051b85010111156121cd57600080fd5b602083019850809750506121e360208a01612103565b95506121f160408a01611f7b565b9450606089013591508082111561220757600080fd5b5061221489828a0161211b565b979a9699509497509295939492505050565b60008082840361010081121561223b57600080fd5b8335925060e0601f198201121561225157600080fd5b506020830190509250929050565b600060e0828403121561227157600080fd5b61227b8383611fa9565b9392505050565b60006020828403121561229457600080fd5b813561227b81611f66565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122c9576122c961229f565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156113d3576113d36122f7565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561234857600080fd5b815161227b81611f66565b60008261237057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123ef57600080fd5b61227b82611f9a565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124505761245061229f565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561248c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b808201808211156113d3576113d36122f756fea2646970667358221220dc7a01b69a5db83d52ee68c35352849e950b5e5dd89fab8bf6b9e3291a0befbd64736f6c63430008120033", diff --git a/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json b/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json index dfb509be..67e5cdfa 100644 --- a/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json +++ b/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x6dfc228652A6eE943eA37c269E2602BF2e198Ae9", + "address": "0x63d66abf907E7AF1516fF0DFb9849cb3CBAF3780", "abi": [ { "inputs": [ @@ -981,32 +981,32 @@ "type": "function" } ], - "transactionHash": "0xe81aa735dbd529a50583f978a070ab5de4ac1b0ff9236feb3c03f2861f9f921b", + "transactionHash": "0xdbd27334e6bc160f13fbf41838237b25936d0a9ca15b4d5bfed17f678f4a10b8", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x6dfc228652A6eE943eA37c269E2602BF2e198Ae9", - "transactionIndex": 23, + "contractAddress": "0x63d66abf907E7AF1516fF0DFb9849cb3CBAF3780", + "transactionIndex": 12, "gasUsed": "2236924", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000", - "blockHash": "0x073a5a3464381dcf3dd71c67d61d70b197cd23e4d4a0a4570df996da06d1e918", - "transactionHash": "0xe81aa735dbd529a50583f978a070ab5de4ac1b0ff9236feb3c03f2861f9f921b", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000800000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2d330a3b649c75a6a78412ad4224517927511e4d637012f611ffef3ef9039b2e", + "transactionHash": "0xdbd27334e6bc160f13fbf41838237b25936d0a9ca15b4d5bfed17f678f4a10b8", "logs": [ { - "transactionIndex": 23, - "blockNumber": 9186881, - "transactionHash": "0xe81aa735dbd529a50583f978a070ab5de4ac1b0ff9236feb3c03f2861f9f921b", - "address": "0x6dfc228652A6eE943eA37c269E2602BF2e198Ae9", + "transactionIndex": 12, + "blockNumber": 9187145, + "transactionHash": "0xdbd27334e6bc160f13fbf41838237b25936d0a9ca15b4d5bfed17f678f4a10b8", + "address": "0x63d66abf907E7AF1516fF0DFb9849cb3CBAF3780", "topics": [ "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 30, - "blockHash": "0x073a5a3464381dcf3dd71c67d61d70b197cd23e4d4a0a4570df996da06d1e918" + "logIndex": 21, + "blockHash": "0x2d330a3b649c75a6a78412ad4224517927511e4d637012f611ffef3ef9039b2e" } ], - "blockNumber": 9186881, - "cumulativeGasUsed": "4556399", + "blockNumber": 9187145, + "cumulativeGasUsed": "4000846", "status": 1, "byzantium": true }, @@ -1015,11 +1015,11 @@ 3600, 10800, 1000000, - "0xb7d2C76641B21718cC8A0b595be438c863A6e031", + "0xc8c44fb196aF9C5E41B48f74E1A86A379b70bd70", "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", 1000000 ], - "numDeployments": 7, + "numDeployments": 8, "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEth\":\"The address of the inbox contract on Arbitrum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":\"VeaOutboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updatesequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x36147b323b9b28537749fc38c75ad7d3e1b3fa7f180aecb3ab90d35c6718b9e3\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002b2e38038062002b2e8339810160408190526200003591620002ce565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190526200006f620000ce565b6200007c6002886200034c565b60e08190526200008e8860026200036f565b6200009a91906200038f565b6101005261012051600190620000b190426200034c565b620000bd91906200038f565b600155506200040195505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000111573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001379190620003a5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200019b9190620003ca565b5092505050600454811115620001e65760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ae5760065415620002605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002c957600080fd5b919050565b600080600080600080600060e0888a031215620002ea57600080fd5b875196506020880151955060408801519450606088015193506200031160808901620002b1565b92506200032160a08901620002b1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200036a57634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000389576200038962000336565b92915050565b8181038181111562000389576200038962000336565b600060208284031215620003b857600080fd5b620003c382620002b1565b9392505050565b60008060008060808587031215620003e157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516125f16200053d6000396000818161044001526120250152600081816104740152818161083e015281816117c0015281816119b40152611de40152600081816104fc0152611fb90152600081816104a80152818161086201528181610b6b01528181610c0701528181610c8f015281816113930152818161154d015281816117e4015281816119d80152611e08015260006111aa01526000818161115701526112bc0152600081816105450152818161063e015281816107c5015281816107f201528181610b970152818161131f01528181611b1e01528181611b850152611f4f01526000818161037c015261094c0152600081816105c6015281816108dd01528181610976015281816115ce0152611cca01526125f16000f3fe6080604052600436106101c25760003560e01c806390784ae8116100f7578063b633b94411610095578063da2b7bc411610064578063da2b7bc414610567578063df19e6ff14610587578063e78cea92146105b4578063e813a755146105e857600080fd5b8063b633b944146104ca578063c2114a16146104ea578063cb9384681461051e578063d0e30db01461053357600080fd5b80639588eca2116100d15780639588eca214610418578063aa22a1c61461042e578063b044397e14610462578063b5b7a1841461049657600080fd5b806390784ae8146103b657806390df63b7146103cb578063930f28af146103f857600080fd5b806331ddf7431161016457806349b4299e1161013e57806349b4299e1461030a5780634a439cfe1461032a578063541adcca1461034a57806369cd250d1461036a57600080fd5b806331ddf743146102aa5780633ce43cfd146102ca5780634788cb38146102ea57600080fd5b8063222ae786116101a0578063222ae786146102315780632639c0601461025457806327ee6bdd1461028157806331d144571461029757600080fd5b806301139b68146101c7578063051d1970146101dc5780630f0adca514610211575b600080fd5b6101da6101d536600461215f565b6105fe565b005b3480156101e857600080fd5b506005546006546101f7919082565b604080519283526020830191909152015b60405180910390f35b34801561021d57600080fd5b506101da61022c36600461218d565b61083c565b34801561023d57600080fd5b50610246610b64565b604051908152602001610208565b34801561026057600080fd5b5061024661026f3660046121c4565b60026020526000908152604090205481565b34801561028d57600080fd5b5061024660015481565b6101da6102a53660046121dd565b610b95565b3480156102b657600080fd5b506101da6102c5366004612260565b610e00565b3480156102d657600080fd5b506101da6102e5366004612322565b6110a0565b3480156102f657600080fd5b506101da610305366004612322565b6111e7565b34801561031657600080fd5b506101da61032536600461215f565b61135c565b34801561033657600080fd5b506102466103453660046121c4565b611546565b34801561035657600080fd5b5061024661036536600461235b565b611578565b34801561037657600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610208565b3480156103c257600080fd5b506101da6115ca565b3480156103d757600080fd5b506102466103e63660046121c4565b60036020526000908152604090205481565b34801561040457600080fd5b506101da61041336600461215f565b6117be565b34801561042457600080fd5b5061024660005481565b34801561043a57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561046e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a257600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d657600080fd5b506101da6104e536600461215f565b6119b2565b3480156104f657600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561052a57600080fd5b506101da611bbe565b34801561053f57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561057357600080fd5b506101da61058236600461215f565b611de2565b34801561059357600080fd5b506105a76105a236600461235b565b611f9b565b6040516102089190612394565b3480156105c057600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f457600080fd5b5061024660045481565b61060781611578565b6000838152600260205260409020541461063c5760405162461bcd60e51b8152600401610633906123ae565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f61237e565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b81611578565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f0000000000000000000000000000000000000000000000000000000000000000346123ec565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161088f5761088f6123ff565b040311156108d25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461094a5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f69190612415565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a579190612415565b6001600160a01b031614610aa65760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610ab657508115155b15610af957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b0281611578565b60008481526002602052604090205403610b5f578051829003610b2b57600160a0820152610b46565b60c08101516001600160a01b031615610b4657600260a08201525b610b4f81611578565b6000848152600260205260409020555b505050565b6000610b907f000000000000000000000000000000000000000000000000000000000000000042612432565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c055760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000004281610c3457610c346123ff565b048210610c835760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b600454421115610d07577f0000000000000000000000000000000000000000000000000000000000000000600454420381610cc057610cc06123ff565b04826001011015610d075760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610633565b80610d245760405162461bcd60e51b8152600401610633906123ae565b60008281526002602052604090205415610d765760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbc90611578565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107bb565b60408510610e425760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b600084848484604051602001610e5b9493929190612454565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610edb576000888883818110610e9d57610e9d612496565b90506020020135905082811115610ec257826000528060205260406000209250610ed2565b8060005282602052604060002092505b50600101610e81565b508060005414610f1e5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f935760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc390899089906124ac565b6000604051808303816000865af19150503d8060008114611000576040519150601f19603f3d011682016040523d82523d6000602084013e611005565b606091505b50509050806110565760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b26103653683900383018361235b565b600083815260026020526040902054146110de5760405162461bcd60e51b8152600401610633906123ae565b60026110f060c0830160a084016124bc565b60028111156111015761110161237e565b146111425760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060e0840191505060c083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f96103653683900383018361235b565b600083815260026020526040902054146112255760405162461bcd60e51b8152600401610633906123ae565b600161123760c0830160a084016124bc565b60028111156112485761124861237e565b146112855760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b60008281526002602052604081208190556112a660e0830160c084016124d7565b6001600160a01b031614611301576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060408401915050602083016124d7565b61131160408201602083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61136581611578565b600083815260026020526040902054146113915760405162461bcd60e51b8152600401610633906123ae565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166113ca91906124f4565b6113d491906124f4565b4210156114385760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b600061144382611f9b565b905060028160038111156114595761145961237e565b1480611476575060008160038111156114745761147461237e565b145b6114df5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526114fc82611578565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115727f000000000000000000000000000000000000000000000000000000000000000083612432565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986115ad989097969101612507565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561162a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164e9190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561168b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116af9190612585565b50925050506004548111156116f95760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156117bb576006541561176d5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611811576118116123ff565b040311156118545760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b61185d81611578565b600083815260026020526040902054146118895760405162461bcd60e51b8152600401610633906123ae565b60c08101516001600160a01b0316156118db5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b60016118e682611f9b565b60038111156118f7576118f761237e565b146119445760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b60015482111561198c57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261199c81611578565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a0557611a056123ff565b040311611a465760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611a4f81611578565b60008381526002602052604090205414611a7b5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611a9357611a9361237e565b14611ad25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611b565760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b6a82611578565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611c255760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b600454600654611c3591906124f4565b4211611c9e5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d399190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611d76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9a9190612585565b50925050508181036108385760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611e3557611e356123ff565b040311611e765760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611e7f81611578565b60008381526002602052604090205414611eab5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ec357611ec361237e565b14611f025760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611f875760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b6a82611578565b6000816060015163ffffffff16600003611fb757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611ff357506003919050565b6000600c836060015163ffffffff16420381612011576120116123ff565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612055576001925061205a565b600092505b50505b919050565b6001600160a01b03811681146117bb57600080fd5b803561205d81612062565b803563ffffffff8116811461205d57600080fd5b80356003811061205d57600080fd5b600060e082840312156120b757600080fd5b60405160e0810181811067ffffffffffffffff821117156120e857634e487b7160e01b600052604160045260246000fd5b604052823581529050806120fe60208401612077565b602082015261210f60408401612082565b604082015261212060608401612082565b606082015261213160808401612082565b608082015261214260a08401612096565b60a082015261215360c08401612077565b60c08201525092915050565b600080610100838503121561217357600080fd5b8235915061218484602085016120a5565b90509250929050565b600080600061012084860312156121a357600080fd5b83359250602084013591506121bb85604086016120a5565b90509250925092565b6000602082840312156121d657600080fd5b5035919050565b600080604083850312156121f057600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461205d57600080fd5b60008083601f84011261222957600080fd5b50813567ffffffffffffffff81111561224157600080fd5b60208301915083602082850101111561225957600080fd5b9250929050565b6000806000806000806080878903121561227957600080fd5b863567ffffffffffffffff8082111561229157600080fd5b818901915089601f8301126122a557600080fd5b8135818111156122b457600080fd5b8a60208260051b85010111156122c957600080fd5b602083019850809750506122df60208a016121ff565b95506122ed60408a01612077565b9450606089013591508082111561230357600080fd5b5061231089828a01612217565b979a9699509497509295939492505050565b60008082840361010081121561233757600080fd5b8335925060e0601f198201121561234d57600080fd5b506020830190509250929050565b600060e0828403121561236d57600080fd5b61237783836120a5565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123a8576123a861237e565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611572576115726123d6565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561242757600080fd5b815161237781612062565b60008261244f57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156124ce57600080fd5b61237782612096565b6000602082840312156124e957600080fd5b813561237781612062565b80820180821115611572576115726123d6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061255f5761255f61237e565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561259b57600080fd5b50508251602084015160408501516060909501519196909550909250905056fea26469706673582212204314ec468d95ad31fe7eafafdb876c007cf6b72384de11516dd93c0e0c209c5264736f6c63430008120033", diff --git a/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol b/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol index d18fdd22..f96307ad 100644 --- a/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol @@ -32,7 +32,7 @@ contract RouterArbToGnosis is IRouterToL1 { SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here. struct SequencerDelayLimitDecreaseRequest { - uint256 requestedsequencerDelayLimit; + uint256 requestedSequencerDelayLimit; uint256 timestamp; } @@ -82,6 +82,7 @@ contract RouterArbToGnosis is IRouterToL1 { if (newsequencerDelayLimit > sequencerDelayLimit) { // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown. sequencerDelayLimit = newsequencerDelayLimit; + sendSequencerDelayLimit(); emit sequencerDelayLimitUpdated(newsequencerDelayLimit); } else if (newsequencerDelayLimit < sequencerDelayLimit) { require( @@ -90,7 +91,7 @@ contract RouterArbToGnosis is IRouterToL1 { ); sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({ - requestedsequencerDelayLimit: newsequencerDelayLimit, + requestedSequencerDelayLimit: newsequencerDelayLimit, timestamp: block.timestamp }); emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit); @@ -98,27 +99,28 @@ contract RouterArbToGnosis is IRouterToL1 { } /// @dev execute sequencerDelayLimitDecreaseRequest - function executesequencerDelayLimitDecreaseRequest() external { + function executeSequencerDelayLimitDecreaseRequest() external { require(sequencerDelayLimitDecreaseRequest.timestamp != 0, "No pending sequencer limit decrease request."); require( block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit, "Sequencer limit decrease request is still pending." ); - uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit; + uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerDelayLimit; delete sequencerDelayLimitDecreaseRequest; - (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); + (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); // check the request is still consistent with the arbiturm bridge - if (currentsequencerDelayLimit == requestedsequencerDelayLimit) { - sequencerDelayLimit = requestedsequencerDelayLimit; - emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit); + if (currentSequencerDelayLimit == requestedSequencerDelayLimit) { + sequencerDelayLimit = requestedSequencerDelayLimit; + sendSequencerDelayLimit(); + emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit); } } /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge - function sendSequencerDelayLimit() public { + function sendSequencerDelayLimit() internal { bytes memory data = abi.encodeCall( ISequencerDelayUpdatable.updateSequencerDelayLimit, (sequencerDelayLimit, block.timestamp) diff --git a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol index ca40c802..dadabea9 100644 --- a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol @@ -28,7 +28,6 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { address internal constant BURN_ADDRESS = address(0); // Address to send burned eth uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time - uint256 internal constant RELAY_TIMEOUT = 604800; // 7 days uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB. uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots. @@ -44,6 +43,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock. + uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update. enum CensorshipTestStatus { Failed, @@ -153,10 +153,11 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { require(msg.sender == address(amb), "Not from bridge."); require(bytes32(routerChainId) == amb.messageSourceChainId(), "Invalid chain id."); require(routerArbToGnosis == amb.messageSender(), "Not from router."); - require(_timestamp + RELAY_TIMEOUT >= block.timestamp, "Stale message. Timeout exceeded."); + require(timestampDelayUpdated < _timestamp, "Message is outdated."); if (sequencerDelayLimit != _newSequencerDelayLimit) { sequencerDelayLimit = _newSequencerDelayLimit; + timestampDelayUpdated = _timestamp; emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit); } } diff --git a/contracts/src/test/bridge-mocks/gnosis/MockAMB.sol b/contracts/src/test/bridge-mocks/gnosis/MockAMB.sol index 0ee10de5..ad137d76 100644 --- a/contracts/src/test/bridge-mocks/gnosis/MockAMB.sol +++ b/contracts/src/test/bridge-mocks/gnosis/MockAMB.sol @@ -3,7 +3,6 @@ pragma solidity 0.8.18; import "../../../canonical/gnosis-chain/IAMB.sol"; -import "../../../libraries/gnosis-chain/Bytes.sol"; contract MockAMB is IAMB { event MockedEvent(bytes32 indexed messageId, bytes encodedData); From ca1d6269d279f852e3f8d05f732abf3fe3f63a01 Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Fri, 16 Jun 2023 17:08:28 +0900 Subject: [PATCH 12/58] fix(contracts): typo Gnosis, not Ethereum --- contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol b/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol index 819fef26..3b7bcd26 100644 --- a/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol @@ -37,7 +37,7 @@ contract VeaInboxArbToGnosis is IVeaInbox { // * Events * // // ************************************* // - /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum. + /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis. /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message). event MessageSent(bytes _nodeData); From 09e57737b17eb516cdd83e7d912312fe3663ce7e Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Mon, 19 Jun 2023 16:07:07 +0900 Subject: [PATCH 13/58] fix(contracts): typo --- contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol index 299f33f6..e10f88f3 100644 --- a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol +++ b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol @@ -174,7 +174,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { } /// @dev execute sequencerDelayLimitDecreaseRequest - function executesequencerDelayLimitDecreaseRequest() external { + function executeSequencerDelayLimitDecreaseRequest() external { require(sequencerDelayLimitDecreaseRequest.timestamp != 0, "No pending sequencer limit decrease request."); require( block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit, From 1554e7bb4d2ef37159b15e408b92513d9e895be7 Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Mon, 19 Jun 2023 16:40:21 +0900 Subject: [PATCH 14/58] chore(contracts): explicit type casting --- contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol | 2 +- contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol index e10f88f3..3174d2b6 100644 --- a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol +++ b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol @@ -267,7 +267,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock. // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value require( - block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod, + block.timestamp >= uint256(_claim.timestampClaimed) + sequencerDelayLimit + epochPeriod, "Claim must wait atleast maxL2StateSyncDelay." ); diff --git a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol index dadabea9..93d10c96 100644 --- a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol @@ -236,7 +236,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock. // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value require( - block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod, + block.timestamp >= uint256(_claim.timestampClaimed) + sequencerDelayLimit + epochPeriod, "Claim must wait atleast maxL2StateSyncDelay." ); From 7ea437b193a409a9af33b5e93c5d94830edd5f0d Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Wed, 28 Jun 2023 17:42:47 +0900 Subject: [PATCH 15/58] feat(contracts): gnosis to arbitrum bridging --- contracts/README.md | 26 +- .../01-arb-goerli-to-chiado-outbox.ts | 27 +- .../01-arb-goerli-to-goerli-outbox.ts | 15 +- .../deploy/01-outbox/01-arb-to-eth-outbox.ts | 32 +- .../01-outbox/01-arb-to-gnosis-outbox.ts | 24 +- .../01-chiado-to-arb-goerli-outbox.ts | 155 +++ .../01-outbox/01-gnosis-to-arb-outbox.ts | 164 +++ .../02-inbox/02-chiado-to-arb-goerli-inbox.ts | 60 ++ .../deploy/02-inbox/02-gnosis-to-arb-inbox.ts | 66 ++ .../03-chiado-to-arb-goerli-router.ts | 76 ++ .../03-routers/03-gnosis-to-arb-router.ts | 83 ++ .../VeaInboxArbToEthDevnet.json | 22 +- .../VeaInboxArbToEthTestnet.json | 18 +- .../VeaInboxArbToGnosisDevnet.json | 46 +- .../VeaInboxArbToGnosisTestnet.json | 46 +- .../VeaOutboxGnosisToArbDevnet.json | 993 ++++++++++++++++++ .../VeaOutboxGnosisToArbTestnet.json | 928 ++++++++++++++++ .../chiado/VeaInboxGnosisToArbDevnet.json | 395 +++++++ .../chiado/VeaInboxGnosisToArbTestnet.json | 395 +++++++ .../chiado/VeaOutboxArbToGnosisDevnet.json | 131 ++- .../chiado/VeaOutboxArbToGnosisTestnet.json | 111 +- .../goerli/RouterArbToGnosisDevnet.json | 68 +- .../goerli/RouterArbToGnosisTestnet.json | 68 +- .../goerli/RouterGnosisToArbDevnet.json | 651 ++++++++++++ .../goerli/RouterGnosisToArbTestnet.json | 651 ++++++++++++ .../goerli/VeaOutboxArbToEthDevnet.json | 111 +- .../goerli/VeaOutboxArbToEthTestnet.json | 104 +- contracts/package.json | 9 +- .../src/arbitrumToEth/VeaOutboxArbToEth.sol | 55 +- .../arbitrumToGnosis/RouterArbToGnosis.sol | 36 +- .../arbitrumToGnosis/VeaInboxArbToGnosis.sol | 7 +- .../arbitrumToGnosis/VeaOutboxArbToGnosis.sol | 93 +- .../src/arbitrumToOptimism/RouterArbToOp.sol | 70 -- .../arbitrumToOptimism/VeaInboxArbToOp.sol | 195 ---- .../arbitrumToOptimism/VeaOutboxArbToOp.sol | 359 ------- .../canonical/arbitrum/AddressAliasHelper.sol | 30 + contracts/src/canonical/arbitrum/IBridge.sol | 2 + contracts/src/canonical/arbitrum/IInbox.sol | 25 + .../arbitrumToEth/VeaOutboxArbToEthDevnet.sol | 16 +- .../VeaOutboxArbToGnosisDevnet.sol | 45 +- .../VeaOutboxGnosisToArbDevnet.sol | 156 +++ .../gnosisToArbitrum/RouterGnosisToArb.sol | 323 ++++++ .../gnosisToArbitrum/VeaInboxGnosisToArb.sol | 236 +++++ .../gnosisToArbitrum/VeaOutboxGnosisToArb.sol | 434 ++++++++ .../src/interfaces/routers/IRouterToArb.sol | 32 + .../{IRouterToL1.sol => IRouterToGnosis.sol} | 8 +- .../src/interfaces/routers/IRouterToL2.sol | 23 - .../src/interfaces/tokens/gnosis/IWETH.sol | 28 + .../updaters/ISequencerFutureUpdatable.sol | 19 + .../ArbitrumToEth/VeaOutboxMockArbToEth.sol | 8 +- .../test/bridge-mocks/arbitrum/BridgeMock.sol | 5 + .../test/bridge-mocks/arbitrum/InboxMock.sol | 13 + 52 files changed, 6583 insertions(+), 1110 deletions(-) create mode 100644 contracts/deploy/01-outbox/01-chiado-to-arb-goerli-outbox.ts create mode 100644 contracts/deploy/01-outbox/01-gnosis-to-arb-outbox.ts create mode 100644 contracts/deploy/02-inbox/02-chiado-to-arb-goerli-inbox.ts create mode 100644 contracts/deploy/02-inbox/02-gnosis-to-arb-inbox.ts create mode 100644 contracts/deploy/03-routers/03-chiado-to-arb-goerli-router.ts create mode 100644 contracts/deploy/03-routers/03-gnosis-to-arb-router.ts create mode 100644 contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbDevnet.json create mode 100644 contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbTestnet.json create mode 100644 contracts/deployments/chiado/VeaInboxGnosisToArbDevnet.json create mode 100644 contracts/deployments/chiado/VeaInboxGnosisToArbTestnet.json create mode 100644 contracts/deployments/goerli/RouterGnosisToArbDevnet.json create mode 100644 contracts/deployments/goerli/RouterGnosisToArbTestnet.json delete mode 100644 contracts/src/arbitrumToOptimism/RouterArbToOp.sol delete mode 100644 contracts/src/arbitrumToOptimism/VeaInboxArbToOp.sol delete mode 100644 contracts/src/arbitrumToOptimism/VeaOutboxArbToOp.sol create mode 100644 contracts/src/canonical/arbitrum/AddressAliasHelper.sol create mode 100644 contracts/src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol create mode 100644 contracts/src/gnosisToArbitrum/RouterGnosisToArb.sol create mode 100644 contracts/src/gnosisToArbitrum/VeaInboxGnosisToArb.sol create mode 100644 contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol create mode 100644 contracts/src/interfaces/routers/IRouterToArb.sol rename contracts/src/interfaces/routers/{IRouterToL1.sol => IRouterToGnosis.sol} (63%) delete mode 100644 contracts/src/interfaces/routers/IRouterToL2.sol create mode 100644 contracts/src/interfaces/tokens/gnosis/IWETH.sol create mode 100644 contracts/src/interfaces/updaters/ISequencerFutureUpdatable.sol diff --git a/contracts/README.md b/contracts/README.md index 0d696611..2f40b8bc 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -10,22 +10,28 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments #### Goerli -- [RouterArbToGnosisDevnet](https://goerli.etherscan.io/address/0x9F4407785DFf95c08Bf9a0d9d4A5a164C48eC5CB) -- [RouterArbToGnosisTestnet](https://goerli.etherscan.io/address/0xF04354D2286C8Db33aE6F454728C2F935ae5CD82) -- [VeaOutboxArbToEthDevnet](https://goerli.etherscan.io/address/0xb0263478A46d885D715B01fbac745500B9576634) -- [VeaOutboxArbToEthTestnet](https://goerli.etherscan.io/address/0x63d66abf907E7AF1516fF0DFb9849cb3CBAF3780) +- [RouterArbToGnosisDevnet](https://goerli.etherscan.io/address/0x8Bf88E6474d93bD2Dc0d76CB3BE8809c6BB84148) +- [RouterArbToGnosisTestnet](https://goerli.etherscan.io/address/0x931FA807020231bCE1340Be8E1e5054207BbAFEd) +- [RouterGnosisToArbDevnet](https://goerli.etherscan.io/address/0x21596998458c428d745d171FA0636B885ed18DaC) +- [RouterGnosisToArbTestnet](https://goerli.etherscan.io/address/0xC21c20a719fAc23c54c336FA0E16a0CFdC4baA00) +- [VeaOutboxArbToEthDevnet](https://goerli.etherscan.io/address/0xE8ea62d3a4F06301016b9C23Ace108F3D8027839) +- [VeaOutboxArbToEthTestnet](https://goerli.etherscan.io/address/0x92Cd1F40e5A4FFa25f83Dd9231EBD9df02eD6a5F) #### Arbitrum Goerli -- [VeaInboxArbToEthDevnet](https://goerli.arbiscan.io/address/0x5Df4452965cd2ff87f205AE5b10b5d0F65223116) -- [VeaInboxArbToEthTestnet](https://goerli.arbiscan.io/address/0xc8c44fb196aF9C5E41B48f74E1A86A379b70bd70) -- [VeaInboxArbToGnosisDevnet](https://goerli.arbiscan.io/address/0x6bC3C7Bcd2C6C2d8BFEAA3642c425cAE25F7fe17) -- [VeaInboxArbToGnosisTestnet](https://goerli.arbiscan.io/address/0xDF216C98773DA7998EE49AE8106BFe9724cf2944) +- [VeaInboxArbToEthDevnet](https://goerli.arbiscan.io/address/0xDa528e9BE20a8A22437D28Ed6C63bb6d00Ad0032) +- [VeaInboxArbToEthTestnet](https://goerli.arbiscan.io/address/0xE732B5b0DEE43619031e080Da461059F75a260E2) +- [VeaInboxArbToGnosisDevnet](https://goerli.arbiscan.io/address/0x6164EA58a1f5359D2E54ea8eB9e5971B7C8dB0f1) +- [VeaInboxArbToGnosisTestnet](https://goerli.arbiscan.io/address/0x76fa89666bd55736832a4350b9B8dA6bB1878BeF) +- [VeaOutboxGnosisToArbDevnet](https://goerli.arbiscan.io/address/0xcC196cC90bD30109E39400817e6ef63A1b744659) +- [VeaOutboxGnosisToArbTestnet](https://goerli.arbiscan.io/address/0x663697f5748c5f4d46a15114Dde5514356E794F4) #### Chiado -- [VeaOutboxArbToGnosisDevnet](https://blockscout.com/gnosis/chiado/address/0xDBa4fb8C75816CF9DcDbC66eDA361AD198314577) -- [VeaOutboxArbToGnosisTestnet](https://blockscout.com/gnosis/chiado/address/0xb61BEB66796Bbf59BBa3e5feE4Bab2304B889590) +- [VeaInboxGnosisToArbDevnet](https://blockscout.com/gnosis/chiado/address/0xe4AF4f1B42749d003C6d6eFdc05c11F33581E55B) +- [VeaInboxGnosisToArbTestnet](https://blockscout.com/gnosis/chiado/address/0xB10EF39cc9b45A8EAfa87655063E3dD83D675075) +- [VeaOutboxArbToGnosisDevnet](https://blockscout.com/gnosis/chiado/address/0xE2067941210d684bA8171F7C9dF372931fC6c245) +- [VeaOutboxArbToGnosisTestnet](https://blockscout.com/gnosis/chiado/address/0x0E459f63db78E2d5E8DC16a717F30A3d24cb79c2) ## Getting Started diff --git a/contracts/deploy/01-outbox/01-arb-goerli-to-chiado-outbox.ts b/contracts/deploy/01-outbox/01-arb-goerli-to-chiado-outbox.ts index 4dbcfc8a..891ba577 100644 --- a/contracts/deploy/01-outbox/01-arb-goerli-to-chiado-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-goerli-to-chiado-outbox.ts @@ -11,27 +11,27 @@ enum ReceiverChains { const paramsByChainId = { GNOSIS_CHIADO: { - deposit: parseEther("0.001"), - epochPeriod: 1800, // 60 min - claimDelay: 0, // Assume no sequencer backdating + deposit: parseEther("0.1"), + epochPeriod: 1800, // 30 min minChallengePeriod: 0, // 30 min numEpochTimeout: 10000000000000, // never - maxMissingBlocks: 10000000000000, amb: "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", + sequencerLimit: 86400, + maxMissingBlocks: 10000000000000, routerChainId: 5, - sequencerLimit: 86400, // 24 hours + WETH: "0x8d74e5e4DA11629537C4575cB0f33b4F0Dfa42EB", + maxClaimDelayEpochs: 3, }, HARDHAT: { - deposit: parseEther("5"), // 120 xDAI budget for timeout - // Average happy path wait time is 22.5 mins, assume no censorship + deposit: parseEther("1"), + epochPeriod: 1800, // 30 min minChallengePeriod: 600, // 15 min - challengePeriod: 600, // 15 min (assume no sequencer backdating) numEpochTimeout: 24, // 6 hours - claimDelay: 2, amb: ethers.constants.AddressZero, + sequencerLimit: 0, maxMissingBlocks: 10000000000000, routerChainId: 31337, - sequencerLimit: 86400, // 24 hours + WETH: ethers.constants.AddressZero, }, }; @@ -61,10 +61,11 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { routerChainId, minChallengePeriod, numEpochTimeout, - claimDelay, amb, maxMissingBlocks, sequencerLimit, + WETH, + maxClaimDelayEpochs, } = paramsByChainId[ReceiverChains[chainId]]; // Hack to predict the deployment address on the sender chain. @@ -90,6 +91,8 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { sequencerLimit, maxMissingBlocks, routerChainId, + WETH, + maxClaimDelayEpochs, ], log: true, }); @@ -123,6 +126,8 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { sequencerLimit, maxMissingBlocks, routerChainId, + WETH, + maxClaimDelayEpochs, ], log: true, ...gasOptions, diff --git a/contracts/deploy/01-outbox/01-arb-goerli-to-goerli-outbox.ts b/contracts/deploy/01-outbox/01-arb-goerli-to-goerli-outbox.ts index b1e308d1..718c0a9e 100644 --- a/contracts/deploy/01-outbox/01-arb-goerli-to-goerli-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-goerli-to-goerli-outbox.ts @@ -18,6 +18,7 @@ const paramsByChainId = { numEpochTimeout: 10000000000000, // never maxMissingBlocks: 10000000000000, arbitrumBridge: "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", // https://developer.arbitrum.io/useful-addresses + maxClaimDelayEpochs: 3, }, HARDHAT: { deposit: parseEther("10"), // 120 eth budget for timeout @@ -27,6 +28,7 @@ const paramsByChainId = { numEpochTimeout: 10000000000000, // 6 hours maxMissingBlocks: 10000000000000, arbitrumBridge: ethers.constants.AddressZero, + maxClaimDelayEpochs: 3, }, }; @@ -45,8 +47,15 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { HARDHAT: config.networks.localhost, }; - const { deposit, epochPeriod, numEpochTimeout, minChallengePeriod, maxMissingBlocks, arbitrumBridge } = - paramsByChainId[ReceiverChains[chainId]]; + const { + deposit, + epochPeriod, + numEpochTimeout, + minChallengePeriod, + maxMissingBlocks, + arbitrumBridge, + maxClaimDelayEpochs, + } = paramsByChainId[ReceiverChains[chainId]]; // Hack to predict the deployment address on the sender chain. // TODO: use deterministic deployments @@ -83,6 +92,7 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { veaInboxAddress, bridgeAddress, maxMissingBlocks, + maxClaimDelayEpochs, ], log: true, }); @@ -115,6 +125,7 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { veaInboxAddress, arbitrumBridge, maxMissingBlocks, + maxClaimDelayEpochs, ], log: true, }); diff --git a/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts b/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts index f68b1976..c20f9f3b 100644 --- a/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts @@ -12,22 +12,24 @@ enum ReceiverChains { const paramsByChainId = { ETHEREUM_MAINNET: { - deposit: parseEther("10"), // ~2000 ETH budget, enough for 8 days of challenges - // bridging speed is 28 - 29 hours. - epochPeriod: 3600, // 1 hours + deposit: parseEther("12"), // ~1100 ETH budget, enough for 8 days of challenges + // bridging speed is 29 - 31 hours. + epochPeriod: 7200, // 2 hours minChallengePeriod: 10800, // 3 hours - numEpochTimeout: 504, // 21 days + numEpochTimeout: 252, // 21 days maxMissingBlocks: 49, // 49 in 900 slots, assumes 10% non-censoring validators - arbitrumBridge: "0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a", // https://developer.arbitrum.io/useful-addresses + arbitrumBridge: "0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a", // https://developer.arbitrum.io/useful-addresses, + maxClaimDelayEpochs: 3, }, ETHEREUM_GOERLI: { - deposit: parseEther("1"), // ~200 ETH budget to start, enough for 8 days of challenges - // bridging speed is 27 - 28 hours. - epochPeriod: 3600, // 1 hours + deposit: parseEther("1"), // ~100 ETH budget to start, enough for 8 days of challenges + // bridging speed is 29 - 31 hours. + epochPeriod: 7200, // 2 hours minChallengePeriod: 10800, // 3 hours numEpochTimeout: 1000000, // never maxMissingBlocks: 1000000, // any, goerli network performance is poor, so can't use the censorship test well arbitrumBridge: "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", // https://developer.arbitrum.io/useful-addresses + maxClaimDelayEpochs: 3, }, HARDHAT: { deposit: parseEther("10"), @@ -36,6 +38,7 @@ const paramsByChainId = { numEpochTimeout: 10000000000000, // never maxMissingBlocks: 10, arbitrumBridge: ethers.constants.AddressZero, + maxClaimDelayEpochs: 3, }, }; @@ -55,8 +58,15 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { HARDHAT: config.networks.localhost, }; - const { deposit, epochPeriod, minChallengePeriod, numEpochTimeout, claimDelay, maxMissingBlocks, arbitrumBridge } = - paramsByChainId[ReceiverChains[chainId]]; + const { + deposit, + epochPeriod, + minChallengePeriod, + numEpochTimeout, + maxMissingBlocks, + arbitrumBridge, + maxClaimDelayEpochs, + } = paramsByChainId[ReceiverChains[chainId]]; // Hack to predict the deployment address on the sender chain. // TODO: use deterministic deployments @@ -104,6 +114,7 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { veaInboxAddress, bridge.address, maxMissingBlocks, + maxClaimDelayEpochs, ], log: true, }); @@ -138,6 +149,7 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { veaInboxAddress, arbitrumBridge, maxMissingBlocks, + maxClaimDelayEpochs, ], log: true, }); diff --git a/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts b/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts index 31b65893..0ad81b72 100644 --- a/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts @@ -12,25 +12,29 @@ enum ReceiverChains { const paramsByChainId = { GNOSIS_MAINNET: { - deposit: parseEther("2000"), // ~ 400k xDAI budget to start, enough for 8 days of challenges - // bridging speed is 28 - 29 hours. - epochPeriod: 3600, // 1 hours + deposit: parseEther("4"), // ~400 WETH budget to start, enough for 8 days of challenges + // bridging speed is 29 - 31 hours. + epochPeriod: 7200, // 2 hours minChallengePeriod: 10800, // 3 hours - numEpochTimeout: 504, // 21 days + numEpochTimeout: 168, // 14 days maxMissingBlocks: 345, // 345 in 2160 slots, assumes 20% non-censoring validators routerChainId: 1, amb: "0x75Df5AF045d91108662D8080fD1FEFAd6aA0bb59", + WETH: "0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1", + maxClaimDelayEpochs: 3, sequencerLimit: 86400, // 24 hours }, GNOSIS_CHIADO: { - deposit: parseEther("1"), // ~200 xDAI budget to start, enough for 8 days of challenges - // bridging speed is 28 - 29 hours. - epochPeriod: 3600, // 1 hours + deposit: parseEther("0.2"), // ~20 WETH budget to start, enough for 8 days of challenges + // bridging speed is 29 - 31 hours. + epochPeriod: 7200, // 2 hours minChallengePeriod: 10800, // 3 hours numEpochTimeout: 1000000, // never maxMissingBlocks: 1000000, // any routerChainId: 5, amb: "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", + WETH: "0x8d74e5e4DA11629537C4575cB0f33b4F0Dfa42EB", + maxClaimDelayEpochs: 3, sequencerLimit: 86400, // 24 hours }, HARDHAT: { @@ -79,6 +83,8 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { amb, maxMissingBlocks, sequencerLimit, + WETH, + maxClaimDelayEpochs, } = paramsByChainId[ReceiverChains[chainId]]; // Hack to predict the deployment address on the sender chain. @@ -104,6 +110,8 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { sequencerLimit, maxMissingBlocks, routerChainId, + WETH, + maxClaimDelayEpochs, ], log: true, }); @@ -136,6 +144,8 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { sequencerLimit, maxMissingBlocks, routerChainId, + WETH, + maxClaimDelayEpochs, ], log: true, gasPrice: ethers.utils.parseUnits("1", "gwei"), // chiado rpc response underprices gas diff --git a/contracts/deploy/01-outbox/01-chiado-to-arb-goerli-outbox.ts b/contracts/deploy/01-outbox/01-chiado-to-arb-goerli-outbox.ts new file mode 100644 index 00000000..7f6e38d0 --- /dev/null +++ b/contracts/deploy/01-outbox/01-chiado-to-arb-goerli-outbox.ts @@ -0,0 +1,155 @@ +import { parseEther } from "ethers/lib/utils"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import getContractAddress from "../../deploy-helpers/getContractAddress"; +import { ethers } from "hardhat"; + +enum ReceiverChains { + ARBITRUM_GOERLI = 421613, + HARDHAT = 31337, +} + +const paramsByChainId = { + ARBITRUM_GOERLI: { + deposit: parseEther("0.1"), + epochPeriod: 1800, // 30 min + challengePeriod: 0, // 30 min + numEpochTimeout: 10000000000000, // never + sequencerDelayLimit: 86400, + sequencerFutureLimit: 3600, + maxMissingBlocks: 10000000000000, + routerChainId: 5, + maxClaimDelayEpochs: 100, + maxClaimFutureEpochs: 100, + }, + HARDHAT: { + deposit: parseEther("1"), + epochPeriod: 1800, // 30 min + challengePeriod: 600, // 15 min + numEpochTimeout: 24, // 6 hours + amb: ethers.constants.AddressZero, + sequencerDelayLimit: 86400, + sequencerFutureLimit: 3600, + maxMissingBlocks: 10000000000000, + routerChainId: 31337, + maxClaimDelayEpochs: 100, + maxClaimFutureEpochs: 100, + }, +}; + +const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { ethers, deployments, getNamedAccounts, getChainId, config } = hre; + const { deploy } = deployments; + const { providers } = ethers; + + // fallback to hardhat node signers on local network + const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; + const chainId = Number(await getChainId()); + console.log("deploying to chainId %s with deployer %s", chainId, deployer); + + const senderNetworks = { + ARBITRUM_GOERLI: config.networks.chiado, + HARDHAT: config.networks.localhost, + }; + + const routerNetworks = { + ARBITRUM_GOERLI: config.networks.goerli, + HARDHAT: config.networks.localhost, + }; + + const { + deposit, + epochPeriod, + challengePeriod, + numEpochTimeout, + sequencerDelayLimit, + sequencerFutureLimit, + maxClaimDelayEpochs, + maxClaimFutureEpochs, + } = paramsByChainId[ReceiverChains[chainId]]; + + // Hack to predict the deployment address on the sender chain. + // TODO: use deterministic deployments + + // ---------------------------------------------------------------------------------------------- + const hardhatDeployer = async () => { + let nonce = await ethers.provider.getTransactionCount(deployer); + nonce += 3; // SenderGatewayToEthereum deploy tx will be the 5th after this, same network for both sender/receiver. + + const veaInboxAddress = getContractAddress(deployer, nonce); + console.log("calculated future veaInbox for nonce %d: %s", nonce, veaInboxAddress); + + // TODO outbox mock + /* + await deploy("VeaOutboxGnosisMock", { + from: deployer, + args: [ + deposit, + epochPeriod, + challengePeriod, + numEpochTimeout, + amb, + ethers.constants.AddressZero, + sequencerLimit, + maxMissingBlocks, + routerChainId, + WETH, + maxClaimDelayEpochs + ], + log: true, + }); + */ + }; + + // ---------------------------------------------------------------------------------------------- + const liveDeployer = async () => { + const gasOptions = { + maxFeePerGas: ethers.utils.parseUnits("1", "gwei"), + maxPriorityFeePerGas: ethers.utils.parseUnits("1", "gwei"), + }; + + const senderChainProvider = new providers.JsonRpcProvider(senderNetworks[ReceiverChains[chainId]].url); + let nonce = await senderChainProvider.getTransactionCount(deployer); + + const routerChainProvider = new providers.JsonRpcProvider(routerNetworks[ReceiverChains[chainId]].url); + let nonceRouter = await routerChainProvider.getTransactionCount(deployer); + + const routerAddress = getContractAddress(deployer, nonceRouter); + console.log("calculated future router for nonce %d: %s", nonce, routerAddress); + + const txn = await deploy("VeaOutboxGnosisToArbDevnet", { + from: deployer, + args: [ + deposit, + epochPeriod, + challengePeriod, + numEpochTimeout, + routerAddress, + sequencerDelayLimit, + sequencerFutureLimit, + maxClaimDelayEpochs, + maxClaimFutureEpochs, + ], + log: true, + ...gasOptions, + }); + + console.log("VeaOutboxGnosisToArbDevnet deployed to:", txn.address); + }; + + // ---------------------------------------------------------------------------------------------- + if (chainId === 31337) { + await hardhatDeployer(); + } else { + await liveDeployer(); + } +}; + +deployOutbox.tags = ["ChiadoToArbGoerliOutbox"]; +deployOutbox.skip = async ({ getChainId }) => { + const chainId = Number(await getChainId()); + console.log(chainId); + return !ReceiverChains[chainId]; +}; + +export default deployOutbox; diff --git a/contracts/deploy/01-outbox/01-gnosis-to-arb-outbox.ts b/contracts/deploy/01-outbox/01-gnosis-to-arb-outbox.ts new file mode 100644 index 00000000..ef1530cb --- /dev/null +++ b/contracts/deploy/01-outbox/01-gnosis-to-arb-outbox.ts @@ -0,0 +1,164 @@ +import { parseEther } from "ethers/lib/utils"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import getContractAddress from "../../deploy-helpers/getContractAddress"; +import { ethers } from "hardhat"; + +enum ReceiverChains { + ARBITRUM_GOERLI = 421613, + ARBITRUM = 42161, + HARDHAT = 31337, +} + +const paramsByChainId = { + ARBITRUM: { + deposit: parseEther("4"), // ~300 ETH budget for 3 days of challenges + epochPeriod: 7200, // 2 hours + challengePeriod: 86400, // 24 hours + numEpochTimeout: 84, // 7 days, + sequencerDelayLimit: 86400, + sequencerFutureLimit: 3600, + maxClaimDelayEpochs: 3, + maxClaimFutureEpochs: 1, + }, + ARBITRUM_GOERLI: { + deposit: parseEther("4"), + epochPeriod: 7200, // 2 hours + challengePeriod: 86400, // 24 hours + numEpochTimeout: 168, // 14 days + sequencerDelayLimit: 86400, + sequencerFutureLimit: 3600, + maxClaimDelayEpochs: 3, + maxClaimFutureEpochs: 1, + }, + HARDHAT: { + deposit: parseEther("2"), + epochPeriod: 1800, // 30 min + challengePeriod: 1800, // 30 min + numEpochTimeout: 10000000, // never + sequencerDelayLimit: 86400, + sequencerFutureLimit: 3600, + maxClaimDelayEpochs: 3, + maxClaimFutureEpochs: 1, + }, +}; + +const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { ethers, deployments, getNamedAccounts, getChainId, config } = hre; + const { deploy } = deployments; + const { providers } = ethers; + + // fallback to hardhat node signers on local network + const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; + const chainId = Number(await getChainId()); + console.log("deploying to chainId %s with deployer %s", chainId, deployer); + + const senderNetworks = { + ARBITRUM: config.networks.gnosischain, + ARBITRUM_GOERLI: config.networks.chiado, + HARDHAT: config.networks.localhost, + }; + + const routerNetworks = { + ARBITRUM: config.networks.mainnet, + ARBITRUM_GOERLI: config.networks.goerli, + HARDHAT: config.networks.localhost, + }; + + const { + deposit, + epochPeriod, + challengePeriod, + numEpochTimeout, + sequencerDelayLimit, + sequencerFutureLimit, + maxClaimDelayEpochs, + maxClaimFutureEpochs, + } = paramsByChainId[ReceiverChains[chainId]]; + + // Hack to predict the deployment address on the sender chain. + // TODO: use deterministic deployments + + // ---------------------------------------------------------------------------------------------- + const hardhatDeployer = async () => { + let nonce = await ethers.provider.getTransactionCount(deployer); + nonce += 3; // SenderGatewayToEthereum deploy tx will be the 5th after this, same network for both sender/receiver. + + const veaInboxAddress = getContractAddress(deployer, nonce); + console.log("calculated future veaInbox for nonce %d: %s", nonce, veaInboxAddress); + + // TODO outbox mock + /* + await deploy("VeaOutboxGnosisMock", { + from: deployer, + args: [ + deposit, + epochPeriod, + challengePeriod, + numEpochTimeout, + amb, + ethers.constants.AddressZero, + sequencerLimit, + maxMissingBlocks, + routerChainId, + WETH, + maxClaimDelayEpochs + ], + log: true, + }); + */ + }; + + // ---------------------------------------------------------------------------------------------- + const liveDeployer = async () => { + const gasOptions = { + maxFeePerGas: ethers.utils.parseUnits("1", "gwei"), + maxPriorityFeePerGas: ethers.utils.parseUnits("1", "gwei"), + }; + + const senderChainProvider = new providers.JsonRpcProvider(senderNetworks[ReceiverChains[chainId]].url); + let nonce = await senderChainProvider.getTransactionCount(deployer); + + const routerChainProvider = new providers.JsonRpcProvider(routerNetworks[ReceiverChains[chainId]].url); + let nonceRouter = await routerChainProvider.getTransactionCount(deployer); + + const routerAddress = getContractAddress(deployer, nonceRouter); + console.log("calculated future router for nonce %d: %s", nonce, routerAddress); + + const txn = await deploy("VeaOutboxGnosisToArb" + (chainId === 42161 ? "" : "Testnet"), { + from: deployer, + contract: "VeaOutboxGnosisToArb", + args: [ + deposit, + epochPeriod, + challengePeriod, + numEpochTimeout, + routerAddress, + sequencerDelayLimit, + sequencerFutureLimit, + maxClaimDelayEpochs, + maxClaimFutureEpochs, + ], + log: true, + ...gasOptions, + }); + + console.log("VeaOutboxGnosisToArb" + (chainId === 42161 ? "" : "Testnet") + " deployed to:", txn.address); + }; + + // ---------------------------------------------------------------------------------------------- + if (chainId === 31337) { + await hardhatDeployer(); + } else { + await liveDeployer(); + } +}; + +deployOutbox.tags = ["GnosisToArbOutbox"]; +deployOutbox.skip = async ({ getChainId }) => { + const chainId = Number(await getChainId()); + console.log(chainId); + return !ReceiverChains[chainId]; +}; + +export default deployOutbox; diff --git a/contracts/deploy/02-inbox/02-chiado-to-arb-goerli-inbox.ts b/contracts/deploy/02-inbox/02-chiado-to-arb-goerli-inbox.ts new file mode 100644 index 00000000..5e0ba1be --- /dev/null +++ b/contracts/deploy/02-inbox/02-chiado-to-arb-goerli-inbox.ts @@ -0,0 +1,60 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ethers } from "hardhat"; + +enum SenderChains { + GNOSIS_CHIADO = 10200, + HARDHAT = 31337, +} + +const paramsByChainId = { + GNOSIS_CHIADO: { + epochPeriod: 1800, // 30 minutes + amb: "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", + }, + HARDHAT: { + amb: ethers.constants.AddressZero, + epochPeriod: 1800, // 30 minutes + }, +}; + +// TODO: use deterministic deployments +const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { deployments, getNamedAccounts, getChainId } = hre; + const { deploy, execute } = deployments; + const chainId = Number(await getChainId()); + + const deployer = (await getNamedAccounts()).deployer; + console.log("deployer: %s", deployer); + + const { epochPeriod, amb } = paramsByChainId[SenderChains[chainId]]; + + // ---------------------------------------------------------------------------------------------- + + const veaOutboxArb = await hre.companionNetworks.arbitrumGoerli.deployments.get("VeaOutboxGnosisToArbDevnet"); + + const gasOptions = { + maxFeePerGas: ethers.utils.parseUnits("1", "gwei"), + maxPriorityFeePerGas: ethers.utils.parseUnits("1", "gwei"), + }; + + const inbox = await deploy("VeaInboxGnosisToArbDevnet", { + from: deployer, + contract: "VeaInboxGnosisToArb", + args: [epochPeriod, veaOutboxArb.address, amb], + log: true, + ...gasOptions, + }); + + console.log("VeaInboxGnosisToArbDevnet deployed to: %s", inbox.address); +}; + +deployInbox.tags = ["ChiadoToArbGoerliInbox"]; +deployInbox.skip = async ({ getChainId }) => { + const chainId = Number(await getChainId()); + console.log(chainId); + return !SenderChains[chainId]; +}; +deployInbox.runAtTheEnd = true; + +export default deployInbox; diff --git a/contracts/deploy/02-inbox/02-gnosis-to-arb-inbox.ts b/contracts/deploy/02-inbox/02-gnosis-to-arb-inbox.ts new file mode 100644 index 00000000..31d2e42c --- /dev/null +++ b/contracts/deploy/02-inbox/02-gnosis-to-arb-inbox.ts @@ -0,0 +1,66 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ethers } from "hardhat"; + +enum SenderChains { + GNOSIS = 100, + GNOSIS_CHIADO = 10200, + HARDHAT = 31337, +} + +const paramsByChainId = { + GNOSIS: { + epochPeriod: 7200, // 2 hours + amb: "0x75Df5AF045d91108662D8080fD1FEFAd6aA0bb59", + }, + GNOSIS_CHIADO: { + epochPeriod: 7200, // 2 hours + amb: "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", + }, + HARDHAT: { + epochPeriod: 7200, // 2 hours + }, +}; + +// TODO: use deterministic deployments +const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { deployments, getNamedAccounts, getChainId } = hre; + const { deploy, execute } = deployments; + const chainId = Number(await getChainId()); + + const deployer = (await getNamedAccounts()).deployer; + console.log("deployer: %s", deployer); + + const { epochPeriod, amb } = paramsByChainId[SenderChains[chainId]]; + + // ---------------------------------------------------------------------------------------------- + + const veaOutboxArb = await hre.companionNetworks.arbitrumGoerli.deployments.get( + "VeaOutboxGnosisToArb" + (chainId === 100 ? "" : "Testnet") + ); + + const gasOptions = { + maxFeePerGas: ethers.utils.parseUnits("1", "gwei"), + maxPriorityFeePerGas: ethers.utils.parseUnits("1", "gwei"), + }; + + const inbox = await deploy("VeaInboxGnosisToArb" + (chainId === 100 ? "" : "Testnet"), { + from: deployer, + contract: "VeaInboxGnosisToArb", + args: [epochPeriod, veaOutboxArb.address, amb], + log: true, + ...(chainId === 100 ? {} : gasOptions), + }); + + console.log("VeaInboxGnosisToArb" + (chainId === 100 ? "" : "Testnet") + " deployed to: %s", inbox.address); +}; + +deployInbox.tags = ["GnosisToArbInbox"]; +deployInbox.skip = async ({ getChainId }) => { + const chainId = Number(await getChainId()); + console.log(chainId); + return !SenderChains[chainId]; +}; +deployInbox.runAtTheEnd = true; + +export default deployInbox; diff --git a/contracts/deploy/03-routers/03-chiado-to-arb-goerli-router.ts b/contracts/deploy/03-routers/03-chiado-to-arb-goerli-router.ts new file mode 100644 index 00000000..6241f310 --- /dev/null +++ b/contracts/deploy/03-routers/03-chiado-to-arb-goerli-router.ts @@ -0,0 +1,76 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ethers } from "hardhat"; + +enum RouterChains { + ETHEREUM_GOERLI = 5, + HARDHAT = 31337, +} + +const paramsByChainId = { + ETHEREUM_GOERLI: { + arbitrumBridge: "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", // https://developer.arbitrum.io/useful-addresses + amb: "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", + }, + HARDHAT: { + arbitrumBridge: ethers.constants.AddressZero, + amb: ethers.constants.AddressZero, + }, +}; + +// TODO: use deterministic deployments +const deployRouter: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { deployments, getNamedAccounts, getChainId } = hre; + const { deploy, execute } = deployments; + const chainId = Number(await getChainId()); + + // fallback to hardhat node signers on local network + const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; + console.log("deployer: %s", deployer); + + const { arbitrumBridge, amb } = paramsByChainId[RouterChains[chainId]]; + + // ---------------------------------------------------------------------------------------------- + const hardhatDeployer = async () => { + const veaOutbox = await deployments.get("VeaOutboxGnosisToArbDevnet"); + const veaInbox = await deployments.get("VeaInboxGnosisToArbDevnet"); + + const router = await deploy("RouterGnosisToArbDevnet", { + from: deployer, + contract: "RouterGnosisToArb", + args: [arbitrumBridge, amb, veaInbox.address, veaOutbox.address, chainId], + }); + }; + + // ---------------------------------------------------------------------------------------------- + const liveDeployer = async () => { + const veaOutbox = await hre.companionNetworks.arbitrumGoerli.deployments.get("VeaOutboxGnosisToArbDevnet"); + const veaInbox = await hre.companionNetworks.chiado.deployments.get("VeaInboxGnosisToArbDevnet"); + + const router = await deploy("RouterGnosisToArbDevnet", { + from: deployer, + contract: "RouterGnosisToArb", + args: [arbitrumBridge, amb, veaInbox.address, veaOutbox.address, chainId], + log: true, + }); + + console.log("RouterGnosisToArbDevnet deployed to: %s", router.address); + }; + + // ---------------------------------------------------------------------------------------------- + if (chainId === 31337) { + await hardhatDeployer(); + } else { + await liveDeployer(); + } +}; + +deployRouter.tags = ["ChiadoToArbGoerliRouter"]; +deployRouter.skip = async ({ getChainId }) => { + const chainId = Number(await getChainId()); + console.log(chainId); + return !RouterChains[chainId]; +}; +deployRouter.runAtTheEnd = true; + +export default deployRouter; diff --git a/contracts/deploy/03-routers/03-gnosis-to-arb-router.ts b/contracts/deploy/03-routers/03-gnosis-to-arb-router.ts new file mode 100644 index 00000000..503a4483 --- /dev/null +++ b/contracts/deploy/03-routers/03-gnosis-to-arb-router.ts @@ -0,0 +1,83 @@ +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { DeployFunction } from "hardhat-deploy/types"; +import { ethers } from "hardhat"; + +enum RouterChains { + ETHEREUM_MAINNET = 1, + ETHEREUM_GOERLI = 5, + HARDHAT = 31337, +} + +const paramsByChainId = { + ETHEREUM_MAINNET: { + arbitrumBridge: "0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a", // https://developer.arbitrum.io/useful-addresses + amb: "0x4C36d2919e407f0Cc2Ee3c993ccF8ac26d9CE64e", + }, + ETHEREUM_GOERLI: { + arbitrumBridge: "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", // https://developer.arbitrum.io/useful-addresses + amb: "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", + }, + HARDHAT: { + arbitrumBridge: ethers.constants.AddressZero, + amb: ethers.constants.AddressZero, + }, +}; + +// TODO: use deterministic deployments +const deployRouter: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { deployments, getNamedAccounts, getChainId } = hre; + const { deploy, execute } = deployments; + const chainId = Number(await getChainId()); + + // fallback to hardhat node signers on local network + const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address; + console.log("deployer: %s", deployer); + + const { arbitrumBridge, amb } = paramsByChainId[RouterChains[chainId]]; + + // ---------------------------------------------------------------------------------------------- + const hardhatDeployer = async () => { + const veaOutbox = await deployments.get("VeaOutboxGnosisToArb" + (chainId === 100 ? "" : "Testnet")); + const veaInbox = await deployments.get("VeaInboxGnosisToArb" + (chainId === 100 ? "" : "Testnet")); + + const router = await deploy("RouterGnosisToArb" + (chainId === 100 ? "" : "Testnet"), { + from: deployer, + contract: "RouterGnosisToArb", + args: [arbitrumBridge, amb, veaInbox.address, veaOutbox.address, chainId], + }); + }; + + // ---------------------------------------------------------------------------------------------- + const liveDeployer = async () => { + const outboxNetwork = chainId === 1 ? hre.companionNetworks.arbitrum : hre.companionNetworks.arbitrumGoerli; + const inboxNetwork = chainId === 1 ? hre.companionNetworks.gnosischain : hre.companionNetworks.chiado; + const veaOutbox = await outboxNetwork.deployments.get("VeaOutboxGnosisToArb" + (chainId === 1 ? "" : "Testnet")); + const veaInbox = await inboxNetwork.deployments.get("VeaInboxGnosisToArb" + (chainId === 1 ? "" : "Testnet")); + + const router = await deploy("RouterGnosisToArb" + (chainId === 1 ? "" : "Testnet"), { + from: deployer, + contract: "RouterGnosisToArb", + args: [arbitrumBridge, amb, veaInbox.address, veaOutbox.address, chainId], + log: true, + }); + + console.log("RouterGnosisToArb" + (chainId === 1 ? "" : "Testnet") + " deployed to: %s", router.address); + }; + + // ---------------------------------------------------------------------------------------------- + if (chainId === 31337) { + await hardhatDeployer(); + } else { + await liveDeployer(); + } +}; + +deployRouter.tags = ["GnosisToArbRouter"]; +deployRouter.skip = async ({ getChainId }) => { + const chainId = Number(await getChainId()); + console.log(chainId); + return !RouterChains[chainId]; +}; +deployRouter.runAtTheEnd = true; + +export default deployRouter; diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json index 3b42df8d..18bbf527 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x5Df4452965cd2ff87f205AE5b10b5d0F65223116", + "address": "0xDa528e9BE20a8A22437D28Ed6C63bb6d00Ad0032", "abi": [ { "inputs": [ @@ -275,28 +275,28 @@ "type": "function" } ], - "transactionHash": "0xef2790720fe83fe9ee06ba518184fa7a6568e78ae900c7aa12b9127cb2b0c9b8", + "transactionHash": "0x85bf20a9f10d9749ac24eb631541ffad69eae9d9b6949c3a9f5a0284d474b987", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x5Df4452965cd2ff87f205AE5b10b5d0F65223116", + "contractAddress": "0xDa528e9BE20a8A22437D28Ed6C63bb6d00Ad0032", "transactionIndex": 1, - "gasUsed": "671409", + "gasUsed": "671421", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa3588eab3d75f1164e3c96c2a6aabb025926fbcce501c89a449049162089eb05", - "transactionHash": "0xef2790720fe83fe9ee06ba518184fa7a6568e78ae900c7aa12b9127cb2b0c9b8", + "blockHash": "0x67c95f8121661a676e0d7ba43a9c025d3ddf1b7471623fd8d9ffc0e2f1ec2dc6", + "transactionHash": "0x85bf20a9f10d9749ac24eb631541ffad69eae9d9b6949c3a9f5a0284d474b987", "logs": [], - "blockNumber": 26299176, - "cumulativeGasUsed": "671409", + "blockNumber": 28619481, + "cumulativeGasUsed": "671421", "status": 1, "byzantium": true }, "args": [ 1800, - "0xb0263478A46d885D715B01fbac745500B9576634" + "0xE8ea62d3a4F06301016b9C23Ace108F3D8027839" ], - "numDeployments": 12, - "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", + "numDeployments": 1, + "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0xf7aedd98f0149c6f63c4d59ad9fd5d6d2d16b75a42fe95d2064a157ff181007b\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161012001526105b401526000818161015f015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122091c8e50a4eb68a04b97bfd09e6eedc0e624aaef5954f963f1f6df55f1f0da9cf64736f6c63430008120033", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122091c8e50a4eb68a04b97bfd09e6eedc0e624aaef5954f963f1f6df55f1f0da9cf64736f6c63430008120033", diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json index 8e2977c3..2f234ad3 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json @@ -1,5 +1,5 @@ { - "address": "0xc8c44fb196aF9C5E41B48f74E1A86A379b70bd70", + "address": "0xE732B5b0DEE43619031e080Da461059F75a260E2", "abi": [ { "inputs": [ @@ -275,28 +275,28 @@ "type": "function" } ], - "transactionHash": "0x0f4880d34ee4ca999ea552b8b5aa4ecf907fc045cf9a0a65bf26f1762aedf82c", + "transactionHash": "0x16eb0844d8812b537c50b7978ec93fb5fb31fdb0ad9699d3488c5581a06cada4", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xc8c44fb196aF9C5E41B48f74E1A86A379b70bd70", + "contractAddress": "0xE732B5b0DEE43619031e080Da461059F75a260E2", "transactionIndex": 1, "gasUsed": "671421", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1a2eaade15fb32bb115ea1b4f44a89e3bd305f7c3aaf544e2e906fc92821d4cc", - "transactionHash": "0x0f4880d34ee4ca999ea552b8b5aa4ecf907fc045cf9a0a65bf26f1762aedf82c", + "blockHash": "0x5f7ccedda57217c8866006fced555d51c913947e172e7195b7c64b7745a1e999", + "transactionHash": "0x16eb0844d8812b537c50b7978ec93fb5fb31fdb0ad9699d3488c5581a06cada4", "logs": [], - "blockNumber": 26298910, + "blockNumber": 28619660, "cumulativeGasUsed": "671421", "status": 1, "byzantium": true }, "args": [ 7200, - "0x63d66abf907E7AF1516fF0DFb9849cb3CBAF3780" + "0x92Cd1F40e5A4FFa25f83Dd9231EBD9df02eD6a5F" ], - "numDeployments": 8, - "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", + "numDeployments": 1, + "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0xf7aedd98f0149c6f63c4d59ad9fd5d6d2d16b75a42fe95d2064a157ff181007b\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161012001526105b401526000818161015f015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122091c8e50a4eb68a04b97bfd09e6eedc0e624aaef5954f963f1f6df55f1f0da9cf64736f6c63430008120033", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122091c8e50a4eb68a04b97bfd09e6eedc0e624aaef5954f963f1f6df55f1f0da9cf64736f6c63430008120033", diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json index d4e6fef5..50a2edbd 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x6bC3C7Bcd2C6C2d8BFEAA3642c425cAE25F7fe17", + "address": "0x6164EA58a1f5359D2E54ea8eB9e5971B7C8dB0f1", "abi": [ { "inputs": [ @@ -207,6 +207,11 @@ "name": "_epoch", "type": "uint256" }, + { + "internalType": "uint256", + "name": "_gasLimit", + "type": "uint256" + }, { "components": [ { @@ -275,36 +280,36 @@ "type": "function" } ], - "transactionHash": "0xfef6673ab138dd1e57f6de97635168c324c54ac73f25751d94850cf8e881ff72", + "transactionHash": "0x94a66a7d2c71d76151fcb08e9da5f8ab7760721055385c5031e8b17a1dbb159d", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x6bC3C7Bcd2C6C2d8BFEAA3642c425cAE25F7fe17", + "contractAddress": "0x6164EA58a1f5359D2E54ea8eB9e5971B7C8dB0f1", "transactionIndex": 1, - "gasUsed": "671421", + "gasUsed": "675945", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xd4386125a5cd48a86fcbccb9c13ff2ce01f64d128269814cb54197ed0ffd2945", - "transactionHash": "0xfef6673ab138dd1e57f6de97635168c324c54ac73f25751d94850cf8e881ff72", + "blockHash": "0x3882e6d92cbfd503d491cd3ef477a320e1589c90b8fc3a4cb293941b8bbcf01c", + "transactionHash": "0x94a66a7d2c71d76151fcb08e9da5f8ab7760721055385c5031e8b17a1dbb159d", "logs": [], - "blockNumber": 26299235, - "cumulativeGasUsed": "671421", + "blockNumber": 28619506, + "cumulativeGasUsed": "675945", "status": 1, "byzantium": true }, "args": [ 1800, - "0xDBa4fb8C75816CF9DcDbC66eDA361AD198314577" + "0xE2067941210d684bA8171F7C9dF372931fC6c245" ], - "numDeployments": 13, - "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToL1.route, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x48eecf0d4e478ce7860635a206ceee6535b4f4765f9d25dddae463666e2bd7cb\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161015a01526105b4015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220dc892c5af7180a16c7f018e369629c54bb0e298b1b18d9b76c200daa89ba2be064736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220dc892c5af7180a16c7f018e369629c54bb0e298b1b18d9b76c200daa89ba2be064736f6c63430008120033", + "numDeployments": 1, + "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_gasLimit\":\"The gas limit for the AMB transaction on Gnosis.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _gasLimit The gas limit for the AMB transaction on Gnosis.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, uint256 _gasLimit, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToGnosis.route, (_epoch, snapshots[_epoch], _gasLimit, _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x48be8f225bcfe2373ec8328de18f9c291363bcd3c634b6445f49b788a7f3d59d\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n uint256 _gasLimit,\\n Claim memory _claim\\n ) external;\\n}\\n\",\"keccak256\":\"0x14b9a5be28d1954e86512cad4b6fcbc77646a30f7baefc84937fe4124db3cc37\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610c0b380380610c0b83398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b406100cb6000396000818161014701526105b6015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b406000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063d5e6a9df14610142578063d6565a2d14610181578063dc881a72146101a1578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106aa565b6101f8565b61010661022a565b005b6100b761011636600461074f565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101697f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd61018f3660046106aa565b60006020819052908152604090205481565b6101066101af366004610828565b6104bf565b6100dd6101c23660046106aa565b610662565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108fa565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108fa565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108e4565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661091c565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61091c565b015484610679565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610956565b60408051601f19818403018152908290526103e093929160200161098c565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61091c565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961091c565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac908490610a07565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108e4565b0483106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008381526020819052604080822054905161056c91869186908690602401610a21565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a906105e0907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ac5565b6020604051808303816000875af11580156105ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106239190610af1565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6001816040811061067257600080fd5b0154905081565b60008183101561069757826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106bc57600080fd5b5035919050565b80356001600160a01b03811681146106da57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610718576107186106df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610747576107476106df565b604052919050565b60008060006060848603121561076457600080fd5b61076d846106c3565b92506020848101356001600160e01b03198116811461078b57600080fd5b9250604085013567ffffffffffffffff808211156107a857600080fd5b818701915087601f8301126107bc57600080fd5b8135818111156107ce576107ce6106df565b6107e0601f8201601f1916850161071e565b915080825288848285010111156107f657600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106da57600080fd5b600080600083850361012081121561083f57600080fd5b843593506020850135925060e0603f198201121561085c57600080fd5b506108656106f5565b60408501358152610878606086016106c3565b602082015261088960808601610814565b604082015261089a60a08601610814565b60608201526108ab60c08601610814565b608082015260e0850135600381106108c257600080fd5b60a08201526108d461010086016106c3565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261091757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b8381101561094d578181015183820152602001610935565b50506000910152565b63ffffffff60e01b841681528260048201526000825161097d816024850160208701610932565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109cc81601c850160208701610932565b91909101601c01949350505050565b600081518084526109f3816020860160208601610932565b601f01601f19169290920160200192915050565b602081526000610a1a60208301846109db565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610aa157634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610ae9908301846109db565b949350505050565b600060208284031215610b0357600080fd5b505191905056fea264697066735822122089de2156d344eb6657c1af0a2b614ae7e5c3c3fdad600418756586cb57a4dded64736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063d5e6a9df14610142578063d6565a2d14610181578063dc881a72146101a1578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106aa565b6101f8565b61010661022a565b005b6100b761011636600461074f565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101697f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd61018f3660046106aa565b60006020819052908152604090205481565b6101066101af366004610828565b6104bf565b6100dd6101c23660046106aa565b610662565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108fa565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108fa565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108e4565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661091c565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61091c565b015484610679565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610956565b60408051601f19818403018152908290526103e093929160200161098c565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61091c565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961091c565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac908490610a07565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108e4565b0483106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008381526020819052604080822054905161056c91869186908690602401610a21565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a906105e0907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ac5565b6020604051808303816000875af11580156105ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106239190610af1565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6001816040811061067257600080fd5b0154905081565b60008183101561069757826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106bc57600080fd5b5035919050565b80356001600160a01b03811681146106da57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610718576107186106df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610747576107476106df565b604052919050565b60008060006060848603121561076457600080fd5b61076d846106c3565b92506020848101356001600160e01b03198116811461078b57600080fd5b9250604085013567ffffffffffffffff808211156107a857600080fd5b818701915087601f8301126107bc57600080fd5b8135818111156107ce576107ce6106df565b6107e0601f8201601f1916850161071e565b915080825288848285010111156107f657600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106da57600080fd5b600080600083850361012081121561083f57600080fd5b843593506020850135925060e0603f198201121561085c57600080fd5b506108656106f5565b60408501358152610878606086016106c3565b602082015261088960808601610814565b604082015261089a60a08601610814565b60608201526108ab60c08601610814565b608082015260e0850135600381106108c257600080fd5b60a08201526108d461010086016106c3565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261091757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b8381101561094d578181015183820152602001610935565b50506000910152565b63ffffffff60e01b841681528260048201526000825161097d816024850160208701610932565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109cc81601c850160208701610932565b91909101601c01949350505050565b600081518084526109f3816020860160208601610932565b601f01601f19169290920160200192915050565b602081526000610a1a60208301846109db565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610aa157634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610ae9908301846109db565b949350505050565b600060208284031215610b0357600080fd5b505191905056fea264697066735822122089de2156d344eb6657c1af0a2b614ae7e5c3c3fdad600418756586cb57a4dded64736f6c63430008120033", "devdoc": { "details": "Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.", "events": { "MessageSent(bytes)": { - "details": "Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.", + "details": "Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.", "params": { "_nodeData": "The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)." } @@ -362,11 +367,12 @@ "_0": "msgId The zero based index of the message in the inbox." } }, - "sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "sendSnapshot(uint256,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Sends the state root snapshot using Arbitrum's canonical bridge.", "params": { "_claim": "The claim associated with the epoch.", - "_epoch": "The epoch of the snapshot requested to send." + "_epoch": "The epoch of the snapshot requested to send.", + "_gasLimit": "The gas limit for the AMB transaction on Gnosis." } } }, @@ -385,7 +391,7 @@ "storageLayout": { "storage": [ { - "astId": 2130, + "astId": 2181, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "snapshots", "offset": 0, @@ -393,7 +399,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2134, + "astId": 2185, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "inbox", "offset": 0, @@ -401,7 +407,7 @@ "type": "t_array(t_bytes32)64_storage" }, { - "astId": 2136, + "astId": 2187, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "count", "offset": 0, diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json index 4d7c0d34..1c661531 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0xDF216C98773DA7998EE49AE8106BFe9724cf2944", + "address": "0x76fa89666bd55736832a4350b9B8dA6bB1878BeF", "abi": [ { "inputs": [ @@ -207,6 +207,11 @@ "name": "_epoch", "type": "uint256" }, + { + "internalType": "uint256", + "name": "_gasLimit", + "type": "uint256" + }, { "components": [ { @@ -275,36 +280,36 @@ "type": "function" } ], - "transactionHash": "0x583d25c9f5f60eee29114f04e0ba433878149fac9ab2f32c7397d795190b7e7c", + "transactionHash": "0x2d4a74a00ba9e83909ec24386753fe4c2c4e159185931aad1927ea40055f2506", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xDF216C98773DA7998EE49AE8106BFe9724cf2944", + "contractAddress": "0x76fa89666bd55736832a4350b9B8dA6bB1878BeF", "transactionIndex": 1, - "gasUsed": "671421", + "gasUsed": "675945", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xb6850da428c732294113e30987fa53e70350ba3478c0ffc07d19eaa5b22e7a3d", - "transactionHash": "0x583d25c9f5f60eee29114f04e0ba433878149fac9ab2f32c7397d795190b7e7c", + "blockHash": "0x61d9558e3a1725bcc37827f78a9dae08058dc8ada7ccff7370588d4c2868b84a", + "transactionHash": "0x2d4a74a00ba9e83909ec24386753fe4c2c4e159185931aad1927ea40055f2506", "logs": [], - "blockNumber": 26298947, - "cumulativeGasUsed": "671421", + "blockNumber": 28619676, + "cumulativeGasUsed": "675945", "status": 1, "byzantium": true }, "args": [ 3600, - "0xb61BEB66796Bbf59BBa3e5feE4Bab2304B889590" + "0x0E459f63db78E2d5E8DC16a717F30A3d24cb79c2" ], - "numDeployments": 6, - "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToL1.route, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x48eecf0d4e478ce7860635a206ceee6535b4f4765f9d25dddae463666e2bd7cb\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161015a01526105b4015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220dc892c5af7180a16c7f018e369629c54bb0e298b1b18d9b76c200daa89ba2be064736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063c705e41214610142578063d5e6a9df14610155578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b610106610150366004610825565b6104bf565b61017c7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316637b772dbb60e11b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea2646970667358221220dc892c5af7180a16c7f018e369629c54bb0e298b1b18d9b76c200daa89ba2be064736f6c63430008120033", + "numDeployments": 1, + "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_gasLimit\":\"The gas limit for the AMB transaction on Gnosis.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _gasLimit The gas limit for the AMB transaction on Gnosis.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, uint256 _gasLimit, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToGnosis.route, (_epoch, snapshots[_epoch], _gasLimit, _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x48be8f225bcfe2373ec8328de18f9c291363bcd3c634b6445f49b788a7f3d59d\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n uint256 _gasLimit,\\n Claim memory _claim\\n ) external;\\n}\\n\",\"keccak256\":\"0x14b9a5be28d1954e86512cad4b6fcbc77646a30f7baefc84937fe4124db3cc37\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610c0b380380610c0b83398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b406100cb6000396000818161014701526105b6015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b406000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063d5e6a9df14610142578063d6565a2d14610181578063dc881a72146101a1578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106aa565b6101f8565b61010661022a565b005b6100b761011636600461074f565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101697f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd61018f3660046106aa565b60006020819052908152604090205481565b6101066101af366004610828565b6104bf565b6100dd6101c23660046106aa565b610662565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108fa565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108fa565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108e4565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661091c565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61091c565b015484610679565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610956565b60408051601f19818403018152908290526103e093929160200161098c565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61091c565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961091c565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac908490610a07565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108e4565b0483106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008381526020819052604080822054905161056c91869186908690602401610a21565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a906105e0907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ac5565b6020604051808303816000875af11580156105ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106239190610af1565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6001816040811061067257600080fd5b0154905081565b60008183101561069757826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106bc57600080fd5b5035919050565b80356001600160a01b03811681146106da57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610718576107186106df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610747576107476106df565b604052919050565b60008060006060848603121561076457600080fd5b61076d846106c3565b92506020848101356001600160e01b03198116811461078b57600080fd5b9250604085013567ffffffffffffffff808211156107a857600080fd5b818701915087601f8301126107bc57600080fd5b8135818111156107ce576107ce6106df565b6107e0601f8201601f1916850161071e565b915080825288848285010111156107f657600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106da57600080fd5b600080600083850361012081121561083f57600080fd5b843593506020850135925060e0603f198201121561085c57600080fd5b506108656106f5565b60408501358152610878606086016106c3565b602082015261088960808601610814565b604082015261089a60a08601610814565b60608201526108ab60c08601610814565b608082015260e0850135600381106108c257600080fd5b60a08201526108d461010086016106c3565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261091757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b8381101561094d578181015183820152602001610935565b50506000910152565b63ffffffff60e01b841681528260048201526000825161097d816024850160208701610932565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109cc81601c850160208701610932565b91909101601c01949350505050565b600081518084526109f3816020860160208601610932565b601f01601f19169290920160200192915050565b602081526000610a1a60208301846109db565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610aa157634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610ae9908301846109db565b949350505050565b600060208284031215610b0357600080fd5b505191905056fea264697066735822122089de2156d344eb6657c1af0a2b614ae7e5c3c3fdad600418756586cb57a4dded64736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063d5e6a9df14610142578063d6565a2d14610181578063dc881a72146101a1578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106aa565b6101f8565b61010661022a565b005b6100b761011636600461074f565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101697f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd61018f3660046106aa565b60006020819052908152604090205481565b6101066101af366004610828565b6104bf565b6100dd6101c23660046106aa565b610662565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108fa565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108fa565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108e4565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661091c565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61091c565b015484610679565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610956565b60408051601f19818403018152908290526103e093929160200161098c565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61091c565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961091c565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac908490610a07565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108e4565b0483106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008381526020819052604080822054905161056c91869186908690602401610a21565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a906105e0907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ac5565b6020604051808303816000875af11580156105ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106239190610af1565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6001816040811061067257600080fd5b0154905081565b60008183101561069757826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106bc57600080fd5b5035919050565b80356001600160a01b03811681146106da57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610718576107186106df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610747576107476106df565b604052919050565b60008060006060848603121561076457600080fd5b61076d846106c3565b92506020848101356001600160e01b03198116811461078b57600080fd5b9250604085013567ffffffffffffffff808211156107a857600080fd5b818701915087601f8301126107bc57600080fd5b8135818111156107ce576107ce6106df565b6107e0601f8201601f1916850161071e565b915080825288848285010111156107f657600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106da57600080fd5b600080600083850361012081121561083f57600080fd5b843593506020850135925060e0603f198201121561085c57600080fd5b506108656106f5565b60408501358152610878606086016106c3565b602082015261088960808601610814565b604082015261089a60a08601610814565b60608201526108ab60c08601610814565b608082015260e0850135600381106108c257600080fd5b60a08201526108d461010086016106c3565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261091757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b8381101561094d578181015183820152602001610935565b50506000910152565b63ffffffff60e01b841681528260048201526000825161097d816024850160208701610932565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109cc81601c850160208701610932565b91909101601c01949350505050565b600081518084526109f3816020860160208601610932565b601f01601f19169290920160200192915050565b602081526000610a1a60208301846109db565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610aa157634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610ae9908301846109db565b949350505050565b600060208284031215610b0357600080fd5b505191905056fea264697066735822122089de2156d344eb6657c1af0a2b614ae7e5c3c3fdad600418756586cb57a4dded64736f6c63430008120033", "devdoc": { "details": "Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.", "events": { "MessageSent(bytes)": { - "details": "Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.", + "details": "Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.", "params": { "_nodeData": "The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)." } @@ -362,11 +367,12 @@ "_0": "msgId The zero based index of the message in the inbox." } }, - "sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "sendSnapshot(uint256,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Sends the state root snapshot using Arbitrum's canonical bridge.", "params": { "_claim": "The claim associated with the epoch.", - "_epoch": "The epoch of the snapshot requested to send." + "_epoch": "The epoch of the snapshot requested to send.", + "_gasLimit": "The gas limit for the AMB transaction on Gnosis." } } }, @@ -385,7 +391,7 @@ "storageLayout": { "storage": [ { - "astId": 2130, + "astId": 2181, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "snapshots", "offset": 0, @@ -393,7 +399,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2134, + "astId": 2185, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "inbox", "offset": 0, @@ -401,7 +407,7 @@ "type": "t_array(t_bytes32)64_storage" }, { - "astId": 2136, + "astId": 2187, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "count", "offset": 0, diff --git a/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbDevnet.json b/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbDevnet.json new file mode 100644 index 00000000..0180d71a --- /dev/null +++ b/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbDevnet.json @@ -0,0 +1,993 @@ +{ + "address": "0xcC196cC90bD30109E39400817e6ef63A1b744659", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_deposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_epochPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_challengePeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_timeoutEpochs", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_routerGnosisToArb", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_sequencerDelayLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_sequencerFutureLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxClaimDelayEpochs", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxClaimFutureEpochs", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_challenger", + "type": "address" + } + ], + "name": "Challenged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_claimer", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_stateRoot", + "type": "bytes32" + } + ], + "name": "Claimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "_msgId", + "type": "uint64" + } + ], + "name": "MessageRelayed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "Verified", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newsequencerDelayLimit", + "type": "uint256" + } + ], + "name": "sequencerDelayLimitUpdateReceived", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "challenge", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "challengePeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "challengers", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_devnetOperator", + "type": "address" + } + ], + "name": "changeDevnetOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_stateRoot", + "type": "bytes32" + } + ], + "name": "claim", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "claims", + "outputs": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "enum VeaOutboxGnosisToArb.Party", + "name": "honest", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_stateroot", + "type": "bytes32" + } + ], + "name": "devnetAdvanceState", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "devnetOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "epochAt", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochNow", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "latestVerifiedEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxClaimDelayEpochs", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxClaimFutureEpochs", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "relayed", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_stateRoot", + "type": "bytes32" + } + ], + "name": "resolveDisputedClaim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "routerGnosisToArb", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "_proof", + "type": "bytes32[]" + }, + { + "internalType": "uint64", + "name": "_msgId", + "type": "uint64" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_message", + "type": "bytes" + } + ], + "name": "sendMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerDelayLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerFutureLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "stateRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timeoutEpochs", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timestampDelayUpdated", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timestampFutureUpdated", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newSequencerDelayLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "updateSequencerDelayLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newSequencerFutureLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "updateSequencerFutureLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "verifySnapshot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "withdrawChallengeDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "withdrawChallengerEscapeHatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "withdrawClaimDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "withdrawClaimerEscapeHatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xdfcca2e8bbcf50649bb73e122025c56a32d908da34d230f8ccfc5804494fac78", + "receipt": { + "to": null, + "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", + "contractAddress": "0xcC196cC90bD30109E39400817e6ef63A1b744659", + "transactionIndex": 1, + "gasUsed": "1950878", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xaa7c3b57aab41238f8317649bf9a3eb13ea09a23f88d1d1754d030cd475e9d75", + "transactionHash": "0xdfcca2e8bbcf50649bb73e122025c56a32d908da34d230f8ccfc5804494fac78", + "logs": [], + "blockNumber": 28619544, + "cumulativeGasUsed": "1950878", + "status": 1, + "byzantium": true + }, + "args": [ + "100000000000000000", + 1800, + 0, + 10000000000000, + "0x21596998458c428d745d171FA0636B885ed18DaC", + 86400, + 3600, + 100, + 100 + ], + "numDeployments": 1, + "solcInputHash": "7c0af28198435174eb5c96e521603416", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerFutureLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxClaimDelayEpochs\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxClaimFutureEpochs\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"challengers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claims\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"enum VeaOutboxGnosisToArb.Party\",\"name\":\"honest\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxClaimDelayEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxClaimFutureEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampFutureUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Chiado to ArbitrumGoerli. Note: This contract is deployed on ArbitrumGoerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watcher check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"challenge(uint256)\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxClaimDelayEpochs\":\"The maximum number of epochs that can be claimed in the past.\",\"_maxClaimFutureEpochs\":\"The maximum number of epochs that can be claimed in the future.\",\"_routerGnosisToArb\":\"The address of the router on Ethereum that routes from Arbitrum to Ethereum.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_sequencerFutureLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded with header from VeaInbox.\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"updateSequencerFutureLimit(uint256,uint256)\":{\"details\":\"Set the sequencerFutureLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerFutureLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256)\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32)\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol\":\"VeaOutboxGnosisToArbDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/AddressAliasHelper.sol\":{\"content\":\"// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/libraries/AddressAliasHelper.sol\\n// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressAliasHelper {\\n uint160 internal 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}\",\"keccak256\":\"0xc57d335f0f5ac584ae7ed6e256be5d1172df6200c02004f31da0c041ce596512\",\"license\":\"BUSL-1.1\"},\"src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../gnosisToArbitrum/VeaOutboxGnosisToArb.sol\\\";\\n\\n/// @dev Vea Outbox From Chiado to ArbitrumGoerli.\\n/// Note: This contract is deployed on ArbitrumGoerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxGnosisToArbDevnet is VeaOutboxGnosisToArb {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n uint256 epochMaxClaimableCalculated = (block.timestamp + sequencerDelayLimit) / epochPeriod + 1;\\n uint256 epochMaxClaimableCap = block.timestamp / epochPeriod + maxClaimFutureEpochs;\\n uint256 epochMaxClaimable = epochMaxClaimableCalculated < epochMaxClaimableCap ? epochMaxClaimableCalculated : epochMaxClaimableCap;\\n\\n require(_epoch <= epochMaxClaimable, \\\"Epoch is invalid.\\\");\\n\\n uint256 epochMinClaimableCalculated = (block.timestamp - sequencerFutureLimit) / epochPeriod - 1;\\n uint256 epochMinClaimableCap = block.timestamp / epochPeriod - maxClaimDelayEpochs;\\n uint256 epochMinClaimable = epochMinClaimableCalculated > epochMinClaimableCap ? epochMinClaimableCap : epochMinClaimableCap;\\n\\n require(_epoch >= epochMinClaimable, \\\"Epoch is invalid.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) public override {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) public override OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n verifySnapshot(_epoch);\\n withdrawClaimDeposit(_epoch);\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past.\\n /// @param _maxClaimFutureEpochs The maximum number of epochs that can be claimed in the future.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit,\\n uint256 _maxClaimDelayEpochs,\\n uint256 _maxClaimFutureEpochs\\n )\\n VeaOutboxGnosisToArb(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _routerGnosisToArb,\\n _sequencerDelayLimit,\\n _sequencerFutureLimit,\\n _maxClaimDelayEpochs,\\n _maxClaimFutureEpochs\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xcb7f52200f930810757e3206d5b3c799c164df74af1181122a25d773d37b54a3\",\"license\":\"MIT\"},\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/AddressAliasHelper.sol\\\";\\n\\n/// @dev Vea Outbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaOutboxGnosisToArb is IVeaOutboxOnL2 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public immutable routerGnosisToArb; // The address of the router from Gnosis to Arbitrum on Ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // address to send burned eth\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable challengePeriod; // Claim challenge timewindow.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxClaimDelayEpochs; // The maximum number of epochs that can be claimed in the past.\\n uint256 public immutable maxClaimFutureEpochs; // The maximum number of epochs that can be claimed in the future.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n uint256 public timestampFutureUpdated; // The timestamp of the last sequencer future update.\\n\\n bytes32 public stateRoot;\\n uint256 public latestVerifiedEpoch;\\n\\n mapping(uint256 => Claim) public claims; // epoch => claim\\n mapping(uint256 => address) public challengers; // epoch => challenger\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n enum Party {\\n None,\\n Claimer,\\n Challenger\\n }\\n\\n struct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestamp;\\n Party honest;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watcher check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod <= latestVerifiedEpoch + timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod > latestVerifiedEpoch + timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past.\\n /// @param _maxClaimFutureEpochs The maximum number of epochs that can be claimed in the future.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit,\\n uint256 _maxClaimDelayEpochs,\\n uint256 _maxClaimFutureEpochs\\n ) {\\n deposit = _deposit;\\n epochPeriod = _epochPeriod;\\n challengePeriod = _challengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n routerGnosisToArb = _routerGnosisToArb;\\n sequencerDelayLimit = _sequencerDelayLimit;\\n sequencerFutureLimit = _sequencerFutureLimit;\\n maxClaimDelayEpochs = _maxClaimDelayEpochs;\\n maxClaimFutureEpochs = _maxClaimFutureEpochs;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerFutureLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerFutureLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampFutureUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerFutureLimit != _newSequencerFutureLimit) {\\n sequencerFutureLimit = _newSequencerFutureLimit;\\n timestampFutureUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Set the sequencerDelayLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n uint256 epochMaxClaimableCalculated = (block.timestamp + sequencerDelayLimit) / epochPeriod + 1;\\n uint256 epochMaxClaimableCap = block.timestamp / epochPeriod + maxClaimFutureEpochs;\\n uint256 epochMaxClaimable = epochMaxClaimableCalculated < epochMaxClaimableCap ? epochMaxClaimableCalculated : epochMaxClaimableCap;\\n\\n require(_epoch <= epochMaxClaimable, \\\"Epoch is invalid.\\\");\\n\\n uint256 epochMinClaimableCalculated = (block.timestamp - sequencerFutureLimit) / epochPeriod - 1;\\n uint256 epochMinClaimableCap = block.timestamp / epochPeriod - maxClaimDelayEpochs;\\n uint256 epochMinClaimable = epochMinClaimableCalculated > epochMinClaimableCap ? epochMinClaimableCap : epochMinClaimableCap;\\n\\n require(_epoch >= epochMinClaimable, \\\"Epoch is invalid.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n function challenge(uint256 _epoch) external payable virtual {\\n require(challengers[_epoch] == address(0), \\\"Claim already challenged.\\\");\\n require(claims[_epoch].claimer != address(0), \\\"No claim for epoch.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n\\n challengers[_epoch] = msg.sender;\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) external virtual OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n bytes32 claimedStateRoot = claims[_epoch].stateRoot;\\n\\n if (claimedStateRoot != bytes32(0)) {\\n if (claimedStateRoot == _stateRoot) {\\n claims[_epoch].honest = Party.Claimer;\\n } else if (challengers[_epoch] != address(0)) {\\n claims[_epoch].honest = Party.Challenger;\\n }\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded with header from VeaInbox.\\n function sendMessage(bytes32[] memory _proof, uint64 _msgId, address _to, bytes memory _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) external virtual {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n function withdrawChallengeDeposit(uint256 _epoch) external {\\n require(claims[_epoch].honest == Party.Challenger, \\\"Challenge unsuccessful.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete claims[_epoch];\\n delete challengers[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (claimer != address(0)) {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawChallengerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete challengers[_epoch];\\n\\n if (challenger != address(0)) {\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x3c4b79ebf5ca0d0051c088a8d4fb1c95928bbcc5162a729928cb46eb24f3b22e\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101a06040523480156200001257600080fd5b50604051620023ec380380620023ec8339810160408190526200003591620000f3565b60a08990526101008890526101208790526101408690526001600160a01b038516608052600084905560018390556101608290526101808190528888888888888888886200008560028a6200018d565b60c0819052620000978a6002620001b0565b620000a39190620001d0565b60e05261010051600190620000b990426200018d565b620000c59190620001d0565b6005555050600980546001600160a01b0319163317905550620001e69e505050505050505050505050505050565b60008060008060008060008060006101208a8c0312156200011357600080fd5b895160208b015160408c015160608d015160808e0151939c50919a50985096506001600160a01b03811681146200014957600080fd5b8095505060a08a0151935060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001ab57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001ca57620001ca62000177565b92915050565b81810381811115620001ca57620001ca62000177565b60805160a05160c05160e05161010051610120516101405161016051610180516120bc62000330600039600081816102f70152610a030152600081816101fa0152610afc01526000818161054c0152818161069f0152818161103501528181611365015261176b01526000818161065b01526114b4015260008181610580015281816106c401528181610820015281816109bb01528181610a2701528181610ab501528181610b200152818161105a015281816111b70152818161138a01526117900152600081816112e00152611c5c01526000818161129f0152611c1b0152600081816105b4015281816107e00152818161094901528181610d1701528181610d44015281816111780152818161132b015281816119f001528181611abc0152611ae90152600081816106140152818161085501528181611603015261180a01526120bc6000f3fe6080604052600436106101e35760003560e01c80638a619a7111610102578063b5b7a18411610095578063eb8dedfa11610064578063eb8dedfa14610602578063eedcf2a914610636578063f3f480d914610649578063f4cf751b1461067d57600080fd5b8063b5b7a1841461056e578063d0e30db0146105a2578063d6e01b39146105d6578063e813a755146105ec57600080fd5b80639588eca2116100d15780639588eca2146104aa578063a888c2cd146104c0578063ab82d9a014610527578063b044397e1461053a57600080fd5b80638a619a711461041d5780638ad3a8f71461043d5780638caeb7a81461045d57806390df63b71461047d57600080fd5b80633968ae001161017a578063649628491161014957806364962849146103795780636b45ebcb14610399578063710cc9a7146103e75780637ffc2a6e1461040757600080fd5b80633968ae00146102e55780634518f79f146103195780634a439cfe1461033957806350b81dbe1461035957600080fd5b806327ee6bdd116101b657806327ee6bdd1461027c5780632c1925191461029257806331d14457146102b257806331ddf743146102c557600080fd5b8063042c4aaf146101e85780630e56752e1461022f578063114095d314610245578063222ae78614610267575b600080fd5b3480156101f457600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561023b57600080fd5b5061021c60015481565b34801561025157600080fd5b50610265610260366004611c97565b61069d565b005b34801561027357600080fd5b5061021c610819565b34801561028857600080fd5b5061021c60055481565b34801561029e57600080fd5b506102656102ad366004611cb0565b61084a565b6102656102c0366004611cb0565b610930565b3480156102d157600080fd5b506102656102e0366004611dbd565b610d94565b3480156102f157600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561032557600080fd5b50610265610334366004611c97565b611033565b34801561034557600080fd5b5061021c610354366004611c97565b6111b0565b34801561036557600080fd5b50610265610374366004611c97565b6111e2565b34801561038557600080fd5b50610265610394366004611c97565b611363565b3480156103a557600080fd5b506103cf6103b4366004611c97565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610226565b3480156103f357600080fd5b50610265610402366004611cb0565b6115f8565b34801561041357600080fd5b5061021c60025481565b34801561042957600080fd5b50610265610438366004611ea9565b6116d6565b34801561044957600080fd5b506009546103cf906001600160a01b031681565b34801561046957600080fd5b50610265610478366004611cb0565b611769565b34801561048957600080fd5b5061021c610498366004611c97565b60086020526000908152604090205481565b3480156104b657600080fd5b5061021c60045481565b3480156104cc57600080fd5b506105176104db366004611c97565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516102269493929190611ee1565b610265610535366004611c97565b61192c565b34801561054657600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561057a57600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ae57600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e257600080fd5b5061021c60035481565b3480156105f857600080fd5b5061021c60005481565b34801561060e57600080fd5b506103cf7f000000000000000000000000000000000000000000000000000000000000000081565b610265610644366004611cb0565b611b32565b34801561065557600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561068957600080fd5b50610265610698366004611c97565b611b4e565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f000000000000000000000000000000000000000000000000000000000000000042816106f1576106f1611f30565b04116107365760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff16600281111561076457610764611ecb565b146107a35760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161072d565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b03168015610815576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006108457f000000000000000000000000000000000000000000000000000000000000000042611f5c565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461089d5760405162461bcd60e51b815260040161072d90611f7e565b80600254106108e55760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161072d565b816000541461081557600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6009546001600160a01b0316331461094757600080fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156109b75760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e0000000000604482015260640161072d565b60007f0000000000000000000000000000000000000000000000000000000000000000600054426109e89190611fb5565b6109f29190611f5c565b6109fd906001611fb5565b905060007f0000000000000000000000000000000000000000000000000000000000000000610a4c7f000000000000000000000000000000000000000000000000000000000000000042611f5c565b610a569190611fb5565b90506000818310610a675781610a69565b825b905080851115610aaf5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b604482015260640161072d565b600060017f000000000000000000000000000000000000000000000000000000000000000060015442610ae29190611fc8565b610aec9190611f5c565b610af69190611fc8565b905060007f0000000000000000000000000000000000000000000000000000000000000000610b457f000000000000000000000000000000000000000000000000000000000000000042611f5c565b610b4f9190611fc8565b90506000818311610b605781610b62565b815b905080881015610ba85760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b604482015260640161072d565b86610be65760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161072d565b6000888152600660205260409020600101546001600160a01b031615610c445760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161072d565b6040805160808101825288815233602080830191825263ffffffff4281168486019081526000606086018181528f82526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610cd957610cd9611ecb565b0217905550506040518881523391507f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a9060200160405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115610d8a576000610d697f000000000000000000000000000000000000000000000000000000000000000034611fc8565b604051909150339082156108fc029083906000818181858888f15050505050505b5050505050505050565b6040845110610dd75760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161072d565b6000838383604051602001610dee9392919061200b565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610e70576000868281518110610e3157610e3161204d565b6020026020010151905082811115610e5757826000528060205260406000209250610e67565b8060005282602052604060002092505b50600101610e14565b508060045414610eb35760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161072d565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610f2a5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161072d565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610f58908890612063565b6000604051808303816000865af19150503d8060008114610f95576040519150601f19603f3d011682016040523d82523d6000602084013e610f9a565b606091505b5050905080610feb5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161072d565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161108757611087611f30565b04116110c75760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161072d565b60008082815260066020526040902060010154600160c01b900460ff1660028111156110f5576110f5611ecb565b146111345760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161072d565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b03168015610815576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006111dc7f000000000000000000000000000000000000000000000000000000000000000083611f5c565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff16600281111561121157611211611ecb565b146112545760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b604482015260640161072d565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b0391821691161561131b576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f000000000000000000000000000000000000000000000000000000000000000042816113b7576113b7611f30565b0411156113f95760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161072d565b600081815260066020526040902060010154600160a01b900463ffffffff16806114565760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161072d565b6000828152600760205260409020546001600160a01b0316156114b25760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161072d565b7f000000000000000000000000000000000000000000000000000000000000000060015460005460026114e5919061206f565b6114ef9190611fb5565b6114f99190611fb5565b6115038242611fc8565b10156115775760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e000000000000000000606482015260840161072d565b6005548211156115d35760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f7906115ca9084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461164b5760405162461bcd60e51b815260040161072d90611f7e565b80600354106116935760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161072d565b816001541461081557600182905560038190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa70790602001610924565b6009546001600160a01b031633146116ed57600080fd5b6009546001600160a01b031633146117475760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f720000000000000000604482015260640161072d565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f000000000000000000000000000000000000000000000000000000000000000042816117bd576117bd611f30565b0411156117ff5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161072d565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146118525760405162461bcd60e51b815260040161072d90611f7e565b6005548211801561186257508015155b156118a557600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b6000828152600660205260409020548015611927578181036118e75750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b031615611927576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b0316156119915760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161072d565b6000818152600660205260409020600101546001600160a01b03166119ee5760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b604482015260640161072d565b7f0000000000000000000000000000000000000000000000000000000000000000341015611a5e5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e00604482015260640161072d565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d790611ab29084815260200190565b60405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115611b2f576000611b0e7f000000000000000000000000000000000000000000000000000000000000000034611fc8565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b611b3c8282610930565b611b4582611363565b610815826111e2565b6002600082815260066020526040902060010154600160c01b900460ff166002811115611b7d57611b7d611ecb565b14611bca5760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e000000000000000000604482015260640161072d565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600060208284031215611ca957600080fd5b5035919050565b60008060408385031215611cc357600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611d1157611d11611cd2565b604052919050565b803567ffffffffffffffff81168114611d3157600080fd5b919050565b80356001600160a01b0381168114611d3157600080fd5b600082601f830112611d5e57600080fd5b813567ffffffffffffffff811115611d7857611d78611cd2565b611d8b601f8201601f1916602001611ce8565b818152846020838601011115611da057600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611dd357600080fd5b843567ffffffffffffffff80821115611deb57600080fd5b818701915087601f830112611dff57600080fd5b8135602082821115611e1357611e13611cd2565b8160051b611e22828201611ce8565b928352848101820192828101908c851115611e3c57600080fd5b958301955b84871015611e5a57863582529583019590830190611e41565b9950611e6a915050898201611d19565b96505050611e7a60408801611d36565b93506060870135915080821115611e9057600080fd5b50611e9d87828801611d4d565b91505092959194509250565b600060208284031215611ebb57600080fd5b611ec482611d36565b9392505050565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611f2157634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611f7957634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b808201808211156111dc576111dc611f46565b818103818111156111dc576111dc611f46565b6000815160005b81811015611ffc5760208185018101518683015201611fe2565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000612044601c830184611fdb565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611ec48284611fdb565b80820281158282048414176111dc576111dc611f4656fea2646970667358221220329cfa65bccde5a3149b4741ed975d047018671c90d85a618a650a693af231ac64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101e35760003560e01c80638a619a7111610102578063b5b7a18411610095578063eb8dedfa11610064578063eb8dedfa14610602578063eedcf2a914610636578063f3f480d914610649578063f4cf751b1461067d57600080fd5b8063b5b7a1841461056e578063d0e30db0146105a2578063d6e01b39146105d6578063e813a755146105ec57600080fd5b80639588eca2116100d15780639588eca2146104aa578063a888c2cd146104c0578063ab82d9a014610527578063b044397e1461053a57600080fd5b80638a619a711461041d5780638ad3a8f71461043d5780638caeb7a81461045d57806390df63b71461047d57600080fd5b80633968ae001161017a578063649628491161014957806364962849146103795780636b45ebcb14610399578063710cc9a7146103e75780637ffc2a6e1461040757600080fd5b80633968ae00146102e55780634518f79f146103195780634a439cfe1461033957806350b81dbe1461035957600080fd5b806327ee6bdd116101b657806327ee6bdd1461027c5780632c1925191461029257806331d14457146102b257806331ddf743146102c557600080fd5b8063042c4aaf146101e85780630e56752e1461022f578063114095d314610245578063222ae78614610267575b600080fd5b3480156101f457600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561023b57600080fd5b5061021c60015481565b34801561025157600080fd5b50610265610260366004611c97565b61069d565b005b34801561027357600080fd5b5061021c610819565b34801561028857600080fd5b5061021c60055481565b34801561029e57600080fd5b506102656102ad366004611cb0565b61084a565b6102656102c0366004611cb0565b610930565b3480156102d157600080fd5b506102656102e0366004611dbd565b610d94565b3480156102f157600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561032557600080fd5b50610265610334366004611c97565b611033565b34801561034557600080fd5b5061021c610354366004611c97565b6111b0565b34801561036557600080fd5b50610265610374366004611c97565b6111e2565b34801561038557600080fd5b50610265610394366004611c97565b611363565b3480156103a557600080fd5b506103cf6103b4366004611c97565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610226565b3480156103f357600080fd5b50610265610402366004611cb0565b6115f8565b34801561041357600080fd5b5061021c60025481565b34801561042957600080fd5b50610265610438366004611ea9565b6116d6565b34801561044957600080fd5b506009546103cf906001600160a01b031681565b34801561046957600080fd5b50610265610478366004611cb0565b611769565b34801561048957600080fd5b5061021c610498366004611c97565b60086020526000908152604090205481565b3480156104b657600080fd5b5061021c60045481565b3480156104cc57600080fd5b506105176104db366004611c97565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516102269493929190611ee1565b610265610535366004611c97565b61192c565b34801561054657600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561057a57600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ae57600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e257600080fd5b5061021c60035481565b3480156105f857600080fd5b5061021c60005481565b34801561060e57600080fd5b506103cf7f000000000000000000000000000000000000000000000000000000000000000081565b610265610644366004611cb0565b611b32565b34801561065557600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561068957600080fd5b50610265610698366004611c97565b611b4e565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f000000000000000000000000000000000000000000000000000000000000000042816106f1576106f1611f30565b04116107365760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff16600281111561076457610764611ecb565b146107a35760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161072d565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b03168015610815576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006108457f000000000000000000000000000000000000000000000000000000000000000042611f5c565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461089d5760405162461bcd60e51b815260040161072d90611f7e565b80600254106108e55760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161072d565b816000541461081557600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6009546001600160a01b0316331461094757600080fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156109b75760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e0000000000604482015260640161072d565b60007f0000000000000000000000000000000000000000000000000000000000000000600054426109e89190611fb5565b6109f29190611f5c565b6109fd906001611fb5565b905060007f0000000000000000000000000000000000000000000000000000000000000000610a4c7f000000000000000000000000000000000000000000000000000000000000000042611f5c565b610a569190611fb5565b90506000818310610a675781610a69565b825b905080851115610aaf5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b604482015260640161072d565b600060017f000000000000000000000000000000000000000000000000000000000000000060015442610ae29190611fc8565b610aec9190611f5c565b610af69190611fc8565b905060007f0000000000000000000000000000000000000000000000000000000000000000610b457f000000000000000000000000000000000000000000000000000000000000000042611f5c565b610b4f9190611fc8565b90506000818311610b605781610b62565b815b905080881015610ba85760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b604482015260640161072d565b86610be65760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161072d565b6000888152600660205260409020600101546001600160a01b031615610c445760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161072d565b6040805160808101825288815233602080830191825263ffffffff4281168486019081526000606086018181528f82526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610cd957610cd9611ecb565b0217905550506040518881523391507f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a9060200160405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115610d8a576000610d697f000000000000000000000000000000000000000000000000000000000000000034611fc8565b604051909150339082156108fc029083906000818181858888f15050505050505b5050505050505050565b6040845110610dd75760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161072d565b6000838383604051602001610dee9392919061200b565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610e70576000868281518110610e3157610e3161204d565b6020026020010151905082811115610e5757826000528060205260406000209250610e67565b8060005282602052604060002092505b50600101610e14565b508060045414610eb35760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161072d565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610f2a5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161072d565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610f58908890612063565b6000604051808303816000865af19150503d8060008114610f95576040519150601f19603f3d011682016040523d82523d6000602084013e610f9a565b606091505b5050905080610feb5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161072d565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161108757611087611f30565b04116110c75760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161072d565b60008082815260066020526040902060010154600160c01b900460ff1660028111156110f5576110f5611ecb565b146111345760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161072d565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b03168015610815576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006111dc7f000000000000000000000000000000000000000000000000000000000000000083611f5c565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff16600281111561121157611211611ecb565b146112545760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b604482015260640161072d565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b0391821691161561131b576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f000000000000000000000000000000000000000000000000000000000000000042816113b7576113b7611f30565b0411156113f95760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161072d565b600081815260066020526040902060010154600160a01b900463ffffffff16806114565760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161072d565b6000828152600760205260409020546001600160a01b0316156114b25760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161072d565b7f000000000000000000000000000000000000000000000000000000000000000060015460005460026114e5919061206f565b6114ef9190611fb5565b6114f99190611fb5565b6115038242611fc8565b10156115775760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e000000000000000000606482015260840161072d565b6005548211156115d35760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f7906115ca9084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461164b5760405162461bcd60e51b815260040161072d90611f7e565b80600354106116935760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161072d565b816001541461081557600182905560038190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa70790602001610924565b6009546001600160a01b031633146116ed57600080fd5b6009546001600160a01b031633146117475760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f720000000000000000604482015260640161072d565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f000000000000000000000000000000000000000000000000000000000000000042816117bd576117bd611f30565b0411156117ff5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161072d565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146118525760405162461bcd60e51b815260040161072d90611f7e565b6005548211801561186257508015155b156118a557600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b6000828152600660205260409020548015611927578181036118e75750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b031615611927576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b0316156119915760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161072d565b6000818152600660205260409020600101546001600160a01b03166119ee5760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b604482015260640161072d565b7f0000000000000000000000000000000000000000000000000000000000000000341015611a5e5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e00604482015260640161072d565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d790611ab29084815260200190565b60405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115611b2f576000611b0e7f000000000000000000000000000000000000000000000000000000000000000034611fc8565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b611b3c8282610930565b611b4582611363565b610815826111e2565b6002600082815260066020526040902060010154600160c01b900460ff166002811115611b7d57611b7d611ecb565b14611bca5760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e000000000000000000604482015260640161072d565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600060208284031215611ca957600080fd5b5035919050565b60008060408385031215611cc357600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611d1157611d11611cd2565b604052919050565b803567ffffffffffffffff81168114611d3157600080fd5b919050565b80356001600160a01b0381168114611d3157600080fd5b600082601f830112611d5e57600080fd5b813567ffffffffffffffff811115611d7857611d78611cd2565b611d8b601f8201601f1916602001611ce8565b818152846020838601011115611da057600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611dd357600080fd5b843567ffffffffffffffff80821115611deb57600080fd5b818701915087601f830112611dff57600080fd5b8135602082821115611e1357611e13611cd2565b8160051b611e22828201611ce8565b928352848101820192828101908c851115611e3c57600080fd5b958301955b84871015611e5a57863582529583019590830190611e41565b9950611e6a915050898201611d19565b96505050611e7a60408801611d36565b93506060870135915080821115611e9057600080fd5b50611e9d87828801611d4d565b91505092959194509250565b600060208284031215611ebb57600080fd5b611ec482611d36565b9392505050565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611f2157634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611f7957634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b808201808211156111dc576111dc611f46565b818103818111156111dc576111dc611f46565b6000815160005b81811015611ffc5760208185018101518683015201611fe2565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000612044601c830184611fdb565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611ec48284611fdb565b80820281158282048414176111dc576111dc611f4656fea2646970667358221220329cfa65bccde5a3149b4741ed975d047018671c90d85a618a650a693af231ac64736f6c63430008120033", + "devdoc": { + "details": "Vea Outbox From Chiado to ArbitrumGoerli. Note: This contract is deployed on ArbitrumGoerli. Note: This contract is permissioned for developer testing (devnet).", + "events": { + "Challenged(uint256,address)": { + "details": "This event indicates that `sendSnapshot(epoch)` should be called in the inbox.", + "params": { + "_challenger": "The address of the challenger.", + "_epoch": "The epoch associated with the challenged claim." + } + }, + "Claimed(address,bytes32)": { + "details": "Watcher check this event to challenge fraud.", + "params": { + "_claimer": "The address of the claimer.", + "_stateRoot": "The state root of the claim." + } + }, + "MessageRelayed(uint64)": { + "details": "This event indicates that a message has been relayed.", + "params": { + "_msgId": "The msgId of the message that was relayed." + } + }, + "Verified(uint256)": { + "details": "This events indicates that verification has succeeded. The messages are ready to be relayed.", + "params": { + "_epoch": "The epoch that was verified." + } + }, + "sequencerDelayLimitUpdateReceived(uint256)": { + "details": "This event indicates the sequencer limit updated.", + "params": { + "_newsequencerDelayLimit": "The new maxL2StateSyncDelay." + } + } + }, + "kind": "dev", + "methods": { + "challenge(uint256)": { + "details": "Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.", + "params": { + "_epoch": "The epoch of the claim to challenge." + } + }, + "changeDevnetOperator(address)": { + "details": "Changes the devnet operator.", + "params": { + "_devnetOperator": "The new testnet operator." + } + }, + "claim(uint256,bytes32)": { + "details": "Submit a claim about the _stateRoot at _epoch and submit a deposit.", + "params": { + "_epoch": "The epoch for which the claim is made.", + "_stateRoot": "The state root to claim." + } + }, + "constructor": { + "details": "Constructor. Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value", + "params": { + "_challengePeriod": "The duration of the period allowing to challenge a claim.", + "_deposit": "The deposit amount to submit a claim in wei.", + "_epochPeriod": "The duration of each epoch.", + "_maxClaimDelayEpochs": "The maximum number of epochs that can be claimed in the past.", + "_maxClaimFutureEpochs": "The maximum number of epochs that can be claimed in the future.", + "_routerGnosisToArb": "The address of the router on Ethereum that routes from Arbitrum to Ethereum.", + "_sequencerDelayLimit": "The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.", + "_sequencerFutureLimit": "The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.", + "_timeoutEpochs": "The epochs before the bridge is considered shutdown." + } + }, + "devnetAdvanceState(uint256,bytes32)": { + "details": "Testnet operator utility function to claim, validate and withdraw.", + "params": { + "_epoch": "The epoch for which the claim is made.", + "_stateroot": "The state root to claim." + } + }, + "epochAt(uint256)": { + "details": "Get the current epoch from the outbox's point of view using the Ethereum L1 clock.", + "returns": { + "epoch": "The hash of the claim." + } + }, + "epochNow()": { + "details": "Get the current epoch from the outbox's point of view using the Ethereum L1 clock.", + "returns": { + "epoch": "The hash of the claim." + } + }, + "resolveDisputedClaim(uint256,bytes32)": { + "details": "Resolves any challenge of the optimistic claim for '_epoch'.", + "params": { + "_epoch": "The epoch to verify.", + "_stateRoot": "The true state root for the epoch." + } + }, + "sendMessage(bytes32[],uint64,address,bytes)": { + "details": "Verifies and relays the message. UNTRUSTED.", + "params": { + "_message": "The message encoded with header from VeaInbox.", + "_msgId": "The zero based index of the message in the inbox.", + "_proof": "The merkle proof to prove the message.", + "_to": "The address of the contract on Gnosis to call." + } + }, + "updateSequencerDelayLimit(uint256,uint256)": { + "details": "Set the sequencerDelayLimit by reading from the Arbitrum Bridge", + "params": { + "_newSequencerDelayLimit": "The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.", + "_timestamp": "The timestamp of the message." + } + }, + "updateSequencerFutureLimit(uint256,uint256)": { + "details": "Set the sequencerFutureLimit by reading from the Arbitrum Bridge", + "params": { + "_newSequencerFutureLimit": "The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.", + "_timestamp": "The timestamp of the message." + } + }, + "verifySnapshot(uint256)": { + "details": "Resolves the optimistic claim for '_epoch'.", + "params": { + "_epoch": "The epoch of the optimistic claim." + } + }, + "withdrawChallengeDeposit(uint256)": { + "details": "Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.", + "params": { + "_epoch": "The epoch associated with the challenge deposit to withraw." + } + }, + "withdrawChallengerEscapeHatch(uint256)": { + "details": "When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.", + "params": { + "_epoch": "The epoch associated with the claim deposit to withraw." + } + }, + "withdrawClaimDeposit(uint256)": { + "details": "Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.", + "params": { + "_epoch": "The epoch associated with the claim deposit to withraw." + } + }, + "withdrawClaimerEscapeHatch(uint256)": { + "details": "When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.", + "params": { + "_epoch": "The epoch associated with the claim deposit to withraw." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "resolveDisputedClaim(uint256,bytes32)": { + "notice": "Note: Access restricted to AMB." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 499, + "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", + "label": "sequencerDelayLimit", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 501, + "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", + "label": "sequencerFutureLimit", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 503, + "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", + "label": "timestampDelayUpdated", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 505, + "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", + "label": "timestampFutureUpdated", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 507, + "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", + "label": "stateRoot", + "offset": 0, + "slot": "4", + "type": "t_bytes32" + }, + { + "astId": 509, + "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", + "label": "latestVerifiedEpoch", + "offset": 0, + "slot": "5", + "type": "t_uint256" + }, + { + "astId": 514, + "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", + "label": "claims", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_uint256,t_struct(Claim)536_storage)" + }, + { + "astId": 518, + "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", + "label": "challengers", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 522, + "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", + "label": "relayed", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_uint256,t_bytes32)" + }, + { + "astId": 60, + "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", + "label": "devnetOperator", + "offset": 0, + "slot": "9", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Party)526": { + "encoding": "inplace", + "label": "enum VeaOutboxGnosisToArb.Party", + "numberOfBytes": "1" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint256,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_mapping(t_uint256,t_struct(Claim)536_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct VeaOutboxGnosisToArb.Claim)", + "numberOfBytes": "32", + "value": "t_struct(Claim)536_storage" + }, + "t_struct(Claim)536_storage": { + "encoding": "inplace", + "label": "struct VeaOutboxGnosisToArb.Claim", + "members": [ + { + "astId": 528, + "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", + "label": "stateRoot", + "offset": 0, + "slot": "0", + "type": "t_bytes32" + }, + { + "astId": 530, + "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", + "label": "claimer", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 532, + "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", + "label": "timestamp", + "offset": 20, + "slot": "1", + "type": "t_uint32" + }, + { + "astId": 535, + "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", + "label": "honest", + "offset": 24, + "slot": "1", + "type": "t_enum(Party)526" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} diff --git a/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbTestnet.json b/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbTestnet.json new file mode 100644 index 00000000..6267bfa2 --- /dev/null +++ b/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbTestnet.json @@ -0,0 +1,928 @@ +{ + "address": "0x663697f5748c5f4d46a15114Dde5514356E794F4", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_deposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_epochPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_challengePeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_timeoutEpochs", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_routerGnosisToArb", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_sequencerDelayLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_sequencerFutureLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxClaimDelayEpochs", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxClaimFutureEpochs", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_challenger", + "type": "address" + } + ], + "name": "Challenged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_claimer", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_stateRoot", + "type": "bytes32" + } + ], + "name": "Claimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "_msgId", + "type": "uint64" + } + ], + "name": "MessageRelayed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "Verified", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newsequencerDelayLimit", + "type": "uint256" + } + ], + "name": "sequencerDelayLimitUpdateReceived", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "challenge", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "challengePeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "challengers", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_stateRoot", + "type": "bytes32" + } + ], + "name": "claim", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "claims", + "outputs": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "enum VeaOutboxGnosisToArb.Party", + "name": "honest", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "epochAt", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochNow", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "latestVerifiedEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxClaimDelayEpochs", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxClaimFutureEpochs", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "relayed", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_stateRoot", + "type": "bytes32" + } + ], + "name": "resolveDisputedClaim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "routerGnosisToArb", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "_proof", + "type": "bytes32[]" + }, + { + "internalType": "uint64", + "name": "_msgId", + "type": "uint64" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_message", + "type": "bytes" + } + ], + "name": "sendMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerDelayLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerFutureLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "stateRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timeoutEpochs", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timestampDelayUpdated", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timestampFutureUpdated", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newSequencerDelayLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "updateSequencerDelayLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newSequencerFutureLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "updateSequencerFutureLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "verifySnapshot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "withdrawChallengeDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "withdrawChallengerEscapeHatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "withdrawClaimDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "withdrawClaimerEscapeHatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x26b88fcb0986901e8ff34f4fa82837e7fdb314669055c5955a620ad3f41ee919", + "receipt": { + "to": null, + "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", + "contractAddress": "0x663697f5748c5f4d46a15114Dde5514356E794F4", + "transactionIndex": 1, + "gasUsed": "1854456", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x42016c60694e66650e8b8aaece653b7f43cc046f7075a88af35c401c18799453", + "transactionHash": "0x26b88fcb0986901e8ff34f4fa82837e7fdb314669055c5955a620ad3f41ee919", + "logs": [], + "blockNumber": 28619713, + "cumulativeGasUsed": "1854456", + "status": 1, + "byzantium": true + }, + "args": [ + "4000000000000000000", + 7200, + 86400, + 168, + "0xC21c20a719fAc23c54c336FA0E16a0CFdC4baA00", + 86400, + 3600, + 3, + 1 + ], + "numDeployments": 1, + "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerFutureLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxClaimDelayEpochs\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxClaimFutureEpochs\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"challengers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claims\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"enum VeaOutboxGnosisToArb.Party\",\"name\":\"honest\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxClaimDelayEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxClaimFutureEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampFutureUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Gnosis to Arbitrum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watcher check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"challenge(uint256)\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxClaimDelayEpochs\":\"The maximum number of epochs that can be claimed in the past.\",\"_maxClaimFutureEpochs\":\"The maximum number of epochs that can be claimed in the future.\",\"_routerGnosisToArb\":\"The address of the router on Ethereum that routes from Arbitrum to Ethereum.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_sequencerFutureLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded with header from VeaInbox.\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"updateSequencerFutureLimit(uint256,uint256)\":{\"details\":\"Set the sequencerFutureLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerFutureLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256)\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32)\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":\"VeaOutboxGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/AddressAliasHelper.sol\":{\"content\":\"// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/libraries/AddressAliasHelper.sol\\n// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressAliasHelper {\\n uint160 internal 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}\",\"keccak256\":\"0xc57d335f0f5ac584ae7ed6e256be5d1172df6200c02004f31da0c041ce596512\",\"license\":\"BUSL-1.1\"},\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/AddressAliasHelper.sol\\\";\\n\\n/// @dev Vea Outbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaOutboxGnosisToArb is IVeaOutboxOnL2 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public immutable routerGnosisToArb; // The address of the router from Gnosis to Arbitrum on Ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // address to send burned eth\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable challengePeriod; // Claim challenge timewindow.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxClaimDelayEpochs; // The maximum number of epochs that can be claimed in the past.\\n uint256 public immutable maxClaimFutureEpochs; // The maximum number of epochs that can be claimed in the future.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n uint256 public timestampFutureUpdated; // The timestamp of the last sequencer future update.\\n\\n bytes32 public stateRoot;\\n uint256 public latestVerifiedEpoch;\\n\\n mapping(uint256 => Claim) public claims; // epoch => claim\\n mapping(uint256 => address) public challengers; // epoch => challenger\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n enum Party {\\n None,\\n Claimer,\\n Challenger\\n }\\n\\n struct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestamp;\\n Party honest;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watcher check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod <= latestVerifiedEpoch + timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod > latestVerifiedEpoch + timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past.\\n /// @param _maxClaimFutureEpochs The maximum number of epochs that can be claimed in the future.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit,\\n uint256 _maxClaimDelayEpochs,\\n uint256 _maxClaimFutureEpochs\\n ) {\\n deposit = _deposit;\\n epochPeriod = _epochPeriod;\\n challengePeriod = _challengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n routerGnosisToArb = _routerGnosisToArb;\\n sequencerDelayLimit = _sequencerDelayLimit;\\n sequencerFutureLimit = _sequencerFutureLimit;\\n maxClaimDelayEpochs = _maxClaimDelayEpochs;\\n maxClaimFutureEpochs = _maxClaimFutureEpochs;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerFutureLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerFutureLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampFutureUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerFutureLimit != _newSequencerFutureLimit) {\\n sequencerFutureLimit = _newSequencerFutureLimit;\\n timestampFutureUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Set the sequencerDelayLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n uint256 epochMaxClaimableCalculated = (block.timestamp + sequencerDelayLimit) / epochPeriod + 1;\\n uint256 epochMaxClaimableCap = block.timestamp / epochPeriod + maxClaimFutureEpochs;\\n uint256 epochMaxClaimable = epochMaxClaimableCalculated < epochMaxClaimableCap ? epochMaxClaimableCalculated : epochMaxClaimableCap;\\n\\n require(_epoch <= epochMaxClaimable, \\\"Epoch is invalid.\\\");\\n\\n uint256 epochMinClaimableCalculated = (block.timestamp - sequencerFutureLimit) / epochPeriod - 1;\\n uint256 epochMinClaimableCap = block.timestamp / epochPeriod - maxClaimDelayEpochs;\\n uint256 epochMinClaimable = epochMinClaimableCalculated > epochMinClaimableCap ? epochMinClaimableCap : epochMinClaimableCap;\\n\\n require(_epoch >= epochMinClaimable, \\\"Epoch is invalid.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n function challenge(uint256 _epoch) external payable virtual {\\n require(challengers[_epoch] == address(0), \\\"Claim already challenged.\\\");\\n require(claims[_epoch].claimer != address(0), \\\"No claim for epoch.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n\\n challengers[_epoch] = msg.sender;\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) external virtual OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n bytes32 claimedStateRoot = claims[_epoch].stateRoot;\\n\\n if (claimedStateRoot != bytes32(0)) {\\n if (claimedStateRoot == _stateRoot) {\\n claims[_epoch].honest = Party.Claimer;\\n } else if (challengers[_epoch] != address(0)) {\\n claims[_epoch].honest = Party.Challenger;\\n }\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded with header from VeaInbox.\\n function sendMessage(bytes32[] memory _proof, uint64 _msgId, address _to, bytes memory _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) external virtual {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n function withdrawChallengeDeposit(uint256 _epoch) external {\\n require(claims[_epoch].honest == Party.Challenger, \\\"Challenge unsuccessful.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete claims[_epoch];\\n delete challengers[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (claimer != address(0)) {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawChallengerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete challengers[_epoch];\\n\\n if (challenger != address(0)) {\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x3c4b79ebf5ca0d0051c088a8d4fb1c95928bbcc5162a729928cb46eb24f3b22e\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002273380380620022738339810160408190526200003591620000cf565b60a08990526101008890526101208790526101408690526001600160a01b038516608052600084905560018390556101608290526101808190526200007c60028a62000169565b60c08190526200008e8a60026200018c565b6200009a9190620001ac565b60e05261010051600190620000b0904262000169565b620000bc9190620001ac565b60055550620001c2975050505050505050565b60008060008060008060008060006101208a8c031215620000ef57600080fd5b895160208b015160408c015160608d015160808e0151939c50919a50985096506001600160a01b03811681146200012557600080fd5b8095505060a08a0151935060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b6000826200018757634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001a657620001a662000153565b92915050565b81810381811115620001a657620001a662000153565b60805160a05160c05160e0516101005161012051610140516101605161018051611f676200030c600039600081816102d601526109780152600081816101d90152610a710152600081816104eb0152818161062b01528181610faa015281816112da015261164d0152600081816105e7015261142901526000818161051f01528181610650015281816107ac015281816109300152818161099c01528181610a2a01528181610a9501528181610fcf0152818161112c015281816112ff01526116720152600081816112550152611b220152600081816112140152611ae10152600081816105530152818161076c015281816108be01528181610c8c01528181610cb9015281816110ed015281816112a0015281816118d20152818161199e01526119cb0152600081816105b3015281816107e10152818161157801526116ec0152611f676000f3fe6080604052600436106101c25760003560e01c8063710cc9a7116100f7578063b044397e11610095578063e813a75511610064578063e813a7551461058b578063eb8dedfa146105a1578063f3f480d9146105d5578063f4cf751b1461060957600080fd5b8063b044397e146104d9578063b5b7a1841461050d578063d0e30db014610541578063d6e01b391461057557600080fd5b806390df63b7116100d157806390df63b71461041c5780639588eca214610449578063a888c2cd1461045f578063ab82d9a0146104c657600080fd5b8063710cc9a7146103c65780637ffc2a6e146103e65780638caeb7a8146103fc57600080fd5b806331ddf743116101645780634a439cfe1161013e5780634a439cfe1461031857806350b81dbe1461033857806364962849146103585780636b45ebcb1461037857600080fd5b806331ddf743146102a45780633968ae00146102c45780634518f79f146102f857600080fd5b8063222ae786116101a0578063222ae7861461024657806327ee6bdd1461025b5780632c1925191461027157806331d144571461029157600080fd5b8063042c4aaf146101c75780630e56752e1461020e578063114095d314610224575b600080fd5b3480156101d357600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561021a57600080fd5b506101fb60015481565b34801561023057600080fd5b5061024461023f366004611b5d565b610629565b005b34801561025257600080fd5b506101fb6107a5565b34801561026757600080fd5b506101fb60055481565b34801561027d57600080fd5b5061024461028c366004611b76565b6107d6565b61024461029f366004611b76565b6108bc565b3480156102b057600080fd5b506102446102bf366004611c83565b610d09565b3480156102d057600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561030457600080fd5b50610244610313366004611b5d565b610fa8565b34801561032457600080fd5b506101fb610333366004611b5d565b611125565b34801561034457600080fd5b50610244610353366004611b5d565b611157565b34801561036457600080fd5b50610244610373366004611b5d565b6112d8565b34801561038457600080fd5b506103ae610393366004611b5d565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610205565b3480156103d257600080fd5b506102446103e1366004611b76565b61156d565b3480156103f257600080fd5b506101fb60025481565b34801561040857600080fd5b50610244610417366004611b76565b61164b565b34801561042857600080fd5b506101fb610437366004611b5d565b60086020526000908152604090205481565b34801561045557600080fd5b506101fb60045481565b34801561046b57600080fd5b506104b661047a366004611b5d565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516102059493929190611d85565b6102446104d4366004611b5d565b61180e565b3480156104e557600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561051957600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054d57600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561058157600080fd5b506101fb60035481565b34801561059757600080fd5b506101fb60005481565b3480156105ad57600080fd5b506103ae7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e157600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561061557600080fd5b50610244610624366004611b5d565b611a14565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161067d5761067d611dd4565b04116106c25760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff1660028111156106f0576106f0611d6f565b1461072f5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106b9565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b031680156107a1576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006107d17f000000000000000000000000000000000000000000000000000000000000000042611e00565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146108295760405162461bcd60e51b81526004016106b990611e22565b80600254106108715760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106b9565b81600054146107a157600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b7f000000000000000000000000000000000000000000000000000000000000000034101561092c5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106b9565b60007f00000000000000000000000000000000000000000000000000000000000000006000544261095d9190611e59565b6109679190611e00565b610972906001611e59565b905060007f00000000000000000000000000000000000000000000000000000000000000006109c17f000000000000000000000000000000000000000000000000000000000000000042611e00565b6109cb9190611e59565b905060008183106109dc57816109de565b825b905080851115610a245760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b60448201526064016106b9565b600060017f000000000000000000000000000000000000000000000000000000000000000060015442610a579190611e6c565b610a619190611e00565b610a6b9190611e6c565b905060007f0000000000000000000000000000000000000000000000000000000000000000610aba7f000000000000000000000000000000000000000000000000000000000000000042611e00565b610ac49190611e6c565b90506000818311610ad55781610ad7565b815b905080881015610b1d5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b60448201526064016106b9565b86610b5b5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106b9565b6000888152600660205260409020600101546001600160a01b031615610bb95760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106b9565b6040805160808101825288815233602080830191825263ffffffff4281168486019081526000606086018181528f82526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610c4e57610c4e611d6f565b0217905550506040518881523391507f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a9060200160405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115610cff576000610cde7f000000000000000000000000000000000000000000000000000000000000000034611e6c565b604051909150339082156108fc029083906000818181858888f15050505050505b5050505050505050565b6040845110610d4c5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106b9565b6000838383604051602001610d6393929190611eaf565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610de5576000868281518110610da657610da6611ef1565b6020026020010151905082811115610dcc57826000528060205260406000209250610ddc565b8060005282602052604060002092505b50600101610d89565b508060045414610e285760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106b9565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610e9f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106b9565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610ecd908890611f07565b6000604051808303816000865af19150503d8060008114610f0a576040519150601f19603f3d011682016040523d82523d6000602084013e610f0f565b606091505b5050905080610f605760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106b9565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f00000000000000000000000000000000000000000000000000000000000000004281610ffc57610ffc611dd4565b041161103c5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106b9565b60008082815260066020526040902060010154600160c01b900460ff16600281111561106a5761106a611d6f565b146110a95760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106b9565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b031680156107a1576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006111517f000000000000000000000000000000000000000000000000000000000000000083611e00565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff16600281111561118657611186611d6f565b146111c95760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b60448201526064016106b9565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b03918216911615611290576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161132c5761132c611dd4565b04111561136e5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106b9565b600081815260066020526040902060010154600160a01b900463ffffffff16806113cb5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106b9565b6000828152600760205260409020546001600160a01b0316156114275760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106b9565b7f0000000000000000000000000000000000000000000000000000000000000000600154600054600261145a9190611f1a565b6114649190611e59565b61146e9190611e59565b6114788242611e6c565b10156114ec5760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e00000000000000000060648201526084016106b9565b6005548211156115485760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79061153f9084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146115c05760405162461bcd60e51b81526004016106b990611e22565b80600354106116085760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106b9565b81600154146107a157600182905560038190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020016108b0565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161169f5761169f611dd4565b0411156116e15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106b9565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146117345760405162461bcd60e51b81526004016106b990611e22565b6005548211801561174457508015155b1561178757600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b6000828152600660205260409020548015611809578181036117c95750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b031615611809576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b0316156118735760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106b9565b6000818152600660205260409020600101546001600160a01b03166118d05760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b60448201526064016106b9565b7f00000000000000000000000000000000000000000000000000000000000000003410156119405760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106b9565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7906119949084815260200190565b60405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115611a115760006119f07f000000000000000000000000000000000000000000000000000000000000000034611e6c565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b6002600082815260066020526040902060010154600160c01b900460ff166002811115611a4357611a43611d6f565b14611a905760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e00000000000000000060448201526064016106b9565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600060208284031215611b6f57600080fd5b5035919050565b60008060408385031215611b8957600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611bd757611bd7611b98565b604052919050565b803567ffffffffffffffff81168114611bf757600080fd5b919050565b80356001600160a01b0381168114611bf757600080fd5b600082601f830112611c2457600080fd5b813567ffffffffffffffff811115611c3e57611c3e611b98565b611c51601f8201601f1916602001611bae565b818152846020838601011115611c6657600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611c9957600080fd5b843567ffffffffffffffff80821115611cb157600080fd5b818701915087601f830112611cc557600080fd5b8135602082821115611cd957611cd9611b98565b8160051b611ce8828201611bae565b928352848101820192828101908c851115611d0257600080fd5b958301955b84871015611d2057863582529583019590830190611d07565b9950611d30915050898201611bdf565b96505050611d4060408801611bfc565b93506060870135915080821115611d5657600080fd5b50611d6387828801611c13565b91505092959194509250565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611dc557634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611e1d57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b8082018082111561115157611151611dea565b8181038181111561115157611151611dea565b6000815160005b81811015611ea05760208185018101518683015201611e86565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611ee8601c830184611e7f565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611f138284611e7f565b9392505050565b808202811582820484141761115157611151611dea56fea2646970667358221220b3a0ad6e5b33584be6c506b8e5587809023ef0fb13c2f526379a2268554b5d3e64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101c25760003560e01c8063710cc9a7116100f7578063b044397e11610095578063e813a75511610064578063e813a7551461058b578063eb8dedfa146105a1578063f3f480d9146105d5578063f4cf751b1461060957600080fd5b8063b044397e146104d9578063b5b7a1841461050d578063d0e30db014610541578063d6e01b391461057557600080fd5b806390df63b7116100d157806390df63b71461041c5780639588eca214610449578063a888c2cd1461045f578063ab82d9a0146104c657600080fd5b8063710cc9a7146103c65780637ffc2a6e146103e65780638caeb7a8146103fc57600080fd5b806331ddf743116101645780634a439cfe1161013e5780634a439cfe1461031857806350b81dbe1461033857806364962849146103585780636b45ebcb1461037857600080fd5b806331ddf743146102a45780633968ae00146102c45780634518f79f146102f857600080fd5b8063222ae786116101a0578063222ae7861461024657806327ee6bdd1461025b5780632c1925191461027157806331d144571461029157600080fd5b8063042c4aaf146101c75780630e56752e1461020e578063114095d314610224575b600080fd5b3480156101d357600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561021a57600080fd5b506101fb60015481565b34801561023057600080fd5b5061024461023f366004611b5d565b610629565b005b34801561025257600080fd5b506101fb6107a5565b34801561026757600080fd5b506101fb60055481565b34801561027d57600080fd5b5061024461028c366004611b76565b6107d6565b61024461029f366004611b76565b6108bc565b3480156102b057600080fd5b506102446102bf366004611c83565b610d09565b3480156102d057600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561030457600080fd5b50610244610313366004611b5d565b610fa8565b34801561032457600080fd5b506101fb610333366004611b5d565b611125565b34801561034457600080fd5b50610244610353366004611b5d565b611157565b34801561036457600080fd5b50610244610373366004611b5d565b6112d8565b34801561038457600080fd5b506103ae610393366004611b5d565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610205565b3480156103d257600080fd5b506102446103e1366004611b76565b61156d565b3480156103f257600080fd5b506101fb60025481565b34801561040857600080fd5b50610244610417366004611b76565b61164b565b34801561042857600080fd5b506101fb610437366004611b5d565b60086020526000908152604090205481565b34801561045557600080fd5b506101fb60045481565b34801561046b57600080fd5b506104b661047a366004611b5d565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516102059493929190611d85565b6102446104d4366004611b5d565b61180e565b3480156104e557600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561051957600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054d57600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561058157600080fd5b506101fb60035481565b34801561059757600080fd5b506101fb60005481565b3480156105ad57600080fd5b506103ae7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e157600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561061557600080fd5b50610244610624366004611b5d565b611a14565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161067d5761067d611dd4565b04116106c25760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff1660028111156106f0576106f0611d6f565b1461072f5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106b9565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b031680156107a1576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006107d17f000000000000000000000000000000000000000000000000000000000000000042611e00565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146108295760405162461bcd60e51b81526004016106b990611e22565b80600254106108715760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106b9565b81600054146107a157600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b7f000000000000000000000000000000000000000000000000000000000000000034101561092c5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106b9565b60007f00000000000000000000000000000000000000000000000000000000000000006000544261095d9190611e59565b6109679190611e00565b610972906001611e59565b905060007f00000000000000000000000000000000000000000000000000000000000000006109c17f000000000000000000000000000000000000000000000000000000000000000042611e00565b6109cb9190611e59565b905060008183106109dc57816109de565b825b905080851115610a245760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b60448201526064016106b9565b600060017f000000000000000000000000000000000000000000000000000000000000000060015442610a579190611e6c565b610a619190611e00565b610a6b9190611e6c565b905060007f0000000000000000000000000000000000000000000000000000000000000000610aba7f000000000000000000000000000000000000000000000000000000000000000042611e00565b610ac49190611e6c565b90506000818311610ad55781610ad7565b815b905080881015610b1d5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b60448201526064016106b9565b86610b5b5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106b9565b6000888152600660205260409020600101546001600160a01b031615610bb95760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106b9565b6040805160808101825288815233602080830191825263ffffffff4281168486019081526000606086018181528f82526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610c4e57610c4e611d6f565b0217905550506040518881523391507f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a9060200160405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115610cff576000610cde7f000000000000000000000000000000000000000000000000000000000000000034611e6c565b604051909150339082156108fc029083906000818181858888f15050505050505b5050505050505050565b6040845110610d4c5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106b9565b6000838383604051602001610d6393929190611eaf565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610de5576000868281518110610da657610da6611ef1565b6020026020010151905082811115610dcc57826000528060205260406000209250610ddc565b8060005282602052604060002092505b50600101610d89565b508060045414610e285760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106b9565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610e9f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106b9565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610ecd908890611f07565b6000604051808303816000865af19150503d8060008114610f0a576040519150601f19603f3d011682016040523d82523d6000602084013e610f0f565b606091505b5050905080610f605760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106b9565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f00000000000000000000000000000000000000000000000000000000000000004281610ffc57610ffc611dd4565b041161103c5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106b9565b60008082815260066020526040902060010154600160c01b900460ff16600281111561106a5761106a611d6f565b146110a95760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106b9565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b031680156107a1576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006111517f000000000000000000000000000000000000000000000000000000000000000083611e00565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff16600281111561118657611186611d6f565b146111c95760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b60448201526064016106b9565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b03918216911615611290576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161132c5761132c611dd4565b04111561136e5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106b9565b600081815260066020526040902060010154600160a01b900463ffffffff16806113cb5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106b9565b6000828152600760205260409020546001600160a01b0316156114275760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106b9565b7f0000000000000000000000000000000000000000000000000000000000000000600154600054600261145a9190611f1a565b6114649190611e59565b61146e9190611e59565b6114788242611e6c565b10156114ec5760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e00000000000000000060648201526084016106b9565b6005548211156115485760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79061153f9084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146115c05760405162461bcd60e51b81526004016106b990611e22565b80600354106116085760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106b9565b81600154146107a157600182905560038190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020016108b0565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161169f5761169f611dd4565b0411156116e15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106b9565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146117345760405162461bcd60e51b81526004016106b990611e22565b6005548211801561174457508015155b1561178757600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b6000828152600660205260409020548015611809578181036117c95750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b031615611809576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b0316156118735760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106b9565b6000818152600660205260409020600101546001600160a01b03166118d05760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b60448201526064016106b9565b7f00000000000000000000000000000000000000000000000000000000000000003410156119405760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106b9565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7906119949084815260200190565b60405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115611a115760006119f07f000000000000000000000000000000000000000000000000000000000000000034611e6c565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b6002600082815260066020526040902060010154600160c01b900460ff166002811115611a4357611a43611d6f565b14611a905760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e00000000000000000060448201526064016106b9565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600060208284031215611b6f57600080fd5b5035919050565b60008060408385031215611b8957600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611bd757611bd7611b98565b604052919050565b803567ffffffffffffffff81168114611bf757600080fd5b919050565b80356001600160a01b0381168114611bf757600080fd5b600082601f830112611c2457600080fd5b813567ffffffffffffffff811115611c3e57611c3e611b98565b611c51601f8201601f1916602001611bae565b818152846020838601011115611c6657600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611c9957600080fd5b843567ffffffffffffffff80821115611cb157600080fd5b818701915087601f830112611cc557600080fd5b8135602082821115611cd957611cd9611b98565b8160051b611ce8828201611bae565b928352848101820192828101908c851115611d0257600080fd5b958301955b84871015611d2057863582529583019590830190611d07565b9950611d30915050898201611bdf565b96505050611d4060408801611bfc565b93506060870135915080821115611d5657600080fd5b50611d6387828801611c13565b91505092959194509250565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611dc557634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611e1d57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b8082018082111561115157611151611dea565b8181038181111561115157611151611dea565b6000815160005b81811015611ea05760208185018101518683015201611e86565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611ee8601c830184611e7f565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611f138284611e7f565b9392505050565b808202811582820484141761115157611151611dea56fea2646970667358221220b3a0ad6e5b33584be6c506b8e5587809023ef0fb13c2f526379a2268554b5d3e64736f6c63430008120033", + "devdoc": { + "details": "Vea Outbox From Gnosis to Arbitrum. Note: This contract is deployed on Arbitrum.", + "events": { + "Challenged(uint256,address)": { + "details": "This event indicates that `sendSnapshot(epoch)` should be called in the inbox.", + "params": { + "_challenger": "The address of the challenger.", + "_epoch": "The epoch associated with the challenged claim." + } + }, + "Claimed(address,bytes32)": { + "details": "Watcher check this event to challenge fraud.", + "params": { + "_claimer": "The address of the claimer.", + "_stateRoot": "The state root of the claim." + } + }, + "MessageRelayed(uint64)": { + "details": "This event indicates that a message has been relayed.", + "params": { + "_msgId": "The msgId of the message that was relayed." + } + }, + "Verified(uint256)": { + "details": "This events indicates that verification has succeeded. The messages are ready to be relayed.", + "params": { + "_epoch": "The epoch that was verified." + } + }, + "sequencerDelayLimitUpdateReceived(uint256)": { + "details": "This event indicates the sequencer limit updated.", + "params": { + "_newsequencerDelayLimit": "The new maxL2StateSyncDelay." + } + } + }, + "kind": "dev", + "methods": { + "challenge(uint256)": { + "details": "Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.", + "params": { + "_epoch": "The epoch of the claim to challenge." + } + }, + "claim(uint256,bytes32)": { + "details": "Submit a claim about the _stateRoot at _epoch and submit a deposit.", + "params": { + "_epoch": "The epoch for which the claim is made.", + "_stateRoot": "The state root to claim." + } + }, + "constructor": { + "details": "Constructor. Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value", + "params": { + "_challengePeriod": "The duration of the period allowing to challenge a claim.", + "_deposit": "The deposit amount to submit a claim in wei.", + "_epochPeriod": "The duration of each epoch.", + "_maxClaimDelayEpochs": "The maximum number of epochs that can be claimed in the past.", + "_maxClaimFutureEpochs": "The maximum number of epochs that can be claimed in the future.", + "_routerGnosisToArb": "The address of the router on Ethereum that routes from Arbitrum to Ethereum.", + "_sequencerDelayLimit": "The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.", + "_sequencerFutureLimit": "The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.", + "_timeoutEpochs": "The epochs before the bridge is considered shutdown." + } + }, + "epochAt(uint256)": { + "details": "Get the current epoch from the outbox's point of view using the Ethereum L1 clock.", + "returns": { + "epoch": "The hash of the claim." + } + }, + "epochNow()": { + "details": "Get the current epoch from the outbox's point of view using the Ethereum L1 clock.", + "returns": { + "epoch": "The hash of the claim." + } + }, + "resolveDisputedClaim(uint256,bytes32)": { + "details": "Resolves any challenge of the optimistic claim for '_epoch'.", + "params": { + "_epoch": "The epoch to verify.", + "_stateRoot": "The true state root for the epoch." + } + }, + "sendMessage(bytes32[],uint64,address,bytes)": { + "details": "Verifies and relays the message. UNTRUSTED.", + "params": { + "_message": "The message encoded with header from VeaInbox.", + "_msgId": "The zero based index of the message in the inbox.", + "_proof": "The merkle proof to prove the message.", + "_to": "The address of the contract on Gnosis to call." + } + }, + "updateSequencerDelayLimit(uint256,uint256)": { + "details": "Set the sequencerDelayLimit by reading from the Arbitrum Bridge", + "params": { + "_newSequencerDelayLimit": "The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.", + "_timestamp": "The timestamp of the message." + } + }, + "updateSequencerFutureLimit(uint256,uint256)": { + "details": "Set the sequencerFutureLimit by reading from the Arbitrum Bridge", + "params": { + "_newSequencerFutureLimit": "The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.", + "_timestamp": "The timestamp of the message." + } + }, + "verifySnapshot(uint256)": { + "details": "Resolves the optimistic claim for '_epoch'.", + "params": { + "_epoch": "The epoch of the optimistic claim." + } + }, + "withdrawChallengeDeposit(uint256)": { + "details": "Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.", + "params": { + "_epoch": "The epoch associated with the challenge deposit to withraw." + } + }, + "withdrawChallengerEscapeHatch(uint256)": { + "details": "When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.", + "params": { + "_epoch": "The epoch associated with the claim deposit to withraw." + } + }, + "withdrawClaimDeposit(uint256)": { + "details": "Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.", + "params": { + "_epoch": "The epoch associated with the claim deposit to withraw." + } + }, + "withdrawClaimerEscapeHatch(uint256)": { + "details": "When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.", + "params": { + "_epoch": "The epoch associated with the claim deposit to withraw." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "resolveDisputedClaim(uint256,bytes32)": { + "notice": "Note: Access restricted to AMB." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8531, + "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", + "label": "sequencerDelayLimit", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 8533, + "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", + "label": "sequencerFutureLimit", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 8535, + "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", + "label": "timestampDelayUpdated", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 8537, + "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", + "label": "timestampFutureUpdated", + "offset": 0, + "slot": "3", + "type": "t_uint256" + }, + { + "astId": 8539, + "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", + "label": "stateRoot", + "offset": 0, + "slot": "4", + "type": "t_bytes32" + }, + { + "astId": 8541, + "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", + "label": "latestVerifiedEpoch", + "offset": 0, + "slot": "5", + "type": "t_uint256" + }, + { + "astId": 8546, + "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", + "label": "claims", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_uint256,t_struct(Claim)8568_storage)" + }, + { + "astId": 8550, + "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", + "label": "challengers", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 8554, + "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", + "label": "relayed", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_uint256,t_bytes32)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_enum(Party)8558": { + "encoding": "inplace", + "label": "enum VeaOutboxGnosisToArb.Party", + "numberOfBytes": "1" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint256,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_mapping(t_uint256,t_struct(Claim)8568_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct VeaOutboxGnosisToArb.Claim)", + "numberOfBytes": "32", + "value": "t_struct(Claim)8568_storage" + }, + "t_struct(Claim)8568_storage": { + "encoding": "inplace", + "label": "struct VeaOutboxGnosisToArb.Claim", + "members": [ + { + "astId": 8560, + "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", + "label": "stateRoot", + "offset": 0, + "slot": "0", + "type": "t_bytes32" + }, + { + "astId": 8562, + "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", + "label": "claimer", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 8564, + "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", + "label": "timestamp", + "offset": 20, + "slot": "1", + "type": "t_uint32" + }, + { + "astId": 8567, + "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", + "label": "honest", + "offset": 24, + "slot": "1", + "type": "t_enum(Party)8558" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} diff --git a/contracts/deployments/chiado/VeaInboxGnosisToArbDevnet.json b/contracts/deployments/chiado/VeaInboxGnosisToArbDevnet.json new file mode 100644 index 00000000..7dd57063 --- /dev/null +++ b/contracts/deployments/chiado/VeaInboxGnosisToArbDevnet.json @@ -0,0 +1,395 @@ +{ + "address": "0xe4AF4f1B42749d003C6d6eFdc05c11F33581E55B", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epochPeriod", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_routerGnosisToArb", + "type": "address" + }, + { + "internalType": "contract IAMB", + "name": "_amb", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "_nodeData", + "type": "bytes" + } + ], + "name": "MessageSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "_count", + "type": "uint64" + } + ], + "name": "SnapshotSaved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_epochSent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_ticketId", + "type": "bytes32" + } + ], + "name": "SnapshotSent", + "type": "event" + }, + { + "inputs": [], + "name": "amb", + "outputs": [ + { + "internalType": "contract IAMB", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "count", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "inbox", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "routerGnosisToArb", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "saveSnapshot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "_fnSelector", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "sendMessage", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_inboxIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxSubmissionCost", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_excessFeeRefundAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxFeePerGas", + "type": "uint256" + } + ], + "name": "sendSnapshot", + "outputs": [ + { + "internalType": "bytes32", + "name": "ticketID", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "snapshots", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x6882a6ee635b14f0e47e47b0024ea3efafe930ee561959ea0ceb12082cf91af2", + "receipt": { + "to": null, + "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", + "contractAddress": "0xe4AF4f1B42749d003C6d6eFdc05c11F33581E55B", + "transactionIndex": 0, + "gasUsed": "613732", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x60d7801b598ec3559a88efe881f0693026a2cda6f3b1028e15ce3681192ccf12", + "transactionHash": "0x6882a6ee635b14f0e47e47b0024ea3efafe930ee561959ea0ceb12082cf91af2", + "logs": [], + "blockNumber": 4696202, + "cumulativeGasUsed": "613732", + "status": 1, + "byzantium": true + }, + "args": [ + 1800, + "0xcC196cC90bD30109E39400817e6ef63A1b744659", + "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a" + ], + "numDeployments": 1, + "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSnapshot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"ticketID\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Gnosis to Arbitrum. Note: This contract is deployed on the Gnosis.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)\"}},\"SnapshotSaved(uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerGnosisToArb\":\"The router on Ethereum that routes from Gnosis to Arbitrum.\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See merkle tree documentation for details how inbox manages state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":\"VeaInboxGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\n\\n/// @dev Vea Inbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on the Gnosis.\\ncontract VeaInboxGnosisToArb is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between stateroot snapshots\\n address public immutable routerGnosisToArb; // The router on Ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerGnosisToArb The router on Ethereum that routes from Gnosis to Arbitrum.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n constructor(uint256 _epochPeriod, address _routerGnosisToArb, IAMB _amb) {\\n epochPeriod = _epochPeriod;\\n routerGnosisToArb = _routerGnosisToArb;\\n amb = _amb;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See merkle tree documentation for details how inbox manages state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // data for outbox relay\\n abi.encodePacked( // abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...) where _data is abi.encode(param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function sendSnapshot(\\n uint256 _epoch,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external virtual returns (bytes32 ticketID){\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(\\n IRouterToArb.route,\\n (_epoch, snapshots[_epoch], _inboxIndex, _maxSubmissionCost, _excessFeeRefundAddress, _gasLimit, _maxFeePerGas));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n ticketID = amb.requireToPassMessage(routerGnosisToArb, data, amb.maxGasPerTx());\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x7ca2295ffaafd0f34fbd778aa2144be9d3d5751e213f2a7398a286b8ab6cd71f\",\"license\":\"MIT\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60e060405234801561001057600080fd5b50604051610b0b380380610b0b83398101604081905261002f91610064565b60a0929092526001600160a01b0390811660c052166080526100a7565b6001600160a01b038116811461006157600080fd5b50565b60008060006060848603121561007957600080fd5b83519250602084015161008b8161004c565b604085015190925061009c8161004c565b809150509250925092565b60805160a05160c051610a1a6100f1600039600081816101a6015261031701526000818161014c015281816101cc015261043301526000818160cf01526102ee0152610a1a6000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80635f85896c116100665780635f85896c14610134578063b5b7a18414610147578063d6565a2d1461016e578063e5a1c3561461018e578063eb8dedfa146101a157600080fd5b806306661abd146100985780631062b39a146100ca5780632bbb470414610109578063519205351461012a575b600080fd5b6041546100ac9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c1565b61011c61011736600461071b565b6101c8565b6040519081526020016100c1565b61013261042e565b005b6100ac610142366004610782565b610548565b61011c7f000000000000000000000000000000000000000000000000000000000000000081565b61011c61017c366004610863565b60006020819052908152604090205481565b61011c61019c366004610863565b6106b4565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000042816101f9576101f961087c565b0487106102585760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b600087815260208190526040808220549051602481018a9052604481019190915260648101889052608481018790526001600160a01b03861660a482015260c4810185905260e481018490526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928692869263e5789d039260048083019391928290030181865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190610892565b6040518463ffffffff1660e01b81526004016103a4939291906108fb565b6020604051808303816000875af11580156103c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e79190610892565b9150877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828360405161041b91815260200190565b60405180910390a2509695505050505050565b6000807f000000000000000000000000000000000000000000000000000000000000000042816104605761046061087c565b604154919004925060009067ffffffffffffffff165b80156104af57806001166001036104a3576001826040811061049a5761049a61092f565b015492506104af565b6001918201911c610476565b60011c5b80156104f15760019182019181811690036104e9576104e6600183604081106104de576104de61092f565b0154846106cb565b92505b60011c6104b3565b505060008281526020818152604091829020839055604154915167ffffffffffffffff90921682527f8d762ebc760982a11d9a00cc7c1c4c91f9c1084b85633ee8ca462da42465f1d9910160405180910390a15050565b60415460009067ffffffffffffffff90811690811061059a5760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b604482015260640161024f565b604051600090829087906105b690889033908990602001610945565b60408051601f19818403018152908290526105d593929160200161097b565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b6001811660000361063957610621600183604081106104de576104de61092f565b92506001918201911c677fffffffffffffff16610600565b50816001826040811061064e5761064e61092f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906106a19084906109ca565b60405180910390a1509095945050505050565b600181604081106106c457600080fd5b0154905081565b6000818310156106e9578260005281602052604060002090506106f9565b8160005282602052604060002090505b92915050565b80356001600160a01b038116811461071657600080fd5b919050565b60008060008060008060c0878903121561073457600080fd5b863595506020870135945060408701359350610752606088016106ff565b92506080870135915060a087013590509295509295509295565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561079757600080fd5b6107a0846106ff565b925060208401356001600160e01b0319811681146107bd57600080fd5b9150604084013567ffffffffffffffff808211156107da57600080fd5b818601915086601f8301126107ee57600080fd5b8135818111156108005761080061076c565b604051601f8201601f19908116603f011681019083821181831017156108285761082861076c565b8160405282815289602084870101111561084157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561087557600080fd5b5035919050565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156108a457600080fd5b5051919050565b60005b838110156108c65781810151838201526020016108ae565b50506000910152565b600081518084526108e78160208601602086016108ab565b601f01601f19169290920160200192915050565b6001600160a01b038416815260606020820181905260009061091f908301856108cf565b9050826040830152949350505050565b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b841681528260048201526000825161096c8160248501602087016108ab565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bb81601c8501602087016108ab565b91909101601c01949350505050565b6020815260006109dd60208301846108cf565b939250505056fea26469706673582212207651e99ea048af4184e2ff2a5d067a5095a32f2014519a26a40caf2bf722f88d64736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80635f85896c116100665780635f85896c14610134578063b5b7a18414610147578063d6565a2d1461016e578063e5a1c3561461018e578063eb8dedfa146101a157600080fd5b806306661abd146100985780631062b39a146100ca5780632bbb470414610109578063519205351461012a575b600080fd5b6041546100ac9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c1565b61011c61011736600461071b565b6101c8565b6040519081526020016100c1565b61013261042e565b005b6100ac610142366004610782565b610548565b61011c7f000000000000000000000000000000000000000000000000000000000000000081565b61011c61017c366004610863565b60006020819052908152604090205481565b61011c61019c366004610863565b6106b4565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000042816101f9576101f961087c565b0487106102585760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b600087815260208190526040808220549051602481018a9052604481019190915260648101889052608481018790526001600160a01b03861660a482015260c4810185905260e481018490526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928692869263e5789d039260048083019391928290030181865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190610892565b6040518463ffffffff1660e01b81526004016103a4939291906108fb565b6020604051808303816000875af11580156103c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e79190610892565b9150877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828360405161041b91815260200190565b60405180910390a2509695505050505050565b6000807f000000000000000000000000000000000000000000000000000000000000000042816104605761046061087c565b604154919004925060009067ffffffffffffffff165b80156104af57806001166001036104a3576001826040811061049a5761049a61092f565b015492506104af565b6001918201911c610476565b60011c5b80156104f15760019182019181811690036104e9576104e6600183604081106104de576104de61092f565b0154846106cb565b92505b60011c6104b3565b505060008281526020818152604091829020839055604154915167ffffffffffffffff90921682527f8d762ebc760982a11d9a00cc7c1c4c91f9c1084b85633ee8ca462da42465f1d9910160405180910390a15050565b60415460009067ffffffffffffffff90811690811061059a5760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b604482015260640161024f565b604051600090829087906105b690889033908990602001610945565b60408051601f19818403018152908290526105d593929160200161097b565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b6001811660000361063957610621600183604081106104de576104de61092f565b92506001918201911c677fffffffffffffff16610600565b50816001826040811061064e5761064e61092f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906106a19084906109ca565b60405180910390a1509095945050505050565b600181604081106106c457600080fd5b0154905081565b6000818310156106e9578260005281602052604060002090506106f9565b8160005282602052604060002090505b92915050565b80356001600160a01b038116811461071657600080fd5b919050565b60008060008060008060c0878903121561073457600080fd5b863595506020870135945060408701359350610752606088016106ff565b92506080870135915060a087013590509295509295509295565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561079757600080fd5b6107a0846106ff565b925060208401356001600160e01b0319811681146107bd57600080fd5b9150604084013567ffffffffffffffff808211156107da57600080fd5b818601915086601f8301126107ee57600080fd5b8135818111156108005761080061076c565b604051601f8201601f19908116603f011681019083821181831017156108285761082861076c565b8160405282815289602084870101111561084157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561087557600080fd5b5035919050565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156108a457600080fd5b5051919050565b60005b838110156108c65781810151838201526020016108ae565b50506000910152565b600081518084526108e78160208601602086016108ab565b601f01601f19169290920160200192915050565b6001600160a01b038416815260606020820181905260009061091f908301856108cf565b9050826040830152949350505050565b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b841681528260048201526000825161096c8160248501602087016108ab565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bb81601c8501602087016108ab565b91909101601c01949350505050565b6020815260006109dd60208301846108cf565b939250505056fea26469706673582212207651e99ea048af4184e2ff2a5d067a5095a32f2014519a26a40caf2bf722f88d64736f6c63430008120033", + "devdoc": { + "details": "Vea Inbox From Gnosis to Arbitrum. Note: This contract is deployed on the Gnosis.", + "events": { + "MessageSent(bytes)": { + "details": "Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.", + "params": { + "_nodeData": "The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)" + } + }, + "SnapshotSaved(uint64)": { + "params": { + "_count": "The count of messages in the merkle tree." + } + }, + "SnapshotSent(uint256,bytes32)": { + "details": "The event is emitted when a snapshot is sent through the canonical arbitrum bridge.", + "params": { + "_epochSent": "The epoch of the snapshot.", + "_ticketId": "The ticketId of the L2->L1 message." + } + } + }, + "kind": "dev", + "methods": { + "constructor": { + "details": "Constructor. Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value", + "params": { + "_amb": "The address of the AMB contract on Gnosis.", + "_epochPeriod": "The duration in seconds between epochs.", + "_routerGnosisToArb": "The router on Ethereum that routes from Gnosis to Arbitrum." + } + }, + "saveSnapshot()": { + "details": "Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state." + }, + "sendMessage(address,bytes4,bytes)": { + "details": "Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See merkle tree documentation for details how inbox manages state.", + "params": { + "_data": "The message calldata, abi.encode(param1, param2, ...)", + "_fnSelector": "The function selector of the receiving contract.", + "_to": "The address of the contract on the receiving chain which receives the calldata." + }, + "returns": { + "_0": "msgId The zero based index of the message in the inbox." + } + }, + "sendSnapshot(uint256,uint256,uint256,address,uint256,uint256)": { + "details": "Sends the state root snapshot using Arbitrum's canonical bridge.", + "params": { + "_epoch": "The epoch of the snapshot requested to send.", + "_excessFeeRefundAddress": "Address to refund any excess fee to", + "_gasLimit": "Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)", + "_inboxIndex": "The index of the inbox in the Arbitrum bridge contract.", + "_maxFeePerGas": "price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)", + "_maxSubmissionCost": "Max gas deducted from user's L2 balance to cover base submission fee" + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "SnapshotSaved(uint64)": { + "notice": "The bridgers can watch this event to claim the stateRoot on the veaOutbox." + } + }, + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8146, + "contract": "src/gnosisToArbitrum/VeaInboxGnosisToArb.sol:VeaInboxGnosisToArb", + "label": "snapshots", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_uint256,t_bytes32)" + }, + { + "astId": 8150, + "contract": "src/gnosisToArbitrum/VeaInboxGnosisToArb.sol:VeaInboxGnosisToArb", + "label": "inbox", + "offset": 0, + "slot": "1", + "type": "t_array(t_bytes32)64_storage" + }, + { + "astId": 8152, + "contract": "src/gnosisToArbitrum/VeaInboxGnosisToArb.sol:VeaInboxGnosisToArb", + "label": "count", + "offset": 0, + "slot": "65", + "type": "t_uint64" + } + ], + "types": { + "t_array(t_bytes32)64_storage": { + "base": "t_bytes32", + "encoding": "inplace", + "label": "bytes32[64]", + "numberOfBytes": "2048" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + } +} diff --git a/contracts/deployments/chiado/VeaInboxGnosisToArbTestnet.json b/contracts/deployments/chiado/VeaInboxGnosisToArbTestnet.json new file mode 100644 index 00000000..07283a0b --- /dev/null +++ b/contracts/deployments/chiado/VeaInboxGnosisToArbTestnet.json @@ -0,0 +1,395 @@ +{ + "address": "0xB10EF39cc9b45A8EAfa87655063E3dD83D675075", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epochPeriod", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_routerGnosisToArb", + "type": "address" + }, + { + "internalType": "contract IAMB", + "name": "_amb", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "_nodeData", + "type": "bytes" + } + ], + "name": "MessageSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "_count", + "type": "uint64" + } + ], + "name": "SnapshotSaved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_epochSent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_ticketId", + "type": "bytes32" + } + ], + "name": "SnapshotSent", + "type": "event" + }, + { + "inputs": [], + "name": "amb", + "outputs": [ + { + "internalType": "contract IAMB", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "count", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "inbox", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "routerGnosisToArb", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "saveSnapshot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "_fnSelector", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "sendMessage", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_inboxIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxSubmissionCost", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_excessFeeRefundAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxFeePerGas", + "type": "uint256" + } + ], + "name": "sendSnapshot", + "outputs": [ + { + "internalType": "bytes32", + "name": "ticketID", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "snapshots", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xc6db0e85aecef4f6c55c20743257ed9514221b9a1b6f95bfa07ce1cfe545595b", + "receipt": { + "to": null, + "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", + "contractAddress": "0xB10EF39cc9b45A8EAfa87655063E3dD83D675075", + "transactionIndex": 1, + "gasUsed": "613744", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xbdf3230457e38e09e6187d4d86c98ce1309c93afd8f3413ed719b3d4efb0af7e", + "transactionHash": "0xc6db0e85aecef4f6c55c20743257ed9514221b9a1b6f95bfa07ce1cfe545595b", + "logs": [], + "blockNumber": 4696231, + "cumulativeGasUsed": "642264", + "status": 1, + "byzantium": true + }, + "args": [ + 7200, + "0x663697f5748c5f4d46a15114Dde5514356E794F4", + "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a" + ], + "numDeployments": 1, + "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSnapshot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"ticketID\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Gnosis to Arbitrum. Note: This contract is deployed on the Gnosis.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)\"}},\"SnapshotSaved(uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerGnosisToArb\":\"The router on Ethereum that routes from Gnosis to Arbitrum.\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See merkle tree documentation for details how inbox manages state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":\"VeaInboxGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\n\\n/// @dev Vea Inbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on the Gnosis.\\ncontract VeaInboxGnosisToArb is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between stateroot snapshots\\n address public immutable routerGnosisToArb; // The router on Ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerGnosisToArb The router on Ethereum that routes from Gnosis to Arbitrum.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n constructor(uint256 _epochPeriod, address _routerGnosisToArb, IAMB _amb) {\\n epochPeriod = _epochPeriod;\\n routerGnosisToArb = _routerGnosisToArb;\\n amb = _amb;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See merkle tree documentation for details how inbox manages state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // data for outbox relay\\n abi.encodePacked( // abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...) where _data is abi.encode(param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function sendSnapshot(\\n uint256 _epoch,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external virtual returns (bytes32 ticketID){\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(\\n IRouterToArb.route,\\n (_epoch, snapshots[_epoch], _inboxIndex, _maxSubmissionCost, _excessFeeRefundAddress, _gasLimit, _maxFeePerGas));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n ticketID = amb.requireToPassMessage(routerGnosisToArb, data, amb.maxGasPerTx());\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x7ca2295ffaafd0f34fbd778aa2144be9d3d5751e213f2a7398a286b8ab6cd71f\",\"license\":\"MIT\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60e060405234801561001057600080fd5b50604051610b0b380380610b0b83398101604081905261002f91610064565b60a0929092526001600160a01b0390811660c052166080526100a7565b6001600160a01b038116811461006157600080fd5b50565b60008060006060848603121561007957600080fd5b83519250602084015161008b8161004c565b604085015190925061009c8161004c565b809150509250925092565b60805160a05160c051610a1a6100f1600039600081816101a6015261031701526000818161014c015281816101cc015261043301526000818160cf01526102ee0152610a1a6000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80635f85896c116100665780635f85896c14610134578063b5b7a18414610147578063d6565a2d1461016e578063e5a1c3561461018e578063eb8dedfa146101a157600080fd5b806306661abd146100985780631062b39a146100ca5780632bbb470414610109578063519205351461012a575b600080fd5b6041546100ac9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c1565b61011c61011736600461071b565b6101c8565b6040519081526020016100c1565b61013261042e565b005b6100ac610142366004610782565b610548565b61011c7f000000000000000000000000000000000000000000000000000000000000000081565b61011c61017c366004610863565b60006020819052908152604090205481565b61011c61019c366004610863565b6106b4565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000042816101f9576101f961087c565b0487106102585760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b600087815260208190526040808220549051602481018a9052604481019190915260648101889052608481018790526001600160a01b03861660a482015260c4810185905260e481018490526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928692869263e5789d039260048083019391928290030181865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190610892565b6040518463ffffffff1660e01b81526004016103a4939291906108fb565b6020604051808303816000875af11580156103c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e79190610892565b9150877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828360405161041b91815260200190565b60405180910390a2509695505050505050565b6000807f000000000000000000000000000000000000000000000000000000000000000042816104605761046061087c565b604154919004925060009067ffffffffffffffff165b80156104af57806001166001036104a3576001826040811061049a5761049a61092f565b015492506104af565b6001918201911c610476565b60011c5b80156104f15760019182019181811690036104e9576104e6600183604081106104de576104de61092f565b0154846106cb565b92505b60011c6104b3565b505060008281526020818152604091829020839055604154915167ffffffffffffffff90921682527f8d762ebc760982a11d9a00cc7c1c4c91f9c1084b85633ee8ca462da42465f1d9910160405180910390a15050565b60415460009067ffffffffffffffff90811690811061059a5760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b604482015260640161024f565b604051600090829087906105b690889033908990602001610945565b60408051601f19818403018152908290526105d593929160200161097b565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b6001811660000361063957610621600183604081106104de576104de61092f565b92506001918201911c677fffffffffffffff16610600565b50816001826040811061064e5761064e61092f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906106a19084906109ca565b60405180910390a1509095945050505050565b600181604081106106c457600080fd5b0154905081565b6000818310156106e9578260005281602052604060002090506106f9565b8160005282602052604060002090505b92915050565b80356001600160a01b038116811461071657600080fd5b919050565b60008060008060008060c0878903121561073457600080fd5b863595506020870135945060408701359350610752606088016106ff565b92506080870135915060a087013590509295509295509295565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561079757600080fd5b6107a0846106ff565b925060208401356001600160e01b0319811681146107bd57600080fd5b9150604084013567ffffffffffffffff808211156107da57600080fd5b818601915086601f8301126107ee57600080fd5b8135818111156108005761080061076c565b604051601f8201601f19908116603f011681019083821181831017156108285761082861076c565b8160405282815289602084870101111561084157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561087557600080fd5b5035919050565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156108a457600080fd5b5051919050565b60005b838110156108c65781810151838201526020016108ae565b50506000910152565b600081518084526108e78160208601602086016108ab565b601f01601f19169290920160200192915050565b6001600160a01b038416815260606020820181905260009061091f908301856108cf565b9050826040830152949350505050565b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b841681528260048201526000825161096c8160248501602087016108ab565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bb81601c8501602087016108ab565b91909101601c01949350505050565b6020815260006109dd60208301846108cf565b939250505056fea26469706673582212207651e99ea048af4184e2ff2a5d067a5095a32f2014519a26a40caf2bf722f88d64736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80635f85896c116100665780635f85896c14610134578063b5b7a18414610147578063d6565a2d1461016e578063e5a1c3561461018e578063eb8dedfa146101a157600080fd5b806306661abd146100985780631062b39a146100ca5780632bbb470414610109578063519205351461012a575b600080fd5b6041546100ac9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c1565b61011c61011736600461071b565b6101c8565b6040519081526020016100c1565b61013261042e565b005b6100ac610142366004610782565b610548565b61011c7f000000000000000000000000000000000000000000000000000000000000000081565b61011c61017c366004610863565b60006020819052908152604090205481565b61011c61019c366004610863565b6106b4565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000042816101f9576101f961087c565b0487106102585760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b600087815260208190526040808220549051602481018a9052604481019190915260648101889052608481018790526001600160a01b03861660a482015260c4810185905260e481018490526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928692869263e5789d039260048083019391928290030181865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190610892565b6040518463ffffffff1660e01b81526004016103a4939291906108fb565b6020604051808303816000875af11580156103c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e79190610892565b9150877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828360405161041b91815260200190565b60405180910390a2509695505050505050565b6000807f000000000000000000000000000000000000000000000000000000000000000042816104605761046061087c565b604154919004925060009067ffffffffffffffff165b80156104af57806001166001036104a3576001826040811061049a5761049a61092f565b015492506104af565b6001918201911c610476565b60011c5b80156104f15760019182019181811690036104e9576104e6600183604081106104de576104de61092f565b0154846106cb565b92505b60011c6104b3565b505060008281526020818152604091829020839055604154915167ffffffffffffffff90921682527f8d762ebc760982a11d9a00cc7c1c4c91f9c1084b85633ee8ca462da42465f1d9910160405180910390a15050565b60415460009067ffffffffffffffff90811690811061059a5760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b604482015260640161024f565b604051600090829087906105b690889033908990602001610945565b60408051601f19818403018152908290526105d593929160200161097b565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b6001811660000361063957610621600183604081106104de576104de61092f565b92506001918201911c677fffffffffffffff16610600565b50816001826040811061064e5761064e61092f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906106a19084906109ca565b60405180910390a1509095945050505050565b600181604081106106c457600080fd5b0154905081565b6000818310156106e9578260005281602052604060002090506106f9565b8160005282602052604060002090505b92915050565b80356001600160a01b038116811461071657600080fd5b919050565b60008060008060008060c0878903121561073457600080fd5b863595506020870135945060408701359350610752606088016106ff565b92506080870135915060a087013590509295509295509295565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561079757600080fd5b6107a0846106ff565b925060208401356001600160e01b0319811681146107bd57600080fd5b9150604084013567ffffffffffffffff808211156107da57600080fd5b818601915086601f8301126107ee57600080fd5b8135818111156108005761080061076c565b604051601f8201601f19908116603f011681019083821181831017156108285761082861076c565b8160405282815289602084870101111561084157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561087557600080fd5b5035919050565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156108a457600080fd5b5051919050565b60005b838110156108c65781810151838201526020016108ae565b50506000910152565b600081518084526108e78160208601602086016108ab565b601f01601f19169290920160200192915050565b6001600160a01b038416815260606020820181905260009061091f908301856108cf565b9050826040830152949350505050565b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b841681528260048201526000825161096c8160248501602087016108ab565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bb81601c8501602087016108ab565b91909101601c01949350505050565b6020815260006109dd60208301846108cf565b939250505056fea26469706673582212207651e99ea048af4184e2ff2a5d067a5095a32f2014519a26a40caf2bf722f88d64736f6c63430008120033", + "devdoc": { + "details": "Vea Inbox From Gnosis to Arbitrum. Note: This contract is deployed on the Gnosis.", + "events": { + "MessageSent(bytes)": { + "details": "Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.", + "params": { + "_nodeData": "The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)" + } + }, + "SnapshotSaved(uint64)": { + "params": { + "_count": "The count of messages in the merkle tree." + } + }, + "SnapshotSent(uint256,bytes32)": { + "details": "The event is emitted when a snapshot is sent through the canonical arbitrum bridge.", + "params": { + "_epochSent": "The epoch of the snapshot.", + "_ticketId": "The ticketId of the L2->L1 message." + } + } + }, + "kind": "dev", + "methods": { + "constructor": { + "details": "Constructor. Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value", + "params": { + "_amb": "The address of the AMB contract on Gnosis.", + "_epochPeriod": "The duration in seconds between epochs.", + "_routerGnosisToArb": "The router on Ethereum that routes from Gnosis to Arbitrum." + } + }, + "saveSnapshot()": { + "details": "Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state." + }, + "sendMessage(address,bytes4,bytes)": { + "details": "Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See merkle tree documentation for details how inbox manages state.", + "params": { + "_data": "The message calldata, abi.encode(param1, param2, ...)", + "_fnSelector": "The function selector of the receiving contract.", + "_to": "The address of the contract on the receiving chain which receives the calldata." + }, + "returns": { + "_0": "msgId The zero based index of the message in the inbox." + } + }, + "sendSnapshot(uint256,uint256,uint256,address,uint256,uint256)": { + "details": "Sends the state root snapshot using Arbitrum's canonical bridge.", + "params": { + "_epoch": "The epoch of the snapshot requested to send.", + "_excessFeeRefundAddress": "Address to refund any excess fee to", + "_gasLimit": "Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)", + "_inboxIndex": "The index of the inbox in the Arbitrum bridge contract.", + "_maxFeePerGas": "price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)", + "_maxSubmissionCost": "Max gas deducted from user's L2 balance to cover base submission fee" + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "SnapshotSaved(uint64)": { + "notice": "The bridgers can watch this event to claim the stateRoot on the veaOutbox." + } + }, + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8146, + "contract": "src/gnosisToArbitrum/VeaInboxGnosisToArb.sol:VeaInboxGnosisToArb", + "label": "snapshots", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_uint256,t_bytes32)" + }, + { + "astId": 8150, + "contract": "src/gnosisToArbitrum/VeaInboxGnosisToArb.sol:VeaInboxGnosisToArb", + "label": "inbox", + "offset": 0, + "slot": "1", + "type": "t_array(t_bytes32)64_storage" + }, + { + "astId": 8152, + "contract": "src/gnosisToArbitrum/VeaInboxGnosisToArb.sol:VeaInboxGnosisToArb", + "label": "count", + "offset": 0, + "slot": "65", + "type": "t_uint64" + } + ], + "types": { + "t_array(t_bytes32)64_storage": { + "base": "t_bytes32", + "encoding": "inplace", + "label": "bytes32[64]", + "numberOfBytes": "2048" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + } +} diff --git a/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json b/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json index 2e69bdd2..be54a1ff 100644 --- a/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json +++ b/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xDBa4fb8C75816CF9DcDbC66eDA361AD198314577", + "address": "0xE2067941210d684bA8171F7C9dF372931fC6c245", "abi": [ { "inputs": [ @@ -15,7 +15,7 @@ }, { "internalType": "uint256", - "name": "_challengePeriod", + "name": "_minChallengePeriod", "type": "uint256" }, { @@ -30,23 +30,33 @@ }, { "internalType": "address", - "name": "_routerArbToGnosisDevnet", + "name": "_routerArbToGnosis", "type": "address" }, { "internalType": "uint256", - "name": "_maxMissingBlocks", + "name": "_sequencerDelayLimit", "type": "uint256" }, { "internalType": "uint256", - "name": "_sequencerDelayLimit", + "name": "_maxMissingBlocks", "type": "uint256" }, { "internalType": "uint256", "name": "_routerChainId", "type": "uint256" + }, + { + "internalType": "contract IWETH", + "name": "_weth", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxClaimDelayEpochs", + "type": "uint256" } ], "stateMutability": "nonpayable", @@ -135,7 +145,7 @@ { "indexed": false, "internalType": "uint256", - "name": "_newsequencerDelayLimit", + "name": "_newSequencerDelayLimit", "type": "uint256" } ], @@ -294,7 +304,7 @@ ], "name": "claim", "outputs": [], - "stateMutability": "payable", + "stateMutability": "nonpayable", "type": "function" }, { @@ -474,6 +484,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "maxClaimDelayEpochs", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "maxMissingBlocks", @@ -592,19 +615,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "routerChainId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -813,6 +823,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "weth", + "outputs": [ + { + "internalType": "contract IWETH", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -1034,38 +1057,40 @@ "type": "function" } ], - "transactionHash": "0x57bd6b3abc10d2a23ccde315267b7d1bbcda5fcb0c1dc1793b3b614dad803c9f", + "transactionHash": "0xff529c1ca0bfda8adc171ef91f5b8d4503a247e460d0d9f9315b4adb5a97af43", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xDBa4fb8C75816CF9DcDbC66eDA361AD198314577", - "transactionIndex": 0, - "gasUsed": "2116386", + "contractAddress": "0xE2067941210d684bA8171F7C9dF372931fC6c245", + "transactionIndex": 1, + "gasUsed": "2299378", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xb780182a5b20b0ea1d3bb53b734acb40017bb91c62c9c1a02ef7652008163ddb", - "transactionHash": "0x57bd6b3abc10d2a23ccde315267b7d1bbcda5fcb0c1dc1793b3b614dad803c9f", + "blockHash": "0xac1c08948691d0b819e5699ad56808aea9a96ed1109ac1ab8e788ef081f0ce8b", + "transactionHash": "0xff529c1ca0bfda8adc171ef91f5b8d4503a247e460d0d9f9315b4adb5a97af43", "logs": [], - "blockNumber": 4488160, - "cumulativeGasUsed": "2116386", + "blockNumber": 4696193, + "cumulativeGasUsed": "2320378", "status": 1, "byzantium": true }, "args": [ - "1000000000000000", + "100000000000000000", 1800, 0, 10000000000000, "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0x9F4407785DFf95c08Bf9a0d9d4A5a164C48eC5CB", + "0x8Bf88E6474d93bD2Dc0d76CB3BE8809c6BB84148", 86400, 10000000000000, - 5 + 5, + "0x8d74e5e4DA11629537C4575cB0f33b4F0Dfa42EB", + 3 ], - "numDeployments": 15, - "solcInputHash": "26a65a18c178d77477789f8130b0944b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosisDevnet\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_routerArbToGnosisDevnet\":\"The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\",\"_routerChainId\":\"The chain id of the router contract.\",\"_sequencerDelayLimit\":\"The maximum number of sequencer messages that can be submitted in a challenge period.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":\"VeaOutboxArbToGnosisDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x5e9eaf576f7ebe3aca5fa0c442c96bd201999d5e3b27ec731572fe927b6d84a0\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToGnosis/VeaOutboxArbToGnosis.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Chiado.\\n/// Note: This contract is deployed on Chiado.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosisDevnet The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _sequencerDelayLimit The maximum number of sequencer messages that can be submitted in a challenge period.\\n /// @param _routerChainId The chain id of the router contract.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosisDevnet,\\n uint256 _maxMissingBlocks,\\n uint256 _sequencerDelayLimit,\\n uint256 _routerChainId\\n )\\n VeaOutboxArbToGnosis(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _amb,\\n _routerArbToGnosisDevnet,\\n _maxMissingBlocks,\\n _sequencerDelayLimit,\\n _routerChainId\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xab3a39d2515db68f62fde6addb1d845b20e04dc70fb5dcb329b69e8309dbc4d1\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101c06040523480156200001257600080fd5b50604051620027783803806200277883398101604081905262000035916200010e565b60c08990526101408890526101808690526101608790526001600160a01b03808616608052841660a0526101a082905261012081905260048390558888888888888888886200008660028a620001a7565b60e0819052620000988a6002620001ca565b620000a49190620001ea565b6101005261014051600190620000bb9042620001a7565b620000c79190620001ea565b6001555050600680546001600160a01b0319163317905550620002009e505050505050505050505050505050565b6001600160a01b03811681146200010b57600080fd5b50565b60008060008060008060008060006101208a8c0312156200012e57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a01516200015781620000f5565b60a08b01519095506200016a81620000f5565b8094505060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001c557634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001e457620001e462000191565b92915050565b81810381811115620001e457620001e462000191565b60805160a05160c05160e05161010051610120516101405161016051610180516101a05161241c6200035c600039600081816104c60152611e050152600081816104fa015281816108c10152818161182d015281816119b80152611bc40152600081816105820152611d9901526000818161052e015281816108e501528181610c760152818161171b01528181611851015281816119dc0152611be801526000818161042f01528181610a5c0152610d8f0152600081816114a801526115e101526000818161145501526115990152600081816105b6015281816106c2015281816108480152818161087501528181610f900152818161163101528181611b2201528181611b890152611d2f0152600081816105ea01528181610b490152610e7c01526000818161022f01528181610960015281816109da01528181610abe01528181610cab01528181610d0d0152610df1015261241c6000f3fe6080604052600436106101e35760003560e01c80638ad3a8f711610102578063b633b94411610095578063da2b7bc411610064578063da2b7bc41461060c578063df19e6ff1461062c578063e813a75514610659578063eedcf2a91461066f57600080fd5b8063b633b94414610550578063c2114a1614610570578063d0e30db0146105a4578063d5e6a9df146105d857600080fd5b80639588eca2116100d15780639588eca21461049e578063aa22a1c6146104b4578063b044397e146104e8578063b5b7a1841461051c57600080fd5b80638ad3a8f7146103fd5780638d96fdea1461041d57806390df63b714610451578063930f28af1461047e57600080fd5b806331ddf7431161017a5780634a439cfe116101495780634a439cfe14610387578063541adcca146103a75780637ffc2a6e146103c75780638a619a71146103dd57600080fd5b806331ddf743146103075780633ce43cfd146103275780634788cb381461034757806349b4299e1461036757600080fd5b80632639c060116101b65780632639c0601461029157806327ee6bdd146102be5780632c192519146102d457806331d14457146102f457600080fd5b806301139b68146101e85780630f0adca5146101fd5780631062b39a1461021d578063222ae7861461026e575b600080fd5b6101fb6101f6366004611fc2565b610682565b005b34801561020957600080fd5b506101fb610218366004611ff0565b6108bf565b34801561022957600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561027a57600080fd5b50610283610c6f565b604051908152602001610265565b34801561029d57600080fd5b506102836102ac366004612027565b60026020526000908152604090205481565b3480156102ca57600080fd5b5061028360015481565b3480156102e057600080fd5b506101fb6102ef366004612040565b610ca0565b6101fb610302366004612040565b610f77565b34801561031357600080fd5b506101fb6103223660046120c3565b6110fe565b34801561033357600080fd5b506101fb610342366004612185565b61139e565b34801561035357600080fd5b506101fb610362366004611fc2565b6114e5565b34801561037357600080fd5b506101fb610382366004611fc2565b611669565b34801561039357600080fd5b506102836103a2366004612027565b611714565b3480156103b357600080fd5b506102836103c23660046121be565b611746565b3480156103d357600080fd5b5061028360055481565b3480156103e957600080fd5b506101fb6103f83660046121e1565b611798565b34801561040957600080fd5b50600654610251906001600160a01b031681565b34801561042957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561045d57600080fd5b5061028361046c366004612027565b60036020526000908152604090205481565b34801561048a57600080fd5b506101fb610499366004611fc2565b61182b565b3480156104aa57600080fd5b5061028360005481565b3480156104c057600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156104f457600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561052857600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561055c57600080fd5b506101fb61056b366004611fc2565b6119b6565b34801561057c57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105b057600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e457600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b34801561061857600080fd5b506101fb610627366004611fc2565b611bc2565b34801561063857600080fd5b5061064c6106473660046121be565b611d7b565b6040516102659190612214565b34801561066557600080fd5b5061028360045481565b6101fb61067d366004612040565b611e42565b61068b81611746565b600083815260026020526040902054146106c05760405162461bcd60e51b81526004016106b79061222e565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107305760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106b7565b60c08101516001600160a01b03161561078b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106b7565b60008160a0015160028111156107a3576107a36121fe565b146107f05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106b7565b3360c08201526107ff81611746565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108bb57600061089a7f000000000000000000000000000000000000000000000000000000000000000034612256565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161091257610912612277565b040311156109555760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106b7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109d85760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016106b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5a919061228d565b7f000000000000000000000000000000000000000000000000000000000000000014610abc5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016106b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3e91906122a6565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610bb15760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016106b7565b60015483118015610bc157508115155b15610c0457600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610c0d81611746565b60008481526002602052604090205403610c6a578051829003610c3657600160a0820152610c51565b60c08101516001600160a01b031615610c5157600260a08201525b610c5a81611746565b6000848152600260205260409020555b505050565b6000610c9b7f0000000000000000000000000000000000000000000000000000000000000000426122c3565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d0b5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b60448201526064016106b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8d919061228d565b7f000000000000000000000000000000000000000000000000000000000000000014610def5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016106b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7191906122a6565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610ee45760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016106b7565b8060055410610f2c5760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106b7565b81600454146108bb57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6006546001600160a01b03163314610f8e57600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610ffe5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106b7565b8061101b5760405162461bcd60e51b81526004016106b79061222e565b6000828152600260205260409020541561106d5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106b7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526110b390611746565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050565b604085106111405760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106b7565b60008484848460405160200161115994939291906122e5565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156111d957600088888381811061119b5761119b612327565b905060200201359050828111156111c0578260005280602052604060002092506111d0565b8060005282602052604060002092505b5060010161117f565b50806000541461121c5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106b7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112915760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106b7565b6000838152600360205260408082206001851b84179055516001600160a01b038916906112c1908990899061233d565b6000604051808303816000865af19150503d80600081146112fe576040519150601f19603f3d011682016040523d82523d6000602084013e611303565b606091505b50509050806113545760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106b7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6113b06103c2368390038301836121be565b600083815260026020526040902054146113dc5760405162461bcd60e51b81526004016106b79061222e565b60026113ee60c0830160a0840161234d565b60028111156113ff576113ff6121fe565b146114405760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106b7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061149a93505060e0840191505060c083016121e1565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114ee81611746565b6000838152600260205260409020541461151a5760405162461bcd60e51b81526004016106b79061222e565b60018160a001516002811115611532576115326121fe565b1461156f5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106b7565b60008281526002602052604081205560c08101516001600160a01b03161561161b576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6006546001600160a01b0316331461168057600080fd5b61168981611746565b600083815260026020526040902054146116b55760405162461bcd60e51b81526004016106b79061222e565b63ffffffff4281166060830152431660808201526116d281611746565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610f6b565b60006117407f0000000000000000000000000000000000000000000000000000000000000000836122c3565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861177b989097969101612368565b604051602081830303815290604052805190602001209050919050565b6006546001600160a01b031633146117af57600080fd5b6006546001600160a01b031633146118095760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106b7565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161187e5761187e612277565b040311156118c15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106b7565b6118ca81611746565b600083815260026020526040902054146118f65760405162461bcd60e51b81526004016106b79061222e565b60c08101516001600160a01b0316156119485760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106b7565b60015482111561199057600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a08201526119a081611746565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a0957611a09612277565b040311611a4a5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106b7565b611a5381611746565b60008381526002602052604090205414611a7f5760405162461bcd60e51b81526004016106b79061222e565b60008160a001516002811115611a9757611a976121fe565b14611ad65760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106b7565b60c08101516001600160a01b0316156108bb5760208101516001600160a01b0316611b5a5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b6e82611746565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c1557611c15612277565b040311611c565760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106b7565b611c5f81611746565b60008381526002602052604090205414611c8b5760405162461bcd60e51b81526004016106b79061222e565b60008160a001516002811115611ca357611ca36121fe565b14611ce25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106b7565b60208101516001600160a01b0316156108bb5760c08101516001600160a01b0316611d675760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b6e82611746565b6000816060015163ffffffff16600003611d9757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611dd357506003919050565b60006005836060015163ffffffff16420381611df157611df1612277565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611e355760019250611e3a565b600092505b50505b919050565b611e4c8282610f77565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611e938382611669565b63ffffffff428116606083015243166080820152611eb1838261182b565b600160a0820152610c6a83826114e5565b6001600160a01b0381168114611ed757600080fd5b50565b8035611e3d81611ec2565b803563ffffffff81168114611e3d57600080fd5b803560038110611e3d57600080fd5b600060e08284031215611f1a57600080fd5b60405160e0810181811067ffffffffffffffff82111715611f4b57634e487b7160e01b600052604160045260246000fd5b60405282358152905080611f6160208401611eda565b6020820152611f7260408401611ee5565b6040820152611f8360608401611ee5565b6060820152611f9460808401611ee5565b6080820152611fa560a08401611ef9565b60a0820152611fb660c08401611eda565b60c08201525092915050565b6000806101008385031215611fd657600080fd5b82359150611fe78460208501611f08565b90509250929050565b6000806000610120848603121561200657600080fd5b833592506020840135915061201e8560408601611f08565b90509250925092565b60006020828403121561203957600080fd5b5035919050565b6000806040838503121561205357600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611e3d57600080fd5b60008083601f84011261208c57600080fd5b50813567ffffffffffffffff8111156120a457600080fd5b6020830191508360208285010111156120bc57600080fd5b9250929050565b600080600080600080608087890312156120dc57600080fd5b863567ffffffffffffffff808211156120f457600080fd5b818901915089601f83011261210857600080fd5b81358181111561211757600080fd5b8a60208260051b850101111561212c57600080fd5b6020830198508097505061214260208a01612062565b955061215060408a01611eda565b9450606089013591508082111561216657600080fd5b5061217389828a0161207a565b979a9699509497509295939492505050565b60008082840361010081121561219a57600080fd5b8335925060e0601f19820112156121b057600080fd5b506020830190509250929050565b600060e082840312156121d057600080fd5b6121da8383611f08565b9392505050565b6000602082840312156121f357600080fd5b81356121da81611ec2565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612228576122286121fe565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b8181038181111561174057634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60006020828403121561229f57600080fd5b5051919050565b6000602082840312156122b857600080fd5b81516121da81611ec2565b6000826122e057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561235f57600080fd5b6121da82611ef9565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106123c0576123c06121fe565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212200454cdd50c4f8ef4c5777954d7020a06e3c68dbbe80e8a98085a22451950e63f64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101e35760003560e01c80638ad3a8f711610102578063b633b94411610095578063da2b7bc411610064578063da2b7bc41461060c578063df19e6ff1461062c578063e813a75514610659578063eedcf2a91461066f57600080fd5b8063b633b94414610550578063c2114a1614610570578063d0e30db0146105a4578063d5e6a9df146105d857600080fd5b80639588eca2116100d15780639588eca21461049e578063aa22a1c6146104b4578063b044397e146104e8578063b5b7a1841461051c57600080fd5b80638ad3a8f7146103fd5780638d96fdea1461041d57806390df63b714610451578063930f28af1461047e57600080fd5b806331ddf7431161017a5780634a439cfe116101495780634a439cfe14610387578063541adcca146103a75780637ffc2a6e146103c75780638a619a71146103dd57600080fd5b806331ddf743146103075780633ce43cfd146103275780634788cb381461034757806349b4299e1461036757600080fd5b80632639c060116101b65780632639c0601461029157806327ee6bdd146102be5780632c192519146102d457806331d14457146102f457600080fd5b806301139b68146101e85780630f0adca5146101fd5780631062b39a1461021d578063222ae7861461026e575b600080fd5b6101fb6101f6366004611fc2565b610682565b005b34801561020957600080fd5b506101fb610218366004611ff0565b6108bf565b34801561022957600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561027a57600080fd5b50610283610c6f565b604051908152602001610265565b34801561029d57600080fd5b506102836102ac366004612027565b60026020526000908152604090205481565b3480156102ca57600080fd5b5061028360015481565b3480156102e057600080fd5b506101fb6102ef366004612040565b610ca0565b6101fb610302366004612040565b610f77565b34801561031357600080fd5b506101fb6103223660046120c3565b6110fe565b34801561033357600080fd5b506101fb610342366004612185565b61139e565b34801561035357600080fd5b506101fb610362366004611fc2565b6114e5565b34801561037357600080fd5b506101fb610382366004611fc2565b611669565b34801561039357600080fd5b506102836103a2366004612027565b611714565b3480156103b357600080fd5b506102836103c23660046121be565b611746565b3480156103d357600080fd5b5061028360055481565b3480156103e957600080fd5b506101fb6103f83660046121e1565b611798565b34801561040957600080fd5b50600654610251906001600160a01b031681565b34801561042957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561045d57600080fd5b5061028361046c366004612027565b60036020526000908152604090205481565b34801561048a57600080fd5b506101fb610499366004611fc2565b61182b565b3480156104aa57600080fd5b5061028360005481565b3480156104c057600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156104f457600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561052857600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561055c57600080fd5b506101fb61056b366004611fc2565b6119b6565b34801561057c57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105b057600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e457600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b34801561061857600080fd5b506101fb610627366004611fc2565b611bc2565b34801561063857600080fd5b5061064c6106473660046121be565b611d7b565b6040516102659190612214565b34801561066557600080fd5b5061028360045481565b6101fb61067d366004612040565b611e42565b61068b81611746565b600083815260026020526040902054146106c05760405162461bcd60e51b81526004016106b79061222e565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107305760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106b7565b60c08101516001600160a01b03161561078b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106b7565b60008160a0015160028111156107a3576107a36121fe565b146107f05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106b7565b3360c08201526107ff81611746565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108bb57600061089a7f000000000000000000000000000000000000000000000000000000000000000034612256565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161091257610912612277565b040311156109555760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106b7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109d85760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016106b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5a919061228d565b7f000000000000000000000000000000000000000000000000000000000000000014610abc5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016106b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3e91906122a6565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610bb15760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016106b7565b60015483118015610bc157508115155b15610c0457600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610c0d81611746565b60008481526002602052604090205403610c6a578051829003610c3657600160a0820152610c51565b60c08101516001600160a01b031615610c5157600260a08201525b610c5a81611746565b6000848152600260205260409020555b505050565b6000610c9b7f0000000000000000000000000000000000000000000000000000000000000000426122c3565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d0b5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b60448201526064016106b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8d919061228d565b7f000000000000000000000000000000000000000000000000000000000000000014610def5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016106b7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7191906122a6565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610ee45760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016106b7565b8060055410610f2c5760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106b7565b81600454146108bb57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6006546001600160a01b03163314610f8e57600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610ffe5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106b7565b8061101b5760405162461bcd60e51b81526004016106b79061222e565b6000828152600260205260409020541561106d5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106b7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526110b390611746565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050565b604085106111405760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106b7565b60008484848460405160200161115994939291906122e5565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156111d957600088888381811061119b5761119b612327565b905060200201359050828111156111c0578260005280602052604060002092506111d0565b8060005282602052604060002092505b5060010161117f565b50806000541461121c5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106b7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112915760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106b7565b6000838152600360205260408082206001851b84179055516001600160a01b038916906112c1908990899061233d565b6000604051808303816000865af19150503d80600081146112fe576040519150601f19603f3d011682016040523d82523d6000602084013e611303565b606091505b50509050806113545760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106b7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6113b06103c2368390038301836121be565b600083815260026020526040902054146113dc5760405162461bcd60e51b81526004016106b79061222e565b60026113ee60c0830160a0840161234d565b60028111156113ff576113ff6121fe565b146114405760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106b7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061149a93505060e0840191505060c083016121e1565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114ee81611746565b6000838152600260205260409020541461151a5760405162461bcd60e51b81526004016106b79061222e565b60018160a001516002811115611532576115326121fe565b1461156f5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106b7565b60008281526002602052604081205560c08101516001600160a01b03161561161b576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6006546001600160a01b0316331461168057600080fd5b61168981611746565b600083815260026020526040902054146116b55760405162461bcd60e51b81526004016106b79061222e565b63ffffffff4281166060830152431660808201526116d281611746565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610f6b565b60006117407f0000000000000000000000000000000000000000000000000000000000000000836122c3565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861177b989097969101612368565b604051602081830303815290604052805190602001209050919050565b6006546001600160a01b031633146117af57600080fd5b6006546001600160a01b031633146118095760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106b7565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161187e5761187e612277565b040311156118c15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106b7565b6118ca81611746565b600083815260026020526040902054146118f65760405162461bcd60e51b81526004016106b79061222e565b60c08101516001600160a01b0316156119485760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106b7565b60015482111561199057600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a08201526119a081611746565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a0957611a09612277565b040311611a4a5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106b7565b611a5381611746565b60008381526002602052604090205414611a7f5760405162461bcd60e51b81526004016106b79061222e565b60008160a001516002811115611a9757611a976121fe565b14611ad65760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106b7565b60c08101516001600160a01b0316156108bb5760208101516001600160a01b0316611b5a5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b6e82611746565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c1557611c15612277565b040311611c565760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106b7565b611c5f81611746565b60008381526002602052604090205414611c8b5760405162461bcd60e51b81526004016106b79061222e565b60008160a001516002811115611ca357611ca36121fe565b14611ce25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106b7565b60208101516001600160a01b0316156108bb5760c08101516001600160a01b0316611d675760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b6e82611746565b6000816060015163ffffffff16600003611d9757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611dd357506003919050565b60006005836060015163ffffffff16420381611df157611df1612277565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611e355760019250611e3a565b600092505b50505b919050565b611e4c8282610f77565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611e938382611669565b63ffffffff428116606083015243166080820152611eb1838261182b565b600160a0820152610c6a83826114e5565b6001600160a01b0381168114611ed757600080fd5b50565b8035611e3d81611ec2565b803563ffffffff81168114611e3d57600080fd5b803560038110611e3d57600080fd5b600060e08284031215611f1a57600080fd5b60405160e0810181811067ffffffffffffffff82111715611f4b57634e487b7160e01b600052604160045260246000fd5b60405282358152905080611f6160208401611eda565b6020820152611f7260408401611ee5565b6040820152611f8360608401611ee5565b6060820152611f9460808401611ee5565b6080820152611fa560a08401611ef9565b60a0820152611fb660c08401611eda565b60c08201525092915050565b6000806101008385031215611fd657600080fd5b82359150611fe78460208501611f08565b90509250929050565b6000806000610120848603121561200657600080fd5b833592506020840135915061201e8560408601611f08565b90509250925092565b60006020828403121561203957600080fd5b5035919050565b6000806040838503121561205357600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611e3d57600080fd5b60008083601f84011261208c57600080fd5b50813567ffffffffffffffff8111156120a457600080fd5b6020830191508360208285010111156120bc57600080fd5b9250929050565b600080600080600080608087890312156120dc57600080fd5b863567ffffffffffffffff808211156120f457600080fd5b818901915089601f83011261210857600080fd5b81358181111561211757600080fd5b8a60208260051b850101111561212c57600080fd5b6020830198508097505061214260208a01612062565b955061215060408a01611eda565b9450606089013591508082111561216657600080fd5b5061217389828a0161207a565b979a9699509497509295939492505050565b60008082840361010081121561219a57600080fd5b8335925060e0601f19820112156121b057600080fd5b506020830190509250929050565b600060e082840312156121d057600080fd5b6121da8383611f08565b9392505050565b6000602082840312156121f357600080fd5b81356121da81611ec2565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612228576122286121fe565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b8181038181111561174057634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b60006020828403121561229f57600080fd5b5051919050565b6000602082840312156122b857600080fd5b81516121da81611ec2565b6000826122e057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561235f57600080fd5b6121da82611ef9565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106123c0576123c06121fe565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212200454cdd50c4f8ef4c5777954d7020a06e3c68dbbe80e8a98085a22451950e63f64736f6c63430008120033", + "numDeployments": 1, + "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IWETH\",\"name\":\"_weth\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxClaimDelayEpochs\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxClaimDelayEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxClaimDelayEpochs\":\"The maximum number of epochs that can be claimed in the past.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_weth\":\"The address of the WETH contract on Gnosis.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by receiving a message from the AMB.\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":\"VeaOutboxArbToGnosisDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/tokens/gnosis/IWETH.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n IWETH public immutable weth; // The address of the WETH contract on Gnosis.\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 internal immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable maxClaimDelayEpochs; // The maximum number of epochs that can be claimed in the past.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth,\\n uint256 _maxClaimDelayEpochs\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n weth = _weth;\\n maxClaimDelayEpochs = _maxClaimDelayEpochs;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerDelayLimit by receiving a message from the AMB.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n // If _newSequencerDelayLimit > timeout * epochPeriod, then the bridge will shutdown.\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external virtual {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n // If the sequencerDelayLimit is set larger than block.timestamp - epochPeriod by arbitrum governance, \\n // the checked arithmetic will revert due to underflow and the bridge will shutdown.\\n uint256 minEpochSequencerDelay = (block.timestamp - sequencerDelayLimit) / epochPeriod - 1;\\n\\n uint256 minEpochClaim;\\n \\n unchecked{\\n // deployer sets maxClaimDelayEpochs so no underflow is possible\\n minEpochClaim = block.timestamp / epochPeriod - maxClaimDelayEpochs;\\n }\\n\\n uint256 minClaimableEpoch = minEpochSequencerDelay > minEpochClaim ? minEpochSequencerDelay : minEpochClaim;\\n \\n require(_epoch >= minClaimableEpoch, \\\"Invalid epoch.\\\");\\n\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.challenger, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x920fcd2e271fd8871f3ca84c160e7e799f4e80da241acbec81b12789d2330c68\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToGnosis/VeaOutboxArbToGnosis.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Chiado.\\n/// Note: This contract is deployed on Chiado.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public override onlyByDevnetOperator {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth,\\n uint256 _maxClaimDelayEpochs\\n )\\n VeaOutboxArbToGnosis(\\n _deposit,\\n _epochPeriod,\\n _minChallengePeriod,\\n _timeoutEpochs,\\n _amb,\\n _routerArbToGnosis,\\n _sequencerDelayLimit,\\n _maxMissingBlocks,\\n _routerChainId,\\n _weth,\\n _maxClaimDelayEpochs\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x33ce51725085672aba4ef3984ac72106ca2dcb8c887fe0ad8b8926ecf9a1e078\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/tokens/gnosis/IWETH.sol\":{\"content\":\"// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5daaf60d11ee2075260d0f3adfb22b1c536db983/contracts/token/ERC20/BurnableToken.sol\\n// implementation: https://gnosisscan.io/address/0xf8d1677c8a0c961938bf2f9adc3f3cfda759a9d9#code\\n// proxy: https://gnosisscan.io/token/0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1#readProxyContract\\n\\n/**\\n * @title Burnable Token\\n * @dev Token that can be irreversibly burned (destroyed).\\n */\\ninterface IWETH {\\n \\n event Transfer(address indexed from, address indexed to, uint256 value);\\n event Burn(address indexed burner, uint256 value);\\n\\n /**\\n * @dev Burns a specific amount of tokens.\\n * @param _value The amount of token to be burned.\\n */\\n function burn(uint256 _value) external;\\n\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Transfer tokens from one address to another\\n * @param _from address The address which you want to send tokens from\\n * @param _to address The address which you want to transfer to\\n * @param _value uint256 the amount of tokens to be transferred\\n */\\n function transferFrom(\\n address _from,\\n address _to,\\n uint256 _value\\n ) external returns (bool);\\n}\",\"keccak256\":\"0x0f616e96c8713b9eecd9ded1aac026c64398e9a3633bd8273e6ac7bd8f800f7d\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6102006040523480156200001257600080fd5b5060405162002b5c38038062002b5c833981016040819052620000359162000138565b60e08b90526101608a90526101c08890526101808990526001600160a01b0380881660805280871660a05260048690556101e0859052610140849052821660c0526101a08190528a8a8a8a8a8a8a8a8a8a8a6200009460028c620001f4565b610100819052620000a78c600262000217565b620000b3919062000237565b6101205261016051600190620000ca9042620001f4565b620000d6919062000237565b600181905550505050505050505050505033600660006101000a8154816001600160a01b0302191690836001600160a01b0316021790555050505050505050505050506200024d565b6001600160a01b03811681146200013557600080fd5b50565b60008060008060008060008060008060006101608c8e0312156200015b57600080fd5b8b519a5060208c0151995060408c0151985060608c0151975060808c015162000184816200011f565b60a08d015190975062000197816200011f565b8096505060c08c0151945060e08c015193506101008c015192506101208c0151620001c2816200011f565b809250506101408c015190509295989b509295989b9093969950565b634e487b7160e01b600052601160045260246000fd5b6000826200021257634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620002315762000231620001de565b92915050565b81810381811115620002315762000231620001de565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e05161276c620003f0600039600081816105120152612125015260008181610546015281816108fb01528181611a6d01528181611bf80152611eb70152600061021a0152600081816105ce01526120b901526000818161057a0152818161091f01528181610cb00152818161195b01528181611a9101528181611c1c0152611edb015260008181610a960152610dc90152600081816115e701526117d70152600081816114f60152611729015260008181610602015281816106e901528181610fe40152818161185201528181611d7101528181611e0601526120300152600081816103a50152818161070f0152818161100a0152818161151c015281816115880152818161174f015281816117fd0152818161187801528181611d9701528181611e2c015261205601526000818161063601528181610b830152610eb60152600081816102810152818161099a01528181610a1401528181610af801528181610ce501528181610d470152610e2b015261276c6000f3fe6080604052600436106101ee5760003560e01c80637ffc2a6e1161010d578063b5b7a184116100a0578063d5e6a9df1161006f578063d5e6a9df14610624578063da2b7bc414610658578063df19e6ff14610678578063e813a755146106a5578063eedcf2a9146106bb57600080fd5b8063b5b7a18414610568578063b633b9441461059c578063c2114a16146105bc578063d0e30db0146105f057600080fd5b8063930f28af116100dc578063930f28af146104ca5780639588eca2146104ea578063aa22a1c614610500578063b044397e1461053457600080fd5b80637ffc2a6e146104475780638a619a711461045d5780638ad3a8f71461047d57806390df63b71461049d57600080fd5b806331d14457116101855780634788cb38116101545780634788cb38146103c757806349b4299e146103e75780634a439cfe14610407578063541adcca1461042757600080fd5b806331d144571461033357806331ddf743146103535780633ce43cfd146103735780633fc8cef31461039357600080fd5b8063222ae786116101c1578063222ae786146102bb5780632639c060146102d057806327ee6bdd146102fd5780632c1925191461031357600080fd5b806301139b68146101f3578063042c4aaf146102085780630f0adca51461024f5780631062b39a1461026f575b600080fd5b6102066102013660046122e2565b6106ce565b005b34801561021457600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561025b57600080fd5b5061020661026a366004612310565b6108f9565b34801561027b57600080fd5b506102a37f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610246565b3480156102c757600080fd5b5061023c610ca9565b3480156102dc57600080fd5b5061023c6102eb366004612347565b60026020526000908152604090205481565b34801561030957600080fd5b5061023c60015481565b34801561031f57600080fd5b5061020661032e366004612360565b610cda565b34801561033f57600080fd5b5061020661034e366004612360565b610fb2565b34801561035f57600080fd5b5061020661036e3660046123e3565b611194565b34801561037f57600080fd5b5061020661038e3660046124a5565b611434565b34801561039f57600080fd5b506102a37f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d357600080fd5b506102066103e23660046122e2565b61166e565b3480156103f357600080fd5b506102066104023660046122e2565b6118a9565b34801561041357600080fd5b5061023c610422366004612347565b611954565b34801561043357600080fd5b5061023c6104423660046124de565b611986565b34801561045357600080fd5b5061023c60055481565b34801561046957600080fd5b50610206610478366004612501565b6119d8565b34801561048957600080fd5b506006546102a3906001600160a01b031681565b3480156104a957600080fd5b5061023c6104b8366004612347565b60036020526000908152604090205481565b3480156104d657600080fd5b506102066104e53660046122e2565b611a6b565b3480156104f657600080fd5b5061023c60005481565b34801561050c57600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054057600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561057457600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a857600080fd5b506102066105b73660046122e2565b611bf6565b3480156105c857600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105fc57600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561063057600080fd5b506102a37f000000000000000000000000000000000000000000000000000000000000000081565b34801561066457600080fd5b506102066106733660046122e2565b611eb5565b34801561068457600080fd5b506106986106933660046124de565b61209b565b6040516102469190612534565b3480156106b157600080fd5b5061023c60045481565b6102066106c9366004612360565b612162565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610760573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610784919061254e565b6107a95760405162461bcd60e51b81526004016107a090612570565b60405180910390fd5b6107b281611986565b600083815260026020526040902054146107de5760405162461bcd60e51b81526004016107a09061259f565b60c08101516001600160a01b0316156108395760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016107a0565b60008160a0015160028111156108515761085161251e565b1461089e5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016107a0565b3360c08201526108ad81611986565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161094c5761094c6125c7565b0403111561098f5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107a0565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a125760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016107a0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9491906125dd565b7f000000000000000000000000000000000000000000000000000000000000000014610af65760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016107a0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7891906125f6565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610beb5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016107a0565b60015483118015610bfb57508115155b15610c3e57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610c4781611986565b60008481526002602052604090205403610ca4578051829003610c7057600160a0820152610c8b565b60c08101516001600160a01b031615610c8b57600260a08201525b610c9481611986565b6000848152600260205260409020555b505050565b6000610cd57f000000000000000000000000000000000000000000000000000000000000000042612613565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d455760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b60448201526064016107a0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610da3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc791906125dd565b7f000000000000000000000000000000000000000000000000000000000000000014610e295760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016107a0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eab91906125f6565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610f1e5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016107a0565b8060055410610f665760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016107a0565b8160045414610fae57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15b5050565b6006546001600160a01b03163314610fc957600080fd5b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561105b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107f919061254e565b61109b5760405162461bcd60e51b81526004016107a090612570565b806110b85760405162461bcd60e51b81526004016107a09061259f565b6000828152600260205260409020541561110a5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016107a0565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261115090611986565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016108ed565b604085106111d65760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016107a0565b6000848484846040516020016111ef9493929190612635565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561126f57600088888381811061123157611231612677565b9050602002013590508281111561125657826000528060205260406000209250611266565b8060005282602052604060002092505b50600101611215565b5080600054146112b25760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016107a0565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156113275760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016107a0565b6000838152600360205260408082206001851b84179055516001600160a01b03891690611357908990899061268d565b6000604051808303816000865af19150503d8060008114611394576040519150601f19603f3d011682016040523d82523d6000602084013e611399565b606091505b50509050806113ea5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016107a0565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b611446610442368390038301836124de565b600083815260026020526040902054146114725760405162461bcd60e51b81526004016107a09061259f565b600261148460c0830160a0840161269d565b60028111156114955761149561251e565b146114d65760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016107a0565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561156857600080fd5b505af115801561157c573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb90506115c160e0840160c08501612501565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af115801561162e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611652919061254e565b610fae5760405162461bcd60e51b81526004016107a090612570565b61167781611986565b600083815260026020526040902054146116a35760405162461bcd60e51b81526004016107a09061259f565b60018160a0015160028111156116bb576116bb61251e565b146116f85760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016107a0565b60008281526002602052604081205560c08101516001600160a01b03161561182e57604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561179b57600080fd5b505af11580156117af573d6000803e3d6000fd5b50505050602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb9060440161160f565b602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb9060440161160f565b6006546001600160a01b031633146118c057600080fd5b6118c981611986565b600083815260026020526040902054146118f55760405162461bcd60e51b81526004016107a09061259f565b63ffffffff42811660608301524316608082015261191281611986565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610fa5565b60006119807f000000000000000000000000000000000000000000000000000000000000000083612613565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986119bb9890979691016126b8565b604051602081830303815290604052805190602001209050919050565b6006546001600160a01b031633146119ef57600080fd5b6006546001600160a01b03163314611a495760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016107a0565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611abe57611abe6125c7565b04031115611b015760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107a0565b611b0a81611986565b60008381526002602052604090205414611b365760405162461bcd60e51b81526004016107a09061259f565b60c08101516001600160a01b031615611b885760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016107a0565b600154821115611bd057600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611be081611986565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c4957611c496125c7565b040311611c8a5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107a0565b611c9381611986565b60008381526002602052604090205414611cbf5760405162461bcd60e51b81526004016107a09061259f565b60008160a001516002811115611cd757611cd761251e565b14611d165760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107a0565b60c08101516001600160a01b031615610fae5760208101516001600160a01b0316611dc8576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb9060440161160f565b60c0810180516000909152611ddc82611986565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015611e75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e99919061254e565b610ca45760405162461bcd60e51b81526004016107a090612570565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611f0857611f086125c7565b040311611f495760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107a0565b611f5281611986565b60008381526002602052604090205414611f7e5760405162461bcd60e51b81526004016107a09061259f565b60008160a001516002811115611f9657611f9661251e565b14611fd55760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107a0565b60208101516001600160a01b031615610fae5760c08101516001600160a01b031661208757600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb9060440161160f565b6020810180516000909152611ddc82611986565b6000816060015163ffffffff166000036120b757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff16420310156120f357506003919050565b60006005836060015163ffffffff16420381612111576121116125c7565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612155576001925061215a565b600092505b50505b919050565b61216c8282610fb2565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526121b383826118a9565b63ffffffff4281166060830152431660808201526121d18382611a6b565b600160a0820152610ca4838261166e565b6001600160a01b03811681146121f757600080fd5b50565b803561215d816121e2565b803563ffffffff8116811461215d57600080fd5b80356003811061215d57600080fd5b600060e0828403121561223a57600080fd5b60405160e0810181811067ffffffffffffffff8211171561226b57634e487b7160e01b600052604160045260246000fd5b60405282358152905080612281602084016121fa565b602082015261229260408401612205565b60408201526122a360608401612205565b60608201526122b460808401612205565b60808201526122c560a08401612219565b60a08201526122d660c084016121fa565b60c08201525092915050565b60008061010083850312156122f657600080fd5b823591506123078460208501612228565b90509250929050565b6000806000610120848603121561232657600080fd5b833592506020840135915061233e8560408601612228565b90509250925092565b60006020828403121561235957600080fd5b5035919050565b6000806040838503121561237357600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461215d57600080fd5b60008083601f8401126123ac57600080fd5b50813567ffffffffffffffff8111156123c457600080fd5b6020830191508360208285010111156123dc57600080fd5b9250929050565b600080600080600080608087890312156123fc57600080fd5b863567ffffffffffffffff8082111561241457600080fd5b818901915089601f83011261242857600080fd5b81358181111561243757600080fd5b8a60208260051b850101111561244c57600080fd5b6020830198508097505061246260208a01612382565b955061247060408a016121fa565b9450606089013591508082111561248657600080fd5b5061249389828a0161239a565b979a9699509497509295939492505050565b6000808284036101008112156124ba57600080fd5b8335925060e0601f19820112156124d057600080fd5b506020830190509250929050565b600060e082840312156124f057600080fd5b6124fa8383612228565b9392505050565b60006020828403121561251357600080fd5b81356124fa816121e2565b634e487b7160e01b600052602160045260246000fd5b60208101600483106125485761254861251e565b91905290565b60006020828403121561256057600080fd5b815180151581146124fa57600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156125ef57600080fd5b5051919050565b60006020828403121561260857600080fd5b81516124fa816121e2565b60008261263057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156126af57600080fd5b6124fa82612219565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106127105761271061251e565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122018f7fb97cc06e2b7d4c5a2fa1b875c83f4019ff7829e45e77de46ca321593b0a64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101ee5760003560e01c80637ffc2a6e1161010d578063b5b7a184116100a0578063d5e6a9df1161006f578063d5e6a9df14610624578063da2b7bc414610658578063df19e6ff14610678578063e813a755146106a5578063eedcf2a9146106bb57600080fd5b8063b5b7a18414610568578063b633b9441461059c578063c2114a16146105bc578063d0e30db0146105f057600080fd5b8063930f28af116100dc578063930f28af146104ca5780639588eca2146104ea578063aa22a1c614610500578063b044397e1461053457600080fd5b80637ffc2a6e146104475780638a619a711461045d5780638ad3a8f71461047d57806390df63b71461049d57600080fd5b806331d14457116101855780634788cb38116101545780634788cb38146103c757806349b4299e146103e75780634a439cfe14610407578063541adcca1461042757600080fd5b806331d144571461033357806331ddf743146103535780633ce43cfd146103735780633fc8cef31461039357600080fd5b8063222ae786116101c1578063222ae786146102bb5780632639c060146102d057806327ee6bdd146102fd5780632c1925191461031357600080fd5b806301139b68146101f3578063042c4aaf146102085780630f0adca51461024f5780631062b39a1461026f575b600080fd5b6102066102013660046122e2565b6106ce565b005b34801561021457600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561025b57600080fd5b5061020661026a366004612310565b6108f9565b34801561027b57600080fd5b506102a37f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610246565b3480156102c757600080fd5b5061023c610ca9565b3480156102dc57600080fd5b5061023c6102eb366004612347565b60026020526000908152604090205481565b34801561030957600080fd5b5061023c60015481565b34801561031f57600080fd5b5061020661032e366004612360565b610cda565b34801561033f57600080fd5b5061020661034e366004612360565b610fb2565b34801561035f57600080fd5b5061020661036e3660046123e3565b611194565b34801561037f57600080fd5b5061020661038e3660046124a5565b611434565b34801561039f57600080fd5b506102a37f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d357600080fd5b506102066103e23660046122e2565b61166e565b3480156103f357600080fd5b506102066104023660046122e2565b6118a9565b34801561041357600080fd5b5061023c610422366004612347565b611954565b34801561043357600080fd5b5061023c6104423660046124de565b611986565b34801561045357600080fd5b5061023c60055481565b34801561046957600080fd5b50610206610478366004612501565b6119d8565b34801561048957600080fd5b506006546102a3906001600160a01b031681565b3480156104a957600080fd5b5061023c6104b8366004612347565b60036020526000908152604090205481565b3480156104d657600080fd5b506102066104e53660046122e2565b611a6b565b3480156104f657600080fd5b5061023c60005481565b34801561050c57600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054057600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561057457600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a857600080fd5b506102066105b73660046122e2565b611bf6565b3480156105c857600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105fc57600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561063057600080fd5b506102a37f000000000000000000000000000000000000000000000000000000000000000081565b34801561066457600080fd5b506102066106733660046122e2565b611eb5565b34801561068457600080fd5b506106986106933660046124de565b61209b565b6040516102469190612534565b3480156106b157600080fd5b5061023c60045481565b6102066106c9366004612360565b612162565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610760573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610784919061254e565b6107a95760405162461bcd60e51b81526004016107a090612570565b60405180910390fd5b6107b281611986565b600083815260026020526040902054146107de5760405162461bcd60e51b81526004016107a09061259f565b60c08101516001600160a01b0316156108395760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016107a0565b60008160a0015160028111156108515761085161251e565b1461089e5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016107a0565b3360c08201526108ad81611986565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161094c5761094c6125c7565b0403111561098f5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107a0565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a125760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016107a0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9491906125dd565b7f000000000000000000000000000000000000000000000000000000000000000014610af65760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016107a0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7891906125f6565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610beb5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016107a0565b60015483118015610bfb57508115155b15610c3e57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610c4781611986565b60008481526002602052604090205403610ca4578051829003610c7057600160a0820152610c8b565b60c08101516001600160a01b031615610c8b57600260a08201525b610c9481611986565b6000848152600260205260409020555b505050565b6000610cd57f000000000000000000000000000000000000000000000000000000000000000042612613565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d455760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b60448201526064016107a0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610da3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc791906125dd565b7f000000000000000000000000000000000000000000000000000000000000000014610e295760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016107a0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eab91906125f6565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610f1e5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016107a0565b8060055410610f665760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016107a0565b8160045414610fae57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15b5050565b6006546001600160a01b03163314610fc957600080fd5b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561105b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107f919061254e565b61109b5760405162461bcd60e51b81526004016107a090612570565b806110b85760405162461bcd60e51b81526004016107a09061259f565b6000828152600260205260409020541561110a5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016107a0565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261115090611986565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016108ed565b604085106111d65760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016107a0565b6000848484846040516020016111ef9493929190612635565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561126f57600088888381811061123157611231612677565b9050602002013590508281111561125657826000528060205260406000209250611266565b8060005282602052604060002092505b50600101611215565b5080600054146112b25760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016107a0565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156113275760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016107a0565b6000838152600360205260408082206001851b84179055516001600160a01b03891690611357908990899061268d565b6000604051808303816000865af19150503d8060008114611394576040519150601f19603f3d011682016040523d82523d6000602084013e611399565b606091505b50509050806113ea5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016107a0565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b611446610442368390038301836124de565b600083815260026020526040902054146114725760405162461bcd60e51b81526004016107a09061259f565b600261148460c0830160a0840161269d565b60028111156114955761149561251e565b146114d65760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016107a0565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561156857600080fd5b505af115801561157c573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb90506115c160e0840160c08501612501565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af115801561162e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611652919061254e565b610fae5760405162461bcd60e51b81526004016107a090612570565b61167781611986565b600083815260026020526040902054146116a35760405162461bcd60e51b81526004016107a09061259f565b60018160a0015160028111156116bb576116bb61251e565b146116f85760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016107a0565b60008281526002602052604081205560c08101516001600160a01b03161561182e57604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561179b57600080fd5b505af11580156117af573d6000803e3d6000fd5b50505050602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb9060440161160f565b602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb9060440161160f565b6006546001600160a01b031633146118c057600080fd5b6118c981611986565b600083815260026020526040902054146118f55760405162461bcd60e51b81526004016107a09061259f565b63ffffffff42811660608301524316608082015261191281611986565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610fa5565b60006119807f000000000000000000000000000000000000000000000000000000000000000083612613565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986119bb9890979691016126b8565b604051602081830303815290604052805190602001209050919050565b6006546001600160a01b031633146119ef57600080fd5b6006546001600160a01b03163314611a495760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016107a0565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611abe57611abe6125c7565b04031115611b015760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107a0565b611b0a81611986565b60008381526002602052604090205414611b365760405162461bcd60e51b81526004016107a09061259f565b60c08101516001600160a01b031615611b885760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016107a0565b600154821115611bd057600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611be081611986565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c4957611c496125c7565b040311611c8a5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107a0565b611c9381611986565b60008381526002602052604090205414611cbf5760405162461bcd60e51b81526004016107a09061259f565b60008160a001516002811115611cd757611cd761251e565b14611d165760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107a0565b60c08101516001600160a01b031615610fae5760208101516001600160a01b0316611dc8576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb9060440161160f565b60c0810180516000909152611ddc82611986565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015611e75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e99919061254e565b610ca45760405162461bcd60e51b81526004016107a090612570565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611f0857611f086125c7565b040311611f495760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107a0565b611f5281611986565b60008381526002602052604090205414611f7e5760405162461bcd60e51b81526004016107a09061259f565b60008160a001516002811115611f9657611f9661251e565b14611fd55760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107a0565b60208101516001600160a01b031615610fae5760c08101516001600160a01b031661208757600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb9060440161160f565b6020810180516000909152611ddc82611986565b6000816060015163ffffffff166000036120b757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff16420310156120f357506003919050565b60006005836060015163ffffffff16420381612111576121116125c7565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612155576001925061215a565b600092505b50505b919050565b61216c8282610fb2565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526121b383826118a9565b63ffffffff4281166060830152431660808201526121d18382611a6b565b600160a0820152610ca4838261166e565b6001600160a01b03811681146121f757600080fd5b50565b803561215d816121e2565b803563ffffffff8116811461215d57600080fd5b80356003811061215d57600080fd5b600060e0828403121561223a57600080fd5b60405160e0810181811067ffffffffffffffff8211171561226b57634e487b7160e01b600052604160045260246000fd5b60405282358152905080612281602084016121fa565b602082015261229260408401612205565b60408201526122a360608401612205565b60608201526122b460808401612205565b60808201526122c560a08401612219565b60a08201526122d660c084016121fa565b60c08201525092915050565b60008061010083850312156122f657600080fd5b823591506123078460208501612228565b90509250929050565b6000806000610120848603121561232657600080fd5b833592506020840135915061233e8560408601612228565b90509250925092565b60006020828403121561235957600080fd5b5035919050565b6000806040838503121561237357600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461215d57600080fd5b60008083601f8401126123ac57600080fd5b50813567ffffffffffffffff8111156123c457600080fd5b6020830191508360208285010111156123dc57600080fd5b9250929050565b600080600080600080608087890312156123fc57600080fd5b863567ffffffffffffffff8082111561241457600080fd5b818901915089601f83011261242857600080fd5b81358181111561243757600080fd5b8a60208260051b850101111561244c57600080fd5b6020830198508097505061246260208a01612382565b955061247060408a016121fa565b9450606089013591508082111561248657600080fd5b5061249389828a0161239a565b979a9699509497509295939492505050565b6000808284036101008112156124ba57600080fd5b8335925060e0601f19820112156124d057600080fd5b506020830190509250929050565b600060e082840312156124f057600080fd5b6124fa8383612228565b9392505050565b60006020828403121561251357600080fd5b81356124fa816121e2565b634e487b7160e01b600052602160045260246000fd5b60208101600483106125485761254861251e565b91905290565b60006020828403121561256057600080fd5b815180151581146124fa57600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156125ef57600080fd5b5051919050565b60006020828403121561260857600080fd5b81516124fa816121e2565b60008261263057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156126af57600080fd5b6124fa82612219565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106127105761271061251e565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122018f7fb97cc06e2b7d4c5a2fa1b875c83f4019ff7829e45e77de46ca321593b0a64736f6c63430008120033", "devdoc": { "details": "Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).", "events": { @@ -1104,7 +1129,7 @@ "sequencerDelayLimitUpdateReceived(uint256)": { "details": "This event indicates the sequencer limit updated.", "params": { - "_newsequencerDelayLimit": "The new maxL2StateSyncDelay." + "_newSequencerDelayLimit": "The new sequencer delay limit." } } }, @@ -1140,17 +1165,19 @@ } }, "constructor": { - "details": "Constructor.", + "details": "Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value", "params": { "_amb": "The address of the AMB contract on Gnosis.", - "_challengePeriod": "The duration of the period allowing to challenge a claim.", "_deposit": "The deposit amount to submit a claim in wei.", "_epochPeriod": "The duration of each epoch.", + "_maxClaimDelayEpochs": "The maximum number of epochs that can be claimed in the past.", "_maxMissingBlocks": "The maximum number of blocks that can be missing in a challenge period.", - "_routerArbToGnosisDevnet": "The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado.", - "_routerChainId": "The chain id of the router contract.", - "_sequencerDelayLimit": "The maximum number of sequencer messages that can be submitted in a challenge period.", - "_timeoutEpochs": "The epochs before the bridge is considered shutdown." + "_minChallengePeriod": "The minimum time window to challenge a claim.", + "_routerArbToGnosis": "The address of the router on Ethereum that routes from Arbitrum to Gnosis.", + "_routerChainId": "The chain id of the routerArbToGnosis.", + "_sequencerDelayLimit": "The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.", + "_timeoutEpochs": "The epochs before the bridge is considered shutdown.", + "_weth": "The address of the WETH contract on Gnosis." } }, "devnetAdvanceState(uint256,bytes32)": { @@ -1206,7 +1233,7 @@ } }, "updateSequencerDelayLimit(uint256,uint256)": { - "details": "Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge", + "details": "Set the sequencerDelayLimit by receiving a message from the AMB.", "params": { "_newSequencerDelayLimit": "The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.", "_timestamp": "The timestamp of the message." @@ -1234,7 +1261,7 @@ } }, "withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { - "details": "Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.", + "details": "Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.", "params": { "_claim": "The claim associated with the epoch.", "_epoch": "The epoch associated with the claim deposit to withraw." @@ -1262,7 +1289,7 @@ "storageLayout": { "storage": [ { - "astId": 401, + "astId": 2593, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "stateRoot", "offset": 0, @@ -1270,7 +1297,7 @@ "type": "t_bytes32" }, { - "astId": 403, + "astId": 2595, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "latestVerifiedEpoch", "offset": 0, @@ -1278,7 +1305,7 @@ "type": "t_uint256" }, { - "astId": 407, + "astId": 2599, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "claimHashes", "offset": 0, @@ -1286,7 +1313,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 411, + "astId": 2603, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "relayed", "offset": 0, @@ -1294,7 +1321,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 413, + "astId": 2605, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "sequencerDelayLimit", "offset": 0, @@ -1302,7 +1329,7 @@ "type": "t_uint256" }, { - "astId": 415, + "astId": 2607, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "timestampDelayUpdated", "offset": 0, @@ -1310,7 +1337,7 @@ "type": "t_uint256" }, { - "astId": 1834, + "astId": 6994, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "devnetOperator", "offset": 0, diff --git a/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json b/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json index c900953d..8b610253 100644 --- a/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json +++ b/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0xb61BEB66796Bbf59BBa3e5feE4Bab2304B889590", + "address": "0x0E459f63db78E2d5E8DC16a717F30A3d24cb79c2", "abi": [ { "inputs": [ @@ -47,6 +47,16 @@ "internalType": "uint256", "name": "_routerChainId", "type": "uint256" + }, + { + "internalType": "contract IWETH", + "name": "_weth", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxClaimDelayEpochs", + "type": "uint256" } ], "stateMutability": "nonpayable", @@ -135,7 +145,7 @@ { "indexed": false, "internalType": "uint256", - "name": "_newsequencerDelayLimit", + "name": "_newSequencerDelayLimit", "type": "uint256" } ], @@ -281,7 +291,7 @@ ], "name": "claim", "outputs": [], - "stateMutability": "payable", + "stateMutability": "nonpayable", "type": "function" }, { @@ -430,6 +440,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "maxClaimDelayEpochs", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "maxMissingBlocks", @@ -548,19 +571,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "routerChainId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -769,6 +779,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "weth", + "outputs": [ + { + "internalType": "contract IWETH", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -990,38 +1013,40 @@ "type": "function" } ], - "transactionHash": "0xc72f29f288a9416393c3b615503aaf94e0de8b2d93da779606000314148107ea", + "transactionHash": "0xca2595eacb679b6a7de49b1dec749a34272a2eac4424381a7cfb5f827778b371", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xb61BEB66796Bbf59BBa3e5feE4Bab2304B889590", - "transactionIndex": 2, - "gasUsed": "2152128", + "contractAddress": "0x0E459f63db78E2d5E8DC16a717F30A3d24cb79c2", + "transactionIndex": 0, + "gasUsed": "2369491", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x4a0f9b104a2ad838380817f2d7084500a797ff53cef68254414da1bc113be7c4", - "transactionHash": "0xc72f29f288a9416393c3b615503aaf94e0de8b2d93da779606000314148107ea", + "blockHash": "0xdfef23a75a6371610e5826865409b8c12e4f0660d1ac9de6add617299d25e0f2", + "transactionHash": "0xca2595eacb679b6a7de49b1dec749a34272a2eac4424381a7cfb5f827778b371", "logs": [], - "blockNumber": 4488129, - "cumulativeGasUsed": "2208472", + "blockNumber": 4696221, + "cumulativeGasUsed": "2369491", "status": 1, "byzantium": true }, "args": [ - "1000000000000000000", - 3600, + "200000000000000000", + 7200, 10800, 1000000, "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0xF04354D2286C8Db33aE6F454728C2F935ae5CD82", + "0x931FA807020231bCE1340Be8E1e5054207BbAFEd", 86400, 1000000, - 5 + 5, + "0x8d74e5e4DA11629537C4575cB0f33b4F0Dfa42EB", + 3 ], - "numDeployments": 6, - "solcInputHash": "26a65a18c178d77477789f8130b0944b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":\"VeaOutboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x5e9eaf576f7ebe3aca5fa0c442c96bd201999d5e3b27ec731572fe927b6d84a0\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101c06040523480156200001257600080fd5b5060405162002873380380620028738339810160408190526200003591620000ea565b60c08990526101408890526101808690526101608790526001600160a01b03808616608052841660a0526101a082905261012081905260048390556200007d60028a62000183565b60e08190526200008f8a6002620001a6565b6200009b9190620001c6565b6101005261014051600190620000b2904262000183565b620000be9190620001c6565b60015550620001dc975050505050505050565b6001600160a01b0381168114620000e757600080fd5b50565b60008060008060008060008060006101208a8c0312156200010a57600080fd5b8951985060208a0151975060408a0151965060608a0151955060808a01516200013381620000d1565b60a08b01519095506200014681620000d1565b8094505060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001a157634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001c057620001c06200016d565b92915050565b81810381811115620001c057620001c06200016d565b60805160a05160c05160e05161010051610120516101405161016051610180516101a05161252d62000346600039600081816104650152611f7b0152600081816104990152818161084e0152818161193a01528181611b2e0152611d3a0152600081816105210152611f0f0152600081816104cd0152818161087201528181610c0301528181610f7501528181610ffd01528181611701015281816118bb0152818161195e01528181611b520152611d5e0152600081816103ce015281816109e90152610d1c015260006115180152600081816114c5015261162a0152600081816105550152818161064e015281816107d50152818161080201528181610f050152818161168d01528181611c9801528181611cff0152611ea501526000818161058901528181610ad60152610e0901526000818161020e015281816108ed0152818161096701528181610a4b01528181610c3801528181610c9a0152610d7e015261252d6000f3fe6080604052600436106101c25760003560e01c80637ffc2a6e116100f7578063b5b7a18411610095578063d5e6a9df11610064578063d5e6a9df14610577578063da2b7bc4146105ab578063df19e6ff146105cb578063e813a755146105f857600080fd5b8063b5b7a184146104bb578063b633b944146104ef578063c2114a161461050f578063d0e30db01461054357600080fd5b8063930f28af116100d1578063930f28af1461041d5780639588eca21461043d578063aa22a1c614610453578063b044397e1461048757600080fd5b80637ffc2a6e146103a65780638d96fdea146103bc57806390df63b7146103f057600080fd5b806331d14457116101645780634788cb381161013e5780634788cb381461032657806349b4299e146103465780634a439cfe14610366578063541adcca1461038657600080fd5b806331d14457146102d357806331ddf743146102e65780633ce43cfd1461030657600080fd5b8063222ae786116101a0578063222ae7861461024d5780632639c0601461027057806327ee6bdd1461029d5780632c192519146102b357600080fd5b806301139b68146101c75780630f0adca5146101dc5780631062b39a146101fc575b600080fd5b6101da6101d53660046120b8565b61060e565b005b3480156101e857600080fd5b506101da6101f73660046120e6565b61084c565b34801561020857600080fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561025957600080fd5b50610262610bfc565b604051908152602001610244565b34801561027c57600080fd5b5061026261028b36600461211d565b60026020526000908152604090205481565b3480156102a957600080fd5b5061026260015481565b3480156102bf57600080fd5b506101da6102ce366004612136565b610c2d565b6101da6102e1366004612136565b610f03565b3480156102f257600080fd5b506101da6103013660046121b9565b61116e565b34801561031257600080fd5b506101da61032136600461227b565b61140e565b34801561033257600080fd5b506101da61034136600461227b565b611555565b34801561035257600080fd5b506101da6103613660046120b8565b6116ca565b34801561037257600080fd5b5061026261038136600461211d565b6118b4565b34801561039257600080fd5b506102626103a13660046122b4565b6118e6565b3480156103b257600080fd5b5061026260055481565b3480156103c857600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b3480156103fc57600080fd5b5061026261040b36600461211d565b60036020526000908152604090205481565b34801561042957600080fd5b506101da6104383660046120b8565b611938565b34801561044957600080fd5b5061026260005481565b34801561045f57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561049357600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c757600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b3480156104fb57600080fd5b506101da61050a3660046120b8565b611b2c565b34801561051b57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561054f57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561058357600080fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b3480156105b757600080fd5b506101da6105c63660046120b8565b611d38565b3480156105d757600080fd5b506105eb6105e63660046122b4565b611ef1565b60405161024491906122ed565b34801561060457600080fd5b5061026260045481565b610617816118e6565b6000838152600260205260409020541461064c5760405162461bcd60e51b815260040161064390612307565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106bc5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610643565b60c08101516001600160a01b0316156107175760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610643565b60008160a00151600281111561072f5761072f6122d7565b1461077c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610643565b3360c082015261078b816118e6565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108485760006108277f000000000000000000000000000000000000000000000000000000000000000034612345565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161089f5761089f612358565b040311156108e25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610643565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109655760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610643565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e7919061236e565b7f000000000000000000000000000000000000000000000000000000000000000014610a495760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610643565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612387565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b3e5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610643565b60015483118015610b4e57508115155b15610b9157600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b9a816118e6565b60008481526002602052604090205403610bf7578051829003610bc357600160a0820152610bde565b60c08101516001600160a01b031615610bde57600260a08201525b610be7816118e6565b6000848152600260205260409020555b505050565b6000610c287f0000000000000000000000000000000000000000000000000000000000000000426123a4565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c985760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610643565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cf6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1a919061236e565b7f000000000000000000000000000000000000000000000000000000000000000014610d7c5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610643565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfe9190612387565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610e715760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610643565b8060055410610eb95760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b6044820152606401610643565b816004541461084857600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15050565b7f0000000000000000000000000000000000000000000000000000000000000000341015610f735760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610643565b7f00000000000000000000000000000000000000000000000000000000000000004281610fa257610fa2612358565b048210610ff15760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610643565b600454421115611075577f000000000000000000000000000000000000000000000000000000000000000060045442038161102e5761102e612358565b048260010110156110755760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610643565b806110925760405162461bcd60e51b815260040161064390612307565b600082815260026020526040902054156110e45760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610643565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261112a906118e6565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107cb565b604085106111b05760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610643565b6000848484846040516020016111c994939291906123c6565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561124957600088888381811061120b5761120b612408565b9050602002013590508281111561123057826000528060205260406000209250611240565b8060005282602052604060002092505b506001016111ef565b50806000541461128c5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610643565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156113015760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610643565b6000838152600360205260408082206001851b84179055516001600160a01b03891690611331908990899061241e565b6000604051808303816000865af19150503d806000811461136e576040519150601f19603f3d011682016040523d82523d6000602084013e611373565b606091505b50509050806113c45760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610643565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6114206103a1368390038301836122b4565b6000838152600260205260409020541461144c5760405162461bcd60e51b815260040161064390612307565b600261145e60c0830160a0840161242e565b600281111561146f5761146f6122d7565b146114b05760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610643565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061150a93505060e0840191505060c08301612449565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6115676103a1368390038301836122b4565b600083815260026020526040902054146115935760405162461bcd60e51b815260040161064390612307565b60016115a560c0830160a0840161242e565b60028111156115b6576115b66122d7565b146115f35760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610643565b600082815260026020526040812081905561161460e0830160c08401612449565b6001600160a01b03161461166f576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061150a9350506040840191505060208301612449565b61167f6040820160208301612449565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6116d3816118e6565b600083815260026020526040902054146116ff5760405162461bcd60e51b815260040161064390612307565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166117389190612466565b6117429190612466565b4210156117a65760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610643565b60006117b182611ef1565b905060028160038111156117c7576117c76122d7565b14806117e4575060008160038111156117e2576117e26122d7565b145b61184d5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610643565b63ffffffff42811660608401524316608083015261186a826118e6565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006118e07f0000000000000000000000000000000000000000000000000000000000000000836123a4565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861191b989097969101612479565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161198b5761198b612358565b040311156119ce5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610643565b6119d7816118e6565b60008381526002602052604090205414611a035760405162461bcd60e51b815260040161064390612307565b60c08101516001600160a01b031615611a555760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610643565b6001611a6082611ef1565b6003811115611a7157611a716122d7565b14611abe5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610643565b600154821115611b0657600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b16816118e6565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b7f57611b7f612358565b040311611bc05760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610643565b611bc9816118e6565b60008381526002602052604090205414611bf55760405162461bcd60e51b815260040161064390612307565b60008160a001516002811115611c0d57611c0d6122d7565b14611c4c5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610643565b60c08101516001600160a01b0316156108485760208101516001600160a01b0316611cd05760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611ce4826118e6565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d8b57611d8b612358565b040311611dcc5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610643565b611dd5816118e6565b60008381526002602052604090205414611e015760405162461bcd60e51b815260040161064390612307565b60008160a001516002811115611e1957611e196122d7565b14611e585760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610643565b60208101516001600160a01b0316156108485760c08101516001600160a01b0316611edd5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611ce4826118e6565b6000816060015163ffffffff16600003611f0d57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f4957506003919050565b60006005836060015163ffffffff16420381611f6757611f67612358565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611fab5760019250611fb0565b600092505b50505b919050565b6001600160a01b0381168114611fcd57600080fd5b50565b8035611fb381611fb8565b803563ffffffff81168114611fb357600080fd5b803560038110611fb357600080fd5b600060e0828403121561201057600080fd5b60405160e0810181811067ffffffffffffffff8211171561204157634e487b7160e01b600052604160045260246000fd5b6040528235815290508061205760208401611fd0565b602082015261206860408401611fdb565b604082015261207960608401611fdb565b606082015261208a60808401611fdb565b608082015261209b60a08401611fef565b60a08201526120ac60c08401611fd0565b60c08201525092915050565b60008061010083850312156120cc57600080fd5b823591506120dd8460208501611ffe565b90509250929050565b600080600061012084860312156120fc57600080fd5b83359250602084013591506121148560408601611ffe565b90509250925092565b60006020828403121561212f57600080fd5b5035919050565b6000806040838503121561214957600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611fb357600080fd5b60008083601f84011261218257600080fd5b50813567ffffffffffffffff81111561219a57600080fd5b6020830191508360208285010111156121b257600080fd5b9250929050565b600080600080600080608087890312156121d257600080fd5b863567ffffffffffffffff808211156121ea57600080fd5b818901915089601f8301126121fe57600080fd5b81358181111561220d57600080fd5b8a60208260051b850101111561222257600080fd5b6020830198508097505061223860208a01612158565b955061224660408a01611fd0565b9450606089013591508082111561225c57600080fd5b5061226989828a01612170565b979a9699509497509295939492505050565b60008082840361010081121561229057600080fd5b8335925060e0601f19820112156122a657600080fd5b506020830190509250929050565b600060e082840312156122c657600080fd5b6122d08383611ffe565b9392505050565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612301576123016122d7565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156118e0576118e061232f565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561238057600080fd5b5051919050565b60006020828403121561239957600080fd5b81516122d081611fb8565b6000826123c157634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561244057600080fd5b6122d082611fef565b60006020828403121561245b57600080fd5b81356122d081611fb8565b808201808211156118e0576118e061232f565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124d1576124d16122d7565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220ee7ca9cb524c4095445fa31d263819f589b328cdbaa5041b2012ecd77747f56f64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101c25760003560e01c80637ffc2a6e116100f7578063b5b7a18411610095578063d5e6a9df11610064578063d5e6a9df14610577578063da2b7bc4146105ab578063df19e6ff146105cb578063e813a755146105f857600080fd5b8063b5b7a184146104bb578063b633b944146104ef578063c2114a161461050f578063d0e30db01461054357600080fd5b8063930f28af116100d1578063930f28af1461041d5780639588eca21461043d578063aa22a1c614610453578063b044397e1461048757600080fd5b80637ffc2a6e146103a65780638d96fdea146103bc57806390df63b7146103f057600080fd5b806331d14457116101645780634788cb381161013e5780634788cb381461032657806349b4299e146103465780634a439cfe14610366578063541adcca1461038657600080fd5b806331d14457146102d357806331ddf743146102e65780633ce43cfd1461030657600080fd5b8063222ae786116101a0578063222ae7861461024d5780632639c0601461027057806327ee6bdd1461029d5780632c192519146102b357600080fd5b806301139b68146101c75780630f0adca5146101dc5780631062b39a146101fc575b600080fd5b6101da6101d53660046120b8565b61060e565b005b3480156101e857600080fd5b506101da6101f73660046120e6565b61084c565b34801561020857600080fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561025957600080fd5b50610262610bfc565b604051908152602001610244565b34801561027c57600080fd5b5061026261028b36600461211d565b60026020526000908152604090205481565b3480156102a957600080fd5b5061026260015481565b3480156102bf57600080fd5b506101da6102ce366004612136565b610c2d565b6101da6102e1366004612136565b610f03565b3480156102f257600080fd5b506101da6103013660046121b9565b61116e565b34801561031257600080fd5b506101da61032136600461227b565b61140e565b34801561033257600080fd5b506101da61034136600461227b565b611555565b34801561035257600080fd5b506101da6103613660046120b8565b6116ca565b34801561037257600080fd5b5061026261038136600461211d565b6118b4565b34801561039257600080fd5b506102626103a13660046122b4565b6118e6565b3480156103b257600080fd5b5061026260055481565b3480156103c857600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b3480156103fc57600080fd5b5061026261040b36600461211d565b60036020526000908152604090205481565b34801561042957600080fd5b506101da6104383660046120b8565b611938565b34801561044957600080fd5b5061026260005481565b34801561045f57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561049357600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c757600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b3480156104fb57600080fd5b506101da61050a3660046120b8565b611b2c565b34801561051b57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561054f57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561058357600080fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b3480156105b757600080fd5b506101da6105c63660046120b8565b611d38565b3480156105d757600080fd5b506105eb6105e63660046122b4565b611ef1565b60405161024491906122ed565b34801561060457600080fd5b5061026260045481565b610617816118e6565b6000838152600260205260409020541461064c5760405162461bcd60e51b815260040161064390612307565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106bc5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610643565b60c08101516001600160a01b0316156107175760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610643565b60008160a00151600281111561072f5761072f6122d7565b1461077c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610643565b3360c082015261078b816118e6565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108485760006108277f000000000000000000000000000000000000000000000000000000000000000034612345565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161089f5761089f612358565b040311156108e25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610643565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109655760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610643565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e7919061236e565b7f000000000000000000000000000000000000000000000000000000000000000014610a495760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610643565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612387565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b3e5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610643565b60015483118015610b4e57508115155b15610b9157600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b9a816118e6565b60008481526002602052604090205403610bf7578051829003610bc357600160a0820152610bde565b60c08101516001600160a01b031615610bde57600260a08201525b610be7816118e6565b6000848152600260205260409020555b505050565b6000610c287f0000000000000000000000000000000000000000000000000000000000000000426123a4565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c985760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610643565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cf6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1a919061236e565b7f000000000000000000000000000000000000000000000000000000000000000014610d7c5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610643565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfe9190612387565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610e715760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610643565b8060055410610eb95760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b6044820152606401610643565b816004541461084857600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15050565b7f0000000000000000000000000000000000000000000000000000000000000000341015610f735760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610643565b7f00000000000000000000000000000000000000000000000000000000000000004281610fa257610fa2612358565b048210610ff15760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610643565b600454421115611075577f000000000000000000000000000000000000000000000000000000000000000060045442038161102e5761102e612358565b048260010110156110755760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610643565b806110925760405162461bcd60e51b815260040161064390612307565b600082815260026020526040902054156110e45760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610643565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261112a906118e6565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107cb565b604085106111b05760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610643565b6000848484846040516020016111c994939291906123c6565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561124957600088888381811061120b5761120b612408565b9050602002013590508281111561123057826000528060205260406000209250611240565b8060005282602052604060002092505b506001016111ef565b50806000541461128c5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610643565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156113015760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610643565b6000838152600360205260408082206001851b84179055516001600160a01b03891690611331908990899061241e565b6000604051808303816000865af19150503d806000811461136e576040519150601f19603f3d011682016040523d82523d6000602084013e611373565b606091505b50509050806113c45760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610643565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6114206103a1368390038301836122b4565b6000838152600260205260409020541461144c5760405162461bcd60e51b815260040161064390612307565b600261145e60c0830160a0840161242e565b600281111561146f5761146f6122d7565b146114b05760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610643565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061150a93505060e0840191505060c08301612449565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6115676103a1368390038301836122b4565b600083815260026020526040902054146115935760405162461bcd60e51b815260040161064390612307565b60016115a560c0830160a0840161242e565b60028111156115b6576115b66122d7565b146115f35760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610643565b600082815260026020526040812081905561161460e0830160c08401612449565b6001600160a01b03161461166f576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061150a9350506040840191505060208301612449565b61167f6040820160208301612449565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6116d3816118e6565b600083815260026020526040902054146116ff5760405162461bcd60e51b815260040161064390612307565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166117389190612466565b6117429190612466565b4210156117a65760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610643565b60006117b182611ef1565b905060028160038111156117c7576117c76122d7565b14806117e4575060008160038111156117e2576117e26122d7565b145b61184d5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610643565b63ffffffff42811660608401524316608083015261186a826118e6565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006118e07f0000000000000000000000000000000000000000000000000000000000000000836123a4565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861191b989097969101612479565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161198b5761198b612358565b040311156119ce5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610643565b6119d7816118e6565b60008381526002602052604090205414611a035760405162461bcd60e51b815260040161064390612307565b60c08101516001600160a01b031615611a555760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610643565b6001611a6082611ef1565b6003811115611a7157611a716122d7565b14611abe5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610643565b600154821115611b0657600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b16816118e6565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b7f57611b7f612358565b040311611bc05760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610643565b611bc9816118e6565b60008381526002602052604090205414611bf55760405162461bcd60e51b815260040161064390612307565b60008160a001516002811115611c0d57611c0d6122d7565b14611c4c5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610643565b60c08101516001600160a01b0316156108485760208101516001600160a01b0316611cd05760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611ce4826118e6565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d8b57611d8b612358565b040311611dcc5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610643565b611dd5816118e6565b60008381526002602052604090205414611e015760405162461bcd60e51b815260040161064390612307565b60008160a001516002811115611e1957611e196122d7565b14611e585760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610643565b60208101516001600160a01b0316156108485760c08101516001600160a01b0316611edd5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611ce4826118e6565b6000816060015163ffffffff16600003611f0d57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f4957506003919050565b60006005836060015163ffffffff16420381611f6757611f67612358565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611fab5760019250611fb0565b600092505b50505b919050565b6001600160a01b0381168114611fcd57600080fd5b50565b8035611fb381611fb8565b803563ffffffff81168114611fb357600080fd5b803560038110611fb357600080fd5b600060e0828403121561201057600080fd5b60405160e0810181811067ffffffffffffffff8211171561204157634e487b7160e01b600052604160045260246000fd5b6040528235815290508061205760208401611fd0565b602082015261206860408401611fdb565b604082015261207960608401611fdb565b606082015261208a60808401611fdb565b608082015261209b60a08401611fef565b60a08201526120ac60c08401611fd0565b60c08201525092915050565b60008061010083850312156120cc57600080fd5b823591506120dd8460208501611ffe565b90509250929050565b600080600061012084860312156120fc57600080fd5b83359250602084013591506121148560408601611ffe565b90509250925092565b60006020828403121561212f57600080fd5b5035919050565b6000806040838503121561214957600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611fb357600080fd5b60008083601f84011261218257600080fd5b50813567ffffffffffffffff81111561219a57600080fd5b6020830191508360208285010111156121b257600080fd5b9250929050565b600080600080600080608087890312156121d257600080fd5b863567ffffffffffffffff808211156121ea57600080fd5b818901915089601f8301126121fe57600080fd5b81358181111561220d57600080fd5b8a60208260051b850101111561222257600080fd5b6020830198508097505061223860208a01612158565b955061224660408a01611fd0565b9450606089013591508082111561225c57600080fd5b5061226989828a01612170565b979a9699509497509295939492505050565b60008082840361010081121561229057600080fd5b8335925060e0601f19820112156122a657600080fd5b506020830190509250929050565b600060e082840312156122c657600080fd5b6122d08383611ffe565b9392505050565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612301576123016122d7565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156118e0576118e061232f565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561238057600080fd5b5051919050565b60006020828403121561239957600080fd5b81516122d081611fb8565b6000826123c157634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561244057600080fd5b6122d082611fef565b60006020828403121561245b57600080fd5b81356122d081611fb8565b808201808211156118e0576118e061232f565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124d1576124d16122d7565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220ee7ca9cb524c4095445fa31d263819f589b328cdbaa5041b2012ecd77747f56f64736f6c63430008120033", + "numDeployments": 1, + "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IWETH\",\"name\":\"_weth\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxClaimDelayEpochs\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxClaimDelayEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxClaimDelayEpochs\":\"The maximum number of epochs that can be claimed in the past.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_weth\":\"The address of the WETH contract on Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by receiving a message from the AMB.\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":\"VeaOutboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/tokens/gnosis/IWETH.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n IWETH public immutable weth; // The address of the WETH contract on Gnosis.\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 internal immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable maxClaimDelayEpochs; // The maximum number of epochs that can be claimed in the past.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth,\\n uint256 _maxClaimDelayEpochs\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n weth = _weth;\\n maxClaimDelayEpochs = _maxClaimDelayEpochs;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerDelayLimit by receiving a message from the AMB.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n // If _newSequencerDelayLimit > timeout * epochPeriod, then the bridge will shutdown.\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external virtual {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n // If the sequencerDelayLimit is set larger than block.timestamp - epochPeriod by arbitrum governance, \\n // the checked arithmetic will revert due to underflow and the bridge will shutdown.\\n uint256 minEpochSequencerDelay = (block.timestamp - sequencerDelayLimit) / epochPeriod - 1;\\n\\n uint256 minEpochClaim;\\n \\n unchecked{\\n // deployer sets maxClaimDelayEpochs so no underflow is possible\\n minEpochClaim = block.timestamp / epochPeriod - maxClaimDelayEpochs;\\n }\\n\\n uint256 minClaimableEpoch = minEpochSequencerDelay > minEpochClaim ? minEpochSequencerDelay : minEpochClaim;\\n \\n require(_epoch >= minClaimableEpoch, \\\"Invalid epoch.\\\");\\n\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.challenger, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x920fcd2e271fd8871f3ca84c160e7e799f4e80da241acbec81b12789d2330c68\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/tokens/gnosis/IWETH.sol\":{\"content\":\"// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5daaf60d11ee2075260d0f3adfb22b1c536db983/contracts/token/ERC20/BurnableToken.sol\\n// implementation: https://gnosisscan.io/address/0xf8d1677c8a0c961938bf2f9adc3f3cfda759a9d9#code\\n// proxy: https://gnosisscan.io/token/0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1#readProxyContract\\n\\n/**\\n * @title Burnable Token\\n * @dev Token that can be irreversibly burned (destroyed).\\n */\\ninterface IWETH {\\n \\n event Transfer(address indexed from, address indexed to, uint256 value);\\n event Burn(address indexed burner, uint256 value);\\n\\n /**\\n * @dev Burns a specific amount of tokens.\\n * @param _value The amount of token to be burned.\\n */\\n function burn(uint256 _value) external;\\n\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Transfer tokens from one address to another\\n * @param _from address The address which you want to send tokens from\\n * @param _to address The address which you want to transfer to\\n * @param _value uint256 the amount of tokens to be transferred\\n */\\n function transferFrom(\\n address _from,\\n address _to,\\n uint256 _value\\n ) external returns (bool);\\n}\",\"keccak256\":\"0x0f616e96c8713b9eecd9ded1aac026c64398e9a3633bd8273e6ac7bd8f800f7d\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6102006040523480156200001257600080fd5b5060405162002cee38038062002cee8339810160408190526200003591620000f9565b60e08b90526101608a90526101c08890526101808990526001600160a01b0380881660805286811660a05260048690556101e0859052610140849052821660c0526101a08190526200008960028c620001b5565b6101008190526200009c8c6002620001d8565b620000a89190620001f8565b6101205261016051600190620000bf9042620001b5565b620000cb9190620001f8565b600155506200020e9950505050505050505050565b6001600160a01b0381168114620000f657600080fd5b50565b60008060008060008060008060008060006101608c8e0312156200011c57600080fd5b8b519a5060208c0151995060408c0151985060608c0151975060808c01516200014581620000e0565b60a08d01519097506200015881620000e0565b8096505060c08c0151945060e08c015193506101008c015192506101208c01516200018381620000e0565b809250506101408c015190509295989b509295989b9093969950565b634e487b7160e01b600052601160045260246000fd5b600082620001d357634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001f257620001f26200019f565b92915050565b81810381811115620001f257620001f26200019f565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e051612921620003cd600039600081816104b1015261231e0152600081816104e50152818161088601528181611bfd01528181611df101526120b00152600081816101f901526110d301526000818161056d01526122b2015260008181610519015281816108aa01528181610c3b015281816110130152818161108c015281816110f4015281816119c501528181611b7e01528181611c2101528181611e1501526120d4015260008181610a210152610d54015260006116cf0152600081816115de01526118320152600081816105a10152818161067501528181610f570152818161196201528181611f6a01528181611fff01526122290152600081816103840152818161069b01528181610f7d015281816116040152818161167001528181611858015281816118c40152818161190701528181611f9001528181612025015261224f0152600081816105d501528181610b0e0152610e41015260008181610260015281816109250152818161099f01528181610a8301528181610c7001528181610cd20152610db601526129216000f3fe6080604052600436106101cd5760003560e01c8063541adcca116100f7578063b5b7a18411610095578063d5e6a9df11610064578063d5e6a9df146105c3578063da2b7bc4146105f7578063df19e6ff14610617578063e813a7551461064457600080fd5b8063b5b7a18414610507578063b633b9441461053b578063c2114a161461055b578063d0e30db01461058f57600080fd5b8063930f28af116100d1578063930f28af146104695780639588eca214610489578063aa22a1c61461049f578063b044397e146104d357600080fd5b8063541adcca146104065780637ffc2a6e1461042657806390df63b71461043c57600080fd5b80632c1925191161016f5780633fc8cef31161013e5780633fc8cef3146103725780634788cb38146103a657806349b4299e146103c65780634a439cfe146103e657600080fd5b80632c192519146102f257806331d144571461031257806331ddf743146103325780633ce43cfd1461035257600080fd5b80631062b39a116101ab5780631062b39a1461024e578063222ae7861461029a5780632639c060146102af57806327ee6bdd146102dc57600080fd5b806301139b68146101d2578063042c4aaf146101e75780630f0adca51461022e575b600080fd5b6101e56101e036600461245b565b61065a565b005b3480156101f357600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561023a57600080fd5b506101e5610249366004612489565b610884565b34801561025a57600080fd5b506102827f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610225565b3480156102a657600080fd5b5061021b610c34565b3480156102bb57600080fd5b5061021b6102ca3660046124c0565b60026020526000908152604090205481565b3480156102e857600080fd5b5061021b60015481565b3480156102fe57600080fd5b506101e561030d3660046124d9565b610c65565b34801561031e57600080fd5b506101e561032d3660046124d9565b610f3c565b34801561033e57600080fd5b506101e561034d36600461255c565b61127c565b34801561035e57600080fd5b506101e561036d36600461261e565b61151c565b34801561037e57600080fd5b506102827f000000000000000000000000000000000000000000000000000000000000000081565b3480156103b257600080fd5b506101e56103c136600461261e565b611756565b3480156103d257600080fd5b506101e56103e136600461245b565b61198e565b3480156103f257600080fd5b5061021b6104013660046124c0565b611b77565b34801561041257600080fd5b5061021b610421366004612657565b611ba9565b34801561043257600080fd5b5061021b60055481565b34801561044857600080fd5b5061021b6104573660046124c0565b60036020526000908152604090205481565b34801561047557600080fd5b506101e561048436600461245b565b611bfb565b34801561049557600080fd5b5061021b60005481565b3480156104ab57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104df57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561051357600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054757600080fd5b506101e561055636600461245b565b611def565b34801561056757600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561059b57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105cf57600080fd5b506102827f000000000000000000000000000000000000000000000000000000000000000081565b34801561060357600080fd5b506101e561061236600461245b565b6120ae565b34801561062357600080fd5b50610637610632366004612657565b612294565b6040516102259190612690565b34801561065057600080fd5b5061021b60045481565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156106ec573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071091906126aa565b6107355760405162461bcd60e51b815260040161072c906126cc565b60405180910390fd5b61073e81611ba9565b6000838152600260205260409020541461076a5760405162461bcd60e51b815260040161072c906126fb565b60c08101516001600160a01b0316156107c55760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161072c565b60008160a0015160028111156107dd576107dd61267a565b1461082a5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e000000000000000000604482015260640161072c565b3360c082015261083981611ba9565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816108d7576108d7612723565b0403111561091a5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161072c565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461099d5760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b606482015260840161072c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109fb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1f9190612739565b7f000000000000000000000000000000000000000000000000000000000000000014610a815760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161072c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610adf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b039190612752565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b765760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161072c565b60015483118015610b8657508115155b15610bc957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610bd281611ba9565b60008481526002602052604090205403610c2f578051829003610bfb57600160a0820152610c16565b60c08101516001600160a01b031615610c1657600260a08201525b610c1f81611ba9565b6000848152600260205260409020555b505050565b6000610c607f000000000000000000000000000000000000000000000000000000000000000042612785565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cd05760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b604482015260640161072c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d529190612739565b7f000000000000000000000000000000000000000000000000000000000000000014610db45760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161072c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e369190612752565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610ea95760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161072c565b8060055410610ef15760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161072c565b8160045414610f3857600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b5050565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610fce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff291906126aa565b61100e5760405162461bcd60e51b815260040161072c906126cc565b6110387f000000000000000000000000000000000000000000000000000000000000000042612785565b82106110865760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e00000000000000604482015260640161072c565b600060017f0000000000000000000000000000000000000000000000000000000000000000600454426110b991906127a7565b6110c39190612785565b6110cd91906127a7565b905060007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000428161112157611121612723565b0403905060008183116111345781611136565b825b9050808510156111795760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21032b837b1b41760911b604482015260640161072c565b836111965760405162461bcd60e51b815260040161072c906126fb565b600085815260026020526040902054156111e85760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161072c565b6040805160e0810182528581523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261122e90611ba9565b600086815260026020908152604091829020929092555185815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050505050565b604085106112be5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161072c565b6000848484846040516020016112d794939291906127ba565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015611357576000888883818110611319576113196127fc565b9050602002013590508281111561133e5782600052806020526040600020925061134e565b8060005282602052604060002092505b506001016112fd565b50806000541461139a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161072c565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561140f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161072c565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061143f9089908990612812565b6000604051808303816000865af19150503d806000811461147c576040519150601f19603f3d011682016040523d82523d6000602084013e611481565b606091505b50509050806114d25760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161072c565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61152e61042136839003830183612657565b6000838152600260205260409020541461155a5760405162461bcd60e51b815260040161072c906126fb565b600261156c60c0830160a08401612822565b600281111561157d5761157d61267a565b146115be5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b604482015260640161072c565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561165057600080fd5b505af1158015611664573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb90506116a960e0840160c0850161283d565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af1158015611716573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173a91906126aa565b610f385760405162461bcd60e51b815260040161072c906126cc565b61176861042136839003830183612657565b600083815260026020526040902054146117945760405162461bcd60e51b815260040161072c906126fb565b60016117a660c0830160a08401612822565b60028111156117b7576117b761267a565b146117f45760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b604482015260640161072c565b600082815260026020526040812081905561181560e0830160c0840161283d565b6001600160a01b0316146118fd57604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b1580156118a457600080fd5b505af11580156118b8573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb90506116a9604084016020850161283d565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb61193c604084016020850161283d565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044016116f7565b61199781611ba9565b600083815260026020526040902054146119c35760405162461bcd60e51b815260040161072c906126fb565b7f00000000000000000000000000000000000000000000000000000000000000006004546119f1919061285a565b6040820151611a069063ffffffff16426127a7565b1015611a695760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b606482015260840161072c565b6000611a7482612294565b90506002816003811115611a8a57611a8a61267a565b1480611aa757506000816003811115611aa557611aa561267a565b145b611b105760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b606482015260840161072c565b63ffffffff428116606084015243166080830152611b2d82611ba9565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b6000611ba37f000000000000000000000000000000000000000000000000000000000000000083612785565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611bde98909796910161286d565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c4e57611c4e612723565b04031115611c915760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161072c565b611c9a81611ba9565b60008381526002602052604090205414611cc65760405162461bcd60e51b815260040161072c906126fb565b60c08101516001600160a01b031615611d185760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161072c565b6001611d2382612294565b6003811115611d3457611d3461267a565b14611d815760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e0000000000604482015260640161072c565b600154821115611dc957600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611dd981611ba9565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611e4257611e42612723565b040311611e835760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161072c565b611e8c81611ba9565b60008381526002602052604090205414611eb85760405162461bcd60e51b815260040161072c906126fb565b60008160a001516002811115611ed057611ed061267a565b14611f0f5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161072c565b60c08101516001600160a01b031615610f385760208101516001600160a01b0316611fc1576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116f7565b60c0810180516000909152611fd582611ba9565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af115801561206e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061209291906126aa565b610c2f5760405162461bcd60e51b815260040161072c906126cc565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161210157612101612723565b0403116121425760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161072c565b61214b81611ba9565b600083815260026020526040902054146121775760405162461bcd60e51b815260040161072c906126fb565b60008160a00151600281111561218f5761218f61267a565b146121ce5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161072c565b60208101516001600160a01b031615610f385760c08101516001600160a01b031661228057600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116f7565b6020810180516000909152611fd582611ba9565b6000816060015163ffffffff166000036122b057506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff16420310156122ec57506003919050565b60006005836060015163ffffffff1642038161230a5761230a612723565b608085015163ffffffff16919004019050437f00000000000000000000000000000000000000000000000000000000000000008183031161234e5760019250612353565b600092505b50505b919050565b6001600160a01b038116811461237057600080fd5b50565b80356123568161235b565b803563ffffffff8116811461235657600080fd5b80356003811061235657600080fd5b600060e082840312156123b357600080fd5b60405160e0810181811067ffffffffffffffff821117156123e457634e487b7160e01b600052604160045260246000fd5b604052823581529050806123fa60208401612373565b602082015261240b6040840161237e565b604082015261241c6060840161237e565b606082015261242d6080840161237e565b608082015261243e60a08401612392565b60a082015261244f60c08401612373565b60c08201525092915050565b600080610100838503121561246f57600080fd5b8235915061248084602085016123a1565b90509250929050565b6000806000610120848603121561249f57600080fd5b83359250602084013591506124b785604086016123a1565b90509250925092565b6000602082840312156124d257600080fd5b5035919050565b600080604083850312156124ec57600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461235657600080fd5b60008083601f84011261252557600080fd5b50813567ffffffffffffffff81111561253d57600080fd5b60208301915083602082850101111561255557600080fd5b9250929050565b6000806000806000806080878903121561257557600080fd5b863567ffffffffffffffff8082111561258d57600080fd5b818901915089601f8301126125a157600080fd5b8135818111156125b057600080fd5b8a60208260051b85010111156125c557600080fd5b602083019850809750506125db60208a016124fb565b95506125e960408a01612373565b945060608901359150808211156125ff57600080fd5b5061260c89828a01612513565b979a9699509497509295939492505050565b60008082840361010081121561263357600080fd5b8335925060e0601f198201121561264957600080fd5b506020830190509250929050565b600060e0828403121561266957600080fd5b61267383836123a1565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106126a4576126a461267a565b91905290565b6000602082840312156126bc57600080fd5b8151801515811461267357600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561274b57600080fd5b5051919050565b60006020828403121561276457600080fd5b81516126738161235b565b634e487b7160e01b600052601160045260246000fd5b6000826127a257634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115611ba357611ba361276f565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561283457600080fd5b61267382612392565b60006020828403121561284f57600080fd5b81356126738161235b565b80820180821115611ba357611ba361276f565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106128c5576128c561267a565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212202f82660bc137ed112ddf8b3a1c3b1ba058d63556c98cae41a34d4f4d2528f9f964736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101cd5760003560e01c8063541adcca116100f7578063b5b7a18411610095578063d5e6a9df11610064578063d5e6a9df146105c3578063da2b7bc4146105f7578063df19e6ff14610617578063e813a7551461064457600080fd5b8063b5b7a18414610507578063b633b9441461053b578063c2114a161461055b578063d0e30db01461058f57600080fd5b8063930f28af116100d1578063930f28af146104695780639588eca214610489578063aa22a1c61461049f578063b044397e146104d357600080fd5b8063541adcca146104065780637ffc2a6e1461042657806390df63b71461043c57600080fd5b80632c1925191161016f5780633fc8cef31161013e5780633fc8cef3146103725780634788cb38146103a657806349b4299e146103c65780634a439cfe146103e657600080fd5b80632c192519146102f257806331d144571461031257806331ddf743146103325780633ce43cfd1461035257600080fd5b80631062b39a116101ab5780631062b39a1461024e578063222ae7861461029a5780632639c060146102af57806327ee6bdd146102dc57600080fd5b806301139b68146101d2578063042c4aaf146101e75780630f0adca51461022e575b600080fd5b6101e56101e036600461245b565b61065a565b005b3480156101f357600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561023a57600080fd5b506101e5610249366004612489565b610884565b34801561025a57600080fd5b506102827f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610225565b3480156102a657600080fd5b5061021b610c34565b3480156102bb57600080fd5b5061021b6102ca3660046124c0565b60026020526000908152604090205481565b3480156102e857600080fd5b5061021b60015481565b3480156102fe57600080fd5b506101e561030d3660046124d9565b610c65565b34801561031e57600080fd5b506101e561032d3660046124d9565b610f3c565b34801561033e57600080fd5b506101e561034d36600461255c565b61127c565b34801561035e57600080fd5b506101e561036d36600461261e565b61151c565b34801561037e57600080fd5b506102827f000000000000000000000000000000000000000000000000000000000000000081565b3480156103b257600080fd5b506101e56103c136600461261e565b611756565b3480156103d257600080fd5b506101e56103e136600461245b565b61198e565b3480156103f257600080fd5b5061021b6104013660046124c0565b611b77565b34801561041257600080fd5b5061021b610421366004612657565b611ba9565b34801561043257600080fd5b5061021b60055481565b34801561044857600080fd5b5061021b6104573660046124c0565b60036020526000908152604090205481565b34801561047557600080fd5b506101e561048436600461245b565b611bfb565b34801561049557600080fd5b5061021b60005481565b3480156104ab57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104df57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561051357600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054757600080fd5b506101e561055636600461245b565b611def565b34801561056757600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561059b57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105cf57600080fd5b506102827f000000000000000000000000000000000000000000000000000000000000000081565b34801561060357600080fd5b506101e561061236600461245b565b6120ae565b34801561062357600080fd5b50610637610632366004612657565b612294565b6040516102259190612690565b34801561065057600080fd5b5061021b60045481565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156106ec573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071091906126aa565b6107355760405162461bcd60e51b815260040161072c906126cc565b60405180910390fd5b61073e81611ba9565b6000838152600260205260409020541461076a5760405162461bcd60e51b815260040161072c906126fb565b60c08101516001600160a01b0316156107c55760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161072c565b60008160a0015160028111156107dd576107dd61267a565b1461082a5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e000000000000000000604482015260640161072c565b3360c082015261083981611ba9565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816108d7576108d7612723565b0403111561091a5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161072c565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461099d5760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b606482015260840161072c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109fb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1f9190612739565b7f000000000000000000000000000000000000000000000000000000000000000014610a815760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161072c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610adf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b039190612752565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b765760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161072c565b60015483118015610b8657508115155b15610bc957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610bd281611ba9565b60008481526002602052604090205403610c2f578051829003610bfb57600160a0820152610c16565b60c08101516001600160a01b031615610c1657600260a08201525b610c1f81611ba9565b6000848152600260205260409020555b505050565b6000610c607f000000000000000000000000000000000000000000000000000000000000000042612785565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cd05760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b604482015260640161072c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d529190612739565b7f000000000000000000000000000000000000000000000000000000000000000014610db45760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161072c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e369190612752565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610ea95760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161072c565b8060055410610ef15760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161072c565b8160045414610f3857600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b5050565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610fce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff291906126aa565b61100e5760405162461bcd60e51b815260040161072c906126cc565b6110387f000000000000000000000000000000000000000000000000000000000000000042612785565b82106110865760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e00000000000000604482015260640161072c565b600060017f0000000000000000000000000000000000000000000000000000000000000000600454426110b991906127a7565b6110c39190612785565b6110cd91906127a7565b905060007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000428161112157611121612723565b0403905060008183116111345781611136565b825b9050808510156111795760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21032b837b1b41760911b604482015260640161072c565b836111965760405162461bcd60e51b815260040161072c906126fb565b600085815260026020526040902054156111e85760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161072c565b6040805160e0810182528581523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261122e90611ba9565b600086815260026020908152604091829020929092555185815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050505050565b604085106112be5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161072c565b6000848484846040516020016112d794939291906127ba565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015611357576000888883818110611319576113196127fc565b9050602002013590508281111561133e5782600052806020526040600020925061134e565b8060005282602052604060002092505b506001016112fd565b50806000541461139a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161072c565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561140f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161072c565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061143f9089908990612812565b6000604051808303816000865af19150503d806000811461147c576040519150601f19603f3d011682016040523d82523d6000602084013e611481565b606091505b50509050806114d25760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161072c565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61152e61042136839003830183612657565b6000838152600260205260409020541461155a5760405162461bcd60e51b815260040161072c906126fb565b600261156c60c0830160a08401612822565b600281111561157d5761157d61267a565b146115be5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b604482015260640161072c565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561165057600080fd5b505af1158015611664573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb90506116a960e0840160c0850161283d565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af1158015611716573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173a91906126aa565b610f385760405162461bcd60e51b815260040161072c906126cc565b61176861042136839003830183612657565b600083815260026020526040902054146117945760405162461bcd60e51b815260040161072c906126fb565b60016117a660c0830160a08401612822565b60028111156117b7576117b761267a565b146117f45760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b604482015260640161072c565b600082815260026020526040812081905561181560e0830160c0840161283d565b6001600160a01b0316146118fd57604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b1580156118a457600080fd5b505af11580156118b8573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb90506116a9604084016020850161283d565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb61193c604084016020850161283d565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044016116f7565b61199781611ba9565b600083815260026020526040902054146119c35760405162461bcd60e51b815260040161072c906126fb565b7f00000000000000000000000000000000000000000000000000000000000000006004546119f1919061285a565b6040820151611a069063ffffffff16426127a7565b1015611a695760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b606482015260840161072c565b6000611a7482612294565b90506002816003811115611a8a57611a8a61267a565b1480611aa757506000816003811115611aa557611aa561267a565b145b611b105760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b606482015260840161072c565b63ffffffff428116606084015243166080830152611b2d82611ba9565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b6000611ba37f000000000000000000000000000000000000000000000000000000000000000083612785565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611bde98909796910161286d565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c4e57611c4e612723565b04031115611c915760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161072c565b611c9a81611ba9565b60008381526002602052604090205414611cc65760405162461bcd60e51b815260040161072c906126fb565b60c08101516001600160a01b031615611d185760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161072c565b6001611d2382612294565b6003811115611d3457611d3461267a565b14611d815760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e0000000000604482015260640161072c565b600154821115611dc957600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611dd981611ba9565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611e4257611e42612723565b040311611e835760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161072c565b611e8c81611ba9565b60008381526002602052604090205414611eb85760405162461bcd60e51b815260040161072c906126fb565b60008160a001516002811115611ed057611ed061267a565b14611f0f5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161072c565b60c08101516001600160a01b031615610f385760208101516001600160a01b0316611fc1576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116f7565b60c0810180516000909152611fd582611ba9565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af115801561206e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061209291906126aa565b610c2f5760405162461bcd60e51b815260040161072c906126cc565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161210157612101612723565b0403116121425760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161072c565b61214b81611ba9565b600083815260026020526040902054146121775760405162461bcd60e51b815260040161072c906126fb565b60008160a00151600281111561218f5761218f61267a565b146121ce5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161072c565b60208101516001600160a01b031615610f385760c08101516001600160a01b031661228057600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116f7565b6020810180516000909152611fd582611ba9565b6000816060015163ffffffff166000036122b057506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff16420310156122ec57506003919050565b60006005836060015163ffffffff1642038161230a5761230a612723565b608085015163ffffffff16919004019050437f00000000000000000000000000000000000000000000000000000000000000008183031161234e5760019250612353565b600092505b50505b919050565b6001600160a01b038116811461237057600080fd5b50565b80356123568161235b565b803563ffffffff8116811461235657600080fd5b80356003811061235657600080fd5b600060e082840312156123b357600080fd5b60405160e0810181811067ffffffffffffffff821117156123e457634e487b7160e01b600052604160045260246000fd5b604052823581529050806123fa60208401612373565b602082015261240b6040840161237e565b604082015261241c6060840161237e565b606082015261242d6080840161237e565b608082015261243e60a08401612392565b60a082015261244f60c08401612373565b60c08201525092915050565b600080610100838503121561246f57600080fd5b8235915061248084602085016123a1565b90509250929050565b6000806000610120848603121561249f57600080fd5b83359250602084013591506124b785604086016123a1565b90509250925092565b6000602082840312156124d257600080fd5b5035919050565b600080604083850312156124ec57600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461235657600080fd5b60008083601f84011261252557600080fd5b50813567ffffffffffffffff81111561253d57600080fd5b60208301915083602082850101111561255557600080fd5b9250929050565b6000806000806000806080878903121561257557600080fd5b863567ffffffffffffffff8082111561258d57600080fd5b818901915089601f8301126125a157600080fd5b8135818111156125b057600080fd5b8a60208260051b85010111156125c557600080fd5b602083019850809750506125db60208a016124fb565b95506125e960408a01612373565b945060608901359150808211156125ff57600080fd5b5061260c89828a01612513565b979a9699509497509295939492505050565b60008082840361010081121561263357600080fd5b8335925060e0601f198201121561264957600080fd5b506020830190509250929050565b600060e0828403121561266957600080fd5b61267383836123a1565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106126a4576126a461267a565b91905290565b6000602082840312156126bc57600080fd5b8151801515811461267357600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561274b57600080fd5b5051919050565b60006020828403121561276457600080fd5b81516126738161235b565b634e487b7160e01b600052601160045260246000fd5b6000826127a257634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115611ba357611ba361276f565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561283457600080fd5b61267382612392565b60006020828403121561284f57600080fd5b81356126738161235b565b80820180821115611ba357611ba361276f565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106128c5576128c561267a565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212202f82660bc137ed112ddf8b3a1c3b1ba058d63556c98cae41a34d4f4d2528f9f964736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.", "events": { @@ -1060,7 +1085,7 @@ "sequencerDelayLimitUpdateReceived(uint256)": { "details": "This event indicates the sequencer limit updated.", "params": { - "_newsequencerDelayLimit": "The new maxL2StateSyncDelay." + "_newSequencerDelayLimit": "The new sequencer delay limit." } } }, @@ -1095,12 +1120,14 @@ "_amb": "The address of the AMB contract on Gnosis.", "_deposit": "The deposit amount to submit a claim in wei.", "_epochPeriod": "The duration of each epoch.", + "_maxClaimDelayEpochs": "The maximum number of epochs that can be claimed in the past.", "_maxMissingBlocks": "The maximum number of blocks that can be missing in a challenge period.", "_minChallengePeriod": "The minimum time window to challenge a claim.", "_routerArbToGnosis": "The address of the router on Ethereum that routes from Arbitrum to Gnosis.", "_routerChainId": "The chain id of the routerArbToGnosis.", "_sequencerDelayLimit": "The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.", - "_timeoutEpochs": "The epochs before the bridge is considered shutdown." + "_timeoutEpochs": "The epochs before the bridge is considered shutdown.", + "_weth": "The address of the WETH contract on Gnosis." } }, "epochAt(uint256)": { @@ -1149,7 +1176,7 @@ } }, "updateSequencerDelayLimit(uint256,uint256)": { - "details": "Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge", + "details": "Set the sequencerDelayLimit by receiving a message from the AMB.", "params": { "_newSequencerDelayLimit": "The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.", "_timestamp": "The timestamp of the message." @@ -1205,7 +1232,7 @@ "storageLayout": { "storage": [ { - "astId": 401, + "astId": 2593, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "stateRoot", "offset": 0, @@ -1213,7 +1240,7 @@ "type": "t_bytes32" }, { - "astId": 403, + "astId": 2595, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "latestVerifiedEpoch", "offset": 0, @@ -1221,7 +1248,7 @@ "type": "t_uint256" }, { - "astId": 407, + "astId": 2599, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "claimHashes", "offset": 0, @@ -1229,7 +1256,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 411, + "astId": 2603, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "relayed", "offset": 0, @@ -1237,7 +1264,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 413, + "astId": 2605, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "sequencerDelayLimit", "offset": 0, @@ -1245,7 +1272,7 @@ "type": "t_uint256" }, { - "astId": 415, + "astId": 2607, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "timestampDelayUpdated", "offset": 0, diff --git a/contracts/deployments/goerli/RouterArbToGnosisDevnet.json b/contracts/deployments/goerli/RouterArbToGnosisDevnet.json index c4eb6cf8..0dcab643 100644 --- a/contracts/deployments/goerli/RouterArbToGnosisDevnet.json +++ b/contracts/deployments/goerli/RouterArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x9F4407785DFf95c08Bf9a0d9d4A5a164C48eC5CB", + "address": "0x8Bf88E6474d93bD2Dc0d76CB3BE8809c6BB84148", "abi": [ { "inputs": [ @@ -52,7 +52,7 @@ { "indexed": false, "internalType": "uint256", - "name": "_requestedsequencerDelayLimit", + "name": "_requestedSequencerDelayLimit", "type": "uint256" } ], @@ -78,7 +78,7 @@ { "indexed": false, "internalType": "uint256", - "name": "_newsequencerDelayLimit", + "name": "_newSequencerDelayLimit", "type": "uint256" } ], @@ -130,6 +130,11 @@ "name": "_stateroot", "type": "bytes32" }, + { + "internalType": "uint256", + "name": "_gasLimit", + "type": "uint256" + }, { "components": [ { @@ -197,7 +202,7 @@ "outputs": [ { "internalType": "uint256", - "name": "requestedSequencerDelayLimit", + "name": "requestedSequencerLimit", "type": "uint256" }, { @@ -243,33 +248,33 @@ "type": "function" } ], - "transactionHash": "0xde10a0097c19ecb8deed2781ed1e4990fc34053a54684f637961a48871110aa0", + "transactionHash": "0xc4b88afad272ea5b7bced4a493612d6a2a7ff9b3f2c323a07136905a715114bc", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x9F4407785DFf95c08Bf9a0d9d4A5a164C48eC5CB", - "transactionIndex": 8, - "gasUsed": "851243", + "contractAddress": "0x8Bf88E6474d93bD2Dc0d76CB3BE8809c6BB84148", + "transactionIndex": 65, + "gasUsed": "866965", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc8875d23c01aa2e3e2034bfb5b636fe503763b86699d7bd6d984d5cb7cf3c4e3", - "transactionHash": "0xde10a0097c19ecb8deed2781ed1e4990fc34053a54684f637961a48871110aa0", + "blockHash": "0x3118894a1e770b5fd14ba78785e9f45dca529ffe25bb123e937584edf9748c35", + "transactionHash": "0xc4b88afad272ea5b7bced4a493612d6a2a7ff9b3f2c323a07136905a715114bc", "logs": [], - "blockNumber": 9187161, - "cumulativeGasUsed": "1702384", + "blockNumber": 9254068, + "cumulativeGasUsed": "11931860", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0x6bC3C7Bcd2C6C2d8BFEAA3642c425cAE25F7fe17", - "0xDBa4fb8C75816CF9DcDbC66eDA361AD198314577" + "0x6164EA58a1f5359D2E54ea8eB9e5971B7C8dB0f1", + "0xE2067941210d684bA8171F7C9dF372931fC6c245" ], - "numDeployments": 14, - "solcInputHash": "26a65a18c178d77477789f8130b0944b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedSequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedSequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n function sendSequencerDelayLimit() internal {\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x4a7f9bf6b94ca435c2c402934e97d9f69dd082b91d34d9634ad40be9cbc9db96\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101006040523480156200001257600080fd5b5060405162000fdb38038062000fdb833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610d56620002856000396000818161010e0152818161082701526109c2015260008181610135015261064c01526000818160cf015281816107fe0152610999015260008181610164015281816102c1015281816103e7015281816105ea01526106760152610d566000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063e78cea921461015f578063e813a75514610186578063f6ee5b761461019d57600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b61018f60005481565b6040519081526020016100b7565b6100c86101ab366004610ac3565b6105df565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b05565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b41565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610b65565b50925050508181036103df5760008290556103aa610938565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b41565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610b65565b509250505060005481111561051a5760008190556104e4610938565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b41565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b41565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008383836040516024016107b593929190610bf0565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610870573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108949190610ca2565b6040518463ffffffff1660e01b81526004016108b293929190610cbb565b6020604051808303816000875af11580156108d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f59190610ca2565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092991815260200190565b60405180910390a25050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f9190610ca2565b6040518463ffffffff1660e01b8152600401610a4d93929190610cbb565b6020604051808303816000875af1158015610a6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a909190610ca2565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b6000806000838503610120811215610ada57600080fd5b843593506020850135925060e0603f1982011215610af757600080fd5b506040840190509250925092565b80820180821115610b2657634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b5357600080fd5b8151610b5e81610b2c565b9392505050565b60008060008060808587031215610b7b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610ba681610b2c565b919050565b803563ffffffff81168114610ba657600080fd5b803560038110610ba657600080fd5b60038110610bec57634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1481610b2c565b6001600160a01b03166060830152610c2e60408401610bab565b63ffffffff808216608085015280610c4860608701610bab565b1660a085015280610c5b60808701610bab565b1660c08501525050610c6f60a08401610bbf565b610c7c60e0840182610bce565b50610c8960c08401610b9b565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cb457600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cf757868101830151858201608001528201610cdb565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220cef3d8b1424fc3a5cdb956bd340ffabf81932e2198be0d092d456f13cc6ebdf764736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063e78cea921461015f578063e813a75514610186578063f6ee5b761461019d57600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b61018f60005481565b6040519081526020016100b7565b6100c86101ab366004610ac3565b6105df565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b05565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b41565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610b65565b50925050508181036103df5760008290556103aa610938565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b41565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610b65565b509250505060005481111561051a5760008190556104e4610938565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b41565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b41565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008383836040516024016107b593929190610bf0565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610870573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108949190610ca2565b6040518463ffffffff1660e01b81526004016108b293929190610cbb565b6020604051808303816000875af11580156108d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f59190610ca2565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092991815260200190565b60405180910390a25050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f9190610ca2565b6040518463ffffffff1660e01b8152600401610a4d93929190610cbb565b6020604051808303816000875af1158015610a6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a909190610ca2565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b6000806000838503610120811215610ada57600080fd5b843593506020850135925060e0603f1982011215610af757600080fd5b506040840190509250925092565b80820180821115610b2657634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b5357600080fd5b8151610b5e81610b2c565b9392505050565b60008060008060808587031215610b7b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610ba681610b2c565b919050565b803563ffffffff81168114610ba657600080fd5b803560038110610ba657600080fd5b60038110610bec57634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1481610b2c565b6001600160a01b03166060830152610c2e60408401610bab565b63ffffffff808216608085015280610c4860608701610bab565b1660a085015280610c5b60808701610bab565b1660c08501525050610c6f60a08401610bbf565b610c7c60e0840182610bce565b50610c8960c08401610b9b565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cb457600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cf757868101830151858201608001528201610cdb565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220cef3d8b1424fc3a5cdb956bd340ffabf81932e2198be0d092d456f13cc6ebdf764736f6c63430008120033", + "numDeployments": 1, + "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_gasLimit\":\"The true batch gas limit for the epoch.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToGnosis {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Send the sequencer delay limit.\\n function sendSequencerDelayLimit() internal {\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _gasLimit The true batch gas limit for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, uint256 _gasLimit, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n\\n uint256 maxGasPerTx = amb.maxGasPerTx();\\n uint256 gasLimitCapped = _gasLimit > maxGasPerTx ? maxGasPerTx : _gasLimit;\\n\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, gasLimitCapped);\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xfc827e3a369ec32a1a85f9058905e56f6c43c41889b027070da878dccbfb873e\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n uint256 _gasLimit,\\n Claim memory _claim\\n ) external;\\n}\\n\",\"keccak256\":\"0x14b9a5be28d1954e86512cad4b6fcbc77646a30f7baefc84937fe4124db3cc37\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b506040516200102c3803806200102c833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610da06200028c6000396000818161010e015281816108b20152610a04015260008181610135015261064c01526000818160cf015281816107fe0152818161088301526109db015260008181610177015281816102c1015281816103e7015281816105ea01526106760152610da06000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063b1126dad1461015f578063e78cea9214610172578063e813a7551461019957600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100c861016d366004610b05565b6105df565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100b7565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b4f565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610baf565b50925050508181036103df5760008290556103aa61097a565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610baf565b509250505060005481111561051a5760008190556104e461097a565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b8b565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b8b565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008484836040516024016107b593929190610c3a565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263e5789d039260048083019391928290030181865afa158015610846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086a9190610cec565b9050600081851161087b578461087d565b815b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663dc8601b37f000000000000000000000000000000000000000000000000000000000000000086856040518463ffffffff1660e01b81526004016108f193929190610d05565b6020604051808303816000875af1158015610910573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109349190610cec565b9050877f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161096891815260200190565b60405180910390a25050505050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a719190610cec565b6040518463ffffffff1660e01b8152600401610a8f93929190610d05565b6020604051808303816000875af1158015610aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad29190610cec565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b600080600080848603610140811215610b1d57600080fd5b85359450602086013593506040860135925060e0605f1982011215610b4157600080fd5b509295919450926060019150565b80820180821115610b7057634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b9d57600080fd5b8151610ba881610b76565b9392505050565b60008060008060808587031215610bc557600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bf081610b76565b919050565b803563ffffffff81168114610bf057600080fd5b803560038110610bf057600080fd5b60038110610c3657634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c5e81610b76565b6001600160a01b03166060830152610c7860408401610bf5565b63ffffffff808216608085015280610c9260608701610bf5565b1660a085015280610ca560808701610bf5565b1660c08501525050610cb960a08401610c09565b610cc660e0840182610c18565b50610cd360c08401610be5565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cfe57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610d4157868101830151858201608001528201610d25565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea26469706673582212205413eef1ad93f5e4052a4ced1c2d29cd5325cb84b72663498aa3888f8eefd61c64736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063b1126dad1461015f578063e78cea9214610172578063e813a7551461019957600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100c861016d366004610b05565b6105df565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100b7565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b4f565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610baf565b50925050508181036103df5760008290556103aa61097a565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610baf565b509250505060005481111561051a5760008190556104e461097a565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b8b565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b8b565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008484836040516024016107b593929190610c3a565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263e5789d039260048083019391928290030181865afa158015610846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086a9190610cec565b9050600081851161087b578461087d565b815b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663dc8601b37f000000000000000000000000000000000000000000000000000000000000000086856040518463ffffffff1660e01b81526004016108f193929190610d05565b6020604051808303816000875af1158015610910573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109349190610cec565b9050877f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161096891815260200190565b60405180910390a25050505050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a719190610cec565b6040518463ffffffff1660e01b8152600401610a8f93929190610d05565b6020604051808303816000875af1158015610aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad29190610cec565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b600080600080848603610140811215610b1d57600080fd5b85359450602086013593506040860135925060e0605f1982011215610b4157600080fd5b509295919450926060019150565b80820180821115610b7057634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b9d57600080fd5b8151610ba881610b76565b9392505050565b60008060008060808587031215610bc557600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bf081610b76565b919050565b803563ffffffff81168114610bf057600080fd5b803560038110610bf057600080fd5b60038110610c3657634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c5e81610b76565b6001600160a01b03166060830152610c7860408401610bf5565b63ffffffff808216608085015280610c9260608701610bf5565b1660a085015280610ca560808701610bf5565b1660c08501525050610cb960a08401610c09565b610cc660e0840182610c18565b50610cd360c08401610be5565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cfe57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610d4157868101830151858201608001528201610d25565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea26469706673582212205413eef1ad93f5e4052a4ced1c2d29cd5325cb84b72663498aa3888f8eefd61c64736f6c63430008120033", "devdoc": { "details": "Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.", "events": { @@ -283,7 +288,7 @@ "sequencerDelayLimitDecreaseRequested(uint256)": { "details": "This event indicates that a request to decrease the sequencer limit has been made.", "params": { - "_requestedsequencerDelayLimit": "The new sequencer limit requested." + "_requestedSequencerDelayLimit": "The new sequencer limit requested." } }, "sequencerDelayLimitSent(bytes32)": { @@ -295,7 +300,7 @@ "sequencerDelayLimitUpdated(uint256)": { "details": "This event indicates the sequencer limit updated.", "params": { - "_newsequencerDelayLimit": "The new maxL2StateSyncDelay." + "_newSequencerDelayLimit": "The new sequencer delay limit." } } }, @@ -313,11 +318,12 @@ "executeSequencerDelayLimitDecreaseRequest()": { "details": "execute sequencerDelayLimitDecreaseRequest" }, - "route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Resolves any challenge of the optimistic claim for '_epoch'.", "params": { "_claim": "The claim associated with the epoch.", "_epoch": "The epoch to verify.", + "_gasLimit": "The true batch gas limit for the epoch.", "_stateroot": "The true batch merkle root for the epoch." } }, @@ -330,7 +336,7 @@ "userdoc": { "kind": "user", "methods": { - "route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "notice": "Note: Access restricted to arbitrum canonical bridge." } }, @@ -339,7 +345,7 @@ "storageLayout": { "storage": [ { - "astId": 76, + "astId": 1858, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "sequencerDelayLimit", "offset": 0, @@ -347,29 +353,29 @@ "type": "t_uint256" }, { - "astId": 79, + "astId": 1861, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "1", - "type": "t_struct(SequencerDelayLimitDecreaseRequest)84_storage" + "type": "t_struct(SequencerLimitDecreaseRequest)1866_storage" } ], "types": { - "t_struct(SequencerDelayLimitDecreaseRequest)84_storage": { + "t_struct(SequencerLimitDecreaseRequest)1866_storage": { "encoding": "inplace", - "label": "struct RouterArbToGnosis.SequencerDelayLimitDecreaseRequest", + "label": "struct RouterArbToGnosis.SequencerLimitDecreaseRequest", "members": [ { - "astId": 81, + "astId": 1863, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", - "label": "requestedSequencerDelayLimit", + "label": "requestedSequencerLimit", "offset": 0, "slot": "0", "type": "t_uint256" }, { - "astId": 83, + "astId": 1865, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/RouterArbToGnosisTestnet.json b/contracts/deployments/goerli/RouterArbToGnosisTestnet.json index c2b89a28..b00b085b 100644 --- a/contracts/deployments/goerli/RouterArbToGnosisTestnet.json +++ b/contracts/deployments/goerli/RouterArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0xF04354D2286C8Db33aE6F454728C2F935ae5CD82", + "address": "0x931FA807020231bCE1340Be8E1e5054207BbAFEd", "abi": [ { "inputs": [ @@ -52,7 +52,7 @@ { "indexed": false, "internalType": "uint256", - "name": "_requestedsequencerDelayLimit", + "name": "_requestedSequencerDelayLimit", "type": "uint256" } ], @@ -78,7 +78,7 @@ { "indexed": false, "internalType": "uint256", - "name": "_newsequencerDelayLimit", + "name": "_newSequencerDelayLimit", "type": "uint256" } ], @@ -130,6 +130,11 @@ "name": "_stateroot", "type": "bytes32" }, + { + "internalType": "uint256", + "name": "_gasLimit", + "type": "uint256" + }, { "components": [ { @@ -197,7 +202,7 @@ "outputs": [ { "internalType": "uint256", - "name": "requestedSequencerDelayLimit", + "name": "requestedSequencerLimit", "type": "uint256" }, { @@ -243,33 +248,33 @@ "type": "function" } ], - "transactionHash": "0xa88b701ba1f52edcde1114a444172fd0b680cd6cbc7484cc4845a6c59a3477a0", + "transactionHash": "0x239ca22100e87a2885d0ae6e44fd6fb1c5ac49f410cb2dae707947dd5f4e61d1", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xF04354D2286C8Db33aE6F454728C2F935ae5CD82", - "transactionIndex": 32, - "gasUsed": "851243", + "contractAddress": "0x931FA807020231bCE1340Be8E1e5054207BbAFEd", + "transactionIndex": 76, + "gasUsed": "866965", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x77ee4cde01a6868a587efb4b07f24b74b42a3add4e92b5333ffbf32daa0be75e", - "transactionHash": "0xa88b701ba1f52edcde1114a444172fd0b680cd6cbc7484cc4845a6c59a3477a0", + "blockHash": "0x224c12839d7fb236f16896cb3a4806ff30d6daf55fe1e01584542e494ef76d9f", + "transactionHash": "0x239ca22100e87a2885d0ae6e44fd6fb1c5ac49f410cb2dae707947dd5f4e61d1", "logs": [], - "blockNumber": 9187150, - "cumulativeGasUsed": "11149282", + "blockNumber": 9254076, + "cumulativeGasUsed": "18674126", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x87A19d769D875964E9Cd41dDBfc397B2543764E6", - "0xDF216C98773DA7998EE49AE8106BFe9724cf2944", - "0xb61BEB66796Bbf59BBa3e5feE4Bab2304B889590" + "0x76fa89666bd55736832a4350b9B8dA6bB1878BeF", + "0x0E459f63db78E2d5E8DC16a717F30A3d24cb79c2" ], - "numDeployments": 6, - "solcInputHash": "26a65a18c178d77477789f8130b0944b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToL1.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedSequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedSequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge\\n function sendSequencerDelayLimit() internal {\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x4a7f9bf6b94ca435c2c402934e97d9f69dd082b91d34d9634ad40be9cbc9db96\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination.\\n/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1).\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToL1 {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0xcfa5d160b5dfde041f12f99e26509546e44d97dda02d849a81b479dd20bde2cd\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101006040523480156200001257600080fd5b5060405162000fdb38038062000fdb833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610d56620002856000396000818161010e0152818161082701526109c2015260008181610135015261064c01526000818160cf015281816107fe0152610999015260008181610164015281816102c1015281816103e7015281816105ea01526106760152610d566000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063e78cea921461015f578063e813a75514610186578063f6ee5b761461019d57600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b61018f60005481565b6040519081526020016100b7565b6100c86101ab366004610ac3565b6105df565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b05565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b41565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610b65565b50925050508181036103df5760008290556103aa610938565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b41565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610b65565b509250505060005481111561051a5760008190556104e4610938565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b41565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b41565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008383836040516024016107b593929190610bf0565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610870573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108949190610ca2565b6040518463ffffffff1660e01b81526004016108b293929190610cbb565b6020604051808303816000875af11580156108d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f59190610ca2565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092991815260200190565b60405180910390a25050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f9190610ca2565b6040518463ffffffff1660e01b8152600401610a4d93929190610cbb565b6020604051808303816000875af1158015610a6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a909190610ca2565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b6000806000838503610120811215610ada57600080fd5b843593506020850135925060e0603f1982011215610af757600080fd5b506040840190509250925092565b80820180821115610b2657634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b5357600080fd5b8151610b5e81610b2c565b9392505050565b60008060008060808587031215610b7b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610ba681610b2c565b919050565b803563ffffffff81168114610ba657600080fd5b803560038110610ba657600080fd5b60038110610bec57634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1481610b2c565b6001600160a01b03166060830152610c2e60408401610bab565b63ffffffff808216608085015280610c4860608701610bab565b1660a085015280610c5b60808701610bab565b1660c08501525050610c6f60a08401610bbf565b610c7c60e0840182610bce565b50610c8960c08401610b9b565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cb457600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cf757868101830151858201608001528201610cdb565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220cef3d8b1424fc3a5cdb956bd340ffabf81932e2198be0d092d456f13cc6ebdf764736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063e78cea921461015f578063e813a75514610186578063f6ee5b761461019d57600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b61018f60005481565b6040519081526020016100b7565b6100c86101ab366004610ac3565b6105df565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b05565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b41565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610b65565b50925050508181036103df5760008290556103aa610938565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b41565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610b65565b509250505060005481111561051a5760008190556104e4610938565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b41565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b41565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008383836040516024016107b593929190610bf0565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610870573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108949190610ca2565b6040518463ffffffff1660e01b81526004016108b293929190610cbb565b6020604051808303816000875af11580156108d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f59190610ca2565b9050847f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161092991815260200190565b60405180910390a25050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f9190610ca2565b6040518463ffffffff1660e01b8152600401610a4d93929190610cbb565b6020604051808303816000875af1158015610a6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a909190610ca2565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b6000806000838503610120811215610ada57600080fd5b843593506020850135925060e0603f1982011215610af757600080fd5b506040840190509250925092565b80820180821115610b2657634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b5357600080fd5b8151610b5e81610b2c565b9392505050565b60008060008060808587031215610b7b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610ba681610b2c565b919050565b803563ffffffff81168114610ba657600080fd5b803560038110610ba657600080fd5b60038110610bec57634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c1481610b2c565b6001600160a01b03166060830152610c2e60408401610bab565b63ffffffff808216608085015280610c4860608701610bab565b1660a085015280610c5b60808701610bab565b1660c08501525050610c6f60a08401610bbf565b610c7c60e0840182610bce565b50610c8960c08401610b9b565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cb457600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610cf757868101830151858201608001528201610cdb565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea2646970667358221220cef3d8b1424fc3a5cdb956bd340ffabf81932e2198be0d092d456f13cc6ebdf764736f6c63430008120033", + "numDeployments": 1, + "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_gasLimit\":\"The true batch gas limit for the epoch.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToGnosis {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Send the sequencer delay limit.\\n function sendSequencerDelayLimit() internal {\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _gasLimit The true batch gas limit for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, uint256 _gasLimit, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n\\n uint256 maxGasPerTx = amb.maxGasPerTx();\\n uint256 gasLimitCapped = _gasLimit > maxGasPerTx ? maxGasPerTx : _gasLimit;\\n\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, gasLimitCapped);\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xfc827e3a369ec32a1a85f9058905e56f6c43c41889b027070da878dccbfb873e\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n uint256 _gasLimit,\\n Claim memory _claim\\n ) external;\\n}\\n\",\"keccak256\":\"0x14b9a5be28d1954e86512cad4b6fcbc77646a30f7baefc84937fe4124db3cc37\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b506040516200102c3803806200102c833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610da06200028c6000396000818161010e015281816108b20152610a04015260008181610135015261064c01526000818160cf015281816107fe0152818161088301526109db015260008181610177015281816102c1015281816103e7015281816105ea01526106760152610da06000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063b1126dad1461015f578063e78cea9214610172578063e813a7551461019957600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100c861016d366004610b05565b6105df565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100b7565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b4f565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610baf565b50925050508181036103df5760008290556103aa61097a565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610baf565b509250505060005481111561051a5760008190556104e461097a565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b8b565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b8b565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008484836040516024016107b593929190610c3a565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263e5789d039260048083019391928290030181865afa158015610846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086a9190610cec565b9050600081851161087b578461087d565b815b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663dc8601b37f000000000000000000000000000000000000000000000000000000000000000086856040518463ffffffff1660e01b81526004016108f193929190610d05565b6020604051808303816000875af1158015610910573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109349190610cec565b9050877f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161096891815260200190565b60405180910390a25050505050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a719190610cec565b6040518463ffffffff1660e01b8152600401610a8f93929190610d05565b6020604051808303816000875af1158015610aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad29190610cec565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b600080600080848603610140811215610b1d57600080fd5b85359450602086013593506040860135925060e0605f1982011215610b4157600080fd5b509295919450926060019150565b80820180821115610b7057634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b9d57600080fd5b8151610ba881610b76565b9392505050565b60008060008060808587031215610bc557600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bf081610b76565b919050565b803563ffffffff81168114610bf057600080fd5b803560038110610bf057600080fd5b60038110610c3657634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c5e81610b76565b6001600160a01b03166060830152610c7860408401610bf5565b63ffffffff808216608085015280610c9260608701610bf5565b1660a085015280610ca560808701610bf5565b1660c08501525050610cb960a08401610c09565b610cc660e0840182610c18565b50610cd360c08401610be5565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cfe57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610d4157868101830151858201608001528201610d25565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea26469706673582212205413eef1ad93f5e4052a4ced1c2d29cd5325cb84b72663498aa3888f8eefd61c64736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063b1126dad1461015f578063e78cea9214610172578063e813a7551461019957600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100c861016d366004610b05565b6105df565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100b7565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b4f565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610baf565b50925050508181036103df5760008290556103aa61097a565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610baf565b509250505060005481111561051a5760008190556104e461097a565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b8b565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b8b565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008484836040516024016107b593929190610c3a565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263e5789d039260048083019391928290030181865afa158015610846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086a9190610cec565b9050600081851161087b578461087d565b815b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663dc8601b37f000000000000000000000000000000000000000000000000000000000000000086856040518463ffffffff1660e01b81526004016108f193929190610d05565b6020604051808303816000875af1158015610910573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109349190610cec565b9050877f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161096891815260200190565b60405180910390a25050505050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a719190610cec565b6040518463ffffffff1660e01b8152600401610a8f93929190610d05565b6020604051808303816000875af1158015610aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad29190610cec565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b600080600080848603610140811215610b1d57600080fd5b85359450602086013593506040860135925060e0605f1982011215610b4157600080fd5b509295919450926060019150565b80820180821115610b7057634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b9d57600080fd5b8151610ba881610b76565b9392505050565b60008060008060808587031215610bc557600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bf081610b76565b919050565b803563ffffffff81168114610bf057600080fd5b803560038110610bf057600080fd5b60038110610c3657634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c5e81610b76565b6001600160a01b03166060830152610c7860408401610bf5565b63ffffffff808216608085015280610c9260608701610bf5565b1660a085015280610ca560808701610bf5565b1660c08501525050610cb960a08401610c09565b610cc660e0840182610c18565b50610cd360c08401610be5565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cfe57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610d4157868101830151858201608001528201610d25565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea26469706673582212205413eef1ad93f5e4052a4ced1c2d29cd5325cb84b72663498aa3888f8eefd61c64736f6c63430008120033", "devdoc": { "details": "Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.", "events": { @@ -283,7 +288,7 @@ "sequencerDelayLimitDecreaseRequested(uint256)": { "details": "This event indicates that a request to decrease the sequencer limit has been made.", "params": { - "_requestedsequencerDelayLimit": "The new sequencer limit requested." + "_requestedSequencerDelayLimit": "The new sequencer limit requested." } }, "sequencerDelayLimitSent(bytes32)": { @@ -295,7 +300,7 @@ "sequencerDelayLimitUpdated(uint256)": { "details": "This event indicates the sequencer limit updated.", "params": { - "_newsequencerDelayLimit": "The new maxL2StateSyncDelay." + "_newSequencerDelayLimit": "The new sequencer delay limit." } } }, @@ -313,11 +318,12 @@ "executeSequencerDelayLimitDecreaseRequest()": { "details": "execute sequencerDelayLimitDecreaseRequest" }, - "route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Resolves any challenge of the optimistic claim for '_epoch'.", "params": { "_claim": "The claim associated with the epoch.", "_epoch": "The epoch to verify.", + "_gasLimit": "The true batch gas limit for the epoch.", "_stateroot": "The true batch merkle root for the epoch." } }, @@ -330,7 +336,7 @@ "userdoc": { "kind": "user", "methods": { - "route(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "notice": "Note: Access restricted to arbitrum canonical bridge." } }, @@ -339,7 +345,7 @@ "storageLayout": { "storage": [ { - "astId": 76, + "astId": 1858, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "sequencerDelayLimit", "offset": 0, @@ -347,29 +353,29 @@ "type": "t_uint256" }, { - "astId": 79, + "astId": 1861, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "1", - "type": "t_struct(SequencerDelayLimitDecreaseRequest)84_storage" + "type": "t_struct(SequencerLimitDecreaseRequest)1866_storage" } ], "types": { - "t_struct(SequencerDelayLimitDecreaseRequest)84_storage": { + "t_struct(SequencerLimitDecreaseRequest)1866_storage": { "encoding": "inplace", - "label": "struct RouterArbToGnosis.SequencerDelayLimitDecreaseRequest", + "label": "struct RouterArbToGnosis.SequencerLimitDecreaseRequest", "members": [ { - "astId": 81, + "astId": 1863, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", - "label": "requestedSequencerDelayLimit", + "label": "requestedSequencerLimit", "offset": 0, "slot": "0", "type": "t_uint256" }, { - "astId": 83, + "astId": 1865, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/RouterGnosisToArbDevnet.json b/contracts/deployments/goerli/RouterGnosisToArbDevnet.json new file mode 100644 index 00000000..6830fa20 --- /dev/null +++ b/contracts/deployments/goerli/RouterGnosisToArbDevnet.json @@ -0,0 +1,651 @@ +{ + "address": "0x21596998458c428d745d171FA0636B885ed18DaC", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IBridge", + "name": "_bridge", + "type": "address" + }, + { + "internalType": "contract IAMB", + "name": "_amb", + "type": "address" + }, + { + "internalType": "address", + "name": "_veaInboxArbToGnosis", + "type": "address" + }, + { + "internalType": "address", + "name": "_veaOutboxArbToGnosis", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_inboxChainId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_ticketID", + "type": "uint256" + } + ], + "name": "Routed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_requestedSequencerDelayLimit", + "type": "uint256" + } + ], + "name": "sequencerDelayLimitDecreaseRequested", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_ticketID", + "type": "uint256" + } + ], + "name": "sequencerDelayLimitSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newSequencerDelayLimit", + "type": "uint256" + } + ], + "name": "sequencerDelayLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_requestedSequencerFutureLimit", + "type": "uint256" + } + ], + "name": "sequencerFutureLimitDecreaseRequested", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_ticketID", + "type": "uint256" + } + ], + "name": "sequencerFutureLimitSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newSequencerFutureLimit", + "type": "uint256" + } + ], + "name": "sequencerFutureLimitUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "L2GasBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "amb", + "outputs": [ + { + "internalType": "contract IAMB", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "bridge", + "outputs": [ + { + "internalType": "contract IBridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "executeSequencerDelayLimitDecreaseRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "executeSequencerFutureLimitDecreaseRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_stateroot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_inboxIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxSubmissionCost", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_excessFeeRefundAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxFeePerGas", + "type": "uint256" + } + ], + "name": "route", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_inboxIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxSubmissionCost", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_excessFeeRefundAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxFeePerGas", + "type": "uint256" + } + ], + "name": "sendSequencerDelayLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_inboxIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxSubmissionCost", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_excessFeeRefundAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxFeePerGas", + "type": "uint256" + } + ], + "name": "sendSequencerFutureLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerDelayLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerDelayLimitDecreaseRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestedSequencerLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerFutureLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerFutureLimitDecreaseRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestedSequencerLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updateSequencerDelayLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateSequencerFutureLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "veaInboxGnosisToArb", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "veaOutboxGnosisToArb", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xe048adcc3db59092338ef9d65553822f6d2df9792c7d9925cc3e08402f187c24", + "receipt": { + "to": null, + "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", + "contractAddress": "0x21596998458c428d745d171FA0636B885ed18DaC", + "transactionIndex": 46, + "gasUsed": "1392465", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000040000000000001000000000000002000000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2ebc5343acd56eafbce8f46435547db64bf5bcf8dc545d0f724e160dc4eeffcb", + "transactionHash": "0xe048adcc3db59092338ef9d65553822f6d2df9792c7d9925cc3e08402f187c24", + "logs": [ + { + "transactionIndex": 46, + "blockNumber": 9254071, + "transactionHash": "0xe048adcc3db59092338ef9d65553822f6d2df9792c7d9925cc3e08402f187c24", + "address": "0x21596998458c428d745d171FA0636B885ed18DaC", + "topics": [ + "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000015180", + "logIndex": 137, + "blockHash": "0x2ebc5343acd56eafbce8f46435547db64bf5bcf8dc545d0f724e160dc4eeffcb" + } + ], + "blockNumber": 9254071, + "cumulativeGasUsed": "7019985", + "status": 1, + "byzantium": true + }, + "args": [ + "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", + "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", + "0xe4AF4f1B42749d003C6d6eFdc05c11F33581E55B", + "0xcC196cC90bD30109E39400817e6ef63A1b744659", + 5 + ], + "numDeployments": 1, + "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_inboxChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"L2GasBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerFutureLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Gnosis Chain to Arbitrum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,uint256)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer delay limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(uint256)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value\",\"params\":{\"_ticketID\":\"The ticketID from the delayed inbox of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer delay limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}},\"sequencerFutureLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer future limit has been made.\",\"params\":{\"_requestedSequencerFutureLimit\":\"The new sequencer limit requested.\"}},\"sequencerFutureLimitSent(uint256)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value\",\"params\":{\"_ticketID\":\"The ticketID from the delayed inbox of the cross-chain message.\"}},\"sequencerFutureLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer future limit updated.\",\"params\":{\"_newSequencerFutureLimit\":\"The new sequencer future limit.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_inboxChainId\":\"The chain ID of the inbox chain.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"executeSequencerFutureLimitDecreaseRequest()\":{\"details\":\"execute sequencerFutureLimitDecreaseRequest\"},\"route(uint256,bytes32,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to.\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee.\",\"_stateroot\":\"The true state root for the epoch.\"}},\"sendSequencerDelayLimit(uint256,uint256,address,uint256,uint256)\":{\"details\":\"Send the sequencer delay limit through the delayed inbox.\"},\"sendSequencerFutureLimit(uint256,uint256,address,uint256,uint256)\":{\"details\":\"Send the sequencer future limit through the delayed inbox.\"},\"updateSequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"},\"updateSequencerFutureLimit()\":{\"details\":\"Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,uint256,uint256,address,uint256,uint256)\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/RouterGnosisToArb.sol\":\"RouterGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IInbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IInbox.sol\\n// proxy: https://etherscan.io/address/0x4Dbd4fc535Ac27206064B68FfCf827b0A60BAB3f\\n// implementation: https://etherscan.io/address/0x5aed5f8a1e3607476f1f81c3d8fe126deb0afe94\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface IInbox {\\n function bridge() external view returns (IBridge);\\n\\n /**\\n * @notice Put a message in the L2 inbox that can be reexecuted for some fixed amount of time if it reverts\\n * @dev all msg.value will deposited to callValueRefundAddress on L2\\n * @dev Gas limit and maxFeePerGas should not be set to 1 as that is used to trigger the RetryableData error\\n * @param to destination L2 contract address\\n * @param l2CallValue call value for retryable L2 message\\n * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n * @param excessFeeRefundAddress gasLimit x maxFeePerGas - execution cost gets credited here on L2 balance\\n * @param callValueRefundAddress l2Callvalue gets credited here on L2 if retryable txn times out or gets cancelled\\n * @param gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n * @param maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n * @param data ABI encoded data of L2 message\\n * @return unique message number of the retryable transaction\\n */\\n function createRetryableTicket(\\n address to,\\n uint256 l2CallValue,\\n uint256 maxSubmissionCost,\\n address excessFeeRefundAddress,\\n address callValueRefundAddress,\\n uint256 gasLimit,\\n uint256 maxFeePerGas,\\n bytes calldata data\\n ) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x2497d8bd48681de9d2b9929152afbc3ad5508923cce0eb4e863bf576955ddec2\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/RouterGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerFutureUpdatable.sol\\\";\\n\\n/// @dev Router from Gnosis Chain to Arbitrum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterGnosisToArb is IRouterToArb {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxGnosisToArb; // The address of the veaInbox on Gnosis.\\n address public immutable veaOutboxGnosisToArb; // The address of the veaOutbox on Arbitrum.\\n uint256 internal immutable inboxChainId; // The chain ID of the inbox chain.\\n\\n mapping(address => uint256) public L2GasBalance;\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n SequencerLimitDecreaseRequest public sequencerFutureLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, uint256 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value\\n /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message.\\n event sequencerDelayLimitSent(uint256 _ticketID);\\n\\n /// @dev This event indicates the sequencer delay limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer delay limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value\\n /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message.\\n event sequencerFutureLimitSent(uint256 _ticketID);\\n\\n /// @dev This event indicates the sequencer future limit updated.\\n /// @param _newSequencerFutureLimit The new sequencer future limit.\\n event sequencerFutureLimitUpdated(uint256 _newSequencerFutureLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer future limit has been made.\\n /// @param _requestedSequencerFutureLimit The new sequencer limit requested.\\n event sequencerFutureLimitDecreaseRequested(uint256 _requestedSequencerFutureLimit);\\n\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n /// @param _inboxChainId The chain ID of the inbox chain.\\n constructor(\\n IBridge _bridge, \\n IAMB _amb,\\n address _veaInboxArbToGnosis,\\n address _veaOutboxArbToGnosis,\\n uint256 _inboxChainId\\n ) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxGnosisToArb = _veaInboxArbToGnosis;\\n veaOutboxGnosisToArb = _veaOutboxArbToGnosis;\\n inboxChainId = _inboxChainId;\\n\\n updateSequencerDelayLimit();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerFutureLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , , uint256 newSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerFutureLimit > sequencerFutureLimit) {\\n // For sequencerFutureLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerFutureLimit = newSequencerFutureLimit;\\n emit sequencerFutureLimitUpdated(newSequencerFutureLimit);\\n } else if (newSequencerFutureLimit < sequencerFutureLimit) {\\n require(\\n sequencerFutureLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerFutureLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerFutureLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerFutureLimitDecreaseRequested(newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerFutureLimitDecreaseRequest\\n function executeSequencerFutureLimitDecreaseRequest() external {\\n require(sequencerFutureLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerFutureLimitDecreaseRequest.timestamp + sequencerFutureLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerFutureLimit = sequencerFutureLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerFutureLimitDecreaseRequest;\\n\\n (, , , uint256 currentSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerFutureLimit == requestedSequencerFutureLimit) {\\n sequencerFutureLimit = requestedSequencerFutureLimit;\\n emit sequencerFutureLimitUpdated(requestedSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Send the sequencer future limit through the delayed inbox.\\n function sendSequencerFutureLimit(\\n uint256 _inboxIndex, \\n uint256 _maxSubmissionCost, \\n address _excessFeeRefundAddress, \\n uint256 _gasLimit, \\n uint256 _maxFeePerGas\\n ) external {\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n \\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(\\n ISequencerFutureUpdatable.updateSequencerFutureLimit,\\n (sequencerFutureLimit, block.timestamp)\\n );\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n \\n emit sequencerFutureLimitSent(ticketID);\\n }\\n\\n /// @dev Send the sequencer delay limit through the delayed inbox.\\n function sendSequencerDelayLimit(\\n uint256 _inboxIndex, \\n uint256 _maxSubmissionCost, \\n address _excessFeeRefundAddress, \\n uint256 _gasLimit, \\n uint256 _maxFeePerGas\\n ) external {\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n \\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n \\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function deposit() external payable{\\n L2GasBalance[msg.sender] += msg.value;\\n }\\n\\n function withdraw(uint256 _amount) external{\\n require(L2GasBalance[msg.sender] > _amount, \\\"Insufficient balance.\\\");\\n L2GasBalance[msg.sender] -= _amount;\\n payable(msg.sender).send(_amount); // User is responsible for accepting ETH.\\n }\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee.\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to.\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\\n function route(\\n uint256 _epoch, \\n bytes32 _stateroot, \\n uint256 _inboxIndex, \\n uint256 _maxSubmissionCost, \\n address _excessFeeRefundAddress, \\n uint256 _gasLimit, \\n uint256 _maxFeePerGas\\n ) external {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(inboxChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(veaInboxGnosisToArb == amb.messageSender(), \\\"Vea Inbox only.\\\");\\n\\n // Ethereum -> Arbitrum message passing with retryable tickets in the delayed inbox, the canonical Ethereum -> Arbitrum bridge.\\n // https://developer.arbitrum.io/arbos/l1-to-l2-messaging#submission\\n\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n \\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL2.resolveDisputedClaim, (_epoch, _stateroot));\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x1594be4399e2c77f45f6cc7acecb602172cfe387fe95ad78016f0838097829a3\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerFutureUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerFutureUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerFutureUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerFutureLimit The futureSeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0x5c8b8ffaec923126ec1699d9c1483329b5a660837803aefc4aa95d9f091ef21f\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101206040523480156200001257600080fd5b5060405162001aeb38038062001aeb833981016040819052620000359162000268565b6001600160a01b0380861660805284811660a05283811660c052821660e052610100819052620000646200006f565b50505050506200033a565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d89190620002dc565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000116573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200013c919062000303565b5092505050600154811115620001875760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6001548110156200024f5760045415620002015760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6001600160a01b03811681146200024f57600080fd5b600080600080600060a086880312156200028157600080fd5b85516200028e8162000252565b6020870151909550620002a18162000252565b6040870151909450620002b48162000252565b6060870151909350620002c78162000252565b80925050608086015190509295509295909350565b600060208284031215620002ef57600080fd5b8151620002fc8162000252565b9392505050565b600080600080608085870312156200031a57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e0516101005161170a620003e1600039600061085501526000818161021101528181610aed0152818161105401526112700152600081816102d7015261094201526000818161019001528181610759015281816107d301526108b701526000818161035301528181610410015281816105a401528181610a6f01528181610bc801528181610d7301528181610fd601526111f2015261170a6000f3fe6080604052600436106101095760003560e01c806365b0183511610095578063b6d7aeff11610064578063b6d7aeff146102f9578063c4977c8b14610319578063d0e30db014610339578063e78cea9214610341578063e813a7551461037557600080fd5b806365b018351461026857806377a43648146102955780637e260880146102aa5780639e75a705146102c557600080fd5b80631ff47dc0116100dc5780631ff47dc0146101ca5780632e1a7d4d146101df5780634738b97f146101ff578063507b5ad3146102335780635f43a47f1461025357600080fd5b8063051d19701461010e5780630c63fa84146101435780630e56752e1461015a5780631062b39a1461017e575b600080fd5b34801561011a57600080fd5b50600354600454610129919082565b604080519283526020830191909152015b60405180910390f35b34801561014f57600080fd5b5061015861038b565b005b34801561016657600080fd5b5061017060025481565b60405190815260200161013a565b34801561018a57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013a565b3480156101d657600080fd5b50610158610528565b3480156101eb57600080fd5b506101586101fa366004611357565b6106b5565b34801561020b57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561023f57600080fd5b5061015861024e366004611385565b61074e565b34801561025f57600080fd5b50610158610bc4565b34801561027457600080fd5b506101706102833660046113e4565b60006020819052908152604090205481565b3480156102a157600080fd5b50610158610d6f565b3480156102b657600080fd5b50600554600654610129919082565b3480156102d157600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561030557600080fd5b50610158610314366004611408565b610f0c565b34801561032557600080fd5b50610158610334366004611408565b611128565b610158611331565b34801561034d57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561038157600080fd5b5061017060015481565b6004546000036103b65760405162461bcd60e51b81526004016103ad90611451565b60405180910390fd5b6001546004546103c691906114b3565b42116103e45760405162461bcd60e51b81526004016103ad906114cc565b6003805460009182905560048281556040805163ee35f32760e01b815290519293926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263ee35f327928082019260209290918290030181865afa158015610459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047d919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de919061153b565b50925050508181036105245760018290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60065460000361054a5760405162461bcd60e51b81526004016103ad90611451565b60025460065461055a91906114b3565b42116105785760405162461bcd60e51b81526004016103ad906114cc565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156105ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610613919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610674919061153b565b93505050508181036105245760028290556040518281527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b2719060200161051b565b33600090815260208190526040902054811061070b5760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b60448201526064016103ad565b336000908152602081905260408120805483929061072a908490611571565b9091555050604051339082156108fc029083906000818181858888f1505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107d15760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190611584565b7f0000000000000000000000000000000000000000000000000000000000000000146108b55760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610913573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610937919061151e565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146109a95760405162461bcd60e51b815260206004820152600f60248201526e2b32b09024b73137bc1037b7363c9760891b60448201526064016103ad565b60006109b5828461159d565b6109bf90866114b3565b33600090815260208190526040902054909150818110156109f25760405162461bcd60e51b81526004016103ad906115b4565b6109fc8282611571565b33600090815260208190526040808220929092559051602481018b9052604481018a905260640160408051601f198184030181529181526020820180516001600160e01b0316631195d6f560e31b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af1158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b8152600401610b389897969594939291906115eb565b60206040518083038185885af1158015610b56573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b7b9190611584565b90508a7fcafd272887d09c9615b3354aa56a477e3ba7b4095d0b6201235c2bfabe2294c582604051610baf91815260200190565b60405180910390a25050505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c48919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca9919061153b565b5092505050600154811115610cf45760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a150565b600154811015610d6c5760045415610d1e5760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df3919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610e30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e54919061153b565b9350505050600254811115610e985760028190556040518181527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b27190602001610ce9565b600254811015610d6c5760065415610ec25760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600584905560065590518281527f326636d2e3d2c0d42c0fb6fd9f30ab0fcde3dff35e63db28f8abc38d566057f49101610ce9565b6000610f18828461159d565b610f2290866114b3565b3360009081526020819052604090205490915081811015610f555760405162461bcd60e51b81526004016103ad906115b4565b610f5f8282611571565b3360009081526020819052604080822092909255600254915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b031663710cc9a760e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561101f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611043919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b815260040161109f9897969594939291906115eb565b60206040518083038185885af11580156110bd573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110e29190611584565b90507f0bb0de69fc6722b8061f8161f450a46b49fd536c11535aab912024d630d505cf8160405161111591815260200190565b60405180910390a1505050505050505050565b6000611134828461159d565b61113e90866114b3565b33600090815260208190526040902054909150818110156111715760405162461bcd60e51b81526004016103ad906115b4565b61117b8282611571565b3360009081526020819052604080822092909255600154915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b0316632c19251960e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561123b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125f919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b81526004016112bb9897969594939291906115eb565b60206040518083038185885af11580156112d9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112fe9190611584565b90507fe68d5d0ca95adf855ddd4733abf1d205e40aaef86e1c7795f4002791d5e28a388160405161111591815260200190565b33600090815260208190526040812080543492906113509084906114b3565b9091555050565b60006020828403121561136957600080fd5b5035919050565b6001600160a01b0381168114610d6c57600080fd5b600080600080600080600060e0888a0312156113a057600080fd5b8735965060208801359550604088013594506060880135935060808801356113c781611370565b9699959850939692959460a0840135945060c09093013592915050565b6000602082840312156113f657600080fd5b813561140181611370565b9392505050565b600080600080600060a0868803121561142057600080fd5b8535945060208601359350604086013561143981611370565b94979396509394606081013594506080013592915050565b6020808252602c908201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560408201526b30b9b2903932b8bab2b9ba1760a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156114c6576114c661149d565b92915050565b60208082526032908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152711034b99039ba34b636103832b73234b7339760711b606082015260800190565b60006020828403121561153057600080fd5b815161140181611370565b6000806000806080858703121561155157600080fd5b505082516020840151604085015160609095015191969095509092509050565b818103818111156114c6576114c661149d565b60006020828403121561159657600080fd5b5051919050565b80820281158282048414176114c6576114c661149d565b6020808252601c908201527f496e73756666696369656e74204c32206761732062616c616e63652e00000000604082015260600190565b600061010060018060a01b03808c16845260208b818601528a6040860152818a16606086015281891660808601528760a08601528660c08601528260e0860152855191508183860152600092505b8183101561165857858301810151858401610120015291820191611639565b506101209150600082828601015281601f19601f830116850101925050509998505050505050505050565b60208082526031908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152701030b63932b0b23c903832b73234b7339760791b60608201526080019056fea26469706673582212206d347ab6da12947fbbaaedb3059a0725b4bd0933fadda0023baef951f2c4a69464736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101095760003560e01c806365b0183511610095578063b6d7aeff11610064578063b6d7aeff146102f9578063c4977c8b14610319578063d0e30db014610339578063e78cea9214610341578063e813a7551461037557600080fd5b806365b018351461026857806377a43648146102955780637e260880146102aa5780639e75a705146102c557600080fd5b80631ff47dc0116100dc5780631ff47dc0146101ca5780632e1a7d4d146101df5780634738b97f146101ff578063507b5ad3146102335780635f43a47f1461025357600080fd5b8063051d19701461010e5780630c63fa84146101435780630e56752e1461015a5780631062b39a1461017e575b600080fd5b34801561011a57600080fd5b50600354600454610129919082565b604080519283526020830191909152015b60405180910390f35b34801561014f57600080fd5b5061015861038b565b005b34801561016657600080fd5b5061017060025481565b60405190815260200161013a565b34801561018a57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013a565b3480156101d657600080fd5b50610158610528565b3480156101eb57600080fd5b506101586101fa366004611357565b6106b5565b34801561020b57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561023f57600080fd5b5061015861024e366004611385565b61074e565b34801561025f57600080fd5b50610158610bc4565b34801561027457600080fd5b506101706102833660046113e4565b60006020819052908152604090205481565b3480156102a157600080fd5b50610158610d6f565b3480156102b657600080fd5b50600554600654610129919082565b3480156102d157600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561030557600080fd5b50610158610314366004611408565b610f0c565b34801561032557600080fd5b50610158610334366004611408565b611128565b610158611331565b34801561034d57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561038157600080fd5b5061017060015481565b6004546000036103b65760405162461bcd60e51b81526004016103ad90611451565b60405180910390fd5b6001546004546103c691906114b3565b42116103e45760405162461bcd60e51b81526004016103ad906114cc565b6003805460009182905560048281556040805163ee35f32760e01b815290519293926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263ee35f327928082019260209290918290030181865afa158015610459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047d919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de919061153b565b50925050508181036105245760018290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60065460000361054a5760405162461bcd60e51b81526004016103ad90611451565b60025460065461055a91906114b3565b42116105785760405162461bcd60e51b81526004016103ad906114cc565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156105ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610613919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610674919061153b565b93505050508181036105245760028290556040518281527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b2719060200161051b565b33600090815260208190526040902054811061070b5760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b60448201526064016103ad565b336000908152602081905260408120805483929061072a908490611571565b9091555050604051339082156108fc029083906000818181858888f1505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107d15760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190611584565b7f0000000000000000000000000000000000000000000000000000000000000000146108b55760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610913573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610937919061151e565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146109a95760405162461bcd60e51b815260206004820152600f60248201526e2b32b09024b73137bc1037b7363c9760891b60448201526064016103ad565b60006109b5828461159d565b6109bf90866114b3565b33600090815260208190526040902054909150818110156109f25760405162461bcd60e51b81526004016103ad906115b4565b6109fc8282611571565b33600090815260208190526040808220929092559051602481018b9052604481018a905260640160408051601f198184030181529181526020820180516001600160e01b0316631195d6f560e31b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af1158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b8152600401610b389897969594939291906115eb565b60206040518083038185885af1158015610b56573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b7b9190611584565b90508a7fcafd272887d09c9615b3354aa56a477e3ba7b4095d0b6201235c2bfabe2294c582604051610baf91815260200190565b60405180910390a25050505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c48919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca9919061153b565b5092505050600154811115610cf45760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a150565b600154811015610d6c5760045415610d1e5760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df3919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610e30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e54919061153b565b9350505050600254811115610e985760028190556040518181527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b27190602001610ce9565b600254811015610d6c5760065415610ec25760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600584905560065590518281527f326636d2e3d2c0d42c0fb6fd9f30ab0fcde3dff35e63db28f8abc38d566057f49101610ce9565b6000610f18828461159d565b610f2290866114b3565b3360009081526020819052604090205490915081811015610f555760405162461bcd60e51b81526004016103ad906115b4565b610f5f8282611571565b3360009081526020819052604080822092909255600254915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b031663710cc9a760e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561101f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611043919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b815260040161109f9897969594939291906115eb565b60206040518083038185885af11580156110bd573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110e29190611584565b90507f0bb0de69fc6722b8061f8161f450a46b49fd536c11535aab912024d630d505cf8160405161111591815260200190565b60405180910390a1505050505050505050565b6000611134828461159d565b61113e90866114b3565b33600090815260208190526040902054909150818110156111715760405162461bcd60e51b81526004016103ad906115b4565b61117b8282611571565b3360009081526020819052604080822092909255600154915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b0316632c19251960e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561123b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125f919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b81526004016112bb9897969594939291906115eb565b60206040518083038185885af11580156112d9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112fe9190611584565b90507fe68d5d0ca95adf855ddd4733abf1d205e40aaef86e1c7795f4002791d5e28a388160405161111591815260200190565b33600090815260208190526040812080543492906113509084906114b3565b9091555050565b60006020828403121561136957600080fd5b5035919050565b6001600160a01b0381168114610d6c57600080fd5b600080600080600080600060e0888a0312156113a057600080fd5b8735965060208801359550604088013594506060880135935060808801356113c781611370565b9699959850939692959460a0840135945060c09093013592915050565b6000602082840312156113f657600080fd5b813561140181611370565b9392505050565b600080600080600060a0868803121561142057600080fd5b8535945060208601359350604086013561143981611370565b94979396509394606081013594506080013592915050565b6020808252602c908201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560408201526b30b9b2903932b8bab2b9ba1760a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156114c6576114c661149d565b92915050565b60208082526032908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152711034b99039ba34b636103832b73234b7339760711b606082015260800190565b60006020828403121561153057600080fd5b815161140181611370565b6000806000806080858703121561155157600080fd5b505082516020840151604085015160609095015191969095509092509050565b818103818111156114c6576114c661149d565b60006020828403121561159657600080fd5b5051919050565b80820281158282048414176114c6576114c661149d565b6020808252601c908201527f496e73756666696369656e74204c32206761732062616c616e63652e00000000604082015260600190565b600061010060018060a01b03808c16845260208b818601528a6040860152818a16606086015281891660808601528760a08601528660c08601528260e0860152855191508183860152600092505b8183101561165857858301810151858401610120015291820191611639565b506101209150600082828601015281601f19601f830116850101925050509998505050505050505050565b60208082526031908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152701030b63932b0b23c903832b73234b7339760791b60608201526080019056fea26469706673582212206d347ab6da12947fbbaaedb3059a0725b4bd0933fadda0023baef951f2c4a69464736f6c63430008120033", + "devdoc": { + "details": "Router from Gnosis Chain to Arbitrum. Note: This contract is deployed on Ethereum.", + "events": { + "Routed(uint256,uint256)": { + "details": "Event emitted when a message is relayed to another Safe Bridge.", + "params": { + "_epoch": "The epoch of the batch requested to send.", + "_ticketID": "The unique identifier provided by the underlying canonical bridge." + } + }, + "sequencerDelayLimitDecreaseRequested(uint256)": { + "details": "This event indicates that a request to decrease the sequencer delay limit has been made.", + "params": { + "_requestedSequencerDelayLimit": "The new sequencer limit requested." + } + }, + "sequencerDelayLimitSent(uint256)": { + "details": "This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value", + "params": { + "_ticketID": "The ticketID from the delayed inbox of the cross-chain message." + } + }, + "sequencerDelayLimitUpdated(uint256)": { + "details": "This event indicates the sequencer delay limit updated.", + "params": { + "_newSequencerDelayLimit": "The new sequencer delay limit." + } + }, + "sequencerFutureLimitDecreaseRequested(uint256)": { + "details": "This event indicates that a request to decrease the sequencer future limit has been made.", + "params": { + "_requestedSequencerFutureLimit": "The new sequencer limit requested." + } + }, + "sequencerFutureLimitSent(uint256)": { + "details": "This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value", + "params": { + "_ticketID": "The ticketID from the delayed inbox of the cross-chain message." + } + }, + "sequencerFutureLimitUpdated(uint256)": { + "details": "This event indicates the sequencer future limit updated.", + "params": { + "_newSequencerFutureLimit": "The new sequencer future limit." + } + } + }, + "kind": "dev", + "methods": { + "constructor": { + "details": "Constructor.", + "params": { + "_amb": "The address of the AMB contract on Ethereum.", + "_bridge": "The address of the arbitrum bridge contract on Ethereum.", + "_inboxChainId": "The chain ID of the inbox chain.", + "_veaInboxArbToGnosis": "The vea inbox on Arbitrum.", + "_veaOutboxArbToGnosis": "The vea outbox on Gnosis Chain." + } + }, + "executeSequencerDelayLimitDecreaseRequest()": { + "details": "execute sequencerDelayLimitDecreaseRequest" + }, + "executeSequencerFutureLimitDecreaseRequest()": { + "details": "execute sequencerFutureLimitDecreaseRequest" + }, + "route(uint256,bytes32,uint256,uint256,address,uint256,uint256)": { + "details": "Resolves any challenge of the optimistic claim for '_epoch'.", + "params": { + "_epoch": "The epoch to verify.", + "_excessFeeRefundAddress": "Address to refund any excess fee to.", + "_gasLimit": "Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).", + "_inboxIndex": "The index of the inbox in the Arbitrum bridge contract.", + "_maxFeePerGas": "price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).", + "_maxSubmissionCost": "Max gas deducted from user's L2 balance to cover base submission fee.", + "_stateroot": "The true state root for the epoch." + } + }, + "sendSequencerDelayLimit(uint256,uint256,address,uint256,uint256)": { + "details": "Send the sequencer delay limit through the delayed inbox." + }, + "sendSequencerFutureLimit(uint256,uint256,address,uint256,uint256)": { + "details": "Send the sequencer future limit through the delayed inbox." + }, + "updateSequencerDelayLimit()": { + "details": "Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution." + }, + "updateSequencerFutureLimit()": { + "details": "Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "route(uint256,bytes32,uint256,uint256,address,uint256,uint256)": { + "notice": "Note: Access restricted to arbitrum canonical bridge." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 7480, + "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", + "label": "L2GasBalance", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 7482, + "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", + "label": "sequencerDelayLimit", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 7484, + "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", + "label": "sequencerFutureLimit", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 7487, + "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", + "label": "sequencerDelayLimitDecreaseRequest", + "offset": 0, + "slot": "3", + "type": "t_struct(SequencerLimitDecreaseRequest)7495_storage" + }, + { + "astId": 7490, + "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", + "label": "sequencerFutureLimitDecreaseRequest", + "offset": 0, + "slot": "5", + "type": "t_struct(SequencerLimitDecreaseRequest)7495_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(SequencerLimitDecreaseRequest)7495_storage": { + "encoding": "inplace", + "label": "struct RouterGnosisToArb.SequencerLimitDecreaseRequest", + "members": [ + { + "astId": 7492, + "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", + "label": "requestedSequencerLimit", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 7494, + "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", + "label": "timestamp", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} diff --git a/contracts/deployments/goerli/RouterGnosisToArbTestnet.json b/contracts/deployments/goerli/RouterGnosisToArbTestnet.json new file mode 100644 index 00000000..e13dd5f2 --- /dev/null +++ b/contracts/deployments/goerli/RouterGnosisToArbTestnet.json @@ -0,0 +1,651 @@ +{ + "address": "0xC21c20a719fAc23c54c336FA0E16a0CFdC4baA00", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IBridge", + "name": "_bridge", + "type": "address" + }, + { + "internalType": "contract IAMB", + "name": "_amb", + "type": "address" + }, + { + "internalType": "address", + "name": "_veaInboxArbToGnosis", + "type": "address" + }, + { + "internalType": "address", + "name": "_veaOutboxArbToGnosis", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_inboxChainId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_ticketID", + "type": "uint256" + } + ], + "name": "Routed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_requestedSequencerDelayLimit", + "type": "uint256" + } + ], + "name": "sequencerDelayLimitDecreaseRequested", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_ticketID", + "type": "uint256" + } + ], + "name": "sequencerDelayLimitSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newSequencerDelayLimit", + "type": "uint256" + } + ], + "name": "sequencerDelayLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_requestedSequencerFutureLimit", + "type": "uint256" + } + ], + "name": "sequencerFutureLimitDecreaseRequested", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_ticketID", + "type": "uint256" + } + ], + "name": "sequencerFutureLimitSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newSequencerFutureLimit", + "type": "uint256" + } + ], + "name": "sequencerFutureLimitUpdated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "L2GasBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "amb", + "outputs": [ + { + "internalType": "contract IAMB", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "bridge", + "outputs": [ + { + "internalType": "contract IBridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "executeSequencerDelayLimitDecreaseRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "executeSequencerFutureLimitDecreaseRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_stateroot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_inboxIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxSubmissionCost", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_excessFeeRefundAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxFeePerGas", + "type": "uint256" + } + ], + "name": "route", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_inboxIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxSubmissionCost", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_excessFeeRefundAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxFeePerGas", + "type": "uint256" + } + ], + "name": "sendSequencerDelayLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_inboxIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxSubmissionCost", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_excessFeeRefundAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxFeePerGas", + "type": "uint256" + } + ], + "name": "sendSequencerFutureLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerDelayLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerDelayLimitDecreaseRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestedSequencerLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerFutureLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerFutureLimitDecreaseRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestedSequencerLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updateSequencerDelayLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "updateSequencerFutureLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "veaInboxGnosisToArb", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "veaOutboxGnosisToArb", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xb10dea8416999f1d59f314e6911cd0e58f7d7e2fc8874059914aada67bb34b9d", + "receipt": { + "to": null, + "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", + "contractAddress": "0xC21c20a719fAc23c54c336FA0E16a0CFdC4baA00", + "transactionIndex": 14, + "gasUsed": "1392489", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000800000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xcef9c424795a4bf31c36238071305a1cd6c2b6b3379b0aabc19d203c03e7cf6f", + "transactionHash": "0xb10dea8416999f1d59f314e6911cd0e58f7d7e2fc8874059914aada67bb34b9d", + "logs": [ + { + "transactionIndex": 14, + "blockNumber": 9254080, + "transactionHash": "0xb10dea8416999f1d59f314e6911cd0e58f7d7e2fc8874059914aada67bb34b9d", + "address": "0xC21c20a719fAc23c54c336FA0E16a0CFdC4baA00", + "topics": [ + "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000015180", + "logIndex": 34, + "blockHash": "0xcef9c424795a4bf31c36238071305a1cd6c2b6b3379b0aabc19d203c03e7cf6f" + } + ], + "blockNumber": 9254080, + "cumulativeGasUsed": "3215058", + "status": 1, + "byzantium": true + }, + "args": [ + "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", + "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", + "0xB10EF39cc9b45A8EAfa87655063E3dD83D675075", + "0x663697f5748c5f4d46a15114Dde5514356E794F4", + 5 + ], + "numDeployments": 1, + "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_inboxChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"L2GasBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerFutureLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Gnosis Chain to Arbitrum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,uint256)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer delay limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(uint256)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value\",\"params\":{\"_ticketID\":\"The ticketID from the delayed inbox of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer delay limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}},\"sequencerFutureLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer future limit has been made.\",\"params\":{\"_requestedSequencerFutureLimit\":\"The new sequencer limit requested.\"}},\"sequencerFutureLimitSent(uint256)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value\",\"params\":{\"_ticketID\":\"The ticketID from the delayed inbox of the cross-chain message.\"}},\"sequencerFutureLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer future limit updated.\",\"params\":{\"_newSequencerFutureLimit\":\"The new sequencer future limit.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_inboxChainId\":\"The chain ID of the inbox chain.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"executeSequencerFutureLimitDecreaseRequest()\":{\"details\":\"execute sequencerFutureLimitDecreaseRequest\"},\"route(uint256,bytes32,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to.\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee.\",\"_stateroot\":\"The true state root for the epoch.\"}},\"sendSequencerDelayLimit(uint256,uint256,address,uint256,uint256)\":{\"details\":\"Send the sequencer delay limit through the delayed inbox.\"},\"sendSequencerFutureLimit(uint256,uint256,address,uint256,uint256)\":{\"details\":\"Send the sequencer future limit through the delayed inbox.\"},\"updateSequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"},\"updateSequencerFutureLimit()\":{\"details\":\"Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,uint256,uint256,address,uint256,uint256)\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/RouterGnosisToArb.sol\":\"RouterGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IInbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IInbox.sol\\n// proxy: https://etherscan.io/address/0x4Dbd4fc535Ac27206064B68FfCf827b0A60BAB3f\\n// implementation: https://etherscan.io/address/0x5aed5f8a1e3607476f1f81c3d8fe126deb0afe94\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface IInbox {\\n function bridge() external view returns (IBridge);\\n\\n /**\\n * @notice Put a message in the L2 inbox that can be reexecuted for some fixed amount of time if it reverts\\n * @dev all msg.value will deposited to callValueRefundAddress on L2\\n * @dev Gas limit and maxFeePerGas should not be set to 1 as that is used to trigger the RetryableData error\\n * @param to destination L2 contract address\\n * @param l2CallValue call value for retryable L2 message\\n * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n * @param excessFeeRefundAddress gasLimit x maxFeePerGas - execution cost gets credited here on L2 balance\\n * @param callValueRefundAddress l2Callvalue gets credited here on L2 if retryable txn times out or gets cancelled\\n * @param gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n * @param maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n * @param data ABI encoded data of L2 message\\n * @return unique message number of the retryable transaction\\n */\\n function createRetryableTicket(\\n address to,\\n uint256 l2CallValue,\\n uint256 maxSubmissionCost,\\n address excessFeeRefundAddress,\\n address callValueRefundAddress,\\n uint256 gasLimit,\\n uint256 maxFeePerGas,\\n bytes calldata data\\n ) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x2497d8bd48681de9d2b9929152afbc3ad5508923cce0eb4e863bf576955ddec2\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/RouterGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerFutureUpdatable.sol\\\";\\n\\n/// @dev Router from Gnosis Chain to Arbitrum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterGnosisToArb is IRouterToArb {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxGnosisToArb; // The address of the veaInbox on Gnosis.\\n address public immutable veaOutboxGnosisToArb; // The address of the veaOutbox on Arbitrum.\\n uint256 internal immutable inboxChainId; // The chain ID of the inbox chain.\\n\\n mapping(address => uint256) public L2GasBalance;\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n SequencerLimitDecreaseRequest public sequencerFutureLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, uint256 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value\\n /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message.\\n event sequencerDelayLimitSent(uint256 _ticketID);\\n\\n /// @dev This event indicates the sequencer delay limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer delay limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value\\n /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message.\\n event sequencerFutureLimitSent(uint256 _ticketID);\\n\\n /// @dev This event indicates the sequencer future limit updated.\\n /// @param _newSequencerFutureLimit The new sequencer future limit.\\n event sequencerFutureLimitUpdated(uint256 _newSequencerFutureLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer future limit has been made.\\n /// @param _requestedSequencerFutureLimit The new sequencer limit requested.\\n event sequencerFutureLimitDecreaseRequested(uint256 _requestedSequencerFutureLimit);\\n\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n /// @param _inboxChainId The chain ID of the inbox chain.\\n constructor(\\n IBridge _bridge, \\n IAMB _amb,\\n address _veaInboxArbToGnosis,\\n address _veaOutboxArbToGnosis,\\n uint256 _inboxChainId\\n ) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxGnosisToArb = _veaInboxArbToGnosis;\\n veaOutboxGnosisToArb = _veaOutboxArbToGnosis;\\n inboxChainId = _inboxChainId;\\n\\n updateSequencerDelayLimit();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerFutureLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , , uint256 newSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerFutureLimit > sequencerFutureLimit) {\\n // For sequencerFutureLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerFutureLimit = newSequencerFutureLimit;\\n emit sequencerFutureLimitUpdated(newSequencerFutureLimit);\\n } else if (newSequencerFutureLimit < sequencerFutureLimit) {\\n require(\\n sequencerFutureLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerFutureLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerFutureLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerFutureLimitDecreaseRequested(newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerFutureLimitDecreaseRequest\\n function executeSequencerFutureLimitDecreaseRequest() external {\\n require(sequencerFutureLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerFutureLimitDecreaseRequest.timestamp + sequencerFutureLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerFutureLimit = sequencerFutureLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerFutureLimitDecreaseRequest;\\n\\n (, , , uint256 currentSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerFutureLimit == requestedSequencerFutureLimit) {\\n sequencerFutureLimit = requestedSequencerFutureLimit;\\n emit sequencerFutureLimitUpdated(requestedSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Send the sequencer future limit through the delayed inbox.\\n function sendSequencerFutureLimit(\\n uint256 _inboxIndex, \\n uint256 _maxSubmissionCost, \\n address _excessFeeRefundAddress, \\n uint256 _gasLimit, \\n uint256 _maxFeePerGas\\n ) external {\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n \\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(\\n ISequencerFutureUpdatable.updateSequencerFutureLimit,\\n (sequencerFutureLimit, block.timestamp)\\n );\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n \\n emit sequencerFutureLimitSent(ticketID);\\n }\\n\\n /// @dev Send the sequencer delay limit through the delayed inbox.\\n function sendSequencerDelayLimit(\\n uint256 _inboxIndex, \\n uint256 _maxSubmissionCost, \\n address _excessFeeRefundAddress, \\n uint256 _gasLimit, \\n uint256 _maxFeePerGas\\n ) external {\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n \\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n \\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function deposit() external payable{\\n L2GasBalance[msg.sender] += msg.value;\\n }\\n\\n function withdraw(uint256 _amount) external{\\n require(L2GasBalance[msg.sender] > _amount, \\\"Insufficient balance.\\\");\\n L2GasBalance[msg.sender] -= _amount;\\n payable(msg.sender).send(_amount); // User is responsible for accepting ETH.\\n }\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee.\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to.\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\\n function route(\\n uint256 _epoch, \\n bytes32 _stateroot, \\n uint256 _inboxIndex, \\n uint256 _maxSubmissionCost, \\n address _excessFeeRefundAddress, \\n uint256 _gasLimit, \\n uint256 _maxFeePerGas\\n ) external {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(inboxChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(veaInboxGnosisToArb == amb.messageSender(), \\\"Vea Inbox only.\\\");\\n\\n // Ethereum -> Arbitrum message passing with retryable tickets in the delayed inbox, the canonical Ethereum -> Arbitrum bridge.\\n // https://developer.arbitrum.io/arbos/l1-to-l2-messaging#submission\\n\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n \\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL2.resolveDisputedClaim, (_epoch, _stateroot));\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x1594be4399e2c77f45f6cc7acecb602172cfe387fe95ad78016f0838097829a3\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerFutureUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerFutureUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerFutureUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerFutureLimit The futureSeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0x5c8b8ffaec923126ec1699d9c1483329b5a660837803aefc4aa95d9f091ef21f\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101206040523480156200001257600080fd5b5060405162001aeb38038062001aeb833981016040819052620000359162000268565b6001600160a01b0380861660805284811660a05283811660c052821660e052610100819052620000646200006f565b50505050506200033a565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d89190620002dc565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000116573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200013c919062000303565b5092505050600154811115620001875760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6001548110156200024f5760045415620002015760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6001600160a01b03811681146200024f57600080fd5b600080600080600060a086880312156200028157600080fd5b85516200028e8162000252565b6020870151909550620002a18162000252565b6040870151909450620002b48162000252565b6060870151909350620002c78162000252565b80925050608086015190509295509295909350565b600060208284031215620002ef57600080fd5b8151620002fc8162000252565b9392505050565b600080600080608085870312156200031a57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e0516101005161170a620003e1600039600061085501526000818161021101528181610aed0152818161105401526112700152600081816102d7015261094201526000818161019001528181610759015281816107d301526108b701526000818161035301528181610410015281816105a401528181610a6f01528181610bc801528181610d7301528181610fd601526111f2015261170a6000f3fe6080604052600436106101095760003560e01c806365b0183511610095578063b6d7aeff11610064578063b6d7aeff146102f9578063c4977c8b14610319578063d0e30db014610339578063e78cea9214610341578063e813a7551461037557600080fd5b806365b018351461026857806377a43648146102955780637e260880146102aa5780639e75a705146102c557600080fd5b80631ff47dc0116100dc5780631ff47dc0146101ca5780632e1a7d4d146101df5780634738b97f146101ff578063507b5ad3146102335780635f43a47f1461025357600080fd5b8063051d19701461010e5780630c63fa84146101435780630e56752e1461015a5780631062b39a1461017e575b600080fd5b34801561011a57600080fd5b50600354600454610129919082565b604080519283526020830191909152015b60405180910390f35b34801561014f57600080fd5b5061015861038b565b005b34801561016657600080fd5b5061017060025481565b60405190815260200161013a565b34801561018a57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013a565b3480156101d657600080fd5b50610158610528565b3480156101eb57600080fd5b506101586101fa366004611357565b6106b5565b34801561020b57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561023f57600080fd5b5061015861024e366004611385565b61074e565b34801561025f57600080fd5b50610158610bc4565b34801561027457600080fd5b506101706102833660046113e4565b60006020819052908152604090205481565b3480156102a157600080fd5b50610158610d6f565b3480156102b657600080fd5b50600554600654610129919082565b3480156102d157600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561030557600080fd5b50610158610314366004611408565b610f0c565b34801561032557600080fd5b50610158610334366004611408565b611128565b610158611331565b34801561034d57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561038157600080fd5b5061017060015481565b6004546000036103b65760405162461bcd60e51b81526004016103ad90611451565b60405180910390fd5b6001546004546103c691906114b3565b42116103e45760405162461bcd60e51b81526004016103ad906114cc565b6003805460009182905560048281556040805163ee35f32760e01b815290519293926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263ee35f327928082019260209290918290030181865afa158015610459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047d919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de919061153b565b50925050508181036105245760018290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60065460000361054a5760405162461bcd60e51b81526004016103ad90611451565b60025460065461055a91906114b3565b42116105785760405162461bcd60e51b81526004016103ad906114cc565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156105ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610613919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610674919061153b565b93505050508181036105245760028290556040518281527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b2719060200161051b565b33600090815260208190526040902054811061070b5760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b60448201526064016103ad565b336000908152602081905260408120805483929061072a908490611571565b9091555050604051339082156108fc029083906000818181858888f1505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107d15760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190611584565b7f0000000000000000000000000000000000000000000000000000000000000000146108b55760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610913573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610937919061151e565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146109a95760405162461bcd60e51b815260206004820152600f60248201526e2b32b09024b73137bc1037b7363c9760891b60448201526064016103ad565b60006109b5828461159d565b6109bf90866114b3565b33600090815260208190526040902054909150818110156109f25760405162461bcd60e51b81526004016103ad906115b4565b6109fc8282611571565b33600090815260208190526040808220929092559051602481018b9052604481018a905260640160408051601f198184030181529181526020820180516001600160e01b0316631195d6f560e31b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af1158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b8152600401610b389897969594939291906115eb565b60206040518083038185885af1158015610b56573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b7b9190611584565b90508a7fcafd272887d09c9615b3354aa56a477e3ba7b4095d0b6201235c2bfabe2294c582604051610baf91815260200190565b60405180910390a25050505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c48919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca9919061153b565b5092505050600154811115610cf45760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a150565b600154811015610d6c5760045415610d1e5760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df3919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610e30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e54919061153b565b9350505050600254811115610e985760028190556040518181527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b27190602001610ce9565b600254811015610d6c5760065415610ec25760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600584905560065590518281527f326636d2e3d2c0d42c0fb6fd9f30ab0fcde3dff35e63db28f8abc38d566057f49101610ce9565b6000610f18828461159d565b610f2290866114b3565b3360009081526020819052604090205490915081811015610f555760405162461bcd60e51b81526004016103ad906115b4565b610f5f8282611571565b3360009081526020819052604080822092909255600254915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b031663710cc9a760e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561101f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611043919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b815260040161109f9897969594939291906115eb565b60206040518083038185885af11580156110bd573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110e29190611584565b90507f0bb0de69fc6722b8061f8161f450a46b49fd536c11535aab912024d630d505cf8160405161111591815260200190565b60405180910390a1505050505050505050565b6000611134828461159d565b61113e90866114b3565b33600090815260208190526040902054909150818110156111715760405162461bcd60e51b81526004016103ad906115b4565b61117b8282611571565b3360009081526020819052604080822092909255600154915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b0316632c19251960e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561123b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125f919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b81526004016112bb9897969594939291906115eb565b60206040518083038185885af11580156112d9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112fe9190611584565b90507fe68d5d0ca95adf855ddd4733abf1d205e40aaef86e1c7795f4002791d5e28a388160405161111591815260200190565b33600090815260208190526040812080543492906113509084906114b3565b9091555050565b60006020828403121561136957600080fd5b5035919050565b6001600160a01b0381168114610d6c57600080fd5b600080600080600080600060e0888a0312156113a057600080fd5b8735965060208801359550604088013594506060880135935060808801356113c781611370565b9699959850939692959460a0840135945060c09093013592915050565b6000602082840312156113f657600080fd5b813561140181611370565b9392505050565b600080600080600060a0868803121561142057600080fd5b8535945060208601359350604086013561143981611370565b94979396509394606081013594506080013592915050565b6020808252602c908201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560408201526b30b9b2903932b8bab2b9ba1760a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156114c6576114c661149d565b92915050565b60208082526032908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152711034b99039ba34b636103832b73234b7339760711b606082015260800190565b60006020828403121561153057600080fd5b815161140181611370565b6000806000806080858703121561155157600080fd5b505082516020840151604085015160609095015191969095509092509050565b818103818111156114c6576114c661149d565b60006020828403121561159657600080fd5b5051919050565b80820281158282048414176114c6576114c661149d565b6020808252601c908201527f496e73756666696369656e74204c32206761732062616c616e63652e00000000604082015260600190565b600061010060018060a01b03808c16845260208b818601528a6040860152818a16606086015281891660808601528760a08601528660c08601528260e0860152855191508183860152600092505b8183101561165857858301810151858401610120015291820191611639565b506101209150600082828601015281601f19601f830116850101925050509998505050505050505050565b60208082526031908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152701030b63932b0b23c903832b73234b7339760791b60608201526080019056fea26469706673582212206d347ab6da12947fbbaaedb3059a0725b4bd0933fadda0023baef951f2c4a69464736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101095760003560e01c806365b0183511610095578063b6d7aeff11610064578063b6d7aeff146102f9578063c4977c8b14610319578063d0e30db014610339578063e78cea9214610341578063e813a7551461037557600080fd5b806365b018351461026857806377a43648146102955780637e260880146102aa5780639e75a705146102c557600080fd5b80631ff47dc0116100dc5780631ff47dc0146101ca5780632e1a7d4d146101df5780634738b97f146101ff578063507b5ad3146102335780635f43a47f1461025357600080fd5b8063051d19701461010e5780630c63fa84146101435780630e56752e1461015a5780631062b39a1461017e575b600080fd5b34801561011a57600080fd5b50600354600454610129919082565b604080519283526020830191909152015b60405180910390f35b34801561014f57600080fd5b5061015861038b565b005b34801561016657600080fd5b5061017060025481565b60405190815260200161013a565b34801561018a57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013a565b3480156101d657600080fd5b50610158610528565b3480156101eb57600080fd5b506101586101fa366004611357565b6106b5565b34801561020b57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561023f57600080fd5b5061015861024e366004611385565b61074e565b34801561025f57600080fd5b50610158610bc4565b34801561027457600080fd5b506101706102833660046113e4565b60006020819052908152604090205481565b3480156102a157600080fd5b50610158610d6f565b3480156102b657600080fd5b50600554600654610129919082565b3480156102d157600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561030557600080fd5b50610158610314366004611408565b610f0c565b34801561032557600080fd5b50610158610334366004611408565b611128565b610158611331565b34801561034d57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561038157600080fd5b5061017060015481565b6004546000036103b65760405162461bcd60e51b81526004016103ad90611451565b60405180910390fd5b6001546004546103c691906114b3565b42116103e45760405162461bcd60e51b81526004016103ad906114cc565b6003805460009182905560048281556040805163ee35f32760e01b815290519293926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263ee35f327928082019260209290918290030181865afa158015610459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047d919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de919061153b565b50925050508181036105245760018290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60065460000361054a5760405162461bcd60e51b81526004016103ad90611451565b60025460065461055a91906114b3565b42116105785760405162461bcd60e51b81526004016103ad906114cc565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156105ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610613919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610674919061153b565b93505050508181036105245760028290556040518281527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b2719060200161051b565b33600090815260208190526040902054811061070b5760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b60448201526064016103ad565b336000908152602081905260408120805483929061072a908490611571565b9091555050604051339082156108fc029083906000818181858888f1505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107d15760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190611584565b7f0000000000000000000000000000000000000000000000000000000000000000146108b55760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610913573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610937919061151e565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146109a95760405162461bcd60e51b815260206004820152600f60248201526e2b32b09024b73137bc1037b7363c9760891b60448201526064016103ad565b60006109b5828461159d565b6109bf90866114b3565b33600090815260208190526040902054909150818110156109f25760405162461bcd60e51b81526004016103ad906115b4565b6109fc8282611571565b33600090815260208190526040808220929092559051602481018b9052604481018a905260640160408051601f198184030181529181526020820180516001600160e01b0316631195d6f560e31b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af1158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b8152600401610b389897969594939291906115eb565b60206040518083038185885af1158015610b56573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b7b9190611584565b90508a7fcafd272887d09c9615b3354aa56a477e3ba7b4095d0b6201235c2bfabe2294c582604051610baf91815260200190565b60405180910390a25050505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c48919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca9919061153b565b5092505050600154811115610cf45760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a150565b600154811015610d6c5760045415610d1e5760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df3919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610e30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e54919061153b565b9350505050600254811115610e985760028190556040518181527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b27190602001610ce9565b600254811015610d6c5760065415610ec25760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600584905560065590518281527f326636d2e3d2c0d42c0fb6fd9f30ab0fcde3dff35e63db28f8abc38d566057f49101610ce9565b6000610f18828461159d565b610f2290866114b3565b3360009081526020819052604090205490915081811015610f555760405162461bcd60e51b81526004016103ad906115b4565b610f5f8282611571565b3360009081526020819052604080822092909255600254915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b031663710cc9a760e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561101f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611043919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b815260040161109f9897969594939291906115eb565b60206040518083038185885af11580156110bd573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110e29190611584565b90507f0bb0de69fc6722b8061f8161f450a46b49fd536c11535aab912024d630d505cf8160405161111591815260200190565b60405180910390a1505050505050505050565b6000611134828461159d565b61113e90866114b3565b33600090815260208190526040902054909150818110156111715760405162461bcd60e51b81526004016103ad906115b4565b61117b8282611571565b3360009081526020819052604080822092909255600154915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b0316632c19251960e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561123b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125f919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b81526004016112bb9897969594939291906115eb565b60206040518083038185885af11580156112d9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112fe9190611584565b90507fe68d5d0ca95adf855ddd4733abf1d205e40aaef86e1c7795f4002791d5e28a388160405161111591815260200190565b33600090815260208190526040812080543492906113509084906114b3565b9091555050565b60006020828403121561136957600080fd5b5035919050565b6001600160a01b0381168114610d6c57600080fd5b600080600080600080600060e0888a0312156113a057600080fd5b8735965060208801359550604088013594506060880135935060808801356113c781611370565b9699959850939692959460a0840135945060c09093013592915050565b6000602082840312156113f657600080fd5b813561140181611370565b9392505050565b600080600080600060a0868803121561142057600080fd5b8535945060208601359350604086013561143981611370565b94979396509394606081013594506080013592915050565b6020808252602c908201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560408201526b30b9b2903932b8bab2b9ba1760a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156114c6576114c661149d565b92915050565b60208082526032908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152711034b99039ba34b636103832b73234b7339760711b606082015260800190565b60006020828403121561153057600080fd5b815161140181611370565b6000806000806080858703121561155157600080fd5b505082516020840151604085015160609095015191969095509092509050565b818103818111156114c6576114c661149d565b60006020828403121561159657600080fd5b5051919050565b80820281158282048414176114c6576114c661149d565b6020808252601c908201527f496e73756666696369656e74204c32206761732062616c616e63652e00000000604082015260600190565b600061010060018060a01b03808c16845260208b818601528a6040860152818a16606086015281891660808601528760a08601528660c08601528260e0860152855191508183860152600092505b8183101561165857858301810151858401610120015291820191611639565b506101209150600082828601015281601f19601f830116850101925050509998505050505050505050565b60208082526031908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152701030b63932b0b23c903832b73234b7339760791b60608201526080019056fea26469706673582212206d347ab6da12947fbbaaedb3059a0725b4bd0933fadda0023baef951f2c4a69464736f6c63430008120033", + "devdoc": { + "details": "Router from Gnosis Chain to Arbitrum. Note: This contract is deployed on Ethereum.", + "events": { + "Routed(uint256,uint256)": { + "details": "Event emitted when a message is relayed to another Safe Bridge.", + "params": { + "_epoch": "The epoch of the batch requested to send.", + "_ticketID": "The unique identifier provided by the underlying canonical bridge." + } + }, + "sequencerDelayLimitDecreaseRequested(uint256)": { + "details": "This event indicates that a request to decrease the sequencer delay limit has been made.", + "params": { + "_requestedSequencerDelayLimit": "The new sequencer limit requested." + } + }, + "sequencerDelayLimitSent(uint256)": { + "details": "This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value", + "params": { + "_ticketID": "The ticketID from the delayed inbox of the cross-chain message." + } + }, + "sequencerDelayLimitUpdated(uint256)": { + "details": "This event indicates the sequencer delay limit updated.", + "params": { + "_newSequencerDelayLimit": "The new sequencer delay limit." + } + }, + "sequencerFutureLimitDecreaseRequested(uint256)": { + "details": "This event indicates that a request to decrease the sequencer future limit has been made.", + "params": { + "_requestedSequencerFutureLimit": "The new sequencer limit requested." + } + }, + "sequencerFutureLimitSent(uint256)": { + "details": "This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value", + "params": { + "_ticketID": "The ticketID from the delayed inbox of the cross-chain message." + } + }, + "sequencerFutureLimitUpdated(uint256)": { + "details": "This event indicates the sequencer future limit updated.", + "params": { + "_newSequencerFutureLimit": "The new sequencer future limit." + } + } + }, + "kind": "dev", + "methods": { + "constructor": { + "details": "Constructor.", + "params": { + "_amb": "The address of the AMB contract on Ethereum.", + "_bridge": "The address of the arbitrum bridge contract on Ethereum.", + "_inboxChainId": "The chain ID of the inbox chain.", + "_veaInboxArbToGnosis": "The vea inbox on Arbitrum.", + "_veaOutboxArbToGnosis": "The vea outbox on Gnosis Chain." + } + }, + "executeSequencerDelayLimitDecreaseRequest()": { + "details": "execute sequencerDelayLimitDecreaseRequest" + }, + "executeSequencerFutureLimitDecreaseRequest()": { + "details": "execute sequencerFutureLimitDecreaseRequest" + }, + "route(uint256,bytes32,uint256,uint256,address,uint256,uint256)": { + "details": "Resolves any challenge of the optimistic claim for '_epoch'.", + "params": { + "_epoch": "The epoch to verify.", + "_excessFeeRefundAddress": "Address to refund any excess fee to.", + "_gasLimit": "Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).", + "_inboxIndex": "The index of the inbox in the Arbitrum bridge contract.", + "_maxFeePerGas": "price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).", + "_maxSubmissionCost": "Max gas deducted from user's L2 balance to cover base submission fee.", + "_stateroot": "The true state root for the epoch." + } + }, + "sendSequencerDelayLimit(uint256,uint256,address,uint256,uint256)": { + "details": "Send the sequencer delay limit through the delayed inbox." + }, + "sendSequencerFutureLimit(uint256,uint256,address,uint256,uint256)": { + "details": "Send the sequencer future limit through the delayed inbox." + }, + "updateSequencerDelayLimit()": { + "details": "Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution." + }, + "updateSequencerFutureLimit()": { + "details": "Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "route(uint256,bytes32,uint256,uint256,address,uint256,uint256)": { + "notice": "Note: Access restricted to arbitrum canonical bridge." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 7480, + "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", + "label": "L2GasBalance", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 7482, + "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", + "label": "sequencerDelayLimit", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 7484, + "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", + "label": "sequencerFutureLimit", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 7487, + "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", + "label": "sequencerDelayLimitDecreaseRequest", + "offset": 0, + "slot": "3", + "type": "t_struct(SequencerLimitDecreaseRequest)7495_storage" + }, + { + "astId": 7490, + "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", + "label": "sequencerFutureLimitDecreaseRequest", + "offset": 0, + "slot": "5", + "type": "t_struct(SequencerLimitDecreaseRequest)7495_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(SequencerLimitDecreaseRequest)7495_storage": { + "encoding": "inplace", + "label": "struct RouterGnosisToArb.SequencerLimitDecreaseRequest", + "members": [ + { + "astId": 7492, + "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", + "label": "requestedSequencerLimit", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 7494, + "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", + "label": "timestamp", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} diff --git a/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json b/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json index 4996ac51..11953fa9 100644 --- a/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json +++ b/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xb0263478A46d885D715B01fbac745500B9576634", + "address": "0xE8ea62d3a4F06301016b9C23Ace108F3D8027839", "abi": [ { "inputs": [ @@ -15,7 +15,7 @@ }, { "internalType": "uint256", - "name": "_challengePeriod", + "name": "_minChallengePeriod", "type": "uint256" }, { @@ -37,6 +37,11 @@ "internalType": "uint256", "name": "_maxMissingBlocks", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxClaimDelayEpochs", + "type": "uint256" } ], "stateMutability": "nonpayable", @@ -125,7 +130,7 @@ { "indexed": false, "internalType": "uint256", - "name": "_requestedsequencerDelayLimit", + "name": "_requestedSequencerDelayLimit", "type": "uint256" } ], @@ -138,7 +143,7 @@ { "indexed": false, "internalType": "uint256", - "name": "_newsequencerDelayLimit", + "name": "_newSequencerDelayLimit", "type": "uint256" } ], @@ -410,7 +415,7 @@ }, { "inputs": [], - "name": "executesequencerDelayLimitDecreaseRequest", + "name": "executeSequencerDelayLimitDecreaseRequest", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -484,6 +489,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "maxClaimDelayEpochs", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "maxMissingBlocks", @@ -731,7 +749,7 @@ }, { "inputs": [], - "name": "updatesequencerDelayLimit", + "name": "updateSequencerDelayLimit", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -1025,32 +1043,32 @@ "type": "function" } ], - "transactionHash": "0x308b3d8528175eb97dff6be055dcbaa933dcad3d2ff91597280d534b1d964578", + "transactionHash": "0x5c2c676f65f97dff6eb83f88f00b39eae3cae1555dfb31a7f5baf1f2dee03217", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xb0263478A46d885D715B01fbac745500B9576634", - "transactionIndex": 21, - "gasUsed": "2205677", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x76a3a297bd8529e553474ee30e3aece9de1e473b7418e373df9ccb70e4315f71", - "transactionHash": "0x308b3d8528175eb97dff6be055dcbaa933dcad3d2ff91597280d534b1d964578", + "contractAddress": "0xE8ea62d3a4F06301016b9C23Ace108F3D8027839", + "transactionIndex": 52, + "gasUsed": "2219514", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000400000000000000000000000000000000000", + "blockHash": "0xf5246e490e7c09e5f8f7e811c32b3250f587f296a2bc840e007e195b94f446e3", + "transactionHash": "0x5c2c676f65f97dff6eb83f88f00b39eae3cae1555dfb31a7f5baf1f2dee03217", "logs": [ { - "transactionIndex": 21, - "blockNumber": 9187157, - "transactionHash": "0x308b3d8528175eb97dff6be055dcbaa933dcad3d2ff91597280d534b1d964578", - "address": "0xb0263478A46d885D715B01fbac745500B9576634", + "transactionIndex": 52, + "blockNumber": 9254065, + "transactionHash": "0x5c2c676f65f97dff6eb83f88f00b39eae3cae1555dfb31a7f5baf1f2dee03217", + "address": "0xE8ea62d3a4F06301016b9C23Ace108F3D8027839", "topics": [ "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 37, - "blockHash": "0x76a3a297bd8529e553474ee30e3aece9de1e473b7418e373df9ccb70e4315f71" + "logIndex": 189, + "blockHash": "0xf5246e490e7c09e5f8f7e811c32b3250f587f296a2bc840e007e195b94f446e3" } ], - "blockNumber": 9187157, - "cumulativeGasUsed": "5571122", + "blockNumber": 9254065, + "cumulativeGasUsed": "12171994", "status": 1, "byzantium": true }, @@ -1059,15 +1077,16 @@ 1800, 0, 10000000000000, - "0x5Df4452965cd2ff87f205AE5b10b5d0F65223116", + "0xDa528e9BE20a8A22437D28Ed6C63bb6d00Ad0032", "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", - 10000000000000 + 10000000000000, + 3 ], - "numDeployments": 12, - "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEthDevnet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_bridge\":\"The address of the Arbitrum bridge contract on Ethereum.\",\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEthDevnet\":\"The address of the devnet vea inbox on Arbitrum to Ethereum.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":\"VeaOutboxArbToEthDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updatesequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x36147b323b9b28537749fc38c75ad7d3e1b3fa7f180aecb3ab90d35c6718b9e3\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToEth/VeaOutboxArbToEth.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Goerli.\\n/// Note: This contract is deployed on Goerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEthDevnet The address of the devnet vea inbox on Arbitrum to Ethereum.\\n /// @param _bridge The address of the Arbitrum bridge contract on Ethereum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEthDevnet,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n )\\n VeaOutboxArbToEth(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _veaInboxArbToEthDevnet,\\n _bridge,\\n _maxMissingBlocks\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xc790ada101869ca355f7e5f35d7480741189082573634b34c0a4464c69e043dd\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002a4438038062002a448339810160408190526200003591620002ee565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190528686868686868662000076620000ee565b620000836002886200036c565b60e0819052620000958860026200038f565b620000a19190620003af565b6101005261012051600190620000b890426200036c565b620000c49190620003af565b6001555050600780546001600160a01b0319163317905550620004219a5050505050505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000131573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001579190620003c5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000195573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001bb9190620003ea565b5092505050600454811115620002065760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ce5760065415620002805760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002e957600080fd5b919050565b600080600080600080600060e0888a0312156200030a57600080fd5b875196506020880151955060408801519450606088015193506200033160808901620002d1565b92506200034160a08901620002d1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200038a57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620003a957620003a962000356565b92915050565b81810381811115620003a957620003a962000356565b600060208284031215620003d857600080fd5b620003e382620002d1565b9392505050565b600080600080608085870312156200040157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516124f56200054f600039600081816104a10152611ea90152600081816104d5015281816108b2015281816116b40152818161183f0152611c6801526000818161055d0152611e3d015260008181610509015281816108d601528181610bdf015281816113ae015281816116d8015281816118630152611c8c015260008181611133015261126c0152600081816110e001526112240152600081816105a6015281816106b2015281816108390152818161086601528181610c22015281816112bc015281816119a901528181611a100152611dd301526000818161039d01526109c001526000818161062701528181610951015281816109ea015281816114c20152611b5501526124f56000f3fe6080604052600436106101e35760003560e01c806390784ae811610102578063c2114a1611610095578063df19e6ff11610064578063df19e6ff146105e8578063e78cea9214610615578063e813a75514610649578063eedcf2a91461065f57600080fd5b8063c2114a161461054b578063cb9384681461057f578063d0e30db014610594578063da2b7bc4146105c857600080fd5b8063aa22a1c6116100d1578063aa22a1c61461048f578063b044397e146104c3578063b5b7a184146104f7578063b633b9441461052b57600080fd5b806390784ae81461041757806390df63b71461042c578063930f28af146104595780639588eca21461047957600080fd5b80633ce43cfd1161017a578063541adcca11610149578063541adcca1461036b57806369cd250d1461038b5780638a619a71146103d75780638ad3a8f7146103f757600080fd5b80633ce43cfd146102eb5780634788cb381461030b57806349b4299e1461032b5780634a439cfe1461034b57600080fd5b80632639c060116101b65780632639c0601461027557806327ee6bdd146102a257806331d14457146102b857806331ddf743146102cb57600080fd5b806301139b68146101e8578063051d1970146101fd5780630f0adca514610232578063222ae78614610252575b600080fd5b6101fb6101f6366004612063565b610672565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb61024d366004612091565b6108b0565b34801561025e57600080fd5b50610267610bd8565b604051908152602001610229565b34801561028157600080fd5b506102676102903660046120c8565b60026020526000908152604090205481565b3480156102ae57600080fd5b5061026760015481565b6101fb6102c63660046120e1565b610c09565b3480156102d757600080fd5b506101fb6102e6366004612164565b610d89565b3480156102f757600080fd5b506101fb610306366004612226565b611029565b34801561031757600080fd5b506101fb610326366004612063565b611170565b34801561033757600080fd5b506101fb610346366004612063565b6112f4565b34801561035757600080fd5b506102676103663660046120c8565b6113a7565b34801561037757600080fd5b5061026761038636600461225f565b6113d9565b34801561039757600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b3480156103e357600080fd5b506101fb6103f2366004612282565b61142b565b34801561040357600080fd5b506007546103bf906001600160a01b031681565b34801561042357600080fd5b506101fb6114be565b34801561043857600080fd5b506102676104473660046120c8565b60036020526000908152604090205481565b34801561046557600080fd5b506101fb610474366004612063565b6116b2565b34801561048557600080fd5b5061026760005481565b34801561049b57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cf57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561050357600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561053757600080fd5b506101fb610546366004612063565b61183d565b34801561055757600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561058b57600080fd5b506101fb611a49565b3480156105a057600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d457600080fd5b506101fb6105e3366004612063565b611c66565b3480156105f457600080fd5b5061060861060336600461225f565b611e1f565b60405161022991906122b5565b34801561062157600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b34801561065557600080fd5b5061026760045481565b6101fb61066d3660046120e1565b611ee6565b61067b816113d9565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122cf565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a0015160028111156107935761079361229f565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816113d9565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f00000000000000000000000000000000000000000000000000000000000000003461230d565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090357610903612320565b040311156109465760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109be5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612336565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612336565b6001600160a01b031614610b1a5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610b2a57508115155b15610b6d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b76816113d9565b60008481526002602052604090205403610bd3578051829003610b9f57600160a0820152610bba565b60c08101516001600160a01b031615610bba57600260a08201525b610bc3816113d9565b6000848152600260205260409020555b505050565b6000610c047f000000000000000000000000000000000000000000000000000000000000000042612353565b905090565b6007546001600160a01b03163314610c2057600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610c905760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610cad5760405162461bcd60e51b81526004016106a7906122cf565b60008281526002602052604090205415610cff5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610d45906113d9565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161082f565b60408510610dcb5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b600084848484604051602001610de49493929190612375565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610e64576000888883818110610e2657610e266123b7565b90506020020135905082811115610e4b57826000528060205260406000209250610e5b565b8060005282602052604060002092505b50600101610e0a565b508060005414610ea75760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f1c5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610f4c90899089906123cd565b6000604051808303816000865af19150503d8060008114610f89576040519150601f19603f3d011682016040523d82523d6000602084013e610f8e565b606091505b5050905080610fdf5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61103b6103863683900383018361225f565b600083815260026020526040902054146110675760405162461bcd60e51b81526004016106a7906122cf565b600261107960c0830160a084016123dd565b600281111561108a5761108a61229f565b146110cb5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061112593505060e0840191505060c08301612282565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611179816113d9565b600083815260026020526040902054146111a55760405162461bcd60e51b81526004016106a7906122cf565b60018160a0015160028111156111bd576111bd61229f565b146111fa5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156112a6576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461130b57600080fd5b611314816113d9565b600083815260026020526040902054146113405760405162461bcd60e51b81526004016106a7906122cf565b63ffffffff42811660608301524316608082015261135d816113d9565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691015b60405180910390a15050565b60006113d37f000000000000000000000000000000000000000000000000000000000000000083612353565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861140e9890979691016123f8565b604051602081830303815290604052805190602001209050919050565b6007546001600160a01b0316331461144257600080fd5b6007546001600160a01b0316331461149c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561151e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115429190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561157f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a39190612476565b50925050506004548111156115ed5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156116af57600654156116615760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161170557611705612320565b040311156117485760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b611751816113d9565b6000838152600260205260409020541461177d5760405162461bcd60e51b81526004016106a7906122cf565b60c08101516001600160a01b0316156117cf5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b60015482111561181757600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611827816113d9565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161189057611890612320565b0403116118d15760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b6118da816113d9565b600083815260026020526040902054146119065760405162461bcd60e51b81526004016106a7906122cf565b60008160a00151600281111561191e5761191e61229f565b1461195d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b03166119e15760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c08101805160009091526119f5826113d9565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611ab05760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b600454600654611ac091906124ac565b4211611b295760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611ba0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc49190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c259190612476565b50925050508181036108ac5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200161139b565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cb957611cb9612320565b040311611cfa5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611d03816113d9565b60008381526002602052604090205414611d2f5760405162461bcd60e51b81526004016106a7906122cf565b60008160a001516002811115611d4757611d4761229f565b14611d865760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611e0b5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60208101805160009091526119f5826113d9565b6000816060015163ffffffff16600003611e3b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7757506003919050565b6000600c836060015163ffffffff16420381611e9557611e95612320565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ed95760019250611ede565b600092505b50505b919050565b611ef08282610c09565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f3783826112f4565b63ffffffff428116606083015243166080820152611f5583826116b2565b600160a0820152610bd38382611170565b6001600160a01b03811681146116af57600080fd5b8035611ee181611f66565b803563ffffffff81168114611ee157600080fd5b803560038110611ee157600080fd5b600060e08284031215611fbb57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fec57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200260208401611f7b565b602082015261201360408401611f86565b604082015261202460608401611f86565b606082015261203560808401611f86565b608082015261204660a08401611f9a565b60a082015261205760c08401611f7b565b60c08201525092915050565b600080610100838503121561207757600080fd5b823591506120888460208501611fa9565b90509250929050565b600080600061012084860312156120a757600080fd5b83359250602084013591506120bf8560408601611fa9565b90509250925092565b6000602082840312156120da57600080fd5b5035919050565b600080604083850312156120f457600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee157600080fd5b60008083601f84011261212d57600080fd5b50813567ffffffffffffffff81111561214557600080fd5b60208301915083602082850101111561215d57600080fd5b9250929050565b6000806000806000806080878903121561217d57600080fd5b863567ffffffffffffffff8082111561219557600080fd5b818901915089601f8301126121a957600080fd5b8135818111156121b857600080fd5b8a60208260051b85010111156121cd57600080fd5b602083019850809750506121e360208a01612103565b95506121f160408a01611f7b565b9450606089013591508082111561220757600080fd5b5061221489828a0161211b565b979a9699509497509295939492505050565b60008082840361010081121561223b57600080fd5b8335925060e0601f198201121561225157600080fd5b506020830190509250929050565b600060e0828403121561227157600080fd5b61227b8383611fa9565b9392505050565b60006020828403121561229457600080fd5b813561227b81611f66565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122c9576122c961229f565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156113d3576113d36122f7565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561234857600080fd5b815161227b81611f66565b60008261237057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123ef57600080fd5b61227b82611f9a565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124505761245061229f565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561248c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b808201808211156113d3576113d36122f756fea2646970667358221220dc7a01b69a5db83d52ee68c35352849e950b5e5dd89fab8bf6b9e3291a0befbd64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101e35760003560e01c806390784ae811610102578063c2114a1611610095578063df19e6ff11610064578063df19e6ff146105e8578063e78cea9214610615578063e813a75514610649578063eedcf2a91461065f57600080fd5b8063c2114a161461054b578063cb9384681461057f578063d0e30db014610594578063da2b7bc4146105c857600080fd5b8063aa22a1c6116100d1578063aa22a1c61461048f578063b044397e146104c3578063b5b7a184146104f7578063b633b9441461052b57600080fd5b806390784ae81461041757806390df63b71461042c578063930f28af146104595780639588eca21461047957600080fd5b80633ce43cfd1161017a578063541adcca11610149578063541adcca1461036b57806369cd250d1461038b5780638a619a71146103d75780638ad3a8f7146103f757600080fd5b80633ce43cfd146102eb5780634788cb381461030b57806349b4299e1461032b5780634a439cfe1461034b57600080fd5b80632639c060116101b65780632639c0601461027557806327ee6bdd146102a257806331d14457146102b857806331ddf743146102cb57600080fd5b806301139b68146101e8578063051d1970146101fd5780630f0adca514610232578063222ae78614610252575b600080fd5b6101fb6101f6366004612063565b610672565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb61024d366004612091565b6108b0565b34801561025e57600080fd5b50610267610bd8565b604051908152602001610229565b34801561028157600080fd5b506102676102903660046120c8565b60026020526000908152604090205481565b3480156102ae57600080fd5b5061026760015481565b6101fb6102c63660046120e1565b610c09565b3480156102d757600080fd5b506101fb6102e6366004612164565b610d89565b3480156102f757600080fd5b506101fb610306366004612226565b611029565b34801561031757600080fd5b506101fb610326366004612063565b611170565b34801561033757600080fd5b506101fb610346366004612063565b6112f4565b34801561035757600080fd5b506102676103663660046120c8565b6113a7565b34801561037757600080fd5b5061026761038636600461225f565b6113d9565b34801561039757600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b3480156103e357600080fd5b506101fb6103f2366004612282565b61142b565b34801561040357600080fd5b506007546103bf906001600160a01b031681565b34801561042357600080fd5b506101fb6114be565b34801561043857600080fd5b506102676104473660046120c8565b60036020526000908152604090205481565b34801561046557600080fd5b506101fb610474366004612063565b6116b2565b34801561048557600080fd5b5061026760005481565b34801561049b57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cf57600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561050357600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561053757600080fd5b506101fb610546366004612063565b61183d565b34801561055757600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b34801561058b57600080fd5b506101fb611a49565b3480156105a057600080fd5b506102677f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d457600080fd5b506101fb6105e3366004612063565b611c66565b3480156105f457600080fd5b5061060861060336600461225f565b611e1f565b60405161022991906122b5565b34801561062157600080fd5b506103bf7f000000000000000000000000000000000000000000000000000000000000000081565b34801561065557600080fd5b5061026760045481565b6101fb61066d3660046120e1565b611ee6565b61067b816113d9565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122cf565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a0015160028111156107935761079361229f565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816113d9565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f00000000000000000000000000000000000000000000000000000000000000003461230d565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090357610903612320565b040311156109465760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109be5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612336565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190612336565b6001600160a01b031614610b1a5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610b2a57508115155b15610b6d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b76816113d9565b60008481526002602052604090205403610bd3578051829003610b9f57600160a0820152610bba565b60c08101516001600160a01b031615610bba57600260a08201525b610bc3816113d9565b6000848152600260205260409020555b505050565b6000610c047f000000000000000000000000000000000000000000000000000000000000000042612353565b905090565b6007546001600160a01b03163314610c2057600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610c905760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610cad5760405162461bcd60e51b81526004016106a7906122cf565b60008281526002602052604090205415610cff5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610d45906113d9565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161082f565b60408510610dcb5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b600084848484604051602001610de49493929190612375565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610e64576000888883818110610e2657610e266123b7565b90506020020135905082811115610e4b57826000528060205260406000209250610e5b565b8060005282602052604060002092505b50600101610e0a565b508060005414610ea75760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f1c5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610f4c90899089906123cd565b6000604051808303816000865af19150503d8060008114610f89576040519150601f19603f3d011682016040523d82523d6000602084013e610f8e565b606091505b5050905080610fdf5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61103b6103863683900383018361225f565b600083815260026020526040902054146110675760405162461bcd60e51b81526004016106a7906122cf565b600261107960c0830160a084016123dd565b600281111561108a5761108a61229f565b146110cb5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061112593505060e0840191505060c08301612282565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b611179816113d9565b600083815260026020526040902054146111a55760405162461bcd60e51b81526004016106a7906122cf565b60018160a0015160028111156111bd576111bd61229f565b146111fa5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156112a6576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461130b57600080fd5b611314816113d9565b600083815260026020526040902054146113405760405162461bcd60e51b81526004016106a7906122cf565b63ffffffff42811660608301524316608082015261135d816113d9565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691015b60405180910390a15050565b60006113d37f000000000000000000000000000000000000000000000000000000000000000083612353565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861140e9890979691016123f8565b604051602081830303815290604052805190602001209050919050565b6007546001600160a01b0316331461144257600080fd5b6007546001600160a01b0316331461149c5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561151e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115429190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561157f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a39190612476565b50925050506004548111156115ed5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156116af57600654156116615760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161170557611705612320565b040311156117485760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b611751816113d9565b6000838152600260205260409020541461177d5760405162461bcd60e51b81526004016106a7906122cf565b60c08101516001600160a01b0316156117cf5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b60015482111561181757600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611827816113d9565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161189057611890612320565b0403116118d15760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b6118da816113d9565b600083815260026020526040902054146119065760405162461bcd60e51b81526004016106a7906122cf565b60008160a00151600281111561191e5761191e61229f565b1461195d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b03166119e15760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c08101805160009091526119f5826113d9565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611ab05760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b600454600654611ac091906124ac565b4211611b295760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611ba0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc49190612336565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c259190612476565b50925050508181036108ac5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200161139b565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cb957611cb9612320565b040311611cfa5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611d03816113d9565b60008381526002602052604090205414611d2f5760405162461bcd60e51b81526004016106a7906122cf565b60008160a001516002811115611d4757611d4761229f565b14611d865760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611e0b5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60208101805160009091526119f5826113d9565b6000816060015163ffffffff16600003611e3b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7757506003919050565b6000600c836060015163ffffffff16420381611e9557611e95612320565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ed95760019250611ede565b600092505b50505b919050565b611ef08282610c09565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f3783826112f4565b63ffffffff428116606083015243166080820152611f5583826116b2565b600160a0820152610bd38382611170565b6001600160a01b03811681146116af57600080fd5b8035611ee181611f66565b803563ffffffff81168114611ee157600080fd5b803560038110611ee157600080fd5b600060e08284031215611fbb57600080fd5b60405160e0810181811067ffffffffffffffff82111715611fec57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200260208401611f7b565b602082015261201360408401611f86565b604082015261202460608401611f86565b606082015261203560808401611f86565b608082015261204660a08401611f9a565b60a082015261205760c08401611f7b565b60c08201525092915050565b600080610100838503121561207757600080fd5b823591506120888460208501611fa9565b90509250929050565b600080600061012084860312156120a757600080fd5b83359250602084013591506120bf8560408601611fa9565b90509250925092565b6000602082840312156120da57600080fd5b5035919050565b600080604083850312156120f457600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee157600080fd5b60008083601f84011261212d57600080fd5b50813567ffffffffffffffff81111561214557600080fd5b60208301915083602082850101111561215d57600080fd5b9250929050565b6000806000806000806080878903121561217d57600080fd5b863567ffffffffffffffff8082111561219557600080fd5b818901915089601f8301126121a957600080fd5b8135818111156121b857600080fd5b8a60208260051b85010111156121cd57600080fd5b602083019850809750506121e360208a01612103565b95506121f160408a01611f7b565b9450606089013591508082111561220757600080fd5b5061221489828a0161211b565b979a9699509497509295939492505050565b60008082840361010081121561223b57600080fd5b8335925060e0601f198201121561225157600080fd5b506020830190509250929050565b600060e0828403121561227157600080fd5b61227b8383611fa9565b9392505050565b60006020828403121561229457600080fd5b813561227b81611f66565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122c9576122c961229f565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156113d3576113d36122f7565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561234857600080fd5b815161227b81611f66565b60008261237057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156123ef57600080fd5b61227b82611f9a565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124505761245061229f565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561248c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b808201808211156113d3576113d36122f756fea2646970667358221220dc7a01b69a5db83d52ee68c35352849e950b5e5dd89fab8bf6b9e3291a0befbd64736f6c63430008120033", + "numDeployments": 1, + "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEthDevnet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxClaimDelayEpochs\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxClaimDelayEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer delay limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxClaimDelayEpochs\":\"The maximum number of epochs that can be claimed in the past.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEthDevnet\":\"The address of the inbox contract on Arbitrum.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":\"VeaOutboxArbToEthDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable maxClaimDelayEpochs; // The maximum number of epochs that can be claimed in the past.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer delay limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks,\\n uint256 _maxClaimDelayEpochs\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n maxClaimDelayEpochs = _maxClaimDelayEpochs;\\n\\n updateSequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n // If the sequencerDelayLimit is set larger than block.timestamp - epochPeriod by arbitrum governance, \\n // the checked arithmetic will revert due to underflow and the bridge will shutdown.\\n uint256 minEpochSequencerDelay = (block.timestamp - sequencerDelayLimit) / epochPeriod - 1;\\n\\n uint256 minEpochClaim;\\n \\n unchecked{\\n // deployed sets maxClaimWindowEpochs so no underflow is possible\\n minEpochClaim = block.timestamp / epochPeriod - maxClaimDelayEpochs;\\n }\\n\\n uint256 minClaimableEpoch = minEpochSequencerDelay > minEpochClaim ? minEpochSequencerDelay : minEpochClaim;\\n \\n require(_epoch >= minClaimableEpoch, \\\"Invalid epoch.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= uint256(_claim.timestampClaimed) + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x3a94e33e43dcab687319e91c809a9df5b9309d972508025bcda56eb9e44bb08f\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToEth/VeaOutboxArbToEth.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Goerli.\\n/// Note: This contract is deployed on Goerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEthDevnet The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEthDevnet,\\n address _bridge,\\n uint256 _maxMissingBlocks,\\n uint256 _maxClaimDelayEpochs\\n )\\n VeaOutboxArbToEth(\\n _deposit,\\n _epochPeriod,\\n _minChallengePeriod,\\n _timeoutEpochs,\\n _veaInboxArbToEthDevnet,\\n _bridge,\\n _maxMissingBlocks,\\n _maxClaimDelayEpochs\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x94ebc41c0b7451e524e490a8ca2eb5fdcc39ca0fd29c5fd57be06c591f7824a4\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101c06040523480156200001257600080fd5b5060405162002aa038038062002aa08339810160408190526200003591620002f7565b60c08890526101208790526101408690526101808590526001600160a01b0380851660a05283166080526101a082905261016081905287878787878787876200007d620000f7565b6200008a6002896200037e565b60e08190526200009c896002620003a1565b620000a89190620003c1565b6101005261012051600190620000bf90426200037e565b620000cb9190620003c1565b6001555050600780546001600160a01b0319163317905550620004339c50505050505050505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200013a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001609190620003d7565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156200019e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001c49190620003fc565b50925050506004548111156200020f5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002d75760065415620002895760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002f257600080fd5b919050565b600080600080600080600080610100898b0312156200031557600080fd5b885197506020890151965060408901519550606089015194506200033c60808a01620002da565b93506200034c60a08a01620002da565b60c08a015160e0909a0151989b979a5095989497939692505050565b634e487b7160e01b600052601160045260246000fd5b6000826200039c57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620003bb57620003bb62000368565b92915050565b81810381811115620003bb57620003bb62000368565b600060208284031215620003ea57600080fd5b620003f582620002da565b9392505050565b600080600080608085870312156200041357600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516125346200056c600039600081816104f50152611ee801526000818161052901528181610b160152818161191001528181611a9b0152611ca70152600061021a0152600081816105b10152611e7c01526000818161055d01528181610b3a01528181610e430152818161160a0152818161193401528181611abf0152611ccb01526000818161139701526114d001526000818161134401526114880152600081816105e5015281816106f101528181610878015281816108a501528181610e860152818161152001528181611c0501528181611c6c0152611e120152600081816104060152610c24015260008181610666015281816109fb01528181610bb501528181610c4e015261168b01526125346000f3fe6080604052600436106101ee5760003560e01c806369cd250d1161010d578063b5b7a184116100a0578063da2b7bc41161006f578063da2b7bc414610607578063df19e6ff14610627578063e78cea9214610654578063e813a75514610688578063eedcf2a91461069e57600080fd5b8063b5b7a1841461054b578063b633b9441461057f578063c2114a161461059f578063d0e30db0146105d357600080fd5b8063930f28af116100dc578063930f28af146104ad5780639588eca2146104cd578063aa22a1c6146104e3578063b044397e1461051757600080fd5b806369cd250d146103f45780638a619a71146104405780638ad3a8f71461046057806390df63b71461048057600080fd5b806331d144571161018557806349b4299e1161015457806349b4299e1461037f5780634a439cfe1461039f578063541adcca146103bf5780635f43a47f146103df57600080fd5b806331d144571461030c57806331ddf7431461031f5780633ce43cfd1461033f5780634788cb381461035f57600080fd5b80630f0adca5116101c15780630f0adca514610294578063222ae786146102b45780632639c060146102c957806327ee6bdd146102f657600080fd5b806301139b68146101f3578063042c4aaf14610208578063051d19701461024f5780630c63fa841461027f575b600080fd5b6102066102013660046120a2565b6106b1565b005b34801561021457600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561025b57600080fd5b5060055460065461026a919082565b60408051928352602083019190915201610246565b34801561028b57600080fd5b506102066108ef565b3480156102a057600080fd5b506102066102af3660046120d0565b610b14565b3480156102c057600080fd5b5061023c610e3c565b3480156102d557600080fd5b5061023c6102e4366004612107565b60026020526000908152604090205481565b34801561030257600080fd5b5061023c60015481565b61020661031a366004612120565b610e6d565b34801561032b57600080fd5b5061020661033a3660046121a3565b610fed565b34801561034b57600080fd5b5061020661035a366004612265565b61128d565b34801561036b57600080fd5b5061020661037a3660046120a2565b6113d4565b34801561038b57600080fd5b5061020661039a3660046120a2565b611558565b3480156103ab57600080fd5b5061023c6103ba366004612107565b611603565b3480156103cb57600080fd5b5061023c6103da36600461229e565b611635565b3480156103eb57600080fd5b50610206611687565b34801561040057600080fd5b506104287f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610246565b34801561044c57600080fd5b5061020661045b3660046122c1565b61187b565b34801561046c57600080fd5b50600754610428906001600160a01b031681565b34801561048c57600080fd5b5061023c61049b366004612107565b60036020526000908152604090205481565b3480156104b957600080fd5b506102066104c83660046120a2565b61190e565b3480156104d957600080fd5b5061023c60005481565b3480156104ef57600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561052357600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561055757600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561058b57600080fd5b5061020661059a3660046120a2565b611a99565b3480156105ab57600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105df57600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561061357600080fd5b506102066106223660046120a2565b611ca5565b34801561063357600080fd5b5061064761064236600461229e565b611e5e565b60405161024691906122f4565b34801561066057600080fd5b506104287f000000000000000000000000000000000000000000000000000000000000000081565b34801561069457600080fd5b5061023c60045481565b6102066106ac366004612120565b611f25565b6106ba81611635565b600083815260026020526040902054146106ef5760405162461bcd60e51b81526004016106e69061230e565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561075f5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106e6565b60c08101516001600160a01b0316156107ba5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106e6565b60008160a0015160028111156107d2576107d26122de565b1461081f5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106e6565b3360c082015261082e81611635565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108eb5760006108ca7f00000000000000000000000000000000000000000000000000000000000000003461234c565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036109565760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106e6565b600454600654610966919061235f565b42116109cf5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106e6565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612372565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb919061238f565b50925050508181036108eb5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610b6757610b676123c5565b04031115610baa5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106e6565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c225760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106e6565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610caa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cce9190612372565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2f9190612372565b6001600160a01b031614610d7e5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106e6565b60015483118015610d8e57508115155b15610dd157600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610dda81611635565b60008481526002602052604090205403610e37578051829003610e0357600160a0820152610e1e565b60c08101516001600160a01b031615610e1e57600260a08201525b610e2781611635565b6000848152600260205260409020555b505050565b6000610e687f0000000000000000000000000000000000000000000000000000000000000000426123db565b905090565b6007546001600160a01b03163314610e8457600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610ef45760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106e6565b80610f115760405162461bcd60e51b81526004016106e69061230e565b60008281526002602052604090205415610f635760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106e6565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610fa990611635565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161086e565b6040851061102f5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106e6565b60008484848460405160200161104894939291906123fd565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156110c857600088888381811061108a5761108a61243f565b905060200201359050828111156110af578260005280602052604060002092506110bf565b8060005282602052604060002092505b5060010161106e565b50806000541461110b5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106e6565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156111805760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106e6565b6000838152600360205260408082206001851b84179055516001600160a01b038916906111b09089908990612455565b6000604051808303816000865af19150503d80600081146111ed576040519150601f19603f3d011682016040523d82523d6000602084013e6111f2565b606091505b50509050806112435760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106e6565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61129f6103da3683900383018361229e565b600083815260026020526040902054146112cb5760405162461bcd60e51b81526004016106e69061230e565b60026112dd60c0830160a08401612465565b60028111156112ee576112ee6122de565b1461132f5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106e6565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061138993505060e0840191505060c083016122c1565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6113dd81611635565b600083815260026020526040902054146114095760405162461bcd60e51b81526004016106e69061230e565b60018160a001516002811115611421576114216122de565b1461145e5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106e6565b60008281526002602052604081205560c08101516001600160a01b03161561150a576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461156f57600080fd5b61157881611635565b600083815260026020526040902054146115a45760405162461bcd60e51b81526004016106e69061230e565b63ffffffff4281166060830152431660808201526115c181611635565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610b08565b600061162f7f0000000000000000000000000000000000000000000000000000000000000000836123db565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861166a989097969101612480565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156116e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061170b9190612372565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611748573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176c919061238f565b50925050506004548111156117b65760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015611878576006541561182a5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106e6565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6007546001600160a01b0316331461189257600080fd5b6007546001600160a01b031633146118ec5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106e6565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611961576119616123c5565b040311156119a45760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106e6565b6119ad81611635565b600083815260026020526040902054146119d95760405162461bcd60e51b81526004016106e69061230e565b60c08101516001600160a01b031615611a2b5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106e6565b600154821115611a7357600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611a8381611635565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611aec57611aec6123c5565b040311611b2d5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106e6565b611b3681611635565b60008381526002602052604090205414611b625760405162461bcd60e51b81526004016106e69061230e565b60008160a001516002811115611b7a57611b7a6122de565b14611bb95760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106e6565b60c08101516001600160a01b0316156108eb5760208101516001600160a01b0316611c3d5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611c5182611635565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cf857611cf86123c5565b040311611d395760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106e6565b611d4281611635565b60008381526002602052604090205414611d6e5760405162461bcd60e51b81526004016106e69061230e565b60008160a001516002811115611d8657611d866122de565b14611dc55760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106e6565b60208101516001600160a01b0316156108eb5760c08101516001600160a01b0316611e4a5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611c5182611635565b6000816060015163ffffffff16600003611e7a57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611eb657506003919050565b6000600c836060015163ffffffff16420381611ed457611ed46123c5565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611f185760019250611f1d565b600092505b50505b919050565b611f2f8282610e6d565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f768382611558565b63ffffffff428116606083015243166080820152611f94838261190e565b600160a0820152610e3783826113d4565b6001600160a01b038116811461187857600080fd5b8035611f2081611fa5565b803563ffffffff81168114611f2057600080fd5b803560038110611f2057600080fd5b600060e08284031215611ffa57600080fd5b60405160e0810181811067ffffffffffffffff8211171561202b57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061204160208401611fba565b602082015261205260408401611fc5565b604082015261206360608401611fc5565b606082015261207460808401611fc5565b608082015261208560a08401611fd9565b60a082015261209660c08401611fba565b60c08201525092915050565b60008061010083850312156120b657600080fd5b823591506120c78460208501611fe8565b90509250929050565b600080600061012084860312156120e657600080fd5b83359250602084013591506120fe8560408601611fe8565b90509250925092565b60006020828403121561211957600080fd5b5035919050565b6000806040838503121561213357600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611f2057600080fd5b60008083601f84011261216c57600080fd5b50813567ffffffffffffffff81111561218457600080fd5b60208301915083602082850101111561219c57600080fd5b9250929050565b600080600080600080608087890312156121bc57600080fd5b863567ffffffffffffffff808211156121d457600080fd5b818901915089601f8301126121e857600080fd5b8135818111156121f757600080fd5b8a60208260051b850101111561220c57600080fd5b6020830198508097505061222260208a01612142565b955061223060408a01611fba565b9450606089013591508082111561224657600080fd5b5061225389828a0161215a565b979a9699509497509295939492505050565b60008082840361010081121561227a57600080fd5b8335925060e0601f198201121561229057600080fd5b506020830190509250929050565b600060e082840312156122b057600080fd5b6122ba8383611fe8565b9392505050565b6000602082840312156122d357600080fd5b81356122ba81611fa5565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612308576123086122de565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561162f5761162f612336565b8082018082111561162f5761162f612336565b60006020828403121561238457600080fd5b81516122ba81611fa5565b600080600080608085870312156123a557600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b6000826123f857634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561247757600080fd5b6122ba82611fd9565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124d8576124d86122de565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212209c60d1c76eb843f8e6d3a11b4f0793b3f068f1a267c85486593da837494af1bd64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101ee5760003560e01c806369cd250d1161010d578063b5b7a184116100a0578063da2b7bc41161006f578063da2b7bc414610607578063df19e6ff14610627578063e78cea9214610654578063e813a75514610688578063eedcf2a91461069e57600080fd5b8063b5b7a1841461054b578063b633b9441461057f578063c2114a161461059f578063d0e30db0146105d357600080fd5b8063930f28af116100dc578063930f28af146104ad5780639588eca2146104cd578063aa22a1c6146104e3578063b044397e1461051757600080fd5b806369cd250d146103f45780638a619a71146104405780638ad3a8f71461046057806390df63b71461048057600080fd5b806331d144571161018557806349b4299e1161015457806349b4299e1461037f5780634a439cfe1461039f578063541adcca146103bf5780635f43a47f146103df57600080fd5b806331d144571461030c57806331ddf7431461031f5780633ce43cfd1461033f5780634788cb381461035f57600080fd5b80630f0adca5116101c15780630f0adca514610294578063222ae786146102b45780632639c060146102c957806327ee6bdd146102f657600080fd5b806301139b68146101f3578063042c4aaf14610208578063051d19701461024f5780630c63fa841461027f575b600080fd5b6102066102013660046120a2565b6106b1565b005b34801561021457600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561025b57600080fd5b5060055460065461026a919082565b60408051928352602083019190915201610246565b34801561028b57600080fd5b506102066108ef565b3480156102a057600080fd5b506102066102af3660046120d0565b610b14565b3480156102c057600080fd5b5061023c610e3c565b3480156102d557600080fd5b5061023c6102e4366004612107565b60026020526000908152604090205481565b34801561030257600080fd5b5061023c60015481565b61020661031a366004612120565b610e6d565b34801561032b57600080fd5b5061020661033a3660046121a3565b610fed565b34801561034b57600080fd5b5061020661035a366004612265565b61128d565b34801561036b57600080fd5b5061020661037a3660046120a2565b6113d4565b34801561038b57600080fd5b5061020661039a3660046120a2565b611558565b3480156103ab57600080fd5b5061023c6103ba366004612107565b611603565b3480156103cb57600080fd5b5061023c6103da36600461229e565b611635565b3480156103eb57600080fd5b50610206611687565b34801561040057600080fd5b506104287f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610246565b34801561044c57600080fd5b5061020661045b3660046122c1565b61187b565b34801561046c57600080fd5b50600754610428906001600160a01b031681565b34801561048c57600080fd5b5061023c61049b366004612107565b60036020526000908152604090205481565b3480156104b957600080fd5b506102066104c83660046120a2565b61190e565b3480156104d957600080fd5b5061023c60005481565b3480156104ef57600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561052357600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561055757600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561058b57600080fd5b5061020661059a3660046120a2565b611a99565b3480156105ab57600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105df57600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561061357600080fd5b506102066106223660046120a2565b611ca5565b34801561063357600080fd5b5061064761064236600461229e565b611e5e565b60405161024691906122f4565b34801561066057600080fd5b506104287f000000000000000000000000000000000000000000000000000000000000000081565b34801561069457600080fd5b5061023c60045481565b6102066106ac366004612120565b611f25565b6106ba81611635565b600083815260026020526040902054146106ef5760405162461bcd60e51b81526004016106e69061230e565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561075f5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106e6565b60c08101516001600160a01b0316156107ba5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106e6565b60008160a0015160028111156107d2576107d26122de565b1461081f5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106e6565b3360c082015261082e81611635565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108eb5760006108ca7f00000000000000000000000000000000000000000000000000000000000000003461234c565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036109565760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106e6565b600454600654610966919061235f565b42116109cf5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106e6565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612372565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb919061238f565b50925050508181036108eb5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610b6757610b676123c5565b04031115610baa5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106e6565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c225760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106e6565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610caa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cce9190612372565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2f9190612372565b6001600160a01b031614610d7e5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106e6565b60015483118015610d8e57508115155b15610dd157600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610dda81611635565b60008481526002602052604090205403610e37578051829003610e0357600160a0820152610e1e565b60c08101516001600160a01b031615610e1e57600260a08201525b610e2781611635565b6000848152600260205260409020555b505050565b6000610e687f0000000000000000000000000000000000000000000000000000000000000000426123db565b905090565b6007546001600160a01b03163314610e8457600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610ef45760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106e6565b80610f115760405162461bcd60e51b81526004016106e69061230e565b60008281526002602052604090205415610f635760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106e6565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610fa990611635565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161086e565b6040851061102f5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106e6565b60008484848460405160200161104894939291906123fd565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156110c857600088888381811061108a5761108a61243f565b905060200201359050828111156110af578260005280602052604060002092506110bf565b8060005282602052604060002092505b5060010161106e565b50806000541461110b5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106e6565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156111805760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106e6565b6000838152600360205260408082206001851b84179055516001600160a01b038916906111b09089908990612455565b6000604051808303816000865af19150503d80600081146111ed576040519150601f19603f3d011682016040523d82523d6000602084013e6111f2565b606091505b50509050806112435760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106e6565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61129f6103da3683900383018361229e565b600083815260026020526040902054146112cb5760405162461bcd60e51b81526004016106e69061230e565b60026112dd60c0830160a08401612465565b60028111156112ee576112ee6122de565b1461132f5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106e6565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061138993505060e0840191505060c083016122c1565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6113dd81611635565b600083815260026020526040902054146114095760405162461bcd60e51b81526004016106e69061230e565b60018160a001516002811115611421576114216122de565b1461145e5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106e6565b60008281526002602052604081205560c08101516001600160a01b03161561150a576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461156f57600080fd5b61157881611635565b600083815260026020526040902054146115a45760405162461bcd60e51b81526004016106e69061230e565b63ffffffff4281166060830152431660808201526115c181611635565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610b08565b600061162f7f0000000000000000000000000000000000000000000000000000000000000000836123db565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861166a989097969101612480565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156116e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061170b9190612372565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611748573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176c919061238f565b50925050506004548111156117b65760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015611878576006541561182a5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106e6565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6007546001600160a01b0316331461189257600080fd5b6007546001600160a01b031633146118ec5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106e6565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611961576119616123c5565b040311156119a45760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106e6565b6119ad81611635565b600083815260026020526040902054146119d95760405162461bcd60e51b81526004016106e69061230e565b60c08101516001600160a01b031615611a2b5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106e6565b600154821115611a7357600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611a8381611635565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611aec57611aec6123c5565b040311611b2d5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106e6565b611b3681611635565b60008381526002602052604090205414611b625760405162461bcd60e51b81526004016106e69061230e565b60008160a001516002811115611b7a57611b7a6122de565b14611bb95760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106e6565b60c08101516001600160a01b0316156108eb5760208101516001600160a01b0316611c3d5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611c5182611635565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cf857611cf86123c5565b040311611d395760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106e6565b611d4281611635565b60008381526002602052604090205414611d6e5760405162461bcd60e51b81526004016106e69061230e565b60008160a001516002811115611d8657611d866122de565b14611dc55760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106e6565b60208101516001600160a01b0316156108eb5760c08101516001600160a01b0316611e4a5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611c5182611635565b6000816060015163ffffffff16600003611e7a57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611eb657506003919050565b6000600c836060015163ffffffff16420381611ed457611ed46123c5565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611f185760019250611f1d565b600092505b50505b919050565b611f2f8282610e6d565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f768382611558565b63ffffffff428116606083015243166080820152611f94838261190e565b600160a0820152610e3783826113d4565b6001600160a01b038116811461187857600080fd5b8035611f2081611fa5565b803563ffffffff81168114611f2057600080fd5b803560038110611f2057600080fd5b600060e08284031215611ffa57600080fd5b60405160e0810181811067ffffffffffffffff8211171561202b57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061204160208401611fba565b602082015261205260408401611fc5565b604082015261206360608401611fc5565b606082015261207460808401611fc5565b608082015261208560a08401611fd9565b60a082015261209660c08401611fba565b60c08201525092915050565b60008061010083850312156120b657600080fd5b823591506120c78460208501611fe8565b90509250929050565b600080600061012084860312156120e657600080fd5b83359250602084013591506120fe8560408601611fe8565b90509250925092565b60006020828403121561211957600080fd5b5035919050565b6000806040838503121561213357600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611f2057600080fd5b60008083601f84011261216c57600080fd5b50813567ffffffffffffffff81111561218457600080fd5b60208301915083602082850101111561219c57600080fd5b9250929050565b600080600080600080608087890312156121bc57600080fd5b863567ffffffffffffffff808211156121d457600080fd5b818901915089601f8301126121e857600080fd5b8135818111156121f757600080fd5b8a60208260051b850101111561220c57600080fd5b6020830198508097505061222260208a01612142565b955061223060408a01611fba565b9450606089013591508082111561224657600080fd5b5061225389828a0161215a565b979a9699509497509295939492505050565b60008082840361010081121561227a57600080fd5b8335925060e0601f198201121561229057600080fd5b506020830190509250929050565b600060e082840312156122b057600080fd5b6122ba8383611fe8565b9392505050565b6000602082840312156122d357600080fd5b81356122ba81611fa5565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612308576123086122de565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561162f5761162f612336565b8082018082111561162f5761162f612336565b60006020828403121561238457600080fd5b81516122ba81611fa5565b600080600080608085870312156123a557600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b6000826123f857634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561247757600080fd5b6122ba82611fd9565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124d8576124d86122de565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212209c60d1c76eb843f8e6d3a11b4f0793b3f068f1a267c85486593da837494af1bd64736f6c63430008120033", "devdoc": { "details": "Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).", "events": { @@ -1106,13 +1125,13 @@ "sequencerDelayLimitDecreaseRequested(uint256)": { "details": "This event indicates that a request to decrease the sequencer limit has been made.", "params": { - "_requestedsequencerDelayLimit": "The new sequencer limit requested." + "_requestedSequencerDelayLimit": "The new sequencer delay limit requested." } }, "sequencerDelayLimitUpdated(uint256)": { "details": "This event indicates the sequencer limit updated.", "params": { - "_newsequencerDelayLimit": "The new maxL2StateSyncDelay." + "_newSequencerDelayLimit": "The new sequencer delay limit." } } }, @@ -1150,13 +1169,13 @@ "constructor": { "details": "Constructor.", "params": { - "_bridge": "The address of the Arbitrum bridge contract on Ethereum.", - "_challengePeriod": "The duration of the period allowing to challenge a claim.", "_deposit": "The deposit amount to submit a claim in wei.", "_epochPeriod": "The duration of each epoch.", + "_maxClaimDelayEpochs": "The maximum number of epochs that can be claimed in the past.", "_maxMissingBlocks": "The maximum number of blocks that can be missing in a challenge period.", + "_minChallengePeriod": "The minimum time window to challenge a claim.", "_timeoutEpochs": "The epochs before the bridge is considered shutdown.", - "_veaInboxArbToEthDevnet": "The address of the devnet vea inbox on Arbitrum to Ethereum." + "_veaInboxArbToEthDevnet": "The address of the inbox contract on Arbitrum." } }, "devnetAdvanceState(uint256,bytes32)": { @@ -1178,7 +1197,7 @@ "epoch": "The hash of the claim." } }, - "executesequencerDelayLimitDecreaseRequest()": { + "executeSequencerDelayLimitDecreaseRequest()": { "details": "execute sequencerDelayLimitDecreaseRequest" }, "hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))": { @@ -1214,7 +1233,7 @@ "_epoch": "The epoch of the claim to challenge." } }, - "updatesequencerDelayLimit()": { + "updateSequencerDelayLimit()": { "details": "Request to decrease the sequencerDelayLimit." }, "verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { @@ -1267,7 +1286,7 @@ "storageLayout": { "storage": [ { - "astId": 430, + "astId": 432, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "stateRoot", "offset": 0, @@ -1275,7 +1294,7 @@ "type": "t_bytes32" }, { - "astId": 432, + "astId": 434, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "latestVerifiedEpoch", "offset": 0, @@ -1283,7 +1302,7 @@ "type": "t_uint256" }, { - "astId": 436, + "astId": 438, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "claimHashes", "offset": 0, @@ -1291,7 +1310,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 440, + "astId": 442, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "relayed", "offset": 0, @@ -1299,7 +1318,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 442, + "astId": 444, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "sequencerDelayLimit", "offset": 0, @@ -1307,15 +1326,15 @@ "type": "t_uint256" }, { - "astId": 445, + "astId": 447, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "5", - "type": "t_struct(SequencerDelayLimitDecreaseRequest)450_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)452_storage" }, { - "astId": 5461, + "astId": 6525, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "devnetOperator", "offset": 0, @@ -1341,12 +1360,12 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_struct(SequencerDelayLimitDecreaseRequest)450_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)452_storage": { "encoding": "inplace", "label": "struct VeaOutboxArbToEth.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 447, + "astId": 449, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "requestedsequencerDelayLimit", "offset": 0, @@ -1354,7 +1373,7 @@ "type": "t_uint256" }, { - "astId": 449, + "astId": 451, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json b/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json index 67e5cdfa..d8eead05 100644 --- a/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json +++ b/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x63d66abf907E7AF1516fF0DFb9849cb3CBAF3780", + "address": "0x92Cd1F40e5A4FFa25f83Dd9231EBD9df02eD6a5F", "abi": [ { "inputs": [ @@ -37,6 +37,11 @@ "internalType": "uint256", "name": "_maxMissingBlocks", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxClaimDelayEpochs", + "type": "uint256" } ], "stateMutability": "nonpayable", @@ -125,7 +130,7 @@ { "indexed": false, "internalType": "uint256", - "name": "_requestedsequencerDelayLimit", + "name": "_requestedSequencerDelayLimit", "type": "uint256" } ], @@ -138,7 +143,7 @@ { "indexed": false, "internalType": "uint256", - "name": "_newsequencerDelayLimit", + "name": "_newSequencerDelayLimit", "type": "uint256" } ], @@ -366,7 +371,7 @@ }, { "inputs": [], - "name": "executesequencerDelayLimitDecreaseRequest", + "name": "executeSequencerDelayLimitDecreaseRequest", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -440,6 +445,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "maxClaimDelayEpochs", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "maxMissingBlocks", @@ -687,7 +705,7 @@ }, { "inputs": [], - "name": "updatesequencerDelayLimit", + "name": "updateSequencerDelayLimit", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -981,49 +999,50 @@ "type": "function" } ], - "transactionHash": "0xdbd27334e6bc160f13fbf41838237b25936d0a9ca15b4d5bfed17f678f4a10b8", + "transactionHash": "0xccfb57fdeb42e9b14be71245c827fc76dec738ba743b1bdb4d351737d876a1fa", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x63d66abf907E7AF1516fF0DFb9849cb3CBAF3780", - "transactionIndex": 12, - "gasUsed": "2236924", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000800000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2d330a3b649c75a6a78412ad4224517927511e4d637012f611ffef3ef9039b2e", - "transactionHash": "0xdbd27334e6bc160f13fbf41838237b25936d0a9ca15b4d5bfed17f678f4a10b8", + "contractAddress": "0x92Cd1F40e5A4FFa25f83Dd9231EBD9df02eD6a5F", + "transactionIndex": 69, + "gasUsed": "2299673", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020004000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000004000000000000000000", + "blockHash": "0x67fadb2b5c2178e00295e24fd3460fe66faf835696c6fdf09c2b55be72526351", + "transactionHash": "0xccfb57fdeb42e9b14be71245c827fc76dec738ba743b1bdb4d351737d876a1fa", "logs": [ { - "transactionIndex": 12, - "blockNumber": 9187145, - "transactionHash": "0xdbd27334e6bc160f13fbf41838237b25936d0a9ca15b4d5bfed17f678f4a10b8", - "address": "0x63d66abf907E7AF1516fF0DFb9849cb3CBAF3780", + "transactionIndex": 69, + "blockNumber": 9254073, + "transactionHash": "0xccfb57fdeb42e9b14be71245c827fc76dec738ba743b1bdb4d351737d876a1fa", + "address": "0x92Cd1F40e5A4FFa25f83Dd9231EBD9df02eD6a5F", "topics": [ "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 21, - "blockHash": "0x2d330a3b649c75a6a78412ad4224517927511e4d637012f611ffef3ef9039b2e" + "logIndex": 167, + "blockHash": "0x67fadb2b5c2178e00295e24fd3460fe66faf835696c6fdf09c2b55be72526351" } ], - "blockNumber": 9187145, - "cumulativeGasUsed": "4000846", + "blockNumber": 9254073, + "cumulativeGasUsed": "14654585", "status": 1, "byzantium": true }, "args": [ "1000000000000000000", - 3600, + 7200, 10800, 1000000, - "0xc8c44fb196aF9C5E41B48f74E1A86A379b70bd70", + "0xE732B5b0DEE43619031e080Da461059F75a260E2", "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", - 1000000 + 1000000, + 3 ], - "numDeployments": 8, - "solcInputHash": "c91b42918e7adbbdde95879afcf70ba7", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executesequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedsequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEth\":\"The address of the inbox contract on Arbitrum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executesequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":\"VeaOutboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedsequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updatesequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executesequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value.\\n if (block.timestamp > sequencerDelayLimit) {\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, \\\"Epoch is too old.\\\");\\n }\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= _claim.timestampClaimed + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x36147b323b9b28537749fc38c75ad7d3e1b3fa7f180aecb3ab90d35c6718b9e3\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n}\\n\",\"keccak256\":\"0x68e90dcbb91e7c52e95021ef3f2e228f046ef8d937ab320d5ebb813ee66df3f0\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002b2e38038062002b2e8339810160408190526200003591620002ce565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190526200006f620000ce565b6200007c6002886200034c565b60e08190526200008e8860026200036f565b6200009a91906200038f565b6101005261012051600190620000b190426200034c565b620000bd91906200038f565b600155506200040195505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000111573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001379190620003a5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200019b9190620003ca565b5092505050600454811115620001e65760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ae5760065415620002605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002c957600080fd5b919050565b600080600080600080600060e0888a031215620002ea57600080fd5b875196506020880151955060408801519450606088015193506200031160808901620002b1565b92506200032160a08901620002b1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200036a57634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000389576200038962000336565b92915050565b8181038181111562000389576200038962000336565b600060208284031215620003b857600080fd5b620003c382620002b1565b9392505050565b60008060008060808587031215620003e157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516125f16200053d6000396000818161044001526120250152600081816104740152818161083e015281816117c0015281816119b40152611de40152600081816104fc0152611fb90152600081816104a80152818161086201528181610b6b01528181610c0701528181610c8f015281816113930152818161154d015281816117e4015281816119d80152611e08015260006111aa01526000818161115701526112bc0152600081816105450152818161063e015281816107c5015281816107f201528181610b970152818161131f01528181611b1e01528181611b850152611f4f01526000818161037c015261094c0152600081816105c6015281816108dd01528181610976015281816115ce0152611cca01526125f16000f3fe6080604052600436106101c25760003560e01c806390784ae8116100f7578063b633b94411610095578063da2b7bc411610064578063da2b7bc414610567578063df19e6ff14610587578063e78cea92146105b4578063e813a755146105e857600080fd5b8063b633b944146104ca578063c2114a16146104ea578063cb9384681461051e578063d0e30db01461053357600080fd5b80639588eca2116100d15780639588eca214610418578063aa22a1c61461042e578063b044397e14610462578063b5b7a1841461049657600080fd5b806390784ae8146103b657806390df63b7146103cb578063930f28af146103f857600080fd5b806331ddf7431161016457806349b4299e1161013e57806349b4299e1461030a5780634a439cfe1461032a578063541adcca1461034a57806369cd250d1461036a57600080fd5b806331ddf743146102aa5780633ce43cfd146102ca5780634788cb38146102ea57600080fd5b8063222ae786116101a0578063222ae786146102315780632639c0601461025457806327ee6bdd1461028157806331d144571461029757600080fd5b806301139b68146101c7578063051d1970146101dc5780630f0adca514610211575b600080fd5b6101da6101d536600461215f565b6105fe565b005b3480156101e857600080fd5b506005546006546101f7919082565b604080519283526020830191909152015b60405180910390f35b34801561021d57600080fd5b506101da61022c36600461218d565b61083c565b34801561023d57600080fd5b50610246610b64565b604051908152602001610208565b34801561026057600080fd5b5061024661026f3660046121c4565b60026020526000908152604090205481565b34801561028d57600080fd5b5061024660015481565b6101da6102a53660046121dd565b610b95565b3480156102b657600080fd5b506101da6102c5366004612260565b610e00565b3480156102d657600080fd5b506101da6102e5366004612322565b6110a0565b3480156102f657600080fd5b506101da610305366004612322565b6111e7565b34801561031657600080fd5b506101da61032536600461215f565b61135c565b34801561033657600080fd5b506102466103453660046121c4565b611546565b34801561035657600080fd5b5061024661036536600461235b565b611578565b34801561037657600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610208565b3480156103c257600080fd5b506101da6115ca565b3480156103d757600080fd5b506102466103e63660046121c4565b60036020526000908152604090205481565b34801561040457600080fd5b506101da61041336600461215f565b6117be565b34801561042457600080fd5b5061024660005481565b34801561043a57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561046e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a257600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d657600080fd5b506101da6104e536600461215f565b6119b2565b3480156104f657600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561052a57600080fd5b506101da611bbe565b34801561053f57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561057357600080fd5b506101da61058236600461215f565b611de2565b34801561059357600080fd5b506105a76105a236600461235b565b611f9b565b6040516102089190612394565b3480156105c057600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f457600080fd5b5061024660045481565b61060781611578565b6000838152600260205260409020541461063c5760405162461bcd60e51b8152600401610633906123ae565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f61237e565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b81611578565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f0000000000000000000000000000000000000000000000000000000000000000346123ec565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161088f5761088f6123ff565b040311156108d25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461094a5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f69190612415565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a579190612415565b6001600160a01b031614610aa65760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610ab657508115155b15610af957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b0281611578565b60008481526002602052604090205403610b5f578051829003610b2b57600160a0820152610b46565b60c08101516001600160a01b031615610b4657600260a08201525b610b4f81611578565b6000848152600260205260409020555b505050565b6000610b907f000000000000000000000000000000000000000000000000000000000000000042612432565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c055760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000004281610c3457610c346123ff565b048210610c835760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b600454421115610d07577f0000000000000000000000000000000000000000000000000000000000000000600454420381610cc057610cc06123ff565b04826001011015610d075760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610633565b80610d245760405162461bcd60e51b8152600401610633906123ae565b60008281526002602052604090205415610d765760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbc90611578565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107bb565b60408510610e425760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b600084848484604051602001610e5b9493929190612454565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610edb576000888883818110610e9d57610e9d612496565b90506020020135905082811115610ec257826000528060205260406000209250610ed2565b8060005282602052604060002092505b50600101610e81565b508060005414610f1e5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f935760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc390899089906124ac565b6000604051808303816000865af19150503d8060008114611000576040519150601f19603f3d011682016040523d82523d6000602084013e611005565b606091505b50509050806110565760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b26103653683900383018361235b565b600083815260026020526040902054146110de5760405162461bcd60e51b8152600401610633906123ae565b60026110f060c0830160a084016124bc565b60028111156111015761110161237e565b146111425760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060e0840191505060c083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f96103653683900383018361235b565b600083815260026020526040902054146112255760405162461bcd60e51b8152600401610633906123ae565b600161123760c0830160a084016124bc565b60028111156112485761124861237e565b146112855760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b60008281526002602052604081208190556112a660e0830160c084016124d7565b6001600160a01b031614611301576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060408401915050602083016124d7565b61131160408201602083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61136581611578565b600083815260026020526040902054146113915760405162461bcd60e51b8152600401610633906123ae565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166113ca91906124f4565b6113d491906124f4565b4210156114385760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b600061144382611f9b565b905060028160038111156114595761145961237e565b1480611476575060008160038111156114745761147461237e565b145b6114df5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526114fc82611578565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115727f000000000000000000000000000000000000000000000000000000000000000083612432565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986115ad989097969101612507565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561162a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164e9190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561168b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116af9190612585565b50925050506004548111156116f95760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156117bb576006541561176d5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611811576118116123ff565b040311156118545760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b61185d81611578565b600083815260026020526040902054146118895760405162461bcd60e51b8152600401610633906123ae565b60c08101516001600160a01b0316156118db5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b60016118e682611f9b565b60038111156118f7576118f761237e565b146119445760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b60015482111561198c57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261199c81611578565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a0557611a056123ff565b040311611a465760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611a4f81611578565b60008381526002602052604090205414611a7b5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611a9357611a9361237e565b14611ad25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611b565760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b6a82611578565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611c255760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b600454600654611c3591906124f4565b4211611c9e5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d399190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611d76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9a9190612585565b50925050508181036108385760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611e3557611e356123ff565b040311611e765760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611e7f81611578565b60008381526002602052604090205414611eab5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ec357611ec361237e565b14611f025760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611f875760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b6a82611578565b6000816060015163ffffffff16600003611fb757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611ff357506003919050565b6000600c836060015163ffffffff16420381612011576120116123ff565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612055576001925061205a565b600092505b50505b919050565b6001600160a01b03811681146117bb57600080fd5b803561205d81612062565b803563ffffffff8116811461205d57600080fd5b80356003811061205d57600080fd5b600060e082840312156120b757600080fd5b60405160e0810181811067ffffffffffffffff821117156120e857634e487b7160e01b600052604160045260246000fd5b604052823581529050806120fe60208401612077565b602082015261210f60408401612082565b604082015261212060608401612082565b606082015261213160808401612082565b608082015261214260a08401612096565b60a082015261215360c08401612077565b60c08201525092915050565b600080610100838503121561217357600080fd5b8235915061218484602085016120a5565b90509250929050565b600080600061012084860312156121a357600080fd5b83359250602084013591506121bb85604086016120a5565b90509250925092565b6000602082840312156121d657600080fd5b5035919050565b600080604083850312156121f057600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461205d57600080fd5b60008083601f84011261222957600080fd5b50813567ffffffffffffffff81111561224157600080fd5b60208301915083602082850101111561225957600080fd5b9250929050565b6000806000806000806080878903121561227957600080fd5b863567ffffffffffffffff8082111561229157600080fd5b818901915089601f8301126122a557600080fd5b8135818111156122b457600080fd5b8a60208260051b85010111156122c957600080fd5b602083019850809750506122df60208a016121ff565b95506122ed60408a01612077565b9450606089013591508082111561230357600080fd5b5061231089828a01612217565b979a9699509497509295939492505050565b60008082840361010081121561233757600080fd5b8335925060e0601f198201121561234d57600080fd5b506020830190509250929050565b600060e0828403121561236d57600080fd5b61237783836120a5565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123a8576123a861237e565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611572576115726123d6565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561242757600080fd5b815161237781612062565b60008261244f57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156124ce57600080fd5b61237782612096565b6000602082840312156124e957600080fd5b813561237781612062565b80820180821115611572576115726123d6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061255f5761255f61237e565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561259b57600080fd5b50508251602084015160408501516060909501519196909550909250905056fea26469706673582212204314ec468d95ad31fe7eafafdb876c007cf6b72384de11516dd93c0e0c209c5264736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101c25760003560e01c806390784ae8116100f7578063b633b94411610095578063da2b7bc411610064578063da2b7bc414610567578063df19e6ff14610587578063e78cea92146105b4578063e813a755146105e857600080fd5b8063b633b944146104ca578063c2114a16146104ea578063cb9384681461051e578063d0e30db01461053357600080fd5b80639588eca2116100d15780639588eca214610418578063aa22a1c61461042e578063b044397e14610462578063b5b7a1841461049657600080fd5b806390784ae8146103b657806390df63b7146103cb578063930f28af146103f857600080fd5b806331ddf7431161016457806349b4299e1161013e57806349b4299e1461030a5780634a439cfe1461032a578063541adcca1461034a57806369cd250d1461036a57600080fd5b806331ddf743146102aa5780633ce43cfd146102ca5780634788cb38146102ea57600080fd5b8063222ae786116101a0578063222ae786146102315780632639c0601461025457806327ee6bdd1461028157806331d144571461029757600080fd5b806301139b68146101c7578063051d1970146101dc5780630f0adca514610211575b600080fd5b6101da6101d536600461215f565b6105fe565b005b3480156101e857600080fd5b506005546006546101f7919082565b604080519283526020830191909152015b60405180910390f35b34801561021d57600080fd5b506101da61022c36600461218d565b61083c565b34801561023d57600080fd5b50610246610b64565b604051908152602001610208565b34801561026057600080fd5b5061024661026f3660046121c4565b60026020526000908152604090205481565b34801561028d57600080fd5b5061024660015481565b6101da6102a53660046121dd565b610b95565b3480156102b657600080fd5b506101da6102c5366004612260565b610e00565b3480156102d657600080fd5b506101da6102e5366004612322565b6110a0565b3480156102f657600080fd5b506101da610305366004612322565b6111e7565b34801561031657600080fd5b506101da61032536600461215f565b61135c565b34801561033657600080fd5b506102466103453660046121c4565b611546565b34801561035657600080fd5b5061024661036536600461235b565b611578565b34801561037657600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610208565b3480156103c257600080fd5b506101da6115ca565b3480156103d757600080fd5b506102466103e63660046121c4565b60036020526000908152604090205481565b34801561040457600080fd5b506101da61041336600461215f565b6117be565b34801561042457600080fd5b5061024660005481565b34801561043a57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561046e57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a257600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d657600080fd5b506101da6104e536600461215f565b6119b2565b3480156104f657600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561052a57600080fd5b506101da611bbe565b34801561053f57600080fd5b506102467f000000000000000000000000000000000000000000000000000000000000000081565b34801561057357600080fd5b506101da61058236600461215f565b611de2565b34801561059357600080fd5b506105a76105a236600461235b565b611f9b565b6040516102089190612394565b3480156105c057600080fd5b5061039e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f457600080fd5b5061024660045481565b61060781611578565b6000838152600260205260409020541461063c5760405162461bcd60e51b8152600401610633906123ae565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f61237e565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b81611578565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f0000000000000000000000000000000000000000000000000000000000000000346123ec565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161088f5761088f6123ff565b040311156108d25760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461094a5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f69190612415565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a579190612415565b6001600160a01b031614610aa65760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610ab657508115155b15610af957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b0281611578565b60008481526002602052604090205403610b5f578051829003610b2b57600160a0820152610b46565b60c08101516001600160a01b031615610b4657600260a08201525b610b4f81611578565b6000848152600260205260409020555b505050565b6000610b907f000000000000000000000000000000000000000000000000000000000000000042612432565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610c055760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000004281610c3457610c346123ff565b048210610c835760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b600454421115610d07577f0000000000000000000000000000000000000000000000000000000000000000600454420381610cc057610cc06123ff565b04826001011015610d075760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b9903a37b79037b6321760791b6044820152606401610633565b80610d245760405162461bcd60e51b8152600401610633906123ae565b60008281526002602052604090205415610d765760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610dbc90611578565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016107bb565b60408510610e425760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b600084848484604051602001610e5b9493929190612454565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610edb576000888883818110610e9d57610e9d612496565b90506020020135905082811115610ec257826000528060205260406000209250610ed2565b8060005282602052604060002092505b50600101610e81565b508060005414610f1e5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c60011615610f935760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b03891690610fc390899089906124ac565b6000604051808303816000865af19150503d8060008114611000576040519150601f19603f3d011682016040523d82523d6000602084013e611005565b606091505b50509050806110565760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6110b26103653683900383018361235b565b600083815260026020526040902054146110de5760405162461bcd60e51b8152600401610633906123ae565b60026110f060c0830160a084016124bc565b60028111156111015761110161237e565b146111425760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060e0840191505060c083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6111f96103653683900383018361235b565b600083815260026020526040902054146112255760405162461bcd60e51b8152600401610633906123ae565b600161123760c0830160a084016124bc565b60028111156112485761124861237e565b146112855760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b60008281526002602052604081208190556112a660e0830160c084016124d7565b6001600160a01b031614611301576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061119c93505060408401915050602083016124d7565b61131160408201602083016124d7565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61136581611578565b600083815260026020526040902054146113915760405162461bcd60e51b8152600401610633906123ae565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166113ca91906124f4565b6113d491906124f4565b4210156114385760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b600061144382611f9b565b905060028160038111156114595761145961237e565b1480611476575060008160038111156114745761147461237e565b145b6114df5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526114fc82611578565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006115727f000000000000000000000000000000000000000000000000000000000000000083612432565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986115ad989097969101612507565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801561162a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164e9190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561168b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116af9190612585565b50925050506004548111156116f95760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6004548110156117bb576006541561176d5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611811576118116123ff565b040311156118545760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b61185d81611578565b600083815260026020526040902054146118895760405162461bcd60e51b8152600401610633906123ae565b60c08101516001600160a01b0316156118db5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b60016118e682611f9b565b60038111156118f7576118f761237e565b146119445760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b60015482111561198c57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261199c81611578565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a0557611a056123ff565b040311611a465760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611a4f81611578565b60008381526002602052604090205414611a7b5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611a9357611a9361237e565b14611ad25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611b565760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b6a82611578565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b600654600003611c255760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b600454600654611c3591906124f4565b4211611c9e5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015611d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d399190612415565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611d76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9a9190612585565b50925050508181036108385760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611e3557611e356123ff565b040311611e765760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611e7f81611578565b60008381526002602052604090205414611eab5760405162461bcd60e51b8152600401610633906123ae565b60008160a001516002811115611ec357611ec361237e565b14611f025760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611f875760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611b6a82611578565b6000816060015163ffffffff16600003611fb757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611ff357506003919050565b6000600c836060015163ffffffff16420381612011576120116123ff565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612055576001925061205a565b600092505b50505b919050565b6001600160a01b03811681146117bb57600080fd5b803561205d81612062565b803563ffffffff8116811461205d57600080fd5b80356003811061205d57600080fd5b600060e082840312156120b757600080fd5b60405160e0810181811067ffffffffffffffff821117156120e857634e487b7160e01b600052604160045260246000fd5b604052823581529050806120fe60208401612077565b602082015261210f60408401612082565b604082015261212060608401612082565b606082015261213160808401612082565b608082015261214260a08401612096565b60a082015261215360c08401612077565b60c08201525092915050565b600080610100838503121561217357600080fd5b8235915061218484602085016120a5565b90509250929050565b600080600061012084860312156121a357600080fd5b83359250602084013591506121bb85604086016120a5565b90509250925092565b6000602082840312156121d657600080fd5b5035919050565b600080604083850312156121f057600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461205d57600080fd5b60008083601f84011261222957600080fd5b50813567ffffffffffffffff81111561224157600080fd5b60208301915083602082850101111561225957600080fd5b9250929050565b6000806000806000806080878903121561227957600080fd5b863567ffffffffffffffff8082111561229157600080fd5b818901915089601f8301126122a557600080fd5b8135818111156122b457600080fd5b8a60208260051b85010111156122c957600080fd5b602083019850809750506122df60208a016121ff565b95506122ed60408a01612077565b9450606089013591508082111561230357600080fd5b5061231089828a01612217565b979a9699509497509295939492505050565b60008082840361010081121561233757600080fd5b8335925060e0601f198201121561234d57600080fd5b506020830190509250929050565b600060e0828403121561236d57600080fd5b61237783836120a5565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123a8576123a861237e565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b81810381811115611572576115726123d6565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561242757600080fd5b815161237781612062565b60008261244f57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156124ce57600080fd5b61237782612096565b6000602082840312156124e957600080fd5b813561237781612062565b80820180821115611572576115726123d6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061255f5761255f61237e565b60f89490941b60408301525060609190911b909116604182015260550195945050505050565b6000806000806080858703121561259b57600080fd5b50508251602084015160408501516060909501519196909550909250905056fea26469706673582212204314ec468d95ad31fe7eafafdb876c007cf6b72384de11516dd93c0e0c209c5264736f6c63430008120033", + "numDeployments": 1, + "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxClaimDelayEpochs\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxClaimDelayEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer delay limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxClaimDelayEpochs\":\"The maximum number of epochs that can be claimed in the past.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEth\":\"The address of the inbox contract on Arbitrum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":\"VeaOutboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable maxClaimDelayEpochs; // The maximum number of epochs that can be claimed in the past.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer delay limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks,\\n uint256 _maxClaimDelayEpochs\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n maxClaimDelayEpochs = _maxClaimDelayEpochs;\\n\\n updateSequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n // If the sequencerDelayLimit is set larger than block.timestamp - epochPeriod by arbitrum governance, \\n // the checked arithmetic will revert due to underflow and the bridge will shutdown.\\n uint256 minEpochSequencerDelay = (block.timestamp - sequencerDelayLimit) / epochPeriod - 1;\\n\\n uint256 minEpochClaim;\\n \\n unchecked{\\n // deployed sets maxClaimWindowEpochs so no underflow is possible\\n minEpochClaim = block.timestamp / epochPeriod - maxClaimDelayEpochs;\\n }\\n\\n uint256 minClaimableEpoch = minEpochSequencerDelay > minEpochClaim ? minEpochSequencerDelay : minEpochClaim;\\n \\n require(_epoch >= minClaimableEpoch, \\\"Invalid epoch.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= uint256(_claim.timestampClaimed) + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x3a94e33e43dcab687319e91c809a9df5b9309d972508025bcda56eb9e44bb08f\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101c06040523480156200001257600080fd5b5060405162002c8b38038062002c8b8339810160408190526200003591620002d5565b60c08890526101208790526101408690526101808590526001600160a01b0380851660a05283166080526101a082905261016081905262000075620000d5565b620000826002896200035c565b60e0819052620000948960026200037f565b620000a091906200039f565b6101005261012051600190620000b790426200035c565b620000c391906200039f565b60015550620004119650505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000118573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200013e9190620003b5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156200017c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001a29190620003da565b5092505050600454811115620001ed5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002b55760065415620002675760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002d057600080fd5b919050565b600080600080600080600080610100898b031215620002f357600080fd5b885197506020890151965060408901519550606089015194506200031a60808a01620002b8565b93506200032a60a08a01620002b8565b60c08a015160e0909a0151989b979a5095989497939692505050565b634e487b7160e01b600052601160045260246000fd5b6000826200037a57634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000399576200039962000346565b92915050565b8181038181111562000399576200039962000346565b600060208284031215620003c857600080fd5b620003d382620002b8565b9392505050565b60008060008060808587031215620003f157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516127176200057460003960008181610494015261214b0152600081816104c801528181610aa001528181611b0a01528181611cfe0152611f0a0152600081816101f90152610f2c01526000818161055001526120df0152600081816104fc01528181610ac401528181610dcd01528181610e6c01528181610ee501528181610f4d015281816116dd0152818161189701528181611b2e01528181611d220152611f2e015260006114f40152600081816114a101526116060152600081816105840152818161067d015281816108030152818161083001528181610df9015281816110d0015281816110fd0152818161166901528181611e6801528181611ecf01526120750152600081816103e50152610bae0152600081816106050152818161098601528181610b3f01528181610bd8015261191801526127176000f3fe6080604052600436106101cd5760003560e01c80635f43a47f116100f7578063b5b7a18411610095578063da2b7bc411610064578063da2b7bc4146105a6578063df19e6ff146105c6578063e78cea92146105f3578063e813a7551461062757600080fd5b8063b5b7a184146104ea578063b633b9441461051e578063c2114a161461053e578063d0e30db01461057257600080fd5b8063930f28af116100d1578063930f28af1461044c5780639588eca21461046c578063aa22a1c614610482578063b044397e146104b657600080fd5b80635f43a47f146103be57806369cd250d146103d357806390df63b71461041f57600080fd5b806327ee6bdd1161016f5780634788cb381161013e5780634788cb381461033e57806349b4299e1461035e5780634a439cfe1461037e578063541adcca1461039e57600080fd5b806327ee6bdd146102d557806331d14457146102eb57806331ddf743146102fe5780633ce43cfd1461031e57600080fd5b80630c63fa84116101ab5780630c63fa841461025e5780630f0adca514610273578063222ae786146102935780632639c060146102a857600080fd5b806301139b68146101d2578063042c4aaf146101e7578063051d19701461022e575b600080fd5b6101e56101e0366004612285565b61063d565b005b3480156101f357600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561023a57600080fd5b50600554600654610249919082565b60408051928352602083019190915201610225565b34801561026a57600080fd5b506101e561087a565b34801561027f57600080fd5b506101e561028e3660046122b3565b610a9e565b34801561029f57600080fd5b5061021b610dc6565b3480156102b457600080fd5b5061021b6102c33660046122ea565b60026020526000908152604090205481565b3480156102e157600080fd5b5061021b60015481565b6101e56102f9366004612303565b610df7565b34801561030a57600080fd5b506101e5610319366004612386565b61114a565b34801561032a57600080fd5b506101e5610339366004612448565b6113ea565b34801561034a57600080fd5b506101e5610359366004612448565b611531565b34801561036a57600080fd5b506101e5610379366004612285565b6116a6565b34801561038a57600080fd5b5061021b6103993660046122ea565b611890565b3480156103aa57600080fd5b5061021b6103b9366004612481565b6118c2565b3480156103ca57600080fd5b506101e5611914565b3480156103df57600080fd5b506104077f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610225565b34801561042b57600080fd5b5061021b61043a3660046122ea565b60036020526000908152604090205481565b34801561045857600080fd5b506101e5610467366004612285565b611b08565b34801561047857600080fd5b5061021b60005481565b34801561048e57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c257600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104f657600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561052a57600080fd5b506101e5610539366004612285565b611cfc565b34801561054a57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561057e57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105b257600080fd5b506101e56105c1366004612285565b611f08565b3480156105d257600080fd5b506105e66105e1366004612481565b6120c1565b60405161022591906124ba565b3480156105ff57600080fd5b506104077f000000000000000000000000000000000000000000000000000000000000000081565b34801561063357600080fd5b5061021b60045481565b610646816118c2565b6000838152600260205260409020541461067b5760405162461bcd60e51b8152600401610672906124d4565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106eb5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610672565b60c08101516001600160a01b0316156107465760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610672565b60008160a00151600281111561075e5761075e6124a4565b146107ab5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610672565b3360c08201526107ba816118c2565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108765760006108557f000000000000000000000000000000000000000000000000000000000000000034612512565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036108e15760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610672565b6004546006546108f19190612525565b421161095a5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610672565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156109d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f59190612538565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610a32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a569190612555565b50925050508181036108765760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610af157610af161258b565b04031115610b345760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610672565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610bac5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610672565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c589190612538565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb99190612538565b6001600160a01b031614610d085760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610672565b60015483118015610d1857508115155b15610d5b57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610d64816118c2565b60008481526002602052604090205403610dc1578051829003610d8d57600160a0820152610da8565b60c08101516001600160a01b031615610da857600260a08201525b610db1816118c2565b6000848152600260205260409020555b505050565b6000610df27f0000000000000000000000000000000000000000000000000000000000000000426125a1565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610e675760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610672565b610e917f0000000000000000000000000000000000000000000000000000000000000000426125a1565b8210610edf5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610672565b600060017f000000000000000000000000000000000000000000000000000000000000000060045442610f129190612512565b610f1c91906125a1565b610f269190612512565b905060007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000004281610f7a57610f7a61258b565b040390506000818311610f8d5781610f8f565b825b905080851015610fd25760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21032b837b1b41760911b6044820152606401610672565b83610fef5760405162461bcd60e51b8152600401610672906124d4565b600085815260026020526040902054156110415760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610672565b6040805160e0810182528581523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611087906118c2565b600086815260026020908152604091829020929092555185815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156111435760006111227f000000000000000000000000000000000000000000000000000000000000000034612512565b604051909150339082156108fc029083906000818181858888f15050505050505b5050505050565b6040851061118c5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610672565b6000848484846040516020016111a594939291906125c3565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156112255760008888838181106111e7576111e7612605565b9050602002013590508281111561120c5782600052806020526040600020925061121c565b8060005282602052604060002092505b506001016111cb565b5080600054146112685760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610672565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112dd5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610672565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061130d908990899061261b565b6000604051808303816000865af19150503d806000811461134a576040519150601f19603f3d011682016040523d82523d6000602084013e61134f565b606091505b50509050806113a05760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610672565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6113fc6103b936839003830183612481565b600083815260026020526040902054146114285760405162461bcd60e51b8152600401610672906124d4565b600261143a60c0830160a0840161262b565b600281111561144b5761144b6124a4565b1461148c5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610672565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114e693505060e0840191505060c08301612646565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6115436103b936839003830183612481565b6000838152600260205260409020541461156f5760405162461bcd60e51b8152600401610672906124d4565b600161158160c0830160a0840161262b565b6002811115611592576115926124a4565b146115cf5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610672565b60008281526002602052604081208190556115f060e0830160c08401612646565b6001600160a01b03161461164b576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114e69350506040840191505060208301612646565b61165b6040820160208301612646565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6116af816118c2565b600083815260026020526040902054146116db5760405162461bcd60e51b8152600401610672906124d4565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166117149190612525565b61171e9190612525565b4210156117825760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610672565b600061178d826120c1565b905060028160038111156117a3576117a36124a4565b14806117c0575060008160038111156117be576117be6124a4565b145b6118295760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610672565b63ffffffff428116606084015243166080830152611846826118c2565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006118bc7f0000000000000000000000000000000000000000000000000000000000000000836125a1565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986118f7989097969101612663565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015611974573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119989190612538565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156119d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f99190612555565b5092505050600454811115611a435760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015611b055760065415611ab75760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610672565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b5b57611b5b61258b565b04031115611b9e5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610672565b611ba7816118c2565b60008381526002602052604090205414611bd35760405162461bcd60e51b8152600401610672906124d4565b60c08101516001600160a01b031615611c255760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610672565b6001611c30826120c1565b6003811115611c4157611c416124a4565b14611c8e5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610672565b600154821115611cd657600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611ce6816118c2565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d4f57611d4f61258b565b040311611d905760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610672565b611d99816118c2565b60008381526002602052604090205414611dc55760405162461bcd60e51b8152600401610672906124d4565b60008160a001516002811115611ddd57611ddd6124a4565b14611e1c5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610672565b60c08101516001600160a01b0316156108765760208101516001600160a01b0316611ea05760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611eb4826118c2565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611f5b57611f5b61258b565b040311611f9c5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610672565b611fa5816118c2565b60008381526002602052604090205414611fd15760405162461bcd60e51b8152600401610672906124d4565b60008160a001516002811115611fe957611fe96124a4565b146120285760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610672565b60208101516001600160a01b0316156108765760c08101516001600160a01b03166120ad5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611eb4826118c2565b6000816060015163ffffffff166000036120dd57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561211957506003919050565b6000600c836060015163ffffffff164203816121375761213761258b565b608085015163ffffffff16919004019050437f00000000000000000000000000000000000000000000000000000000000000008183031161217b5760019250612180565b600092505b50505b919050565b6001600160a01b0381168114611b0557600080fd5b803561218381612188565b803563ffffffff8116811461218357600080fd5b80356003811061218357600080fd5b600060e082840312156121dd57600080fd5b60405160e0810181811067ffffffffffffffff8211171561220e57634e487b7160e01b600052604160045260246000fd5b604052823581529050806122246020840161219d565b6020820152612235604084016121a8565b6040820152612246606084016121a8565b6060820152612257608084016121a8565b608082015261226860a084016121bc565b60a082015261227960c0840161219d565b60c08201525092915050565b600080610100838503121561229957600080fd5b823591506122aa84602085016121cb565b90509250929050565b600080600061012084860312156122c957600080fd5b83359250602084013591506122e185604086016121cb565b90509250925092565b6000602082840312156122fc57600080fd5b5035919050565b6000806040838503121561231657600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461218357600080fd5b60008083601f84011261234f57600080fd5b50813567ffffffffffffffff81111561236757600080fd5b60208301915083602082850101111561237f57600080fd5b9250929050565b6000806000806000806080878903121561239f57600080fd5b863567ffffffffffffffff808211156123b757600080fd5b818901915089601f8301126123cb57600080fd5b8135818111156123da57600080fd5b8a60208260051b85010111156123ef57600080fd5b6020830198508097505061240560208a01612325565b955061241360408a0161219d565b9450606089013591508082111561242957600080fd5b5061243689828a0161233d565b979a9699509497509295939492505050565b60008082840361010081121561245d57600080fd5b8335925060e0601f198201121561247357600080fd5b506020830190509250929050565b600060e0828403121561249357600080fd5b61249d83836121cb565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106124ce576124ce6124a4565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156118bc576118bc6124fc565b808201808211156118bc576118bc6124fc565b60006020828403121561254a57600080fd5b815161249d81612188565b6000806000806080858703121561256b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b6000826125be57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561263d57600080fd5b61249d826121bc565b60006020828403121561265857600080fd5b813561249d81612188565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106126bb576126bb6124a4565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220af6b7bb1a2a01e26fd13c068961fe9cf4bd3863799379849841ae6b78e1b45b964736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101cd5760003560e01c80635f43a47f116100f7578063b5b7a18411610095578063da2b7bc411610064578063da2b7bc4146105a6578063df19e6ff146105c6578063e78cea92146105f3578063e813a7551461062757600080fd5b8063b5b7a184146104ea578063b633b9441461051e578063c2114a161461053e578063d0e30db01461057257600080fd5b8063930f28af116100d1578063930f28af1461044c5780639588eca21461046c578063aa22a1c614610482578063b044397e146104b657600080fd5b80635f43a47f146103be57806369cd250d146103d357806390df63b71461041f57600080fd5b806327ee6bdd1161016f5780634788cb381161013e5780634788cb381461033e57806349b4299e1461035e5780634a439cfe1461037e578063541adcca1461039e57600080fd5b806327ee6bdd146102d557806331d14457146102eb57806331ddf743146102fe5780633ce43cfd1461031e57600080fd5b80630c63fa84116101ab5780630c63fa841461025e5780630f0adca514610273578063222ae786146102935780632639c060146102a857600080fd5b806301139b68146101d2578063042c4aaf146101e7578063051d19701461022e575b600080fd5b6101e56101e0366004612285565b61063d565b005b3480156101f357600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561023a57600080fd5b50600554600654610249919082565b60408051928352602083019190915201610225565b34801561026a57600080fd5b506101e561087a565b34801561027f57600080fd5b506101e561028e3660046122b3565b610a9e565b34801561029f57600080fd5b5061021b610dc6565b3480156102b457600080fd5b5061021b6102c33660046122ea565b60026020526000908152604090205481565b3480156102e157600080fd5b5061021b60015481565b6101e56102f9366004612303565b610df7565b34801561030a57600080fd5b506101e5610319366004612386565b61114a565b34801561032a57600080fd5b506101e5610339366004612448565b6113ea565b34801561034a57600080fd5b506101e5610359366004612448565b611531565b34801561036a57600080fd5b506101e5610379366004612285565b6116a6565b34801561038a57600080fd5b5061021b6103993660046122ea565b611890565b3480156103aa57600080fd5b5061021b6103b9366004612481565b6118c2565b3480156103ca57600080fd5b506101e5611914565b3480156103df57600080fd5b506104077f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610225565b34801561042b57600080fd5b5061021b61043a3660046122ea565b60036020526000908152604090205481565b34801561045857600080fd5b506101e5610467366004612285565b611b08565b34801561047857600080fd5b5061021b60005481565b34801561048e57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c257600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104f657600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561052a57600080fd5b506101e5610539366004612285565b611cfc565b34801561054a57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561057e57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105b257600080fd5b506101e56105c1366004612285565b611f08565b3480156105d257600080fd5b506105e66105e1366004612481565b6120c1565b60405161022591906124ba565b3480156105ff57600080fd5b506104077f000000000000000000000000000000000000000000000000000000000000000081565b34801561063357600080fd5b5061021b60045481565b610646816118c2565b6000838152600260205260409020541461067b5760405162461bcd60e51b8152600401610672906124d4565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106eb5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610672565b60c08101516001600160a01b0316156107465760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610672565b60008160a00151600281111561075e5761075e6124a4565b146107ab5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610672565b3360c08201526107ba816118c2565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108765760006108557f000000000000000000000000000000000000000000000000000000000000000034612512565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036108e15760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610672565b6004546006546108f19190612525565b421161095a5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610672565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156109d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f59190612538565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610a32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a569190612555565b50925050508181036108765760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610af157610af161258b565b04031115610b345760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610672565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610bac5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610672565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c589190612538565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb99190612538565b6001600160a01b031614610d085760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610672565b60015483118015610d1857508115155b15610d5b57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610d64816118c2565b60008481526002602052604090205403610dc1578051829003610d8d57600160a0820152610da8565b60c08101516001600160a01b031615610da857600260a08201525b610db1816118c2565b6000848152600260205260409020555b505050565b6000610df27f0000000000000000000000000000000000000000000000000000000000000000426125a1565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610e675760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610672565b610e917f0000000000000000000000000000000000000000000000000000000000000000426125a1565b8210610edf5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610672565b600060017f000000000000000000000000000000000000000000000000000000000000000060045442610f129190612512565b610f1c91906125a1565b610f269190612512565b905060007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000004281610f7a57610f7a61258b565b040390506000818311610f8d5781610f8f565b825b905080851015610fd25760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21032b837b1b41760911b6044820152606401610672565b83610fef5760405162461bcd60e51b8152600401610672906124d4565b600085815260026020526040902054156110415760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610672565b6040805160e0810182528581523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611087906118c2565b600086815260026020908152604091829020929092555185815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156111435760006111227f000000000000000000000000000000000000000000000000000000000000000034612512565b604051909150339082156108fc029083906000818181858888f15050505050505b5050505050565b6040851061118c5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610672565b6000848484846040516020016111a594939291906125c3565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156112255760008888838181106111e7576111e7612605565b9050602002013590508281111561120c5782600052806020526040600020925061121c565b8060005282602052604060002092505b506001016111cb565b5080600054146112685760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610672565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112dd5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610672565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061130d908990899061261b565b6000604051808303816000865af19150503d806000811461134a576040519150601f19603f3d011682016040523d82523d6000602084013e61134f565b606091505b50509050806113a05760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610672565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6113fc6103b936839003830183612481565b600083815260026020526040902054146114285760405162461bcd60e51b8152600401610672906124d4565b600261143a60c0830160a0840161262b565b600281111561144b5761144b6124a4565b1461148c5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610672565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114e693505060e0840191505060c08301612646565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6115436103b936839003830183612481565b6000838152600260205260409020541461156f5760405162461bcd60e51b8152600401610672906124d4565b600161158160c0830160a0840161262b565b6002811115611592576115926124a4565b146115cf5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610672565b60008281526002602052604081208190556115f060e0830160c08401612646565b6001600160a01b03161461164b576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114e69350506040840191505060208301612646565b61165b6040820160208301612646565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6116af816118c2565b600083815260026020526040902054146116db5760405162461bcd60e51b8152600401610672906124d4565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166117149190612525565b61171e9190612525565b4210156117825760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610672565b600061178d826120c1565b905060028160038111156117a3576117a36124a4565b14806117c0575060008160038111156117be576117be6124a4565b145b6118295760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610672565b63ffffffff428116606084015243166080830152611846826118c2565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006118bc7f0000000000000000000000000000000000000000000000000000000000000000836125a1565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986118f7989097969101612663565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015611974573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119989190612538565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156119d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f99190612555565b5092505050600454811115611a435760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015611b055760065415611ab75760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610672565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b5b57611b5b61258b565b04031115611b9e5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610672565b611ba7816118c2565b60008381526002602052604090205414611bd35760405162461bcd60e51b8152600401610672906124d4565b60c08101516001600160a01b031615611c255760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610672565b6001611c30826120c1565b6003811115611c4157611c416124a4565b14611c8e5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610672565b600154821115611cd657600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611ce6816118c2565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d4f57611d4f61258b565b040311611d905760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610672565b611d99816118c2565b60008381526002602052604090205414611dc55760405162461bcd60e51b8152600401610672906124d4565b60008160a001516002811115611ddd57611ddd6124a4565b14611e1c5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610672565b60c08101516001600160a01b0316156108765760208101516001600160a01b0316611ea05760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611eb4826118c2565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611f5b57611f5b61258b565b040311611f9c5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610672565b611fa5816118c2565b60008381526002602052604090205414611fd15760405162461bcd60e51b8152600401610672906124d4565b60008160a001516002811115611fe957611fe96124a4565b146120285760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610672565b60208101516001600160a01b0316156108765760c08101516001600160a01b03166120ad5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611eb4826118c2565b6000816060015163ffffffff166000036120dd57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561211957506003919050565b6000600c836060015163ffffffff164203816121375761213761258b565b608085015163ffffffff16919004019050437f00000000000000000000000000000000000000000000000000000000000000008183031161217b5760019250612180565b600092505b50505b919050565b6001600160a01b0381168114611b0557600080fd5b803561218381612188565b803563ffffffff8116811461218357600080fd5b80356003811061218357600080fd5b600060e082840312156121dd57600080fd5b60405160e0810181811067ffffffffffffffff8211171561220e57634e487b7160e01b600052604160045260246000fd5b604052823581529050806122246020840161219d565b6020820152612235604084016121a8565b6040820152612246606084016121a8565b6060820152612257608084016121a8565b608082015261226860a084016121bc565b60a082015261227960c0840161219d565b60c08201525092915050565b600080610100838503121561229957600080fd5b823591506122aa84602085016121cb565b90509250929050565b600080600061012084860312156122c957600080fd5b83359250602084013591506122e185604086016121cb565b90509250925092565b6000602082840312156122fc57600080fd5b5035919050565b6000806040838503121561231657600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461218357600080fd5b60008083601f84011261234f57600080fd5b50813567ffffffffffffffff81111561236757600080fd5b60208301915083602082850101111561237f57600080fd5b9250929050565b6000806000806000806080878903121561239f57600080fd5b863567ffffffffffffffff808211156123b757600080fd5b818901915089601f8301126123cb57600080fd5b8135818111156123da57600080fd5b8a60208260051b85010111156123ef57600080fd5b6020830198508097505061240560208a01612325565b955061241360408a0161219d565b9450606089013591508082111561242957600080fd5b5061243689828a0161233d565b979a9699509497509295939492505050565b60008082840361010081121561245d57600080fd5b8335925060e0601f198201121561247357600080fd5b506020830190509250929050565b600060e0828403121561249357600080fd5b61249d83836121cb565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106124ce576124ce6124a4565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156118bc576118bc6124fc565b808201808211156118bc576118bc6124fc565b60006020828403121561254a57600080fd5b815161249d81612188565b6000806000806080858703121561256b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b6000826125be57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561263d57600080fd5b61249d826121bc565b60006020828403121561265857600080fd5b813561249d81612188565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106126bb576126bb6124a4565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220af6b7bb1a2a01e26fd13c068961fe9cf4bd3863799379849841ae6b78e1b45b964736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.", "events": { @@ -1062,13 +1081,13 @@ "sequencerDelayLimitDecreaseRequested(uint256)": { "details": "This event indicates that a request to decrease the sequencer limit has been made.", "params": { - "_requestedsequencerDelayLimit": "The new sequencer limit requested." + "_requestedSequencerDelayLimit": "The new sequencer delay limit requested." } }, "sequencerDelayLimitUpdated(uint256)": { "details": "This event indicates the sequencer limit updated.", "params": { - "_newsequencerDelayLimit": "The new maxL2StateSyncDelay." + "_newSequencerDelayLimit": "The new sequencer delay limit." } } }, @@ -1102,6 +1121,7 @@ "params": { "_deposit": "The deposit amount to submit a claim in wei.", "_epochPeriod": "The duration of each epoch.", + "_maxClaimDelayEpochs": "The maximum number of epochs that can be claimed in the past.", "_maxMissingBlocks": "The maximum number of blocks that can be missing in a challenge period.", "_minChallengePeriod": "The minimum time window to challenge a claim.", "_timeoutEpochs": "The epochs before the bridge is considered shutdown.", @@ -1120,7 +1140,7 @@ "epoch": "The hash of the claim." } }, - "executesequencerDelayLimitDecreaseRequest()": { + "executeSequencerDelayLimitDecreaseRequest()": { "details": "execute sequencerDelayLimitDecreaseRequest" }, "hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))": { @@ -1156,7 +1176,7 @@ "_epoch": "The epoch of the claim to challenge." } }, - "updatesequencerDelayLimit()": { + "updateSequencerDelayLimit()": { "details": "Request to decrease the sequencerDelayLimit." }, "verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { @@ -1209,7 +1229,7 @@ "storageLayout": { "storage": [ { - "astId": 430, + "astId": 432, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "stateRoot", "offset": 0, @@ -1217,7 +1237,7 @@ "type": "t_bytes32" }, { - "astId": 432, + "astId": 434, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "latestVerifiedEpoch", "offset": 0, @@ -1225,7 +1245,7 @@ "type": "t_uint256" }, { - "astId": 436, + "astId": 438, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "claimHashes", "offset": 0, @@ -1233,7 +1253,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 440, + "astId": 442, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "relayed", "offset": 0, @@ -1241,7 +1261,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 442, + "astId": 444, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "sequencerDelayLimit", "offset": 0, @@ -1249,12 +1269,12 @@ "type": "t_uint256" }, { - "astId": 445, + "astId": 447, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "5", - "type": "t_struct(SequencerDelayLimitDecreaseRequest)450_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)452_storage" } ], "types": { @@ -1270,12 +1290,12 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_struct(SequencerDelayLimitDecreaseRequest)450_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)452_storage": { "encoding": "inplace", "label": "struct VeaOutboxArbToEth.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 447, + "astId": 449, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "requestedsequencerDelayLimit", "offset": 0, @@ -1283,7 +1303,7 @@ "type": "t_uint256" }, { - "astId": 449, + "astId": 451, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "timestamp", "offset": 0, diff --git a/contracts/package.json b/contracts/package.json index 1029ddb4..65f1a053 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -38,15 +38,18 @@ "start": "hardhat node --tags nothing", "start-local": "hardhat node --tags ArbToEthOutbox,ArbToEthInbox", "deploy": "hardhat deploy", - "deploy:mainnet": "yarn deploy:ArbToEth && yarn deploy:ArbToGnosis", - "deploy:testnet": "yarn deploy:ArbToEthTestnet && yarn deploy:ArbToGnosisTestnet", - "deploy:devnet": "yarn deploy:ArbToEthDevnet && yarn deploy:ArbToGnosisDevnet", + "deploy:mainnet": "yarn deploy:ArbToEth && yarn deploy:ArbToGnosis && yarn deploy:GnosisToArb", + "deploy:testnet": "yarn deploy:ArbToEthTestnet && yarn deploy:ArbToGnosisTestnet && yarn deploy:GnosisToArbTestnet", + "deploy:devnet": "yarn deploy:ArbToEthDevnet && yarn deploy:ArbToGnosisDevnet && yarn deploy:GnosisToArbDevnet", "deploy:ArbToEth": "hardhat deploy --network mainnet --tags ArbToEthOutbox && hardhat deploy --network arbitrum --tags ArbToEthInbox", "deploy:ArbToGnosis": "hardhat deploy --network gnosis --tags ArbToGnosisOutbox && hardhat deploy --network arbitrum --tags ArbToGnosisInbox && hardhat deploy --network mainnet --tags ArbToGnosisRouter", + "deploy:GnosisToArb": "hardhat deploy --network arbitrum --tags GnosisToArbOutbox && hardhat deploy --network chiado --tags GnosisToArbInbox && hardhat deploy --network goerli --tags GnosisToArbRouter", "deploy:ArbToEthTestnet": "hardhat deploy --network goerli --tags ArbToEthOutbox && hardhat deploy --network arbitrumGoerli --tags ArbToEthInbox", "deploy:ArbToGnosisTestnet": "hardhat deploy --network chiado --tags ArbToGnosisOutbox && hardhat deploy --network arbitrumGoerli --tags ArbToGnosisInbox && hardhat deploy --network goerli --tags ArbToGnosisRouter", + "deploy:GnosisToArbTestnet": "hardhat deploy --network arbitrumGoerli --tags GnosisToArbOutbox && hardhat deploy --network chiado --tags GnosisToArbInbox && hardhat deploy --network goerli --tags GnosisToArbRouter", "deploy:ArbToEthDevnet": "hardhat deploy --network goerli --tags ArbGoerliToGoerliOutbox && hardhat deploy --network arbitrumGoerli --tags ArbGoerliToGoerliInbox", "deploy:ArbToGnosisDevnet": "hardhat deploy --network chiado --tags ArbGoerliToChiadoOutbox && hardhat deploy --network arbitrumGoerli --tags ArbGoerliToChiadoInbox && hardhat deploy --network goerli --tags ArbGoerliToChiadoRouter", + "deploy:GnosisToArbDevnet": "hardhat deploy --network arbitrumGoerli --tags ChiadoToArbGoerliOutbox && hardhat deploy --network chiado --tags ChiadoToArbGoerliInbox && hardhat deploy --network goerli --tags ChiadoToArbGoerliRouter", "deploy-local": "hardhat deploy --tags ArbToEthOutbox,ArbToEthInbox --network localhost", "etherscan-verify:testnet": "yarn etherscan-verify:chiado && yarn etherscan-verify:goerli && yarn etherscan-verify:arbitrumGoerli", "etherscan-verify:gnosis": "hardhat etherscan-verify --network gnosischain", diff --git a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol index 3174d2b6..8a2f4d7d 100644 --- a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol +++ b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol @@ -33,6 +33,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots. uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer. + uint256 public immutable maxClaimDelayEpochs; // The maximum number of epochs that can be claimed in the past. uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown. uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period. @@ -84,12 +85,12 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { event Verified(uint256 _epoch); /// @dev This event indicates the sequencer limit updated. - /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay. - event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit); + /// @param _newSequencerDelayLimit The new sequencer delay limit. + event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit); /// @dev This event indicates that a request to decrease the sequencer limit has been made. - /// @param _requestedsequencerDelayLimit The new sequencer limit requested. - event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit); + /// @param _requestedSequencerDelayLimit The new sequencer delay limit requested. + event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit); // ************************************* // // * Function Modifiers * // @@ -117,6 +118,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { /// @param _timeoutEpochs The epochs before the bridge is considered shutdown. /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum. /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period. + /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past. constructor( uint256 _deposit, uint256 _epochPeriod, @@ -124,7 +126,8 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { uint256 _timeoutEpochs, address _veaInboxArbToEth, address _bridge, - uint256 _maxMissingBlocks + uint256 _maxMissingBlocks, + uint256 _maxClaimDelayEpochs ) { deposit = _deposit; // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value. @@ -134,8 +137,9 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { veaInboxArbToEth = _veaInboxArbToEth; bridge = IBridge(_bridge); maxMissingBlocks = _maxMissingBlocks; + maxClaimDelayEpochs = _maxClaimDelayEpochs; - updatesequencerDelayLimit(); + updateSequencerDelayLimit(); // claimant and challenger are not sybil resistant // must burn half deposit to prevent zero cost griefing @@ -150,26 +154,26 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { // ************************************* // /// @dev Request to decrease the sequencerDelayLimit. - function updatesequencerDelayLimit() public { + function updateSequencerDelayLimit() public { // the maximum asynchronous lag between the L2 and L1 clocks - (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); + (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); - if (newsequencerDelayLimit > sequencerDelayLimit) { + if (newSequencerDelayLimit > sequencerDelayLimit) { // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown. - sequencerDelayLimit = newsequencerDelayLimit; - emit sequencerDelayLimitUpdated(newsequencerDelayLimit); - } else if (newsequencerDelayLimit < sequencerDelayLimit) { + sequencerDelayLimit = newSequencerDelayLimit; + emit sequencerDelayLimitUpdated(newSequencerDelayLimit); + } else if (newSequencerDelayLimit < sequencerDelayLimit) { require( sequencerDelayLimitDecreaseRequest.timestamp == 0, "Sequencer limit decrease request already pending." ); sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({ - requestedsequencerDelayLimit: newsequencerDelayLimit, + requestedsequencerDelayLimit: newSequencerDelayLimit, timestamp: block.timestamp }); - emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit); + emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit); } } @@ -203,16 +207,25 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual { require(msg.value >= deposit, "Insufficient claim deposit."); + require(_epoch < block.timestamp / epochPeriod, "Epoch has not yet passed."); + + // Allow claims to be made within the sequencerDelayLimit. + // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating. + // If the sequencerDelayLimit is set larger than block.timestamp - epochPeriod by arbitrum governance, + // the checked arithmetic will revert due to underflow and the bridge will shutdown. + uint256 minEpochSequencerDelay = (block.timestamp - sequencerDelayLimit) / epochPeriod - 1; + + uint256 minEpochClaim; + unchecked { - require(_epoch < block.timestamp / epochPeriod, "Epoch has not yet passed."); - // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value. - if (block.timestamp > sequencerDelayLimit) { - // Allow claims to be made within the sequencerDelayLimit. - // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating. - require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, "Epoch is too old."); - } + // deployed sets maxClaimWindowEpochs so no underflow is possible + minEpochClaim = block.timestamp / epochPeriod - maxClaimDelayEpochs; } + uint256 minClaimableEpoch = minEpochSequencerDelay > minEpochClaim ? minEpochSequencerDelay : minEpochClaim; + + require(_epoch >= minClaimableEpoch, "Invalid epoch."); + require(_stateRoot != bytes32(0), "Invalid claim."); require(claimHashes[_epoch] == bytes32(0), "Claim already made."); diff --git a/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol b/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol index f96307ad..588625b5 100644 --- a/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol @@ -12,13 +12,13 @@ import "../canonical/gnosis-chain/IAMB.sol"; import "../canonical/arbitrum/IBridge.sol"; import "../canonical/arbitrum/IOutbox.sol"; import "../canonical/arbitrum/ISequencerInbox.sol"; -import "../interfaces/routers/IRouterToL1.sol"; +import "../interfaces/routers/IRouterToGnosis.sol"; import "../interfaces/outboxes/IVeaOutboxOnL1.sol"; import "../interfaces/updaters/ISequencerDelayUpdatable.sol"; /// @dev Router from Arbitrum to Gnosis Chain. /// Note: This contract is deployed on Ethereum. -contract RouterArbToGnosis is IRouterToL1 { +contract RouterArbToGnosis is IRouterToGnosis { // ************************************* // // * Storage * // // ************************************* // @@ -29,10 +29,10 @@ contract RouterArbToGnosis is IRouterToL1 { address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain. uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock. - SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here. + SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here. - struct SequencerDelayLimitDecreaseRequest { - uint256 requestedSequencerDelayLimit; + struct SequencerLimitDecreaseRequest { + uint256 requestedSequencerLimit; uint256 timestamp; } @@ -50,12 +50,12 @@ contract RouterArbToGnosis is IRouterToL1 { event sequencerDelayLimitSent(bytes32 _ticketID); /// @dev This event indicates the sequencer limit updated. - /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay. - event sequencerDelayLimitUpdated(uint256 _newsequencerDelayLimit); + /// @param _newSequencerDelayLimit The new sequencer delay limit. + event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit); /// @dev This event indicates that a request to decrease the sequencer limit has been made. - /// @param _requestedsequencerDelayLimit The new sequencer limit requested. - event sequencerDelayLimitDecreaseRequested(uint256 _requestedsequencerDelayLimit); + /// @param _requestedSequencerDelayLimit The new sequencer limit requested. + event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit); /// @dev Constructor. /// @param _bridge The address of the arbitrum bridge contract on Ethereum. @@ -90,8 +90,8 @@ contract RouterArbToGnosis is IRouterToL1 { "Sequencer limit decrease request already pending." ); - sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({ - requestedSequencerDelayLimit: newsequencerDelayLimit, + sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({ + requestedSequencerLimit: newsequencerDelayLimit, timestamp: block.timestamp }); emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit); @@ -106,7 +106,7 @@ contract RouterArbToGnosis is IRouterToL1 { "Sequencer limit decrease request is still pending." ); - uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerDelayLimit; + uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit; delete sequencerDelayLimitDecreaseRequest; (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); @@ -119,7 +119,7 @@ contract RouterArbToGnosis is IRouterToL1 { } } - /// @dev Calculate the maxL2StateSyncDelay by reading from the Arbitrum Bridge + /// @dev Send the sequencer delay limit. function sendSequencerDelayLimit() internal { bytes memory data = abi.encodeCall( ISequencerDelayUpdatable.updateSequencerDelayLimit, @@ -138,8 +138,9 @@ contract RouterArbToGnosis is IRouterToL1 { /// @dev Resolves any challenge of the optimistic claim for '_epoch'. /// @param _epoch The epoch to verify. /// @param _stateroot The true batch merkle root for the epoch. + /// @param _gasLimit The true batch gas limit for the epoch. /// @param _claim The claim associated with the epoch. - function route(uint256 _epoch, bytes32 _stateroot, Claim calldata _claim) external { + function route(uint256 _epoch, bytes32 _stateroot, uint256 _gasLimit, Claim calldata _claim) external { // Arbitrum -> Ethereum message sender authentication // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/ // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50 @@ -153,8 +154,11 @@ contract RouterArbToGnosis is IRouterToL1 { // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim)); - // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit. - bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx()); + + uint256 maxGasPerTx = amb.maxGasPerTx(); + uint256 gasLimitCapped = _gasLimit > maxGasPerTx ? maxGasPerTx : _gasLimit; + + bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, gasLimitCapped); emit Routed(_epoch, ticketID); } } diff --git a/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol b/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol index 3b7bcd26..35425f14 100644 --- a/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol @@ -10,7 +10,7 @@ pragma solidity 0.8.18; import "../canonical/arbitrum/IArbSys.sol"; import "../interfaces/inboxes/IVeaInbox.sol"; -import "../interfaces/routers/IRouterToL1.sol"; +import "../interfaces/routers/IRouterToGnosis.sol"; /// @dev Vea Inbox From Arbitrum to Gnosis. /// Note: This contract is deployed on the Arbitrum. @@ -200,13 +200,14 @@ contract VeaInboxArbToGnosis is IVeaInbox { /// @dev Sends the state root snapshot using Arbitrum's canonical bridge. /// @param _epoch The epoch of the snapshot requested to send. + /// @param _gasLimit The gas limit for the AMB transaction on Gnosis. /// @param _claim The claim associated with the epoch. - function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual { + function sendSnapshot(uint256 _epoch, uint256 _gasLimit, Claim memory _claim) external virtual { unchecked { require(_epoch < block.timestamp / epochPeriod, "Can only send past epoch snapshot."); } - bytes memory data = abi.encodeCall(IRouterToL1.route, (_epoch, snapshots[_epoch], _claim)); + bytes memory data = abi.encodeCall(IRouterToGnosis.route, (_epoch, snapshots[_epoch], _gasLimit, _claim)); // Arbitrum -> Ethereum message with native bridge // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging diff --git a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol index 93d10c96..89e310ff 100644 --- a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol @@ -11,6 +11,7 @@ pragma solidity 0.8.18; import "../canonical/gnosis-chain/IAMB.sol"; import "../interfaces/outboxes/IVeaOutboxOnL1.sol"; import "../interfaces/updaters/ISequencerDelayUpdatable.sol"; +import "../interfaces/tokens/gnosis/IWETH.sol"; /// @dev Vea Outbox From Arbitrum to Gnosis. /// Note: This contract is deployed on Gnosis. @@ -22,17 +23,18 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { IAMB public immutable amb; // The address of the AMB contract on Gnosis. address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum. + IWETH public immutable weth; // The address of the WETH contract on Gnosis. uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge uint256 internal immutable burn; // The amount of wei to burn. deposit / 2 uint256 internal immutable depositPlusReward; // 2 * deposit - burn - address internal constant BURN_ADDRESS = address(0); // Address to send burned eth uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time - uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB. + uint256 internal immutable routerChainId; // Router chain id for authentication of messages from the AMB. uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots. uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer. + uint256 public immutable maxClaimDelayEpochs; // The maximum number of epochs that can be claimed in the past. uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown. uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period. @@ -79,8 +81,8 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { event Verified(uint256 _epoch); /// @dev This event indicates the sequencer limit updated. - /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay. - event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit); + /// @param _newSequencerDelayLimit The new sequencer delay limit. + event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit); // ************************************* // // * Function Modifiers * // @@ -111,6 +113,8 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions. /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period. /// @param _routerChainId The chain id of the routerArbToGnosis. + /// @param _weth The address of the WETH contract on Gnosis. + /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past. constructor( uint256 _deposit, uint256 _epochPeriod, @@ -120,7 +124,9 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { address _routerArbToGnosis, uint256 _sequencerDelayLimit, uint256 _maxMissingBlocks, - uint256 _routerChainId + uint256 _routerChainId, + IWETH _weth, + uint256 _maxClaimDelayEpochs ) { deposit = _deposit; // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value. @@ -129,10 +135,12 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { minChallengePeriod = _minChallengePeriod; amb = _amb; routerArbToGnosis = _routerArbToGnosis; - maxMissingBlocks = _maxMissingBlocks; - routerChainId = _routerChainId; // This value is on another chain, so we can't read it, we trust the deployer to set a correct value. sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox + maxMissingBlocks = _maxMissingBlocks; + routerChainId = _routerChainId; + weth = _weth; + maxClaimDelayEpochs = _maxClaimDelayEpochs; // claimant and challenger are not sybil resistant // must burn half deposit to prevent zero cost griefing @@ -146,7 +154,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { // * Parameter Updates * // // ************************************* // - /// @dev Set the maxL2StateSyncDelay by reading from the Arbitrum Bridge + /// @dev Set the sequencerDelayLimit by receiving a message from the AMB. /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract. /// @param _timestamp The timestamp of the message. function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external { @@ -156,6 +164,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { require(timestampDelayUpdated < _timestamp, "Message is outdated."); if (sequencerDelayLimit != _newSequencerDelayLimit) { + // If _newSequencerDelayLimit > timeout * epochPeriod, then the bridge will shutdown. sequencerDelayLimit = _newSequencerDelayLimit; timestampDelayUpdated = _timestamp; emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit); @@ -169,19 +178,28 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit. /// @param _epoch The epoch for which the claim is made. /// @param _stateRoot The state root to claim. - function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual { - require(msg.value >= deposit, "Insufficient claim deposit."); + function claim(uint256 _epoch, bytes32 _stateRoot) external virtual { + require(weth.transferFrom(msg.sender, address(this), deposit), "Failed WETH transfer."); + + require(_epoch < block.timestamp / epochPeriod, "Epoch has not yet passed."); + + // Allow claims to be made within the sequencerDelayLimit. + // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating. + // If the sequencerDelayLimit is set larger than block.timestamp - epochPeriod by arbitrum governance, + // the checked arithmetic will revert due to underflow and the bridge will shutdown. + uint256 minEpochSequencerDelay = (block.timestamp - sequencerDelayLimit) / epochPeriod - 1; + + uint256 minEpochClaim; unchecked { - require(_epoch < block.timestamp / epochPeriod, "Epoch has not yet passed."); - // Note: block.timestamp should be much larger than sequencerDelayLimit, but we check in case Arbiturm governance updated this value. - if (block.timestamp > sequencerDelayLimit) { - // Allow claims to be made within the sequencerDelayLimit. - // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating. - require(_epoch + 1 >= (block.timestamp - sequencerDelayLimit) / epochPeriod, "Epoch is too old."); - } + // deployer sets maxClaimDelayEpochs so no underflow is possible + minEpochClaim = block.timestamp / epochPeriod - maxClaimDelayEpochs; } + uint256 minClaimableEpoch = minEpochSequencerDelay > minEpochClaim ? minEpochSequencerDelay : minEpochClaim; + + require(_epoch >= minClaimableEpoch, "Invalid epoch."); + require(_stateRoot != bytes32(0), "Invalid claim."); require(claimHashes[_epoch] == bytes32(0), "Claim already made."); @@ -198,20 +216,15 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { ); emit Claimed(msg.sender, _stateRoot); - - // Refund overpayment. - if (msg.value > deposit) { - uint256 refund = msg.value - deposit; - payable(msg.sender).send(refund); // User is responsible for accepting ETH. - } } /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'. /// @param _epoch The epoch of the claim to challenge. /// @param _claim The claim associated with the epoch. function challenge(uint256 _epoch, Claim memory _claim) external payable { + require(weth.transferFrom(msg.sender, address(this), deposit), "Failed WETH transfer."); + require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); - require(msg.value >= deposit, "Insufficient challenge deposit."); require(_claim.challenger == address(0), "Claim already challenged."); require(_claim.honest == Party.None, "Claim already verified."); @@ -219,12 +232,6 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { claimHashes[_epoch] = hashClaim(_claim); emit Challenged(_epoch, msg.sender); - - // Refund overpayment. - if (msg.value > deposit) { - uint256 refund = msg.value - deposit; - payable(msg.sender).send(refund); // User is responsible for accepting ETH. - } } /// @dev Start verification for claim for 'epoch'. @@ -236,14 +243,14 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock. // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value require( - block.timestamp >= uint256(_claim.timestampClaimed) + sequencerDelayLimit + epochPeriod, + block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod, "Claim must wait atleast maxL2StateSyncDelay." ); - CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim); + CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim); require( - censorshipTestStatus == CensorshipTestStatus.NotStarted || - censorshipTestStatus == CensorshipTestStatus.Failed, + _censorshipTestStatus == CensorshipTestStatus.NotStarted || + _censorshipTestStatus == CensorshipTestStatus.Failed, "Claim verification in progress or already completed." ); @@ -378,10 +385,10 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { delete claimHashes[_epoch]; if (_claim.challenger != address(0)) { - payable(BURN_ADDRESS).send(burn); - payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH. + weth.burn(burn); // no return value to check + require(weth.transfer(_claim.claimer, depositPlusReward), "Failed WETH transfer."); // should revert on errors, but we check return value anyways } else { - payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH. + require(weth.transfer(_claim.claimer, deposit), "Failed WETH transfer."); // should revert on errors, but we check return value anyways } } @@ -394,8 +401,8 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { delete claimHashes[_epoch]; - payable(BURN_ADDRESS).send(burn); // half burnt - payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH. + weth.burn(burn); // no return value to check + require(weth.transfer(_claim.challenger, depositPlusReward), "Failed WETH transfer."); // should revert on errors, but we check return value anyways } /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit. @@ -408,12 +415,12 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { if (_claim.claimer != address(0)) { if (_claim.challenger == address(0)) { delete claimHashes[_epoch]; - payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH. + require(weth.transfer(_claim.claimer, deposit), "Failed WETH transfer."); // should revert on errors, but we check return value anyways } else { address claimer = _claim.claimer; _claim.claimer = address(0); claimHashes[_epoch] == hashClaim(_claim); - payable(claimer).send(deposit); // User is responsible for accepting ETH. + require(weth.transfer(claimer, deposit), "Failed WETH transfer."); // should revert on errors, but we check return value anyways } } } @@ -428,12 +435,12 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { if (_claim.challenger != address(0)) { if (_claim.claimer == address(0)) { delete claimHashes[_epoch]; - payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH. + require(weth.transfer(_claim.challenger, deposit), "Failed WETH transfer."); // should revert on errors, but we check return value anyways } else { address challenger = _claim.challenger; _claim.challenger = address(0); claimHashes[_epoch] == hashClaim(_claim); - payable(challenger).send(deposit); // User is responsible for accepting ETH. + require(weth.transfer(challenger, deposit), "Failed WETH transfer."); // should revert on errors, but we check return value anyways } } } diff --git a/contracts/src/arbitrumToOptimism/RouterArbToOp.sol b/contracts/src/arbitrumToOptimism/RouterArbToOp.sol deleted file mode 100644 index babc1f2a..00000000 --- a/contracts/src/arbitrumToOptimism/RouterArbToOp.sol +++ /dev/null @@ -1,70 +0,0 @@ -// SPDX-License-Identifier: MIT - -/// @custom:authors: [@shotaronowhere, @jaybuidl] -/// @custom:reviewers: [] -/// @custom:auditors: [] -/// @custom:bounties: [] -/// @custom:deployments: [] - -pragma solidity 0.8.18; - -// import "../canonical/optimism/IInboxOpt.sol"; -// TODO: implement Optimism messaging. -import "../canonical/arbitrum/IBridge.sol"; -import "../canonical/arbitrum/IOutbox.sol"; -import "../interfaces/routers/IRouterToL2.sol"; -import "../interfaces/outboxes/IVeaOutboxOnL2.sol"; - -/// @dev Router on Ethereum from Arbitrum to Optimism. -contract RouterArbToOptimism is IRouterToL2 { - // ************************************* // - // * Storage * // - // ************************************* // - - //IInbox public immutable inboxOpt; // The address of the Optimism Inbox contract. - IBridge public immutable bridge; // The address of the Arbitrum bridge contract. - address public immutable veaInbox; // The address of the veaInbox on Arbitrum. - address public immutable veaOutbox; // The address of the veaOutbox on Optimism. - - // ************************************* // - // * Events * // - // ************************************* // - - /// @dev Event emitted when a message is relayed to another Safe Bridge. - /// @param epoch The epoch of the batch requested to send. - /// @param ticketID The unique identifier provided by the underlying canonical bridge. - event Routed(uint256 indexed epoch, bytes32 ticketID); - - /// @dev Constructor. - /// @param _bridge The address of the arbitrum bridge contract on Ethereum. - /// @param _veaInbox The veaInbox on Arbitrum. - /// @param _veaOutbox The veaOutbox on Gnosis Chain. - //@param _inboxOpt The address of the optimism inbox contract on Ethereum. - constructor(IBridge _bridge, address _veaInbox, address _veaOutbox) { - //IInbox _inboxOpt)} - bridge = _bridge; - veaInbox = _veaInbox; - veaOutbox = _veaOutbox; - //inboxOpt = _inboxOpt; - } - - /// Note: Access restricted to arbitrum canonical bridge. - /// @dev Resolves any challenge of the optimistic claim for '_epoch'. - /// @param epoch The epoch to verify. - /// @param stateroot The true batch merkle root for the epoch. - function route(uint256 epoch, bytes32 stateroot) external { - require(msg.sender == address(bridge), "Not from bridge."); - - // L2 -> L1 message sender authentication - // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/ - // examples: - // https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50 - // https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34 - - require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInbox, "veaInbox only."); - - bytes memory data = abi.encodeCall(IVeaOutboxOnL2.resolveDisputedClaim, (epoch, stateroot)); - - // TODO: Send message to Optimism. - } -} diff --git a/contracts/src/arbitrumToOptimism/VeaInboxArbToOp.sol b/contracts/src/arbitrumToOptimism/VeaInboxArbToOp.sol deleted file mode 100644 index a8fd9d4c..00000000 --- a/contracts/src/arbitrumToOptimism/VeaInboxArbToOp.sol +++ /dev/null @@ -1,195 +0,0 @@ -// SPDX-License-Identifier: MIT - -/// @custom:authors: [@jaybuidl, @shotaronowhere] -/// @custom:reviewers: [] -/// @custom:auditors: [] -/// @custom:bounties: [] -/// @custom:deployments: [] - -pragma solidity 0.8.18; - -import "../canonical/arbitrum/IArbSys.sol"; -import "../interfaces/inboxes/IVeaInbox.sol"; -import "../interfaces/outboxes/IVeaOutboxOnL2.sol"; - -/// @dev Vea Bridge Inbox From Arbitrum to Optimism. -contract VeaInboxArbToOpt is IVeaInbox { - /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum. - /// @param nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message) - event MessageSent(bytes nodeData); - - /// The bridgers can watch this event to claim the stateRoot on the veaOutbox. - /// @param count The count of messages in the merkle tree - event SnapshotSaved(uint256 count); - - /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge. - /// @param epochSent The epoch of the snapshot. - /// @param ticketId The ticketId of the L2->L1 message. - event SnapshotSent(uint256 indexed epochSent, bytes32 ticketId); - - IArbSys internal constant ARB_SYS = IArbSys(address(100)); - - uint256 public immutable epochPeriod; // Epochs mark the period between stateroot snapshots - address public immutable veaOutbox; // The vea outbox on ethereum. - - mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot - - // inbox represents minimum data availability to maintain incremental merkle tree. - // supports a max of 2^64 - 1 messages and will *never* overflow, see parameter docs. - - bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment. - uint256 public count; // count of messages in the merkle tree - - /// @dev Constructor. - /// @param _epochPeriod The duration in seconds between epochs. - /// @param _veaOutbox The veaOutbox on ethereum. - constructor(uint256 _epochPeriod, address _veaOutbox) { - epochPeriod = _epochPeriod; - veaOutbox = _veaOutbox; - } - - /// @dev Sends an arbitrary message to a receiving chain. - /// `O(log(count))` where count is the number of messages already sent. - /// Note: Amortized cost is O(1). - /// @param to The address of the contract on the receiving chain which receives the calldata. - /// @param fnSelector The function selector of the receiving contract. - /// @param data The message calldata, abi.encode(param1, param2, ...) - /// @return msgId The zero based index of the message in the inbox. - function sendMessage(address to, bytes4 fnSelector, bytes memory data) external override returns (uint64) { - uint256 oldCount = count; - - bytes memory nodeData = abi.encodePacked( - uint64(oldCount), - to, - // data for outbox relay - abi.encodePacked( // abi.encodeWithSelector(fnSelector, msg.sender, data) - fnSelector, - bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector - data - ) - ); - - // single hashed leaf - bytes32 newInboxNode = keccak256(nodeData); - - // double hashed leaf - // avoids second order preimage attacks - // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/ - assembly { - // efficient hash using EVM scratch space - mstore(0x00, newInboxNode) - newInboxNode := keccak256(0x00, 0x20) - } - - // increment merkle tree calculating minimal number of hashes - unchecked { - uint256 height; - - // x = oldCount + 1; acts as a bit mask to determine if a hash is needed - // note: x is always non-zero, and x is bit shifted to the right each loop - // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations - for (uint256 x = oldCount + 1; x & 1 == 0; x = x >> 1) { - bytes32 oldInboxNode = inbox[height]; - // sort sibling hashes as a convention for efficient proof validation - newInboxNode = sortConcatAndHash(oldInboxNode, newInboxNode); - height++; - } - - inbox[height] = newInboxNode; - - // finally increment count - count = oldCount + 1; - } - - emit MessageSent(nodeData); - - // old count is the zero indexed leaf position in the tree, acts as a msgId - // gateways should index these msgIds to later relay proofs - return uint64(oldCount); - } - - /// @dev Snapshots can be saved a maximum of once per epoch. - /// Saves snapshot of state root. - /// `O(log(count))` where count number of messages in the inbox. - function saveSnapshot() external { - uint256 epoch; - bytes32 stateRoot; - - unchecked { - epoch = block.timestamp / epochPeriod; - - require(snapshots[epoch] == bytes32(0), "Snapshot already taken for this epoch."); - - // calculate the current root of the incremental merkle tree encoded in the inbox - - uint256 height; - - // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root - uint256 x; - - // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations - for (x = count; x > 0; x = x >> 1) { - if ((x & 1) == 1) { - // first hash is special case - // inbox stores the root of complete subtrees - // eg if count = 4 = 0b100, then the first complete subtree is inbox[2] - // inbox = [H(m_3), H(H(m_1),H(m_2)) H(H(H(m_1),H(m_2)),H(H(m_3),H(m_4)))], we read inbox[2] directly - - stateRoot = inbox[height]; - break; - } - height++; - } - - for (x = x >> 1; x > 0; x = x >> 1) { - height++; - if ((x & 1) == 1) { - bytes32 inboxHash = inbox[height]; - // sort sibling hashes as a convention for efficient proof validation - stateRoot = sortConcatAndHash(inboxHash, stateRoot); - } - } - } - - snapshots[epoch] = stateRoot; - - emit SnapshotSaved(count); - } - - /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing sibling hashes. - /// note: EVM scratch space is used to efficiently calculate hashes. - /// @param child_1 The first sibling hash. - /// @param child_2 The second sibling hash. - /// @return parent The parent hash. - function sortConcatAndHash(bytes32 child_1, bytes32 child_2) internal pure returns (bytes32 parent) { - // sort sibling hashes as a convention for efficient proof validation - // efficient hash using EVM scratch space - if (child_1 > child_2) { - assembly { - mstore(0x00, child_2) - mstore(0x20, child_1) - parent := keccak256(0x00, 0x40) - } - } else { - assembly { - mstore(0x00, child_1) - mstore(0x20, child_2) - parent := keccak256(0x00, 0x40) - } - } - } - - /// @dev Sends the state root snapshot using Arbitrum's canonical bridge. - /// @param epochSend The epoch of the snapshot requested to send. - function sendSnapshot(uint256 epochSend) external virtual { - unchecked { - require(epochSend < block.timestamp / epochPeriod, "Can only send past epoch snapshot."); - } - - bytes memory data = abi.encodeCall(IVeaOutboxOnL2.resolveDisputedClaim, (epochSend, snapshots[epochSend])); - - bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutbox, data)); - - emit SnapshotSent(epochSend, ticketID); - } -} diff --git a/contracts/src/arbitrumToOptimism/VeaOutboxArbToOp.sol b/contracts/src/arbitrumToOptimism/VeaOutboxArbToOp.sol deleted file mode 100644 index 817f9370..00000000 --- a/contracts/src/arbitrumToOptimism/VeaOutboxArbToOp.sol +++ /dev/null @@ -1,359 +0,0 @@ -// SPDX-License-Identifier: MIT - -/// @custom:authors: [@jaybuidl, @shotaronowhere] -/// @custom:reviewers: [] -/// @custom:auditors: [] -/// @custom:bounties: [] -/// @custom:deployments: [] - -pragma solidity 0.8.18; - -// TODO adapt for optimism -// warning: this is a work in progress -import "../canonical/arbitrum/IBridge.sol"; -import "../canonical/arbitrum/IOutbox.sol"; -import "../interfaces/outboxes/IVeaOutboxOnL2.sol"; - -/// @dev Vea Bridge Outbox From Arbitrum to Optimism. -contract VeaOutboxArbToOpt is IVeaOutboxOnL2 { - IBridge public immutable bridge; // The address of the Arbitrum bridge contract. - address public immutable veaInbox; // The address of the veaInbox on arbitrum. - - uint256 public immutable deposit; // The deposit required to submit a claim or challenge - uint256 internal immutable burn; // The amount of wei to burn. deposit / 2 - uint256 internal immutable depositPlusReward; // 2 * deposit - burn - address internal constant burnAddress = address(0x0000000000000000000000000000000000000000); - - uint256 internal constant slotTime = 12; // Ethereum 12 second slot time - - uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots. - uint256 public immutable challengePeriod; // Claim challenge timewindow. - uint256 public immutable claimDelay; // Can only claim for epochs after this delay (seconds) - - uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown. - uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period. - - bytes32 public stateRoot; - uint256 public latestVerifiedEpoch; - - mapping(uint256 => Claim) public claims; // epoch => claim - mapping(uint256 => Challenge) public challenges; // epoch => challenge - mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap - - struct Claim { - bytes32 stateRoot; - address bridger; - uint32 timestamp; - uint32 blocknumber; - bool honest; - } - - struct Challenge { - address challenger; - bool honest; - } - - /// @dev Watcher check this event to challenge fraud. - /// @param claimer The address of the claimer. - /// @param stateRoot The state root of the challenged claim. - event Claimed(address indexed claimer, bytes32 stateRoot); - - /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox. - /// @param epoch The epoch associated with the challenged claim. - /// @param challenger The address of the challenger. - event Challenged(uint256 epoch, address indexed challenger); - - /// @dev This event indicates that a message has been relayed. - /// @param msgId The msgId of the message that was relayed. - event MessageRelayed(uint64 msgId); - - /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed. - /// @param epoch The epoch that was verified. - event Verified(uint256 epoch); - - modifier OnlyBridgeRunning() { - unchecked { - require(block.timestamp / epochPeriod <= latestVerifiedEpoch + timeoutEpochs, "Bridge Shutdown."); - } - _; - } - - modifier OnlyBridgeShutdown() { - unchecked { - require(latestVerifiedEpoch + timeoutEpochs < block.timestamp / epochPeriod, "Bridge Running."); - } - _; - } - - /// @dev Constructor. - /// @param _deposit The deposit amount to submit a claim in wei. - /// @param _epochPeriod The duration of each epoch. - /// @param _challengePeriod The duration of the period allowing to challenge a claim. - /// @param _timeoutEpochs The epochs before the bridge is considered shutdown. - /// @param _claimDelay The number of epochs a claim can be submitted for. - /// @param _veaInbox The address of the inbox contract on Arbitrum. - /// @param _bridge The address of the arbitrum bridge contract on Ethereum. - /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period. - constructor( - uint256 _deposit, - uint256 _epochPeriod, - uint256 _challengePeriod, - uint256 _timeoutEpochs, - uint256 _claimDelay, - address _veaInbox, - address _bridge, - uint256 _maxMissingBlocks - ) { - deposit = _deposit; - epochPeriod = _epochPeriod; - challengePeriod = _challengePeriod; - timeoutEpochs = _timeoutEpochs; - claimDelay = _claimDelay; - veaInbox = _veaInbox; - bridge = IBridge(_bridge); - maxMissingBlocks = _maxMissingBlocks; - - // claimant and challenger are not sybil resistant - // must burn half deposit to prevent zero cost griefing - burn = _deposit / 2; - depositPlusReward = 2 * _deposit - burn; - - latestVerifiedEpoch = block.timestamp / epochPeriod - 1; - - require(claimDelay <= block.timestamp, "Invalid epochClaimDelay."); - } - - // ************************************* // - // * State Modifiers * // - // ************************************* // - - /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit. - /// @param _epoch The epoch for which the claim is made. - /// @param _stateRoot The state root to claim. - function claim(uint256 _epoch, bytes32 _stateRoot) external payable { - require(msg.value >= deposit, "Insufficient claim deposit."); - - unchecked { - require((block.timestamp - claimDelay) / epochPeriod == _epoch, "Invalid epoch."); - } - - require(_stateRoot != bytes32(0), "Invalid claim."); - require(claims[_epoch].bridger == address(0), "Claim already made."); - - claims[_epoch] = Claim({ - stateRoot: _stateRoot, - bridger: msg.sender, - timestamp: uint32(block.timestamp), - blocknumber: uint32(block.number), - honest: false - }); - - emit Claimed(msg.sender, _stateRoot); - } - - /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'. - /// @param epoch The epoch of the claim to challenge. - function challenge(uint256 epoch) external payable { - require(msg.value >= deposit, "Insufficient challenge deposit."); - - require(claims[epoch].bridger != address(0), "No claim to challenge."); - require(challenges[epoch].challenger == address(0), "Claim already challenged."); - - unchecked { - require(block.timestamp < uint256(claims[epoch].timestamp) + challengePeriod, "Challenge period elapsed."); - } - - challenges[epoch] = Challenge({challenger: msg.sender, honest: false}); - - emit Challenged(epoch, msg.sender); - } - - /// @dev Resolves the optimistic claim for '_epoch'. - /// @param epoch The epoch of the optimistic claim. - function validateSnapshot(uint256 epoch) external OnlyBridgeRunning { - Claim storage claim = claims[epoch]; - - require(claim.bridger != address(0), "Invalid epoch, no claim to verify."); - - unchecked { - require(claim.timestamp + challengePeriod < block.timestamp, "Challenge period has not yet elapsed."); - require( - // expected blocks <= actual blocks + maxMissingBlocks - uint256(claim.blocknumber) + (block.timestamp - uint256(claim.timestamp)) / slotTime <= - block.number + maxMissingBlocks, - "Too many missing blocks. Possible censorship attack. Use canonical bridge." - ); - } - - require(challenges[epoch].challenger == address(0), "Claim is challenged."); - - if (epoch > latestVerifiedEpoch) { - latestVerifiedEpoch = epoch; - stateRoot = claim.stateRoot; - emit Verified(epoch); - } - - claim.honest = true; - } - - /// Note: Access restricted to arbitrum bridge. - /// @dev Resolves any challenge of the optimistic claim for '_epoch'. - /// @param epoch The epoch to verify. - /// @param _stateRoot The true state root for the epoch. - function resolveDisputedClaim(uint256 epoch, bytes32 _stateRoot) external virtual OnlyBridgeRunning { - require(msg.sender == address(bridge), "Not from bridge."); - require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInbox, "Sender only."); - - if (epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) { - latestVerifiedEpoch = epoch; - stateRoot = _stateRoot; - emit Verified(epoch); - } - - Claim storage claim = claims[epoch]; - Challenge storage challenge = challenges[epoch]; - - if (claim.bridger != address(0) && claim.stateRoot == _stateRoot) { - claim.honest = true; - } else if (challenge.challenger != address(0)) { - challenge.honest = true; - } - } - - /// @dev Verifies and relays the message. UNTRUSTED. - /// @param proof The merkle proof to prove the message. - /// @param msgId The zero based index of the message in the inbox. - /// @param to The address of the contract on the receiving chain which receives the calldata. - /// @param message The message encoded with header from VeaInbox. - function sendMessage(bytes32[] calldata proof, uint64 msgId, address to, bytes calldata message) external { - require(proof.length < 64, "Proof too long."); - - bytes32 nodeHash = keccak256(abi.encodePacked(msgId, to, message)); - - // double hashed leaf - // avoids second order preimage attacks - // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/ - assembly { - mstore(0x00, nodeHash) - nodeHash := keccak256(0x00, 0x20) - } - - unchecked { - for (uint256 i = 0; i < proof.length; i++) { - bytes32 proofElement = proof[i]; - // sort sibling hashes as a convention for efficient proof validation - if (proofElement > nodeHash) - assembly { - mstore(0x00, nodeHash) - mstore(0x20, proofElement) - nodeHash := keccak256(0x00, 0x40) - } - else - assembly { - mstore(0x00, proofElement) - mstore(0x20, nodeHash) - nodeHash := keccak256(0x00, 0x40) - } - } - } - - require(stateRoot == nodeHash, "Invalid proof."); - - // msgId is the zero based index of the message in the inbox and is the same index to prevent replay - - uint256 relayIndex = msgId >> 8; - uint256 offset; - - unchecked { - offset = msgId % 256; - } - - bytes32 replay = relayed[relayIndex]; - - require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), "Message already relayed"); - relayed[relayIndex] = replay | bytes32(1 << offset); - - // UNTRUSTED. - (bool success, ) = to.call(message); - require(success, "Failed to call contract"); - - emit MessageRelayed(msgId); - } - - /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged. - /// @param epoch The epoch associated with the claim deposit to withraw. - function withdrawClaimDeposit(uint256 epoch) external { - require(claims[epoch].honest == true, "Claim failed."); - - address bridger = claims[epoch].bridger; - - // redundant check - // honest == true => bridger != address(0) - require(bridger != address(0), "Claim does not exist"); - - delete claims[epoch]; - - if (challenges[epoch].challenger != address(0)) { - delete challenges[epoch]; - payable(burnAddress).send(burn); - payable(bridger).send(depositPlusReward); // User is responsible for accepting ETH. - } else { - payable(bridger).send(deposit); // User is responsible for accepting ETH. - } - } - - /// @dev Sends the deposit back to the Challenger if their challenge is successful. Includes a portion of the Bridger's deposit. - /// @param epoch The epoch associated with the challenge deposit to withraw. - function withdrawChallengeDeposit(uint256 epoch) external { - require(challenges[epoch].honest == true, "Challenge failed."); - - address challenger = challenges[epoch].challenger; - - // redundant check - // honest == true => challenger != address(0) - require(challenger != address(0), "Challenge does not exist"); - - delete challenges[epoch]; - delete claims[epoch]; - - payable(burnAddress).send(burn); // half burnt - payable(challenger).send(depositPlusReward); // User is responsible for accepting ETH. - } - - /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged. - /// @param epoch The epoch associated with the claim deposit to withraw. - function withdrawClaimDepositTimeout(uint256 epoch) external OnlyBridgeShutdown { - address bridger = claims[epoch].bridger; - - require(bridger != address(0), "Claim does not exist"); - require(claims[epoch].honest == false && challenges[epoch].honest == false, "Invalid timeout withdrawal."); - - delete claims[epoch]; - - payable(bridger).send(deposit); // User is responsible for accepting ETH. - } - - /// @dev Sends the deposit back to the Challenger if their challenge is successful. Includes a portion of the Bridger's deposit. - /// @param epoch The epoch associated with the challenge deposit to withraw. - function withdrawChallengeDepositTimeout(uint256 epoch) external OnlyBridgeShutdown { - address challenger = challenges[epoch].challenger; - - require(challenger != address(0), "Challenge does not exist"); - require(claims[epoch].honest == false && challenges[epoch].honest == false, "Invalid timeout withdrawal."); - - delete challenges[epoch]; - - payable(challenger).send(deposit); // User is responsible for accepting ETH. - } - - function passedTest(uint256 epoch) external view returns (bool) { - Claim storage claim = claims[epoch]; - if (claim.bridger == address(0)) { - return false; - } - - uint256 expectedBlocks = uint256(claim.blocknumber) + (block.timestamp - uint256(claim.timestamp)) / slotTime; - uint256 actualBlocks = block.number; - return (expectedBlocks <= actualBlocks + maxMissingBlocks); - } -} diff --git a/contracts/src/canonical/arbitrum/AddressAliasHelper.sol b/contracts/src/canonical/arbitrum/AddressAliasHelper.sol new file mode 100644 index 00000000..7cfca89f --- /dev/null +++ b/contracts/src/canonical/arbitrum/AddressAliasHelper.sol @@ -0,0 +1,30 @@ +// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/libraries/AddressAliasHelper.sol +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/nitro/blob/master/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +library AddressAliasHelper { + uint160 internal constant OFFSET = uint160(0x1111000000000000000000000000000000001111); + + /// @notice Utility function that converts the address in the L1 that submitted a tx to + /// the inbox to the msg.sender viewed in the L2 + /// @param l1Address the address in the L1 that triggered the tx to L2 + /// @return l2Address L2 address as viewed in msg.sender + function applyL1ToL2Alias(address l1Address) internal pure returns (address l2Address) { + unchecked { + l2Address = address(uint160(l1Address) + OFFSET); + } + } + + /// @notice Utility function that converts the msg.sender viewed in the L2 to the + /// address in the L1 that submitted a tx to the inbox + /// @param l2Address L2 address as viewed in msg.sender + /// @return l1Address the address in the L1 that triggered the tx to L2 + function undoL1ToL2Alias(address l2Address) internal pure returns (address l1Address) { + unchecked { + l1Address = address(uint160(l2Address) - OFFSET); + } + } +} diff --git a/contracts/src/canonical/arbitrum/IBridge.sol b/contracts/src/canonical/arbitrum/IBridge.sol index fcc22b71..da2a5042 100644 --- a/contracts/src/canonical/arbitrum/IBridge.sol +++ b/contracts/src/canonical/arbitrum/IBridge.sol @@ -10,4 +10,6 @@ interface IBridge { function activeOutbox() external view returns (address); function sequencerInbox() external view returns (address); + + function allowedDelayedInboxList(uint256) external returns (address); } diff --git a/contracts/src/canonical/arbitrum/IInbox.sol b/contracts/src/canonical/arbitrum/IInbox.sol index 549872be..5a2b9665 100644 --- a/contracts/src/canonical/arbitrum/IInbox.sol +++ b/contracts/src/canonical/arbitrum/IInbox.sol @@ -10,4 +10,29 @@ import "./IBridge.sol"; interface IInbox { function bridge() external view returns (IBridge); + + /** + * @notice Put a message in the L2 inbox that can be reexecuted for some fixed amount of time if it reverts + * @dev all msg.value will deposited to callValueRefundAddress on L2 + * @dev Gas limit and maxFeePerGas should not be set to 1 as that is used to trigger the RetryableData error + * @param to destination L2 contract address + * @param l2CallValue call value for retryable L2 message + * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee + * @param excessFeeRefundAddress gasLimit x maxFeePerGas - execution cost gets credited here on L2 balance + * @param callValueRefundAddress l2Callvalue gets credited here on L2 if retryable txn times out or gets cancelled + * @param gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) + * @param maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) + * @param data ABI encoded data of L2 message + * @return unique message number of the retryable transaction + */ + function createRetryableTicket( + address to, + uint256 l2CallValue, + uint256 maxSubmissionCost, + address excessFeeRefundAddress, + address callValueRefundAddress, + uint256 gasLimit, + uint256 maxFeePerGas, + bytes calldata data + ) external payable returns (uint256); } diff --git a/contracts/src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol b/contracts/src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol index dfee9b01..87f1dfdd 100644 --- a/contracts/src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol +++ b/contracts/src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol @@ -132,28 +132,30 @@ contract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth { /// @dev Constructor. /// @param _deposit The deposit amount to submit a claim in wei. /// @param _epochPeriod The duration of each epoch. - /// @param _challengePeriod The duration of the period allowing to challenge a claim. + /// @param _minChallengePeriod The minimum time window to challenge a claim. /// @param _timeoutEpochs The epochs before the bridge is considered shutdown. - /// @param _veaInboxArbToEthDevnet The address of the devnet vea inbox on Arbitrum to Ethereum. - /// @param _bridge The address of the Arbitrum bridge contract on Ethereum. + /// @param _veaInboxArbToEthDevnet The address of the inbox contract on Arbitrum. /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period. + /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past. constructor( uint256 _deposit, uint256 _epochPeriod, - uint256 _challengePeriod, + uint256 _minChallengePeriod, uint256 _timeoutEpochs, address _veaInboxArbToEthDevnet, address _bridge, - uint256 _maxMissingBlocks + uint256 _maxMissingBlocks, + uint256 _maxClaimDelayEpochs ) VeaOutboxArbToEth( _deposit, _epochPeriod, - _challengePeriod, + _minChallengePeriod, _timeoutEpochs, _veaInboxArbToEthDevnet, _bridge, - _maxMissingBlocks + _maxMissingBlocks, + _maxClaimDelayEpochs ) { devnetOperator = msg.sender; diff --git a/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol b/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol index 79531235..f07ec1c4 100644 --- a/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol +++ b/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol @@ -32,8 +32,8 @@ contract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis { /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit. /// @param _epoch The epoch for which the claim is made. /// @param _stateRoot The state root to claim. - function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator { - require(msg.value >= deposit, "Insufficient claim deposit."); + function claim(uint256 _epoch, bytes32 _stateRoot) public override onlyByDevnetOperator { + require(weth.transferFrom(msg.sender, address(this), deposit), "Failed WETH transfer."); require(_stateRoot != bytes32(0), "Invalid claim."); require(claimHashes[_epoch] == bytes32(0), "Claim already made."); @@ -67,9 +67,9 @@ contract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis { emit VerificationStarted(_epoch); } - /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged. - /// @param _claim The claim associated with the epoch. + /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged. /// @param _epoch The epoch associated with the claim deposit to withraw. + /// @param _claim The claim associated with the epoch. function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override { require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); require(_claim.honest == Party.Claimer, "Claim failed."); @@ -77,10 +77,10 @@ contract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis { delete claimHashes[_epoch]; if (_claim.challenger != address(0)) { - payable(BURN_ADDRESS).send(burn); - payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH. + weth.burn(burn); // no return value to check + require(weth.transfer(_claim.claimer, depositPlusReward), "Failed WETH transfer."); // should revert on errors, but we check return value anyways } else { - payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH. + require(weth.transfer(_claim.claimer, deposit), "Failed WETH transfer."); // should revert on errors, but we check return value anyways } } @@ -125,36 +125,43 @@ contract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis { } /// @dev Constructor. + /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value /// @param _deposit The deposit amount to submit a claim in wei. /// @param _epochPeriod The duration of each epoch. - /// @param _challengePeriod The duration of the period allowing to challenge a claim. + /// @param _minChallengePeriod The minimum time window to challenge a claim. /// @param _timeoutEpochs The epochs before the bridge is considered shutdown. /// @param _amb The address of the AMB contract on Gnosis. - /// @param _routerArbToGnosisDevnet The address of the router contract on Goerli routing from ArbitrumGoerli to Chiado. + /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis. + /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions. /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period. - /// @param _sequencerDelayLimit The maximum number of sequencer messages that can be submitted in a challenge period. - /// @param _routerChainId The chain id of the router contract. + /// @param _routerChainId The chain id of the routerArbToGnosis. + /// @param _weth The address of the WETH contract on Gnosis. + /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past. constructor( uint256 _deposit, uint256 _epochPeriod, - uint256 _challengePeriod, + uint256 _minChallengePeriod, uint256 _timeoutEpochs, IAMB _amb, - address _routerArbToGnosisDevnet, - uint256 _maxMissingBlocks, + address _routerArbToGnosis, uint256 _sequencerDelayLimit, - uint256 _routerChainId + uint256 _maxMissingBlocks, + uint256 _routerChainId, + IWETH _weth, + uint256 _maxClaimDelayEpochs ) VeaOutboxArbToGnosis( _deposit, _epochPeriod, - _challengePeriod, + _minChallengePeriod, _timeoutEpochs, _amb, - _routerArbToGnosisDevnet, - _maxMissingBlocks, + _routerArbToGnosis, _sequencerDelayLimit, - _routerChainId + _maxMissingBlocks, + _routerChainId, + _weth, + _maxClaimDelayEpochs ) { devnetOperator = msg.sender; diff --git a/contracts/src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol b/contracts/src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol new file mode 100644 index 00000000..503145f9 --- /dev/null +++ b/contracts/src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol @@ -0,0 +1,156 @@ +// SPDX-License-Identifier: MIT + +/// @custom:authors: [@jaybuidl, @shotaronowhere] +/// @custom:reviewers: [] +/// @custom:auditors: [] +/// @custom:bounties: [] +/// @custom:deployments: [] + +pragma solidity 0.8.18; + +import "../../gnosisToArbitrum/VeaOutboxGnosisToArb.sol"; + +/// @dev Vea Outbox From Chiado to ArbitrumGoerli. +/// Note: This contract is deployed on ArbitrumGoerli. +/// Note: This contract is permissioned for developer testing (devnet). +contract VeaOutboxGnosisToArbDevnet is VeaOutboxGnosisToArb { + address public devnetOperator; // permissioned devnet operator + + /// @dev Requires that the sender is the devnet operator. + modifier onlyByDevnetOperator() { + require(devnetOperator == msg.sender); + _; + } + + /// @dev Changes the devnet operator. + /// @param _devnetOperator The new testnet operator. + function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator { + require(msg.sender == devnetOperator, "Invalid Testnet Operator"); + devnetOperator = _devnetOperator; + } + + /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit. + /// @param _epoch The epoch for which the claim is made. + /// @param _stateRoot The state root to claim. + function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator { + require(msg.value >= deposit, "Insufficient claim deposit."); + + uint256 epochMaxClaimableCalculated = (block.timestamp + sequencerDelayLimit) / epochPeriod + 1; + uint256 epochMaxClaimableCap = block.timestamp / epochPeriod + maxClaimFutureEpochs; + uint256 epochMaxClaimable = epochMaxClaimableCalculated < epochMaxClaimableCap + ? epochMaxClaimableCalculated + : epochMaxClaimableCap; + + require(_epoch <= epochMaxClaimable, "Epoch is invalid."); + + uint256 epochMinClaimableCalculated = (block.timestamp - sequencerFutureLimit) / epochPeriod - 1; + uint256 epochMinClaimableCap = block.timestamp / epochPeriod - maxClaimDelayEpochs; + uint256 epochMinClaimable = epochMinClaimableCalculated > epochMinClaimableCap + ? epochMinClaimableCap + : epochMinClaimableCap; + + require(_epoch >= epochMinClaimable, "Epoch is invalid."); + + require(_stateRoot != bytes32(0), "Invalid claim."); + require(claims[_epoch].claimer == address(0), "Claim already made."); + + claims[_epoch] = Claim({ + stateRoot: _stateRoot, + claimer: msg.sender, + timestamp: uint32(block.timestamp), + honest: Party.None + }); + + emit Claimed(msg.sender, _stateRoot); + + // Refund overpayment. + if (msg.value > deposit) { + uint256 refund = msg.value - deposit; + payable(msg.sender).send(refund); // User is responsible for accepting ETH. + } + } + + /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged. + /// @param _epoch The epoch associated with the claim deposit to withraw. + function withdrawClaimDeposit(uint256 _epoch) public override { + require(claims[_epoch].honest == Party.Claimer, "Claim unsuccessful."); + + address claimer = claims[_epoch].claimer; + + delete claims[_epoch]; + + if (challengers[_epoch] != address(0)) { + payable(BURN_ADDRESS).send(burn); + payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH. + } else { + payable(claimer).send(deposit); // User is responsible for accepting ETH. + } + } + + /// @dev Resolves the optimistic claim for '_epoch'. + /// @param _epoch The epoch of the optimistic claim. + function verifySnapshot(uint256 _epoch) public override OnlyBridgeRunning { + uint256 claimTimestamp = uint256(claims[_epoch].timestamp); + require(claimTimestamp > 0, "Invalid claim."); + require(challengers[_epoch] == address(0), "Claim is challenged."); + + require( + block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod, + "Claim must wait for sequencerDelay and challengePeriod." + ); + + if (_epoch > latestVerifiedEpoch) { + latestVerifiedEpoch = _epoch; + stateRoot = claims[_epoch].stateRoot; + emit Verified(_epoch); + } + + claims[_epoch].honest = Party.Claimer; + } + + /// @dev Testnet operator utility function to claim, validate and withdraw. + /// @param _epoch The epoch for which the claim is made. + /// @param _stateroot The state root to claim. + function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable { + claim(_epoch, _stateroot); + verifySnapshot(_epoch); + withdrawClaimDeposit(_epoch); + } + + /// @dev Constructor. + /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value + /// @param _deposit The deposit amount to submit a claim in wei. + /// @param _epochPeriod The duration of each epoch. + /// @param _challengePeriod The duration of the period allowing to challenge a claim. + /// @param _timeoutEpochs The epochs before the bridge is considered shutdown. + /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum. + /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions. + /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions. + /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past. + /// @param _maxClaimFutureEpochs The maximum number of epochs that can be claimed in the future. + constructor( + uint256 _deposit, + uint256 _epochPeriod, + uint256 _challengePeriod, + uint256 _timeoutEpochs, + address _routerGnosisToArb, + uint256 _sequencerDelayLimit, + uint256 _sequencerFutureLimit, + uint256 _maxClaimDelayEpochs, + uint256 _maxClaimFutureEpochs + ) + VeaOutboxGnosisToArb( + _deposit, + _epochPeriod, + _challengePeriod, + _timeoutEpochs, + _routerGnosisToArb, + _sequencerDelayLimit, + _sequencerFutureLimit, + _maxClaimDelayEpochs, + _maxClaimFutureEpochs + ) + { + devnetOperator = msg.sender; + } +} diff --git a/contracts/src/gnosisToArbitrum/RouterGnosisToArb.sol b/contracts/src/gnosisToArbitrum/RouterGnosisToArb.sol new file mode 100644 index 00000000..e162018c --- /dev/null +++ b/contracts/src/gnosisToArbitrum/RouterGnosisToArb.sol @@ -0,0 +1,323 @@ +// SPDX-License-Identifier: MIT + +/// @custom:authors: [@shotaronowhere, @jaybuidl] +/// @custom:reviewers: [] +/// @custom:auditors: [] +/// @custom:bounties: [] +/// @custom:deployments: [] + +pragma solidity 0.8.18; + +import "../canonical/gnosis-chain/IAMB.sol"; +import "../canonical/arbitrum/IBridge.sol"; +import "../canonical/arbitrum/IOutbox.sol"; +import "../canonical/arbitrum/IInbox.sol"; +import "../interfaces/routers/IRouterToArb.sol"; +import "../interfaces/outboxes/IVeaOutboxOnL2.sol"; +import "../canonical/arbitrum/ISequencerInbox.sol"; +import "../interfaces/updaters/ISequencerDelayUpdatable.sol"; +import "../interfaces/updaters/ISequencerFutureUpdatable.sol"; + +/// @dev Router from Gnosis Chain to Arbitrum. +/// Note: This contract is deployed on Ethereum. +contract RouterGnosisToArb is IRouterToArb { + // ************************************* // + // * Storage * // + // ************************************* // + + IBridge public immutable bridge; // The address of the Arbitrum bridge contract. + IAMB public immutable amb; // The address of the AMB contract on Ethereum. + address public immutable veaInboxGnosisToArb; // The address of the veaInbox on Gnosis. + address public immutable veaOutboxGnosisToArb; // The address of the veaOutbox on Arbitrum. + uint256 internal immutable inboxChainId; // The chain ID of the inbox chain. + + mapping(address => uint256) public L2GasBalance; + + uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock. + uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock. + SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here. + SequencerLimitDecreaseRequest public sequencerFutureLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here. + + struct SequencerLimitDecreaseRequest { + uint256 requestedSequencerLimit; + uint256 timestamp; + } + + // ************************************* // + // * Events * // + // ************************************* // + + /// @dev Event emitted when a message is relayed to another Safe Bridge. + /// @param _epoch The epoch of the batch requested to send. + /// @param _ticketID The unique identifier provided by the underlying canonical bridge. + event Routed(uint256 indexed _epoch, uint256 _ticketID); + + /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value + /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message. + event sequencerDelayLimitSent(uint256 _ticketID); + + /// @dev This event indicates the sequencer delay limit updated. + /// @param _newSequencerDelayLimit The new sequencer delay limit. + event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit); + + /// @dev This event indicates that a request to decrease the sequencer delay limit has been made. + /// @param _requestedSequencerDelayLimit The new sequencer limit requested. + event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit); + + /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value + /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message. + event sequencerFutureLimitSent(uint256 _ticketID); + + /// @dev This event indicates the sequencer future limit updated. + /// @param _newSequencerFutureLimit The new sequencer future limit. + event sequencerFutureLimitUpdated(uint256 _newSequencerFutureLimit); + + /// @dev This event indicates that a request to decrease the sequencer future limit has been made. + /// @param _requestedSequencerFutureLimit The new sequencer limit requested. + event sequencerFutureLimitDecreaseRequested(uint256 _requestedSequencerFutureLimit); + + /// @dev Constructor. + /// @param _bridge The address of the arbitrum bridge contract on Ethereum. + /// @param _amb The address of the AMB contract on Ethereum. + /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum. + /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain. + /// @param _inboxChainId The chain ID of the inbox chain. + constructor( + IBridge _bridge, + IAMB _amb, + address _veaInboxArbToGnosis, + address _veaOutboxArbToGnosis, + uint256 _inboxChainId + ) { + bridge = _bridge; + amb = _amb; + veaInboxGnosisToArb = _veaInboxArbToGnosis; + veaOutboxGnosisToArb = _veaOutboxArbToGnosis; + inboxChainId = _inboxChainId; + + updateSequencerDelayLimit(); + } + + // ************************************* // + // * Parameter Updates * // + // ************************************* // + + /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution. + function updateSequencerDelayLimit() public { + // the maximum asynchronous lag between the L2 and L1 clocks + (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); + + if (newSequencerDelayLimit > sequencerDelayLimit) { + // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown. + sequencerDelayLimit = newSequencerDelayLimit; + emit sequencerDelayLimitUpdated(newSequencerDelayLimit); + } else if (newSequencerDelayLimit < sequencerDelayLimit) { + require( + sequencerDelayLimitDecreaseRequest.timestamp == 0, + "Sequencer limit decrease request already pending." + ); + + sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({ + requestedSequencerLimit: newSequencerDelayLimit, + timestamp: block.timestamp + }); + emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit); + } + } + + /// @dev Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution. + function updateSequencerFutureLimit() public { + // the maximum asynchronous lag between the L2 and L1 clocks + (, , , uint256 newSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); + + if (newSequencerFutureLimit > sequencerFutureLimit) { + // For sequencerFutureLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown. + sequencerFutureLimit = newSequencerFutureLimit; + emit sequencerFutureLimitUpdated(newSequencerFutureLimit); + } else if (newSequencerFutureLimit < sequencerFutureLimit) { + require( + sequencerFutureLimitDecreaseRequest.timestamp == 0, + "Sequencer limit decrease request already pending." + ); + + sequencerFutureLimitDecreaseRequest = SequencerLimitDecreaseRequest({ + requestedSequencerLimit: newSequencerFutureLimit, + timestamp: block.timestamp + }); + emit sequencerFutureLimitDecreaseRequested(newSequencerFutureLimit); + } + } + + /// @dev execute sequencerDelayLimitDecreaseRequest + function executeSequencerDelayLimitDecreaseRequest() external { + require(sequencerDelayLimitDecreaseRequest.timestamp != 0, "No pending sequencer limit decrease request."); + require( + block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit, + "Sequencer limit decrease request is still pending." + ); + + uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit; + delete sequencerDelayLimitDecreaseRequest; + + (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); + + // check the request is still consistent with the arbiturm bridge + if (currentSequencerDelayLimit == requestedSequencerDelayLimit) { + sequencerDelayLimit = requestedSequencerDelayLimit; + emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit); + } + } + + /// @dev execute sequencerFutureLimitDecreaseRequest + function executeSequencerFutureLimitDecreaseRequest() external { + require(sequencerFutureLimitDecreaseRequest.timestamp != 0, "No pending sequencer limit decrease request."); + require( + block.timestamp > sequencerFutureLimitDecreaseRequest.timestamp + sequencerFutureLimit, + "Sequencer limit decrease request is still pending." + ); + + uint256 requestedSequencerFutureLimit = sequencerFutureLimitDecreaseRequest.requestedSequencerLimit; + delete sequencerFutureLimitDecreaseRequest; + + (, , , uint256 currentSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation(); + + // check the request is still consistent with the arbiturm bridge + if (currentSequencerFutureLimit == requestedSequencerFutureLimit) { + sequencerFutureLimit = requestedSequencerFutureLimit; + emit sequencerFutureLimitUpdated(requestedSequencerFutureLimit); + } + } + + /// @dev Send the sequencer future limit through the delayed inbox. + function sendSequencerFutureLimit( + uint256 _inboxIndex, + uint256 _maxSubmissionCost, + address _excessFeeRefundAddress, + uint256 _gasLimit, + uint256 _maxFeePerGas + ) external { + uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas; + uint256 gasBalance = L2GasBalance[msg.sender]; + + require(gasBalance >= msgValue, "Insufficient L2 gas balance."); + + L2GasBalance[msg.sender] = gasBalance - msgValue; + + bytes memory data = abi.encodeCall( + ISequencerFutureUpdatable.updateSequencerFutureLimit, + (sequencerFutureLimit, block.timestamp) + ); + + uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}( + veaOutboxGnosisToArb, + 0, // no callvalue + _maxSubmissionCost, + _excessFeeRefundAddress, + address(0), // no callvalue to refund, no one can cancel the ticket + _gasLimit, + _maxFeePerGas, + data + ); + + emit sequencerFutureLimitSent(ticketID); + } + + /// @dev Send the sequencer delay limit through the delayed inbox. + function sendSequencerDelayLimit( + uint256 _inboxIndex, + uint256 _maxSubmissionCost, + address _excessFeeRefundAddress, + uint256 _gasLimit, + uint256 _maxFeePerGas + ) external { + uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas; + uint256 gasBalance = L2GasBalance[msg.sender]; + + require(gasBalance >= msgValue, "Insufficient L2 gas balance."); + + L2GasBalance[msg.sender] = gasBalance - msgValue; + + bytes memory data = abi.encodeCall( + ISequencerDelayUpdatable.updateSequencerDelayLimit, + (sequencerDelayLimit, block.timestamp) + ); + + uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}( + veaOutboxGnosisToArb, + 0, // no callvalue + _maxSubmissionCost, + _excessFeeRefundAddress, + address(0), // no callvalue to refund, no one can cancel the ticket + _gasLimit, + _maxFeePerGas, + data + ); + + emit sequencerDelayLimitSent(ticketID); + } + + // ************************************* // + // * State Modifiers * // + // ************************************* // + + function deposit() external payable { + L2GasBalance[msg.sender] += msg.value; + } + + function withdraw(uint256 _amount) external { + require(L2GasBalance[msg.sender] > _amount, "Insufficient balance."); + L2GasBalance[msg.sender] -= _amount; + payable(msg.sender).send(_amount); // User is responsible for accepting ETH. + } + + /// Note: Access restricted to arbitrum canonical bridge. + /// @dev Resolves any challenge of the optimistic claim for '_epoch'. + /// @param _epoch The epoch to verify. + /// @param _stateroot The true state root for the epoch. + /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract. + /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee. + /// @param _excessFeeRefundAddress Address to refund any excess fee to. + /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error). + /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error). + function route( + uint256 _epoch, + bytes32 _stateroot, + uint256 _inboxIndex, + uint256 _maxSubmissionCost, + address _excessFeeRefundAddress, + uint256 _gasLimit, + uint256 _maxFeePerGas + ) external { + // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge. + // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge + + require(msg.sender == address(amb), "Not from native Gnosis AMB bridge."); + require(bytes32(inboxChainId) == amb.messageSourceChainId(), "Invalid chain id."); + require(veaInboxGnosisToArb == amb.messageSender(), "Vea Inbox only."); + + // Ethereum -> Arbitrum message passing with retryable tickets in the delayed inbox, the canonical Ethereum -> Arbitrum bridge. + // https://developer.arbitrum.io/arbos/l1-to-l2-messaging#submission + + uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas; + uint256 gasBalance = L2GasBalance[msg.sender]; + + require(gasBalance >= msgValue, "Insufficient L2 gas balance."); + + L2GasBalance[msg.sender] = gasBalance - msgValue; + + bytes memory data = abi.encodeCall(IVeaOutboxOnL2.resolveDisputedClaim, (_epoch, _stateroot)); + + uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}( + veaOutboxGnosisToArb, + 0, // no callvalue + _maxSubmissionCost, + _excessFeeRefundAddress, + address(0), // no callvalue to refund, no one can cancel the ticket + _gasLimit, + _maxFeePerGas, + data + ); + + emit Routed(_epoch, ticketID); + } +} diff --git a/contracts/src/gnosisToArbitrum/VeaInboxGnosisToArb.sol b/contracts/src/gnosisToArbitrum/VeaInboxGnosisToArb.sol new file mode 100644 index 00000000..2049e79e --- /dev/null +++ b/contracts/src/gnosisToArbitrum/VeaInboxGnosisToArb.sol @@ -0,0 +1,236 @@ +// SPDX-License-Identifier: MIT + +/// @custom:authors: [@jaybuidl, @shotaronowhere] +/// @custom:reviewers: [] +/// @custom:auditors: [] +/// @custom:bounties: [] +/// @custom:deployments: [] + +pragma solidity 0.8.18; + +import "../canonical/gnosis-chain/IAMB.sol"; +import "../interfaces/inboxes/IVeaInbox.sol"; +import "../interfaces/routers/IRouterToArb.sol"; + +/// @dev Vea Inbox From Gnosis to Arbitrum. +/// Note: This contract is deployed on the Gnosis. +contract VeaInboxGnosisToArb is IVeaInbox { + // ************************************* // + // * Storage * // + // ************************************* // + + IAMB public immutable amb; // The address of the AMB contract on Gnosis. + + uint256 public immutable epochPeriod; // Epochs mark the period between stateroot snapshots + address public immutable routerGnosisToArb; // The router on Ethereum. + + mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot + + // Inbox represents minimum data availability to maintain incremental merkle tree. + // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state. + + bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment. + uint64 public count; // count of messages in the merkle tree + + // ************************************* // + // * Events * // + // ************************************* // + + /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum. + /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message) + event MessageSent(bytes _nodeData); + + /// The bridgers can watch this event to claim the stateRoot on the veaOutbox. + /// @param _count The count of messages in the merkle tree. + event SnapshotSaved(uint64 _count); + + /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge. + /// @param _epochSent The epoch of the snapshot. + /// @param _ticketId The ticketId of the L2->L1 message. + event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId); + + /// @dev Constructor. + /// Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value + /// @param _epochPeriod The duration in seconds between epochs. + /// @param _routerGnosisToArb The router on Ethereum that routes from Gnosis to Arbitrum. + /// @param _amb The address of the AMB contract on Gnosis. + constructor(uint256 _epochPeriod, address _routerGnosisToArb, IAMB _amb) { + epochPeriod = _epochPeriod; + routerGnosisToArb = _routerGnosisToArb; + amb = _amb; + } + + // ************************************* // + // * State Modifiers * // + // ************************************* // + + /// @dev Sends an arbitrary message to Gnosis. + /// `O(log(count))` where count is the number of messages already sent. + /// Amortized cost is constant. + /// Note: See merkle tree documentation for details how inbox manages state. + /// @param _to The address of the contract on the receiving chain which receives the calldata. + /// @param _fnSelector The function selector of the receiving contract. + /// @param _data The message calldata, abi.encode(param1, param2, ...) + /// @return msgId The zero based index of the message in the inbox. + function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) { + uint64 oldCount = count; + + // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow. + // It *should* be impossible to overflow, but we check to be safe when appending to the tree. + require(oldCount < type(uint64).max, "Inbox is full."); + + bytes memory nodeData = abi.encodePacked( + oldCount, + _to, + // data for outbox relay + abi.encodePacked( // abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...) where _data is abi.encode(param1, param2, ...) + _fnSelector, + bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector + _data + ) + ); + + // single hashed leaf + bytes32 newInboxNode = keccak256(nodeData); + + // double hashed leaf + // avoids second order preimage attacks + // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/ + assembly { + // efficient hash using EVM scratch space + mstore(0x00, newInboxNode) + newInboxNode := keccak256(0x00, 0x20) + } + + // increment merkle tree calculating minimal number of hashes + unchecked { + uint256 height; + + // x = oldCount + 1; acts as a bit mask to determine if a hash is needed + // note: x is always non-zero, and x is bit shifted to the right each loop + // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations + for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) { + // sort sibling hashes as a convention for efficient proof validation + newInboxNode = sortConcatAndHash(inbox[height], newInboxNode); + height++; + } + + inbox[height] = newInboxNode; + + // finally increment count + count = oldCount + 1; + } + + emit MessageSent(nodeData); + + // old count is the zero indexed leaf position in the tree, acts as a msgId + // gateways should index these msgIds to later relay proofs + return oldCount; + } + + /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. + /// `O(log(count))` where count number of messages in the inbox. + /// Note: See merkle tree docs for details how inbox manages state. + function saveSnapshot() external { + uint256 epoch; + bytes32 stateRoot; + + unchecked { + epoch = block.timestamp / epochPeriod; + + // calculate the current root of the incremental merkle tree encoded in the inbox + + uint256 height; + + // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root + uint256 x; + + // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations + for (x = uint256(count); x > 0; x = x >> 1) { + if ((x & 1) == 1) { + // first hash is special case + // inbox stores the root of complete subtrees + // eg if count = 4 = 0b100, then the first complete subtree is inbox[2] + // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly + + stateRoot = inbox[height]; + break; + } + height++; + } + + // after the first hash, we can calculate the root incrementally + for (x = x >> 1; x > 0; x = x >> 1) { + height++; + if ((x & 1) == 1) { + // sort sibling hashes as a convention for efficient proof validation + stateRoot = sortConcatAndHash(inbox[height], stateRoot); + } + } + } + + snapshots[epoch] = stateRoot; + + emit SnapshotSaved(count); + } + + /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right. + /// Note: EVM scratch space is used to efficiently calculate hashes. + /// @param _left The left hash. + /// @param _right The right hash. + /// @return parent The parent hash. + function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) { + // sort sibling hashes as a convention for efficient proof validation + if (_left < _right) { + // efficient hash using EVM scratch space + assembly { + mstore(0x00, _left) + mstore(0x20, _right) + parent := keccak256(0x00, 0x40) + } + } else { + assembly { + mstore(0x00, _right) + mstore(0x20, _left) + parent := keccak256(0x00, 0x40) + } + } + } + + /// @dev Sends the state root snapshot using Arbitrum's canonical bridge. + /// @param _epoch The epoch of the snapshot requested to send. + /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract. + /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee + /// @param _excessFeeRefundAddress Address to refund any excess fee to + /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) + /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) + function sendSnapshot( + uint256 _epoch, + uint256 _inboxIndex, + uint256 _maxSubmissionCost, + address _excessFeeRefundAddress, + uint256 _gasLimit, + uint256 _maxFeePerGas + ) external virtual returns (bytes32 ticketID) { + unchecked { + require(_epoch < block.timestamp / epochPeriod, "Can only send past epoch snapshot."); + } + + bytes memory data = abi.encodeCall( + IRouterToArb.route, + ( + _epoch, + snapshots[_epoch], + _inboxIndex, + _maxSubmissionCost, + _excessFeeRefundAddress, + _gasLimit, + _maxFeePerGas + ) + ); + // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit. + ticketID = amb.requireToPassMessage(routerGnosisToArb, data, amb.maxGasPerTx()); + + emit SnapshotSent(_epoch, ticketID); + } +} diff --git a/contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol b/contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol new file mode 100644 index 00000000..6b3943ed --- /dev/null +++ b/contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol @@ -0,0 +1,434 @@ +// SPDX-License-Identifier: MIT + +/// @custom:authors: [@jaybuidl, @shotaronowhere] +/// @custom:reviewers: [] +/// @custom:auditors: [] +/// @custom:bounties: [] +/// @custom:deployments: [] + +pragma solidity 0.8.18; + +import "../interfaces/outboxes/IVeaOutboxOnL2.sol"; +import "../canonical/arbitrum/AddressAliasHelper.sol"; + +/// @dev Vea Outbox From Gnosis to Arbitrum. +/// Note: This contract is deployed on Arbitrum. +contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { + // ************************************* // + // * Storage * // + // ************************************* // + + address public immutable routerGnosisToArb; // The address of the router from Gnosis to Arbitrum on Ethereum. + + uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge + uint256 internal immutable burn; // The amount of wei to burn. deposit / 2 + uint256 internal immutable depositPlusReward; // 2 * deposit - burn + + address internal constant BURN_ADDRESS = address(0); // address to send burned eth + + uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots. + uint256 public immutable challengePeriod; // Claim challenge timewindow. + uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown. + uint256 public immutable maxClaimDelayEpochs; // The maximum number of epochs that can be claimed in the past. + uint256 public immutable maxClaimFutureEpochs; // The maximum number of epochs that can be claimed in the future. + + uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock. + uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock. + uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update. + uint256 public timestampFutureUpdated; // The timestamp of the last sequencer future update. + + bytes32 public stateRoot; + uint256 public latestVerifiedEpoch; + + mapping(uint256 => Claim) public claims; // epoch => claim + mapping(uint256 => address) public challengers; // epoch => challenger + mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message + + enum Party { + None, + Claimer, + Challenger + } + + struct Claim { + bytes32 stateRoot; + address claimer; + uint32 timestamp; + Party honest; + } + + // ************************************* // + // * Events * // + // ************************************* // + + /// @dev Watcher check this event to challenge fraud. + /// @param _claimer The address of the claimer. + /// @param _stateRoot The state root of the claim. + event Claimed(address indexed _claimer, bytes32 _stateRoot); + + /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox. + /// @param _epoch The epoch associated with the challenged claim. + /// @param _challenger The address of the challenger. + event Challenged(uint256 _epoch, address indexed _challenger); + + /// @dev This event indicates that a message has been relayed. + /// @param _msgId The msgId of the message that was relayed. + event MessageRelayed(uint64 _msgId); + + /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed. + /// @param _epoch The epoch that was verified. + event Verified(uint256 _epoch); + + /// @dev This event indicates the sequencer limit updated. + /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay. + event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit); + + // ************************************* // + // * Function Modifiers * // + // ************************************* // + + modifier OnlyBridgeRunning() { + unchecked { + require(block.timestamp / epochPeriod <= latestVerifiedEpoch + timeoutEpochs, "Bridge Shutdown."); + } + _; + } + + modifier OnlyBridgeShutdown() { + unchecked { + require(block.timestamp / epochPeriod > latestVerifiedEpoch + timeoutEpochs, "Bridge Running."); + } + _; + } + + /// @dev Constructor. + /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value + /// @param _deposit The deposit amount to submit a claim in wei. + /// @param _epochPeriod The duration of each epoch. + /// @param _challengePeriod The duration of the period allowing to challenge a claim. + /// @param _timeoutEpochs The epochs before the bridge is considered shutdown. + /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum. + /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions. + /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions. + /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past. + /// @param _maxClaimFutureEpochs The maximum number of epochs that can be claimed in the future. + constructor( + uint256 _deposit, + uint256 _epochPeriod, + uint256 _challengePeriod, + uint256 _timeoutEpochs, + address _routerGnosisToArb, + uint256 _sequencerDelayLimit, + uint256 _sequencerFutureLimit, + uint256 _maxClaimDelayEpochs, + uint256 _maxClaimFutureEpochs + ) { + deposit = _deposit; + epochPeriod = _epochPeriod; + challengePeriod = _challengePeriod; + timeoutEpochs = _timeoutEpochs; + routerGnosisToArb = _routerGnosisToArb; + sequencerDelayLimit = _sequencerDelayLimit; + sequencerFutureLimit = _sequencerFutureLimit; + maxClaimDelayEpochs = _maxClaimDelayEpochs; + maxClaimFutureEpochs = _maxClaimFutureEpochs; + + // claimant and challenger are not sybil resistant + // must burn half deposit to prevent zero cost griefing + burn = _deposit / 2; + depositPlusReward = 2 * _deposit - burn; + + latestVerifiedEpoch = block.timestamp / epochPeriod - 1; + } + + // ************************************* // + // * Parameter Updates * // + // ************************************* // + + /// @dev Set the sequencerFutureLimit by reading from the Arbitrum Bridge + /// @param _newSequencerFutureLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract. + /// @param _timestamp The timestamp of the message. + function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external { + // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge. + // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol + // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing + + require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), "Only L1 routerGnosisToArb."); + + require(timestampFutureUpdated < _timestamp, "Message is outdated."); + + if (sequencerFutureLimit != _newSequencerFutureLimit) { + sequencerFutureLimit = _newSequencerFutureLimit; + timestampFutureUpdated = _timestamp; + emit sequencerDelayLimitUpdateReceived(_newSequencerFutureLimit); + } + } + + /// @dev Set the sequencerDelayLimit by reading from the Arbitrum Bridge + /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract. + /// @param _timestamp The timestamp of the message. + function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external { + // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge. + // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol + // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing + + require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), "Only L1 routerGnosisToArb."); + + require(timestampDelayUpdated < _timestamp, "Message is outdated."); + + if (sequencerDelayLimit != _newSequencerDelayLimit) { + sequencerDelayLimit = _newSequencerDelayLimit; + timestampDelayUpdated = _timestamp; + emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit); + } + } + + // ************************************* // + // * State Modifiers * // + // ************************************* // + + /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit. + /// @param _epoch The epoch for which the claim is made. + /// @param _stateRoot The state root to claim. + function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual { + require(msg.value >= deposit, "Insufficient claim deposit."); + + uint256 epochMaxClaimableCalculated = (block.timestamp + sequencerDelayLimit) / epochPeriod + 1; + uint256 epochMaxClaimableCap = block.timestamp / epochPeriod + maxClaimFutureEpochs; + uint256 epochMaxClaimable = epochMaxClaimableCalculated < epochMaxClaimableCap + ? epochMaxClaimableCalculated + : epochMaxClaimableCap; + + require(_epoch <= epochMaxClaimable, "Epoch is invalid."); + + uint256 epochMinClaimableCalculated = (block.timestamp - sequencerFutureLimit) / epochPeriod - 1; + uint256 epochMinClaimableCap = block.timestamp / epochPeriod - maxClaimDelayEpochs; + uint256 epochMinClaimable = epochMinClaimableCalculated > epochMinClaimableCap + ? epochMinClaimableCap + : epochMinClaimableCap; + + require(_epoch >= epochMinClaimable, "Epoch is invalid."); + + require(_stateRoot != bytes32(0), "Invalid claim."); + require(claims[_epoch].claimer == address(0), "Claim already made."); + + claims[_epoch] = Claim({ + stateRoot: _stateRoot, + claimer: msg.sender, + timestamp: uint32(block.timestamp), + honest: Party.None + }); + + emit Claimed(msg.sender, _stateRoot); + + // Refund overpayment. + if (msg.value > deposit) { + uint256 refund = msg.value - deposit; + payable(msg.sender).send(refund); // User is responsible for accepting ETH. + } + } + + /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'. + /// @param _epoch The epoch of the claim to challenge. + function challenge(uint256 _epoch) external payable virtual { + require(challengers[_epoch] == address(0), "Claim already challenged."); + require(claims[_epoch].claimer != address(0), "No claim for epoch."); + require(msg.value >= deposit, "Insufficient challenge deposit."); + + challengers[_epoch] = msg.sender; + + emit Challenged(_epoch, msg.sender); + + // Refund overpayment. + if (msg.value > deposit) { + uint256 refund = msg.value - deposit; + payable(msg.sender).send(refund); // User is responsible for accepting ETH. + } + } + + /// @dev Resolves the optimistic claim for '_epoch'. + /// @param _epoch The epoch of the optimistic claim. + function verifySnapshot(uint256 _epoch) external virtual OnlyBridgeRunning { + uint256 claimTimestamp = uint256(claims[_epoch].timestamp); + require(claimTimestamp > 0, "Invalid claim."); + require(challengers[_epoch] == address(0), "Claim is challenged."); + + require( + block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod, + "Claim must wait for sequencerDelay and challengePeriod." + ); + + if (_epoch > latestVerifiedEpoch) { + latestVerifiedEpoch = _epoch; + stateRoot = claims[_epoch].stateRoot; + emit Verified(_epoch); + } + + claims[_epoch].honest = Party.Claimer; + } + + /// Note: Access restricted to AMB. + /// @dev Resolves any challenge of the optimistic claim for '_epoch'. + /// @param _epoch The epoch to verify. + /// @param _stateRoot The true state root for the epoch. + function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external virtual OnlyBridgeRunning { + // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge. + // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol + // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing + + require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), "Only L1 routerGnosisToArb."); + + if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) { + latestVerifiedEpoch = _epoch; + stateRoot = _stateRoot; + emit Verified(_epoch); + } + + bytes32 claimedStateRoot = claims[_epoch].stateRoot; + + if (claimedStateRoot != bytes32(0)) { + if (claimedStateRoot == _stateRoot) { + claims[_epoch].honest = Party.Claimer; + } else if (challengers[_epoch] != address(0)) { + claims[_epoch].honest = Party.Challenger; + } + } + } + + /// @dev Verifies and relays the message. UNTRUSTED. + /// @param _proof The merkle proof to prove the message. + /// @param _msgId The zero based index of the message in the inbox. + /// @param _to The address of the contract on Gnosis to call. + /// @param _message The message encoded with header from VeaInbox. + function sendMessage(bytes32[] memory _proof, uint64 _msgId, address _to, bytes memory _message) external { + require(_proof.length < 64, "Proof too long."); + + bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message)); + + // double hashed leaf + // avoids second order preimage attacks + // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/ + assembly { + mstore(0x00, nodeHash) + nodeHash := keccak256(0x00, 0x20) + } + + unchecked { + for (uint256 i = 0; i < _proof.length; i++) { + bytes32 proofElement = _proof[i]; + // sort sibling hashes as a convention for efficient proof validation + if (proofElement > nodeHash) + assembly { + mstore(0x00, nodeHash) + mstore(0x20, proofElement) + nodeHash := keccak256(0x00, 0x40) + } + else + assembly { + mstore(0x00, proofElement) + mstore(0x20, nodeHash) + nodeHash := keccak256(0x00, 0x40) + } + } + } + + require(stateRoot == nodeHash, "Invalid proof."); + + // msgId is the zero-based index of the message in the inbox. + // msgId is also used as an index in the relayed bitmap to prevent replay. + // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message. + + uint256 relayIndex = _msgId >> 8; + uint256 offset; + + unchecked { + offset = _msgId % 256; + } + + bytes32 replay = relayed[relayIndex]; + + require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), "Message already relayed"); + relayed[relayIndex] = replay | bytes32(1 << offset); + + // UNTRUSTED. + (bool success, ) = _to.call(_message); + require(success, "Failed to call contract"); + + emit MessageRelayed(_msgId); + } + + /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged. + /// @param _epoch The epoch associated with the claim deposit to withraw. + function withdrawClaimDeposit(uint256 _epoch) external virtual { + require(claims[_epoch].honest == Party.Claimer, "Claim unsuccessful."); + + address claimer = claims[_epoch].claimer; + + delete claims[_epoch]; + + if (challengers[_epoch] != address(0)) { + payable(BURN_ADDRESS).send(burn); + payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH. + } else { + payable(claimer).send(deposit); // User is responsible for accepting ETH. + } + } + + /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit. + /// @param _epoch The epoch associated with the challenge deposit to withraw. + function withdrawChallengeDeposit(uint256 _epoch) external { + require(claims[_epoch].honest == Party.Challenger, "Challenge unsuccessful."); + + address challenger = challengers[_epoch]; + + delete claims[_epoch]; + delete challengers[_epoch]; + + payable(BURN_ADDRESS).send(burn); // half burnt + payable(challenger).send(depositPlusReward); // User is responsible for accepting ETH. + } + + /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit. + /// @param _epoch The epoch associated with the claim deposit to withraw. + function withdrawClaimerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown { + require(claims[_epoch].honest == Party.None, "Claim resolved."); + + address claimer = claims[_epoch].claimer; + + delete claims[_epoch]; + + if (claimer != address(0)) { + payable(claimer).send(deposit); // User is responsible for accepting ETH. + } + } + + /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit. + /// @param _epoch The epoch associated with the claim deposit to withraw. + function withdrawChallengerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown { + require(claims[_epoch].honest == Party.None, "Claim resolved."); + + address challenger = challengers[_epoch]; + + delete challengers[_epoch]; + + if (challenger != address(0)) { + payable(challenger).send(deposit); // User is responsible for accepting ETH. + } + } + + // ************************************* // + // * Pure / Views * // + // ************************************* // + + /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock. + /// @return epoch The hash of the claim. + function epochNow() external view returns (uint256 epoch) { + epoch = block.timestamp / epochPeriod; + } + + /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock. + /// @return epoch The hash of the claim. + function epochAt(uint256 timestamp) external view returns (uint256 epoch) { + epoch = timestamp / epochPeriod; + } +} diff --git a/contracts/src/interfaces/routers/IRouterToArb.sol b/contracts/src/interfaces/routers/IRouterToArb.sol new file mode 100644 index 00000000..6ece2d59 --- /dev/null +++ b/contracts/src/interfaces/routers/IRouterToArb.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT + +/// @custom:authors: [@shotaronowhere] +/// @custom:reviewers: [] +/// @custom:auditors: [] +/// @custom:bounties: [] +/// @custom:deployments: [] + +pragma solidity 0.8.18; + +/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost. +/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2). +interface IRouterToArb { + /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge. + /// Note: Access restricted to canonical sending-chain bridge. + /// @param _epoch The epoch to verify. + /// @param _stateroot The true state root for the epoch. + /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract. + /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee + /// @param _excessFeeRefundAddress Address to refund any excess fee to + /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) + /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error) + function route( + uint256 _epoch, + bytes32 _stateroot, + uint256 _inboxIndex, + uint256 _maxSubmissionCost, + address _excessFeeRefundAddress, + uint256 _gasLimit, + uint256 _maxFeePerGas + ) external; +} diff --git a/contracts/src/interfaces/routers/IRouterToL1.sol b/contracts/src/interfaces/routers/IRouterToGnosis.sol similarity index 63% rename from contracts/src/interfaces/routers/IRouterToL1.sol rename to contracts/src/interfaces/routers/IRouterToGnosis.sol index 3a9bab25..d795088c 100644 --- a/contracts/src/interfaces/routers/IRouterToL1.sol +++ b/contracts/src/interfaces/routers/IRouterToGnosis.sol @@ -10,14 +10,14 @@ pragma solidity 0.8.18; import "../types/VeaClaim.sol"; -/// @dev Interface of the Vea Router on an intermediary chain which routes messages to an L1 chain like Ethereum, Gnosis, Polygon POS etc. as a final destination. -/// @dev eg. L2 on Gnosis -> Gnosis (L1) -> Ethereum (L1), the IRouterToL1 will be deployed on Gnosis (L1) routing messages to Ethereum (L1). +/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB. /// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1). -interface IRouterToL1 { +interface IRouterToGnosis { /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain. /// Note: Access restricted to canonical sending-chain bridge. /// @param _epoch The epoch to verify. /// @param _stateRoot The true state root for the epoch. + /// @param _gasLimit The gas limit for the AMB message. /// @param _claim The claim associated with the epoch. - function route(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external; + function route(uint256 _epoch, bytes32 _stateRoot, uint256 _gasLimit, Claim memory _claim) external; } diff --git a/contracts/src/interfaces/routers/IRouterToL2.sol b/contracts/src/interfaces/routers/IRouterToL2.sol deleted file mode 100644 index 4cf174ea..00000000 --- a/contracts/src/interfaces/routers/IRouterToL2.sol +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-License-Identifier: MIT - -/// @custom:authors: [@shotaronowhere] -/// @custom:reviewers: [] -/// @custom:auditors: [] -/// @custom:bounties: [] -/// @custom:deployments: [] - -pragma solidity 0.8.18; - -/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to L2s where calldata is the primary cost (eg Arbitrum, Optimism, Specular) as a final destination. -/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2). -/// eg. Arbitrum (L2) -> Ethereum (L1) -> Optimism (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Optimism (L2). -/// Note: Router specifies L2 as the final destination, but can route to an L1 as an intermediary -/// eg Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1) -> L2 on Gnosis (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Gnosis (L1), -/// which will in turn have a IRouterToL2 deployment routing messages to an L2 on Gnosis (L2) as a final destination. -interface IRouterToL2 { - /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge. - /// Note: Access restricted to canonical sending-chain bridge. - /// @param _epoch The epoch to verify. - /// @param _stateRoot The true state root for the epoch. - function route(uint256 _epoch, bytes32 _stateRoot) external; -} diff --git a/contracts/src/interfaces/tokens/gnosis/IWETH.sol b/contracts/src/interfaces/tokens/gnosis/IWETH.sol new file mode 100644 index 00000000..2b36ac85 --- /dev/null +++ b/contracts/src/interfaces/tokens/gnosis/IWETH.sol @@ -0,0 +1,28 @@ +// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5daaf60d11ee2075260d0f3adfb22b1c536db983/contracts/token/ERC20/BurnableToken.sol +// implementation: https://gnosisscan.io/address/0xf8d1677c8a0c961938bf2f9adc3f3cfda759a9d9#code +// proxy: https://gnosisscan.io/token/0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1#readProxyContract + +/** + * @title Burnable Token + * @dev Token that can be irreversibly burned (destroyed). + */ +interface IWETH { + event Transfer(address indexed from, address indexed to, uint256 value); + event Burn(address indexed burner, uint256 value); + + /** + * @dev Burns a specific amount of tokens. + * @param _value The amount of token to be burned. + */ + function burn(uint256 _value) external; + + function transfer(address to, uint256 value) external returns (bool); + + /** + * @dev Transfer tokens from one address to another + * @param _from address The address which you want to send tokens from + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred + */ + function transferFrom(address _from, address _to, uint256 _value) external returns (bool); +} diff --git a/contracts/src/interfaces/updaters/ISequencerFutureUpdatable.sol b/contracts/src/interfaces/updaters/ISequencerFutureUpdatable.sol new file mode 100644 index 00000000..2db1699f --- /dev/null +++ b/contracts/src/interfaces/updaters/ISequencerFutureUpdatable.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT + +/// @custom:authors: [@jaybuidl, @shotaronowhere] +/// @custom:reviewers: [] +/// @custom:auditors: [] +/// @custom:bounties: [] +/// @custom:deployments: [] + +pragma solidity 0.8.18; + +/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call. +/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerFutureUpdatable contract which receives updates from the router on Ethereum. +interface ISequencerFutureUpdatable { + /// @dev Updates the sequencer limit. + /// Note: Access restricted to ensure the argument is passed from the Sequencer contract. + /// @param _newSequencerFutureLimit The futureSeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract. + /// @param _timestamp The timestamp of the message. + function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external; +} diff --git a/contracts/src/test/ArbitrumToEth/VeaOutboxMockArbToEth.sol b/contracts/src/test/ArbitrumToEth/VeaOutboxMockArbToEth.sol index 99ca8e85..c5dd1c7c 100644 --- a/contracts/src/test/ArbitrumToEth/VeaOutboxMockArbToEth.sol +++ b/contracts/src/test/ArbitrumToEth/VeaOutboxMockArbToEth.sol @@ -53,8 +53,8 @@ contract VeaOutboxMockArbToEth is VeaOutboxArbToEth { /// @param _minChallengePeriod The minimum time window to challenge a claim. /// @param _timeoutEpochs The epochs before the bridge is considered shutdown. /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum. - /// @param _bridge The address of the arbitrum bridge contract on Ethereum. /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period. + /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past. constructor( IArbSys _arbSys, uint256 _deposit, @@ -63,7 +63,8 @@ contract VeaOutboxMockArbToEth is VeaOutboxArbToEth { uint256 _timeoutEpochs, address _veaInboxArbToEth, address _bridge, - uint256 _maxMissingBlocks + uint256 _maxMissingBlocks, + uint256 _maxClaimDelayEpochs ) VeaOutboxArbToEth( _deposit, @@ -72,7 +73,8 @@ contract VeaOutboxMockArbToEth is VeaOutboxArbToEth { _timeoutEpochs, _veaInboxArbToEth, _bridge, - _maxMissingBlocks + _maxMissingBlocks, + _maxClaimDelayEpochs ) { arbSys = _arbSys; diff --git a/contracts/src/test/bridge-mocks/arbitrum/BridgeMock.sol b/contracts/src/test/bridge-mocks/arbitrum/BridgeMock.sol index 67baa9a6..8975a046 100644 --- a/contracts/src/test/bridge-mocks/arbitrum/BridgeMock.sol +++ b/contracts/src/test/bridge-mocks/arbitrum/BridgeMock.sol @@ -22,4 +22,9 @@ contract BridgeMock is IBridge { function activeOutbox() external view returns (address _outbox) { return address(outbox); } + + function allowedDelayedInboxList(uint256 index) external returns (address) { + if (index == 0) return sequencerInbox; + return address(0); + } } diff --git a/contracts/src/test/bridge-mocks/arbitrum/InboxMock.sol b/contracts/src/test/bridge-mocks/arbitrum/InboxMock.sol index 5312b7a9..2a44093a 100644 --- a/contracts/src/test/bridge-mocks/arbitrum/InboxMock.sol +++ b/contracts/src/test/bridge-mocks/arbitrum/InboxMock.sol @@ -20,4 +20,17 @@ contract InboxMock is IInbox { function bridge() external view returns (IBridge) { return arbBridge; } + + function createRetryableTicket( + address to, + uint256 l2CallValue, + uint256 maxSubmissionCost, + address excessFeeRefundAddress, + address callValueRefundAddress, + uint256 gasLimit, + uint256 maxFeePerGas, + bytes calldata data + ) external payable returns (uint256) { + return 0; + } } From 33f39081803ab8f5432bc23f478dd80bd2f2288c Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Thu, 29 Jun 2023 17:32:29 +0900 Subject: [PATCH 16/58] feat(contracts): revert claim window complexity --- contracts/README.md | 32 ++--- .../01-arb-goerli-to-chiado-outbox.ts | 4 - .../01-arb-goerli-to-goerli-outbox.ts | 15 +-- .../deploy/01-outbox/01-arb-to-eth-outbox.ts | 16 +-- .../01-outbox/01-arb-to-gnosis-outbox.ts | 5 - .../01-chiado-to-arb-goerli-outbox.ts | 18 +-- .../01-outbox/01-gnosis-to-arb-outbox.ts | 20 +-- .../VeaInboxArbToEthDevnet.json | 20 +-- .../VeaInboxArbToEthTestnet.json | 20 +-- .../VeaInboxArbToGnosisDevnet.json | 34 ++--- .../VeaInboxArbToGnosisTestnet.json | 34 ++--- .../VeaOutboxGnosisToArbDevnet.json | 121 +++++++----------- .../VeaOutboxGnosisToArbTestnet.json | 119 +++++++---------- .../chiado/VeaInboxGnosisToArbDevnet.json | 34 ++--- .../chiado/VeaInboxGnosisToArbTestnet.json | 34 ++--- .../chiado/VeaOutboxArbToGnosisDevnet.json | 73 +++++------ .../chiado/VeaOutboxArbToGnosisTestnet.json | 71 +++++----- .../goerli/RouterArbToGnosisDevnet.json | 42 +++--- .../goerli/RouterArbToGnosisTestnet.json | 42 +++--- .../goerli/RouterGnosisToArbDevnet.json | 66 +++++----- .../goerli/RouterGnosisToArbTestnet.json | 66 +++++----- .../goerli/VeaOutboxArbToEthDevnet.json | 97 ++++++-------- .../goerli/VeaOutboxArbToEthTestnet.json | 95 ++++++-------- .../src/arbitrumToEth/VeaOutboxArbToEth.sol | 32 +---- .../arbitrumToGnosis/VeaOutboxArbToGnosis.sol | 31 +---- .../arbitrumToEth/VeaOutboxArbToEthDevnet.sol | 9 +- .../VeaOutboxArbToGnosisDevnet.sol | 10 +- .../VeaOutboxGnosisToArbDevnet.sol | 29 +---- .../gnosisToArbitrum/VeaOutboxGnosisToArb.sol | 34 +---- .../ArbitrumToEth/VeaOutboxMockArbToEth.sol | 7 +- 30 files changed, 476 insertions(+), 754 deletions(-) diff --git a/contracts/README.md b/contracts/README.md index 2f40b8bc..e9109e61 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -10,28 +10,28 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments #### Goerli -- [RouterArbToGnosisDevnet](https://goerli.etherscan.io/address/0x8Bf88E6474d93bD2Dc0d76CB3BE8809c6BB84148) -- [RouterArbToGnosisTestnet](https://goerli.etherscan.io/address/0x931FA807020231bCE1340Be8E1e5054207BbAFEd) -- [RouterGnosisToArbDevnet](https://goerli.etherscan.io/address/0x21596998458c428d745d171FA0636B885ed18DaC) -- [RouterGnosisToArbTestnet](https://goerli.etherscan.io/address/0xC21c20a719fAc23c54c336FA0E16a0CFdC4baA00) -- [VeaOutboxArbToEthDevnet](https://goerli.etherscan.io/address/0xE8ea62d3a4F06301016b9C23Ace108F3D8027839) -- [VeaOutboxArbToEthTestnet](https://goerli.etherscan.io/address/0x92Cd1F40e5A4FFa25f83Dd9231EBD9df02eD6a5F) +- [RouterArbToGnosisDevnet](https://goerli.etherscan.io/address/0xef62E517bE7e319458f41014C4d8864117381255) +- [RouterArbToGnosisTestnet](https://goerli.etherscan.io/address/0x7Ee8Ad48EfA4765257a49486421A4CF11389E480) +- [RouterGnosisToArbDevnet](https://goerli.etherscan.io/address/0x65b577dC22D3bdfcB20298ac07EF99D574275D04) +- [RouterGnosisToArbTestnet](https://goerli.etherscan.io/address/0x531754c9935A851173FA349b3bEadAF538c570aC) +- [VeaOutboxArbToEthDevnet](https://goerli.etherscan.io/address/0x4B1275adA5014d7A10375B87bb0cfaCAbC47d3dC) +- [VeaOutboxArbToEthTestnet](https://goerli.etherscan.io/address/0x356f5D0756ab15C819015960C355386d0367d545) #### Arbitrum Goerli -- [VeaInboxArbToEthDevnet](https://goerli.arbiscan.io/address/0xDa528e9BE20a8A22437D28Ed6C63bb6d00Ad0032) -- [VeaInboxArbToEthTestnet](https://goerli.arbiscan.io/address/0xE732B5b0DEE43619031e080Da461059F75a260E2) -- [VeaInboxArbToGnosisDevnet](https://goerli.arbiscan.io/address/0x6164EA58a1f5359D2E54ea8eB9e5971B7C8dB0f1) -- [VeaInboxArbToGnosisTestnet](https://goerli.arbiscan.io/address/0x76fa89666bd55736832a4350b9B8dA6bB1878BeF) -- [VeaOutboxGnosisToArbDevnet](https://goerli.arbiscan.io/address/0xcC196cC90bD30109E39400817e6ef63A1b744659) -- [VeaOutboxGnosisToArbTestnet](https://goerli.arbiscan.io/address/0x663697f5748c5f4d46a15114Dde5514356E794F4) +- [VeaInboxArbToEthDevnet](https://goerli.arbiscan.io/address/0xe81afBecf7d0bB755fB9f1fb417b95Bf924534e6) +- [VeaInboxArbToEthTestnet](https://goerli.arbiscan.io/address/0xB00b74346d6cb2440F71cc3Fb19Cd2B50450571E) +- [VeaInboxArbToGnosisDevnet](https://goerli.arbiscan.io/address/0x7CE671804C3bC9096669F37cE6a7419BA66b7fD8) +- [VeaInboxArbToGnosisTestnet](https://goerli.arbiscan.io/address/0x5EC6917F803bF2C9E55D43D3B7DD1032a625A979) +- [VeaOutboxGnosisToArbDevnet](https://goerli.arbiscan.io/address/0x016170Ad327cE0dCa07b3bd7a7592013a7488FAc) +- [VeaOutboxGnosisToArbTestnet](https://goerli.arbiscan.io/address/0xF0492e87Be6d644A6a467fE20ee9EC5eFCB6cB23) #### Chiado -- [VeaInboxGnosisToArbDevnet](https://blockscout.com/gnosis/chiado/address/0xe4AF4f1B42749d003C6d6eFdc05c11F33581E55B) -- [VeaInboxGnosisToArbTestnet](https://blockscout.com/gnosis/chiado/address/0xB10EF39cc9b45A8EAfa87655063E3dD83D675075) -- [VeaOutboxArbToGnosisDevnet](https://blockscout.com/gnosis/chiado/address/0xE2067941210d684bA8171F7C9dF372931fC6c245) -- [VeaOutboxArbToGnosisTestnet](https://blockscout.com/gnosis/chiado/address/0x0E459f63db78E2d5E8DC16a717F30A3d24cb79c2) +- [VeaInboxGnosisToArbDevnet](https://blockscout.com/gnosis/chiado/address/0xA3FefC6FeE3fc66B9d9a8BEE794736ab71a74c55) +- [VeaInboxGnosisToArbTestnet](https://blockscout.com/gnosis/chiado/address/0xfF2B7048d673767754B798df1702C786E2c59F1F) +- [VeaOutboxArbToGnosisDevnet](https://blockscout.com/gnosis/chiado/address/0x660daB9A6436A814a6ae3a6f27b309356a4bE78c) +- [VeaOutboxArbToGnosisTestnet](https://blockscout.com/gnosis/chiado/address/0x9cF5c011e2A4CB7797413f311A35AcB021071c35) ## Getting Started diff --git a/contracts/deploy/01-outbox/01-arb-goerli-to-chiado-outbox.ts b/contracts/deploy/01-outbox/01-arb-goerli-to-chiado-outbox.ts index 891ba577..0b333135 100644 --- a/contracts/deploy/01-outbox/01-arb-goerli-to-chiado-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-goerli-to-chiado-outbox.ts @@ -20,7 +20,6 @@ const paramsByChainId = { maxMissingBlocks: 10000000000000, routerChainId: 5, WETH: "0x8d74e5e4DA11629537C4575cB0f33b4F0Dfa42EB", - maxClaimDelayEpochs: 3, }, HARDHAT: { deposit: parseEther("1"), @@ -65,7 +64,6 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { maxMissingBlocks, sequencerLimit, WETH, - maxClaimDelayEpochs, } = paramsByChainId[ReceiverChains[chainId]]; // Hack to predict the deployment address on the sender chain. @@ -92,7 +90,6 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { maxMissingBlocks, routerChainId, WETH, - maxClaimDelayEpochs, ], log: true, }); @@ -127,7 +124,6 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { maxMissingBlocks, routerChainId, WETH, - maxClaimDelayEpochs, ], log: true, ...gasOptions, diff --git a/contracts/deploy/01-outbox/01-arb-goerli-to-goerli-outbox.ts b/contracts/deploy/01-outbox/01-arb-goerli-to-goerli-outbox.ts index 718c0a9e..b1e308d1 100644 --- a/contracts/deploy/01-outbox/01-arb-goerli-to-goerli-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-goerli-to-goerli-outbox.ts @@ -18,7 +18,6 @@ const paramsByChainId = { numEpochTimeout: 10000000000000, // never maxMissingBlocks: 10000000000000, arbitrumBridge: "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", // https://developer.arbitrum.io/useful-addresses - maxClaimDelayEpochs: 3, }, HARDHAT: { deposit: parseEther("10"), // 120 eth budget for timeout @@ -28,7 +27,6 @@ const paramsByChainId = { numEpochTimeout: 10000000000000, // 6 hours maxMissingBlocks: 10000000000000, arbitrumBridge: ethers.constants.AddressZero, - maxClaimDelayEpochs: 3, }, }; @@ -47,15 +45,8 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { HARDHAT: config.networks.localhost, }; - const { - deposit, - epochPeriod, - numEpochTimeout, - minChallengePeriod, - maxMissingBlocks, - arbitrumBridge, - maxClaimDelayEpochs, - } = paramsByChainId[ReceiverChains[chainId]]; + const { deposit, epochPeriod, numEpochTimeout, minChallengePeriod, maxMissingBlocks, arbitrumBridge } = + paramsByChainId[ReceiverChains[chainId]]; // Hack to predict the deployment address on the sender chain. // TODO: use deterministic deployments @@ -92,7 +83,6 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { veaInboxAddress, bridgeAddress, maxMissingBlocks, - maxClaimDelayEpochs, ], log: true, }); @@ -125,7 +115,6 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { veaInboxAddress, arbitrumBridge, maxMissingBlocks, - maxClaimDelayEpochs, ], log: true, }); diff --git a/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts b/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts index c20f9f3b..8d47359d 100644 --- a/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts @@ -19,7 +19,6 @@ const paramsByChainId = { numEpochTimeout: 252, // 21 days maxMissingBlocks: 49, // 49 in 900 slots, assumes 10% non-censoring validators arbitrumBridge: "0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a", // https://developer.arbitrum.io/useful-addresses, - maxClaimDelayEpochs: 3, }, ETHEREUM_GOERLI: { deposit: parseEther("1"), // ~100 ETH budget to start, enough for 8 days of challenges @@ -29,7 +28,6 @@ const paramsByChainId = { numEpochTimeout: 1000000, // never maxMissingBlocks: 1000000, // any, goerli network performance is poor, so can't use the censorship test well arbitrumBridge: "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", // https://developer.arbitrum.io/useful-addresses - maxClaimDelayEpochs: 3, }, HARDHAT: { deposit: parseEther("10"), @@ -38,7 +36,6 @@ const paramsByChainId = { numEpochTimeout: 10000000000000, // never maxMissingBlocks: 10, arbitrumBridge: ethers.constants.AddressZero, - maxClaimDelayEpochs: 3, }, }; @@ -58,15 +55,8 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { HARDHAT: config.networks.localhost, }; - const { - deposit, - epochPeriod, - minChallengePeriod, - numEpochTimeout, - maxMissingBlocks, - arbitrumBridge, - maxClaimDelayEpochs, - } = paramsByChainId[ReceiverChains[chainId]]; + const { deposit, epochPeriod, minChallengePeriod, numEpochTimeout, maxMissingBlocks, arbitrumBridge } = + paramsByChainId[ReceiverChains[chainId]]; // Hack to predict the deployment address on the sender chain. // TODO: use deterministic deployments @@ -114,7 +104,6 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { veaInboxAddress, bridge.address, maxMissingBlocks, - maxClaimDelayEpochs, ], log: true, }); @@ -149,7 +138,6 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { veaInboxAddress, arbitrumBridge, maxMissingBlocks, - maxClaimDelayEpochs, ], log: true, }); diff --git a/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts b/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts index 0ad81b72..8c8711fd 100644 --- a/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts @@ -21,7 +21,6 @@ const paramsByChainId = { routerChainId: 1, amb: "0x75Df5AF045d91108662D8080fD1FEFAd6aA0bb59", WETH: "0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1", - maxClaimDelayEpochs: 3, sequencerLimit: 86400, // 24 hours }, GNOSIS_CHIADO: { @@ -34,7 +33,6 @@ const paramsByChainId = { routerChainId: 5, amb: "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", WETH: "0x8d74e5e4DA11629537C4575cB0f33b4F0Dfa42EB", - maxClaimDelayEpochs: 3, sequencerLimit: 86400, // 24 hours }, HARDHAT: { @@ -84,7 +82,6 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { maxMissingBlocks, sequencerLimit, WETH, - maxClaimDelayEpochs, } = paramsByChainId[ReceiverChains[chainId]]; // Hack to predict the deployment address on the sender chain. @@ -111,7 +108,6 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { maxMissingBlocks, routerChainId, WETH, - maxClaimDelayEpochs, ], log: true, }); @@ -145,7 +141,6 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { maxMissingBlocks, routerChainId, WETH, - maxClaimDelayEpochs, ], log: true, gasPrice: ethers.utils.parseUnits("1", "gwei"), // chiado rpc response underprices gas diff --git a/contracts/deploy/01-outbox/01-chiado-to-arb-goerli-outbox.ts b/contracts/deploy/01-outbox/01-chiado-to-arb-goerli-outbox.ts index 7f6e38d0..329ec2e8 100644 --- a/contracts/deploy/01-outbox/01-chiado-to-arb-goerli-outbox.ts +++ b/contracts/deploy/01-outbox/01-chiado-to-arb-goerli-outbox.ts @@ -19,8 +19,6 @@ const paramsByChainId = { sequencerFutureLimit: 3600, maxMissingBlocks: 10000000000000, routerChainId: 5, - maxClaimDelayEpochs: 100, - maxClaimFutureEpochs: 100, }, HARDHAT: { deposit: parseEther("1"), @@ -32,8 +30,6 @@ const paramsByChainId = { sequencerFutureLimit: 3600, maxMissingBlocks: 10000000000000, routerChainId: 31337, - maxClaimDelayEpochs: 100, - maxClaimFutureEpochs: 100, }, }; @@ -57,16 +53,8 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { HARDHAT: config.networks.localhost, }; - const { - deposit, - epochPeriod, - challengePeriod, - numEpochTimeout, - sequencerDelayLimit, - sequencerFutureLimit, - maxClaimDelayEpochs, - maxClaimFutureEpochs, - } = paramsByChainId[ReceiverChains[chainId]]; + const { deposit, epochPeriod, challengePeriod, numEpochTimeout, sequencerDelayLimit, sequencerFutureLimit } = + paramsByChainId[ReceiverChains[chainId]]; // Hack to predict the deployment address on the sender chain. // TODO: use deterministic deployments @@ -127,8 +115,6 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { routerAddress, sequencerDelayLimit, sequencerFutureLimit, - maxClaimDelayEpochs, - maxClaimFutureEpochs, ], log: true, ...gasOptions, diff --git a/contracts/deploy/01-outbox/01-gnosis-to-arb-outbox.ts b/contracts/deploy/01-outbox/01-gnosis-to-arb-outbox.ts index ef1530cb..f2e849f4 100644 --- a/contracts/deploy/01-outbox/01-gnosis-to-arb-outbox.ts +++ b/contracts/deploy/01-outbox/01-gnosis-to-arb-outbox.ts @@ -18,8 +18,6 @@ const paramsByChainId = { numEpochTimeout: 84, // 7 days, sequencerDelayLimit: 86400, sequencerFutureLimit: 3600, - maxClaimDelayEpochs: 3, - maxClaimFutureEpochs: 1, }, ARBITRUM_GOERLI: { deposit: parseEther("4"), @@ -28,8 +26,6 @@ const paramsByChainId = { numEpochTimeout: 168, // 14 days sequencerDelayLimit: 86400, sequencerFutureLimit: 3600, - maxClaimDelayEpochs: 3, - maxClaimFutureEpochs: 1, }, HARDHAT: { deposit: parseEther("2"), @@ -38,8 +34,6 @@ const paramsByChainId = { numEpochTimeout: 10000000, // never sequencerDelayLimit: 86400, sequencerFutureLimit: 3600, - maxClaimDelayEpochs: 3, - maxClaimFutureEpochs: 1, }, }; @@ -65,16 +59,8 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { HARDHAT: config.networks.localhost, }; - const { - deposit, - epochPeriod, - challengePeriod, - numEpochTimeout, - sequencerDelayLimit, - sequencerFutureLimit, - maxClaimDelayEpochs, - maxClaimFutureEpochs, - } = paramsByChainId[ReceiverChains[chainId]]; + const { deposit, epochPeriod, challengePeriod, numEpochTimeout, sequencerDelayLimit, sequencerFutureLimit } = + paramsByChainId[ReceiverChains[chainId]]; // Hack to predict the deployment address on the sender chain. // TODO: use deterministic deployments @@ -136,8 +122,6 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { routerAddress, sequencerDelayLimit, sequencerFutureLimit, - maxClaimDelayEpochs, - maxClaimFutureEpochs, ], log: true, ...gasOptions, diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json index 18bbf527..6d7881cf 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xDa528e9BE20a8A22437D28Ed6C63bb6d00Ad0032", + "address": "0xe81afBecf7d0bB755fB9f1fb417b95Bf924534e6", "abi": [ { "inputs": [ @@ -275,27 +275,27 @@ "type": "function" } ], - "transactionHash": "0x85bf20a9f10d9749ac24eb631541ffad69eae9d9b6949c3a9f5a0284d474b987", + "transactionHash": "0x32a811644383bb79c6376ce5dc560bce76ac0d9d64cd90fc102dd637998ef6c2", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xDa528e9BE20a8A22437D28Ed6C63bb6d00Ad0032", + "contractAddress": "0xe81afBecf7d0bB755fB9f1fb417b95Bf924534e6", "transactionIndex": 1, - "gasUsed": "671421", + "gasUsed": "31070233", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x67c95f8121661a676e0d7ba43a9c025d3ddf1b7471623fd8d9ffc0e2f1ec2dc6", - "transactionHash": "0x85bf20a9f10d9749ac24eb631541ffad69eae9d9b6949c3a9f5a0284d474b987", + "blockHash": "0xf70d23cce295b0b682d9dd0a170511ad9105d296464c9c898bdafc1ea9364e2d", + "transactionHash": "0x32a811644383bb79c6376ce5dc560bce76ac0d9d64cd90fc102dd637998ef6c2", "logs": [], - "blockNumber": 28619481, - "cumulativeGasUsed": "671421", + "blockNumber": 28630803, + "cumulativeGasUsed": "31070233", "status": 1, "byzantium": true }, "args": [ 1800, - "0xE8ea62d3a4F06301016b9C23Ace108F3D8027839" + "0x4B1275adA5014d7A10375B87bb0cfaCAbC47d3dC" ], - "numDeployments": 1, + "numDeployments": 3, "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0xf7aedd98f0149c6f63c4d59ad9fd5d6d2d16b75a42fe95d2064a157ff181007b\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161012001526105b401526000818161015f015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122091c8e50a4eb68a04b97bfd09e6eedc0e624aaef5954f963f1f6df55f1f0da9cf64736f6c63430008120033", diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json index 2f234ad3..5c8a8dc1 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json @@ -1,5 +1,5 @@ { - "address": "0xE732B5b0DEE43619031e080Da461059F75a260E2", + "address": "0xB00b74346d6cb2440F71cc3Fb19Cd2B50450571E", "abi": [ { "inputs": [ @@ -275,27 +275,27 @@ "type": "function" } ], - "transactionHash": "0x16eb0844d8812b537c50b7978ec93fb5fb31fdb0ad9699d3488c5581a06cada4", + "transactionHash": "0x9bacdcce3493b9d05b235d2299f93506b9f3ffc5539039f7c35903f7301a8318", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xE732B5b0DEE43619031e080Da461059F75a260E2", + "contractAddress": "0xB00b74346d6cb2440F71cc3Fb19Cd2B50450571E", "transactionIndex": 1, - "gasUsed": "671421", + "gasUsed": "31029117", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x5f7ccedda57217c8866006fced555d51c913947e172e7195b7c64b7745a1e999", - "transactionHash": "0x16eb0844d8812b537c50b7978ec93fb5fb31fdb0ad9699d3488c5581a06cada4", + "blockHash": "0xc3ae08cec20fc1be913dcb607282b5db04a6465a7e7a8de9b7e8980e70e350a1", + "transactionHash": "0x9bacdcce3493b9d05b235d2299f93506b9f3ffc5539039f7c35903f7301a8318", "logs": [], - "blockNumber": 28619660, - "cumulativeGasUsed": "671421", + "blockNumber": 28630984, + "cumulativeGasUsed": "31029117", "status": 1, "byzantium": true }, "args": [ 7200, - "0x92Cd1F40e5A4FFa25f83Dd9231EBD9df02eD6a5F" + "0x356f5D0756ab15C819015960C355386d0367d545" ], - "numDeployments": 1, + "numDeployments": 3, "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0xf7aedd98f0149c6f63c4d59ad9fd5d6d2d16b75a42fe95d2064a157ff181007b\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161012001526105b401526000818161015f015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122091c8e50a4eb68a04b97bfd09e6eedc0e624aaef5954f963f1f6df55f1f0da9cf64736f6c63430008120033", diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json index 50a2edbd..c5f83e28 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x6164EA58a1f5359D2E54ea8eB9e5971B7C8dB0f1", + "address": "0x7CE671804C3bC9096669F37cE6a7419BA66b7fD8", "abi": [ { "inputs": [ @@ -280,31 +280,31 @@ "type": "function" } ], - "transactionHash": "0x94a66a7d2c71d76151fcb08e9da5f8ab7760721055385c5031e8b17a1dbb159d", + "transactionHash": "0xc3465ec89f6add1cdbf68540f013623fb6482351df314bb504ff91f0cbd4e716", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x6164EA58a1f5359D2E54ea8eB9e5971B7C8dB0f1", + "contractAddress": "0x7CE671804C3bC9096669F37cE6a7419BA66b7fD8", "transactionIndex": 1, - "gasUsed": "675945", + "gasUsed": "31417395", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x3882e6d92cbfd503d491cd3ef477a320e1589c90b8fc3a4cb293941b8bbcf01c", - "transactionHash": "0x94a66a7d2c71d76151fcb08e9da5f8ab7760721055385c5031e8b17a1dbb159d", + "blockHash": "0x7ca7dde41075b3f1e8c06154ce939874c76e51501dcafb2dc99383c0601e41a6", + "transactionHash": "0xc3465ec89f6add1cdbf68540f013623fb6482351df314bb504ff91f0cbd4e716", "logs": [], - "blockNumber": 28619506, - "cumulativeGasUsed": "675945", + "blockNumber": 28630816, + "cumulativeGasUsed": "31417395", "status": 1, "byzantium": true }, "args": [ 1800, - "0xE2067941210d684bA8171F7C9dF372931fC6c245" + "0x660daB9A6436A814a6ae3a6f27b309356a4bE78c" ], - "numDeployments": 1, - "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_gasLimit\":\"The gas limit for the AMB transaction on Gnosis.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _gasLimit The gas limit for the AMB transaction on Gnosis.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, uint256 _gasLimit, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToGnosis.route, (_epoch, snapshots[_epoch], _gasLimit, _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x48be8f225bcfe2373ec8328de18f9c291363bcd3c634b6445f49b788a7f3d59d\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n uint256 _gasLimit,\\n Claim memory _claim\\n ) external;\\n}\\n\",\"keccak256\":\"0x14b9a5be28d1954e86512cad4b6fcbc77646a30f7baefc84937fe4124db3cc37\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b50604051610c0b380380610c0b83398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b406100cb6000396000818161014701526105b6015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b406000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063d5e6a9df14610142578063d6565a2d14610181578063dc881a72146101a1578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106aa565b6101f8565b61010661022a565b005b6100b761011636600461074f565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101697f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd61018f3660046106aa565b60006020819052908152604090205481565b6101066101af366004610828565b6104bf565b6100dd6101c23660046106aa565b610662565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108fa565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108fa565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108e4565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661091c565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61091c565b015484610679565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610956565b60408051601f19818403018152908290526103e093929160200161098c565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61091c565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961091c565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac908490610a07565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108e4565b0483106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008381526020819052604080822054905161056c91869186908690602401610a21565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a906105e0907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ac5565b6020604051808303816000875af11580156105ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106239190610af1565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6001816040811061067257600080fd5b0154905081565b60008183101561069757826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106bc57600080fd5b5035919050565b80356001600160a01b03811681146106da57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610718576107186106df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610747576107476106df565b604052919050565b60008060006060848603121561076457600080fd5b61076d846106c3565b92506020848101356001600160e01b03198116811461078b57600080fd5b9250604085013567ffffffffffffffff808211156107a857600080fd5b818701915087601f8301126107bc57600080fd5b8135818111156107ce576107ce6106df565b6107e0601f8201601f1916850161071e565b915080825288848285010111156107f657600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106da57600080fd5b600080600083850361012081121561083f57600080fd5b843593506020850135925060e0603f198201121561085c57600080fd5b506108656106f5565b60408501358152610878606086016106c3565b602082015261088960808601610814565b604082015261089a60a08601610814565b60608201526108ab60c08601610814565b608082015260e0850135600381106108c257600080fd5b60a08201526108d461010086016106c3565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261091757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b8381101561094d578181015183820152602001610935565b50506000910152565b63ffffffff60e01b841681528260048201526000825161097d816024850160208701610932565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109cc81601c850160208701610932565b91909101601c01949350505050565b600081518084526109f3816020860160208601610932565b601f01601f19169290920160200192915050565b602081526000610a1a60208301846109db565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610aa157634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610ae9908301846109db565b949350505050565b600060208284031215610b0357600080fd5b505191905056fea264697066735822122089de2156d344eb6657c1af0a2b614ae7e5c3c3fdad600418756586cb57a4dded64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063d5e6a9df14610142578063d6565a2d14610181578063dc881a72146101a1578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106aa565b6101f8565b61010661022a565b005b6100b761011636600461074f565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101697f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd61018f3660046106aa565b60006020819052908152604090205481565b6101066101af366004610828565b6104bf565b6100dd6101c23660046106aa565b610662565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108fa565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108fa565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108e4565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661091c565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61091c565b015484610679565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610956565b60408051601f19818403018152908290526103e093929160200161098c565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61091c565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961091c565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac908490610a07565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108e4565b0483106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008381526020819052604080822054905161056c91869186908690602401610a21565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a906105e0907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ac5565b6020604051808303816000875af11580156105ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106239190610af1565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6001816040811061067257600080fd5b0154905081565b60008183101561069757826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106bc57600080fd5b5035919050565b80356001600160a01b03811681146106da57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610718576107186106df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610747576107476106df565b604052919050565b60008060006060848603121561076457600080fd5b61076d846106c3565b92506020848101356001600160e01b03198116811461078b57600080fd5b9250604085013567ffffffffffffffff808211156107a857600080fd5b818701915087601f8301126107bc57600080fd5b8135818111156107ce576107ce6106df565b6107e0601f8201601f1916850161071e565b915080825288848285010111156107f657600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106da57600080fd5b600080600083850361012081121561083f57600080fd5b843593506020850135925060e0603f198201121561085c57600080fd5b506108656106f5565b60408501358152610878606086016106c3565b602082015261088960808601610814565b604082015261089a60a08601610814565b60608201526108ab60c08601610814565b608082015260e0850135600381106108c257600080fd5b60a08201526108d461010086016106c3565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261091757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b8381101561094d578181015183820152602001610935565b50506000910152565b63ffffffff60e01b841681528260048201526000825161097d816024850160208701610932565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109cc81601c850160208701610932565b91909101601c01949350505050565b600081518084526109f3816020860160208601610932565b601f01601f19169290920160200192915050565b602081526000610a1a60208301846109db565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610aa157634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610ae9908301846109db565b949350505050565b600060208284031215610b0357600080fd5b505191905056fea264697066735822122089de2156d344eb6657c1af0a2b614ae7e5c3c3fdad600418756586cb57a4dded64736f6c63430008120033", + "numDeployments": 3, + "solcInputHash": "916b5e2210e8e15d34b48798389f67fe", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_gasLimit\":\"The gas limit for the AMB transaction on Gnosis.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _gasLimit The gas limit for the AMB transaction on Gnosis.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, uint256 _gasLimit, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToGnosis.route, (_epoch, snapshots[_epoch], _gasLimit, _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x48be8f225bcfe2373ec8328de18f9c291363bcd3c634b6445f49b788a7f3d59d\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, uint256 _gasLimit, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x084735de7ee128aa169f11f18a4a7de6656309e941b8df502e66b24a4bf93d0f\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610c0b380380610c0b83398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b406100cb6000396000818161014701526105b6015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b406000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063d5e6a9df14610142578063d6565a2d14610181578063dc881a72146101a1578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106aa565b6101f8565b61010661022a565b005b6100b761011636600461074f565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101697f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd61018f3660046106aa565b60006020819052908152604090205481565b6101066101af366004610828565b6104bf565b6100dd6101c23660046106aa565b610662565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108fa565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108fa565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108e4565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661091c565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61091c565b015484610679565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610956565b60408051601f19818403018152908290526103e093929160200161098c565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61091c565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961091c565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac908490610a07565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108e4565b0483106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008381526020819052604080822054905161056c91869186908690602401610a21565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a906105e0907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ac5565b6020604051808303816000875af11580156105ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106239190610af1565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6001816040811061067257600080fd5b0154905081565b60008183101561069757826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106bc57600080fd5b5035919050565b80356001600160a01b03811681146106da57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610718576107186106df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610747576107476106df565b604052919050565b60008060006060848603121561076457600080fd5b61076d846106c3565b92506020848101356001600160e01b03198116811461078b57600080fd5b9250604085013567ffffffffffffffff808211156107a857600080fd5b818701915087601f8301126107bc57600080fd5b8135818111156107ce576107ce6106df565b6107e0601f8201601f1916850161071e565b915080825288848285010111156107f657600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106da57600080fd5b600080600083850361012081121561083f57600080fd5b843593506020850135925060e0603f198201121561085c57600080fd5b506108656106f5565b60408501358152610878606086016106c3565b602082015261088960808601610814565b604082015261089a60a08601610814565b60608201526108ab60c08601610814565b608082015260e0850135600381106108c257600080fd5b60a08201526108d461010086016106c3565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261091757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b8381101561094d578181015183820152602001610935565b50506000910152565b63ffffffff60e01b841681528260048201526000825161097d816024850160208701610932565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109cc81601c850160208701610932565b91909101601c01949350505050565b600081518084526109f3816020860160208601610932565b601f01601f19169290920160200192915050565b602081526000610a1a60208301846109db565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610aa157634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610ae9908301846109db565b949350505050565b600060208284031215610b0357600080fd5b505191905056fea264697066735822122056dc6373469376ec427dddca0175325c8115fdc5486bdac95939d5af09683ddf64736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063d5e6a9df14610142578063d6565a2d14610181578063dc881a72146101a1578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106aa565b6101f8565b61010661022a565b005b6100b761011636600461074f565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101697f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd61018f3660046106aa565b60006020819052908152604090205481565b6101066101af366004610828565b6104bf565b6100dd6101c23660046106aa565b610662565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108fa565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108fa565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108e4565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661091c565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61091c565b015484610679565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610956565b60408051601f19818403018152908290526103e093929160200161098c565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61091c565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961091c565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac908490610a07565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108e4565b0483106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008381526020819052604080822054905161056c91869186908690602401610a21565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a906105e0907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ac5565b6020604051808303816000875af11580156105ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106239190610af1565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6001816040811061067257600080fd5b0154905081565b60008183101561069757826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106bc57600080fd5b5035919050565b80356001600160a01b03811681146106da57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610718576107186106df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610747576107476106df565b604052919050565b60008060006060848603121561076457600080fd5b61076d846106c3565b92506020848101356001600160e01b03198116811461078b57600080fd5b9250604085013567ffffffffffffffff808211156107a857600080fd5b818701915087601f8301126107bc57600080fd5b8135818111156107ce576107ce6106df565b6107e0601f8201601f1916850161071e565b915080825288848285010111156107f657600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106da57600080fd5b600080600083850361012081121561083f57600080fd5b843593506020850135925060e0603f198201121561085c57600080fd5b506108656106f5565b60408501358152610878606086016106c3565b602082015261088960808601610814565b604082015261089a60a08601610814565b60608201526108ab60c08601610814565b608082015260e0850135600381106108c257600080fd5b60a08201526108d461010086016106c3565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261091757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b8381101561094d578181015183820152602001610935565b50506000910152565b63ffffffff60e01b841681528260048201526000825161097d816024850160208701610932565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109cc81601c850160208701610932565b91909101601c01949350505050565b600081518084526109f3816020860160208601610932565b601f01601f19169290920160200192915050565b602081526000610a1a60208301846109db565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610aa157634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610ae9908301846109db565b949350505050565b600060208284031215610b0357600080fd5b505191905056fea264697066735822122056dc6373469376ec427dddca0175325c8115fdc5486bdac95939d5af09683ddf64736f6c63430008120033", "devdoc": { "details": "Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.", "events": { @@ -391,7 +391,7 @@ "storageLayout": { "storage": [ { - "astId": 2181, + "astId": 1789, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "snapshots", "offset": 0, @@ -399,7 +399,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2185, + "astId": 1793, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "inbox", "offset": 0, @@ -407,7 +407,7 @@ "type": "t_array(t_bytes32)64_storage" }, { - "astId": 2187, + "astId": 1795, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "count", "offset": 0, diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json index 1c661531..63ea14aa 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x76fa89666bd55736832a4350b9B8dA6bB1878BeF", + "address": "0x5EC6917F803bF2C9E55D43D3B7DD1032a625A979", "abi": [ { "inputs": [ @@ -280,31 +280,31 @@ "type": "function" } ], - "transactionHash": "0x2d4a74a00ba9e83909ec24386753fe4c2c4e159185931aad1927ea40055f2506", + "transactionHash": "0x305dd1739e8549e8f264bb9d691b8ae8de96d6fc5afc0b9a491399d58fd5ded8", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x76fa89666bd55736832a4350b9B8dA6bB1878BeF", + "contractAddress": "0x5EC6917F803bF2C9E55D43D3B7DD1032a625A979", "transactionIndex": 1, - "gasUsed": "675945", + "gasUsed": "31431100", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x61d9558e3a1725bcc37827f78a9dae08058dc8ada7ccff7370588d4c2868b84a", - "transactionHash": "0x2d4a74a00ba9e83909ec24386753fe4c2c4e159185931aad1927ea40055f2506", + "blockHash": "0xae7087c307f1dc18bb63cb5fa4dfa3f00ba2f344824cb743df013dcb6f652efd", + "transactionHash": "0x305dd1739e8549e8f264bb9d691b8ae8de96d6fc5afc0b9a491399d58fd5ded8", "logs": [], - "blockNumber": 28619676, - "cumulativeGasUsed": "675945", + "blockNumber": 28631017, + "cumulativeGasUsed": "31431100", "status": 1, "byzantium": true }, "args": [ 3600, - "0x0E459f63db78E2d5E8DC16a717F30A3d24cb79c2" + "0x9cF5c011e2A4CB7797413f311A35AcB021071c35" ], - "numDeployments": 1, - "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_gasLimit\":\"The gas limit for the AMB transaction on Gnosis.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _gasLimit The gas limit for the AMB transaction on Gnosis.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, uint256 _gasLimit, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToGnosis.route, (_epoch, snapshots[_epoch], _gasLimit, _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x48be8f225bcfe2373ec8328de18f9c291363bcd3c634b6445f49b788a7f3d59d\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n uint256 _gasLimit,\\n Claim memory _claim\\n ) external;\\n}\\n\",\"keccak256\":\"0x14b9a5be28d1954e86512cad4b6fcbc77646a30f7baefc84937fe4124db3cc37\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b50604051610c0b380380610c0b83398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b406100cb6000396000818161014701526105b6015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b406000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063d5e6a9df14610142578063d6565a2d14610181578063dc881a72146101a1578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106aa565b6101f8565b61010661022a565b005b6100b761011636600461074f565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101697f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd61018f3660046106aa565b60006020819052908152604090205481565b6101066101af366004610828565b6104bf565b6100dd6101c23660046106aa565b610662565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108fa565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108fa565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108e4565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661091c565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61091c565b015484610679565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610956565b60408051601f19818403018152908290526103e093929160200161098c565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61091c565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961091c565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac908490610a07565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108e4565b0483106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008381526020819052604080822054905161056c91869186908690602401610a21565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a906105e0907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ac5565b6020604051808303816000875af11580156105ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106239190610af1565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6001816040811061067257600080fd5b0154905081565b60008183101561069757826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106bc57600080fd5b5035919050565b80356001600160a01b03811681146106da57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610718576107186106df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610747576107476106df565b604052919050565b60008060006060848603121561076457600080fd5b61076d846106c3565b92506020848101356001600160e01b03198116811461078b57600080fd5b9250604085013567ffffffffffffffff808211156107a857600080fd5b818701915087601f8301126107bc57600080fd5b8135818111156107ce576107ce6106df565b6107e0601f8201601f1916850161071e565b915080825288848285010111156107f657600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106da57600080fd5b600080600083850361012081121561083f57600080fd5b843593506020850135925060e0603f198201121561085c57600080fd5b506108656106f5565b60408501358152610878606086016106c3565b602082015261088960808601610814565b604082015261089a60a08601610814565b60608201526108ab60c08601610814565b608082015260e0850135600381106108c257600080fd5b60a08201526108d461010086016106c3565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261091757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b8381101561094d578181015183820152602001610935565b50506000910152565b63ffffffff60e01b841681528260048201526000825161097d816024850160208701610932565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109cc81601c850160208701610932565b91909101601c01949350505050565b600081518084526109f3816020860160208601610932565b601f01601f19169290920160200192915050565b602081526000610a1a60208301846109db565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610aa157634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610ae9908301846109db565b949350505050565b600060208284031215610b0357600080fd5b505191905056fea264697066735822122089de2156d344eb6657c1af0a2b614ae7e5c3c3fdad600418756586cb57a4dded64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063d5e6a9df14610142578063d6565a2d14610181578063dc881a72146101a1578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106aa565b6101f8565b61010661022a565b005b6100b761011636600461074f565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101697f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd61018f3660046106aa565b60006020819052908152604090205481565b6101066101af366004610828565b6104bf565b6100dd6101c23660046106aa565b610662565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108fa565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108fa565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108e4565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661091c565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61091c565b015484610679565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610956565b60408051601f19818403018152908290526103e093929160200161098c565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61091c565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961091c565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac908490610a07565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108e4565b0483106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008381526020819052604080822054905161056c91869186908690602401610a21565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a906105e0907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ac5565b6020604051808303816000875af11580156105ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106239190610af1565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6001816040811061067257600080fd5b0154905081565b60008183101561069757826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106bc57600080fd5b5035919050565b80356001600160a01b03811681146106da57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610718576107186106df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610747576107476106df565b604052919050565b60008060006060848603121561076457600080fd5b61076d846106c3565b92506020848101356001600160e01b03198116811461078b57600080fd5b9250604085013567ffffffffffffffff808211156107a857600080fd5b818701915087601f8301126107bc57600080fd5b8135818111156107ce576107ce6106df565b6107e0601f8201601f1916850161071e565b915080825288848285010111156107f657600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106da57600080fd5b600080600083850361012081121561083f57600080fd5b843593506020850135925060e0603f198201121561085c57600080fd5b506108656106f5565b60408501358152610878606086016106c3565b602082015261088960808601610814565b604082015261089a60a08601610814565b60608201526108ab60c08601610814565b608082015260e0850135600381106108c257600080fd5b60a08201526108d461010086016106c3565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261091757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b8381101561094d578181015183820152602001610935565b50506000910152565b63ffffffff60e01b841681528260048201526000825161097d816024850160208701610932565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109cc81601c850160208701610932565b91909101601c01949350505050565b600081518084526109f3816020860160208601610932565b601f01601f19169290920160200192915050565b602081526000610a1a60208301846109db565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610aa157634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610ae9908301846109db565b949350505050565b600060208284031215610b0357600080fd5b505191905056fea264697066735822122089de2156d344eb6657c1af0a2b614ae7e5c3c3fdad600418756586cb57a4dded64736f6c63430008120033", + "numDeployments": 3, + "solcInputHash": "916b5e2210e8e15d34b48798389f67fe", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_gasLimit\":\"The gas limit for the AMB transaction on Gnosis.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _gasLimit The gas limit for the AMB transaction on Gnosis.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, uint256 _gasLimit, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToGnosis.route, (_epoch, snapshots[_epoch], _gasLimit, _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x48be8f225bcfe2373ec8328de18f9c291363bcd3c634b6445f49b788a7f3d59d\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, uint256 _gasLimit, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x084735de7ee128aa169f11f18a4a7de6656309e941b8df502e66b24a4bf93d0f\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610c0b380380610c0b83398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b406100cb6000396000818161014701526105b6015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b406000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063d5e6a9df14610142578063d6565a2d14610181578063dc881a72146101a1578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106aa565b6101f8565b61010661022a565b005b6100b761011636600461074f565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101697f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd61018f3660046106aa565b60006020819052908152604090205481565b6101066101af366004610828565b6104bf565b6100dd6101c23660046106aa565b610662565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108fa565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108fa565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108e4565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661091c565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61091c565b015484610679565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610956565b60408051601f19818403018152908290526103e093929160200161098c565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61091c565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961091c565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac908490610a07565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108e4565b0483106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008381526020819052604080822054905161056c91869186908690602401610a21565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a906105e0907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ac5565b6020604051808303816000875af11580156105ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106239190610af1565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6001816040811061067257600080fd5b0154905081565b60008183101561069757826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106bc57600080fd5b5035919050565b80356001600160a01b03811681146106da57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610718576107186106df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610747576107476106df565b604052919050565b60008060006060848603121561076457600080fd5b61076d846106c3565b92506020848101356001600160e01b03198116811461078b57600080fd5b9250604085013567ffffffffffffffff808211156107a857600080fd5b818701915087601f8301126107bc57600080fd5b8135818111156107ce576107ce6106df565b6107e0601f8201601f1916850161071e565b915080825288848285010111156107f657600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106da57600080fd5b600080600083850361012081121561083f57600080fd5b843593506020850135925060e0603f198201121561085c57600080fd5b506108656106f5565b60408501358152610878606086016106c3565b602082015261088960808601610814565b604082015261089a60a08601610814565b60608201526108ab60c08601610814565b608082015260e0850135600381106108c257600080fd5b60a08201526108d461010086016106c3565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261091757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b8381101561094d578181015183820152602001610935565b50506000910152565b63ffffffff60e01b841681528260048201526000825161097d816024850160208701610932565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109cc81601c850160208701610932565b91909101601c01949350505050565b600081518084526109f3816020860160208601610932565b601f01601f19169290920160200192915050565b602081526000610a1a60208301846109db565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610aa157634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610ae9908301846109db565b949350505050565b600060208284031215610b0357600080fd5b505191905056fea264697066735822122056dc6373469376ec427dddca0175325c8115fdc5486bdac95939d5af09683ddf64736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063d5e6a9df14610142578063d6565a2d14610181578063dc881a72146101a1578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106aa565b6101f8565b61010661022a565b005b6100b761011636600461074f565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101697f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd61018f3660046106aa565b60006020819052908152604090205481565b6101066101af366004610828565b6104bf565b6100dd6101c23660046106aa565b610662565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108fa565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108fa565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108e4565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661091c565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61091c565b015484610679565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610956565b60408051601f19818403018152908290526103e093929160200161098c565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61091c565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961091c565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac908490610a07565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108e4565b0483106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008381526020819052604080822054905161056c91869186908690602401610a21565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a906105e0907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ac5565b6020604051808303816000875af11580156105ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106239190610af1565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6001816040811061067257600080fd5b0154905081565b60008183101561069757826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106bc57600080fd5b5035919050565b80356001600160a01b03811681146106da57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610718576107186106df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610747576107476106df565b604052919050565b60008060006060848603121561076457600080fd5b61076d846106c3565b92506020848101356001600160e01b03198116811461078b57600080fd5b9250604085013567ffffffffffffffff808211156107a857600080fd5b818701915087601f8301126107bc57600080fd5b8135818111156107ce576107ce6106df565b6107e0601f8201601f1916850161071e565b915080825288848285010111156107f657600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106da57600080fd5b600080600083850361012081121561083f57600080fd5b843593506020850135925060e0603f198201121561085c57600080fd5b506108656106f5565b60408501358152610878606086016106c3565b602082015261088960808601610814565b604082015261089a60a08601610814565b60608201526108ab60c08601610814565b608082015260e0850135600381106108c257600080fd5b60a08201526108d461010086016106c3565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261091757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b8381101561094d578181015183820152602001610935565b50506000910152565b63ffffffff60e01b841681528260048201526000825161097d816024850160208701610932565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109cc81601c850160208701610932565b91909101601c01949350505050565b600081518084526109f3816020860160208601610932565b601f01601f19169290920160200192915050565b602081526000610a1a60208301846109db565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610aa157634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610ae9908301846109db565b949350505050565b600060208284031215610b0357600080fd5b505191905056fea264697066735822122056dc6373469376ec427dddca0175325c8115fdc5486bdac95939d5af09683ddf64736f6c63430008120033", "devdoc": { "details": "Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.", "events": { @@ -391,7 +391,7 @@ "storageLayout": { "storage": [ { - "astId": 2181, + "astId": 1789, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "snapshots", "offset": 0, @@ -399,7 +399,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2185, + "astId": 1793, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "inbox", "offset": 0, @@ -407,7 +407,7 @@ "type": "t_array(t_bytes32)64_storage" }, { - "astId": 2187, + "astId": 1795, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "count", "offset": 0, diff --git a/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbDevnet.json b/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbDevnet.json index 0180d71a..1d74a7fb 100644 --- a/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xcC196cC90bD30109E39400817e6ef63A1b744659", + "address": "0x016170Ad327cE0dCa07b3bd7a7592013a7488FAc", "abi": [ { "inputs": [ @@ -37,16 +37,6 @@ "internalType": "uint256", "name": "_sequencerFutureLimit", "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxClaimDelayEpochs", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxClaimFutureEpochs", - "type": "uint256" } ], "stateMutability": "nonpayable", @@ -80,6 +70,12 @@ "name": "_claimer", "type": "address" }, + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, { "indexed": false, "internalType": "bytes32", @@ -341,32 +337,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "maxClaimDelayEpochs", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxClaimFutureEpochs", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -625,19 +595,19 @@ "type": "function" } ], - "transactionHash": "0xdfcca2e8bbcf50649bb73e122025c56a32d908da34d230f8ccfc5804494fac78", + "transactionHash": "0x190c2fabdab03e016a5cff9d4d157762c8def2420db5f3c50d8bb5b2e4737d42", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xcC196cC90bD30109E39400817e6ef63A1b744659", + "contractAddress": "0x016170Ad327cE0dCa07b3bd7a7592013a7488FAc", "transactionIndex": 1, - "gasUsed": "1950878", + "gasUsed": "61874568", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xaa7c3b57aab41238f8317649bf9a3eb13ea09a23f88d1d1754d030cd475e9d75", - "transactionHash": "0xdfcca2e8bbcf50649bb73e122025c56a32d908da34d230f8ccfc5804494fac78", + "blockHash": "0x0f3d8bb7982e5417659f8298758e10c2c444c09171f48fc60c63507509c930a9", + "transactionHash": "0x190c2fabdab03e016a5cff9d4d157762c8def2420db5f3c50d8bb5b2e4737d42", "logs": [], - "blockNumber": 28619544, - "cumulativeGasUsed": "1950878", + "blockNumber": 28630846, + "cumulativeGasUsed": "61874568", "status": 1, "byzantium": true }, @@ -646,17 +616,15 @@ 1800, 0, 10000000000000, - "0x21596998458c428d745d171FA0636B885ed18DaC", + "0x65b577dC22D3bdfcB20298ac07EF99D574275D04", 86400, - 3600, - 100, - 100 + 3600 ], - "numDeployments": 1, - "solcInputHash": "7c0af28198435174eb5c96e521603416", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerFutureLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxClaimDelayEpochs\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxClaimFutureEpochs\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"challengers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claims\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"enum VeaOutboxGnosisToArb.Party\",\"name\":\"honest\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxClaimDelayEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxClaimFutureEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampFutureUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Chiado to ArbitrumGoerli. Note: This contract is deployed on ArbitrumGoerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watcher check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"challenge(uint256)\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxClaimDelayEpochs\":\"The maximum number of epochs that can be claimed in the past.\",\"_maxClaimFutureEpochs\":\"The maximum number of epochs that can be claimed in the future.\",\"_routerGnosisToArb\":\"The address of the router on Ethereum that routes from Arbitrum to Ethereum.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_sequencerFutureLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded with header from VeaInbox.\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"updateSequencerFutureLimit(uint256,uint256)\":{\"details\":\"Set the sequencerFutureLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerFutureLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256)\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32)\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol\":\"VeaOutboxGnosisToArbDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/AddressAliasHelper.sol\":{\"content\":\"// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/libraries/AddressAliasHelper.sol\\n// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressAliasHelper {\\n uint160 internal 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}\",\"keccak256\":\"0xc57d335f0f5ac584ae7ed6e256be5d1172df6200c02004f31da0c041ce596512\",\"license\":\"BUSL-1.1\"},\"src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../gnosisToArbitrum/VeaOutboxGnosisToArb.sol\\\";\\n\\n/// @dev Vea Outbox From Chiado to ArbitrumGoerli.\\n/// Note: This contract is deployed on ArbitrumGoerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxGnosisToArbDevnet is VeaOutboxGnosisToArb {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n uint256 epochMaxClaimableCalculated = (block.timestamp + sequencerDelayLimit) / epochPeriod + 1;\\n uint256 epochMaxClaimableCap = block.timestamp / epochPeriod + maxClaimFutureEpochs;\\n uint256 epochMaxClaimable = epochMaxClaimableCalculated < epochMaxClaimableCap ? epochMaxClaimableCalculated : epochMaxClaimableCap;\\n\\n require(_epoch <= epochMaxClaimable, \\\"Epoch is invalid.\\\");\\n\\n uint256 epochMinClaimableCalculated = (block.timestamp - sequencerFutureLimit) / epochPeriod - 1;\\n uint256 epochMinClaimableCap = block.timestamp / epochPeriod - maxClaimDelayEpochs;\\n uint256 epochMinClaimable = epochMinClaimableCalculated > epochMinClaimableCap ? epochMinClaimableCap : epochMinClaimableCap;\\n\\n require(_epoch >= epochMinClaimable, \\\"Epoch is invalid.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) public override {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) public override OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n verifySnapshot(_epoch);\\n withdrawClaimDeposit(_epoch);\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past.\\n /// @param _maxClaimFutureEpochs The maximum number of epochs that can be claimed in the future.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit,\\n uint256 _maxClaimDelayEpochs,\\n uint256 _maxClaimFutureEpochs\\n )\\n VeaOutboxGnosisToArb(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _routerGnosisToArb,\\n _sequencerDelayLimit,\\n _sequencerFutureLimit,\\n _maxClaimDelayEpochs,\\n _maxClaimFutureEpochs\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xcb7f52200f930810757e3206d5b3c799c164df74af1181122a25d773d37b54a3\",\"license\":\"MIT\"},\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/AddressAliasHelper.sol\\\";\\n\\n/// @dev Vea Outbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaOutboxGnosisToArb is IVeaOutboxOnL2 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public immutable routerGnosisToArb; // The address of the router from Gnosis to Arbitrum on Ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // address to send burned eth\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable challengePeriod; // Claim challenge timewindow.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxClaimDelayEpochs; // The maximum number of epochs that can be claimed in the past.\\n uint256 public immutable maxClaimFutureEpochs; // The maximum number of epochs that can be claimed in the future.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n uint256 public timestampFutureUpdated; // The timestamp of the last sequencer future update.\\n\\n bytes32 public stateRoot;\\n uint256 public latestVerifiedEpoch;\\n\\n mapping(uint256 => Claim) public claims; // epoch => claim\\n mapping(uint256 => address) public challengers; // epoch => challenger\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n enum Party {\\n None,\\n Claimer,\\n Challenger\\n }\\n\\n struct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestamp;\\n Party honest;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watcher check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod <= latestVerifiedEpoch + timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod > latestVerifiedEpoch + timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past.\\n /// @param _maxClaimFutureEpochs The maximum number of epochs that can be claimed in the future.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit,\\n uint256 _maxClaimDelayEpochs,\\n uint256 _maxClaimFutureEpochs\\n ) {\\n deposit = _deposit;\\n epochPeriod = _epochPeriod;\\n challengePeriod = _challengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n routerGnosisToArb = _routerGnosisToArb;\\n sequencerDelayLimit = _sequencerDelayLimit;\\n sequencerFutureLimit = _sequencerFutureLimit;\\n maxClaimDelayEpochs = _maxClaimDelayEpochs;\\n maxClaimFutureEpochs = _maxClaimFutureEpochs;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerFutureLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerFutureLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampFutureUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerFutureLimit != _newSequencerFutureLimit) {\\n sequencerFutureLimit = _newSequencerFutureLimit;\\n timestampFutureUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Set the sequencerDelayLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n uint256 epochMaxClaimableCalculated = (block.timestamp + sequencerDelayLimit) / epochPeriod + 1;\\n uint256 epochMaxClaimableCap = block.timestamp / epochPeriod + maxClaimFutureEpochs;\\n uint256 epochMaxClaimable = epochMaxClaimableCalculated < epochMaxClaimableCap ? epochMaxClaimableCalculated : epochMaxClaimableCap;\\n\\n require(_epoch <= epochMaxClaimable, \\\"Epoch is invalid.\\\");\\n\\n uint256 epochMinClaimableCalculated = (block.timestamp - sequencerFutureLimit) / epochPeriod - 1;\\n uint256 epochMinClaimableCap = block.timestamp / epochPeriod - maxClaimDelayEpochs;\\n uint256 epochMinClaimable = epochMinClaimableCalculated > epochMinClaimableCap ? epochMinClaimableCap : epochMinClaimableCap;\\n\\n require(_epoch >= epochMinClaimable, \\\"Epoch is invalid.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n function challenge(uint256 _epoch) external payable virtual {\\n require(challengers[_epoch] == address(0), \\\"Claim already challenged.\\\");\\n require(claims[_epoch].claimer != address(0), \\\"No claim for epoch.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n\\n challengers[_epoch] = msg.sender;\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) external virtual OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n bytes32 claimedStateRoot = claims[_epoch].stateRoot;\\n\\n if (claimedStateRoot != bytes32(0)) {\\n if (claimedStateRoot == _stateRoot) {\\n claims[_epoch].honest = Party.Claimer;\\n } else if (challengers[_epoch] != address(0)) {\\n claims[_epoch].honest = Party.Challenger;\\n }\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded with header from VeaInbox.\\n function sendMessage(bytes32[] memory _proof, uint64 _msgId, address _to, bytes memory _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) external virtual {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n function withdrawChallengeDeposit(uint256 _epoch) external {\\n require(claims[_epoch].honest == Party.Challenger, \\\"Challenge unsuccessful.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete claims[_epoch];\\n delete challengers[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (claimer != address(0)) {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawChallengerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete challengers[_epoch];\\n\\n if (challenger != address(0)) {\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x3c4b79ebf5ca0d0051c088a8d4fb1c95928bbcc5162a729928cb46eb24f3b22e\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101a06040523480156200001257600080fd5b50604051620023ec380380620023ec8339810160408190526200003591620000f3565b60a08990526101008890526101208790526101408690526001600160a01b038516608052600084905560018390556101608290526101808190528888888888888888886200008560028a6200018d565b60c0819052620000978a6002620001b0565b620000a39190620001d0565b60e05261010051600190620000b990426200018d565b620000c59190620001d0565b6005555050600980546001600160a01b0319163317905550620001e69e505050505050505050505050505050565b60008060008060008060008060006101208a8c0312156200011357600080fd5b895160208b015160408c015160608d015160808e0151939c50919a50985096506001600160a01b03811681146200014957600080fd5b8095505060a08a0151935060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b600082620001ab57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001ca57620001ca62000177565b92915050565b81810381811115620001ca57620001ca62000177565b60805160a05160c05160e05161010051610120516101405161016051610180516120bc62000330600039600081816102f70152610a030152600081816101fa0152610afc01526000818161054c0152818161069f0152818161103501528181611365015261176b01526000818161065b01526114b4015260008181610580015281816106c401528181610820015281816109bb01528181610a2701528181610ab501528181610b200152818161105a015281816111b70152818161138a01526117900152600081816112e00152611c5c01526000818161129f0152611c1b0152600081816105b4015281816107e00152818161094901528181610d1701528181610d44015281816111780152818161132b015281816119f001528181611abc0152611ae90152600081816106140152818161085501528181611603015261180a01526120bc6000f3fe6080604052600436106101e35760003560e01c80638a619a7111610102578063b5b7a18411610095578063eb8dedfa11610064578063eb8dedfa14610602578063eedcf2a914610636578063f3f480d914610649578063f4cf751b1461067d57600080fd5b8063b5b7a1841461056e578063d0e30db0146105a2578063d6e01b39146105d6578063e813a755146105ec57600080fd5b80639588eca2116100d15780639588eca2146104aa578063a888c2cd146104c0578063ab82d9a014610527578063b044397e1461053a57600080fd5b80638a619a711461041d5780638ad3a8f71461043d5780638caeb7a81461045d57806390df63b71461047d57600080fd5b80633968ae001161017a578063649628491161014957806364962849146103795780636b45ebcb14610399578063710cc9a7146103e75780637ffc2a6e1461040757600080fd5b80633968ae00146102e55780634518f79f146103195780634a439cfe1461033957806350b81dbe1461035957600080fd5b806327ee6bdd116101b657806327ee6bdd1461027c5780632c1925191461029257806331d14457146102b257806331ddf743146102c557600080fd5b8063042c4aaf146101e85780630e56752e1461022f578063114095d314610245578063222ae78614610267575b600080fd5b3480156101f457600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561023b57600080fd5b5061021c60015481565b34801561025157600080fd5b50610265610260366004611c97565b61069d565b005b34801561027357600080fd5b5061021c610819565b34801561028857600080fd5b5061021c60055481565b34801561029e57600080fd5b506102656102ad366004611cb0565b61084a565b6102656102c0366004611cb0565b610930565b3480156102d157600080fd5b506102656102e0366004611dbd565b610d94565b3480156102f157600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561032557600080fd5b50610265610334366004611c97565b611033565b34801561034557600080fd5b5061021c610354366004611c97565b6111b0565b34801561036557600080fd5b50610265610374366004611c97565b6111e2565b34801561038557600080fd5b50610265610394366004611c97565b611363565b3480156103a557600080fd5b506103cf6103b4366004611c97565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610226565b3480156103f357600080fd5b50610265610402366004611cb0565b6115f8565b34801561041357600080fd5b5061021c60025481565b34801561042957600080fd5b50610265610438366004611ea9565b6116d6565b34801561044957600080fd5b506009546103cf906001600160a01b031681565b34801561046957600080fd5b50610265610478366004611cb0565b611769565b34801561048957600080fd5b5061021c610498366004611c97565b60086020526000908152604090205481565b3480156104b657600080fd5b5061021c60045481565b3480156104cc57600080fd5b506105176104db366004611c97565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516102269493929190611ee1565b610265610535366004611c97565b61192c565b34801561054657600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561057a57600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ae57600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e257600080fd5b5061021c60035481565b3480156105f857600080fd5b5061021c60005481565b34801561060e57600080fd5b506103cf7f000000000000000000000000000000000000000000000000000000000000000081565b610265610644366004611cb0565b611b32565b34801561065557600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561068957600080fd5b50610265610698366004611c97565b611b4e565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f000000000000000000000000000000000000000000000000000000000000000042816106f1576106f1611f30565b04116107365760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff16600281111561076457610764611ecb565b146107a35760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161072d565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b03168015610815576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006108457f000000000000000000000000000000000000000000000000000000000000000042611f5c565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461089d5760405162461bcd60e51b815260040161072d90611f7e565b80600254106108e55760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161072d565b816000541461081557600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6009546001600160a01b0316331461094757600080fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156109b75760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e0000000000604482015260640161072d565b60007f0000000000000000000000000000000000000000000000000000000000000000600054426109e89190611fb5565b6109f29190611f5c565b6109fd906001611fb5565b905060007f0000000000000000000000000000000000000000000000000000000000000000610a4c7f000000000000000000000000000000000000000000000000000000000000000042611f5c565b610a569190611fb5565b90506000818310610a675781610a69565b825b905080851115610aaf5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b604482015260640161072d565b600060017f000000000000000000000000000000000000000000000000000000000000000060015442610ae29190611fc8565b610aec9190611f5c565b610af69190611fc8565b905060007f0000000000000000000000000000000000000000000000000000000000000000610b457f000000000000000000000000000000000000000000000000000000000000000042611f5c565b610b4f9190611fc8565b90506000818311610b605781610b62565b815b905080881015610ba85760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b604482015260640161072d565b86610be65760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161072d565b6000888152600660205260409020600101546001600160a01b031615610c445760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161072d565b6040805160808101825288815233602080830191825263ffffffff4281168486019081526000606086018181528f82526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610cd957610cd9611ecb565b0217905550506040518881523391507f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a9060200160405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115610d8a576000610d697f000000000000000000000000000000000000000000000000000000000000000034611fc8565b604051909150339082156108fc029083906000818181858888f15050505050505b5050505050505050565b6040845110610dd75760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161072d565b6000838383604051602001610dee9392919061200b565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610e70576000868281518110610e3157610e3161204d565b6020026020010151905082811115610e5757826000528060205260406000209250610e67565b8060005282602052604060002092505b50600101610e14565b508060045414610eb35760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161072d565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610f2a5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161072d565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610f58908890612063565b6000604051808303816000865af19150503d8060008114610f95576040519150601f19603f3d011682016040523d82523d6000602084013e610f9a565b606091505b5050905080610feb5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161072d565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161108757611087611f30565b04116110c75760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161072d565b60008082815260066020526040902060010154600160c01b900460ff1660028111156110f5576110f5611ecb565b146111345760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161072d565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b03168015610815576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006111dc7f000000000000000000000000000000000000000000000000000000000000000083611f5c565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff16600281111561121157611211611ecb565b146112545760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b604482015260640161072d565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b0391821691161561131b576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f000000000000000000000000000000000000000000000000000000000000000042816113b7576113b7611f30565b0411156113f95760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161072d565b600081815260066020526040902060010154600160a01b900463ffffffff16806114565760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161072d565b6000828152600760205260409020546001600160a01b0316156114b25760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161072d565b7f000000000000000000000000000000000000000000000000000000000000000060015460005460026114e5919061206f565b6114ef9190611fb5565b6114f99190611fb5565b6115038242611fc8565b10156115775760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e000000000000000000606482015260840161072d565b6005548211156115d35760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f7906115ca9084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461164b5760405162461bcd60e51b815260040161072d90611f7e565b80600354106116935760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161072d565b816001541461081557600182905560038190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa70790602001610924565b6009546001600160a01b031633146116ed57600080fd5b6009546001600160a01b031633146117475760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f720000000000000000604482015260640161072d565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f000000000000000000000000000000000000000000000000000000000000000042816117bd576117bd611f30565b0411156117ff5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161072d565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146118525760405162461bcd60e51b815260040161072d90611f7e565b6005548211801561186257508015155b156118a557600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b6000828152600660205260409020548015611927578181036118e75750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b031615611927576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b0316156119915760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161072d565b6000818152600660205260409020600101546001600160a01b03166119ee5760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b604482015260640161072d565b7f0000000000000000000000000000000000000000000000000000000000000000341015611a5e5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e00604482015260640161072d565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d790611ab29084815260200190565b60405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115611b2f576000611b0e7f000000000000000000000000000000000000000000000000000000000000000034611fc8565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b611b3c8282610930565b611b4582611363565b610815826111e2565b6002600082815260066020526040902060010154600160c01b900460ff166002811115611b7d57611b7d611ecb565b14611bca5760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e000000000000000000604482015260640161072d565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600060208284031215611ca957600080fd5b5035919050565b60008060408385031215611cc357600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611d1157611d11611cd2565b604052919050565b803567ffffffffffffffff81168114611d3157600080fd5b919050565b80356001600160a01b0381168114611d3157600080fd5b600082601f830112611d5e57600080fd5b813567ffffffffffffffff811115611d7857611d78611cd2565b611d8b601f8201601f1916602001611ce8565b818152846020838601011115611da057600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611dd357600080fd5b843567ffffffffffffffff80821115611deb57600080fd5b818701915087601f830112611dff57600080fd5b8135602082821115611e1357611e13611cd2565b8160051b611e22828201611ce8565b928352848101820192828101908c851115611e3c57600080fd5b958301955b84871015611e5a57863582529583019590830190611e41565b9950611e6a915050898201611d19565b96505050611e7a60408801611d36565b93506060870135915080821115611e9057600080fd5b50611e9d87828801611d4d565b91505092959194509250565b600060208284031215611ebb57600080fd5b611ec482611d36565b9392505050565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611f2157634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611f7957634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b808201808211156111dc576111dc611f46565b818103818111156111dc576111dc611f46565b6000815160005b81811015611ffc5760208185018101518683015201611fe2565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000612044601c830184611fdb565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611ec48284611fdb565b80820281158282048414176111dc576111dc611f4656fea2646970667358221220329cfa65bccde5a3149b4741ed975d047018671c90d85a618a650a693af231ac64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101e35760003560e01c80638a619a7111610102578063b5b7a18411610095578063eb8dedfa11610064578063eb8dedfa14610602578063eedcf2a914610636578063f3f480d914610649578063f4cf751b1461067d57600080fd5b8063b5b7a1841461056e578063d0e30db0146105a2578063d6e01b39146105d6578063e813a755146105ec57600080fd5b80639588eca2116100d15780639588eca2146104aa578063a888c2cd146104c0578063ab82d9a014610527578063b044397e1461053a57600080fd5b80638a619a711461041d5780638ad3a8f71461043d5780638caeb7a81461045d57806390df63b71461047d57600080fd5b80633968ae001161017a578063649628491161014957806364962849146103795780636b45ebcb14610399578063710cc9a7146103e75780637ffc2a6e1461040757600080fd5b80633968ae00146102e55780634518f79f146103195780634a439cfe1461033957806350b81dbe1461035957600080fd5b806327ee6bdd116101b657806327ee6bdd1461027c5780632c1925191461029257806331d14457146102b257806331ddf743146102c557600080fd5b8063042c4aaf146101e85780630e56752e1461022f578063114095d314610245578063222ae78614610267575b600080fd5b3480156101f457600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561023b57600080fd5b5061021c60015481565b34801561025157600080fd5b50610265610260366004611c97565b61069d565b005b34801561027357600080fd5b5061021c610819565b34801561028857600080fd5b5061021c60055481565b34801561029e57600080fd5b506102656102ad366004611cb0565b61084a565b6102656102c0366004611cb0565b610930565b3480156102d157600080fd5b506102656102e0366004611dbd565b610d94565b3480156102f157600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561032557600080fd5b50610265610334366004611c97565b611033565b34801561034557600080fd5b5061021c610354366004611c97565b6111b0565b34801561036557600080fd5b50610265610374366004611c97565b6111e2565b34801561038557600080fd5b50610265610394366004611c97565b611363565b3480156103a557600080fd5b506103cf6103b4366004611c97565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610226565b3480156103f357600080fd5b50610265610402366004611cb0565b6115f8565b34801561041357600080fd5b5061021c60025481565b34801561042957600080fd5b50610265610438366004611ea9565b6116d6565b34801561044957600080fd5b506009546103cf906001600160a01b031681565b34801561046957600080fd5b50610265610478366004611cb0565b611769565b34801561048957600080fd5b5061021c610498366004611c97565b60086020526000908152604090205481565b3480156104b657600080fd5b5061021c60045481565b3480156104cc57600080fd5b506105176104db366004611c97565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516102269493929190611ee1565b610265610535366004611c97565b61192c565b34801561054657600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561057a57600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ae57600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e257600080fd5b5061021c60035481565b3480156105f857600080fd5b5061021c60005481565b34801561060e57600080fd5b506103cf7f000000000000000000000000000000000000000000000000000000000000000081565b610265610644366004611cb0565b611b32565b34801561065557600080fd5b5061021c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561068957600080fd5b50610265610698366004611c97565b611b4e565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f000000000000000000000000000000000000000000000000000000000000000042816106f1576106f1611f30565b04116107365760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff16600281111561076457610764611ecb565b146107a35760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161072d565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b03168015610815576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006108457f000000000000000000000000000000000000000000000000000000000000000042611f5c565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461089d5760405162461bcd60e51b815260040161072d90611f7e565b80600254106108e55760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161072d565b816000541461081557600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6009546001600160a01b0316331461094757600080fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156109b75760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e0000000000604482015260640161072d565b60007f0000000000000000000000000000000000000000000000000000000000000000600054426109e89190611fb5565b6109f29190611f5c565b6109fd906001611fb5565b905060007f0000000000000000000000000000000000000000000000000000000000000000610a4c7f000000000000000000000000000000000000000000000000000000000000000042611f5c565b610a569190611fb5565b90506000818310610a675781610a69565b825b905080851115610aaf5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b604482015260640161072d565b600060017f000000000000000000000000000000000000000000000000000000000000000060015442610ae29190611fc8565b610aec9190611f5c565b610af69190611fc8565b905060007f0000000000000000000000000000000000000000000000000000000000000000610b457f000000000000000000000000000000000000000000000000000000000000000042611f5c565b610b4f9190611fc8565b90506000818311610b605781610b62565b815b905080881015610ba85760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b604482015260640161072d565b86610be65760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161072d565b6000888152600660205260409020600101546001600160a01b031615610c445760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161072d565b6040805160808101825288815233602080830191825263ffffffff4281168486019081526000606086018181528f82526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610cd957610cd9611ecb565b0217905550506040518881523391507f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a9060200160405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115610d8a576000610d697f000000000000000000000000000000000000000000000000000000000000000034611fc8565b604051909150339082156108fc029083906000818181858888f15050505050505b5050505050505050565b6040845110610dd75760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161072d565b6000838383604051602001610dee9392919061200b565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610e70576000868281518110610e3157610e3161204d565b6020026020010151905082811115610e5757826000528060205260406000209250610e67565b8060005282602052604060002092505b50600101610e14565b508060045414610eb35760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161072d565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610f2a5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161072d565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610f58908890612063565b6000604051808303816000865af19150503d8060008114610f95576040519150601f19603f3d011682016040523d82523d6000602084013e610f9a565b606091505b5050905080610feb5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161072d565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161108757611087611f30565b04116110c75760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161072d565b60008082815260066020526040902060010154600160c01b900460ff1660028111156110f5576110f5611ecb565b146111345760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161072d565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b03168015610815576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006111dc7f000000000000000000000000000000000000000000000000000000000000000083611f5c565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff16600281111561121157611211611ecb565b146112545760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b604482015260640161072d565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b0391821691161561131b576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f000000000000000000000000000000000000000000000000000000000000000042816113b7576113b7611f30565b0411156113f95760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161072d565b600081815260066020526040902060010154600160a01b900463ffffffff16806114565760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161072d565b6000828152600760205260409020546001600160a01b0316156114b25760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161072d565b7f000000000000000000000000000000000000000000000000000000000000000060015460005460026114e5919061206f565b6114ef9190611fb5565b6114f99190611fb5565b6115038242611fc8565b10156115775760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e000000000000000000606482015260840161072d565b6005548211156115d35760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f7906115ca9084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461164b5760405162461bcd60e51b815260040161072d90611f7e565b80600354106116935760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161072d565b816001541461081557600182905560038190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa70790602001610924565b6009546001600160a01b031633146116ed57600080fd5b6009546001600160a01b031633146117475760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f720000000000000000604482015260640161072d565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f000000000000000000000000000000000000000000000000000000000000000042816117bd576117bd611f30565b0411156117ff5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161072d565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146118525760405162461bcd60e51b815260040161072d90611f7e565b6005548211801561186257508015155b156118a557600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b6000828152600660205260409020548015611927578181036118e75750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b031615611927576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b0316156119915760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161072d565b6000818152600660205260409020600101546001600160a01b03166119ee5760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b604482015260640161072d565b7f0000000000000000000000000000000000000000000000000000000000000000341015611a5e5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e00604482015260640161072d565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d790611ab29084815260200190565b60405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115611b2f576000611b0e7f000000000000000000000000000000000000000000000000000000000000000034611fc8565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b611b3c8282610930565b611b4582611363565b610815826111e2565b6002600082815260066020526040902060010154600160c01b900460ff166002811115611b7d57611b7d611ecb565b14611bca5760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e000000000000000000604482015260640161072d565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600060208284031215611ca957600080fd5b5035919050565b60008060408385031215611cc357600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611d1157611d11611cd2565b604052919050565b803567ffffffffffffffff81168114611d3157600080fd5b919050565b80356001600160a01b0381168114611d3157600080fd5b600082601f830112611d5e57600080fd5b813567ffffffffffffffff811115611d7857611d78611cd2565b611d8b601f8201601f1916602001611ce8565b818152846020838601011115611da057600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611dd357600080fd5b843567ffffffffffffffff80821115611deb57600080fd5b818701915087601f830112611dff57600080fd5b8135602082821115611e1357611e13611cd2565b8160051b611e22828201611ce8565b928352848101820192828101908c851115611e3c57600080fd5b958301955b84871015611e5a57863582529583019590830190611e41565b9950611e6a915050898201611d19565b96505050611e7a60408801611d36565b93506060870135915080821115611e9057600080fd5b50611e9d87828801611d4d565b91505092959194509250565b600060208284031215611ebb57600080fd5b611ec482611d36565b9392505050565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611f2157634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611f7957634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b808201808211156111dc576111dc611f46565b818103818111156111dc576111dc611f46565b6000815160005b81811015611ffc5760208185018101518683015201611fe2565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000612044601c830184611fdb565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611ec48284611fdb565b80820281158282048414176111dc576111dc611f4656fea2646970667358221220329cfa65bccde5a3149b4741ed975d047018671c90d85a618a650a693af231ac64736f6c63430008120033", + "numDeployments": 3, + "solcInputHash": "6b0b750c6eee9aa0a5e450d1f0bbb2d2", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerFutureLimit\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"challengers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claims\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"enum VeaOutboxGnosisToArb.Party\",\"name\":\"honest\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampFutureUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Chiado to ArbitrumGoerli. Note: This contract is deployed on ArbitrumGoerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"challenge(uint256)\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_routerGnosisToArb\":\"The address of the router on Ethereum that routes from Arbitrum to Ethereum.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_sequencerFutureLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded with header from VeaInbox.\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"updateSequencerFutureLimit(uint256,uint256)\":{\"details\":\"Set the sequencerFutureLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerFutureLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256)\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32)\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol\":\"VeaOutboxGnosisToArbDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/AddressAliasHelper.sol\":{\"content\":\"// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/libraries/AddressAliasHelper.sol\\n// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressAliasHelper {\\n uint160 internal 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\",\"keccak256\":\"0xfa8b6907a33c37e13b3de6e2459d6bd153708be4b8413db3c319ea3a5d8c9b00\",\"license\":\"BUSL-1.1\"},\"src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../gnosisToArbitrum/VeaOutboxGnosisToArb.sol\\\";\\n\\n/// @dev Vea Outbox From Chiado to ArbitrumGoerli.\\n/// Note: This contract is deployed on ArbitrumGoerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxGnosisToArbDevnet is VeaOutboxGnosisToArb {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) public override {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) public override OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n verifySnapshot(_epoch);\\n withdrawClaimDeposit(_epoch);\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit\\n )\\n VeaOutboxGnosisToArb(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _routerGnosisToArb,\\n _sequencerDelayLimit,\\n _sequencerFutureLimit\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x8c8b56464ddec74b6dfa3859a19feb1d25b630a58ec12cd943674a9881258cf5\",\"license\":\"MIT\"},\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/AddressAliasHelper.sol\\\";\\n\\n/// @dev Vea Outbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaOutboxGnosisToArb is IVeaOutboxOnL2 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public immutable routerGnosisToArb; // The address of the router from Gnosis to Arbitrum on Ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // address to send burned eth\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable challengePeriod; // Claim challenge timewindow.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n uint256 public timestampFutureUpdated; // The timestamp of the last sequencer future update.\\n\\n bytes32 public stateRoot;\\n uint256 public latestVerifiedEpoch;\\n\\n mapping(uint256 => Claim) public claims; // epoch => claim\\n mapping(uint256 => address) public challengers; // epoch => challenger\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n enum Party {\\n None,\\n Claimer,\\n Challenger\\n }\\n\\n struct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestamp;\\n Party honest;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod <= latestVerifiedEpoch + timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod > latestVerifiedEpoch + timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit\\n ) {\\n deposit = _deposit;\\n epochPeriod = _epochPeriod;\\n challengePeriod = _challengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n routerGnosisToArb = _routerGnosisToArb;\\n sequencerDelayLimit = _sequencerDelayLimit;\\n sequencerFutureLimit = _sequencerFutureLimit;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerFutureLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerFutureLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampFutureUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerFutureLimit != _newSequencerFutureLimit) {\\n sequencerFutureLimit = _newSequencerFutureLimit;\\n timestampFutureUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Set the sequencerDelayLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch is invalid.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n function challenge(uint256 _epoch) external payable virtual {\\n require(challengers[_epoch] == address(0), \\\"Claim already challenged.\\\");\\n require(claims[_epoch].claimer != address(0), \\\"No claim for epoch.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n\\n challengers[_epoch] = msg.sender;\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) external virtual OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external virtual OnlyBridgeRunning {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n bytes32 claimedStateRoot = claims[_epoch].stateRoot;\\n\\n if (claimedStateRoot != bytes32(0)) {\\n if (claimedStateRoot == _stateRoot) {\\n claims[_epoch].honest = Party.Claimer;\\n } else if (challengers[_epoch] != address(0)) {\\n claims[_epoch].honest = Party.Challenger;\\n }\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded with header from VeaInbox.\\n function sendMessage(bytes32[] memory _proof, uint64 _msgId, address _to, bytes memory _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) external virtual {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n function withdrawChallengeDeposit(uint256 _epoch) external {\\n require(claims[_epoch].honest == Party.Challenger, \\\"Challenge unsuccessful.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete claims[_epoch];\\n delete challengers[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (claimer != address(0)) {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawChallengerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete challengers[_epoch];\\n\\n if (challenger != address(0)) {\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x999ccae7dfc58d5c0e51726634e049b48ebc00dfeb2541f99d818f89a82a169b\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101606040523480156200001257600080fd5b5060405162002116380380620021168339810160408190526200003591620000e1565b60a08790526101008690526101208590526101408490526001600160a01b03831660805260008290556001819055868686868686866200007760028862000167565b60c0819052620000898860026200018a565b620000959190620001aa565b60e05261010051600190620000ab904262000167565b620000b79190620001aa565b6005555050600980546001600160a01b0319163317905550620001c09a5050505050505050505050565b600080600080600080600060e0888a031215620000fd57600080fd5b8751602089015160408a015160608b015160808c0151939a50919850965094506001600160a01b03811681146200013357600080fd5b8093505060a0880151915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200018557634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001a457620001a462000151565b92915050565b81810381811115620001a457620001a462000151565b60805160a05160c05160e051610100516101205161014051611e4c620002ca600039600081816104ce0152818161062101528181610dc5015281816110f501526114fb0152600081816105dd015261124401526000818161050201528181610646015281816107a201528181610dea01528181610f470152818161111a015261152001526000818161107001526119ec01526000818161102f01526119ab01526000818161053601528181610762015281816108cb01528181610aae01528181610adb01528181610f08015281816110bb015281816117800152818161184c0152611879015260008181610596015281816107d701528181611393015261159a0152611e4c6000f3fe6080604052600436106101cd5760003560e01c80638ad3a8f7116100f7578063b5b7a18411610095578063eb8dedfa11610064578063eb8dedfa14610584578063eedcf2a9146105b8578063f3f480d9146105cb578063f4cf751b146105ff57600080fd5b8063b5b7a184146104f0578063d0e30db014610524578063d6e01b3914610558578063e813a7551461056e57600080fd5b80639588eca2116100d15780639588eca21461042c578063a888c2cd14610442578063ab82d9a0146104a9578063b044397e146104bc57600080fd5b80638ad3a8f7146103bf5780638caeb7a8146103df57806390df63b7146103ff57600080fd5b80634518f79f1161016f5780636b45ebcb1161013e5780636b45ebcb1461031b578063710cc9a7146103695780637ffc2a6e146103895780638a619a711461039f57600080fd5b80634518f79f1461029b5780634a439cfe146102bb57806350b81dbe146102db57806364962849146102fb57600080fd5b806327ee6bdd116101ab57806327ee6bdd146102325780632c1925191461024857806331d144571461026857806331ddf7431461027b57600080fd5b80630e56752e146101d2578063114095d3146101fb578063222ae7861461021d575b600080fd5b3480156101de57600080fd5b506101e860015481565b6040519081526020015b60405180910390f35b34801561020757600080fd5b5061021b610216366004611a27565b61061f565b005b34801561022957600080fd5b506101e861079b565b34801561023e57600080fd5b506101e860055481565b34801561025457600080fd5b5061021b610263366004611a40565b6107cc565b61021b610276366004611a40565b6108b2565b34801561028757600080fd5b5061021b610296366004611b4d565b610b24565b3480156102a757600080fd5b5061021b6102b6366004611a27565b610dc3565b3480156102c757600080fd5b506101e86102d6366004611a27565b610f40565b3480156102e757600080fd5b5061021b6102f6366004611a27565b610f72565b34801561030757600080fd5b5061021b610316366004611a27565b6110f3565b34801561032757600080fd5b50610351610336366004611a27565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101f2565b34801561037557600080fd5b5061021b610384366004611a40565b611388565b34801561039557600080fd5b506101e860025481565b3480156103ab57600080fd5b5061021b6103ba366004611c39565b611466565b3480156103cb57600080fd5b50600954610351906001600160a01b031681565b3480156103eb57600080fd5b5061021b6103fa366004611a40565b6114f9565b34801561040b57600080fd5b506101e861041a366004611a27565b60086020526000908152604090205481565b34801561043857600080fd5b506101e860045481565b34801561044e57600080fd5b5061049961045d366004611a27565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516101f29493929190611c71565b61021b6104b7366004611a27565b6116bc565b3480156104c857600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b3480156104fc57600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561053057600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561056457600080fd5b506101e860035481565b34801561057a57600080fd5b506101e860005481565b34801561059057600080fd5b506103517f000000000000000000000000000000000000000000000000000000000000000081565b61021b6105c6366004611a40565b6118c2565b3480156105d757600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561060b57600080fd5b5061021b61061a366004611a27565b6118de565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161067357610673611cc0565b04116106b85760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff1660028111156106e6576106e6611c5b565b146107255760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106af565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b03168015610797576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006107c77f000000000000000000000000000000000000000000000000000000000000000042611cec565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461081f5760405162461bcd60e51b81526004016106af90611d0e565b80600254106108675760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106af565b816000541461079757600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6009546001600160a01b031633146108c957600080fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156109395760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106af565b806109775760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106af565b6000828152600660205260409020600101546001600160a01b0316156109d55760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106af565b6040805160808101825282815233602080830191825263ffffffff4281168486019081526000606086018181528982526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610a6a57610a6a611c5b565b02179055505060408051848152602081018490523392507fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115610797576000610b007f000000000000000000000000000000000000000000000000000000000000000034611d45565b604051909150339082156108fc029083906000818181858888f15050505050505050565b6040845110610b675760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106af565b6000838383604051602001610b7e93929190611d88565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610c00576000868281518110610bc157610bc1611dca565b6020026020010151905082811115610be757826000528060205260406000209250610bf7565b8060005282602052604060002092505b50600101610ba4565b508060045414610c435760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106af565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610cba5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106af565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610ce8908890611de0565b6000604051808303816000865af19150503d8060008114610d25576040519150601f19603f3d011682016040523d82523d6000602084013e610d2a565b606091505b5050905080610d7b5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106af565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f00000000000000000000000000000000000000000000000000000000000000004281610e1757610e17611cc0565b0411610e575760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106af565b60008082815260066020526040902060010154600160c01b900460ff166002811115610e8557610e85611c5b565b14610ec45760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106af565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b03168015610797576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6000610f6c7f000000000000000000000000000000000000000000000000000000000000000083611cec565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff166002811115610fa157610fa1611c5b565b14610fe45760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b60448201526064016106af565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b039182169116156110ab576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161114757611147611cc0565b0411156111895760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106af565b600081815260066020526040902060010154600160a01b900463ffffffff16806111e65760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106af565b6000828152600760205260409020546001600160a01b0316156112425760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106af565b7f000000000000000000000000000000000000000000000000000000000000000060015460005460026112759190611dec565b61127f9190611e03565b6112899190611e03565b6112938242611d45565b10156113075760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e00000000000000000060648201526084016106af565b6005548211156113635760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79061135a9084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146113db5760405162461bcd60e51b81526004016106af90611d0e565b80600354106114235760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106af565b816001541461079757600182905560038190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020016108a6565b6009546001600160a01b0316331461147d57600080fd5b6009546001600160a01b031633146114d75760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106af565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161154d5761154d611cc0565b04111561158f5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106af565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146115e25760405162461bcd60e51b81526004016106af90611d0e565b600554821180156115f257508015155b1561163557600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b60008281526006602052604090205480156116b7578181036116775750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b0316156116b7576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b0316156117215760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106af565b6000818152600660205260409020600101546001600160a01b031661177e5760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b60448201526064016106af565b7f00000000000000000000000000000000000000000000000000000000000000003410156117ee5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106af565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7906118429084815260200190565b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156118bf57600061189e7f000000000000000000000000000000000000000000000000000000000000000034611d45565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b6118cc82826108b2565b6118d5826110f3565b61079782610f72565b6002600082815260066020526040902060010154600160c01b900460ff16600281111561190d5761190d611c5b565b1461195a5760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e00000000000000000060448201526064016106af565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600060208284031215611a3957600080fd5b5035919050565b60008060408385031215611a5357600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611aa157611aa1611a62565b604052919050565b803567ffffffffffffffff81168114611ac157600080fd5b919050565b80356001600160a01b0381168114611ac157600080fd5b600082601f830112611aee57600080fd5b813567ffffffffffffffff811115611b0857611b08611a62565b611b1b601f8201601f1916602001611a78565b818152846020838601011115611b3057600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611b6357600080fd5b843567ffffffffffffffff80821115611b7b57600080fd5b818701915087601f830112611b8f57600080fd5b8135602082821115611ba357611ba3611a62565b8160051b611bb2828201611a78565b928352848101820192828101908c851115611bcc57600080fd5b958301955b84871015611bea57863582529583019590830190611bd1565b9950611bfa915050898201611aa9565b96505050611c0a60408801611ac6565b93506060870135915080821115611c2057600080fd5b50611c2d87828801611add565b91505092959194509250565b600060208284031215611c4b57600080fd5b611c5482611ac6565b9392505050565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611cb157634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611d0957634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b81810381811115610f6c57610f6c611cd6565b6000815160005b81811015611d795760208185018101518683015201611d5f565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611dc1601c830184611d58565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611c548284611d58565b8082028115828204841417610f6c57610f6c611cd6565b80820180821115610f6c57610f6c611cd656fea2646970667358221220e76f1f04ed49d33a147833dd04ad8a864eb7fdeca074d4525eabbfcec00e586d64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101cd5760003560e01c80638ad3a8f7116100f7578063b5b7a18411610095578063eb8dedfa11610064578063eb8dedfa14610584578063eedcf2a9146105b8578063f3f480d9146105cb578063f4cf751b146105ff57600080fd5b8063b5b7a184146104f0578063d0e30db014610524578063d6e01b3914610558578063e813a7551461056e57600080fd5b80639588eca2116100d15780639588eca21461042c578063a888c2cd14610442578063ab82d9a0146104a9578063b044397e146104bc57600080fd5b80638ad3a8f7146103bf5780638caeb7a8146103df57806390df63b7146103ff57600080fd5b80634518f79f1161016f5780636b45ebcb1161013e5780636b45ebcb1461031b578063710cc9a7146103695780637ffc2a6e146103895780638a619a711461039f57600080fd5b80634518f79f1461029b5780634a439cfe146102bb57806350b81dbe146102db57806364962849146102fb57600080fd5b806327ee6bdd116101ab57806327ee6bdd146102325780632c1925191461024857806331d144571461026857806331ddf7431461027b57600080fd5b80630e56752e146101d2578063114095d3146101fb578063222ae7861461021d575b600080fd5b3480156101de57600080fd5b506101e860015481565b6040519081526020015b60405180910390f35b34801561020757600080fd5b5061021b610216366004611a27565b61061f565b005b34801561022957600080fd5b506101e861079b565b34801561023e57600080fd5b506101e860055481565b34801561025457600080fd5b5061021b610263366004611a40565b6107cc565b61021b610276366004611a40565b6108b2565b34801561028757600080fd5b5061021b610296366004611b4d565b610b24565b3480156102a757600080fd5b5061021b6102b6366004611a27565b610dc3565b3480156102c757600080fd5b506101e86102d6366004611a27565b610f40565b3480156102e757600080fd5b5061021b6102f6366004611a27565b610f72565b34801561030757600080fd5b5061021b610316366004611a27565b6110f3565b34801561032757600080fd5b50610351610336366004611a27565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101f2565b34801561037557600080fd5b5061021b610384366004611a40565b611388565b34801561039557600080fd5b506101e860025481565b3480156103ab57600080fd5b5061021b6103ba366004611c39565b611466565b3480156103cb57600080fd5b50600954610351906001600160a01b031681565b3480156103eb57600080fd5b5061021b6103fa366004611a40565b6114f9565b34801561040b57600080fd5b506101e861041a366004611a27565b60086020526000908152604090205481565b34801561043857600080fd5b506101e860045481565b34801561044e57600080fd5b5061049961045d366004611a27565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516101f29493929190611c71565b61021b6104b7366004611a27565b6116bc565b3480156104c857600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b3480156104fc57600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561053057600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561056457600080fd5b506101e860035481565b34801561057a57600080fd5b506101e860005481565b34801561059057600080fd5b506103517f000000000000000000000000000000000000000000000000000000000000000081565b61021b6105c6366004611a40565b6118c2565b3480156105d757600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561060b57600080fd5b5061021b61061a366004611a27565b6118de565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161067357610673611cc0565b04116106b85760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff1660028111156106e6576106e6611c5b565b146107255760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106af565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b03168015610797576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006107c77f000000000000000000000000000000000000000000000000000000000000000042611cec565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461081f5760405162461bcd60e51b81526004016106af90611d0e565b80600254106108675760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106af565b816000541461079757600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6009546001600160a01b031633146108c957600080fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156109395760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106af565b806109775760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106af565b6000828152600660205260409020600101546001600160a01b0316156109d55760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106af565b6040805160808101825282815233602080830191825263ffffffff4281168486019081526000606086018181528982526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610a6a57610a6a611c5b565b02179055505060408051848152602081018490523392507fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115610797576000610b007f000000000000000000000000000000000000000000000000000000000000000034611d45565b604051909150339082156108fc029083906000818181858888f15050505050505050565b6040845110610b675760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106af565b6000838383604051602001610b7e93929190611d88565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610c00576000868281518110610bc157610bc1611dca565b6020026020010151905082811115610be757826000528060205260406000209250610bf7565b8060005282602052604060002092505b50600101610ba4565b508060045414610c435760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106af565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610cba5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106af565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610ce8908890611de0565b6000604051808303816000865af19150503d8060008114610d25576040519150601f19603f3d011682016040523d82523d6000602084013e610d2a565b606091505b5050905080610d7b5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106af565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f00000000000000000000000000000000000000000000000000000000000000004281610e1757610e17611cc0565b0411610e575760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106af565b60008082815260066020526040902060010154600160c01b900460ff166002811115610e8557610e85611c5b565b14610ec45760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106af565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b03168015610797576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6000610f6c7f000000000000000000000000000000000000000000000000000000000000000083611cec565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff166002811115610fa157610fa1611c5b565b14610fe45760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b60448201526064016106af565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b039182169116156110ab576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161114757611147611cc0565b0411156111895760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106af565b600081815260066020526040902060010154600160a01b900463ffffffff16806111e65760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106af565b6000828152600760205260409020546001600160a01b0316156112425760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106af565b7f000000000000000000000000000000000000000000000000000000000000000060015460005460026112759190611dec565b61127f9190611e03565b6112899190611e03565b6112938242611d45565b10156113075760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e00000000000000000060648201526084016106af565b6005548211156113635760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79061135a9084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146113db5760405162461bcd60e51b81526004016106af90611d0e565b80600354106114235760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106af565b816001541461079757600182905560038190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020016108a6565b6009546001600160a01b0316331461147d57600080fd5b6009546001600160a01b031633146114d75760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106af565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161154d5761154d611cc0565b04111561158f5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106af565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146115e25760405162461bcd60e51b81526004016106af90611d0e565b600554821180156115f257508015155b1561163557600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b60008281526006602052604090205480156116b7578181036116775750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b0316156116b7576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b0316156117215760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106af565b6000818152600660205260409020600101546001600160a01b031661177e5760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b60448201526064016106af565b7f00000000000000000000000000000000000000000000000000000000000000003410156117ee5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106af565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7906118429084815260200190565b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156118bf57600061189e7f000000000000000000000000000000000000000000000000000000000000000034611d45565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b6118cc82826108b2565b6118d5826110f3565b61079782610f72565b6002600082815260066020526040902060010154600160c01b900460ff16600281111561190d5761190d611c5b565b1461195a5760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e00000000000000000060448201526064016106af565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600060208284031215611a3957600080fd5b5035919050565b60008060408385031215611a5357600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611aa157611aa1611a62565b604052919050565b803567ffffffffffffffff81168114611ac157600080fd5b919050565b80356001600160a01b0381168114611ac157600080fd5b600082601f830112611aee57600080fd5b813567ffffffffffffffff811115611b0857611b08611a62565b611b1b601f8201601f1916602001611a78565b818152846020838601011115611b3057600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611b6357600080fd5b843567ffffffffffffffff80821115611b7b57600080fd5b818701915087601f830112611b8f57600080fd5b8135602082821115611ba357611ba3611a62565b8160051b611bb2828201611a78565b928352848101820192828101908c851115611bcc57600080fd5b958301955b84871015611bea57863582529583019590830190611bd1565b9950611bfa915050898201611aa9565b96505050611c0a60408801611ac6565b93506060870135915080821115611c2057600080fd5b50611c2d87828801611add565b91505092959194509250565b600060208284031215611c4b57600080fd5b611c5482611ac6565b9392505050565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611cb157634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611d0957634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b81810381811115610f6c57610f6c611cd6565b6000815160005b81811015611d795760208185018101518683015201611d5f565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611dc1601c830184611d58565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611c548284611d58565b8082028115828204841417610f6c57610f6c611cd6565b80820180821115610f6c57610f6c611cd656fea2646970667358221220e76f1f04ed49d33a147833dd04ad8a864eb7fdeca074d4525eabbfcec00e586d64736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Chiado to ArbitrumGoerli. Note: This contract is deployed on ArbitrumGoerli. Note: This contract is permissioned for developer testing (devnet).", "events": { @@ -667,10 +635,11 @@ "_epoch": "The epoch associated with the challenged claim." } }, - "Claimed(address,bytes32)": { - "details": "Watcher check this event to challenge fraud.", + "Claimed(address,uint256,bytes32)": { + "details": "Watchers check this event to challenge fraud.", "params": { "_claimer": "The address of the claimer.", + "_epoch": "The epoch associated with the claim.", "_stateRoot": "The state root of the claim." } }, @@ -720,8 +689,6 @@ "_challengePeriod": "The duration of the period allowing to challenge a claim.", "_deposit": "The deposit amount to submit a claim in wei.", "_epochPeriod": "The duration of each epoch.", - "_maxClaimDelayEpochs": "The maximum number of epochs that can be claimed in the past.", - "_maxClaimFutureEpochs": "The maximum number of epochs that can be claimed in the future.", "_routerGnosisToArb": "The address of the router on Ethereum that routes from Arbitrum to Ethereum.", "_sequencerDelayLimit": "The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.", "_sequencerFutureLimit": "The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.", @@ -822,7 +789,7 @@ "storageLayout": { "storage": [ { - "astId": 499, + "astId": 4180, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "sequencerDelayLimit", "offset": 0, @@ -830,7 +797,7 @@ "type": "t_uint256" }, { - "astId": 501, + "astId": 4182, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "sequencerFutureLimit", "offset": 0, @@ -838,7 +805,7 @@ "type": "t_uint256" }, { - "astId": 503, + "astId": 4184, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "timestampDelayUpdated", "offset": 0, @@ -846,7 +813,7 @@ "type": "t_uint256" }, { - "astId": 505, + "astId": 4186, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "timestampFutureUpdated", "offset": 0, @@ -854,7 +821,7 @@ "type": "t_uint256" }, { - "astId": 507, + "astId": 4188, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "stateRoot", "offset": 0, @@ -862,7 +829,7 @@ "type": "t_bytes32" }, { - "astId": 509, + "astId": 4190, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "latestVerifiedEpoch", "offset": 0, @@ -870,15 +837,15 @@ "type": "t_uint256" }, { - "astId": 514, + "astId": 4195, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "claims", "offset": 0, "slot": "6", - "type": "t_mapping(t_uint256,t_struct(Claim)536_storage)" + "type": "t_mapping(t_uint256,t_struct(Claim)4217_storage)" }, { - "astId": 518, + "astId": 4199, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "challengers", "offset": 0, @@ -886,7 +853,7 @@ "type": "t_mapping(t_uint256,t_address)" }, { - "astId": 522, + "astId": 4203, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "relayed", "offset": 0, @@ -894,7 +861,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 60, + "astId": 3824, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "devnetOperator", "offset": 0, @@ -913,7 +880,7 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_enum(Party)526": { + "t_enum(Party)4207": { "encoding": "inplace", "label": "enum VeaOutboxGnosisToArb.Party", "numberOfBytes": "1" @@ -932,19 +899,19 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_mapping(t_uint256,t_struct(Claim)536_storage)": { + "t_mapping(t_uint256,t_struct(Claim)4217_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct VeaOutboxGnosisToArb.Claim)", "numberOfBytes": "32", - "value": "t_struct(Claim)536_storage" + "value": "t_struct(Claim)4217_storage" }, - "t_struct(Claim)536_storage": { + "t_struct(Claim)4217_storage": { "encoding": "inplace", "label": "struct VeaOutboxGnosisToArb.Claim", "members": [ { - "astId": 528, + "astId": 4209, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "stateRoot", "offset": 0, @@ -952,7 +919,7 @@ "type": "t_bytes32" }, { - "astId": 530, + "astId": 4211, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "claimer", "offset": 0, @@ -960,7 +927,7 @@ "type": "t_address" }, { - "astId": 532, + "astId": 4213, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "timestamp", "offset": 20, @@ -968,12 +935,12 @@ "type": "t_uint32" }, { - "astId": 535, + "astId": 4216, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "honest", "offset": 24, "slot": "1", - "type": "t_enum(Party)526" + "type": "t_enum(Party)4207" } ], "numberOfBytes": "64" diff --git a/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbTestnet.json b/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbTestnet.json index 6267bfa2..c4cb3534 100644 --- a/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbTestnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x663697f5748c5f4d46a15114Dde5514356E794F4", + "address": "0xF0492e87Be6d644A6a467fE20ee9EC5eFCB6cB23", "abi": [ { "inputs": [ @@ -37,16 +37,6 @@ "internalType": "uint256", "name": "_sequencerFutureLimit", "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxClaimDelayEpochs", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxClaimFutureEpochs", - "type": "uint256" } ], "stateMutability": "nonpayable", @@ -80,6 +70,12 @@ "name": "_claimer", "type": "address" }, + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, { "indexed": false, "internalType": "bytes32", @@ -297,32 +293,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "maxClaimDelayEpochs", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxClaimFutureEpochs", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -581,19 +551,19 @@ "type": "function" } ], - "transactionHash": "0x26b88fcb0986901e8ff34f4fa82837e7fdb314669055c5955a620ad3f41ee919", + "transactionHash": "0x3f6c0bc3231f8d3bc295b945ffa1045c99324893887cdd6ccbfa9e2065b5e05d", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x663697f5748c5f4d46a15114Dde5514356E794F4", + "contractAddress": "0xF0492e87Be6d644A6a467fE20ee9EC5eFCB6cB23", "transactionIndex": 1, - "gasUsed": "1854456", + "gasUsed": "59059459", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x42016c60694e66650e8b8aaece653b7f43cc046f7075a88af35c401c18799453", - "transactionHash": "0x26b88fcb0986901e8ff34f4fa82837e7fdb314669055c5955a620ad3f41ee919", + "blockHash": "0x5c665f88a8b40978b877644ede92816e1818b678a185055dd7ef2ab149d384e5", + "transactionHash": "0x3f6c0bc3231f8d3bc295b945ffa1045c99324893887cdd6ccbfa9e2065b5e05d", "logs": [], - "blockNumber": 28619713, - "cumulativeGasUsed": "1854456", + "blockNumber": 28631092, + "cumulativeGasUsed": "59059459", "status": 1, "byzantium": true }, @@ -602,17 +572,15 @@ 7200, 86400, 168, - "0xC21c20a719fAc23c54c336FA0E16a0CFdC4baA00", + "0x531754c9935A851173FA349b3bEadAF538c570aC", 86400, - 3600, - 3, - 1 + 3600 ], - "numDeployments": 1, - "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerFutureLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxClaimDelayEpochs\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxClaimFutureEpochs\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"challengers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claims\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"enum VeaOutboxGnosisToArb.Party\",\"name\":\"honest\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxClaimDelayEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxClaimFutureEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampFutureUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Gnosis to Arbitrum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watcher check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"challenge(uint256)\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxClaimDelayEpochs\":\"The maximum number of epochs that can be claimed in the past.\",\"_maxClaimFutureEpochs\":\"The maximum number of epochs that can be claimed in the future.\",\"_routerGnosisToArb\":\"The address of the router on Ethereum that routes from Arbitrum to Ethereum.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_sequencerFutureLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded with header from VeaInbox.\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"updateSequencerFutureLimit(uint256,uint256)\":{\"details\":\"Set the sequencerFutureLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerFutureLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256)\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32)\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":\"VeaOutboxGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/AddressAliasHelper.sol\":{\"content\":\"// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/libraries/AddressAliasHelper.sol\\n// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressAliasHelper {\\n uint160 internal 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}\",\"keccak256\":\"0xc57d335f0f5ac584ae7ed6e256be5d1172df6200c02004f31da0c041ce596512\",\"license\":\"BUSL-1.1\"},\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/AddressAliasHelper.sol\\\";\\n\\n/// @dev Vea Outbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaOutboxGnosisToArb is IVeaOutboxOnL2 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public immutable routerGnosisToArb; // The address of the router from Gnosis to Arbitrum on Ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // address to send burned eth\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable challengePeriod; // Claim challenge timewindow.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxClaimDelayEpochs; // The maximum number of epochs that can be claimed in the past.\\n uint256 public immutable maxClaimFutureEpochs; // The maximum number of epochs that can be claimed in the future.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n uint256 public timestampFutureUpdated; // The timestamp of the last sequencer future update.\\n\\n bytes32 public stateRoot;\\n uint256 public latestVerifiedEpoch;\\n\\n mapping(uint256 => Claim) public claims; // epoch => claim\\n mapping(uint256 => address) public challengers; // epoch => challenger\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n enum Party {\\n None,\\n Claimer,\\n Challenger\\n }\\n\\n struct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestamp;\\n Party honest;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watcher check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod <= latestVerifiedEpoch + timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod > latestVerifiedEpoch + timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past.\\n /// @param _maxClaimFutureEpochs The maximum number of epochs that can be claimed in the future.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit,\\n uint256 _maxClaimDelayEpochs,\\n uint256 _maxClaimFutureEpochs\\n ) {\\n deposit = _deposit;\\n epochPeriod = _epochPeriod;\\n challengePeriod = _challengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n routerGnosisToArb = _routerGnosisToArb;\\n sequencerDelayLimit = _sequencerDelayLimit;\\n sequencerFutureLimit = _sequencerFutureLimit;\\n maxClaimDelayEpochs = _maxClaimDelayEpochs;\\n maxClaimFutureEpochs = _maxClaimFutureEpochs;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerFutureLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerFutureLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampFutureUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerFutureLimit != _newSequencerFutureLimit) {\\n sequencerFutureLimit = _newSequencerFutureLimit;\\n timestampFutureUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Set the sequencerDelayLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n uint256 epochMaxClaimableCalculated = (block.timestamp + sequencerDelayLimit) / epochPeriod + 1;\\n uint256 epochMaxClaimableCap = block.timestamp / epochPeriod + maxClaimFutureEpochs;\\n uint256 epochMaxClaimable = epochMaxClaimableCalculated < epochMaxClaimableCap ? epochMaxClaimableCalculated : epochMaxClaimableCap;\\n\\n require(_epoch <= epochMaxClaimable, \\\"Epoch is invalid.\\\");\\n\\n uint256 epochMinClaimableCalculated = (block.timestamp - sequencerFutureLimit) / epochPeriod - 1;\\n uint256 epochMinClaimableCap = block.timestamp / epochPeriod - maxClaimDelayEpochs;\\n uint256 epochMinClaimable = epochMinClaimableCalculated > epochMinClaimableCap ? epochMinClaimableCap : epochMinClaimableCap;\\n\\n require(_epoch >= epochMinClaimable, \\\"Epoch is invalid.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n function challenge(uint256 _epoch) external payable virtual {\\n require(challengers[_epoch] == address(0), \\\"Claim already challenged.\\\");\\n require(claims[_epoch].claimer != address(0), \\\"No claim for epoch.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n\\n challengers[_epoch] = msg.sender;\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) external virtual OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n bytes32 claimedStateRoot = claims[_epoch].stateRoot;\\n\\n if (claimedStateRoot != bytes32(0)) {\\n if (claimedStateRoot == _stateRoot) {\\n claims[_epoch].honest = Party.Claimer;\\n } else if (challengers[_epoch] != address(0)) {\\n claims[_epoch].honest = Party.Challenger;\\n }\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded with header from VeaInbox.\\n function sendMessage(bytes32[] memory _proof, uint64 _msgId, address _to, bytes memory _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) external virtual {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n function withdrawChallengeDeposit(uint256 _epoch) external {\\n require(claims[_epoch].honest == Party.Challenger, \\\"Challenge unsuccessful.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete claims[_epoch];\\n delete challengers[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (claimer != address(0)) {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawChallengerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete challengers[_epoch];\\n\\n if (challenger != address(0)) {\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x3c4b79ebf5ca0d0051c088a8d4fb1c95928bbcc5162a729928cb46eb24f3b22e\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002273380380620022738339810160408190526200003591620000cf565b60a08990526101008890526101208790526101408690526001600160a01b038516608052600084905560018390556101608290526101808190526200007c60028a62000169565b60c08190526200008e8a60026200018c565b6200009a9190620001ac565b60e05261010051600190620000b0904262000169565b620000bc9190620001ac565b60055550620001c2975050505050505050565b60008060008060008060008060006101208a8c031215620000ef57600080fd5b895160208b015160408c015160608d015160808e0151939c50919a50985096506001600160a01b03811681146200012557600080fd5b8095505060a08a0151935060c08a0151925060e08a015191506101008a015190509295985092959850929598565b634e487b7160e01b600052601160045260246000fd5b6000826200018757634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001a657620001a662000153565b92915050565b81810381811115620001a657620001a662000153565b60805160a05160c05160e0516101005161012051610140516101605161018051611f676200030c600039600081816102d601526109780152600081816101d90152610a710152600081816104eb0152818161062b01528181610faa015281816112da015261164d0152600081816105e7015261142901526000818161051f01528181610650015281816107ac015281816109300152818161099c01528181610a2a01528181610a9501528181610fcf0152818161112c015281816112ff01526116720152600081816112550152611b220152600081816112140152611ae10152600081816105530152818161076c015281816108be01528181610c8c01528181610cb9015281816110ed015281816112a0015281816118d20152818161199e01526119cb0152600081816105b3015281816107e10152818161157801526116ec0152611f676000f3fe6080604052600436106101c25760003560e01c8063710cc9a7116100f7578063b044397e11610095578063e813a75511610064578063e813a7551461058b578063eb8dedfa146105a1578063f3f480d9146105d5578063f4cf751b1461060957600080fd5b8063b044397e146104d9578063b5b7a1841461050d578063d0e30db014610541578063d6e01b391461057557600080fd5b806390df63b7116100d157806390df63b71461041c5780639588eca214610449578063a888c2cd1461045f578063ab82d9a0146104c657600080fd5b8063710cc9a7146103c65780637ffc2a6e146103e65780638caeb7a8146103fc57600080fd5b806331ddf743116101645780634a439cfe1161013e5780634a439cfe1461031857806350b81dbe1461033857806364962849146103585780636b45ebcb1461037857600080fd5b806331ddf743146102a45780633968ae00146102c45780634518f79f146102f857600080fd5b8063222ae786116101a0578063222ae7861461024657806327ee6bdd1461025b5780632c1925191461027157806331d144571461029157600080fd5b8063042c4aaf146101c75780630e56752e1461020e578063114095d314610224575b600080fd5b3480156101d357600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561021a57600080fd5b506101fb60015481565b34801561023057600080fd5b5061024461023f366004611b5d565b610629565b005b34801561025257600080fd5b506101fb6107a5565b34801561026757600080fd5b506101fb60055481565b34801561027d57600080fd5b5061024461028c366004611b76565b6107d6565b61024461029f366004611b76565b6108bc565b3480156102b057600080fd5b506102446102bf366004611c83565b610d09565b3480156102d057600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561030457600080fd5b50610244610313366004611b5d565b610fa8565b34801561032457600080fd5b506101fb610333366004611b5d565b611125565b34801561034457600080fd5b50610244610353366004611b5d565b611157565b34801561036457600080fd5b50610244610373366004611b5d565b6112d8565b34801561038457600080fd5b506103ae610393366004611b5d565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610205565b3480156103d257600080fd5b506102446103e1366004611b76565b61156d565b3480156103f257600080fd5b506101fb60025481565b34801561040857600080fd5b50610244610417366004611b76565b61164b565b34801561042857600080fd5b506101fb610437366004611b5d565b60086020526000908152604090205481565b34801561045557600080fd5b506101fb60045481565b34801561046b57600080fd5b506104b661047a366004611b5d565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516102059493929190611d85565b6102446104d4366004611b5d565b61180e565b3480156104e557600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561051957600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054d57600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561058157600080fd5b506101fb60035481565b34801561059757600080fd5b506101fb60005481565b3480156105ad57600080fd5b506103ae7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e157600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561061557600080fd5b50610244610624366004611b5d565b611a14565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161067d5761067d611dd4565b04116106c25760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff1660028111156106f0576106f0611d6f565b1461072f5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106b9565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b031680156107a1576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006107d17f000000000000000000000000000000000000000000000000000000000000000042611e00565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146108295760405162461bcd60e51b81526004016106b990611e22565b80600254106108715760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106b9565b81600054146107a157600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b7f000000000000000000000000000000000000000000000000000000000000000034101561092c5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106b9565b60007f00000000000000000000000000000000000000000000000000000000000000006000544261095d9190611e59565b6109679190611e00565b610972906001611e59565b905060007f00000000000000000000000000000000000000000000000000000000000000006109c17f000000000000000000000000000000000000000000000000000000000000000042611e00565b6109cb9190611e59565b905060008183106109dc57816109de565b825b905080851115610a245760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b60448201526064016106b9565b600060017f000000000000000000000000000000000000000000000000000000000000000060015442610a579190611e6c565b610a619190611e00565b610a6b9190611e6c565b905060007f0000000000000000000000000000000000000000000000000000000000000000610aba7f000000000000000000000000000000000000000000000000000000000000000042611e00565b610ac49190611e6c565b90506000818311610ad55781610ad7565b815b905080881015610b1d5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b60448201526064016106b9565b86610b5b5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106b9565b6000888152600660205260409020600101546001600160a01b031615610bb95760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106b9565b6040805160808101825288815233602080830191825263ffffffff4281168486019081526000606086018181528f82526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610c4e57610c4e611d6f565b0217905550506040518881523391507f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a9060200160405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115610cff576000610cde7f000000000000000000000000000000000000000000000000000000000000000034611e6c565b604051909150339082156108fc029083906000818181858888f15050505050505b5050505050505050565b6040845110610d4c5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106b9565b6000838383604051602001610d6393929190611eaf565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610de5576000868281518110610da657610da6611ef1565b6020026020010151905082811115610dcc57826000528060205260406000209250610ddc565b8060005282602052604060002092505b50600101610d89565b508060045414610e285760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106b9565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610e9f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106b9565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610ecd908890611f07565b6000604051808303816000865af19150503d8060008114610f0a576040519150601f19603f3d011682016040523d82523d6000602084013e610f0f565b606091505b5050905080610f605760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106b9565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f00000000000000000000000000000000000000000000000000000000000000004281610ffc57610ffc611dd4565b041161103c5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106b9565b60008082815260066020526040902060010154600160c01b900460ff16600281111561106a5761106a611d6f565b146110a95760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106b9565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b031680156107a1576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006111517f000000000000000000000000000000000000000000000000000000000000000083611e00565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff16600281111561118657611186611d6f565b146111c95760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b60448201526064016106b9565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b03918216911615611290576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161132c5761132c611dd4565b04111561136e5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106b9565b600081815260066020526040902060010154600160a01b900463ffffffff16806113cb5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106b9565b6000828152600760205260409020546001600160a01b0316156114275760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106b9565b7f0000000000000000000000000000000000000000000000000000000000000000600154600054600261145a9190611f1a565b6114649190611e59565b61146e9190611e59565b6114788242611e6c565b10156114ec5760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e00000000000000000060648201526084016106b9565b6005548211156115485760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79061153f9084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146115c05760405162461bcd60e51b81526004016106b990611e22565b80600354106116085760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106b9565b81600154146107a157600182905560038190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020016108b0565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161169f5761169f611dd4565b0411156116e15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106b9565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146117345760405162461bcd60e51b81526004016106b990611e22565b6005548211801561174457508015155b1561178757600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b6000828152600660205260409020548015611809578181036117c95750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b031615611809576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b0316156118735760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106b9565b6000818152600660205260409020600101546001600160a01b03166118d05760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b60448201526064016106b9565b7f00000000000000000000000000000000000000000000000000000000000000003410156119405760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106b9565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7906119949084815260200190565b60405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115611a115760006119f07f000000000000000000000000000000000000000000000000000000000000000034611e6c565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b6002600082815260066020526040902060010154600160c01b900460ff166002811115611a4357611a43611d6f565b14611a905760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e00000000000000000060448201526064016106b9565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600060208284031215611b6f57600080fd5b5035919050565b60008060408385031215611b8957600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611bd757611bd7611b98565b604052919050565b803567ffffffffffffffff81168114611bf757600080fd5b919050565b80356001600160a01b0381168114611bf757600080fd5b600082601f830112611c2457600080fd5b813567ffffffffffffffff811115611c3e57611c3e611b98565b611c51601f8201601f1916602001611bae565b818152846020838601011115611c6657600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611c9957600080fd5b843567ffffffffffffffff80821115611cb157600080fd5b818701915087601f830112611cc557600080fd5b8135602082821115611cd957611cd9611b98565b8160051b611ce8828201611bae565b928352848101820192828101908c851115611d0257600080fd5b958301955b84871015611d2057863582529583019590830190611d07565b9950611d30915050898201611bdf565b96505050611d4060408801611bfc565b93506060870135915080821115611d5657600080fd5b50611d6387828801611c13565b91505092959194509250565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611dc557634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611e1d57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b8082018082111561115157611151611dea565b8181038181111561115157611151611dea565b6000815160005b81811015611ea05760208185018101518683015201611e86565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611ee8601c830184611e7f565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611f138284611e7f565b9392505050565b808202811582820484141761115157611151611dea56fea2646970667358221220b3a0ad6e5b33584be6c506b8e5587809023ef0fb13c2f526379a2268554b5d3e64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101c25760003560e01c8063710cc9a7116100f7578063b044397e11610095578063e813a75511610064578063e813a7551461058b578063eb8dedfa146105a1578063f3f480d9146105d5578063f4cf751b1461060957600080fd5b8063b044397e146104d9578063b5b7a1841461050d578063d0e30db014610541578063d6e01b391461057557600080fd5b806390df63b7116100d157806390df63b71461041c5780639588eca214610449578063a888c2cd1461045f578063ab82d9a0146104c657600080fd5b8063710cc9a7146103c65780637ffc2a6e146103e65780638caeb7a8146103fc57600080fd5b806331ddf743116101645780634a439cfe1161013e5780634a439cfe1461031857806350b81dbe1461033857806364962849146103585780636b45ebcb1461037857600080fd5b806331ddf743146102a45780633968ae00146102c45780634518f79f146102f857600080fd5b8063222ae786116101a0578063222ae7861461024657806327ee6bdd1461025b5780632c1925191461027157806331d144571461029157600080fd5b8063042c4aaf146101c75780630e56752e1461020e578063114095d314610224575b600080fd5b3480156101d357600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561021a57600080fd5b506101fb60015481565b34801561023057600080fd5b5061024461023f366004611b5d565b610629565b005b34801561025257600080fd5b506101fb6107a5565b34801561026757600080fd5b506101fb60055481565b34801561027d57600080fd5b5061024461028c366004611b76565b6107d6565b61024461029f366004611b76565b6108bc565b3480156102b057600080fd5b506102446102bf366004611c83565b610d09565b3480156102d057600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561030457600080fd5b50610244610313366004611b5d565b610fa8565b34801561032457600080fd5b506101fb610333366004611b5d565b611125565b34801561034457600080fd5b50610244610353366004611b5d565b611157565b34801561036457600080fd5b50610244610373366004611b5d565b6112d8565b34801561038457600080fd5b506103ae610393366004611b5d565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610205565b3480156103d257600080fd5b506102446103e1366004611b76565b61156d565b3480156103f257600080fd5b506101fb60025481565b34801561040857600080fd5b50610244610417366004611b76565b61164b565b34801561042857600080fd5b506101fb610437366004611b5d565b60086020526000908152604090205481565b34801561045557600080fd5b506101fb60045481565b34801561046b57600080fd5b506104b661047a366004611b5d565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516102059493929190611d85565b6102446104d4366004611b5d565b61180e565b3480156104e557600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561051957600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054d57600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561058157600080fd5b506101fb60035481565b34801561059757600080fd5b506101fb60005481565b3480156105ad57600080fd5b506103ae7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e157600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561061557600080fd5b50610244610624366004611b5d565b611a14565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161067d5761067d611dd4565b04116106c25760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff1660028111156106f0576106f0611d6f565b1461072f5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106b9565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b031680156107a1576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006107d17f000000000000000000000000000000000000000000000000000000000000000042611e00565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146108295760405162461bcd60e51b81526004016106b990611e22565b80600254106108715760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106b9565b81600054146107a157600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b7f000000000000000000000000000000000000000000000000000000000000000034101561092c5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106b9565b60007f00000000000000000000000000000000000000000000000000000000000000006000544261095d9190611e59565b6109679190611e00565b610972906001611e59565b905060007f00000000000000000000000000000000000000000000000000000000000000006109c17f000000000000000000000000000000000000000000000000000000000000000042611e00565b6109cb9190611e59565b905060008183106109dc57816109de565b825b905080851115610a245760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b60448201526064016106b9565b600060017f000000000000000000000000000000000000000000000000000000000000000060015442610a579190611e6c565b610a619190611e00565b610a6b9190611e6c565b905060007f0000000000000000000000000000000000000000000000000000000000000000610aba7f000000000000000000000000000000000000000000000000000000000000000042611e00565b610ac49190611e6c565b90506000818311610ad55781610ad7565b815b905080881015610b1d5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b60448201526064016106b9565b86610b5b5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106b9565b6000888152600660205260409020600101546001600160a01b031615610bb95760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106b9565b6040805160808101825288815233602080830191825263ffffffff4281168486019081526000606086018181528f82526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610c4e57610c4e611d6f565b0217905550506040518881523391507f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a9060200160405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115610cff576000610cde7f000000000000000000000000000000000000000000000000000000000000000034611e6c565b604051909150339082156108fc029083906000818181858888f15050505050505b5050505050505050565b6040845110610d4c5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106b9565b6000838383604051602001610d6393929190611eaf565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610de5576000868281518110610da657610da6611ef1565b6020026020010151905082811115610dcc57826000528060205260406000209250610ddc565b8060005282602052604060002092505b50600101610d89565b508060045414610e285760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106b9565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610e9f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106b9565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610ecd908890611f07565b6000604051808303816000865af19150503d8060008114610f0a576040519150601f19603f3d011682016040523d82523d6000602084013e610f0f565b606091505b5050905080610f605760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106b9565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f00000000000000000000000000000000000000000000000000000000000000004281610ffc57610ffc611dd4565b041161103c5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106b9565b60008082815260066020526040902060010154600160c01b900460ff16600281111561106a5761106a611d6f565b146110a95760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106b9565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b031680156107a1576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006111517f000000000000000000000000000000000000000000000000000000000000000083611e00565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff16600281111561118657611186611d6f565b146111c95760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b60448201526064016106b9565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b03918216911615611290576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161132c5761132c611dd4565b04111561136e5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106b9565b600081815260066020526040902060010154600160a01b900463ffffffff16806113cb5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106b9565b6000828152600760205260409020546001600160a01b0316156114275760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106b9565b7f0000000000000000000000000000000000000000000000000000000000000000600154600054600261145a9190611f1a565b6114649190611e59565b61146e9190611e59565b6114788242611e6c565b10156114ec5760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e00000000000000000060648201526084016106b9565b6005548211156115485760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79061153f9084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146115c05760405162461bcd60e51b81526004016106b990611e22565b80600354106116085760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106b9565b81600154146107a157600182905560038190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020016108b0565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161169f5761169f611dd4565b0411156116e15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106b9565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146117345760405162461bcd60e51b81526004016106b990611e22565b6005548211801561174457508015155b1561178757600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b6000828152600660205260409020548015611809578181036117c95750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b031615611809576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b0316156118735760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106b9565b6000818152600660205260409020600101546001600160a01b03166118d05760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b60448201526064016106b9565b7f00000000000000000000000000000000000000000000000000000000000000003410156119405760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106b9565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7906119949084815260200190565b60405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115611a115760006119f07f000000000000000000000000000000000000000000000000000000000000000034611e6c565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b6002600082815260066020526040902060010154600160c01b900460ff166002811115611a4357611a43611d6f565b14611a905760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e00000000000000000060448201526064016106b9565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600060208284031215611b6f57600080fd5b5035919050565b60008060408385031215611b8957600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611bd757611bd7611b98565b604052919050565b803567ffffffffffffffff81168114611bf757600080fd5b919050565b80356001600160a01b0381168114611bf757600080fd5b600082601f830112611c2457600080fd5b813567ffffffffffffffff811115611c3e57611c3e611b98565b611c51601f8201601f1916602001611bae565b818152846020838601011115611c6657600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611c9957600080fd5b843567ffffffffffffffff80821115611cb157600080fd5b818701915087601f830112611cc557600080fd5b8135602082821115611cd957611cd9611b98565b8160051b611ce8828201611bae565b928352848101820192828101908c851115611d0257600080fd5b958301955b84871015611d2057863582529583019590830190611d07565b9950611d30915050898201611bdf565b96505050611d4060408801611bfc565b93506060870135915080821115611d5657600080fd5b50611d6387828801611c13565b91505092959194509250565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611dc557634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611e1d57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b8082018082111561115157611151611dea565b8181038181111561115157611151611dea565b6000815160005b81811015611ea05760208185018101518683015201611e86565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611ee8601c830184611e7f565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611f138284611e7f565b9392505050565b808202811582820484141761115157611151611dea56fea2646970667358221220b3a0ad6e5b33584be6c506b8e5587809023ef0fb13c2f526379a2268554b5d3e64736f6c63430008120033", + "numDeployments": 3, + "solcInputHash": "6b0b750c6eee9aa0a5e450d1f0bbb2d2", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerFutureLimit\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"challengers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claims\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"enum VeaOutboxGnosisToArb.Party\",\"name\":\"honest\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampFutureUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Gnosis to Arbitrum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"challenge(uint256)\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_routerGnosisToArb\":\"The address of the router on Ethereum that routes from Arbitrum to Ethereum.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_sequencerFutureLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded with header from VeaInbox.\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"updateSequencerFutureLimit(uint256,uint256)\":{\"details\":\"Set the sequencerFutureLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerFutureLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256)\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32)\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":\"VeaOutboxGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/AddressAliasHelper.sol\":{\"content\":\"// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/libraries/AddressAliasHelper.sol\\n// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressAliasHelper {\\n uint160 internal 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\",\"keccak256\":\"0xfa8b6907a33c37e13b3de6e2459d6bd153708be4b8413db3c319ea3a5d8c9b00\",\"license\":\"BUSL-1.1\"},\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/AddressAliasHelper.sol\\\";\\n\\n/// @dev Vea Outbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaOutboxGnosisToArb is IVeaOutboxOnL2 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public immutable routerGnosisToArb; // The address of the router from Gnosis to Arbitrum on Ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // address to send burned eth\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable challengePeriod; // Claim challenge timewindow.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n uint256 public timestampFutureUpdated; // The timestamp of the last sequencer future update.\\n\\n bytes32 public stateRoot;\\n uint256 public latestVerifiedEpoch;\\n\\n mapping(uint256 => Claim) public claims; // epoch => claim\\n mapping(uint256 => address) public challengers; // epoch => challenger\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n enum Party {\\n None,\\n Claimer,\\n Challenger\\n }\\n\\n struct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestamp;\\n Party honest;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod <= latestVerifiedEpoch + timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod > latestVerifiedEpoch + timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit\\n ) {\\n deposit = _deposit;\\n epochPeriod = _epochPeriod;\\n challengePeriod = _challengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n routerGnosisToArb = _routerGnosisToArb;\\n sequencerDelayLimit = _sequencerDelayLimit;\\n sequencerFutureLimit = _sequencerFutureLimit;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerFutureLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerFutureLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampFutureUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerFutureLimit != _newSequencerFutureLimit) {\\n sequencerFutureLimit = _newSequencerFutureLimit;\\n timestampFutureUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Set the sequencerDelayLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch is invalid.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n function challenge(uint256 _epoch) external payable virtual {\\n require(challengers[_epoch] == address(0), \\\"Claim already challenged.\\\");\\n require(claims[_epoch].claimer != address(0), \\\"No claim for epoch.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n\\n challengers[_epoch] = msg.sender;\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) external virtual OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external virtual OnlyBridgeRunning {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n bytes32 claimedStateRoot = claims[_epoch].stateRoot;\\n\\n if (claimedStateRoot != bytes32(0)) {\\n if (claimedStateRoot == _stateRoot) {\\n claims[_epoch].honest = Party.Claimer;\\n } else if (challengers[_epoch] != address(0)) {\\n claims[_epoch].honest = Party.Challenger;\\n }\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded with header from VeaInbox.\\n function sendMessage(bytes32[] memory _proof, uint64 _msgId, address _to, bytes memory _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) external virtual {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n function withdrawChallengeDeposit(uint256 _epoch) external {\\n require(claims[_epoch].honest == Party.Challenger, \\\"Challenge unsuccessful.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete claims[_epoch];\\n delete challengers[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (claimer != address(0)) {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawChallengerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete challengers[_epoch];\\n\\n if (challenger != address(0)) {\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x999ccae7dfc58d5c0e51726634e049b48ebc00dfeb2541f99d818f89a82a169b\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101606040523480156200001257600080fd5b5060405162002010380380620020108339810160408190526200003591620000c1565b60a08790526101008690526101208590526101408490526001600160a01b038316608052600082905560018190556200007060028862000147565b60c0819052620000828860026200016a565b6200008e91906200018a565b60e05261010051600190620000a4904262000147565b620000b091906200018a565b60055550620001a095505050505050565b600080600080600080600060e0888a031215620000dd57600080fd5b8751602089015160408a015160608b015160808c0151939a50919850965094506001600160a01b03811681146200011357600080fd5b8093505060a0880151915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200016557634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000184576200018462000131565b92915050565b8181038181111562000184576200018462000131565b60805160a05160c05160e051610100516101205161014051611d5f620002b16000396000818161045d0152818161059d01528181610da2015281816110d201526114450152600081816105590152611221015260008181610491015281816105c20152818161071e015281816108a501528181610dc701528181610f24015281816110f7015261146a01526000818161104d015261191a01526000818161100c01526118d90152600081816104c5015281816106de0152818161083001528181610a8b01528181610ab801528181610ee501528181611098015281816116ca0152818161179601526117c3015260008181610525015281816107530152818161137001526114e40152611d5f6000f3fe60806040526004361061019c5760003560e01c80637ffc2a6e116100ec578063b5b7a1841161008a578063e813a75511610064578063e813a755146104fd578063eb8dedfa14610513578063f3f480d914610547578063f4cf751b1461057b57600080fd5b8063b5b7a1841461047f578063d0e30db0146104b3578063d6e01b39146104e757600080fd5b80639588eca2116100c65780639588eca2146103bb578063a888c2cd146103d1578063ab82d9a014610438578063b044397e1461044b57600080fd5b80637ffc2a6e146103585780638caeb7a81461036e57806390df63b71461038e57600080fd5b806331ddf7431161015957806350b81dbe1161013357806350b81dbe146102aa57806364962849146102ca5780636b45ebcb146102ea578063710cc9a71461033857600080fd5b806331ddf7431461024a5780634518f79f1461026a5780634a439cfe1461028a57600080fd5b80630e56752e146101a1578063114095d3146101ca578063222ae786146101ec57806327ee6bdd146102015780632c1925191461021757806331d1445714610237575b600080fd5b3480156101ad57600080fd5b506101b760015481565b6040519081526020015b60405180910390f35b3480156101d657600080fd5b506101ea6101e5366004611955565b61059b565b005b3480156101f857600080fd5b506101b7610717565b34801561020d57600080fd5b506101b760055481565b34801561022357600080fd5b506101ea61023236600461196e565b610748565b6101ea61024536600461196e565b61082e565b34801561025657600080fd5b506101ea610265366004611a7b565b610b01565b34801561027657600080fd5b506101ea610285366004611955565b610da0565b34801561029657600080fd5b506101b76102a5366004611955565b610f1d565b3480156102b657600080fd5b506101ea6102c5366004611955565b610f4f565b3480156102d657600080fd5b506101ea6102e5366004611955565b6110d0565b3480156102f657600080fd5b50610320610305366004611955565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101c1565b34801561034457600080fd5b506101ea61035336600461196e565b611365565b34801561036457600080fd5b506101b760025481565b34801561037a57600080fd5b506101ea61038936600461196e565b611443565b34801561039a57600080fd5b506101b76103a9366004611955565b60086020526000908152604090205481565b3480156103c757600080fd5b506101b760045481565b3480156103dd57600080fd5b506104286103ec366004611955565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516101c19493929190611b7d565b6101ea610446366004611955565b611606565b34801561045757600080fd5b506101b77f000000000000000000000000000000000000000000000000000000000000000081565b34801561048b57600080fd5b506101b77f000000000000000000000000000000000000000000000000000000000000000081565b3480156104bf57600080fd5b506101b77f000000000000000000000000000000000000000000000000000000000000000081565b3480156104f357600080fd5b506101b760035481565b34801561050957600080fd5b506101b760005481565b34801561051f57600080fd5b506103207f000000000000000000000000000000000000000000000000000000000000000081565b34801561055357600080fd5b506101b77f000000000000000000000000000000000000000000000000000000000000000081565b34801561058757600080fd5b506101ea610596366004611955565b61180c565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f000000000000000000000000000000000000000000000000000000000000000042816105ef576105ef611bcc565b04116106345760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff16600281111561066257610662611b67565b146106a15760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161062b565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b03168015610713576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006107437f000000000000000000000000000000000000000000000000000000000000000042611bf8565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461079b5760405162461bcd60e51b815260040161062b90611c1a565b80600254106107e35760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161062b565b816000541461071357600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b7f000000000000000000000000000000000000000000000000000000000000000034101561089e5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e0000000000604482015260640161062b565b60016108ca7f000000000000000000000000000000000000000000000000000000000000000042611bf8565b6108d49190611c51565b82146109165760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b604482015260640161062b565b806109545760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161062b565b6000828152600660205260409020600101546001600160a01b0316156109b25760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161062b565b6040805160808101825282815233602080830191825263ffffffff4281168486019081526000606086018181528982526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610a4757610a47611b67565b02179055505060408051848152602081018490523392507fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115610713576000610add7f000000000000000000000000000000000000000000000000000000000000000034611c51565b604051909150339082156108fc029083906000818181858888f15050505050505050565b6040845110610b445760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161062b565b6000838383604051602001610b5b93929190611c94565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610bdd576000868281518110610b9e57610b9e611cd6565b6020026020010151905082811115610bc457826000528060205260406000209250610bd4565b8060005282602052604060002092505b50600101610b81565b508060045414610c205760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161062b565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610c975760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161062b565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610cc5908890611cec565b6000604051808303816000865af19150503d8060008114610d02576040519150601f19603f3d011682016040523d82523d6000602084013e610d07565b606091505b5050905080610d585760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161062b565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f00000000000000000000000000000000000000000000000000000000000000004281610df457610df4611bcc565b0411610e345760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161062b565b60008082815260066020526040902060010154600160c01b900460ff166002811115610e6257610e62611b67565b14610ea15760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161062b565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b03168015610713576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6000610f497f000000000000000000000000000000000000000000000000000000000000000083611bf8565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff166002811115610f7e57610f7e611b67565b14610fc15760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b604482015260640161062b565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b03918216911615611088576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161112457611124611bcc565b0411156111665760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161062b565b600081815260066020526040902060010154600160a01b900463ffffffff16806111c35760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161062b565b6000828152600760205260409020546001600160a01b03161561121f5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161062b565b7f000000000000000000000000000000000000000000000000000000000000000060015460005460026112529190611cff565b61125c9190611d16565b6112669190611d16565b6112708242611c51565b10156112e45760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e000000000000000000606482015260840161062b565b6005548211156113405760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f7906113379084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146113b85760405162461bcd60e51b815260040161062b90611c1a565b80600354106114005760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161062b565b816001541461071357600182905560038190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa70790602001610822565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161149757611497611bcc565b0411156114d95760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161062b565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461152c5760405162461bcd60e51b815260040161062b90611c1a565b6005548211801561153c57508015155b1561157f57600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b6000828152600660205260409020548015611601578181036115c15750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b031615611601576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b03161561166b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161062b565b6000818152600660205260409020600101546001600160a01b03166116c85760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b604482015260640161062b565b7f00000000000000000000000000000000000000000000000000000000000000003410156117385760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e00604482015260640161062b565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d79061178c9084815260200190565b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156118095760006117e87f000000000000000000000000000000000000000000000000000000000000000034611c51565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b6002600082815260066020526040902060010154600160c01b900460ff16600281111561183b5761183b611b67565b146118885760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e000000000000000000604482015260640161062b565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b60006020828403121561196757600080fd5b5035919050565b6000806040838503121561198157600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156119cf576119cf611990565b604052919050565b803567ffffffffffffffff811681146119ef57600080fd5b919050565b80356001600160a01b03811681146119ef57600080fd5b600082601f830112611a1c57600080fd5b813567ffffffffffffffff811115611a3657611a36611990565b611a49601f8201601f19166020016119a6565b818152846020838601011115611a5e57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611a9157600080fd5b843567ffffffffffffffff80821115611aa957600080fd5b818701915087601f830112611abd57600080fd5b8135602082821115611ad157611ad1611990565b8160051b611ae08282016119a6565b928352848101820192828101908c851115611afa57600080fd5b958301955b84871015611b1857863582529583019590830190611aff565b9950611b289150508982016119d7565b96505050611b38604088016119f4565b93506060870135915080821115611b4e57600080fd5b50611b5b87828801611a0b565b91505092959194509250565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611bbd57634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611c1557634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b81810381811115610f4957610f49611be2565b6000815160005b81811015611c855760208185018101518683015201611c6b565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611ccd601c830184611c64565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611cf88284611c64565b9392505050565b8082028115828204841417610f4957610f49611be2565b80820180821115610f4957610f49611be256fea264697066735822122039fffbfa0ff1f969a1c91abf7f0c19828e05fda7df5768914b1c5e812ad01eff64736f6c63430008120033", + "deployedBytecode": "0x60806040526004361061019c5760003560e01c80637ffc2a6e116100ec578063b5b7a1841161008a578063e813a75511610064578063e813a755146104fd578063eb8dedfa14610513578063f3f480d914610547578063f4cf751b1461057b57600080fd5b8063b5b7a1841461047f578063d0e30db0146104b3578063d6e01b39146104e757600080fd5b80639588eca2116100c65780639588eca2146103bb578063a888c2cd146103d1578063ab82d9a014610438578063b044397e1461044b57600080fd5b80637ffc2a6e146103585780638caeb7a81461036e57806390df63b71461038e57600080fd5b806331ddf7431161015957806350b81dbe1161013357806350b81dbe146102aa57806364962849146102ca5780636b45ebcb146102ea578063710cc9a71461033857600080fd5b806331ddf7431461024a5780634518f79f1461026a5780634a439cfe1461028a57600080fd5b80630e56752e146101a1578063114095d3146101ca578063222ae786146101ec57806327ee6bdd146102015780632c1925191461021757806331d1445714610237575b600080fd5b3480156101ad57600080fd5b506101b760015481565b6040519081526020015b60405180910390f35b3480156101d657600080fd5b506101ea6101e5366004611955565b61059b565b005b3480156101f857600080fd5b506101b7610717565b34801561020d57600080fd5b506101b760055481565b34801561022357600080fd5b506101ea61023236600461196e565b610748565b6101ea61024536600461196e565b61082e565b34801561025657600080fd5b506101ea610265366004611a7b565b610b01565b34801561027657600080fd5b506101ea610285366004611955565b610da0565b34801561029657600080fd5b506101b76102a5366004611955565b610f1d565b3480156102b657600080fd5b506101ea6102c5366004611955565b610f4f565b3480156102d657600080fd5b506101ea6102e5366004611955565b6110d0565b3480156102f657600080fd5b50610320610305366004611955565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101c1565b34801561034457600080fd5b506101ea61035336600461196e565b611365565b34801561036457600080fd5b506101b760025481565b34801561037a57600080fd5b506101ea61038936600461196e565b611443565b34801561039a57600080fd5b506101b76103a9366004611955565b60086020526000908152604090205481565b3480156103c757600080fd5b506101b760045481565b3480156103dd57600080fd5b506104286103ec366004611955565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516101c19493929190611b7d565b6101ea610446366004611955565b611606565b34801561045757600080fd5b506101b77f000000000000000000000000000000000000000000000000000000000000000081565b34801561048b57600080fd5b506101b77f000000000000000000000000000000000000000000000000000000000000000081565b3480156104bf57600080fd5b506101b77f000000000000000000000000000000000000000000000000000000000000000081565b3480156104f357600080fd5b506101b760035481565b34801561050957600080fd5b506101b760005481565b34801561051f57600080fd5b506103207f000000000000000000000000000000000000000000000000000000000000000081565b34801561055357600080fd5b506101b77f000000000000000000000000000000000000000000000000000000000000000081565b34801561058757600080fd5b506101ea610596366004611955565b61180c565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f000000000000000000000000000000000000000000000000000000000000000042816105ef576105ef611bcc565b04116106345760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff16600281111561066257610662611b67565b146106a15760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161062b565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b03168015610713576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006107437f000000000000000000000000000000000000000000000000000000000000000042611bf8565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461079b5760405162461bcd60e51b815260040161062b90611c1a565b80600254106107e35760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161062b565b816000541461071357600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b7f000000000000000000000000000000000000000000000000000000000000000034101561089e5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e0000000000604482015260640161062b565b60016108ca7f000000000000000000000000000000000000000000000000000000000000000042611bf8565b6108d49190611c51565b82146109165760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b604482015260640161062b565b806109545760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161062b565b6000828152600660205260409020600101546001600160a01b0316156109b25760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161062b565b6040805160808101825282815233602080830191825263ffffffff4281168486019081526000606086018181528982526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610a4757610a47611b67565b02179055505060408051848152602081018490523392507fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115610713576000610add7f000000000000000000000000000000000000000000000000000000000000000034611c51565b604051909150339082156108fc029083906000818181858888f15050505050505050565b6040845110610b445760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161062b565b6000838383604051602001610b5b93929190611c94565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610bdd576000868281518110610b9e57610b9e611cd6565b6020026020010151905082811115610bc457826000528060205260406000209250610bd4565b8060005282602052604060002092505b50600101610b81565b508060045414610c205760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161062b565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610c975760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161062b565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610cc5908890611cec565b6000604051808303816000865af19150503d8060008114610d02576040519150601f19603f3d011682016040523d82523d6000602084013e610d07565b606091505b5050905080610d585760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161062b565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f00000000000000000000000000000000000000000000000000000000000000004281610df457610df4611bcc565b0411610e345760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161062b565b60008082815260066020526040902060010154600160c01b900460ff166002811115610e6257610e62611b67565b14610ea15760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161062b565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b03168015610713576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6000610f497f000000000000000000000000000000000000000000000000000000000000000083611bf8565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff166002811115610f7e57610f7e611b67565b14610fc15760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b604482015260640161062b565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b03918216911615611088576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161112457611124611bcc565b0411156111665760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161062b565b600081815260066020526040902060010154600160a01b900463ffffffff16806111c35760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161062b565b6000828152600760205260409020546001600160a01b03161561121f5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161062b565b7f000000000000000000000000000000000000000000000000000000000000000060015460005460026112529190611cff565b61125c9190611d16565b6112669190611d16565b6112708242611c51565b10156112e45760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e000000000000000000606482015260840161062b565b6005548211156113405760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f7906113379084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146113b85760405162461bcd60e51b815260040161062b90611c1a565b80600354106114005760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161062b565b816001541461071357600182905560038190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa70790602001610822565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161149757611497611bcc565b0411156114d95760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161062b565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461152c5760405162461bcd60e51b815260040161062b90611c1a565b6005548211801561153c57508015155b1561157f57600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b6000828152600660205260409020548015611601578181036115c15750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b031615611601576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b03161561166b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161062b565b6000818152600660205260409020600101546001600160a01b03166116c85760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b604482015260640161062b565b7f00000000000000000000000000000000000000000000000000000000000000003410156117385760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e00604482015260640161062b565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d79061178c9084815260200190565b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156118095760006117e87f000000000000000000000000000000000000000000000000000000000000000034611c51565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b6002600082815260066020526040902060010154600160c01b900460ff16600281111561183b5761183b611b67565b146118885760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e000000000000000000604482015260640161062b565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b60006020828403121561196757600080fd5b5035919050565b6000806040838503121561198157600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156119cf576119cf611990565b604052919050565b803567ffffffffffffffff811681146119ef57600080fd5b919050565b80356001600160a01b03811681146119ef57600080fd5b600082601f830112611a1c57600080fd5b813567ffffffffffffffff811115611a3657611a36611990565b611a49601f8201601f19166020016119a6565b818152846020838601011115611a5e57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611a9157600080fd5b843567ffffffffffffffff80821115611aa957600080fd5b818701915087601f830112611abd57600080fd5b8135602082821115611ad157611ad1611990565b8160051b611ae08282016119a6565b928352848101820192828101908c851115611afa57600080fd5b958301955b84871015611b1857863582529583019590830190611aff565b9950611b289150508982016119d7565b96505050611b38604088016119f4565b93506060870135915080821115611b4e57600080fd5b50611b5b87828801611a0b565b91505092959194509250565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611bbd57634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611c1557634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b81810381811115610f4957610f49611be2565b6000815160005b81811015611c855760208185018101518683015201611c6b565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611ccd601c830184611c64565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611cf88284611c64565b9392505050565b8082028115828204841417610f4957610f49611be2565b80820180821115610f4957610f49611be256fea264697066735822122039fffbfa0ff1f969a1c91abf7f0c19828e05fda7df5768914b1c5e812ad01eff64736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Gnosis to Arbitrum. Note: This contract is deployed on Arbitrum.", "events": { @@ -623,10 +591,11 @@ "_epoch": "The epoch associated with the challenged claim." } }, - "Claimed(address,bytes32)": { - "details": "Watcher check this event to challenge fraud.", + "Claimed(address,uint256,bytes32)": { + "details": "Watchers check this event to challenge fraud.", "params": { "_claimer": "The address of the claimer.", + "_epoch": "The epoch associated with the claim.", "_stateRoot": "The state root of the claim." } }, @@ -670,8 +639,6 @@ "_challengePeriod": "The duration of the period allowing to challenge a claim.", "_deposit": "The deposit amount to submit a claim in wei.", "_epochPeriod": "The duration of each epoch.", - "_maxClaimDelayEpochs": "The maximum number of epochs that can be claimed in the past.", - "_maxClaimFutureEpochs": "The maximum number of epochs that can be claimed in the future.", "_routerGnosisToArb": "The address of the router on Ethereum that routes from Arbitrum to Ethereum.", "_sequencerDelayLimit": "The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.", "_sequencerFutureLimit": "The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.", @@ -765,7 +732,7 @@ "storageLayout": { "storage": [ { - "astId": 8531, + "astId": 4180, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "sequencerDelayLimit", "offset": 0, @@ -773,7 +740,7 @@ "type": "t_uint256" }, { - "astId": 8533, + "astId": 4182, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "sequencerFutureLimit", "offset": 0, @@ -781,7 +748,7 @@ "type": "t_uint256" }, { - "astId": 8535, + "astId": 4184, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "timestampDelayUpdated", "offset": 0, @@ -789,7 +756,7 @@ "type": "t_uint256" }, { - "astId": 8537, + "astId": 4186, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "timestampFutureUpdated", "offset": 0, @@ -797,7 +764,7 @@ "type": "t_uint256" }, { - "astId": 8539, + "astId": 4188, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "stateRoot", "offset": 0, @@ -805,7 +772,7 @@ "type": "t_bytes32" }, { - "astId": 8541, + "astId": 4190, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "latestVerifiedEpoch", "offset": 0, @@ -813,15 +780,15 @@ "type": "t_uint256" }, { - "astId": 8546, + "astId": 4195, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "claims", "offset": 0, "slot": "6", - "type": "t_mapping(t_uint256,t_struct(Claim)8568_storage)" + "type": "t_mapping(t_uint256,t_struct(Claim)4217_storage)" }, { - "astId": 8550, + "astId": 4199, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "challengers", "offset": 0, @@ -829,7 +796,7 @@ "type": "t_mapping(t_uint256,t_address)" }, { - "astId": 8554, + "astId": 4203, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "relayed", "offset": 0, @@ -848,7 +815,7 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_enum(Party)8558": { + "t_enum(Party)4207": { "encoding": "inplace", "label": "enum VeaOutboxGnosisToArb.Party", "numberOfBytes": "1" @@ -867,19 +834,19 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_mapping(t_uint256,t_struct(Claim)8568_storage)": { + "t_mapping(t_uint256,t_struct(Claim)4217_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct VeaOutboxGnosisToArb.Claim)", "numberOfBytes": "32", - "value": "t_struct(Claim)8568_storage" + "value": "t_struct(Claim)4217_storage" }, - "t_struct(Claim)8568_storage": { + "t_struct(Claim)4217_storage": { "encoding": "inplace", "label": "struct VeaOutboxGnosisToArb.Claim", "members": [ { - "astId": 8560, + "astId": 4209, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "stateRoot", "offset": 0, @@ -887,7 +854,7 @@ "type": "t_bytes32" }, { - "astId": 8562, + "astId": 4211, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "claimer", "offset": 0, @@ -895,7 +862,7 @@ "type": "t_address" }, { - "astId": 8564, + "astId": 4213, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "timestamp", "offset": 20, @@ -903,12 +870,12 @@ "type": "t_uint32" }, { - "astId": 8567, + "astId": 4216, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "honest", "offset": 24, "slot": "1", - "type": "t_enum(Party)8558" + "type": "t_enum(Party)4207" } ], "numberOfBytes": "64" diff --git a/contracts/deployments/chiado/VeaInboxGnosisToArbDevnet.json b/contracts/deployments/chiado/VeaInboxGnosisToArbDevnet.json index 7dd57063..23947ff0 100644 --- a/contracts/deployments/chiado/VeaInboxGnosisToArbDevnet.json +++ b/contracts/deployments/chiado/VeaInboxGnosisToArbDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xe4AF4f1B42749d003C6d6eFdc05c11F33581E55B", + "address": "0xA3FefC6FeE3fc66B9d9a8BEE794736ab71a74c55", "abi": [ { "inputs": [ @@ -238,32 +238,32 @@ "type": "function" } ], - "transactionHash": "0x6882a6ee635b14f0e47e47b0024ea3efafe930ee561959ea0ceb12082cf91af2", + "transactionHash": "0x2eb2ee3596a9f80d632c42711d5844b35463557f2e8d28df75b841a7df637a1e", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xe4AF4f1B42749d003C6d6eFdc05c11F33581E55B", - "transactionIndex": 0, + "contractAddress": "0xA3FefC6FeE3fc66B9d9a8BEE794736ab71a74c55", + "transactionIndex": 1, "gasUsed": "613732", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x60d7801b598ec3559a88efe881f0693026a2cda6f3b1028e15ce3681192ccf12", - "transactionHash": "0x6882a6ee635b14f0e47e47b0024ea3efafe930ee561959ea0ceb12082cf91af2", + "blockHash": "0xe77fd5908172fb46dd58f981d8a6787c2e0437797aec4d52993952e5b32ce831", + "transactionHash": "0x2eb2ee3596a9f80d632c42711d5844b35463557f2e8d28df75b841a7df637a1e", "logs": [], - "blockNumber": 4696202, - "cumulativeGasUsed": "613732", + "blockNumber": 4697792, + "cumulativeGasUsed": "641632", "status": 1, "byzantium": true }, "args": [ 1800, - "0xcC196cC90bD30109E39400817e6ef63A1b744659", + "0x016170Ad327cE0dCa07b3bd7a7592013a7488FAc", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a" ], - "numDeployments": 1, - "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSnapshot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"ticketID\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Gnosis to Arbitrum. Note: This contract is deployed on the Gnosis.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)\"}},\"SnapshotSaved(uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerGnosisToArb\":\"The router on Ethereum that routes from Gnosis to Arbitrum.\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See merkle tree documentation for details how inbox manages state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":\"VeaInboxGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\n\\n/// @dev Vea Inbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on the Gnosis.\\ncontract VeaInboxGnosisToArb is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between stateroot snapshots\\n address public immutable routerGnosisToArb; // The router on Ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerGnosisToArb The router on Ethereum that routes from Gnosis to Arbitrum.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n constructor(uint256 _epochPeriod, address _routerGnosisToArb, IAMB _amb) {\\n epochPeriod = _epochPeriod;\\n routerGnosisToArb = _routerGnosisToArb;\\n amb = _amb;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See merkle tree documentation for details how inbox manages state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // data for outbox relay\\n abi.encodePacked( // abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...) where _data is abi.encode(param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function sendSnapshot(\\n uint256 _epoch,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external virtual returns (bytes32 ticketID){\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(\\n IRouterToArb.route,\\n (_epoch, snapshots[_epoch], _inboxIndex, _maxSubmissionCost, _excessFeeRefundAddress, _gasLimit, _maxFeePerGas));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n ticketID = amb.requireToPassMessage(routerGnosisToArb, data, amb.maxGasPerTx());\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x7ca2295ffaafd0f34fbd778aa2144be9d3d5751e213f2a7398a286b8ab6cd71f\",\"license\":\"MIT\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60e060405234801561001057600080fd5b50604051610b0b380380610b0b83398101604081905261002f91610064565b60a0929092526001600160a01b0390811660c052166080526100a7565b6001600160a01b038116811461006157600080fd5b50565b60008060006060848603121561007957600080fd5b83519250602084015161008b8161004c565b604085015190925061009c8161004c565b809150509250925092565b60805160a05160c051610a1a6100f1600039600081816101a6015261031701526000818161014c015281816101cc015261043301526000818160cf01526102ee0152610a1a6000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80635f85896c116100665780635f85896c14610134578063b5b7a18414610147578063d6565a2d1461016e578063e5a1c3561461018e578063eb8dedfa146101a157600080fd5b806306661abd146100985780631062b39a146100ca5780632bbb470414610109578063519205351461012a575b600080fd5b6041546100ac9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c1565b61011c61011736600461071b565b6101c8565b6040519081526020016100c1565b61013261042e565b005b6100ac610142366004610782565b610548565b61011c7f000000000000000000000000000000000000000000000000000000000000000081565b61011c61017c366004610863565b60006020819052908152604090205481565b61011c61019c366004610863565b6106b4565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000042816101f9576101f961087c565b0487106102585760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b600087815260208190526040808220549051602481018a9052604481019190915260648101889052608481018790526001600160a01b03861660a482015260c4810185905260e481018490526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928692869263e5789d039260048083019391928290030181865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190610892565b6040518463ffffffff1660e01b81526004016103a4939291906108fb565b6020604051808303816000875af11580156103c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e79190610892565b9150877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828360405161041b91815260200190565b60405180910390a2509695505050505050565b6000807f000000000000000000000000000000000000000000000000000000000000000042816104605761046061087c565b604154919004925060009067ffffffffffffffff165b80156104af57806001166001036104a3576001826040811061049a5761049a61092f565b015492506104af565b6001918201911c610476565b60011c5b80156104f15760019182019181811690036104e9576104e6600183604081106104de576104de61092f565b0154846106cb565b92505b60011c6104b3565b505060008281526020818152604091829020839055604154915167ffffffffffffffff90921682527f8d762ebc760982a11d9a00cc7c1c4c91f9c1084b85633ee8ca462da42465f1d9910160405180910390a15050565b60415460009067ffffffffffffffff90811690811061059a5760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b604482015260640161024f565b604051600090829087906105b690889033908990602001610945565b60408051601f19818403018152908290526105d593929160200161097b565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b6001811660000361063957610621600183604081106104de576104de61092f565b92506001918201911c677fffffffffffffff16610600565b50816001826040811061064e5761064e61092f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906106a19084906109ca565b60405180910390a1509095945050505050565b600181604081106106c457600080fd5b0154905081565b6000818310156106e9578260005281602052604060002090506106f9565b8160005282602052604060002090505b92915050565b80356001600160a01b038116811461071657600080fd5b919050565b60008060008060008060c0878903121561073457600080fd5b863595506020870135945060408701359350610752606088016106ff565b92506080870135915060a087013590509295509295509295565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561079757600080fd5b6107a0846106ff565b925060208401356001600160e01b0319811681146107bd57600080fd5b9150604084013567ffffffffffffffff808211156107da57600080fd5b818601915086601f8301126107ee57600080fd5b8135818111156108005761080061076c565b604051601f8201601f19908116603f011681019083821181831017156108285761082861076c565b8160405282815289602084870101111561084157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561087557600080fd5b5035919050565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156108a457600080fd5b5051919050565b60005b838110156108c65781810151838201526020016108ae565b50506000910152565b600081518084526108e78160208601602086016108ab565b601f01601f19169290920160200192915050565b6001600160a01b038416815260606020820181905260009061091f908301856108cf565b9050826040830152949350505050565b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b841681528260048201526000825161096c8160248501602087016108ab565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bb81601c8501602087016108ab565b91909101601c01949350505050565b6020815260006109dd60208301846108cf565b939250505056fea26469706673582212207651e99ea048af4184e2ff2a5d067a5095a32f2014519a26a40caf2bf722f88d64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80635f85896c116100665780635f85896c14610134578063b5b7a18414610147578063d6565a2d1461016e578063e5a1c3561461018e578063eb8dedfa146101a157600080fd5b806306661abd146100985780631062b39a146100ca5780632bbb470414610109578063519205351461012a575b600080fd5b6041546100ac9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c1565b61011c61011736600461071b565b6101c8565b6040519081526020016100c1565b61013261042e565b005b6100ac610142366004610782565b610548565b61011c7f000000000000000000000000000000000000000000000000000000000000000081565b61011c61017c366004610863565b60006020819052908152604090205481565b61011c61019c366004610863565b6106b4565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000042816101f9576101f961087c565b0487106102585760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b600087815260208190526040808220549051602481018a9052604481019190915260648101889052608481018790526001600160a01b03861660a482015260c4810185905260e481018490526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928692869263e5789d039260048083019391928290030181865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190610892565b6040518463ffffffff1660e01b81526004016103a4939291906108fb565b6020604051808303816000875af11580156103c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e79190610892565b9150877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828360405161041b91815260200190565b60405180910390a2509695505050505050565b6000807f000000000000000000000000000000000000000000000000000000000000000042816104605761046061087c565b604154919004925060009067ffffffffffffffff165b80156104af57806001166001036104a3576001826040811061049a5761049a61092f565b015492506104af565b6001918201911c610476565b60011c5b80156104f15760019182019181811690036104e9576104e6600183604081106104de576104de61092f565b0154846106cb565b92505b60011c6104b3565b505060008281526020818152604091829020839055604154915167ffffffffffffffff90921682527f8d762ebc760982a11d9a00cc7c1c4c91f9c1084b85633ee8ca462da42465f1d9910160405180910390a15050565b60415460009067ffffffffffffffff90811690811061059a5760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b604482015260640161024f565b604051600090829087906105b690889033908990602001610945565b60408051601f19818403018152908290526105d593929160200161097b565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b6001811660000361063957610621600183604081106104de576104de61092f565b92506001918201911c677fffffffffffffff16610600565b50816001826040811061064e5761064e61092f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906106a19084906109ca565b60405180910390a1509095945050505050565b600181604081106106c457600080fd5b0154905081565b6000818310156106e9578260005281602052604060002090506106f9565b8160005282602052604060002090505b92915050565b80356001600160a01b038116811461071657600080fd5b919050565b60008060008060008060c0878903121561073457600080fd5b863595506020870135945060408701359350610752606088016106ff565b92506080870135915060a087013590509295509295509295565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561079757600080fd5b6107a0846106ff565b925060208401356001600160e01b0319811681146107bd57600080fd5b9150604084013567ffffffffffffffff808211156107da57600080fd5b818601915086601f8301126107ee57600080fd5b8135818111156108005761080061076c565b604051601f8201601f19908116603f011681019083821181831017156108285761082861076c565b8160405282815289602084870101111561084157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561087557600080fd5b5035919050565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156108a457600080fd5b5051919050565b60005b838110156108c65781810151838201526020016108ae565b50506000910152565b600081518084526108e78160208601602086016108ab565b601f01601f19169290920160200192915050565b6001600160a01b038416815260606020820181905260009061091f908301856108cf565b9050826040830152949350505050565b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b841681528260048201526000825161096c8160248501602087016108ab565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bb81601c8501602087016108ab565b91909101601c01949350505050565b6020815260006109dd60208301846108cf565b939250505056fea26469706673582212207651e99ea048af4184e2ff2a5d067a5095a32f2014519a26a40caf2bf722f88d64736f6c63430008120033", + "numDeployments": 3, + "solcInputHash": "916b5e2210e8e15d34b48798389f67fe", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSnapshot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"ticketID\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Gnosis to Arbitrum. Note: This contract is deployed on the Gnosis.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)\"}},\"SnapshotSaved(uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerGnosisToArb\":\"The router on Ethereum that routes from Gnosis to Arbitrum.\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See merkle tree documentation for details how inbox manages state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":\"VeaInboxGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\n\\n/// @dev Vea Inbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on the Gnosis.\\ncontract VeaInboxGnosisToArb is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between stateroot snapshots\\n address public immutable routerGnosisToArb; // The router on Ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerGnosisToArb The router on Ethereum that routes from Gnosis to Arbitrum.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n constructor(uint256 _epochPeriod, address _routerGnosisToArb, IAMB _amb) {\\n epochPeriod = _epochPeriod;\\n routerGnosisToArb = _routerGnosisToArb;\\n amb = _amb;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See merkle tree documentation for details how inbox manages state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // data for outbox relay\\n abi.encodePacked( // abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...) where _data is abi.encode(param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function sendSnapshot(\\n uint256 _epoch,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external virtual returns (bytes32 ticketID) {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(\\n IRouterToArb.route,\\n (\\n _epoch,\\n snapshots[_epoch],\\n _inboxIndex,\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n _gasLimit,\\n _maxFeePerGas\\n )\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n ticketID = amb.requireToPassMessage(routerGnosisToArb, data, amb.maxGasPerTx());\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x0125442dc06bc061fc1c6a3719018904fcc92db68696f93ea4bf770a4da66b15\",\"license\":\"MIT\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60e060405234801561001057600080fd5b50604051610b0b380380610b0b83398101604081905261002f91610064565b60a0929092526001600160a01b0390811660c052166080526100a7565b6001600160a01b038116811461006157600080fd5b50565b60008060006060848603121561007957600080fd5b83519250602084015161008b8161004c565b604085015190925061009c8161004c565b809150509250925092565b60805160a05160c051610a1a6100f1600039600081816101a6015261031701526000818161014c015281816101cc015261043301526000818160cf01526102ee0152610a1a6000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80635f85896c116100665780635f85896c14610134578063b5b7a18414610147578063d6565a2d1461016e578063e5a1c3561461018e578063eb8dedfa146101a157600080fd5b806306661abd146100985780631062b39a146100ca5780632bbb470414610109578063519205351461012a575b600080fd5b6041546100ac9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c1565b61011c61011736600461071b565b6101c8565b6040519081526020016100c1565b61013261042e565b005b6100ac610142366004610782565b610548565b61011c7f000000000000000000000000000000000000000000000000000000000000000081565b61011c61017c366004610863565b60006020819052908152604090205481565b61011c61019c366004610863565b6106b4565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000042816101f9576101f961087c565b0487106102585760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b600087815260208190526040808220549051602481018a9052604481019190915260648101889052608481018790526001600160a01b03861660a482015260c4810185905260e481018490526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928692869263e5789d039260048083019391928290030181865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190610892565b6040518463ffffffff1660e01b81526004016103a4939291906108fb565b6020604051808303816000875af11580156103c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e79190610892565b9150877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828360405161041b91815260200190565b60405180910390a2509695505050505050565b6000807f000000000000000000000000000000000000000000000000000000000000000042816104605761046061087c565b604154919004925060009067ffffffffffffffff165b80156104af57806001166001036104a3576001826040811061049a5761049a61092f565b015492506104af565b6001918201911c610476565b60011c5b80156104f15760019182019181811690036104e9576104e6600183604081106104de576104de61092f565b0154846106cb565b92505b60011c6104b3565b505060008281526020818152604091829020839055604154915167ffffffffffffffff90921682527f8d762ebc760982a11d9a00cc7c1c4c91f9c1084b85633ee8ca462da42465f1d9910160405180910390a15050565b60415460009067ffffffffffffffff90811690811061059a5760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b604482015260640161024f565b604051600090829087906105b690889033908990602001610945565b60408051601f19818403018152908290526105d593929160200161097b565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b6001811660000361063957610621600183604081106104de576104de61092f565b92506001918201911c677fffffffffffffff16610600565b50816001826040811061064e5761064e61092f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906106a19084906109ca565b60405180910390a1509095945050505050565b600181604081106106c457600080fd5b0154905081565b6000818310156106e9578260005281602052604060002090506106f9565b8160005282602052604060002090505b92915050565b80356001600160a01b038116811461071657600080fd5b919050565b60008060008060008060c0878903121561073457600080fd5b863595506020870135945060408701359350610752606088016106ff565b92506080870135915060a087013590509295509295509295565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561079757600080fd5b6107a0846106ff565b925060208401356001600160e01b0319811681146107bd57600080fd5b9150604084013567ffffffffffffffff808211156107da57600080fd5b818601915086601f8301126107ee57600080fd5b8135818111156108005761080061076c565b604051601f8201601f19908116603f011681019083821181831017156108285761082861076c565b8160405282815289602084870101111561084157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561087557600080fd5b5035919050565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156108a457600080fd5b5051919050565b60005b838110156108c65781810151838201526020016108ae565b50506000910152565b600081518084526108e78160208601602086016108ab565b601f01601f19169290920160200192915050565b6001600160a01b038416815260606020820181905260009061091f908301856108cf565b9050826040830152949350505050565b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b841681528260048201526000825161096c8160248501602087016108ab565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bb81601c8501602087016108ab565b91909101601c01949350505050565b6020815260006109dd60208301846108cf565b939250505056fea2646970667358221220f154e7c06a230a8584c6b8ca63e2df548a849b848ce8e10ae47300e98e2f281164736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80635f85896c116100665780635f85896c14610134578063b5b7a18414610147578063d6565a2d1461016e578063e5a1c3561461018e578063eb8dedfa146101a157600080fd5b806306661abd146100985780631062b39a146100ca5780632bbb470414610109578063519205351461012a575b600080fd5b6041546100ac9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c1565b61011c61011736600461071b565b6101c8565b6040519081526020016100c1565b61013261042e565b005b6100ac610142366004610782565b610548565b61011c7f000000000000000000000000000000000000000000000000000000000000000081565b61011c61017c366004610863565b60006020819052908152604090205481565b61011c61019c366004610863565b6106b4565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000042816101f9576101f961087c565b0487106102585760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b600087815260208190526040808220549051602481018a9052604481019190915260648101889052608481018790526001600160a01b03861660a482015260c4810185905260e481018490526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928692869263e5789d039260048083019391928290030181865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190610892565b6040518463ffffffff1660e01b81526004016103a4939291906108fb565b6020604051808303816000875af11580156103c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e79190610892565b9150877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828360405161041b91815260200190565b60405180910390a2509695505050505050565b6000807f000000000000000000000000000000000000000000000000000000000000000042816104605761046061087c565b604154919004925060009067ffffffffffffffff165b80156104af57806001166001036104a3576001826040811061049a5761049a61092f565b015492506104af565b6001918201911c610476565b60011c5b80156104f15760019182019181811690036104e9576104e6600183604081106104de576104de61092f565b0154846106cb565b92505b60011c6104b3565b505060008281526020818152604091829020839055604154915167ffffffffffffffff90921682527f8d762ebc760982a11d9a00cc7c1c4c91f9c1084b85633ee8ca462da42465f1d9910160405180910390a15050565b60415460009067ffffffffffffffff90811690811061059a5760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b604482015260640161024f565b604051600090829087906105b690889033908990602001610945565b60408051601f19818403018152908290526105d593929160200161097b565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b6001811660000361063957610621600183604081106104de576104de61092f565b92506001918201911c677fffffffffffffff16610600565b50816001826040811061064e5761064e61092f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906106a19084906109ca565b60405180910390a1509095945050505050565b600181604081106106c457600080fd5b0154905081565b6000818310156106e9578260005281602052604060002090506106f9565b8160005282602052604060002090505b92915050565b80356001600160a01b038116811461071657600080fd5b919050565b60008060008060008060c0878903121561073457600080fd5b863595506020870135945060408701359350610752606088016106ff565b92506080870135915060a087013590509295509295509295565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561079757600080fd5b6107a0846106ff565b925060208401356001600160e01b0319811681146107bd57600080fd5b9150604084013567ffffffffffffffff808211156107da57600080fd5b818601915086601f8301126107ee57600080fd5b8135818111156108005761080061076c565b604051601f8201601f19908116603f011681019083821181831017156108285761082861076c565b8160405282815289602084870101111561084157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561087557600080fd5b5035919050565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156108a457600080fd5b5051919050565b60005b838110156108c65781810151838201526020016108ae565b50506000910152565b600081518084526108e78160208601602086016108ab565b601f01601f19169290920160200192915050565b6001600160a01b038416815260606020820181905260009061091f908301856108cf565b9050826040830152949350505050565b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b841681528260048201526000825161096c8160248501602087016108ab565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bb81601c8501602087016108ab565b91909101601c01949350505050565b6020815260006109dd60208301846108cf565b939250505056fea2646970667358221220f154e7c06a230a8584c6b8ca63e2df548a849b848ce8e10ae47300e98e2f281164736f6c63430008120033", "devdoc": { "details": "Vea Inbox From Gnosis to Arbitrum. Note: This contract is deployed on the Gnosis.", "events": { @@ -337,7 +337,7 @@ "storageLayout": { "storage": [ { - "astId": 8146, + "astId": 5767, "contract": "src/gnosisToArbitrum/VeaInboxGnosisToArb.sol:VeaInboxGnosisToArb", "label": "snapshots", "offset": 0, @@ -345,7 +345,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 8150, + "astId": 5771, "contract": "src/gnosisToArbitrum/VeaInboxGnosisToArb.sol:VeaInboxGnosisToArb", "label": "inbox", "offset": 0, @@ -353,7 +353,7 @@ "type": "t_array(t_bytes32)64_storage" }, { - "astId": 8152, + "astId": 5773, "contract": "src/gnosisToArbitrum/VeaInboxGnosisToArb.sol:VeaInboxGnosisToArb", "label": "count", "offset": 0, diff --git a/contracts/deployments/chiado/VeaInboxGnosisToArbTestnet.json b/contracts/deployments/chiado/VeaInboxGnosisToArbTestnet.json index 07283a0b..c341ad72 100644 --- a/contracts/deployments/chiado/VeaInboxGnosisToArbTestnet.json +++ b/contracts/deployments/chiado/VeaInboxGnosisToArbTestnet.json @@ -1,5 +1,5 @@ { - "address": "0xB10EF39cc9b45A8EAfa87655063E3dD83D675075", + "address": "0xfF2B7048d673767754B798df1702C786E2c59F1F", "abi": [ { "inputs": [ @@ -238,32 +238,32 @@ "type": "function" } ], - "transactionHash": "0xc6db0e85aecef4f6c55c20743257ed9514221b9a1b6f95bfa07ce1cfe545595b", + "transactionHash": "0x2ebd7f37e45d38d6a633271aa2b192413fff5d8d20a327cc1231a9674f3dee95", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xB10EF39cc9b45A8EAfa87655063E3dD83D675075", + "contractAddress": "0xfF2B7048d673767754B798df1702C786E2c59F1F", "transactionIndex": 1, - "gasUsed": "613744", + "gasUsed": "613732", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xbdf3230457e38e09e6187d4d86c98ce1309c93afd8f3413ed719b3d4efb0af7e", - "transactionHash": "0xc6db0e85aecef4f6c55c20743257ed9514221b9a1b6f95bfa07ce1cfe545595b", + "blockHash": "0xc6003090e783398168db648588767047b1d901b940262424b70df81740f3bb83", + "transactionHash": "0x2ebd7f37e45d38d6a633271aa2b192413fff5d8d20a327cc1231a9674f3dee95", "logs": [], - "blockNumber": 4696231, - "cumulativeGasUsed": "642264", + "blockNumber": 4697843, + "cumulativeGasUsed": "642300", "status": 1, "byzantium": true }, "args": [ 7200, - "0x663697f5748c5f4d46a15114Dde5514356E794F4", + "0xF0492e87Be6d644A6a467fE20ee9EC5eFCB6cB23", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a" ], - "numDeployments": 1, - "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSnapshot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"ticketID\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Gnosis to Arbitrum. Note: This contract is deployed on the Gnosis.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)\"}},\"SnapshotSaved(uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerGnosisToArb\":\"The router on Ethereum that routes from Gnosis to Arbitrum.\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See merkle tree documentation for details how inbox manages state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":\"VeaInboxGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\n\\n/// @dev Vea Inbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on the Gnosis.\\ncontract VeaInboxGnosisToArb is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between stateroot snapshots\\n address public immutable routerGnosisToArb; // The router on Ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerGnosisToArb The router on Ethereum that routes from Gnosis to Arbitrum.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n constructor(uint256 _epochPeriod, address _routerGnosisToArb, IAMB _amb) {\\n epochPeriod = _epochPeriod;\\n routerGnosisToArb = _routerGnosisToArb;\\n amb = _amb;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See merkle tree documentation for details how inbox manages state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // data for outbox relay\\n abi.encodePacked( // abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...) where _data is abi.encode(param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function sendSnapshot(\\n uint256 _epoch,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external virtual returns (bytes32 ticketID){\\n\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(\\n IRouterToArb.route,\\n (_epoch, snapshots[_epoch], _inboxIndex, _maxSubmissionCost, _excessFeeRefundAddress, _gasLimit, _maxFeePerGas));\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n ticketID = amb.requireToPassMessage(routerGnosisToArb, data, amb.maxGasPerTx());\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x7ca2295ffaafd0f34fbd778aa2144be9d3d5751e213f2a7398a286b8ab6cd71f\",\"license\":\"MIT\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60e060405234801561001057600080fd5b50604051610b0b380380610b0b83398101604081905261002f91610064565b60a0929092526001600160a01b0390811660c052166080526100a7565b6001600160a01b038116811461006157600080fd5b50565b60008060006060848603121561007957600080fd5b83519250602084015161008b8161004c565b604085015190925061009c8161004c565b809150509250925092565b60805160a05160c051610a1a6100f1600039600081816101a6015261031701526000818161014c015281816101cc015261043301526000818160cf01526102ee0152610a1a6000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80635f85896c116100665780635f85896c14610134578063b5b7a18414610147578063d6565a2d1461016e578063e5a1c3561461018e578063eb8dedfa146101a157600080fd5b806306661abd146100985780631062b39a146100ca5780632bbb470414610109578063519205351461012a575b600080fd5b6041546100ac9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c1565b61011c61011736600461071b565b6101c8565b6040519081526020016100c1565b61013261042e565b005b6100ac610142366004610782565b610548565b61011c7f000000000000000000000000000000000000000000000000000000000000000081565b61011c61017c366004610863565b60006020819052908152604090205481565b61011c61019c366004610863565b6106b4565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000042816101f9576101f961087c565b0487106102585760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b600087815260208190526040808220549051602481018a9052604481019190915260648101889052608481018790526001600160a01b03861660a482015260c4810185905260e481018490526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928692869263e5789d039260048083019391928290030181865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190610892565b6040518463ffffffff1660e01b81526004016103a4939291906108fb565b6020604051808303816000875af11580156103c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e79190610892565b9150877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828360405161041b91815260200190565b60405180910390a2509695505050505050565b6000807f000000000000000000000000000000000000000000000000000000000000000042816104605761046061087c565b604154919004925060009067ffffffffffffffff165b80156104af57806001166001036104a3576001826040811061049a5761049a61092f565b015492506104af565b6001918201911c610476565b60011c5b80156104f15760019182019181811690036104e9576104e6600183604081106104de576104de61092f565b0154846106cb565b92505b60011c6104b3565b505060008281526020818152604091829020839055604154915167ffffffffffffffff90921682527f8d762ebc760982a11d9a00cc7c1c4c91f9c1084b85633ee8ca462da42465f1d9910160405180910390a15050565b60415460009067ffffffffffffffff90811690811061059a5760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b604482015260640161024f565b604051600090829087906105b690889033908990602001610945565b60408051601f19818403018152908290526105d593929160200161097b565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b6001811660000361063957610621600183604081106104de576104de61092f565b92506001918201911c677fffffffffffffff16610600565b50816001826040811061064e5761064e61092f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906106a19084906109ca565b60405180910390a1509095945050505050565b600181604081106106c457600080fd5b0154905081565b6000818310156106e9578260005281602052604060002090506106f9565b8160005282602052604060002090505b92915050565b80356001600160a01b038116811461071657600080fd5b919050565b60008060008060008060c0878903121561073457600080fd5b863595506020870135945060408701359350610752606088016106ff565b92506080870135915060a087013590509295509295509295565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561079757600080fd5b6107a0846106ff565b925060208401356001600160e01b0319811681146107bd57600080fd5b9150604084013567ffffffffffffffff808211156107da57600080fd5b818601915086601f8301126107ee57600080fd5b8135818111156108005761080061076c565b604051601f8201601f19908116603f011681019083821181831017156108285761082861076c565b8160405282815289602084870101111561084157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561087557600080fd5b5035919050565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156108a457600080fd5b5051919050565b60005b838110156108c65781810151838201526020016108ae565b50506000910152565b600081518084526108e78160208601602086016108ab565b601f01601f19169290920160200192915050565b6001600160a01b038416815260606020820181905260009061091f908301856108cf565b9050826040830152949350505050565b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b841681528260048201526000825161096c8160248501602087016108ab565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bb81601c8501602087016108ab565b91909101601c01949350505050565b6020815260006109dd60208301846108cf565b939250505056fea26469706673582212207651e99ea048af4184e2ff2a5d067a5095a32f2014519a26a40caf2bf722f88d64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80635f85896c116100665780635f85896c14610134578063b5b7a18414610147578063d6565a2d1461016e578063e5a1c3561461018e578063eb8dedfa146101a157600080fd5b806306661abd146100985780631062b39a146100ca5780632bbb470414610109578063519205351461012a575b600080fd5b6041546100ac9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c1565b61011c61011736600461071b565b6101c8565b6040519081526020016100c1565b61013261042e565b005b6100ac610142366004610782565b610548565b61011c7f000000000000000000000000000000000000000000000000000000000000000081565b61011c61017c366004610863565b60006020819052908152604090205481565b61011c61019c366004610863565b6106b4565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000042816101f9576101f961087c565b0487106102585760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b600087815260208190526040808220549051602481018a9052604481019190915260648101889052608481018790526001600160a01b03861660a482015260c4810185905260e481018490526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928692869263e5789d039260048083019391928290030181865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190610892565b6040518463ffffffff1660e01b81526004016103a4939291906108fb565b6020604051808303816000875af11580156103c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e79190610892565b9150877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828360405161041b91815260200190565b60405180910390a2509695505050505050565b6000807f000000000000000000000000000000000000000000000000000000000000000042816104605761046061087c565b604154919004925060009067ffffffffffffffff165b80156104af57806001166001036104a3576001826040811061049a5761049a61092f565b015492506104af565b6001918201911c610476565b60011c5b80156104f15760019182019181811690036104e9576104e6600183604081106104de576104de61092f565b0154846106cb565b92505b60011c6104b3565b505060008281526020818152604091829020839055604154915167ffffffffffffffff90921682527f8d762ebc760982a11d9a00cc7c1c4c91f9c1084b85633ee8ca462da42465f1d9910160405180910390a15050565b60415460009067ffffffffffffffff90811690811061059a5760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b604482015260640161024f565b604051600090829087906105b690889033908990602001610945565b60408051601f19818403018152908290526105d593929160200161097b565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b6001811660000361063957610621600183604081106104de576104de61092f565b92506001918201911c677fffffffffffffff16610600565b50816001826040811061064e5761064e61092f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906106a19084906109ca565b60405180910390a1509095945050505050565b600181604081106106c457600080fd5b0154905081565b6000818310156106e9578260005281602052604060002090506106f9565b8160005282602052604060002090505b92915050565b80356001600160a01b038116811461071657600080fd5b919050565b60008060008060008060c0878903121561073457600080fd5b863595506020870135945060408701359350610752606088016106ff565b92506080870135915060a087013590509295509295509295565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561079757600080fd5b6107a0846106ff565b925060208401356001600160e01b0319811681146107bd57600080fd5b9150604084013567ffffffffffffffff808211156107da57600080fd5b818601915086601f8301126107ee57600080fd5b8135818111156108005761080061076c565b604051601f8201601f19908116603f011681019083821181831017156108285761082861076c565b8160405282815289602084870101111561084157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561087557600080fd5b5035919050565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156108a457600080fd5b5051919050565b60005b838110156108c65781810151838201526020016108ae565b50506000910152565b600081518084526108e78160208601602086016108ab565b601f01601f19169290920160200192915050565b6001600160a01b038416815260606020820181905260009061091f908301856108cf565b9050826040830152949350505050565b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b841681528260048201526000825161096c8160248501602087016108ab565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bb81601c8501602087016108ab565b91909101601c01949350505050565b6020815260006109dd60208301846108cf565b939250505056fea26469706673582212207651e99ea048af4184e2ff2a5d067a5095a32f2014519a26a40caf2bf722f88d64736f6c63430008120033", + "numDeployments": 3, + "solcInputHash": "916b5e2210e8e15d34b48798389f67fe", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSnapshot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"ticketID\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Gnosis to Arbitrum. Note: This contract is deployed on the Gnosis.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)\"}},\"SnapshotSaved(uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerGnosisToArb\":\"The router on Ethereum that routes from Gnosis to Arbitrum.\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See merkle tree documentation for details how inbox manages state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":\"VeaInboxGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\n\\n/// @dev Vea Inbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on the Gnosis.\\ncontract VeaInboxGnosisToArb is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between stateroot snapshots\\n address public immutable routerGnosisToArb; // The router on Ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerGnosisToArb The router on Ethereum that routes from Gnosis to Arbitrum.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n constructor(uint256 _epochPeriod, address _routerGnosisToArb, IAMB _amb) {\\n epochPeriod = _epochPeriod;\\n routerGnosisToArb = _routerGnosisToArb;\\n amb = _amb;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See merkle tree documentation for details how inbox manages state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // data for outbox relay\\n abi.encodePacked( // abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...) where _data is abi.encode(param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function sendSnapshot(\\n uint256 _epoch,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external virtual returns (bytes32 ticketID) {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(\\n IRouterToArb.route,\\n (\\n _epoch,\\n snapshots[_epoch],\\n _inboxIndex,\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n _gasLimit,\\n _maxFeePerGas\\n )\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n ticketID = amb.requireToPassMessage(routerGnosisToArb, data, amb.maxGasPerTx());\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x0125442dc06bc061fc1c6a3719018904fcc92db68696f93ea4bf770a4da66b15\",\"license\":\"MIT\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60e060405234801561001057600080fd5b50604051610b0b380380610b0b83398101604081905261002f91610064565b60a0929092526001600160a01b0390811660c052166080526100a7565b6001600160a01b038116811461006157600080fd5b50565b60008060006060848603121561007957600080fd5b83519250602084015161008b8161004c565b604085015190925061009c8161004c565b809150509250925092565b60805160a05160c051610a1a6100f1600039600081816101a6015261031701526000818161014c015281816101cc015261043301526000818160cf01526102ee0152610a1a6000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80635f85896c116100665780635f85896c14610134578063b5b7a18414610147578063d6565a2d1461016e578063e5a1c3561461018e578063eb8dedfa146101a157600080fd5b806306661abd146100985780631062b39a146100ca5780632bbb470414610109578063519205351461012a575b600080fd5b6041546100ac9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c1565b61011c61011736600461071b565b6101c8565b6040519081526020016100c1565b61013261042e565b005b6100ac610142366004610782565b610548565b61011c7f000000000000000000000000000000000000000000000000000000000000000081565b61011c61017c366004610863565b60006020819052908152604090205481565b61011c61019c366004610863565b6106b4565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000042816101f9576101f961087c565b0487106102585760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b600087815260208190526040808220549051602481018a9052604481019190915260648101889052608481018790526001600160a01b03861660a482015260c4810185905260e481018490526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928692869263e5789d039260048083019391928290030181865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190610892565b6040518463ffffffff1660e01b81526004016103a4939291906108fb565b6020604051808303816000875af11580156103c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e79190610892565b9150877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828360405161041b91815260200190565b60405180910390a2509695505050505050565b6000807f000000000000000000000000000000000000000000000000000000000000000042816104605761046061087c565b604154919004925060009067ffffffffffffffff165b80156104af57806001166001036104a3576001826040811061049a5761049a61092f565b015492506104af565b6001918201911c610476565b60011c5b80156104f15760019182019181811690036104e9576104e6600183604081106104de576104de61092f565b0154846106cb565b92505b60011c6104b3565b505060008281526020818152604091829020839055604154915167ffffffffffffffff90921682527f8d762ebc760982a11d9a00cc7c1c4c91f9c1084b85633ee8ca462da42465f1d9910160405180910390a15050565b60415460009067ffffffffffffffff90811690811061059a5760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b604482015260640161024f565b604051600090829087906105b690889033908990602001610945565b60408051601f19818403018152908290526105d593929160200161097b565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b6001811660000361063957610621600183604081106104de576104de61092f565b92506001918201911c677fffffffffffffff16610600565b50816001826040811061064e5761064e61092f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906106a19084906109ca565b60405180910390a1509095945050505050565b600181604081106106c457600080fd5b0154905081565b6000818310156106e9578260005281602052604060002090506106f9565b8160005282602052604060002090505b92915050565b80356001600160a01b038116811461071657600080fd5b919050565b60008060008060008060c0878903121561073457600080fd5b863595506020870135945060408701359350610752606088016106ff565b92506080870135915060a087013590509295509295509295565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561079757600080fd5b6107a0846106ff565b925060208401356001600160e01b0319811681146107bd57600080fd5b9150604084013567ffffffffffffffff808211156107da57600080fd5b818601915086601f8301126107ee57600080fd5b8135818111156108005761080061076c565b604051601f8201601f19908116603f011681019083821181831017156108285761082861076c565b8160405282815289602084870101111561084157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561087557600080fd5b5035919050565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156108a457600080fd5b5051919050565b60005b838110156108c65781810151838201526020016108ae565b50506000910152565b600081518084526108e78160208601602086016108ab565b601f01601f19169290920160200192915050565b6001600160a01b038416815260606020820181905260009061091f908301856108cf565b9050826040830152949350505050565b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b841681528260048201526000825161096c8160248501602087016108ab565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bb81601c8501602087016108ab565b91909101601c01949350505050565b6020815260006109dd60208301846108cf565b939250505056fea2646970667358221220f154e7c06a230a8584c6b8ca63e2df548a849b848ce8e10ae47300e98e2f281164736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80635f85896c116100665780635f85896c14610134578063b5b7a18414610147578063d6565a2d1461016e578063e5a1c3561461018e578063eb8dedfa146101a157600080fd5b806306661abd146100985780631062b39a146100ca5780632bbb470414610109578063519205351461012a575b600080fd5b6041546100ac9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c1565b61011c61011736600461071b565b6101c8565b6040519081526020016100c1565b61013261042e565b005b6100ac610142366004610782565b610548565b61011c7f000000000000000000000000000000000000000000000000000000000000000081565b61011c61017c366004610863565b60006020819052908152604090205481565b61011c61019c366004610863565b6106b4565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000042816101f9576101f961087c565b0487106102585760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b600087815260208190526040808220549051602481018a9052604481019190915260648101889052608481018790526001600160a01b03861660a482015260c4810185905260e481018490526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928692869263e5789d039260048083019391928290030181865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190610892565b6040518463ffffffff1660e01b81526004016103a4939291906108fb565b6020604051808303816000875af11580156103c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e79190610892565b9150877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828360405161041b91815260200190565b60405180910390a2509695505050505050565b6000807f000000000000000000000000000000000000000000000000000000000000000042816104605761046061087c565b604154919004925060009067ffffffffffffffff165b80156104af57806001166001036104a3576001826040811061049a5761049a61092f565b015492506104af565b6001918201911c610476565b60011c5b80156104f15760019182019181811690036104e9576104e6600183604081106104de576104de61092f565b0154846106cb565b92505b60011c6104b3565b505060008281526020818152604091829020839055604154915167ffffffffffffffff90921682527f8d762ebc760982a11d9a00cc7c1c4c91f9c1084b85633ee8ca462da42465f1d9910160405180910390a15050565b60415460009067ffffffffffffffff90811690811061059a5760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b604482015260640161024f565b604051600090829087906105b690889033908990602001610945565b60408051601f19818403018152908290526105d593929160200161097b565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b6001811660000361063957610621600183604081106104de576104de61092f565b92506001918201911c677fffffffffffffff16610600565b50816001826040811061064e5761064e61092f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906106a19084906109ca565b60405180910390a1509095945050505050565b600181604081106106c457600080fd5b0154905081565b6000818310156106e9578260005281602052604060002090506106f9565b8160005282602052604060002090505b92915050565b80356001600160a01b038116811461071657600080fd5b919050565b60008060008060008060c0878903121561073457600080fd5b863595506020870135945060408701359350610752606088016106ff565b92506080870135915060a087013590509295509295509295565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561079757600080fd5b6107a0846106ff565b925060208401356001600160e01b0319811681146107bd57600080fd5b9150604084013567ffffffffffffffff808211156107da57600080fd5b818601915086601f8301126107ee57600080fd5b8135818111156108005761080061076c565b604051601f8201601f19908116603f011681019083821181831017156108285761082861076c565b8160405282815289602084870101111561084157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561087557600080fd5b5035919050565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156108a457600080fd5b5051919050565b60005b838110156108c65781810151838201526020016108ae565b50506000910152565b600081518084526108e78160208601602086016108ab565b601f01601f19169290920160200192915050565b6001600160a01b038416815260606020820181905260009061091f908301856108cf565b9050826040830152949350505050565b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b841681528260048201526000825161096c8160248501602087016108ab565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bb81601c8501602087016108ab565b91909101601c01949350505050565b6020815260006109dd60208301846108cf565b939250505056fea2646970667358221220f154e7c06a230a8584c6b8ca63e2df548a849b848ce8e10ae47300e98e2f281164736f6c63430008120033", "devdoc": { "details": "Vea Inbox From Gnosis to Arbitrum. Note: This contract is deployed on the Gnosis.", "events": { @@ -337,7 +337,7 @@ "storageLayout": { "storage": [ { - "astId": 8146, + "astId": 5767, "contract": "src/gnosisToArbitrum/VeaInboxGnosisToArb.sol:VeaInboxGnosisToArb", "label": "snapshots", "offset": 0, @@ -345,7 +345,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 8150, + "astId": 5771, "contract": "src/gnosisToArbitrum/VeaInboxGnosisToArb.sol:VeaInboxGnosisToArb", "label": "inbox", "offset": 0, @@ -353,7 +353,7 @@ "type": "t_array(t_bytes32)64_storage" }, { - "astId": 8152, + "astId": 5773, "contract": "src/gnosisToArbitrum/VeaInboxGnosisToArb.sol:VeaInboxGnosisToArb", "label": "count", "offset": 0, diff --git a/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json b/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json index be54a1ff..7c30cd13 100644 --- a/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json +++ b/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xE2067941210d684bA8171F7C9dF372931fC6c245", + "address": "0x660daB9A6436A814a6ae3a6f27b309356a4bE78c", "abi": [ { "inputs": [ @@ -52,11 +52,6 @@ "internalType": "contract IWETH", "name": "_weth", "type": "address" - }, - { - "internalType": "uint256", - "name": "_maxClaimDelayEpochs", - "type": "uint256" } ], "stateMutability": "nonpayable", @@ -90,6 +85,12 @@ "name": "_claimer", "type": "address" }, + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, { "indexed": false, "internalType": "bytes32", @@ -484,19 +485,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "maxClaimDelayEpochs", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "maxMissingBlocks", @@ -1057,19 +1045,19 @@ "type": "function" } ], - "transactionHash": "0xff529c1ca0bfda8adc171ef91f5b8d4503a247e460d0d9f9315b4adb5a97af43", + "transactionHash": "0x2dc8136b82a0655fca9bb5c03a80e97c91cfbc99d6a50deeab3a2f3e15d9c7c3", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xE2067941210d684bA8171F7C9dF372931fC6c245", + "contractAddress": "0x660daB9A6436A814a6ae3a6f27b309356a4bE78c", "transactionIndex": 1, - "gasUsed": "2299378", + "gasUsed": "2286994", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xac1c08948691d0b819e5699ad56808aea9a96ed1109ac1ab8e788ef081f0ce8b", - "transactionHash": "0xff529c1ca0bfda8adc171ef91f5b8d4503a247e460d0d9f9315b4adb5a97af43", + "blockHash": "0x99ae32440ed53f65c12bb9bc00084ff63f6a902e8110a6b945b7256c9ad4e829", + "transactionHash": "0x2dc8136b82a0655fca9bb5c03a80e97c91cfbc99d6a50deeab3a2f3e15d9c7c3", "logs": [], - "blockNumber": 4696193, - "cumulativeGasUsed": "2320378", + "blockNumber": 4697782, + "cumulativeGasUsed": "2315498", "status": 1, "byzantium": true }, @@ -1079,18 +1067,17 @@ 0, 10000000000000, "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0x8Bf88E6474d93bD2Dc0d76CB3BE8809c6BB84148", + "0xef62E517bE7e319458f41014C4d8864117381255", 86400, 10000000000000, 5, - "0x8d74e5e4DA11629537C4575cB0f33b4F0Dfa42EB", - 3 + "0x8d74e5e4DA11629537C4575cB0f33b4F0Dfa42EB" ], - "numDeployments": 1, - "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IWETH\",\"name\":\"_weth\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxClaimDelayEpochs\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxClaimDelayEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxClaimDelayEpochs\":\"The maximum number of epochs that can be claimed in the past.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_weth\":\"The address of the WETH contract on Gnosis.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by receiving a message from the AMB.\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":\"VeaOutboxArbToGnosisDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/tokens/gnosis/IWETH.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n IWETH public immutable weth; // The address of the WETH contract on Gnosis.\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 internal immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable maxClaimDelayEpochs; // The maximum number of epochs that can be claimed in the past.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth,\\n uint256 _maxClaimDelayEpochs\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n weth = _weth;\\n maxClaimDelayEpochs = _maxClaimDelayEpochs;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerDelayLimit by receiving a message from the AMB.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n // If _newSequencerDelayLimit > timeout * epochPeriod, then the bridge will shutdown.\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external virtual {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n // If the sequencerDelayLimit is set larger than block.timestamp - epochPeriod by arbitrum governance, \\n // the checked arithmetic will revert due to underflow and the bridge will shutdown.\\n uint256 minEpochSequencerDelay = (block.timestamp - sequencerDelayLimit) / epochPeriod - 1;\\n\\n uint256 minEpochClaim;\\n \\n unchecked{\\n // deployer sets maxClaimDelayEpochs so no underflow is possible\\n minEpochClaim = block.timestamp / epochPeriod - maxClaimDelayEpochs;\\n }\\n\\n uint256 minClaimableEpoch = minEpochSequencerDelay > minEpochClaim ? minEpochSequencerDelay : minEpochClaim;\\n \\n require(_epoch >= minClaimableEpoch, \\\"Invalid epoch.\\\");\\n\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.challenger, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x920fcd2e271fd8871f3ca84c160e7e799f4e80da241acbec81b12789d2330c68\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToGnosis/VeaOutboxArbToGnosis.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Chiado.\\n/// Note: This contract is deployed on Chiado.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public override onlyByDevnetOperator {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth,\\n uint256 _maxClaimDelayEpochs\\n )\\n VeaOutboxArbToGnosis(\\n _deposit,\\n _epochPeriod,\\n _minChallengePeriod,\\n _timeoutEpochs,\\n _amb,\\n _routerArbToGnosis,\\n _sequencerDelayLimit,\\n _maxMissingBlocks,\\n _routerChainId,\\n _weth,\\n _maxClaimDelayEpochs\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x33ce51725085672aba4ef3984ac72106ca2dcb8c887fe0ad8b8926ecf9a1e078\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/tokens/gnosis/IWETH.sol\":{\"content\":\"// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5daaf60d11ee2075260d0f3adfb22b1c536db983/contracts/token/ERC20/BurnableToken.sol\\n// implementation: https://gnosisscan.io/address/0xf8d1677c8a0c961938bf2f9adc3f3cfda759a9d9#code\\n// proxy: https://gnosisscan.io/token/0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1#readProxyContract\\n\\n/**\\n * @title Burnable Token\\n * @dev Token that can be irreversibly burned (destroyed).\\n */\\ninterface IWETH {\\n \\n event Transfer(address indexed from, address indexed to, uint256 value);\\n event Burn(address indexed burner, uint256 value);\\n\\n /**\\n * @dev Burns a specific amount of tokens.\\n * @param _value The amount of token to be burned.\\n */\\n function burn(uint256 _value) external;\\n\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Transfer tokens from one address to another\\n * @param _from address The address which you want to send tokens from\\n * @param _to address The address which you want to transfer to\\n * @param _value uint256 the amount of tokens to be transferred\\n */\\n function transferFrom(\\n address _from,\\n address _to,\\n uint256 _value\\n ) external returns (bool);\\n}\",\"keccak256\":\"0x0f616e96c8713b9eecd9ded1aac026c64398e9a3633bd8273e6ac7bd8f800f7d\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6102006040523480156200001257600080fd5b5060405162002b5c38038062002b5c833981016040819052620000359162000138565b60e08b90526101608a90526101c08890526101808990526001600160a01b0380881660805280871660a05260048690556101e0859052610140849052821660c0526101a08190528a8a8a8a8a8a8a8a8a8a8a6200009460028c620001f4565b610100819052620000a78c600262000217565b620000b3919062000237565b6101205261016051600190620000ca9042620001f4565b620000d6919062000237565b600181905550505050505050505050505033600660006101000a8154816001600160a01b0302191690836001600160a01b0316021790555050505050505050505050506200024d565b6001600160a01b03811681146200013557600080fd5b50565b60008060008060008060008060008060006101608c8e0312156200015b57600080fd5b8b519a5060208c0151995060408c0151985060608c0151975060808c015162000184816200011f565b60a08d015190975062000197816200011f565b8096505060c08c0151945060e08c015193506101008c015192506101208c0151620001c2816200011f565b809250506101408c015190509295989b509295989b9093969950565b634e487b7160e01b600052601160045260246000fd5b6000826200021257634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620002315762000231620001de565b92915050565b81810381811115620002315762000231620001de565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e05161276c620003f0600039600081816105120152612125015260008181610546015281816108fb01528181611a6d01528181611bf80152611eb70152600061021a0152600081816105ce01526120b901526000818161057a0152818161091f01528181610cb00152818161195b01528181611a9101528181611c1c0152611edb015260008181610a960152610dc90152600081816115e701526117d70152600081816114f60152611729015260008181610602015281816106e901528181610fe40152818161185201528181611d7101528181611e0601526120300152600081816103a50152818161070f0152818161100a0152818161151c015281816115880152818161174f015281816117fd0152818161187801528181611d9701528181611e2c015261205601526000818161063601528181610b830152610eb60152600081816102810152818161099a01528181610a1401528181610af801528181610ce501528181610d470152610e2b015261276c6000f3fe6080604052600436106101ee5760003560e01c80637ffc2a6e1161010d578063b5b7a184116100a0578063d5e6a9df1161006f578063d5e6a9df14610624578063da2b7bc414610658578063df19e6ff14610678578063e813a755146106a5578063eedcf2a9146106bb57600080fd5b8063b5b7a18414610568578063b633b9441461059c578063c2114a16146105bc578063d0e30db0146105f057600080fd5b8063930f28af116100dc578063930f28af146104ca5780639588eca2146104ea578063aa22a1c614610500578063b044397e1461053457600080fd5b80637ffc2a6e146104475780638a619a711461045d5780638ad3a8f71461047d57806390df63b71461049d57600080fd5b806331d14457116101855780634788cb38116101545780634788cb38146103c757806349b4299e146103e75780634a439cfe14610407578063541adcca1461042757600080fd5b806331d144571461033357806331ddf743146103535780633ce43cfd146103735780633fc8cef31461039357600080fd5b8063222ae786116101c1578063222ae786146102bb5780632639c060146102d057806327ee6bdd146102fd5780632c1925191461031357600080fd5b806301139b68146101f3578063042c4aaf146102085780630f0adca51461024f5780631062b39a1461026f575b600080fd5b6102066102013660046122e2565b6106ce565b005b34801561021457600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561025b57600080fd5b5061020661026a366004612310565b6108f9565b34801561027b57600080fd5b506102a37f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610246565b3480156102c757600080fd5b5061023c610ca9565b3480156102dc57600080fd5b5061023c6102eb366004612347565b60026020526000908152604090205481565b34801561030957600080fd5b5061023c60015481565b34801561031f57600080fd5b5061020661032e366004612360565b610cda565b34801561033f57600080fd5b5061020661034e366004612360565b610fb2565b34801561035f57600080fd5b5061020661036e3660046123e3565b611194565b34801561037f57600080fd5b5061020661038e3660046124a5565b611434565b34801561039f57600080fd5b506102a37f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d357600080fd5b506102066103e23660046122e2565b61166e565b3480156103f357600080fd5b506102066104023660046122e2565b6118a9565b34801561041357600080fd5b5061023c610422366004612347565b611954565b34801561043357600080fd5b5061023c6104423660046124de565b611986565b34801561045357600080fd5b5061023c60055481565b34801561046957600080fd5b50610206610478366004612501565b6119d8565b34801561048957600080fd5b506006546102a3906001600160a01b031681565b3480156104a957600080fd5b5061023c6104b8366004612347565b60036020526000908152604090205481565b3480156104d657600080fd5b506102066104e53660046122e2565b611a6b565b3480156104f657600080fd5b5061023c60005481565b34801561050c57600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054057600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561057457600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a857600080fd5b506102066105b73660046122e2565b611bf6565b3480156105c857600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105fc57600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561063057600080fd5b506102a37f000000000000000000000000000000000000000000000000000000000000000081565b34801561066457600080fd5b506102066106733660046122e2565b611eb5565b34801561068457600080fd5b506106986106933660046124de565b61209b565b6040516102469190612534565b3480156106b157600080fd5b5061023c60045481565b6102066106c9366004612360565b612162565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610760573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610784919061254e565b6107a95760405162461bcd60e51b81526004016107a090612570565b60405180910390fd5b6107b281611986565b600083815260026020526040902054146107de5760405162461bcd60e51b81526004016107a09061259f565b60c08101516001600160a01b0316156108395760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016107a0565b60008160a0015160028111156108515761085161251e565b1461089e5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016107a0565b3360c08201526108ad81611986565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161094c5761094c6125c7565b0403111561098f5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107a0565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a125760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016107a0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9491906125dd565b7f000000000000000000000000000000000000000000000000000000000000000014610af65760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016107a0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7891906125f6565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610beb5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016107a0565b60015483118015610bfb57508115155b15610c3e57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610c4781611986565b60008481526002602052604090205403610ca4578051829003610c7057600160a0820152610c8b565b60c08101516001600160a01b031615610c8b57600260a08201525b610c9481611986565b6000848152600260205260409020555b505050565b6000610cd57f000000000000000000000000000000000000000000000000000000000000000042612613565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d455760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b60448201526064016107a0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610da3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc791906125dd565b7f000000000000000000000000000000000000000000000000000000000000000014610e295760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016107a0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eab91906125f6565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610f1e5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016107a0565b8060055410610f665760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016107a0565b8160045414610fae57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15b5050565b6006546001600160a01b03163314610fc957600080fd5b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561105b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107f919061254e565b61109b5760405162461bcd60e51b81526004016107a090612570565b806110b85760405162461bcd60e51b81526004016107a09061259f565b6000828152600260205260409020541561110a5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016107a0565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261115090611986565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016108ed565b604085106111d65760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016107a0565b6000848484846040516020016111ef9493929190612635565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561126f57600088888381811061123157611231612677565b9050602002013590508281111561125657826000528060205260406000209250611266565b8060005282602052604060002092505b50600101611215565b5080600054146112b25760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016107a0565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156113275760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016107a0565b6000838152600360205260408082206001851b84179055516001600160a01b03891690611357908990899061268d565b6000604051808303816000865af19150503d8060008114611394576040519150601f19603f3d011682016040523d82523d6000602084013e611399565b606091505b50509050806113ea5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016107a0565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b611446610442368390038301836124de565b600083815260026020526040902054146114725760405162461bcd60e51b81526004016107a09061259f565b600261148460c0830160a0840161269d565b60028111156114955761149561251e565b146114d65760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016107a0565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561156857600080fd5b505af115801561157c573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb90506115c160e0840160c08501612501565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af115801561162e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611652919061254e565b610fae5760405162461bcd60e51b81526004016107a090612570565b61167781611986565b600083815260026020526040902054146116a35760405162461bcd60e51b81526004016107a09061259f565b60018160a0015160028111156116bb576116bb61251e565b146116f85760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016107a0565b60008281526002602052604081205560c08101516001600160a01b03161561182e57604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561179b57600080fd5b505af11580156117af573d6000803e3d6000fd5b50505050602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb9060440161160f565b602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb9060440161160f565b6006546001600160a01b031633146118c057600080fd5b6118c981611986565b600083815260026020526040902054146118f55760405162461bcd60e51b81526004016107a09061259f565b63ffffffff42811660608301524316608082015261191281611986565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610fa5565b60006119807f000000000000000000000000000000000000000000000000000000000000000083612613565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986119bb9890979691016126b8565b604051602081830303815290604052805190602001209050919050565b6006546001600160a01b031633146119ef57600080fd5b6006546001600160a01b03163314611a495760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016107a0565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611abe57611abe6125c7565b04031115611b015760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107a0565b611b0a81611986565b60008381526002602052604090205414611b365760405162461bcd60e51b81526004016107a09061259f565b60c08101516001600160a01b031615611b885760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016107a0565b600154821115611bd057600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611be081611986565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c4957611c496125c7565b040311611c8a5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107a0565b611c9381611986565b60008381526002602052604090205414611cbf5760405162461bcd60e51b81526004016107a09061259f565b60008160a001516002811115611cd757611cd761251e565b14611d165760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107a0565b60c08101516001600160a01b031615610fae5760208101516001600160a01b0316611dc8576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb9060440161160f565b60c0810180516000909152611ddc82611986565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015611e75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e99919061254e565b610ca45760405162461bcd60e51b81526004016107a090612570565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611f0857611f086125c7565b040311611f495760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107a0565b611f5281611986565b60008381526002602052604090205414611f7e5760405162461bcd60e51b81526004016107a09061259f565b60008160a001516002811115611f9657611f9661251e565b14611fd55760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107a0565b60208101516001600160a01b031615610fae5760c08101516001600160a01b031661208757600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb9060440161160f565b6020810180516000909152611ddc82611986565b6000816060015163ffffffff166000036120b757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff16420310156120f357506003919050565b60006005836060015163ffffffff16420381612111576121116125c7565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612155576001925061215a565b600092505b50505b919050565b61216c8282610fb2565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526121b383826118a9565b63ffffffff4281166060830152431660808201526121d18382611a6b565b600160a0820152610ca4838261166e565b6001600160a01b03811681146121f757600080fd5b50565b803561215d816121e2565b803563ffffffff8116811461215d57600080fd5b80356003811061215d57600080fd5b600060e0828403121561223a57600080fd5b60405160e0810181811067ffffffffffffffff8211171561226b57634e487b7160e01b600052604160045260246000fd5b60405282358152905080612281602084016121fa565b602082015261229260408401612205565b60408201526122a360608401612205565b60608201526122b460808401612205565b60808201526122c560a08401612219565b60a08201526122d660c084016121fa565b60c08201525092915050565b60008061010083850312156122f657600080fd5b823591506123078460208501612228565b90509250929050565b6000806000610120848603121561232657600080fd5b833592506020840135915061233e8560408601612228565b90509250925092565b60006020828403121561235957600080fd5b5035919050565b6000806040838503121561237357600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461215d57600080fd5b60008083601f8401126123ac57600080fd5b50813567ffffffffffffffff8111156123c457600080fd5b6020830191508360208285010111156123dc57600080fd5b9250929050565b600080600080600080608087890312156123fc57600080fd5b863567ffffffffffffffff8082111561241457600080fd5b818901915089601f83011261242857600080fd5b81358181111561243757600080fd5b8a60208260051b850101111561244c57600080fd5b6020830198508097505061246260208a01612382565b955061247060408a016121fa565b9450606089013591508082111561248657600080fd5b5061249389828a0161239a565b979a9699509497509295939492505050565b6000808284036101008112156124ba57600080fd5b8335925060e0601f19820112156124d057600080fd5b506020830190509250929050565b600060e082840312156124f057600080fd5b6124fa8383612228565b9392505050565b60006020828403121561251357600080fd5b81356124fa816121e2565b634e487b7160e01b600052602160045260246000fd5b60208101600483106125485761254861251e565b91905290565b60006020828403121561256057600080fd5b815180151581146124fa57600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156125ef57600080fd5b5051919050565b60006020828403121561260857600080fd5b81516124fa816121e2565b60008261263057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156126af57600080fd5b6124fa82612219565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106127105761271061251e565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122018f7fb97cc06e2b7d4c5a2fa1b875c83f4019ff7829e45e77de46ca321593b0a64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101ee5760003560e01c80637ffc2a6e1161010d578063b5b7a184116100a0578063d5e6a9df1161006f578063d5e6a9df14610624578063da2b7bc414610658578063df19e6ff14610678578063e813a755146106a5578063eedcf2a9146106bb57600080fd5b8063b5b7a18414610568578063b633b9441461059c578063c2114a16146105bc578063d0e30db0146105f057600080fd5b8063930f28af116100dc578063930f28af146104ca5780639588eca2146104ea578063aa22a1c614610500578063b044397e1461053457600080fd5b80637ffc2a6e146104475780638a619a711461045d5780638ad3a8f71461047d57806390df63b71461049d57600080fd5b806331d14457116101855780634788cb38116101545780634788cb38146103c757806349b4299e146103e75780634a439cfe14610407578063541adcca1461042757600080fd5b806331d144571461033357806331ddf743146103535780633ce43cfd146103735780633fc8cef31461039357600080fd5b8063222ae786116101c1578063222ae786146102bb5780632639c060146102d057806327ee6bdd146102fd5780632c1925191461031357600080fd5b806301139b68146101f3578063042c4aaf146102085780630f0adca51461024f5780631062b39a1461026f575b600080fd5b6102066102013660046122e2565b6106ce565b005b34801561021457600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561025b57600080fd5b5061020661026a366004612310565b6108f9565b34801561027b57600080fd5b506102a37f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610246565b3480156102c757600080fd5b5061023c610ca9565b3480156102dc57600080fd5b5061023c6102eb366004612347565b60026020526000908152604090205481565b34801561030957600080fd5b5061023c60015481565b34801561031f57600080fd5b5061020661032e366004612360565b610cda565b34801561033f57600080fd5b5061020661034e366004612360565b610fb2565b34801561035f57600080fd5b5061020661036e3660046123e3565b611194565b34801561037f57600080fd5b5061020661038e3660046124a5565b611434565b34801561039f57600080fd5b506102a37f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d357600080fd5b506102066103e23660046122e2565b61166e565b3480156103f357600080fd5b506102066104023660046122e2565b6118a9565b34801561041357600080fd5b5061023c610422366004612347565b611954565b34801561043357600080fd5b5061023c6104423660046124de565b611986565b34801561045357600080fd5b5061023c60055481565b34801561046957600080fd5b50610206610478366004612501565b6119d8565b34801561048957600080fd5b506006546102a3906001600160a01b031681565b3480156104a957600080fd5b5061023c6104b8366004612347565b60036020526000908152604090205481565b3480156104d657600080fd5b506102066104e53660046122e2565b611a6b565b3480156104f657600080fd5b5061023c60005481565b34801561050c57600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054057600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561057457600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a857600080fd5b506102066105b73660046122e2565b611bf6565b3480156105c857600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105fc57600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561063057600080fd5b506102a37f000000000000000000000000000000000000000000000000000000000000000081565b34801561066457600080fd5b506102066106733660046122e2565b611eb5565b34801561068457600080fd5b506106986106933660046124de565b61209b565b6040516102469190612534565b3480156106b157600080fd5b5061023c60045481565b6102066106c9366004612360565b612162565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610760573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610784919061254e565b6107a95760405162461bcd60e51b81526004016107a090612570565b60405180910390fd5b6107b281611986565b600083815260026020526040902054146107de5760405162461bcd60e51b81526004016107a09061259f565b60c08101516001600160a01b0316156108395760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016107a0565b60008160a0015160028111156108515761085161251e565b1461089e5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016107a0565b3360c08201526108ad81611986565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161094c5761094c6125c7565b0403111561098f5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107a0565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a125760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016107a0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9491906125dd565b7f000000000000000000000000000000000000000000000000000000000000000014610af65760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016107a0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7891906125f6565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610beb5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016107a0565b60015483118015610bfb57508115155b15610c3e57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610c4781611986565b60008481526002602052604090205403610ca4578051829003610c7057600160a0820152610c8b565b60c08101516001600160a01b031615610c8b57600260a08201525b610c9481611986565b6000848152600260205260409020555b505050565b6000610cd57f000000000000000000000000000000000000000000000000000000000000000042612613565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d455760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b60448201526064016107a0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610da3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc791906125dd565b7f000000000000000000000000000000000000000000000000000000000000000014610e295760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016107a0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eab91906125f6565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610f1e5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016107a0565b8060055410610f665760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016107a0565b8160045414610fae57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15b5050565b6006546001600160a01b03163314610fc957600080fd5b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561105b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107f919061254e565b61109b5760405162461bcd60e51b81526004016107a090612570565b806110b85760405162461bcd60e51b81526004016107a09061259f565b6000828152600260205260409020541561110a5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016107a0565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261115090611986565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a91016108ed565b604085106111d65760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016107a0565b6000848484846040516020016111ef9493929190612635565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561126f57600088888381811061123157611231612677565b9050602002013590508281111561125657826000528060205260406000209250611266565b8060005282602052604060002092505b50600101611215565b5080600054146112b25760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016107a0565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156113275760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016107a0565b6000838152600360205260408082206001851b84179055516001600160a01b03891690611357908990899061268d565b6000604051808303816000865af19150503d8060008114611394576040519150601f19603f3d011682016040523d82523d6000602084013e611399565b606091505b50509050806113ea5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016107a0565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b611446610442368390038301836124de565b600083815260026020526040902054146114725760405162461bcd60e51b81526004016107a09061259f565b600261148460c0830160a0840161269d565b60028111156114955761149561251e565b146114d65760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016107a0565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561156857600080fd5b505af115801561157c573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb90506115c160e0840160c08501612501565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af115801561162e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611652919061254e565b610fae5760405162461bcd60e51b81526004016107a090612570565b61167781611986565b600083815260026020526040902054146116a35760405162461bcd60e51b81526004016107a09061259f565b60018160a0015160028111156116bb576116bb61251e565b146116f85760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016107a0565b60008281526002602052604081205560c08101516001600160a01b03161561182e57604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561179b57600080fd5b505af11580156117af573d6000803e3d6000fd5b50505050602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb9060440161160f565b602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb9060440161160f565b6006546001600160a01b031633146118c057600080fd5b6118c981611986565b600083815260026020526040902054146118f55760405162461bcd60e51b81526004016107a09061259f565b63ffffffff42811660608301524316608082015261191281611986565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610fa5565b60006119807f000000000000000000000000000000000000000000000000000000000000000083612613565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986119bb9890979691016126b8565b604051602081830303815290604052805190602001209050919050565b6006546001600160a01b031633146119ef57600080fd5b6006546001600160a01b03163314611a495760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016107a0565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611abe57611abe6125c7565b04031115611b015760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107a0565b611b0a81611986565b60008381526002602052604090205414611b365760405162461bcd60e51b81526004016107a09061259f565b60c08101516001600160a01b031615611b885760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016107a0565b600154821115611bd057600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611be081611986565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c4957611c496125c7565b040311611c8a5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107a0565b611c9381611986565b60008381526002602052604090205414611cbf5760405162461bcd60e51b81526004016107a09061259f565b60008160a001516002811115611cd757611cd761251e565b14611d165760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107a0565b60c08101516001600160a01b031615610fae5760208101516001600160a01b0316611dc8576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb9060440161160f565b60c0810180516000909152611ddc82611986565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015611e75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e99919061254e565b610ca45760405162461bcd60e51b81526004016107a090612570565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611f0857611f086125c7565b040311611f495760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107a0565b611f5281611986565b60008381526002602052604090205414611f7e5760405162461bcd60e51b81526004016107a09061259f565b60008160a001516002811115611f9657611f9661251e565b14611fd55760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107a0565b60208101516001600160a01b031615610fae5760c08101516001600160a01b031661208757600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb9060440161160f565b6020810180516000909152611ddc82611986565b6000816060015163ffffffff166000036120b757506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff16420310156120f357506003919050565b60006005836060015163ffffffff16420381612111576121116125c7565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612155576001925061215a565b600092505b50505b919050565b61216c8282610fb2565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526121b383826118a9565b63ffffffff4281166060830152431660808201526121d18382611a6b565b600160a0820152610ca4838261166e565b6001600160a01b03811681146121f757600080fd5b50565b803561215d816121e2565b803563ffffffff8116811461215d57600080fd5b80356003811061215d57600080fd5b600060e0828403121561223a57600080fd5b60405160e0810181811067ffffffffffffffff8211171561226b57634e487b7160e01b600052604160045260246000fd5b60405282358152905080612281602084016121fa565b602082015261229260408401612205565b60408201526122a360608401612205565b60608201526122b460808401612205565b60808201526122c560a08401612219565b60a08201526122d660c084016121fa565b60c08201525092915050565b60008061010083850312156122f657600080fd5b823591506123078460208501612228565b90509250929050565b6000806000610120848603121561232657600080fd5b833592506020840135915061233e8560408601612228565b90509250925092565b60006020828403121561235957600080fd5b5035919050565b6000806040838503121561237357600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461215d57600080fd5b60008083601f8401126123ac57600080fd5b50813567ffffffffffffffff8111156123c457600080fd5b6020830191508360208285010111156123dc57600080fd5b9250929050565b600080600080600080608087890312156123fc57600080fd5b863567ffffffffffffffff8082111561241457600080fd5b818901915089601f83011261242857600080fd5b81358181111561243757600080fd5b8a60208260051b850101111561244c57600080fd5b6020830198508097505061246260208a01612382565b955061247060408a016121fa565b9450606089013591508082111561248657600080fd5b5061249389828a0161239a565b979a9699509497509295939492505050565b6000808284036101008112156124ba57600080fd5b8335925060e0601f19820112156124d057600080fd5b506020830190509250929050565b600060e082840312156124f057600080fd5b6124fa8383612228565b9392505050565b60006020828403121561251357600080fd5b81356124fa816121e2565b634e487b7160e01b600052602160045260246000fd5b60208101600483106125485761254861251e565b91905290565b60006020828403121561256057600080fd5b815180151581146124fa57600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156125ef57600080fd5b5051919050565b60006020828403121561260857600080fd5b81516124fa816121e2565b60008261263057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156126af57600080fd5b6124fa82612219565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106127105761271061251e565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122018f7fb97cc06e2b7d4c5a2fa1b875c83f4019ff7829e45e77de46ca321593b0a64736f6c63430008120033", + "numDeployments": 3, + "solcInputHash": "6b0b750c6eee9aa0a5e450d1f0bbb2d2", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IWETH\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_weth\":\"The address of the WETH contract on Gnosis.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by receiving a message from the AMB.\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":\"VeaOutboxArbToGnosisDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/tokens/gnosis/IWETH.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n IWETH public immutable weth; // The address of the WETH contract on Gnosis.\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 internal immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 _epoch, bytes32 _stateRoot);\\n\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n weth = _weth;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerDelayLimit by receiving a message from the AMB.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n // If _newSequencerDelayLimit > timeout * epochPeriod, then the bridge will shutdown.\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external virtual {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch has not yet passed.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.challenger, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x621689dc95671db595076306497c677a91238979e114854dc3292ec984286a29\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToGnosis/VeaOutboxArbToGnosis.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Chiado.\\n/// Note: This contract is deployed on Chiado.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public override onlyByDevnetOperator {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth\\n )\\n VeaOutboxArbToGnosis(\\n _deposit,\\n _epochPeriod,\\n _minChallengePeriod,\\n _timeoutEpochs,\\n _amb,\\n _routerArbToGnosis,\\n _sequencerDelayLimit,\\n _maxMissingBlocks,\\n _routerChainId,\\n _weth\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xf0586aed26d7bd8cc6b397f996d6d7220abb2f8676670749d81d7f6133ad8a27\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/tokens/gnosis/IWETH.sol\":{\"content\":\"// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5daaf60d11ee2075260d0f3adfb22b1c536db983/contracts/token/ERC20/BurnableToken.sol\\n// implementation: https://gnosisscan.io/address/0xf8d1677c8a0c961938bf2f9adc3f3cfda759a9d9#code\\n// proxy: https://gnosisscan.io/token/0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1#readProxyContract\\n\\n/**\\n * @title Burnable Token\\n * @dev Token that can be irreversibly burned (destroyed).\\n */\\ninterface IWETH {\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n event Burn(address indexed burner, uint256 value);\\n\\n /**\\n * @dev Burns a specific amount of tokens.\\n * @param _value The amount of token to be burned.\\n */\\n function burn(uint256 _value) external;\\n\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Transfer tokens from one address to another\\n * @param _from address The address which you want to send tokens from\\n * @param _to address The address which you want to transfer to\\n * @param _value uint256 the amount of tokens to be transferred\\n */\\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd7cb8c8585a387464c451c2ff81ad3f9f02e291fe0dad802ff84646ff18d1eb2\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101e06040523480156200001257600080fd5b5060405162002b0538038062002b0583398101604081905262000035916200012f565b60e08a90526101608990526101a08790526101808890526001600160a01b0380871660805280861660a05260048590556101c0849052610140839052811660c052898989898989898989896200008d60028b620001e0565b610100819052620000a08b600262000203565b620000ac919062000223565b6101205261016051600190620000c39042620001e0565b620000cf919062000223565b6001819055505050505050505050505033600660006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050505050505050505062000239565b6001600160a01b03811681146200012c57600080fd5b50565b6000806000806000806000806000806101408b8d0312156200015057600080fd5b8a51995060208b0151985060408b0151975060608b0151965060808b0151620001798162000116565b60a08c01519096506200018c8162000116565b8095505060c08b0151935060e08b015192506101008b015191506101208b0151620001b78162000116565b809150509295989b9194979a5092959850565b634e487b7160e01b600052601160045260246000fd5b600082620001fe57634e487b7160e01b600052601260045260246000fd5b500490565b80820281158282048414176200021d576200021d620001ca565b92915050565b818103818111156200021d576200021d620001ca565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c051612734620003d1600039600081816104d301526120ed015260008181610507015281816108bc01528181611a3501528181611bc00152611e7f01526000818161058f015261208101526000818161053b015281816108e001528181610c710152818161192301528181611a5901528181611be40152611ea3015260008181610a570152610d8a0152600081816115af015261179f0152600081816114be01526116f10152600081816105c3015281816106aa01528181610fa50152818161181a01528181611d3901528181611dce0152611ff8015260008181610366015281816106d001528181610fcb015281816114e40152818161155001528181611717015281816117c50152818161184001528181611d5f01528181611df4015261201e0152600081816105f701528181610b440152610e7701526000818161022f0152818161095b015281816109d501528181610ab901528181610ca601528181610d080152610dec01526127346000f3fe6080604052600436106101e35760003560e01c80638a619a7111610102578063b633b94411610095578063da2b7bc411610064578063da2b7bc414610619578063df19e6ff14610639578063e813a75514610666578063eedcf2a91461067c57600080fd5b8063b633b9441461055d578063c2114a161461057d578063d0e30db0146105b1578063d5e6a9df146105e557600080fd5b80639588eca2116100d15780639588eca2146104ab578063aa22a1c6146104c1578063b044397e146104f5578063b5b7a1841461052957600080fd5b80638a619a711461041e5780638ad3a8f71461043e57806390df63b71461045e578063930f28af1461048b57600080fd5b806331ddf7431161017a57806349b4299e1161014957806349b4299e146103a85780634a439cfe146103c8578063541adcca146103e85780637ffc2a6e1461040857600080fd5b806331ddf743146103145780633ce43cfd146103345780633fc8cef3146103545780634788cb381461038857600080fd5b80632639c060116101b65780632639c0601461029157806327ee6bdd146102be5780632c192519146102d457806331d14457146102f457600080fd5b806301139b68146101e85780630f0adca5146101fd5780631062b39a1461021d578063222ae7861461026e575b600080fd5b6101fb6101f63660046122aa565b61068f565b005b34801561020957600080fd5b506101fb6102183660046122d8565b6108ba565b34801561022957600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561027a57600080fd5b50610283610c6a565b604051908152602001610265565b34801561029d57600080fd5b506102836102ac36600461230f565b60026020526000908152604090205481565b3480156102ca57600080fd5b5061028360015481565b3480156102e057600080fd5b506101fb6102ef366004612328565b610c9b565b34801561030057600080fd5b506101fb61030f366004612328565b610f73565b34801561032057600080fd5b506101fb61032f3660046123ab565b61115c565b34801561034057600080fd5b506101fb61034f36600461246d565b6113fc565b34801561036057600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b34801561039457600080fd5b506101fb6103a33660046122aa565b611636565b3480156103b457600080fd5b506101fb6103c33660046122aa565b611871565b3480156103d457600080fd5b506102836103e336600461230f565b61191c565b3480156103f457600080fd5b506102836104033660046124a6565b61194e565b34801561041457600080fd5b5061028360055481565b34801561042a57600080fd5b506101fb6104393660046124c9565b6119a0565b34801561044a57600080fd5b50600654610251906001600160a01b031681565b34801561046a57600080fd5b5061028361047936600461230f565b60036020526000908152604090205481565b34801561049757600080fd5b506101fb6104a63660046122aa565b611a33565b3480156104b757600080fd5b5061028360005481565b3480156104cd57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561050157600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561053557600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561056957600080fd5b506101fb6105783660046122aa565b611bbe565b34801561058957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105bd57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f157600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b34801561062557600080fd5b506101fb6106343660046122aa565b611e7d565b34801561064557600080fd5b506106596106543660046124a6565b612063565b60405161026591906124fc565b34801561067257600080fd5b5061028360045481565b6101fb61068a366004612328565b61212a565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610721573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107459190612516565b61076a5760405162461bcd60e51b815260040161076190612538565b60405180910390fd5b6107738161194e565b6000838152600260205260409020541461079f5760405162461bcd60e51b815260040161076190612567565b60c08101516001600160a01b0316156107fa5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610761565b60008160a001516002811115610812576108126124e6565b1461085f5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610761565b3360c082015261086e8161194e565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090d5761090d61258f565b040311156109505760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610761565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109d35760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610761565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5591906125a5565b7f000000000000000000000000000000000000000000000000000000000000000014610ab75760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610761565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3991906125be565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610bac5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610761565b60015483118015610bbc57508115155b15610bff57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610c088161194e565b60008481526002602052604090205403610c65578051829003610c3157600160a0820152610c4c565b60c08101516001600160a01b031615610c4c57600260a08201525b610c558161194e565b6000848152600260205260409020555b505050565b6000610c967f0000000000000000000000000000000000000000000000000000000000000000426125db565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d065760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610761565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8891906125a5565b7f000000000000000000000000000000000000000000000000000000000000000014610dea5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610761565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6c91906125be565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610edf5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610761565b8060055410610f275760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b6044820152606401610761565b8160045414610f6f57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15b5050565b6006546001600160a01b03163314610f8a57600080fd5b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561101c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110409190612516565b61105c5760405162461bcd60e51b815260040161076190612538565b806110795760405162461bcd60e51b815260040161076190612567565b600082815260026020526040902054156110cb5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610761565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526111119061194e565b60008381526002602090815260409182902092909255805184815291820183905233917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d5791016108ae565b6040851061119e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610761565b6000848484846040516020016111b794939291906125fd565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156112375760008888838181106111f9576111f961263f565b9050602002013590508281111561121e5782600052806020526040600020925061122e565b8060005282602052604060002092505b506001016111dd565b50806000541461127a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610761565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112ef5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610761565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061131f9089908990612655565b6000604051808303816000865af19150503d806000811461135c576040519150601f19603f3d011682016040523d82523d6000602084013e611361565b606091505b50509050806113b25760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610761565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61140e610403368390038301836124a6565b6000838152600260205260409020541461143a5760405162461bcd60e51b815260040161076190612567565b600261144c60c0830160a08401612665565b600281111561145d5761145d6124e6565b1461149e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610761565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561153057600080fd5b505af1158015611544573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061158960e0840160c085016124c9565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af11580156115f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161a9190612516565b610f6f5760405162461bcd60e51b815260040161076190612538565b61163f8161194e565b6000838152600260205260409020541461166b5760405162461bcd60e51b815260040161076190612567565b60018160a001516002811115611683576116836124e6565b146116c05760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610761565b60008281526002602052604081205560c08101516001600160a01b0316156117f657604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561176357600080fd5b505af1158015611777573d6000803e3d6000fd5b50505050602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115d7565b602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115d7565b6006546001600160a01b0316331461188857600080fd5b6118918161194e565b600083815260026020526040902054146118bd5760405162461bcd60e51b815260040161076190612567565b63ffffffff4281166060830152431660808201526118da8161194e565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610f66565b60006119487f0000000000000000000000000000000000000000000000000000000000000000836125db565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611983989097969101612680565b604051602081830303815290604052805190602001209050919050565b6006546001600160a01b031633146119b757600080fd5b6006546001600160a01b03163314611a115760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610761565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a8657611a8661258f565b04031115611ac95760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610761565b611ad28161194e565b60008381526002602052604090205414611afe5760405162461bcd60e51b815260040161076190612567565b60c08101516001600160a01b031615611b505760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610761565b600154821115611b9857600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611ba88161194e565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c1157611c1161258f565b040311611c525760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610761565b611c5b8161194e565b60008381526002602052604090205414611c875760405162461bcd60e51b815260040161076190612567565b60008160a001516002811115611c9f57611c9f6124e6565b14611cde5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610761565b60c08101516001600160a01b031615610f6f5760208101516001600160a01b0316611d90576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115d7565b60c0810180516000909152611da48261194e565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015611e3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e619190612516565b610c655760405162461bcd60e51b815260040161076190612538565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ed057611ed061258f565b040311611f115760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610761565b611f1a8161194e565b60008381526002602052604090205414611f465760405162461bcd60e51b815260040161076190612567565b60008160a001516002811115611f5e57611f5e6124e6565b14611f9d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610761565b60208101516001600160a01b031615610f6f5760c08101516001600160a01b031661204f57600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115d7565b6020810180516000909152611da48261194e565b6000816060015163ffffffff1660000361207f57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff16420310156120bb57506003919050565b60006005836060015163ffffffff164203816120d9576120d961258f565b608085015163ffffffff16919004019050437f00000000000000000000000000000000000000000000000000000000000000008183031161211d5760019250612122565b600092505b50505b919050565b6121348282610f73565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261217b8382611871565b63ffffffff4281166060830152431660808201526121998382611a33565b600160a0820152610c658382611636565b6001600160a01b03811681146121bf57600080fd5b50565b8035612125816121aa565b803563ffffffff8116811461212557600080fd5b80356003811061212557600080fd5b600060e0828403121561220257600080fd5b60405160e0810181811067ffffffffffffffff8211171561223357634e487b7160e01b600052604160045260246000fd5b60405282358152905080612249602084016121c2565b602082015261225a604084016121cd565b604082015261226b606084016121cd565b606082015261227c608084016121cd565b608082015261228d60a084016121e1565b60a082015261229e60c084016121c2565b60c08201525092915050565b60008061010083850312156122be57600080fd5b823591506122cf84602085016121f0565b90509250929050565b600080600061012084860312156122ee57600080fd5b833592506020840135915061230685604086016121f0565b90509250925092565b60006020828403121561232157600080fd5b5035919050565b6000806040838503121561233b57600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461212557600080fd5b60008083601f84011261237457600080fd5b50813567ffffffffffffffff81111561238c57600080fd5b6020830191508360208285010111156123a457600080fd5b9250929050565b600080600080600080608087890312156123c457600080fd5b863567ffffffffffffffff808211156123dc57600080fd5b818901915089601f8301126123f057600080fd5b8135818111156123ff57600080fd5b8a60208260051b850101111561241457600080fd5b6020830198508097505061242a60208a0161234a565b955061243860408a016121c2565b9450606089013591508082111561244e57600080fd5b5061245b89828a01612362565b979a9699509497509295939492505050565b60008082840361010081121561248257600080fd5b8335925060e0601f198201121561249857600080fd5b506020830190509250929050565b600060e082840312156124b857600080fd5b6124c283836121f0565b9392505050565b6000602082840312156124db57600080fd5b81356124c2816121aa565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612510576125106124e6565b91905290565b60006020828403121561252857600080fd5b815180151581146124c257600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156125b757600080fd5b5051919050565b6000602082840312156125d057600080fd5b81516124c2816121aa565b6000826125f857634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561267757600080fd5b6124c2826121e1565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106126d8576126d86124e6565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220f42e1bfed5051197c44c7324e2206d07e94b08f047231a0764df362b30e8daae64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101e35760003560e01c80638a619a7111610102578063b633b94411610095578063da2b7bc411610064578063da2b7bc414610619578063df19e6ff14610639578063e813a75514610666578063eedcf2a91461067c57600080fd5b8063b633b9441461055d578063c2114a161461057d578063d0e30db0146105b1578063d5e6a9df146105e557600080fd5b80639588eca2116100d15780639588eca2146104ab578063aa22a1c6146104c1578063b044397e146104f5578063b5b7a1841461052957600080fd5b80638a619a711461041e5780638ad3a8f71461043e57806390df63b71461045e578063930f28af1461048b57600080fd5b806331ddf7431161017a57806349b4299e1161014957806349b4299e146103a85780634a439cfe146103c8578063541adcca146103e85780637ffc2a6e1461040857600080fd5b806331ddf743146103145780633ce43cfd146103345780633fc8cef3146103545780634788cb381461038857600080fd5b80632639c060116101b65780632639c0601461029157806327ee6bdd146102be5780632c192519146102d457806331d14457146102f457600080fd5b806301139b68146101e85780630f0adca5146101fd5780631062b39a1461021d578063222ae7861461026e575b600080fd5b6101fb6101f63660046122aa565b61068f565b005b34801561020957600080fd5b506101fb6102183660046122d8565b6108ba565b34801561022957600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561027a57600080fd5b50610283610c6a565b604051908152602001610265565b34801561029d57600080fd5b506102836102ac36600461230f565b60026020526000908152604090205481565b3480156102ca57600080fd5b5061028360015481565b3480156102e057600080fd5b506101fb6102ef366004612328565b610c9b565b34801561030057600080fd5b506101fb61030f366004612328565b610f73565b34801561032057600080fd5b506101fb61032f3660046123ab565b61115c565b34801561034057600080fd5b506101fb61034f36600461246d565b6113fc565b34801561036057600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b34801561039457600080fd5b506101fb6103a33660046122aa565b611636565b3480156103b457600080fd5b506101fb6103c33660046122aa565b611871565b3480156103d457600080fd5b506102836103e336600461230f565b61191c565b3480156103f457600080fd5b506102836104033660046124a6565b61194e565b34801561041457600080fd5b5061028360055481565b34801561042a57600080fd5b506101fb6104393660046124c9565b6119a0565b34801561044a57600080fd5b50600654610251906001600160a01b031681565b34801561046a57600080fd5b5061028361047936600461230f565b60036020526000908152604090205481565b34801561049757600080fd5b506101fb6104a63660046122aa565b611a33565b3480156104b757600080fd5b5061028360005481565b3480156104cd57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561050157600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561053557600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561056957600080fd5b506101fb6105783660046122aa565b611bbe565b34801561058957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105bd57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f157600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b34801561062557600080fd5b506101fb6106343660046122aa565b611e7d565b34801561064557600080fd5b506106596106543660046124a6565b612063565b60405161026591906124fc565b34801561067257600080fd5b5061028360045481565b6101fb61068a366004612328565b61212a565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610721573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107459190612516565b61076a5760405162461bcd60e51b815260040161076190612538565b60405180910390fd5b6107738161194e565b6000838152600260205260409020541461079f5760405162461bcd60e51b815260040161076190612567565b60c08101516001600160a01b0316156107fa5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610761565b60008160a001516002811115610812576108126124e6565b1461085f5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610761565b3360c082015261086e8161194e565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090d5761090d61258f565b040311156109505760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610761565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109d35760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610761565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5591906125a5565b7f000000000000000000000000000000000000000000000000000000000000000014610ab75760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610761565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3991906125be565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610bac5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610761565b60015483118015610bbc57508115155b15610bff57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610c088161194e565b60008481526002602052604090205403610c65578051829003610c3157600160a0820152610c4c565b60c08101516001600160a01b031615610c4c57600260a08201525b610c558161194e565b6000848152600260205260409020555b505050565b6000610c967f0000000000000000000000000000000000000000000000000000000000000000426125db565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d065760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610761565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8891906125a5565b7f000000000000000000000000000000000000000000000000000000000000000014610dea5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610761565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6c91906125be565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610edf5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610761565b8060055410610f275760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b6044820152606401610761565b8160045414610f6f57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15b5050565b6006546001600160a01b03163314610f8a57600080fd5b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561101c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110409190612516565b61105c5760405162461bcd60e51b815260040161076190612538565b806110795760405162461bcd60e51b815260040161076190612567565b600082815260026020526040902054156110cb5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610761565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526111119061194e565b60008381526002602090815260409182902092909255805184815291820183905233917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d5791016108ae565b6040851061119e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610761565b6000848484846040516020016111b794939291906125fd565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156112375760008888838181106111f9576111f961263f565b9050602002013590508281111561121e5782600052806020526040600020925061122e565b8060005282602052604060002092505b506001016111dd565b50806000541461127a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610761565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112ef5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610761565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061131f9089908990612655565b6000604051808303816000865af19150503d806000811461135c576040519150601f19603f3d011682016040523d82523d6000602084013e611361565b606091505b50509050806113b25760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610761565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61140e610403368390038301836124a6565b6000838152600260205260409020541461143a5760405162461bcd60e51b815260040161076190612567565b600261144c60c0830160a08401612665565b600281111561145d5761145d6124e6565b1461149e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610761565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561153057600080fd5b505af1158015611544573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061158960e0840160c085016124c9565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af11580156115f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161a9190612516565b610f6f5760405162461bcd60e51b815260040161076190612538565b61163f8161194e565b6000838152600260205260409020541461166b5760405162461bcd60e51b815260040161076190612567565b60018160a001516002811115611683576116836124e6565b146116c05760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610761565b60008281526002602052604081205560c08101516001600160a01b0316156117f657604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561176357600080fd5b505af1158015611777573d6000803e3d6000fd5b50505050602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115d7565b602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115d7565b6006546001600160a01b0316331461188857600080fd5b6118918161194e565b600083815260026020526040902054146118bd5760405162461bcd60e51b815260040161076190612567565b63ffffffff4281166060830152431660808201526118da8161194e565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610f66565b60006119487f0000000000000000000000000000000000000000000000000000000000000000836125db565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611983989097969101612680565b604051602081830303815290604052805190602001209050919050565b6006546001600160a01b031633146119b757600080fd5b6006546001600160a01b03163314611a115760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610761565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a8657611a8661258f565b04031115611ac95760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610761565b611ad28161194e565b60008381526002602052604090205414611afe5760405162461bcd60e51b815260040161076190612567565b60c08101516001600160a01b031615611b505760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610761565b600154821115611b9857600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611ba88161194e565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c1157611c1161258f565b040311611c525760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610761565b611c5b8161194e565b60008381526002602052604090205414611c875760405162461bcd60e51b815260040161076190612567565b60008160a001516002811115611c9f57611c9f6124e6565b14611cde5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610761565b60c08101516001600160a01b031615610f6f5760208101516001600160a01b0316611d90576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115d7565b60c0810180516000909152611da48261194e565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015611e3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e619190612516565b610c655760405162461bcd60e51b815260040161076190612538565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ed057611ed061258f565b040311611f115760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610761565b611f1a8161194e565b60008381526002602052604090205414611f465760405162461bcd60e51b815260040161076190612567565b60008160a001516002811115611f5e57611f5e6124e6565b14611f9d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610761565b60208101516001600160a01b031615610f6f5760c08101516001600160a01b031661204f57600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115d7565b6020810180516000909152611da48261194e565b6000816060015163ffffffff1660000361207f57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff16420310156120bb57506003919050565b60006005836060015163ffffffff164203816120d9576120d961258f565b608085015163ffffffff16919004019050437f00000000000000000000000000000000000000000000000000000000000000008183031161211d5760019250612122565b600092505b50505b919050565b6121348282610f73565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261217b8382611871565b63ffffffff4281166060830152431660808201526121998382611a33565b600160a0820152610c658382611636565b6001600160a01b03811681146121bf57600080fd5b50565b8035612125816121aa565b803563ffffffff8116811461212557600080fd5b80356003811061212557600080fd5b600060e0828403121561220257600080fd5b60405160e0810181811067ffffffffffffffff8211171561223357634e487b7160e01b600052604160045260246000fd5b60405282358152905080612249602084016121c2565b602082015261225a604084016121cd565b604082015261226b606084016121cd565b606082015261227c608084016121cd565b608082015261228d60a084016121e1565b60a082015261229e60c084016121c2565b60c08201525092915050565b60008061010083850312156122be57600080fd5b823591506122cf84602085016121f0565b90509250929050565b600080600061012084860312156122ee57600080fd5b833592506020840135915061230685604086016121f0565b90509250925092565b60006020828403121561232157600080fd5b5035919050565b6000806040838503121561233b57600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461212557600080fd5b60008083601f84011261237457600080fd5b50813567ffffffffffffffff81111561238c57600080fd5b6020830191508360208285010111156123a457600080fd5b9250929050565b600080600080600080608087890312156123c457600080fd5b863567ffffffffffffffff808211156123dc57600080fd5b818901915089601f8301126123f057600080fd5b8135818111156123ff57600080fd5b8a60208260051b850101111561241457600080fd5b6020830198508097505061242a60208a0161234a565b955061243860408a016121c2565b9450606089013591508082111561244e57600080fd5b5061245b89828a01612362565b979a9699509497509295939492505050565b60008082840361010081121561248257600080fd5b8335925060e0601f198201121561249857600080fd5b506020830190509250929050565b600060e082840312156124b857600080fd5b6124c283836121f0565b9392505050565b6000602082840312156124db57600080fd5b81356124c2816121aa565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612510576125106124e6565b91905290565b60006020828403121561252857600080fd5b815180151581146124c257600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156125b757600080fd5b5051919050565b6000602082840312156125d057600080fd5b81516124c2816121aa565b6000826125f857634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561267757600080fd5b6124c2826121e1565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106126d8576126d86124e6565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220f42e1bfed5051197c44c7324e2206d07e94b08f047231a0764df362b30e8daae64736f6c63430008120033", "devdoc": { "details": "Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).", "events": { @@ -1101,10 +1088,11 @@ "_epoch": "The epoch associated with the challenged claim." } }, - "Claimed(address,bytes32)": { + "Claimed(address,uint256,bytes32)": { "details": "Watchers check this event to challenge fraud.", "params": { "_claimer": "The address of the claimer.", + "_epoch": "The epoch associated with the claim.", "_stateRoot": "The state root of the claim." } }, @@ -1170,7 +1158,6 @@ "_amb": "The address of the AMB contract on Gnosis.", "_deposit": "The deposit amount to submit a claim in wei.", "_epochPeriod": "The duration of each epoch.", - "_maxClaimDelayEpochs": "The maximum number of epochs that can be claimed in the past.", "_maxMissingBlocks": "The maximum number of blocks that can be missing in a challenge period.", "_minChallengePeriod": "The minimum time window to challenge a claim.", "_routerArbToGnosis": "The address of the router on Ethereum that routes from Arbitrum to Gnosis.", @@ -1289,7 +1276,7 @@ "storageLayout": { "storage": [ { - "astId": 2593, + "astId": 1438, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "stateRoot", "offset": 0, @@ -1297,7 +1284,7 @@ "type": "t_bytes32" }, { - "astId": 2595, + "astId": 1440, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "latestVerifiedEpoch", "offset": 0, @@ -1305,7 +1292,7 @@ "type": "t_uint256" }, { - "astId": 2599, + "astId": 1444, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "claimHashes", "offset": 0, @@ -1313,7 +1300,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2603, + "astId": 1448, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "relayed", "offset": 0, @@ -1321,7 +1308,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2605, + "astId": 1450, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "sequencerDelayLimit", "offset": 0, @@ -1329,7 +1316,7 @@ "type": "t_uint256" }, { - "astId": 2607, + "astId": 1452, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "timestampDelayUpdated", "offset": 0, @@ -1337,7 +1324,7 @@ "type": "t_uint256" }, { - "astId": 6994, + "astId": 3362, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "devnetOperator", "offset": 0, diff --git a/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json b/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json index 8b610253..478b9914 100644 --- a/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json +++ b/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x0E459f63db78E2d5E8DC16a717F30A3d24cb79c2", + "address": "0x9cF5c011e2A4CB7797413f311A35AcB021071c35", "abi": [ { "inputs": [ @@ -52,11 +52,6 @@ "internalType": "contract IWETH", "name": "_weth", "type": "address" - }, - { - "internalType": "uint256", - "name": "_maxClaimDelayEpochs", - "type": "uint256" } ], "stateMutability": "nonpayable", @@ -90,6 +85,12 @@ "name": "_claimer", "type": "address" }, + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, { "indexed": false, "internalType": "bytes32", @@ -440,19 +441,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "maxClaimDelayEpochs", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "maxMissingBlocks", @@ -1013,19 +1001,19 @@ "type": "function" } ], - "transactionHash": "0xca2595eacb679b6a7de49b1dec749a34272a2eac4424381a7cfb5f827778b371", + "transactionHash": "0x63ff133667d56fb584e0a722bc3874702a2e75cc14fdca2bfef4a8058f7e3241", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x0E459f63db78E2d5E8DC16a717F30A3d24cb79c2", + "contractAddress": "0x9cF5c011e2A4CB7797413f311A35AcB021071c35", "transactionIndex": 0, - "gasUsed": "2369491", + "gasUsed": "2306024", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xdfef23a75a6371610e5826865409b8c12e4f0660d1ac9de6add617299d25e0f2", - "transactionHash": "0xca2595eacb679b6a7de49b1dec749a34272a2eac4424381a7cfb5f827778b371", + "blockHash": "0xe7bf551e42e516eb1d9c99a53628bf266be748d1fba2f720c272016fd175615a", + "transactionHash": "0x63ff133667d56fb584e0a722bc3874702a2e75cc14fdca2bfef4a8058f7e3241", "logs": [], - "blockNumber": 4696221, - "cumulativeGasUsed": "2369491", + "blockNumber": 4697829, + "cumulativeGasUsed": "2306024", "status": 1, "byzantium": true }, @@ -1035,18 +1023,17 @@ 10800, 1000000, "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0x931FA807020231bCE1340Be8E1e5054207BbAFEd", + "0x7Ee8Ad48EfA4765257a49486421A4CF11389E480", 86400, 1000000, 5, - "0x8d74e5e4DA11629537C4575cB0f33b4F0Dfa42EB", - 3 + "0x8d74e5e4DA11629537C4575cB0f33b4F0Dfa42EB" ], - "numDeployments": 1, - "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IWETH\",\"name\":\"_weth\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxClaimDelayEpochs\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxClaimDelayEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxClaimDelayEpochs\":\"The maximum number of epochs that can be claimed in the past.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_weth\":\"The address of the WETH contract on Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by receiving a message from the AMB.\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":\"VeaOutboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/tokens/gnosis/IWETH.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n IWETH public immutable weth; // The address of the WETH contract on Gnosis.\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 internal immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable maxClaimDelayEpochs; // The maximum number of epochs that can be claimed in the past.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth,\\n uint256 _maxClaimDelayEpochs\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n weth = _weth;\\n maxClaimDelayEpochs = _maxClaimDelayEpochs;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerDelayLimit by receiving a message from the AMB.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n // If _newSequencerDelayLimit > timeout * epochPeriod, then the bridge will shutdown.\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external virtual {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n // If the sequencerDelayLimit is set larger than block.timestamp - epochPeriod by arbitrum governance, \\n // the checked arithmetic will revert due to underflow and the bridge will shutdown.\\n uint256 minEpochSequencerDelay = (block.timestamp - sequencerDelayLimit) / epochPeriod - 1;\\n\\n uint256 minEpochClaim;\\n \\n unchecked{\\n // deployer sets maxClaimDelayEpochs so no underflow is possible\\n minEpochClaim = block.timestamp / epochPeriod - maxClaimDelayEpochs;\\n }\\n\\n uint256 minClaimableEpoch = minEpochSequencerDelay > minEpochClaim ? minEpochSequencerDelay : minEpochClaim;\\n \\n require(_epoch >= minClaimableEpoch, \\\"Invalid epoch.\\\");\\n\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.challenger, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x920fcd2e271fd8871f3ca84c160e7e799f4e80da241acbec81b12789d2330c68\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/tokens/gnosis/IWETH.sol\":{\"content\":\"// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5daaf60d11ee2075260d0f3adfb22b1c536db983/contracts/token/ERC20/BurnableToken.sol\\n// implementation: https://gnosisscan.io/address/0xf8d1677c8a0c961938bf2f9adc3f3cfda759a9d9#code\\n// proxy: https://gnosisscan.io/token/0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1#readProxyContract\\n\\n/**\\n * @title Burnable Token\\n * @dev Token that can be irreversibly burned (destroyed).\\n */\\ninterface IWETH {\\n \\n event Transfer(address indexed from, address indexed to, uint256 value);\\n event Burn(address indexed burner, uint256 value);\\n\\n /**\\n * @dev Burns a specific amount of tokens.\\n * @param _value The amount of token to be burned.\\n */\\n function burn(uint256 _value) external;\\n\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Transfer tokens from one address to another\\n * @param _from address The address which you want to send tokens from\\n * @param _to address The address which you want to transfer to\\n * @param _value uint256 the amount of tokens to be transferred\\n */\\n function transferFrom(\\n address _from,\\n address _to,\\n uint256 _value\\n ) external returns (bool);\\n}\",\"keccak256\":\"0x0f616e96c8713b9eecd9ded1aac026c64398e9a3633bd8273e6ac7bd8f800f7d\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6102006040523480156200001257600080fd5b5060405162002cee38038062002cee8339810160408190526200003591620000f9565b60e08b90526101608a90526101c08890526101808990526001600160a01b0380881660805286811660a05260048690556101e0859052610140849052821660c0526101a08190526200008960028c620001b5565b6101008190526200009c8c6002620001d8565b620000a89190620001f8565b6101205261016051600190620000bf9042620001b5565b620000cb9190620001f8565b600155506200020e9950505050505050505050565b6001600160a01b0381168114620000f657600080fd5b50565b60008060008060008060008060008060006101608c8e0312156200011c57600080fd5b8b519a5060208c0151995060408c0151985060608c0151975060808c01516200014581620000e0565b60a08d01519097506200015881620000e0565b8096505060c08c0151945060e08c015193506101008c015192506101208c01516200018381620000e0565b809250506101408c015190509295989b509295989b9093969950565b634e487b7160e01b600052601160045260246000fd5b600082620001d357634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001f257620001f26200019f565b92915050565b81810381811115620001f257620001f26200019f565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e051612921620003cd600039600081816104b1015261231e0152600081816104e50152818161088601528181611bfd01528181611df101526120b00152600081816101f901526110d301526000818161056d01526122b2015260008181610519015281816108aa01528181610c3b015281816110130152818161108c015281816110f4015281816119c501528181611b7e01528181611c2101528181611e1501526120d4015260008181610a210152610d54015260006116cf0152600081816115de01526118320152600081816105a10152818161067501528181610f570152818161196201528181611f6a01528181611fff01526122290152600081816103840152818161069b01528181610f7d015281816116040152818161167001528181611858015281816118c40152818161190701528181611f9001528181612025015261224f0152600081816105d501528181610b0e0152610e41015260008181610260015281816109250152818161099f01528181610a8301528181610c7001528181610cd20152610db601526129216000f3fe6080604052600436106101cd5760003560e01c8063541adcca116100f7578063b5b7a18411610095578063d5e6a9df11610064578063d5e6a9df146105c3578063da2b7bc4146105f7578063df19e6ff14610617578063e813a7551461064457600080fd5b8063b5b7a18414610507578063b633b9441461053b578063c2114a161461055b578063d0e30db01461058f57600080fd5b8063930f28af116100d1578063930f28af146104695780639588eca214610489578063aa22a1c61461049f578063b044397e146104d357600080fd5b8063541adcca146104065780637ffc2a6e1461042657806390df63b71461043c57600080fd5b80632c1925191161016f5780633fc8cef31161013e5780633fc8cef3146103725780634788cb38146103a657806349b4299e146103c65780634a439cfe146103e657600080fd5b80632c192519146102f257806331d144571461031257806331ddf743146103325780633ce43cfd1461035257600080fd5b80631062b39a116101ab5780631062b39a1461024e578063222ae7861461029a5780632639c060146102af57806327ee6bdd146102dc57600080fd5b806301139b68146101d2578063042c4aaf146101e75780630f0adca51461022e575b600080fd5b6101e56101e036600461245b565b61065a565b005b3480156101f357600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561023a57600080fd5b506101e5610249366004612489565b610884565b34801561025a57600080fd5b506102827f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610225565b3480156102a657600080fd5b5061021b610c34565b3480156102bb57600080fd5b5061021b6102ca3660046124c0565b60026020526000908152604090205481565b3480156102e857600080fd5b5061021b60015481565b3480156102fe57600080fd5b506101e561030d3660046124d9565b610c65565b34801561031e57600080fd5b506101e561032d3660046124d9565b610f3c565b34801561033e57600080fd5b506101e561034d36600461255c565b61127c565b34801561035e57600080fd5b506101e561036d36600461261e565b61151c565b34801561037e57600080fd5b506102827f000000000000000000000000000000000000000000000000000000000000000081565b3480156103b257600080fd5b506101e56103c136600461261e565b611756565b3480156103d257600080fd5b506101e56103e136600461245b565b61198e565b3480156103f257600080fd5b5061021b6104013660046124c0565b611b77565b34801561041257600080fd5b5061021b610421366004612657565b611ba9565b34801561043257600080fd5b5061021b60055481565b34801561044857600080fd5b5061021b6104573660046124c0565b60036020526000908152604090205481565b34801561047557600080fd5b506101e561048436600461245b565b611bfb565b34801561049557600080fd5b5061021b60005481565b3480156104ab57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104df57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561051357600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054757600080fd5b506101e561055636600461245b565b611def565b34801561056757600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561059b57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105cf57600080fd5b506102827f000000000000000000000000000000000000000000000000000000000000000081565b34801561060357600080fd5b506101e561061236600461245b565b6120ae565b34801561062357600080fd5b50610637610632366004612657565b612294565b6040516102259190612690565b34801561065057600080fd5b5061021b60045481565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156106ec573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071091906126aa565b6107355760405162461bcd60e51b815260040161072c906126cc565b60405180910390fd5b61073e81611ba9565b6000838152600260205260409020541461076a5760405162461bcd60e51b815260040161072c906126fb565b60c08101516001600160a01b0316156107c55760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161072c565b60008160a0015160028111156107dd576107dd61267a565b1461082a5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e000000000000000000604482015260640161072c565b3360c082015261083981611ba9565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816108d7576108d7612723565b0403111561091a5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161072c565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461099d5760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b606482015260840161072c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109fb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1f9190612739565b7f000000000000000000000000000000000000000000000000000000000000000014610a815760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161072c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610adf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b039190612752565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b765760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161072c565b60015483118015610b8657508115155b15610bc957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610bd281611ba9565b60008481526002602052604090205403610c2f578051829003610bfb57600160a0820152610c16565b60c08101516001600160a01b031615610c1657600260a08201525b610c1f81611ba9565b6000848152600260205260409020555b505050565b6000610c607f000000000000000000000000000000000000000000000000000000000000000042612785565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cd05760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b604482015260640161072c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d529190612739565b7f000000000000000000000000000000000000000000000000000000000000000014610db45760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161072c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e369190612752565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610ea95760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161072c565b8060055410610ef15760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161072c565b8160045414610f3857600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b5050565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610fce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff291906126aa565b61100e5760405162461bcd60e51b815260040161072c906126cc565b6110387f000000000000000000000000000000000000000000000000000000000000000042612785565b82106110865760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e00000000000000604482015260640161072c565b600060017f0000000000000000000000000000000000000000000000000000000000000000600454426110b991906127a7565b6110c39190612785565b6110cd91906127a7565b905060007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000428161112157611121612723565b0403905060008183116111345781611136565b825b9050808510156111795760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21032b837b1b41760911b604482015260640161072c565b836111965760405162461bcd60e51b815260040161072c906126fb565b600085815260026020526040902054156111e85760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161072c565b6040805160e0810182528581523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261122e90611ba9565b600086815260026020908152604091829020929092555185815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050505050565b604085106112be5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161072c565b6000848484846040516020016112d794939291906127ba565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015611357576000888883818110611319576113196127fc565b9050602002013590508281111561133e5782600052806020526040600020925061134e565b8060005282602052604060002092505b506001016112fd565b50806000541461139a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161072c565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561140f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161072c565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061143f9089908990612812565b6000604051808303816000865af19150503d806000811461147c576040519150601f19603f3d011682016040523d82523d6000602084013e611481565b606091505b50509050806114d25760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161072c565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61152e61042136839003830183612657565b6000838152600260205260409020541461155a5760405162461bcd60e51b815260040161072c906126fb565b600261156c60c0830160a08401612822565b600281111561157d5761157d61267a565b146115be5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b604482015260640161072c565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561165057600080fd5b505af1158015611664573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb90506116a960e0840160c0850161283d565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af1158015611716573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173a91906126aa565b610f385760405162461bcd60e51b815260040161072c906126cc565b61176861042136839003830183612657565b600083815260026020526040902054146117945760405162461bcd60e51b815260040161072c906126fb565b60016117a660c0830160a08401612822565b60028111156117b7576117b761267a565b146117f45760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b604482015260640161072c565b600082815260026020526040812081905561181560e0830160c0840161283d565b6001600160a01b0316146118fd57604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b1580156118a457600080fd5b505af11580156118b8573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb90506116a9604084016020850161283d565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb61193c604084016020850161283d565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044016116f7565b61199781611ba9565b600083815260026020526040902054146119c35760405162461bcd60e51b815260040161072c906126fb565b7f00000000000000000000000000000000000000000000000000000000000000006004546119f1919061285a565b6040820151611a069063ffffffff16426127a7565b1015611a695760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b606482015260840161072c565b6000611a7482612294565b90506002816003811115611a8a57611a8a61267a565b1480611aa757506000816003811115611aa557611aa561267a565b145b611b105760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b606482015260840161072c565b63ffffffff428116606084015243166080830152611b2d82611ba9565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b6000611ba37f000000000000000000000000000000000000000000000000000000000000000083612785565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611bde98909796910161286d565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c4e57611c4e612723565b04031115611c915760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161072c565b611c9a81611ba9565b60008381526002602052604090205414611cc65760405162461bcd60e51b815260040161072c906126fb565b60c08101516001600160a01b031615611d185760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161072c565b6001611d2382612294565b6003811115611d3457611d3461267a565b14611d815760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e0000000000604482015260640161072c565b600154821115611dc957600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611dd981611ba9565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611e4257611e42612723565b040311611e835760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161072c565b611e8c81611ba9565b60008381526002602052604090205414611eb85760405162461bcd60e51b815260040161072c906126fb565b60008160a001516002811115611ed057611ed061267a565b14611f0f5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161072c565b60c08101516001600160a01b031615610f385760208101516001600160a01b0316611fc1576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116f7565b60c0810180516000909152611fd582611ba9565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af115801561206e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061209291906126aa565b610c2f5760405162461bcd60e51b815260040161072c906126cc565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161210157612101612723565b0403116121425760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161072c565b61214b81611ba9565b600083815260026020526040902054146121775760405162461bcd60e51b815260040161072c906126fb565b60008160a00151600281111561218f5761218f61267a565b146121ce5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161072c565b60208101516001600160a01b031615610f385760c08101516001600160a01b031661228057600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116f7565b6020810180516000909152611fd582611ba9565b6000816060015163ffffffff166000036122b057506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff16420310156122ec57506003919050565b60006005836060015163ffffffff1642038161230a5761230a612723565b608085015163ffffffff16919004019050437f00000000000000000000000000000000000000000000000000000000000000008183031161234e5760019250612353565b600092505b50505b919050565b6001600160a01b038116811461237057600080fd5b50565b80356123568161235b565b803563ffffffff8116811461235657600080fd5b80356003811061235657600080fd5b600060e082840312156123b357600080fd5b60405160e0810181811067ffffffffffffffff821117156123e457634e487b7160e01b600052604160045260246000fd5b604052823581529050806123fa60208401612373565b602082015261240b6040840161237e565b604082015261241c6060840161237e565b606082015261242d6080840161237e565b608082015261243e60a08401612392565b60a082015261244f60c08401612373565b60c08201525092915050565b600080610100838503121561246f57600080fd5b8235915061248084602085016123a1565b90509250929050565b6000806000610120848603121561249f57600080fd5b83359250602084013591506124b785604086016123a1565b90509250925092565b6000602082840312156124d257600080fd5b5035919050565b600080604083850312156124ec57600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461235657600080fd5b60008083601f84011261252557600080fd5b50813567ffffffffffffffff81111561253d57600080fd5b60208301915083602082850101111561255557600080fd5b9250929050565b6000806000806000806080878903121561257557600080fd5b863567ffffffffffffffff8082111561258d57600080fd5b818901915089601f8301126125a157600080fd5b8135818111156125b057600080fd5b8a60208260051b85010111156125c557600080fd5b602083019850809750506125db60208a016124fb565b95506125e960408a01612373565b945060608901359150808211156125ff57600080fd5b5061260c89828a01612513565b979a9699509497509295939492505050565b60008082840361010081121561263357600080fd5b8335925060e0601f198201121561264957600080fd5b506020830190509250929050565b600060e0828403121561266957600080fd5b61267383836123a1565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106126a4576126a461267a565b91905290565b6000602082840312156126bc57600080fd5b8151801515811461267357600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561274b57600080fd5b5051919050565b60006020828403121561276457600080fd5b81516126738161235b565b634e487b7160e01b600052601160045260246000fd5b6000826127a257634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115611ba357611ba361276f565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561283457600080fd5b61267382612392565b60006020828403121561284f57600080fd5b81356126738161235b565b80820180821115611ba357611ba361276f565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106128c5576128c561267a565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212202f82660bc137ed112ddf8b3a1c3b1ba058d63556c98cae41a34d4f4d2528f9f964736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101cd5760003560e01c8063541adcca116100f7578063b5b7a18411610095578063d5e6a9df11610064578063d5e6a9df146105c3578063da2b7bc4146105f7578063df19e6ff14610617578063e813a7551461064457600080fd5b8063b5b7a18414610507578063b633b9441461053b578063c2114a161461055b578063d0e30db01461058f57600080fd5b8063930f28af116100d1578063930f28af146104695780639588eca214610489578063aa22a1c61461049f578063b044397e146104d357600080fd5b8063541adcca146104065780637ffc2a6e1461042657806390df63b71461043c57600080fd5b80632c1925191161016f5780633fc8cef31161013e5780633fc8cef3146103725780634788cb38146103a657806349b4299e146103c65780634a439cfe146103e657600080fd5b80632c192519146102f257806331d144571461031257806331ddf743146103325780633ce43cfd1461035257600080fd5b80631062b39a116101ab5780631062b39a1461024e578063222ae7861461029a5780632639c060146102af57806327ee6bdd146102dc57600080fd5b806301139b68146101d2578063042c4aaf146101e75780630f0adca51461022e575b600080fd5b6101e56101e036600461245b565b61065a565b005b3480156101f357600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561023a57600080fd5b506101e5610249366004612489565b610884565b34801561025a57600080fd5b506102827f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610225565b3480156102a657600080fd5b5061021b610c34565b3480156102bb57600080fd5b5061021b6102ca3660046124c0565b60026020526000908152604090205481565b3480156102e857600080fd5b5061021b60015481565b3480156102fe57600080fd5b506101e561030d3660046124d9565b610c65565b34801561031e57600080fd5b506101e561032d3660046124d9565b610f3c565b34801561033e57600080fd5b506101e561034d36600461255c565b61127c565b34801561035e57600080fd5b506101e561036d36600461261e565b61151c565b34801561037e57600080fd5b506102827f000000000000000000000000000000000000000000000000000000000000000081565b3480156103b257600080fd5b506101e56103c136600461261e565b611756565b3480156103d257600080fd5b506101e56103e136600461245b565b61198e565b3480156103f257600080fd5b5061021b6104013660046124c0565b611b77565b34801561041257600080fd5b5061021b610421366004612657565b611ba9565b34801561043257600080fd5b5061021b60055481565b34801561044857600080fd5b5061021b6104573660046124c0565b60036020526000908152604090205481565b34801561047557600080fd5b506101e561048436600461245b565b611bfb565b34801561049557600080fd5b5061021b60005481565b3480156104ab57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104df57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561051357600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054757600080fd5b506101e561055636600461245b565b611def565b34801561056757600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561059b57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105cf57600080fd5b506102827f000000000000000000000000000000000000000000000000000000000000000081565b34801561060357600080fd5b506101e561061236600461245b565b6120ae565b34801561062357600080fd5b50610637610632366004612657565b612294565b6040516102259190612690565b34801561065057600080fd5b5061021b60045481565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156106ec573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071091906126aa565b6107355760405162461bcd60e51b815260040161072c906126cc565b60405180910390fd5b61073e81611ba9565b6000838152600260205260409020541461076a5760405162461bcd60e51b815260040161072c906126fb565b60c08101516001600160a01b0316156107c55760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161072c565b60008160a0015160028111156107dd576107dd61267a565b1461082a5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e000000000000000000604482015260640161072c565b3360c082015261083981611ba9565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816108d7576108d7612723565b0403111561091a5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161072c565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461099d5760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b606482015260840161072c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109fb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1f9190612739565b7f000000000000000000000000000000000000000000000000000000000000000014610a815760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161072c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610adf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b039190612752565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b765760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161072c565b60015483118015610b8657508115155b15610bc957600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610bd281611ba9565b60008481526002602052604090205403610c2f578051829003610bfb57600160a0820152610c16565b60c08101516001600160a01b031615610c1657600260a08201525b610c1f81611ba9565b6000848152600260205260409020555b505050565b6000610c607f000000000000000000000000000000000000000000000000000000000000000042612785565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cd05760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b604482015260640161072c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d529190612739565b7f000000000000000000000000000000000000000000000000000000000000000014610db45760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161072c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e369190612752565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610ea95760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161072c565b8060055410610ef15760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161072c565b8160045414610f3857600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b5050565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610fce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff291906126aa565b61100e5760405162461bcd60e51b815260040161072c906126cc565b6110387f000000000000000000000000000000000000000000000000000000000000000042612785565b82106110865760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e00000000000000604482015260640161072c565b600060017f0000000000000000000000000000000000000000000000000000000000000000600454426110b991906127a7565b6110c39190612785565b6110cd91906127a7565b905060007f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000428161112157611121612723565b0403905060008183116111345781611136565b825b9050808510156111795760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21032b837b1b41760911b604482015260640161072c565b836111965760405162461bcd60e51b815260040161072c906126fb565b600085815260026020526040902054156111e85760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161072c565b6040805160e0810182528581523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261122e90611ba9565b600086815260026020908152604091829020929092555185815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a25050505050565b604085106112be5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161072c565b6000848484846040516020016112d794939291906127ba565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015611357576000888883818110611319576113196127fc565b9050602002013590508281111561133e5782600052806020526040600020925061134e565b8060005282602052604060002092505b506001016112fd565b50806000541461139a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161072c565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561140f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161072c565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061143f9089908990612812565b6000604051808303816000865af19150503d806000811461147c576040519150601f19603f3d011682016040523d82523d6000602084013e611481565b606091505b50509050806114d25760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161072c565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61152e61042136839003830183612657565b6000838152600260205260409020541461155a5760405162461bcd60e51b815260040161072c906126fb565b600261156c60c0830160a08401612822565b600281111561157d5761157d61267a565b146115be5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b604482015260640161072c565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561165057600080fd5b505af1158015611664573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb90506116a960e0840160c0850161283d565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af1158015611716573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173a91906126aa565b610f385760405162461bcd60e51b815260040161072c906126cc565b61176861042136839003830183612657565b600083815260026020526040902054146117945760405162461bcd60e51b815260040161072c906126fb565b60016117a660c0830160a08401612822565b60028111156117b7576117b761267a565b146117f45760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b604482015260640161072c565b600082815260026020526040812081905561181560e0830160c0840161283d565b6001600160a01b0316146118fd57604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b1580156118a457600080fd5b505af11580156118b8573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb90506116a9604084016020850161283d565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb61193c604084016020850161283d565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044016116f7565b61199781611ba9565b600083815260026020526040902054146119c35760405162461bcd60e51b815260040161072c906126fb565b7f00000000000000000000000000000000000000000000000000000000000000006004546119f1919061285a565b6040820151611a069063ffffffff16426127a7565b1015611a695760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b606482015260840161072c565b6000611a7482612294565b90506002816003811115611a8a57611a8a61267a565b1480611aa757506000816003811115611aa557611aa561267a565b145b611b105760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b606482015260840161072c565b63ffffffff428116606084015243166080830152611b2d82611ba9565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b6000611ba37f000000000000000000000000000000000000000000000000000000000000000083612785565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611bde98909796910161286d565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c4e57611c4e612723565b04031115611c915760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161072c565b611c9a81611ba9565b60008381526002602052604090205414611cc65760405162461bcd60e51b815260040161072c906126fb565b60c08101516001600160a01b031615611d185760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161072c565b6001611d2382612294565b6003811115611d3457611d3461267a565b14611d815760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e0000000000604482015260640161072c565b600154821115611dc957600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611dd981611ba9565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611e4257611e42612723565b040311611e835760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161072c565b611e8c81611ba9565b60008381526002602052604090205414611eb85760405162461bcd60e51b815260040161072c906126fb565b60008160a001516002811115611ed057611ed061267a565b14611f0f5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161072c565b60c08101516001600160a01b031615610f385760208101516001600160a01b0316611fc1576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116f7565b60c0810180516000909152611fd582611ba9565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af115801561206e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061209291906126aa565b610c2f5760405162461bcd60e51b815260040161072c906126cc565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161210157612101612723565b0403116121425760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161072c565b61214b81611ba9565b600083815260026020526040902054146121775760405162461bcd60e51b815260040161072c906126fb565b60008160a00151600281111561218f5761218f61267a565b146121ce5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161072c565b60208101516001600160a01b031615610f385760c08101516001600160a01b031661228057600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116f7565b6020810180516000909152611fd582611ba9565b6000816060015163ffffffff166000036122b057506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff16420310156122ec57506003919050565b60006005836060015163ffffffff1642038161230a5761230a612723565b608085015163ffffffff16919004019050437f00000000000000000000000000000000000000000000000000000000000000008183031161234e5760019250612353565b600092505b50505b919050565b6001600160a01b038116811461237057600080fd5b50565b80356123568161235b565b803563ffffffff8116811461235657600080fd5b80356003811061235657600080fd5b600060e082840312156123b357600080fd5b60405160e0810181811067ffffffffffffffff821117156123e457634e487b7160e01b600052604160045260246000fd5b604052823581529050806123fa60208401612373565b602082015261240b6040840161237e565b604082015261241c6060840161237e565b606082015261242d6080840161237e565b608082015261243e60a08401612392565b60a082015261244f60c08401612373565b60c08201525092915050565b600080610100838503121561246f57600080fd5b8235915061248084602085016123a1565b90509250929050565b6000806000610120848603121561249f57600080fd5b83359250602084013591506124b785604086016123a1565b90509250925092565b6000602082840312156124d257600080fd5b5035919050565b600080604083850312156124ec57600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461235657600080fd5b60008083601f84011261252557600080fd5b50813567ffffffffffffffff81111561253d57600080fd5b60208301915083602082850101111561255557600080fd5b9250929050565b6000806000806000806080878903121561257557600080fd5b863567ffffffffffffffff8082111561258d57600080fd5b818901915089601f8301126125a157600080fd5b8135818111156125b057600080fd5b8a60208260051b85010111156125c557600080fd5b602083019850809750506125db60208a016124fb565b95506125e960408a01612373565b945060608901359150808211156125ff57600080fd5b5061260c89828a01612513565b979a9699509497509295939492505050565b60008082840361010081121561263357600080fd5b8335925060e0601f198201121561264957600080fd5b506020830190509250929050565b600060e0828403121561266957600080fd5b61267383836123a1565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106126a4576126a461267a565b91905290565b6000602082840312156126bc57600080fd5b8151801515811461267357600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561274b57600080fd5b5051919050565b60006020828403121561276457600080fd5b81516126738161235b565b634e487b7160e01b600052601160045260246000fd5b6000826127a257634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115611ba357611ba361276f565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561283457600080fd5b61267382612392565b60006020828403121561284f57600080fd5b81356126738161235b565b80820180821115611ba357611ba361276f565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106128c5576128c561267a565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212202f82660bc137ed112ddf8b3a1c3b1ba058d63556c98cae41a34d4f4d2528f9f964736f6c63430008120033", + "numDeployments": 3, + "solcInputHash": "6b0b750c6eee9aa0a5e450d1f0bbb2d2", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IWETH\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_weth\":\"The address of the WETH contract on Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by receiving a message from the AMB.\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":\"VeaOutboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/tokens/gnosis/IWETH.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n IWETH public immutable weth; // The address of the WETH contract on Gnosis.\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 internal immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 _epoch, bytes32 _stateRoot);\\n\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n weth = _weth;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerDelayLimit by receiving a message from the AMB.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n // If _newSequencerDelayLimit > timeout * epochPeriod, then the bridge will shutdown.\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external virtual {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch has not yet passed.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.challenger, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x621689dc95671db595076306497c677a91238979e114854dc3292ec984286a29\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/tokens/gnosis/IWETH.sol\":{\"content\":\"// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5daaf60d11ee2075260d0f3adfb22b1c536db983/contracts/token/ERC20/BurnableToken.sol\\n// implementation: https://gnosisscan.io/address/0xf8d1677c8a0c961938bf2f9adc3f3cfda759a9d9#code\\n// proxy: https://gnosisscan.io/token/0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1#readProxyContract\\n\\n/**\\n * @title Burnable Token\\n * @dev Token that can be irreversibly burned (destroyed).\\n */\\ninterface IWETH {\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n event Burn(address indexed burner, uint256 value);\\n\\n /**\\n * @dev Burns a specific amount of tokens.\\n * @param _value The amount of token to be burned.\\n */\\n function burn(uint256 _value) external;\\n\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Transfer tokens from one address to another\\n * @param _from address The address which you want to send tokens from\\n * @param _to address The address which you want to transfer to\\n * @param _value uint256 the amount of tokens to be transferred\\n */\\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd7cb8c8585a387464c451c2ff81ad3f9f02e291fe0dad802ff84646ff18d1eb2\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101e06040523480156200001257600080fd5b5060405162002b9438038062002b948339810160408190526200003591620000f2565b60e08a90526101608990526101a08790526101808890526001600160a01b0380871660805285811660a05260048590556101c0849052610140839052811660c0526200008360028b620001a3565b610100819052620000968b6002620001c6565b620000a29190620001e6565b6101205261016051600190620000b99042620001a3565b620000c59190620001e6565b60015550620001fc98505050505050505050565b6001600160a01b0381168114620000ef57600080fd5b50565b6000806000806000806000806000806101408b8d0312156200011357600080fd5b8a51995060208b0151985060408b0151975060608b0151965060808b01516200013c81620000d9565b60a08c01519096506200014f81620000d9565b8095505060c08b0151935060e08b015192506101008b015191506101208b01516200017a81620000d9565b809150509295989b9194979a5092959850565b634e487b7160e01b600052601160045260246000fd5b600082620001c157634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001e057620001e06200018d565b92915050565b81810381811115620001e057620001e06200018d565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516127f96200039b6000396000818161047201526121f60152600081816104a60152818161084801528181611ad501528181611cc90152611f8801526000818161052e015261218a0152600081816104da0152818161086c01528181610bfd01528181610fd70152818161189d01528181611a5601528181611af901528181611ced0152611fac0152600081816109e30152610d16015260006115a70152600081816114b6015261170a0152600081816105620152818161063601528181610f190152818161183a01528181611e4201528181611ed701526121010152600081816103450152818161065c01528181610f3f015281816114dc01528181611548015281816117300152818161179c015281816117df01528181611e6801528181611efd015261212701526000818161059601528181610ad00152610e0301526000818161020e015281816108e70152818161096101528181610a4501528181610c3201528181610c940152610d7801526127f96000f3fe6080604052600436106101c25760003560e01c8063541adcca116100f7578063b5b7a18411610095578063d5e6a9df11610064578063d5e6a9df14610584578063da2b7bc4146105b8578063df19e6ff146105d8578063e813a7551461060557600080fd5b8063b5b7a184146104c8578063b633b944146104fc578063c2114a161461051c578063d0e30db01461055057600080fd5b8063930f28af116100d1578063930f28af1461042a5780639588eca21461044a578063aa22a1c614610460578063b044397e1461049457600080fd5b8063541adcca146103c75780637ffc2a6e146103e757806390df63b7146103fd57600080fd5b806331d14457116101645780633fc8cef31161013e5780633fc8cef3146103335780634788cb381461036757806349b4299e146103875780634a439cfe146103a757600080fd5b806331d14457146102d357806331ddf743146102f35780633ce43cfd1461031357600080fd5b8063222ae786116101a0578063222ae7861461024d5780632639c0601461027057806327ee6bdd1461029d5780632c192519146102b357600080fd5b806301139b68146101c75780630f0adca5146101dc5780631062b39a146101fc575b600080fd5b6101da6101d5366004612333565b61061b565b005b3480156101e857600080fd5b506101da6101f7366004612361565b610846565b34801561020857600080fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561025957600080fd5b50610262610bf6565b604051908152602001610244565b34801561027c57600080fd5b5061026261028b366004612398565b60026020526000908152604090205481565b3480156102a957600080fd5b5061026260015481565b3480156102bf57600080fd5b506101da6102ce3660046123b1565b610c27565b3480156102df57600080fd5b506101da6102ee3660046123b1565b610efe565b3480156102ff57600080fd5b506101da61030e366004612434565b611154565b34801561031f57600080fd5b506101da61032e3660046124f6565b6113f4565b34801561033f57600080fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b34801561037357600080fd5b506101da6103823660046124f6565b61162e565b34801561039357600080fd5b506101da6103a2366004612333565b611866565b3480156103b357600080fd5b506102626103c2366004612398565b611a4f565b3480156103d357600080fd5b506102626103e236600461252f565b611a81565b3480156103f357600080fd5b5061026260055481565b34801561040957600080fd5b50610262610418366004612398565b60036020526000908152604090205481565b34801561043657600080fd5b506101da610445366004612333565b611ad3565b34801561045657600080fd5b5061026260005481565b34801561046c57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a057600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d457600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561050857600080fd5b506101da610517366004612333565b611cc7565b34801561052857600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561055c57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561059057600080fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c457600080fd5b506101da6105d3366004612333565b611f86565b3480156105e457600080fd5b506105f86105f336600461252f565b61216c565b6040516102449190612568565b34801561061157600080fd5b5061026260045481565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156106ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d19190612582565b6106f65760405162461bcd60e51b81526004016106ed906125a4565b60405180910390fd5b6106ff81611a81565b6000838152600260205260409020541461072b5760405162461bcd60e51b81526004016106ed906125d3565b60c08101516001600160a01b0316156107865760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106ed565b60008160a00151600281111561079e5761079e612552565b146107eb5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106ed565b3360c08201526107fa81611a81565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610899576108996125fb565b040311156108dc5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106ed565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461095f5760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016106ed565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e19190612611565b7f000000000000000000000000000000000000000000000000000000000000000014610a435760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016106ed565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac5919061262a565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b385760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016106ed565b60015483118015610b4857508115155b15610b8b57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b9481611a81565b60008481526002602052604090205403610bf1578051829003610bbd57600160a0820152610bd8565b60c08101516001600160a01b031615610bd857600260a08201525b610be181611a81565b6000848152600260205260409020555b505050565b6000610c227f00000000000000000000000000000000000000000000000000000000000000004261265d565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c925760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b60448201526064016106ed565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cf0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d149190612611565b7f000000000000000000000000000000000000000000000000000000000000000014610d765760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016106ed565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df8919061262a565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610e6b5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016106ed565b8060055410610eb35760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106ed565b8160045414610efa57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b5050565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610f90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb49190612582565b610fd05760405162461bcd60e51b81526004016106ed906125a4565b6001610ffc7f00000000000000000000000000000000000000000000000000000000000000004261265d565b611006919061267f565b82146110545760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e0000000000000060448201526064016106ed565b806110715760405162461bcd60e51b81526004016106ed906125d3565b600082815260026020526040902054156110c35760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106ed565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261110990611a81565b60008381526002602090815260409182902092909255805184815291820183905233917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910161083a565b604085106111965760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106ed565b6000848484846040516020016111af9493929190612692565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561122f5760008888838181106111f1576111f16126d4565b9050602002013590508281111561121657826000528060205260406000209250611226565b8060005282602052604060002092505b506001016111d5565b5080600054146112725760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106ed565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112e75760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106ed565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061131790899089906126ea565b6000604051808303816000865af19150503d8060008114611354576040519150601f19603f3d011682016040523d82523d6000602084013e611359565b606091505b50509050806113aa5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106ed565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6114066103e23683900383018361252f565b600083815260026020526040902054146114325760405162461bcd60e51b81526004016106ed906125d3565b600261144460c0830160a084016126fa565b600281111561145557611455612552565b146114965760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106ed565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561152857600080fd5b505af115801561153c573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061158160e0840160c08501612715565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af11580156115ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116129190612582565b610efa5760405162461bcd60e51b81526004016106ed906125a4565b6116406103e23683900383018361252f565b6000838152600260205260409020541461166c5760405162461bcd60e51b81526004016106ed906125d3565b600161167e60c0830160a084016126fa565b600281111561168f5761168f612552565b146116cc5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106ed565b60008281526002602052604081208190556116ed60e0830160c08401612715565b6001600160a01b0316146117d557604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561177c57600080fd5b505af1158015611790573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb90506115816040840160208501612715565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb6118146040840160208501612715565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044016115cf565b61186f81611a81565b6000838152600260205260409020541461189b5760405162461bcd60e51b81526004016106ed906125d3565b7f00000000000000000000000000000000000000000000000000000000000000006004546118c99190612732565b60408201516118de9063ffffffff164261267f565b10156119415760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b60648201526084016106ed565b600061194c8261216c565b9050600281600381111561196257611962612552565b148061197f5750600081600381111561197d5761197d612552565b145b6119e85760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b60648201526084016106ed565b63ffffffff428116606084015243166080830152611a0582611a81565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b6000611a7b7f00000000000000000000000000000000000000000000000000000000000000008361265d565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611ab6989097969101612745565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b2657611b266125fb565b04031115611b695760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106ed565b611b7281611a81565b60008381526002602052604090205414611b9e5760405162461bcd60e51b81526004016106ed906125d3565b60c08101516001600160a01b031615611bf05760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106ed565b6001611bfb8261216c565b6003811115611c0c57611c0c612552565b14611c595760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e000000000060448201526064016106ed565b600154821115611ca157600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611cb181611a81565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d1a57611d1a6125fb565b040311611d5b5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106ed565b611d6481611a81565b60008381526002602052604090205414611d905760405162461bcd60e51b81526004016106ed906125d3565b60008160a001516002811115611da857611da8612552565b14611de75760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106ed565b60c08101516001600160a01b031615610efa5760208101516001600160a01b0316611e99576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115cf565b60c0810180516000909152611ead82611a81565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015611f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6a9190612582565b610bf15760405162461bcd60e51b81526004016106ed906125a4565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611fd957611fd96125fb565b04031161201a5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106ed565b61202381611a81565b6000838152600260205260409020541461204f5760405162461bcd60e51b81526004016106ed906125d3565b60008160a00151600281111561206757612067612552565b146120a65760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106ed565b60208101516001600160a01b031615610efa5760c08101516001600160a01b031661215857600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115cf565b6020810180516000909152611ead82611a81565b6000816060015163ffffffff1660000361218857506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff16420310156121c457506003919050565b60006005836060015163ffffffff164203816121e2576121e26125fb565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612226576001925061222b565b600092505b50505b919050565b6001600160a01b038116811461224857600080fd5b50565b803561222e81612233565b803563ffffffff8116811461222e57600080fd5b80356003811061222e57600080fd5b600060e0828403121561228b57600080fd5b60405160e0810181811067ffffffffffffffff821117156122bc57634e487b7160e01b600052604160045260246000fd5b604052823581529050806122d26020840161224b565b60208201526122e360408401612256565b60408201526122f460608401612256565b606082015261230560808401612256565b608082015261231660a0840161226a565b60a082015261232760c0840161224b565b60c08201525092915050565b600080610100838503121561234757600080fd5b823591506123588460208501612279565b90509250929050565b6000806000610120848603121561237757600080fd5b833592506020840135915061238f8560408601612279565b90509250925092565b6000602082840312156123aa57600080fd5b5035919050565b600080604083850312156123c457600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461222e57600080fd5b60008083601f8401126123fd57600080fd5b50813567ffffffffffffffff81111561241557600080fd5b60208301915083602082850101111561242d57600080fd5b9250929050565b6000806000806000806080878903121561244d57600080fd5b863567ffffffffffffffff8082111561246557600080fd5b818901915089601f83011261247957600080fd5b81358181111561248857600080fd5b8a60208260051b850101111561249d57600080fd5b602083019850809750506124b360208a016123d3565b95506124c160408a0161224b565b945060608901359150808211156124d757600080fd5b506124e489828a016123eb565b979a9699509497509295939492505050565b60008082840361010081121561250b57600080fd5b8335925060e0601f198201121561252157600080fd5b506020830190509250929050565b600060e0828403121561254157600080fd5b61254b8383612279565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061257c5761257c612552565b91905290565b60006020828403121561259457600080fd5b8151801515811461254b57600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561262357600080fd5b5051919050565b60006020828403121561263c57600080fd5b815161254b81612233565b634e487b7160e01b600052601160045260246000fd5b60008261267a57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115611a7b57611a7b612647565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561270c57600080fd5b61254b8261226a565b60006020828403121561272757600080fd5b813561254b81612233565b80820180821115611a7b57611a7b612647565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061279d5761279d612552565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212202838608f469e27ff16acc37107c1d8f295dd023bfd5b117a8b3b8510ff738c0064736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101c25760003560e01c8063541adcca116100f7578063b5b7a18411610095578063d5e6a9df11610064578063d5e6a9df14610584578063da2b7bc4146105b8578063df19e6ff146105d8578063e813a7551461060557600080fd5b8063b5b7a184146104c8578063b633b944146104fc578063c2114a161461051c578063d0e30db01461055057600080fd5b8063930f28af116100d1578063930f28af1461042a5780639588eca21461044a578063aa22a1c614610460578063b044397e1461049457600080fd5b8063541adcca146103c75780637ffc2a6e146103e757806390df63b7146103fd57600080fd5b806331d14457116101645780633fc8cef31161013e5780633fc8cef3146103335780634788cb381461036757806349b4299e146103875780634a439cfe146103a757600080fd5b806331d14457146102d357806331ddf743146102f35780633ce43cfd1461031357600080fd5b8063222ae786116101a0578063222ae7861461024d5780632639c0601461027057806327ee6bdd1461029d5780632c192519146102b357600080fd5b806301139b68146101c75780630f0adca5146101dc5780631062b39a146101fc575b600080fd5b6101da6101d5366004612333565b61061b565b005b3480156101e857600080fd5b506101da6101f7366004612361565b610846565b34801561020857600080fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561025957600080fd5b50610262610bf6565b604051908152602001610244565b34801561027c57600080fd5b5061026261028b366004612398565b60026020526000908152604090205481565b3480156102a957600080fd5b5061026260015481565b3480156102bf57600080fd5b506101da6102ce3660046123b1565b610c27565b3480156102df57600080fd5b506101da6102ee3660046123b1565b610efe565b3480156102ff57600080fd5b506101da61030e366004612434565b611154565b34801561031f57600080fd5b506101da61032e3660046124f6565b6113f4565b34801561033f57600080fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b34801561037357600080fd5b506101da6103823660046124f6565b61162e565b34801561039357600080fd5b506101da6103a2366004612333565b611866565b3480156103b357600080fd5b506102626103c2366004612398565b611a4f565b3480156103d357600080fd5b506102626103e236600461252f565b611a81565b3480156103f357600080fd5b5061026260055481565b34801561040957600080fd5b50610262610418366004612398565b60036020526000908152604090205481565b34801561043657600080fd5b506101da610445366004612333565b611ad3565b34801561045657600080fd5b5061026260005481565b34801561046c57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a057600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d457600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561050857600080fd5b506101da610517366004612333565b611cc7565b34801561052857600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561055c57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561059057600080fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c457600080fd5b506101da6105d3366004612333565b611f86565b3480156105e457600080fd5b506105f86105f336600461252f565b61216c565b6040516102449190612568565b34801561061157600080fd5b5061026260045481565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156106ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d19190612582565b6106f65760405162461bcd60e51b81526004016106ed906125a4565b60405180910390fd5b6106ff81611a81565b6000838152600260205260409020541461072b5760405162461bcd60e51b81526004016106ed906125d3565b60c08101516001600160a01b0316156107865760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106ed565b60008160a00151600281111561079e5761079e612552565b146107eb5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106ed565b3360c08201526107fa81611a81565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610899576108996125fb565b040311156108dc5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106ed565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461095f5760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016106ed565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e19190612611565b7f000000000000000000000000000000000000000000000000000000000000000014610a435760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016106ed565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac5919061262a565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b385760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016106ed565b60015483118015610b4857508115155b15610b8b57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b9481611a81565b60008481526002602052604090205403610bf1578051829003610bbd57600160a0820152610bd8565b60c08101516001600160a01b031615610bd857600260a08201525b610be181611a81565b6000848152600260205260409020555b505050565b6000610c227f00000000000000000000000000000000000000000000000000000000000000004261265d565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c925760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b60448201526064016106ed565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cf0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d149190612611565b7f000000000000000000000000000000000000000000000000000000000000000014610d765760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016106ed565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df8919061262a565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610e6b5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016106ed565b8060055410610eb35760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106ed565b8160045414610efa57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b5050565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610f90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb49190612582565b610fd05760405162461bcd60e51b81526004016106ed906125a4565b6001610ffc7f00000000000000000000000000000000000000000000000000000000000000004261265d565b611006919061267f565b82146110545760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e0000000000000060448201526064016106ed565b806110715760405162461bcd60e51b81526004016106ed906125d3565b600082815260026020526040902054156110c35760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106ed565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261110990611a81565b60008381526002602090815260409182902092909255805184815291820183905233917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910161083a565b604085106111965760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106ed565b6000848484846040516020016111af9493929190612692565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561122f5760008888838181106111f1576111f16126d4565b9050602002013590508281111561121657826000528060205260406000209250611226565b8060005282602052604060002092505b506001016111d5565b5080600054146112725760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106ed565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112e75760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106ed565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061131790899089906126ea565b6000604051808303816000865af19150503d8060008114611354576040519150601f19603f3d011682016040523d82523d6000602084013e611359565b606091505b50509050806113aa5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106ed565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6114066103e23683900383018361252f565b600083815260026020526040902054146114325760405162461bcd60e51b81526004016106ed906125d3565b600261144460c0830160a084016126fa565b600281111561145557611455612552565b146114965760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106ed565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561152857600080fd5b505af115801561153c573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061158160e0840160c08501612715565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af11580156115ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116129190612582565b610efa5760405162461bcd60e51b81526004016106ed906125a4565b6116406103e23683900383018361252f565b6000838152600260205260409020541461166c5760405162461bcd60e51b81526004016106ed906125d3565b600161167e60c0830160a084016126fa565b600281111561168f5761168f612552565b146116cc5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106ed565b60008281526002602052604081208190556116ed60e0830160c08401612715565b6001600160a01b0316146117d557604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561177c57600080fd5b505af1158015611790573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb90506115816040840160208501612715565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb6118146040840160208501612715565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044016115cf565b61186f81611a81565b6000838152600260205260409020541461189b5760405162461bcd60e51b81526004016106ed906125d3565b7f00000000000000000000000000000000000000000000000000000000000000006004546118c99190612732565b60408201516118de9063ffffffff164261267f565b10156119415760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b60648201526084016106ed565b600061194c8261216c565b9050600281600381111561196257611962612552565b148061197f5750600081600381111561197d5761197d612552565b145b6119e85760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b60648201526084016106ed565b63ffffffff428116606084015243166080830152611a0582611a81565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b6000611a7b7f00000000000000000000000000000000000000000000000000000000000000008361265d565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611ab6989097969101612745565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b2657611b266125fb565b04031115611b695760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106ed565b611b7281611a81565b60008381526002602052604090205414611b9e5760405162461bcd60e51b81526004016106ed906125d3565b60c08101516001600160a01b031615611bf05760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106ed565b6001611bfb8261216c565b6003811115611c0c57611c0c612552565b14611c595760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e000000000060448201526064016106ed565b600154821115611ca157600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611cb181611a81565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d1a57611d1a6125fb565b040311611d5b5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106ed565b611d6481611a81565b60008381526002602052604090205414611d905760405162461bcd60e51b81526004016106ed906125d3565b60008160a001516002811115611da857611da8612552565b14611de75760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106ed565b60c08101516001600160a01b031615610efa5760208101516001600160a01b0316611e99576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115cf565b60c0810180516000909152611ead82611a81565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015611f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6a9190612582565b610bf15760405162461bcd60e51b81526004016106ed906125a4565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611fd957611fd96125fb565b04031161201a5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106ed565b61202381611a81565b6000838152600260205260409020541461204f5760405162461bcd60e51b81526004016106ed906125d3565b60008160a00151600281111561206757612067612552565b146120a65760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106ed565b60208101516001600160a01b031615610efa5760c08101516001600160a01b031661215857600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115cf565b6020810180516000909152611ead82611a81565b6000816060015163ffffffff1660000361218857506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff16420310156121c457506003919050565b60006005836060015163ffffffff164203816121e2576121e26125fb565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612226576001925061222b565b600092505b50505b919050565b6001600160a01b038116811461224857600080fd5b50565b803561222e81612233565b803563ffffffff8116811461222e57600080fd5b80356003811061222e57600080fd5b600060e0828403121561228b57600080fd5b60405160e0810181811067ffffffffffffffff821117156122bc57634e487b7160e01b600052604160045260246000fd5b604052823581529050806122d26020840161224b565b60208201526122e360408401612256565b60408201526122f460608401612256565b606082015261230560808401612256565b608082015261231660a0840161226a565b60a082015261232760c0840161224b565b60c08201525092915050565b600080610100838503121561234757600080fd5b823591506123588460208501612279565b90509250929050565b6000806000610120848603121561237757600080fd5b833592506020840135915061238f8560408601612279565b90509250925092565b6000602082840312156123aa57600080fd5b5035919050565b600080604083850312156123c457600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461222e57600080fd5b60008083601f8401126123fd57600080fd5b50813567ffffffffffffffff81111561241557600080fd5b60208301915083602082850101111561242d57600080fd5b9250929050565b6000806000806000806080878903121561244d57600080fd5b863567ffffffffffffffff8082111561246557600080fd5b818901915089601f83011261247957600080fd5b81358181111561248857600080fd5b8a60208260051b850101111561249d57600080fd5b602083019850809750506124b360208a016123d3565b95506124c160408a0161224b565b945060608901359150808211156124d757600080fd5b506124e489828a016123eb565b979a9699509497509295939492505050565b60008082840361010081121561250b57600080fd5b8335925060e0601f198201121561252157600080fd5b506020830190509250929050565b600060e0828403121561254157600080fd5b61254b8383612279565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061257c5761257c612552565b91905290565b60006020828403121561259457600080fd5b8151801515811461254b57600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561262357600080fd5b5051919050565b60006020828403121561263c57600080fd5b815161254b81612233565b634e487b7160e01b600052601160045260246000fd5b60008261267a57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115611a7b57611a7b612647565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561270c57600080fd5b61254b8261226a565b60006020828403121561272757600080fd5b813561254b81612233565b80820180821115611a7b57611a7b612647565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061279d5761279d612552565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212202838608f469e27ff16acc37107c1d8f295dd023bfd5b117a8b3b8510ff738c0064736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.", "events": { @@ -1057,10 +1044,11 @@ "_epoch": "The epoch associated with the challenged claim." } }, - "Claimed(address,bytes32)": { + "Claimed(address,uint256,bytes32)": { "details": "Watchers check this event to challenge fraud.", "params": { "_claimer": "The address of the claimer.", + "_epoch": "The epoch associated with the claim.", "_stateRoot": "The state root of the claim." } }, @@ -1120,7 +1108,6 @@ "_amb": "The address of the AMB contract on Gnosis.", "_deposit": "The deposit amount to submit a claim in wei.", "_epochPeriod": "The duration of each epoch.", - "_maxClaimDelayEpochs": "The maximum number of epochs that can be claimed in the past.", "_maxMissingBlocks": "The maximum number of blocks that can be missing in a challenge period.", "_minChallengePeriod": "The minimum time window to challenge a claim.", "_routerArbToGnosis": "The address of the router on Ethereum that routes from Arbitrum to Gnosis.", @@ -1232,7 +1219,7 @@ "storageLayout": { "storage": [ { - "astId": 2593, + "astId": 1438, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "stateRoot", "offset": 0, @@ -1240,7 +1227,7 @@ "type": "t_bytes32" }, { - "astId": 2595, + "astId": 1440, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "latestVerifiedEpoch", "offset": 0, @@ -1248,7 +1235,7 @@ "type": "t_uint256" }, { - "astId": 2599, + "astId": 1444, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "claimHashes", "offset": 0, @@ -1256,7 +1243,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2603, + "astId": 1448, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "relayed", "offset": 0, @@ -1264,7 +1251,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2605, + "astId": 1450, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "sequencerDelayLimit", "offset": 0, @@ -1272,7 +1259,7 @@ "type": "t_uint256" }, { - "astId": 2607, + "astId": 1452, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "timestampDelayUpdated", "offset": 0, diff --git a/contracts/deployments/goerli/RouterArbToGnosisDevnet.json b/contracts/deployments/goerli/RouterArbToGnosisDevnet.json index 0dcab643..f39dfdb3 100644 --- a/contracts/deployments/goerli/RouterArbToGnosisDevnet.json +++ b/contracts/deployments/goerli/RouterArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x8Bf88E6474d93bD2Dc0d76CB3BE8809c6BB84148", + "address": "0xef62E517bE7e319458f41014C4d8864117381255", "abi": [ { "inputs": [ @@ -248,33 +248,33 @@ "type": "function" } ], - "transactionHash": "0xc4b88afad272ea5b7bced4a493612d6a2a7ff9b3f2c323a07136905a715114bc", + "transactionHash": "0x5b3301805207c51cb0b121bcd585b293ac4903b21177a25bcfbbbb8214500811", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x8Bf88E6474d93bD2Dc0d76CB3BE8809c6BB84148", - "transactionIndex": 65, + "contractAddress": "0xef62E517bE7e319458f41014C4d8864117381255", + "transactionIndex": 64, "gasUsed": "866965", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x3118894a1e770b5fd14ba78785e9f45dca529ffe25bb123e937584edf9748c35", - "transactionHash": "0xc4b88afad272ea5b7bced4a493612d6a2a7ff9b3f2c323a07136905a715114bc", + "blockHash": "0x2f754b4c7433ad347517224b88e1351df69c29160946727956b3611b5a390978", + "transactionHash": "0x5b3301805207c51cb0b121bcd585b293ac4903b21177a25bcfbbbb8214500811", "logs": [], - "blockNumber": 9254068, - "cumulativeGasUsed": "11931860", + "blockNumber": 9254597, + "cumulativeGasUsed": "9009996", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0x6164EA58a1f5359D2E54ea8eB9e5971B7C8dB0f1", - "0xE2067941210d684bA8171F7C9dF372931fC6c245" + "0x7CE671804C3bC9096669F37cE6a7419BA66b7fD8", + "0x660daB9A6436A814a6ae3a6f27b309356a4bE78c" ], - "numDeployments": 1, - "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_gasLimit\":\"The true batch gas limit for the epoch.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToGnosis {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Send the sequencer delay limit.\\n function sendSequencerDelayLimit() internal {\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _gasLimit The true batch gas limit for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, uint256 _gasLimit, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n\\n uint256 maxGasPerTx = amb.maxGasPerTx();\\n uint256 gasLimitCapped = _gasLimit > maxGasPerTx ? maxGasPerTx : _gasLimit;\\n\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, gasLimitCapped);\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xfc827e3a369ec32a1a85f9058905e56f6c43c41889b027070da878dccbfb873e\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n uint256 _gasLimit,\\n Claim memory _claim\\n ) external;\\n}\\n\",\"keccak256\":\"0x14b9a5be28d1954e86512cad4b6fcbc77646a30f7baefc84937fe4124db3cc37\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101006040523480156200001257600080fd5b506040516200102c3803806200102c833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610da06200028c6000396000818161010e015281816108b20152610a04015260008181610135015261064c01526000818160cf015281816107fe0152818161088301526109db015260008181610177015281816102c1015281816103e7015281816105ea01526106760152610da06000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063b1126dad1461015f578063e78cea9214610172578063e813a7551461019957600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100c861016d366004610b05565b6105df565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100b7565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b4f565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610baf565b50925050508181036103df5760008290556103aa61097a565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610baf565b509250505060005481111561051a5760008190556104e461097a565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b8b565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b8b565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008484836040516024016107b593929190610c3a565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263e5789d039260048083019391928290030181865afa158015610846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086a9190610cec565b9050600081851161087b578461087d565b815b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663dc8601b37f000000000000000000000000000000000000000000000000000000000000000086856040518463ffffffff1660e01b81526004016108f193929190610d05565b6020604051808303816000875af1158015610910573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109349190610cec565b9050877f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161096891815260200190565b60405180910390a25050505050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a719190610cec565b6040518463ffffffff1660e01b8152600401610a8f93929190610d05565b6020604051808303816000875af1158015610aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad29190610cec565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b600080600080848603610140811215610b1d57600080fd5b85359450602086013593506040860135925060e0605f1982011215610b4157600080fd5b509295919450926060019150565b80820180821115610b7057634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b9d57600080fd5b8151610ba881610b76565b9392505050565b60008060008060808587031215610bc557600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bf081610b76565b919050565b803563ffffffff81168114610bf057600080fd5b803560038110610bf057600080fd5b60038110610c3657634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c5e81610b76565b6001600160a01b03166060830152610c7860408401610bf5565b63ffffffff808216608085015280610c9260608701610bf5565b1660a085015280610ca560808701610bf5565b1660c08501525050610cb960a08401610c09565b610cc660e0840182610c18565b50610cd360c08401610be5565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cfe57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610d4157868101830151858201608001528201610d25565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea26469706673582212205413eef1ad93f5e4052a4ced1c2d29cd5325cb84b72663498aa3888f8eefd61c64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063b1126dad1461015f578063e78cea9214610172578063e813a7551461019957600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100c861016d366004610b05565b6105df565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100b7565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b4f565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610baf565b50925050508181036103df5760008290556103aa61097a565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610baf565b509250505060005481111561051a5760008190556104e461097a565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b8b565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b8b565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008484836040516024016107b593929190610c3a565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263e5789d039260048083019391928290030181865afa158015610846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086a9190610cec565b9050600081851161087b578461087d565b815b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663dc8601b37f000000000000000000000000000000000000000000000000000000000000000086856040518463ffffffff1660e01b81526004016108f193929190610d05565b6020604051808303816000875af1158015610910573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109349190610cec565b9050877f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161096891815260200190565b60405180910390a25050505050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a719190610cec565b6040518463ffffffff1660e01b8152600401610a8f93929190610d05565b6020604051808303816000875af1158015610aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad29190610cec565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b600080600080848603610140811215610b1d57600080fd5b85359450602086013593506040860135925060e0605f1982011215610b4157600080fd5b509295919450926060019150565b80820180821115610b7057634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b9d57600080fd5b8151610ba881610b76565b9392505050565b60008060008060808587031215610bc557600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bf081610b76565b919050565b803563ffffffff81168114610bf057600080fd5b803560038110610bf057600080fd5b60038110610c3657634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c5e81610b76565b6001600160a01b03166060830152610c7860408401610bf5565b63ffffffff808216608085015280610c9260608701610bf5565b1660a085015280610ca560808701610bf5565b1660c08501525050610cb960a08401610c09565b610cc660e0840182610c18565b50610cd360c08401610be5565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cfe57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610d4157868101830151858201608001528201610d25565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea26469706673582212205413eef1ad93f5e4052a4ced1c2d29cd5325cb84b72663498aa3888f8eefd61c64736f6c63430008120033", + "numDeployments": 3, + "solcInputHash": "916b5e2210e8e15d34b48798389f67fe", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_gasLimit\":\"The true batch gas limit for the epoch.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToGnosis {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Send the sequencer delay limit.\\n function sendSequencerDelayLimit() internal {\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _gasLimit The true batch gas limit for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, uint256 _gasLimit, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n\\n uint256 maxGasPerTx = amb.maxGasPerTx();\\n uint256 gasLimitCapped = _gasLimit > maxGasPerTx ? maxGasPerTx : _gasLimit;\\n\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, gasLimitCapped);\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xfc827e3a369ec32a1a85f9058905e56f6c43c41889b027070da878dccbfb873e\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, uint256 _gasLimit, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x084735de7ee128aa169f11f18a4a7de6656309e941b8df502e66b24a4bf93d0f\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b506040516200102c3803806200102c833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610da06200028c6000396000818161010e015281816108b20152610a04015260008181610135015261064c01526000818160cf015281816107fe0152818161088301526109db015260008181610177015281816102c1015281816103e7015281816105ea01526106760152610da06000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063b1126dad1461015f578063e78cea9214610172578063e813a7551461019957600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100c861016d366004610b05565b6105df565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100b7565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b4f565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610baf565b50925050508181036103df5760008290556103aa61097a565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610baf565b509250505060005481111561051a5760008190556104e461097a565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b8b565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b8b565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008484836040516024016107b593929190610c3a565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263e5789d039260048083019391928290030181865afa158015610846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086a9190610cec565b9050600081851161087b578461087d565b815b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663dc8601b37f000000000000000000000000000000000000000000000000000000000000000086856040518463ffffffff1660e01b81526004016108f193929190610d05565b6020604051808303816000875af1158015610910573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109349190610cec565b9050877f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161096891815260200190565b60405180910390a25050505050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a719190610cec565b6040518463ffffffff1660e01b8152600401610a8f93929190610d05565b6020604051808303816000875af1158015610aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad29190610cec565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b600080600080848603610140811215610b1d57600080fd5b85359450602086013593506040860135925060e0605f1982011215610b4157600080fd5b509295919450926060019150565b80820180821115610b7057634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b9d57600080fd5b8151610ba881610b76565b9392505050565b60008060008060808587031215610bc557600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bf081610b76565b919050565b803563ffffffff81168114610bf057600080fd5b803560038110610bf057600080fd5b60038110610c3657634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c5e81610b76565b6001600160a01b03166060830152610c7860408401610bf5565b63ffffffff808216608085015280610c9260608701610bf5565b1660a085015280610ca560808701610bf5565b1660c08501525050610cb960a08401610c09565b610cc660e0840182610c18565b50610cd360c08401610be5565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cfe57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610d4157868101830151858201608001528201610d25565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea26469706673582212208afa84787b7d0d1b68f4557074fa129ad3f8bb5052cd83db225e4c8688730a8064736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063b1126dad1461015f578063e78cea9214610172578063e813a7551461019957600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100c861016d366004610b05565b6105df565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100b7565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b4f565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610baf565b50925050508181036103df5760008290556103aa61097a565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610baf565b509250505060005481111561051a5760008190556104e461097a565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b8b565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b8b565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008484836040516024016107b593929190610c3a565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263e5789d039260048083019391928290030181865afa158015610846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086a9190610cec565b9050600081851161087b578461087d565b815b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663dc8601b37f000000000000000000000000000000000000000000000000000000000000000086856040518463ffffffff1660e01b81526004016108f193929190610d05565b6020604051808303816000875af1158015610910573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109349190610cec565b9050877f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161096891815260200190565b60405180910390a25050505050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a719190610cec565b6040518463ffffffff1660e01b8152600401610a8f93929190610d05565b6020604051808303816000875af1158015610aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad29190610cec565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b600080600080848603610140811215610b1d57600080fd5b85359450602086013593506040860135925060e0605f1982011215610b4157600080fd5b509295919450926060019150565b80820180821115610b7057634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b9d57600080fd5b8151610ba881610b76565b9392505050565b60008060008060808587031215610bc557600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bf081610b76565b919050565b803563ffffffff81168114610bf057600080fd5b803560038110610bf057600080fd5b60038110610c3657634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c5e81610b76565b6001600160a01b03166060830152610c7860408401610bf5565b63ffffffff808216608085015280610c9260608701610bf5565b1660a085015280610ca560808701610bf5565b1660c08501525050610cb960a08401610c09565b610cc660e0840182610c18565b50610cd360c08401610be5565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cfe57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610d4157868101830151858201608001528201610d25565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea26469706673582212208afa84787b7d0d1b68f4557074fa129ad3f8bb5052cd83db225e4c8688730a8064736f6c63430008120033", "devdoc": { "details": "Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.", "events": { @@ -345,7 +345,7 @@ "storageLayout": { "storage": [ { - "astId": 1858, + "astId": 1466, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "sequencerDelayLimit", "offset": 0, @@ -353,21 +353,21 @@ "type": "t_uint256" }, { - "astId": 1861, + "astId": 1469, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "1", - "type": "t_struct(SequencerLimitDecreaseRequest)1866_storage" + "type": "t_struct(SequencerLimitDecreaseRequest)1474_storage" } ], "types": { - "t_struct(SequencerLimitDecreaseRequest)1866_storage": { + "t_struct(SequencerLimitDecreaseRequest)1474_storage": { "encoding": "inplace", "label": "struct RouterArbToGnosis.SequencerLimitDecreaseRequest", "members": [ { - "astId": 1863, + "astId": 1471, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "requestedSequencerLimit", "offset": 0, @@ -375,7 +375,7 @@ "type": "t_uint256" }, { - "astId": 1865, + "astId": 1473, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/RouterArbToGnosisTestnet.json b/contracts/deployments/goerli/RouterArbToGnosisTestnet.json index b00b085b..c903b2af 100644 --- a/contracts/deployments/goerli/RouterArbToGnosisTestnet.json +++ b/contracts/deployments/goerli/RouterArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x931FA807020231bCE1340Be8E1e5054207BbAFEd", + "address": "0x7Ee8Ad48EfA4765257a49486421A4CF11389E480", "abi": [ { "inputs": [ @@ -248,33 +248,33 @@ "type": "function" } ], - "transactionHash": "0x239ca22100e87a2885d0ae6e44fd6fb1c5ac49f410cb2dae707947dd5f4e61d1", + "transactionHash": "0xa3e81c75927f0bdd8b053ee8fae0b089110922c45795da2b7edb44171b48c428", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x931FA807020231bCE1340Be8E1e5054207BbAFEd", - "transactionIndex": 76, + "contractAddress": "0x7Ee8Ad48EfA4765257a49486421A4CF11389E480", + "transactionIndex": 97, "gasUsed": "866965", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x224c12839d7fb236f16896cb3a4806ff30d6daf55fe1e01584542e494ef76d9f", - "transactionHash": "0x239ca22100e87a2885d0ae6e44fd6fb1c5ac49f410cb2dae707947dd5f4e61d1", + "blockHash": "0x5a7b5577baa760547818ddbb90c91e8e1fc88c740701b679e5fe1abbd3e928a5", + "transactionHash": "0xa3e81c75927f0bdd8b053ee8fae0b089110922c45795da2b7edb44171b48c428", "logs": [], - "blockNumber": 9254076, - "cumulativeGasUsed": "18674126", + "blockNumber": 9254614, + "cumulativeGasUsed": "13695788", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x87A19d769D875964E9Cd41dDBfc397B2543764E6", - "0x76fa89666bd55736832a4350b9B8dA6bB1878BeF", - "0x0E459f63db78E2d5E8DC16a717F30A3d24cb79c2" + "0x5EC6917F803bF2C9E55D43D3B7DD1032a625A979", + "0x9cF5c011e2A4CB7797413f311A35AcB021071c35" ], - "numDeployments": 1, - "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_gasLimit\":\"The true batch gas limit for the epoch.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToGnosis {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Send the sequencer delay limit.\\n function sendSequencerDelayLimit() internal {\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _gasLimit The true batch gas limit for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, uint256 _gasLimit, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n\\n uint256 maxGasPerTx = amb.maxGasPerTx();\\n uint256 gasLimitCapped = _gasLimit > maxGasPerTx ? maxGasPerTx : _gasLimit;\\n\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, gasLimitCapped);\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xfc827e3a369ec32a1a85f9058905e56f6c43c41889b027070da878dccbfb873e\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n uint256 _gasLimit,\\n Claim memory _claim\\n ) external;\\n}\\n\",\"keccak256\":\"0x14b9a5be28d1954e86512cad4b6fcbc77646a30f7baefc84937fe4124db3cc37\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101006040523480156200001257600080fd5b506040516200102c3803806200102c833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610da06200028c6000396000818161010e015281816108b20152610a04015260008181610135015261064c01526000818160cf015281816107fe0152818161088301526109db015260008181610177015281816102c1015281816103e7015281816105ea01526106760152610da06000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063b1126dad1461015f578063e78cea9214610172578063e813a7551461019957600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100c861016d366004610b05565b6105df565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100b7565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b4f565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610baf565b50925050508181036103df5760008290556103aa61097a565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610baf565b509250505060005481111561051a5760008190556104e461097a565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b8b565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b8b565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008484836040516024016107b593929190610c3a565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263e5789d039260048083019391928290030181865afa158015610846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086a9190610cec565b9050600081851161087b578461087d565b815b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663dc8601b37f000000000000000000000000000000000000000000000000000000000000000086856040518463ffffffff1660e01b81526004016108f193929190610d05565b6020604051808303816000875af1158015610910573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109349190610cec565b9050877f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161096891815260200190565b60405180910390a25050505050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a719190610cec565b6040518463ffffffff1660e01b8152600401610a8f93929190610d05565b6020604051808303816000875af1158015610aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad29190610cec565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b600080600080848603610140811215610b1d57600080fd5b85359450602086013593506040860135925060e0605f1982011215610b4157600080fd5b509295919450926060019150565b80820180821115610b7057634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b9d57600080fd5b8151610ba881610b76565b9392505050565b60008060008060808587031215610bc557600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bf081610b76565b919050565b803563ffffffff81168114610bf057600080fd5b803560038110610bf057600080fd5b60038110610c3657634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c5e81610b76565b6001600160a01b03166060830152610c7860408401610bf5565b63ffffffff808216608085015280610c9260608701610bf5565b1660a085015280610ca560808701610bf5565b1660c08501525050610cb960a08401610c09565b610cc660e0840182610c18565b50610cd360c08401610be5565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cfe57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610d4157868101830151858201608001528201610d25565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea26469706673582212205413eef1ad93f5e4052a4ced1c2d29cd5325cb84b72663498aa3888f8eefd61c64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063b1126dad1461015f578063e78cea9214610172578063e813a7551461019957600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100c861016d366004610b05565b6105df565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100b7565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b4f565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610baf565b50925050508181036103df5760008290556103aa61097a565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610baf565b509250505060005481111561051a5760008190556104e461097a565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b8b565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b8b565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008484836040516024016107b593929190610c3a565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263e5789d039260048083019391928290030181865afa158015610846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086a9190610cec565b9050600081851161087b578461087d565b815b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663dc8601b37f000000000000000000000000000000000000000000000000000000000000000086856040518463ffffffff1660e01b81526004016108f193929190610d05565b6020604051808303816000875af1158015610910573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109349190610cec565b9050877f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161096891815260200190565b60405180910390a25050505050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a719190610cec565b6040518463ffffffff1660e01b8152600401610a8f93929190610d05565b6020604051808303816000875af1158015610aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad29190610cec565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b600080600080848603610140811215610b1d57600080fd5b85359450602086013593506040860135925060e0605f1982011215610b4157600080fd5b509295919450926060019150565b80820180821115610b7057634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b9d57600080fd5b8151610ba881610b76565b9392505050565b60008060008060808587031215610bc557600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bf081610b76565b919050565b803563ffffffff81168114610bf057600080fd5b803560038110610bf057600080fd5b60038110610c3657634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c5e81610b76565b6001600160a01b03166060830152610c7860408401610bf5565b63ffffffff808216608085015280610c9260608701610bf5565b1660a085015280610ca560808701610bf5565b1660c08501525050610cb960a08401610c09565b610cc660e0840182610c18565b50610cd360c08401610be5565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cfe57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610d4157868101830151858201608001528201610d25565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea26469706673582212205413eef1ad93f5e4052a4ced1c2d29cd5325cb84b72663498aa3888f8eefd61c64736f6c63430008120033", + "numDeployments": 3, + "solcInputHash": "916b5e2210e8e15d34b48798389f67fe", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_gasLimit\":\"The true batch gas limit for the epoch.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToGnosis {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Send the sequencer delay limit.\\n function sendSequencerDelayLimit() internal {\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _gasLimit The true batch gas limit for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, uint256 _gasLimit, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n\\n uint256 maxGasPerTx = amb.maxGasPerTx();\\n uint256 gasLimitCapped = _gasLimit > maxGasPerTx ? maxGasPerTx : _gasLimit;\\n\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, gasLimitCapped);\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xfc827e3a369ec32a1a85f9058905e56f6c43c41889b027070da878dccbfb873e\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, uint256 _gasLimit, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x084735de7ee128aa169f11f18a4a7de6656309e941b8df502e66b24a4bf93d0f\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b506040516200102c3803806200102c833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610da06200028c6000396000818161010e015281816108b20152610a04015260008181610135015261064c01526000818160cf015281816107fe0152818161088301526109db015260008181610177015281816102c1015281816103e7015281816105ea01526106760152610da06000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063b1126dad1461015f578063e78cea9214610172578063e813a7551461019957600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100c861016d366004610b05565b6105df565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100b7565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b4f565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610baf565b50925050508181036103df5760008290556103aa61097a565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610baf565b509250505060005481111561051a5760008190556104e461097a565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b8b565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b8b565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008484836040516024016107b593929190610c3a565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263e5789d039260048083019391928290030181865afa158015610846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086a9190610cec565b9050600081851161087b578461087d565b815b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663dc8601b37f000000000000000000000000000000000000000000000000000000000000000086856040518463ffffffff1660e01b81526004016108f193929190610d05565b6020604051808303816000875af1158015610910573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109349190610cec565b9050877f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161096891815260200190565b60405180910390a25050505050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a719190610cec565b6040518463ffffffff1660e01b8152600401610a8f93929190610d05565b6020604051808303816000875af1158015610aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad29190610cec565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b600080600080848603610140811215610b1d57600080fd5b85359450602086013593506040860135925060e0605f1982011215610b4157600080fd5b509295919450926060019150565b80820180821115610b7057634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b9d57600080fd5b8151610ba881610b76565b9392505050565b60008060008060808587031215610bc557600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bf081610b76565b919050565b803563ffffffff81168114610bf057600080fd5b803560038110610bf057600080fd5b60038110610c3657634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c5e81610b76565b6001600160a01b03166060830152610c7860408401610bf5565b63ffffffff808216608085015280610c9260608701610bf5565b1660a085015280610ca560808701610bf5565b1660c08501525050610cb960a08401610c09565b610cc660e0840182610c18565b50610cd360c08401610be5565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cfe57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610d4157868101830151858201608001528201610d25565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea26469706673582212208afa84787b7d0d1b68f4557074fa129ad3f8bb5052cd83db225e4c8688730a8064736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063b1126dad1461015f578063e78cea9214610172578063e813a7551461019957600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100c861016d366004610b05565b6105df565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100b7565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b4f565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610baf565b50925050508181036103df5760008290556103aa61097a565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610baf565b509250505060005481111561051a5760008190556104e461097a565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b8b565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b8b565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008484836040516024016107b593929190610c3a565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263e5789d039260048083019391928290030181865afa158015610846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086a9190610cec565b9050600081851161087b578461087d565b815b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663dc8601b37f000000000000000000000000000000000000000000000000000000000000000086856040518463ffffffff1660e01b81526004016108f193929190610d05565b6020604051808303816000875af1158015610910573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109349190610cec565b9050877f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161096891815260200190565b60405180910390a25050505050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a719190610cec565b6040518463ffffffff1660e01b8152600401610a8f93929190610d05565b6020604051808303816000875af1158015610aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad29190610cec565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b600080600080848603610140811215610b1d57600080fd5b85359450602086013593506040860135925060e0605f1982011215610b4157600080fd5b509295919450926060019150565b80820180821115610b7057634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b9d57600080fd5b8151610ba881610b76565b9392505050565b60008060008060808587031215610bc557600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bf081610b76565b919050565b803563ffffffff81168114610bf057600080fd5b803560038110610bf057600080fd5b60038110610c3657634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c5e81610b76565b6001600160a01b03166060830152610c7860408401610bf5565b63ffffffff808216608085015280610c9260608701610bf5565b1660a085015280610ca560808701610bf5565b1660c08501525050610cb960a08401610c09565b610cc660e0840182610c18565b50610cd360c08401610be5565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cfe57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610d4157868101830151858201608001528201610d25565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea26469706673582212208afa84787b7d0d1b68f4557074fa129ad3f8bb5052cd83db225e4c8688730a8064736f6c63430008120033", "devdoc": { "details": "Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.", "events": { @@ -345,7 +345,7 @@ "storageLayout": { "storage": [ { - "astId": 1858, + "astId": 1466, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "sequencerDelayLimit", "offset": 0, @@ -353,21 +353,21 @@ "type": "t_uint256" }, { - "astId": 1861, + "astId": 1469, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "1", - "type": "t_struct(SequencerLimitDecreaseRequest)1866_storage" + "type": "t_struct(SequencerLimitDecreaseRequest)1474_storage" } ], "types": { - "t_struct(SequencerLimitDecreaseRequest)1866_storage": { + "t_struct(SequencerLimitDecreaseRequest)1474_storage": { "encoding": "inplace", "label": "struct RouterArbToGnosis.SequencerLimitDecreaseRequest", "members": [ { - "astId": 1863, + "astId": 1471, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "requestedSequencerLimit", "offset": 0, @@ -375,7 +375,7 @@ "type": "t_uint256" }, { - "astId": 1865, + "astId": 1473, "contract": "src/arbitrumToGnosis/RouterArbToGnosis.sol:RouterArbToGnosis", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/RouterGnosisToArbDevnet.json b/contracts/deployments/goerli/RouterGnosisToArbDevnet.json index 6830fa20..07653cfa 100644 --- a/contracts/deployments/goerli/RouterGnosisToArbDevnet.json +++ b/contracts/deployments/goerli/RouterGnosisToArbDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x21596998458c428d745d171FA0636B885ed18DaC", + "address": "0x65b577dC22D3bdfcB20298ac07EF99D574275D04", "abi": [ { "inputs": [ @@ -420,47 +420,47 @@ "type": "function" } ], - "transactionHash": "0xe048adcc3db59092338ef9d65553822f6d2df9792c7d9925cc3e08402f187c24", + "transactionHash": "0x139ec222f5bd1e2cdde213a7d7c51fb5987bb911b272b1e1e94ee4bb144e95e7", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x21596998458c428d745d171FA0636B885ed18DaC", - "transactionIndex": 46, - "gasUsed": "1392465", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000040000000000001000000000000002000000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2ebc5343acd56eafbce8f46435547db64bf5bcf8dc545d0f724e160dc4eeffcb", - "transactionHash": "0xe048adcc3db59092338ef9d65553822f6d2df9792c7d9925cc3e08402f187c24", + "contractAddress": "0x65b577dC22D3bdfcB20298ac07EF99D574275D04", + "transactionIndex": 32, + "gasUsed": "1392477", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000", + "blockHash": "0x5778ed7d15b4ef45ef94c9af6937a5d9bee3ae09b36e130758e2a4aa62463058", + "transactionHash": "0x139ec222f5bd1e2cdde213a7d7c51fb5987bb911b272b1e1e94ee4bb144e95e7", "logs": [ { - "transactionIndex": 46, - "blockNumber": 9254071, - "transactionHash": "0xe048adcc3db59092338ef9d65553822f6d2df9792c7d9925cc3e08402f187c24", - "address": "0x21596998458c428d745d171FA0636B885ed18DaC", + "transactionIndex": 32, + "blockNumber": 9254600, + "transactionHash": "0x139ec222f5bd1e2cdde213a7d7c51fb5987bb911b272b1e1e94ee4bb144e95e7", + "address": "0x65b577dC22D3bdfcB20298ac07EF99D574275D04", "topics": [ "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 137, - "blockHash": "0x2ebc5343acd56eafbce8f46435547db64bf5bcf8dc545d0f724e160dc4eeffcb" + "logIndex": 57, + "blockHash": "0x5778ed7d15b4ef45ef94c9af6937a5d9bee3ae09b36e130758e2a4aa62463058" } ], - "blockNumber": 9254071, - "cumulativeGasUsed": "7019985", + "blockNumber": 9254600, + "cumulativeGasUsed": "4149312", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0xe4AF4f1B42749d003C6d6eFdc05c11F33581E55B", - "0xcC196cC90bD30109E39400817e6ef63A1b744659", + "0xA3FefC6FeE3fc66B9d9a8BEE794736ab71a74c55", + "0x016170Ad327cE0dCa07b3bd7a7592013a7488FAc", 5 ], - "numDeployments": 1, - "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_inboxChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"L2GasBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerFutureLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Gnosis Chain to Arbitrum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,uint256)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer delay limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(uint256)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value\",\"params\":{\"_ticketID\":\"The ticketID from the delayed inbox of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer delay limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}},\"sequencerFutureLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer future limit has been made.\",\"params\":{\"_requestedSequencerFutureLimit\":\"The new sequencer limit requested.\"}},\"sequencerFutureLimitSent(uint256)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value\",\"params\":{\"_ticketID\":\"The ticketID from the delayed inbox of the cross-chain message.\"}},\"sequencerFutureLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer future limit updated.\",\"params\":{\"_newSequencerFutureLimit\":\"The new sequencer future limit.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_inboxChainId\":\"The chain ID of the inbox chain.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"executeSequencerFutureLimitDecreaseRequest()\":{\"details\":\"execute sequencerFutureLimitDecreaseRequest\"},\"route(uint256,bytes32,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to.\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee.\",\"_stateroot\":\"The true state root for the epoch.\"}},\"sendSequencerDelayLimit(uint256,uint256,address,uint256,uint256)\":{\"details\":\"Send the sequencer delay limit through the delayed inbox.\"},\"sendSequencerFutureLimit(uint256,uint256,address,uint256,uint256)\":{\"details\":\"Send the sequencer future limit through the delayed inbox.\"},\"updateSequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"},\"updateSequencerFutureLimit()\":{\"details\":\"Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,uint256,uint256,address,uint256,uint256)\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/RouterGnosisToArb.sol\":\"RouterGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IInbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IInbox.sol\\n// proxy: https://etherscan.io/address/0x4Dbd4fc535Ac27206064B68FfCf827b0A60BAB3f\\n// implementation: https://etherscan.io/address/0x5aed5f8a1e3607476f1f81c3d8fe126deb0afe94\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface IInbox {\\n function bridge() external view returns (IBridge);\\n\\n /**\\n * @notice Put a message in the L2 inbox that can be reexecuted for some fixed amount of time if it reverts\\n * @dev all msg.value will deposited to callValueRefundAddress on L2\\n * @dev Gas limit and maxFeePerGas should not be set to 1 as that is used to trigger the RetryableData error\\n * @param to destination L2 contract address\\n * @param l2CallValue call value for retryable L2 message\\n * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n * @param excessFeeRefundAddress gasLimit x maxFeePerGas - execution cost gets credited here on L2 balance\\n * @param callValueRefundAddress l2Callvalue gets credited here on L2 if retryable txn times out or gets cancelled\\n * @param gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n * @param maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n * @param data ABI encoded data of L2 message\\n * @return unique message number of the retryable transaction\\n */\\n function createRetryableTicket(\\n address to,\\n uint256 l2CallValue,\\n uint256 maxSubmissionCost,\\n address excessFeeRefundAddress,\\n address callValueRefundAddress,\\n uint256 gasLimit,\\n uint256 maxFeePerGas,\\n bytes calldata data\\n ) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x2497d8bd48681de9d2b9929152afbc3ad5508923cce0eb4e863bf576955ddec2\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/RouterGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerFutureUpdatable.sol\\\";\\n\\n/// @dev Router from Gnosis Chain to Arbitrum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterGnosisToArb is IRouterToArb {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxGnosisToArb; // The address of the veaInbox on Gnosis.\\n address public immutable veaOutboxGnosisToArb; // The address of the veaOutbox on Arbitrum.\\n uint256 internal immutable inboxChainId; // The chain ID of the inbox chain.\\n\\n mapping(address => uint256) public L2GasBalance;\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n SequencerLimitDecreaseRequest public sequencerFutureLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, uint256 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value\\n /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message.\\n event sequencerDelayLimitSent(uint256 _ticketID);\\n\\n /// @dev This event indicates the sequencer delay limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer delay limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value\\n /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message.\\n event sequencerFutureLimitSent(uint256 _ticketID);\\n\\n /// @dev This event indicates the sequencer future limit updated.\\n /// @param _newSequencerFutureLimit The new sequencer future limit.\\n event sequencerFutureLimitUpdated(uint256 _newSequencerFutureLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer future limit has been made.\\n /// @param _requestedSequencerFutureLimit The new sequencer limit requested.\\n event sequencerFutureLimitDecreaseRequested(uint256 _requestedSequencerFutureLimit);\\n\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n /// @param _inboxChainId The chain ID of the inbox chain.\\n constructor(\\n IBridge _bridge, \\n IAMB _amb,\\n address _veaInboxArbToGnosis,\\n address _veaOutboxArbToGnosis,\\n uint256 _inboxChainId\\n ) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxGnosisToArb = _veaInboxArbToGnosis;\\n veaOutboxGnosisToArb = _veaOutboxArbToGnosis;\\n inboxChainId = _inboxChainId;\\n\\n updateSequencerDelayLimit();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerFutureLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , , uint256 newSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerFutureLimit > sequencerFutureLimit) {\\n // For sequencerFutureLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerFutureLimit = newSequencerFutureLimit;\\n emit sequencerFutureLimitUpdated(newSequencerFutureLimit);\\n } else if (newSequencerFutureLimit < sequencerFutureLimit) {\\n require(\\n sequencerFutureLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerFutureLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerFutureLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerFutureLimitDecreaseRequested(newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerFutureLimitDecreaseRequest\\n function executeSequencerFutureLimitDecreaseRequest() external {\\n require(sequencerFutureLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerFutureLimitDecreaseRequest.timestamp + sequencerFutureLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerFutureLimit = sequencerFutureLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerFutureLimitDecreaseRequest;\\n\\n (, , , uint256 currentSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerFutureLimit == requestedSequencerFutureLimit) {\\n sequencerFutureLimit = requestedSequencerFutureLimit;\\n emit sequencerFutureLimitUpdated(requestedSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Send the sequencer future limit through the delayed inbox.\\n function sendSequencerFutureLimit(\\n uint256 _inboxIndex, \\n uint256 _maxSubmissionCost, \\n address _excessFeeRefundAddress, \\n uint256 _gasLimit, \\n uint256 _maxFeePerGas\\n ) external {\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n \\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(\\n ISequencerFutureUpdatable.updateSequencerFutureLimit,\\n (sequencerFutureLimit, block.timestamp)\\n );\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n \\n emit sequencerFutureLimitSent(ticketID);\\n }\\n\\n /// @dev Send the sequencer delay limit through the delayed inbox.\\n function sendSequencerDelayLimit(\\n uint256 _inboxIndex, \\n uint256 _maxSubmissionCost, \\n address _excessFeeRefundAddress, \\n uint256 _gasLimit, \\n uint256 _maxFeePerGas\\n ) external {\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n \\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n \\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function deposit() external payable{\\n L2GasBalance[msg.sender] += msg.value;\\n }\\n\\n function withdraw(uint256 _amount) external{\\n require(L2GasBalance[msg.sender] > _amount, \\\"Insufficient balance.\\\");\\n L2GasBalance[msg.sender] -= _amount;\\n payable(msg.sender).send(_amount); // User is responsible for accepting ETH.\\n }\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee.\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to.\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\\n function route(\\n uint256 _epoch, \\n bytes32 _stateroot, \\n uint256 _inboxIndex, \\n uint256 _maxSubmissionCost, \\n address _excessFeeRefundAddress, \\n uint256 _gasLimit, \\n uint256 _maxFeePerGas\\n ) external {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(inboxChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(veaInboxGnosisToArb == amb.messageSender(), \\\"Vea Inbox only.\\\");\\n\\n // Ethereum -> Arbitrum message passing with retryable tickets in the delayed inbox, the canonical Ethereum -> Arbitrum bridge.\\n // https://developer.arbitrum.io/arbos/l1-to-l2-messaging#submission\\n\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n \\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL2.resolveDisputedClaim, (_epoch, _stateroot));\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x1594be4399e2c77f45f6cc7acecb602172cfe387fe95ad78016f0838097829a3\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerFutureUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerFutureUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerFutureUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerFutureLimit The futureSeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0x5c8b8ffaec923126ec1699d9c1483329b5a660837803aefc4aa95d9f091ef21f\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101206040523480156200001257600080fd5b5060405162001aeb38038062001aeb833981016040819052620000359162000268565b6001600160a01b0380861660805284811660a05283811660c052821660e052610100819052620000646200006f565b50505050506200033a565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d89190620002dc565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000116573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200013c919062000303565b5092505050600154811115620001875760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6001548110156200024f5760045415620002015760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6001600160a01b03811681146200024f57600080fd5b600080600080600060a086880312156200028157600080fd5b85516200028e8162000252565b6020870151909550620002a18162000252565b6040870151909450620002b48162000252565b6060870151909350620002c78162000252565b80925050608086015190509295509295909350565b600060208284031215620002ef57600080fd5b8151620002fc8162000252565b9392505050565b600080600080608085870312156200031a57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e0516101005161170a620003e1600039600061085501526000818161021101528181610aed0152818161105401526112700152600081816102d7015261094201526000818161019001528181610759015281816107d301526108b701526000818161035301528181610410015281816105a401528181610a6f01528181610bc801528181610d7301528181610fd601526111f2015261170a6000f3fe6080604052600436106101095760003560e01c806365b0183511610095578063b6d7aeff11610064578063b6d7aeff146102f9578063c4977c8b14610319578063d0e30db014610339578063e78cea9214610341578063e813a7551461037557600080fd5b806365b018351461026857806377a43648146102955780637e260880146102aa5780639e75a705146102c557600080fd5b80631ff47dc0116100dc5780631ff47dc0146101ca5780632e1a7d4d146101df5780634738b97f146101ff578063507b5ad3146102335780635f43a47f1461025357600080fd5b8063051d19701461010e5780630c63fa84146101435780630e56752e1461015a5780631062b39a1461017e575b600080fd5b34801561011a57600080fd5b50600354600454610129919082565b604080519283526020830191909152015b60405180910390f35b34801561014f57600080fd5b5061015861038b565b005b34801561016657600080fd5b5061017060025481565b60405190815260200161013a565b34801561018a57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013a565b3480156101d657600080fd5b50610158610528565b3480156101eb57600080fd5b506101586101fa366004611357565b6106b5565b34801561020b57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561023f57600080fd5b5061015861024e366004611385565b61074e565b34801561025f57600080fd5b50610158610bc4565b34801561027457600080fd5b506101706102833660046113e4565b60006020819052908152604090205481565b3480156102a157600080fd5b50610158610d6f565b3480156102b657600080fd5b50600554600654610129919082565b3480156102d157600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561030557600080fd5b50610158610314366004611408565b610f0c565b34801561032557600080fd5b50610158610334366004611408565b611128565b610158611331565b34801561034d57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561038157600080fd5b5061017060015481565b6004546000036103b65760405162461bcd60e51b81526004016103ad90611451565b60405180910390fd5b6001546004546103c691906114b3565b42116103e45760405162461bcd60e51b81526004016103ad906114cc565b6003805460009182905560048281556040805163ee35f32760e01b815290519293926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263ee35f327928082019260209290918290030181865afa158015610459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047d919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de919061153b565b50925050508181036105245760018290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60065460000361054a5760405162461bcd60e51b81526004016103ad90611451565b60025460065461055a91906114b3565b42116105785760405162461bcd60e51b81526004016103ad906114cc565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156105ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610613919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610674919061153b565b93505050508181036105245760028290556040518281527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b2719060200161051b565b33600090815260208190526040902054811061070b5760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b60448201526064016103ad565b336000908152602081905260408120805483929061072a908490611571565b9091555050604051339082156108fc029083906000818181858888f1505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107d15760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190611584565b7f0000000000000000000000000000000000000000000000000000000000000000146108b55760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610913573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610937919061151e565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146109a95760405162461bcd60e51b815260206004820152600f60248201526e2b32b09024b73137bc1037b7363c9760891b60448201526064016103ad565b60006109b5828461159d565b6109bf90866114b3565b33600090815260208190526040902054909150818110156109f25760405162461bcd60e51b81526004016103ad906115b4565b6109fc8282611571565b33600090815260208190526040808220929092559051602481018b9052604481018a905260640160408051601f198184030181529181526020820180516001600160e01b0316631195d6f560e31b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af1158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b8152600401610b389897969594939291906115eb565b60206040518083038185885af1158015610b56573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b7b9190611584565b90508a7fcafd272887d09c9615b3354aa56a477e3ba7b4095d0b6201235c2bfabe2294c582604051610baf91815260200190565b60405180910390a25050505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c48919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca9919061153b565b5092505050600154811115610cf45760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a150565b600154811015610d6c5760045415610d1e5760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df3919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610e30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e54919061153b565b9350505050600254811115610e985760028190556040518181527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b27190602001610ce9565b600254811015610d6c5760065415610ec25760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600584905560065590518281527f326636d2e3d2c0d42c0fb6fd9f30ab0fcde3dff35e63db28f8abc38d566057f49101610ce9565b6000610f18828461159d565b610f2290866114b3565b3360009081526020819052604090205490915081811015610f555760405162461bcd60e51b81526004016103ad906115b4565b610f5f8282611571565b3360009081526020819052604080822092909255600254915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b031663710cc9a760e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561101f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611043919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b815260040161109f9897969594939291906115eb565b60206040518083038185885af11580156110bd573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110e29190611584565b90507f0bb0de69fc6722b8061f8161f450a46b49fd536c11535aab912024d630d505cf8160405161111591815260200190565b60405180910390a1505050505050505050565b6000611134828461159d565b61113e90866114b3565b33600090815260208190526040902054909150818110156111715760405162461bcd60e51b81526004016103ad906115b4565b61117b8282611571565b3360009081526020819052604080822092909255600154915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b0316632c19251960e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561123b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125f919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b81526004016112bb9897969594939291906115eb565b60206040518083038185885af11580156112d9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112fe9190611584565b90507fe68d5d0ca95adf855ddd4733abf1d205e40aaef86e1c7795f4002791d5e28a388160405161111591815260200190565b33600090815260208190526040812080543492906113509084906114b3565b9091555050565b60006020828403121561136957600080fd5b5035919050565b6001600160a01b0381168114610d6c57600080fd5b600080600080600080600060e0888a0312156113a057600080fd5b8735965060208801359550604088013594506060880135935060808801356113c781611370565b9699959850939692959460a0840135945060c09093013592915050565b6000602082840312156113f657600080fd5b813561140181611370565b9392505050565b600080600080600060a0868803121561142057600080fd5b8535945060208601359350604086013561143981611370565b94979396509394606081013594506080013592915050565b6020808252602c908201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560408201526b30b9b2903932b8bab2b9ba1760a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156114c6576114c661149d565b92915050565b60208082526032908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152711034b99039ba34b636103832b73234b7339760711b606082015260800190565b60006020828403121561153057600080fd5b815161140181611370565b6000806000806080858703121561155157600080fd5b505082516020840151604085015160609095015191969095509092509050565b818103818111156114c6576114c661149d565b60006020828403121561159657600080fd5b5051919050565b80820281158282048414176114c6576114c661149d565b6020808252601c908201527f496e73756666696369656e74204c32206761732062616c616e63652e00000000604082015260600190565b600061010060018060a01b03808c16845260208b818601528a6040860152818a16606086015281891660808601528760a08601528660c08601528260e0860152855191508183860152600092505b8183101561165857858301810151858401610120015291820191611639565b506101209150600082828601015281601f19601f830116850101925050509998505050505050505050565b60208082526031908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152701030b63932b0b23c903832b73234b7339760791b60608201526080019056fea26469706673582212206d347ab6da12947fbbaaedb3059a0725b4bd0933fadda0023baef951f2c4a69464736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101095760003560e01c806365b0183511610095578063b6d7aeff11610064578063b6d7aeff146102f9578063c4977c8b14610319578063d0e30db014610339578063e78cea9214610341578063e813a7551461037557600080fd5b806365b018351461026857806377a43648146102955780637e260880146102aa5780639e75a705146102c557600080fd5b80631ff47dc0116100dc5780631ff47dc0146101ca5780632e1a7d4d146101df5780634738b97f146101ff578063507b5ad3146102335780635f43a47f1461025357600080fd5b8063051d19701461010e5780630c63fa84146101435780630e56752e1461015a5780631062b39a1461017e575b600080fd5b34801561011a57600080fd5b50600354600454610129919082565b604080519283526020830191909152015b60405180910390f35b34801561014f57600080fd5b5061015861038b565b005b34801561016657600080fd5b5061017060025481565b60405190815260200161013a565b34801561018a57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013a565b3480156101d657600080fd5b50610158610528565b3480156101eb57600080fd5b506101586101fa366004611357565b6106b5565b34801561020b57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561023f57600080fd5b5061015861024e366004611385565b61074e565b34801561025f57600080fd5b50610158610bc4565b34801561027457600080fd5b506101706102833660046113e4565b60006020819052908152604090205481565b3480156102a157600080fd5b50610158610d6f565b3480156102b657600080fd5b50600554600654610129919082565b3480156102d157600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561030557600080fd5b50610158610314366004611408565b610f0c565b34801561032557600080fd5b50610158610334366004611408565b611128565b610158611331565b34801561034d57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561038157600080fd5b5061017060015481565b6004546000036103b65760405162461bcd60e51b81526004016103ad90611451565b60405180910390fd5b6001546004546103c691906114b3565b42116103e45760405162461bcd60e51b81526004016103ad906114cc565b6003805460009182905560048281556040805163ee35f32760e01b815290519293926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263ee35f327928082019260209290918290030181865afa158015610459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047d919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de919061153b565b50925050508181036105245760018290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60065460000361054a5760405162461bcd60e51b81526004016103ad90611451565b60025460065461055a91906114b3565b42116105785760405162461bcd60e51b81526004016103ad906114cc565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156105ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610613919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610674919061153b565b93505050508181036105245760028290556040518281527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b2719060200161051b565b33600090815260208190526040902054811061070b5760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b60448201526064016103ad565b336000908152602081905260408120805483929061072a908490611571565b9091555050604051339082156108fc029083906000818181858888f1505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107d15760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190611584565b7f0000000000000000000000000000000000000000000000000000000000000000146108b55760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610913573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610937919061151e565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146109a95760405162461bcd60e51b815260206004820152600f60248201526e2b32b09024b73137bc1037b7363c9760891b60448201526064016103ad565b60006109b5828461159d565b6109bf90866114b3565b33600090815260208190526040902054909150818110156109f25760405162461bcd60e51b81526004016103ad906115b4565b6109fc8282611571565b33600090815260208190526040808220929092559051602481018b9052604481018a905260640160408051601f198184030181529181526020820180516001600160e01b0316631195d6f560e31b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af1158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b8152600401610b389897969594939291906115eb565b60206040518083038185885af1158015610b56573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b7b9190611584565b90508a7fcafd272887d09c9615b3354aa56a477e3ba7b4095d0b6201235c2bfabe2294c582604051610baf91815260200190565b60405180910390a25050505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c48919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca9919061153b565b5092505050600154811115610cf45760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a150565b600154811015610d6c5760045415610d1e5760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df3919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610e30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e54919061153b565b9350505050600254811115610e985760028190556040518181527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b27190602001610ce9565b600254811015610d6c5760065415610ec25760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600584905560065590518281527f326636d2e3d2c0d42c0fb6fd9f30ab0fcde3dff35e63db28f8abc38d566057f49101610ce9565b6000610f18828461159d565b610f2290866114b3565b3360009081526020819052604090205490915081811015610f555760405162461bcd60e51b81526004016103ad906115b4565b610f5f8282611571565b3360009081526020819052604080822092909255600254915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b031663710cc9a760e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561101f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611043919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b815260040161109f9897969594939291906115eb565b60206040518083038185885af11580156110bd573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110e29190611584565b90507f0bb0de69fc6722b8061f8161f450a46b49fd536c11535aab912024d630d505cf8160405161111591815260200190565b60405180910390a1505050505050505050565b6000611134828461159d565b61113e90866114b3565b33600090815260208190526040902054909150818110156111715760405162461bcd60e51b81526004016103ad906115b4565b61117b8282611571565b3360009081526020819052604080822092909255600154915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b0316632c19251960e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561123b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125f919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b81526004016112bb9897969594939291906115eb565b60206040518083038185885af11580156112d9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112fe9190611584565b90507fe68d5d0ca95adf855ddd4733abf1d205e40aaef86e1c7795f4002791d5e28a388160405161111591815260200190565b33600090815260208190526040812080543492906113509084906114b3565b9091555050565b60006020828403121561136957600080fd5b5035919050565b6001600160a01b0381168114610d6c57600080fd5b600080600080600080600060e0888a0312156113a057600080fd5b8735965060208801359550604088013594506060880135935060808801356113c781611370565b9699959850939692959460a0840135945060c09093013592915050565b6000602082840312156113f657600080fd5b813561140181611370565b9392505050565b600080600080600060a0868803121561142057600080fd5b8535945060208601359350604086013561143981611370565b94979396509394606081013594506080013592915050565b6020808252602c908201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560408201526b30b9b2903932b8bab2b9ba1760a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156114c6576114c661149d565b92915050565b60208082526032908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152711034b99039ba34b636103832b73234b7339760711b606082015260800190565b60006020828403121561153057600080fd5b815161140181611370565b6000806000806080858703121561155157600080fd5b505082516020840151604085015160609095015191969095509092509050565b818103818111156114c6576114c661149d565b60006020828403121561159657600080fd5b5051919050565b80820281158282048414176114c6576114c661149d565b6020808252601c908201527f496e73756666696369656e74204c32206761732062616c616e63652e00000000604082015260600190565b600061010060018060a01b03808c16845260208b818601528a6040860152818a16606086015281891660808601528760a08601528660c08601528260e0860152855191508183860152600092505b8183101561165857858301810151858401610120015291820191611639565b506101209150600082828601015281601f19601f830116850101925050509998505050505050505050565b60208082526031908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152701030b63932b0b23c903832b73234b7339760791b60608201526080019056fea26469706673582212206d347ab6da12947fbbaaedb3059a0725b4bd0933fadda0023baef951f2c4a69464736f6c63430008120033", + "numDeployments": 3, + "solcInputHash": "916b5e2210e8e15d34b48798389f67fe", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_inboxChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"L2GasBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerFutureLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Gnosis Chain to Arbitrum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,uint256)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer delay limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(uint256)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value\",\"params\":{\"_ticketID\":\"The ticketID from the delayed inbox of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer delay limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}},\"sequencerFutureLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer future limit has been made.\",\"params\":{\"_requestedSequencerFutureLimit\":\"The new sequencer limit requested.\"}},\"sequencerFutureLimitSent(uint256)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value\",\"params\":{\"_ticketID\":\"The ticketID from the delayed inbox of the cross-chain message.\"}},\"sequencerFutureLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer future limit updated.\",\"params\":{\"_newSequencerFutureLimit\":\"The new sequencer future limit.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_inboxChainId\":\"The chain ID of the inbox chain.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"executeSequencerFutureLimitDecreaseRequest()\":{\"details\":\"execute sequencerFutureLimitDecreaseRequest\"},\"route(uint256,bytes32,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to.\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee.\",\"_stateroot\":\"The true state root for the epoch.\"}},\"sendSequencerDelayLimit(uint256,uint256,address,uint256,uint256)\":{\"details\":\"Send the sequencer delay limit through the delayed inbox.\"},\"sendSequencerFutureLimit(uint256,uint256,address,uint256,uint256)\":{\"details\":\"Send the sequencer future limit through the delayed inbox.\"},\"updateSequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"},\"updateSequencerFutureLimit()\":{\"details\":\"Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,uint256,uint256,address,uint256,uint256)\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/RouterGnosisToArb.sol\":\"RouterGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IInbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IInbox.sol\\n// proxy: https://etherscan.io/address/0x4Dbd4fc535Ac27206064B68FfCf827b0A60BAB3f\\n// implementation: https://etherscan.io/address/0x5aed5f8a1e3607476f1f81c3d8fe126deb0afe94\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface IInbox {\\n function bridge() external view returns (IBridge);\\n\\n /**\\n * @notice Put a message in the L2 inbox that can be reexecuted for some fixed amount of time if it reverts\\n * @dev all msg.value will deposited to callValueRefundAddress on L2\\n * @dev Gas limit and maxFeePerGas should not be set to 1 as that is used to trigger the RetryableData error\\n * @param to destination L2 contract address\\n * @param l2CallValue call value for retryable L2 message\\n * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n * @param excessFeeRefundAddress gasLimit x maxFeePerGas - execution cost gets credited here on L2 balance\\n * @param callValueRefundAddress l2Callvalue gets credited here on L2 if retryable txn times out or gets cancelled\\n * @param gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n * @param maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n * @param data ABI encoded data of L2 message\\n * @return unique message number of the retryable transaction\\n */\\n function createRetryableTicket(\\n address to,\\n uint256 l2CallValue,\\n uint256 maxSubmissionCost,\\n address excessFeeRefundAddress,\\n address callValueRefundAddress,\\n uint256 gasLimit,\\n uint256 maxFeePerGas,\\n bytes calldata data\\n ) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x2497d8bd48681de9d2b9929152afbc3ad5508923cce0eb4e863bf576955ddec2\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/RouterGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerFutureUpdatable.sol\\\";\\n\\n/// @dev Router from Gnosis Chain to Arbitrum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterGnosisToArb is IRouterToArb {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxGnosisToArb; // The address of the veaInbox on Gnosis.\\n address public immutable veaOutboxGnosisToArb; // The address of the veaOutbox on Arbitrum.\\n uint256 internal immutable inboxChainId; // The chain ID of the inbox chain.\\n\\n mapping(address => uint256) public L2GasBalance;\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n SequencerLimitDecreaseRequest public sequencerFutureLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, uint256 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value\\n /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message.\\n event sequencerDelayLimitSent(uint256 _ticketID);\\n\\n /// @dev This event indicates the sequencer delay limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer delay limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value\\n /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message.\\n event sequencerFutureLimitSent(uint256 _ticketID);\\n\\n /// @dev This event indicates the sequencer future limit updated.\\n /// @param _newSequencerFutureLimit The new sequencer future limit.\\n event sequencerFutureLimitUpdated(uint256 _newSequencerFutureLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer future limit has been made.\\n /// @param _requestedSequencerFutureLimit The new sequencer limit requested.\\n event sequencerFutureLimitDecreaseRequested(uint256 _requestedSequencerFutureLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n /// @param _inboxChainId The chain ID of the inbox chain.\\n constructor(\\n IBridge _bridge,\\n IAMB _amb,\\n address _veaInboxArbToGnosis,\\n address _veaOutboxArbToGnosis,\\n uint256 _inboxChainId\\n ) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxGnosisToArb = _veaInboxArbToGnosis;\\n veaOutboxGnosisToArb = _veaOutboxArbToGnosis;\\n inboxChainId = _inboxChainId;\\n\\n updateSequencerDelayLimit();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerFutureLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , , uint256 newSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerFutureLimit > sequencerFutureLimit) {\\n // For sequencerFutureLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerFutureLimit = newSequencerFutureLimit;\\n emit sequencerFutureLimitUpdated(newSequencerFutureLimit);\\n } else if (newSequencerFutureLimit < sequencerFutureLimit) {\\n require(\\n sequencerFutureLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerFutureLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerFutureLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerFutureLimitDecreaseRequested(newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerFutureLimitDecreaseRequest\\n function executeSequencerFutureLimitDecreaseRequest() external {\\n require(sequencerFutureLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerFutureLimitDecreaseRequest.timestamp + sequencerFutureLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerFutureLimit = sequencerFutureLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerFutureLimitDecreaseRequest;\\n\\n (, , , uint256 currentSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerFutureLimit == requestedSequencerFutureLimit) {\\n sequencerFutureLimit = requestedSequencerFutureLimit;\\n emit sequencerFutureLimitUpdated(requestedSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Send the sequencer future limit through the delayed inbox.\\n function sendSequencerFutureLimit(\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external {\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n\\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(\\n ISequencerFutureUpdatable.updateSequencerFutureLimit,\\n (sequencerFutureLimit, block.timestamp)\\n );\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit sequencerFutureLimitSent(ticketID);\\n }\\n\\n /// @dev Send the sequencer delay limit through the delayed inbox.\\n function sendSequencerDelayLimit(\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external {\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n\\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function deposit() external payable {\\n L2GasBalance[msg.sender] += msg.value;\\n }\\n\\n function withdraw(uint256 _amount) external {\\n require(L2GasBalance[msg.sender] > _amount, \\\"Insufficient balance.\\\");\\n L2GasBalance[msg.sender] -= _amount;\\n payable(msg.sender).send(_amount); // User is responsible for accepting ETH.\\n }\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee.\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to.\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(inboxChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(veaInboxGnosisToArb == amb.messageSender(), \\\"Vea Inbox only.\\\");\\n\\n // Ethereum -> Arbitrum message passing with retryable tickets in the delayed inbox, the canonical Ethereum -> Arbitrum bridge.\\n // https://developer.arbitrum.io/arbos/l1-to-l2-messaging#submission\\n\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n\\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL2.resolveDisputedClaim, (_epoch, _stateroot));\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xaab3a5d9b5a52671af6336f05306c66627bfe25dbf0dd51fc88882c14da15a3d\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerFutureUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerFutureUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerFutureUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerFutureLimit The futureSeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0x5c8b8ffaec923126ec1699d9c1483329b5a660837803aefc4aa95d9f091ef21f\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101206040523480156200001257600080fd5b5060405162001aeb38038062001aeb833981016040819052620000359162000268565b6001600160a01b0380861660805284811660a05283811660c052821660e052610100819052620000646200006f565b50505050506200033a565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d89190620002dc565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000116573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200013c919062000303565b5092505050600154811115620001875760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6001548110156200024f5760045415620002015760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6001600160a01b03811681146200024f57600080fd5b600080600080600060a086880312156200028157600080fd5b85516200028e8162000252565b6020870151909550620002a18162000252565b6040870151909450620002b48162000252565b6060870151909350620002c78162000252565b80925050608086015190509295509295909350565b600060208284031215620002ef57600080fd5b8151620002fc8162000252565b9392505050565b600080600080608085870312156200031a57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e0516101005161170a620003e1600039600061085501526000818161021101528181610aed0152818161105401526112700152600081816102d7015261094201526000818161019001528181610759015281816107d301526108b701526000818161035301528181610410015281816105a401528181610a6f01528181610bc801528181610d7301528181610fd601526111f2015261170a6000f3fe6080604052600436106101095760003560e01c806365b0183511610095578063b6d7aeff11610064578063b6d7aeff146102f9578063c4977c8b14610319578063d0e30db014610339578063e78cea9214610341578063e813a7551461037557600080fd5b806365b018351461026857806377a43648146102955780637e260880146102aa5780639e75a705146102c557600080fd5b80631ff47dc0116100dc5780631ff47dc0146101ca5780632e1a7d4d146101df5780634738b97f146101ff578063507b5ad3146102335780635f43a47f1461025357600080fd5b8063051d19701461010e5780630c63fa84146101435780630e56752e1461015a5780631062b39a1461017e575b600080fd5b34801561011a57600080fd5b50600354600454610129919082565b604080519283526020830191909152015b60405180910390f35b34801561014f57600080fd5b5061015861038b565b005b34801561016657600080fd5b5061017060025481565b60405190815260200161013a565b34801561018a57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013a565b3480156101d657600080fd5b50610158610528565b3480156101eb57600080fd5b506101586101fa366004611357565b6106b5565b34801561020b57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561023f57600080fd5b5061015861024e366004611385565b61074e565b34801561025f57600080fd5b50610158610bc4565b34801561027457600080fd5b506101706102833660046113e4565b60006020819052908152604090205481565b3480156102a157600080fd5b50610158610d6f565b3480156102b657600080fd5b50600554600654610129919082565b3480156102d157600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561030557600080fd5b50610158610314366004611408565b610f0c565b34801561032557600080fd5b50610158610334366004611408565b611128565b610158611331565b34801561034d57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561038157600080fd5b5061017060015481565b6004546000036103b65760405162461bcd60e51b81526004016103ad90611451565b60405180910390fd5b6001546004546103c691906114b3565b42116103e45760405162461bcd60e51b81526004016103ad906114cc565b6003805460009182905560048281556040805163ee35f32760e01b815290519293926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263ee35f327928082019260209290918290030181865afa158015610459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047d919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de919061153b565b50925050508181036105245760018290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60065460000361054a5760405162461bcd60e51b81526004016103ad90611451565b60025460065461055a91906114b3565b42116105785760405162461bcd60e51b81526004016103ad906114cc565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156105ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610613919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610674919061153b565b93505050508181036105245760028290556040518281527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b2719060200161051b565b33600090815260208190526040902054811061070b5760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b60448201526064016103ad565b336000908152602081905260408120805483929061072a908490611571565b9091555050604051339082156108fc029083906000818181858888f1505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107d15760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190611584565b7f0000000000000000000000000000000000000000000000000000000000000000146108b55760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610913573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610937919061151e565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146109a95760405162461bcd60e51b815260206004820152600f60248201526e2b32b09024b73137bc1037b7363c9760891b60448201526064016103ad565b60006109b5828461159d565b6109bf90866114b3565b33600090815260208190526040902054909150818110156109f25760405162461bcd60e51b81526004016103ad906115b4565b6109fc8282611571565b33600090815260208190526040808220929092559051602481018b9052604481018a905260640160408051601f198184030181529181526020820180516001600160e01b0316631195d6f560e31b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af1158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b8152600401610b389897969594939291906115eb565b60206040518083038185885af1158015610b56573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b7b9190611584565b90508a7fcafd272887d09c9615b3354aa56a477e3ba7b4095d0b6201235c2bfabe2294c582604051610baf91815260200190565b60405180910390a25050505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c48919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca9919061153b565b5092505050600154811115610cf45760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a150565b600154811015610d6c5760045415610d1e5760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df3919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610e30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e54919061153b565b9350505050600254811115610e985760028190556040518181527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b27190602001610ce9565b600254811015610d6c5760065415610ec25760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600584905560065590518281527f326636d2e3d2c0d42c0fb6fd9f30ab0fcde3dff35e63db28f8abc38d566057f49101610ce9565b6000610f18828461159d565b610f2290866114b3565b3360009081526020819052604090205490915081811015610f555760405162461bcd60e51b81526004016103ad906115b4565b610f5f8282611571565b3360009081526020819052604080822092909255600254915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b031663710cc9a760e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561101f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611043919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b815260040161109f9897969594939291906115eb565b60206040518083038185885af11580156110bd573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110e29190611584565b90507f0bb0de69fc6722b8061f8161f450a46b49fd536c11535aab912024d630d505cf8160405161111591815260200190565b60405180910390a1505050505050505050565b6000611134828461159d565b61113e90866114b3565b33600090815260208190526040902054909150818110156111715760405162461bcd60e51b81526004016103ad906115b4565b61117b8282611571565b3360009081526020819052604080822092909255600154915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b0316632c19251960e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561123b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125f919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b81526004016112bb9897969594939291906115eb565b60206040518083038185885af11580156112d9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112fe9190611584565b90507fe68d5d0ca95adf855ddd4733abf1d205e40aaef86e1c7795f4002791d5e28a388160405161111591815260200190565b33600090815260208190526040812080543492906113509084906114b3565b9091555050565b60006020828403121561136957600080fd5b5035919050565b6001600160a01b0381168114610d6c57600080fd5b600080600080600080600060e0888a0312156113a057600080fd5b8735965060208801359550604088013594506060880135935060808801356113c781611370565b9699959850939692959460a0840135945060c09093013592915050565b6000602082840312156113f657600080fd5b813561140181611370565b9392505050565b600080600080600060a0868803121561142057600080fd5b8535945060208601359350604086013561143981611370565b94979396509394606081013594506080013592915050565b6020808252602c908201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560408201526b30b9b2903932b8bab2b9ba1760a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156114c6576114c661149d565b92915050565b60208082526032908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152711034b99039ba34b636103832b73234b7339760711b606082015260800190565b60006020828403121561153057600080fd5b815161140181611370565b6000806000806080858703121561155157600080fd5b505082516020840151604085015160609095015191969095509092509050565b818103818111156114c6576114c661149d565b60006020828403121561159657600080fd5b5051919050565b80820281158282048414176114c6576114c661149d565b6020808252601c908201527f496e73756666696369656e74204c32206761732062616c616e63652e00000000604082015260600190565b600061010060018060a01b03808c16845260208b818601528a6040860152818a16606086015281891660808601528760a08601528660c08601528260e0860152855191508183860152600092505b8183101561165857858301810151858401610120015291820191611639565b506101209150600082828601015281601f19601f830116850101925050509998505050505050505050565b60208082526031908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152701030b63932b0b23c903832b73234b7339760791b60608201526080019056fea2646970667358221220535f232bc393000c0245713b2c0e8c68054ae9cbf7af42338a97ed188b8ad73164736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101095760003560e01c806365b0183511610095578063b6d7aeff11610064578063b6d7aeff146102f9578063c4977c8b14610319578063d0e30db014610339578063e78cea9214610341578063e813a7551461037557600080fd5b806365b018351461026857806377a43648146102955780637e260880146102aa5780639e75a705146102c557600080fd5b80631ff47dc0116100dc5780631ff47dc0146101ca5780632e1a7d4d146101df5780634738b97f146101ff578063507b5ad3146102335780635f43a47f1461025357600080fd5b8063051d19701461010e5780630c63fa84146101435780630e56752e1461015a5780631062b39a1461017e575b600080fd5b34801561011a57600080fd5b50600354600454610129919082565b604080519283526020830191909152015b60405180910390f35b34801561014f57600080fd5b5061015861038b565b005b34801561016657600080fd5b5061017060025481565b60405190815260200161013a565b34801561018a57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013a565b3480156101d657600080fd5b50610158610528565b3480156101eb57600080fd5b506101586101fa366004611357565b6106b5565b34801561020b57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561023f57600080fd5b5061015861024e366004611385565b61074e565b34801561025f57600080fd5b50610158610bc4565b34801561027457600080fd5b506101706102833660046113e4565b60006020819052908152604090205481565b3480156102a157600080fd5b50610158610d6f565b3480156102b657600080fd5b50600554600654610129919082565b3480156102d157600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561030557600080fd5b50610158610314366004611408565b610f0c565b34801561032557600080fd5b50610158610334366004611408565b611128565b610158611331565b34801561034d57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561038157600080fd5b5061017060015481565b6004546000036103b65760405162461bcd60e51b81526004016103ad90611451565b60405180910390fd5b6001546004546103c691906114b3565b42116103e45760405162461bcd60e51b81526004016103ad906114cc565b6003805460009182905560048281556040805163ee35f32760e01b815290519293926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263ee35f327928082019260209290918290030181865afa158015610459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047d919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de919061153b565b50925050508181036105245760018290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60065460000361054a5760405162461bcd60e51b81526004016103ad90611451565b60025460065461055a91906114b3565b42116105785760405162461bcd60e51b81526004016103ad906114cc565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156105ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610613919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610674919061153b565b93505050508181036105245760028290556040518281527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b2719060200161051b565b33600090815260208190526040902054811061070b5760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b60448201526064016103ad565b336000908152602081905260408120805483929061072a908490611571565b9091555050604051339082156108fc029083906000818181858888f1505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107d15760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190611584565b7f0000000000000000000000000000000000000000000000000000000000000000146108b55760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610913573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610937919061151e565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146109a95760405162461bcd60e51b815260206004820152600f60248201526e2b32b09024b73137bc1037b7363c9760891b60448201526064016103ad565b60006109b5828461159d565b6109bf90866114b3565b33600090815260208190526040902054909150818110156109f25760405162461bcd60e51b81526004016103ad906115b4565b6109fc8282611571565b33600090815260208190526040808220929092559051602481018b9052604481018a905260640160408051601f198184030181529181526020820180516001600160e01b0316631195d6f560e31b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af1158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b8152600401610b389897969594939291906115eb565b60206040518083038185885af1158015610b56573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b7b9190611584565b90508a7fcafd272887d09c9615b3354aa56a477e3ba7b4095d0b6201235c2bfabe2294c582604051610baf91815260200190565b60405180910390a25050505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c48919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca9919061153b565b5092505050600154811115610cf45760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a150565b600154811015610d6c5760045415610d1e5760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df3919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610e30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e54919061153b565b9350505050600254811115610e985760028190556040518181527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b27190602001610ce9565b600254811015610d6c5760065415610ec25760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600584905560065590518281527f326636d2e3d2c0d42c0fb6fd9f30ab0fcde3dff35e63db28f8abc38d566057f49101610ce9565b6000610f18828461159d565b610f2290866114b3565b3360009081526020819052604090205490915081811015610f555760405162461bcd60e51b81526004016103ad906115b4565b610f5f8282611571565b3360009081526020819052604080822092909255600254915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b031663710cc9a760e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561101f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611043919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b815260040161109f9897969594939291906115eb565b60206040518083038185885af11580156110bd573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110e29190611584565b90507f0bb0de69fc6722b8061f8161f450a46b49fd536c11535aab912024d630d505cf8160405161111591815260200190565b60405180910390a1505050505050505050565b6000611134828461159d565b61113e90866114b3565b33600090815260208190526040902054909150818110156111715760405162461bcd60e51b81526004016103ad906115b4565b61117b8282611571565b3360009081526020819052604080822092909255600154915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b0316632c19251960e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561123b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125f919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b81526004016112bb9897969594939291906115eb565b60206040518083038185885af11580156112d9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112fe9190611584565b90507fe68d5d0ca95adf855ddd4733abf1d205e40aaef86e1c7795f4002791d5e28a388160405161111591815260200190565b33600090815260208190526040812080543492906113509084906114b3565b9091555050565b60006020828403121561136957600080fd5b5035919050565b6001600160a01b0381168114610d6c57600080fd5b600080600080600080600060e0888a0312156113a057600080fd5b8735965060208801359550604088013594506060880135935060808801356113c781611370565b9699959850939692959460a0840135945060c09093013592915050565b6000602082840312156113f657600080fd5b813561140181611370565b9392505050565b600080600080600060a0868803121561142057600080fd5b8535945060208601359350604086013561143981611370565b94979396509394606081013594506080013592915050565b6020808252602c908201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560408201526b30b9b2903932b8bab2b9ba1760a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156114c6576114c661149d565b92915050565b60208082526032908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152711034b99039ba34b636103832b73234b7339760711b606082015260800190565b60006020828403121561153057600080fd5b815161140181611370565b6000806000806080858703121561155157600080fd5b505082516020840151604085015160609095015191969095509092509050565b818103818111156114c6576114c661149d565b60006020828403121561159657600080fd5b5051919050565b80820281158282048414176114c6576114c661149d565b6020808252601c908201527f496e73756666696369656e74204c32206761732062616c616e63652e00000000604082015260600190565b600061010060018060a01b03808c16845260208b818601528a6040860152818a16606086015281891660808601528760a08601528660c08601528260e0860152855191508183860152600092505b8183101561165857858301810151858401610120015291820191611639565b506101209150600082828601015281601f19601f830116850101925050509998505050505050505050565b60208082526031908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152701030b63932b0b23c903832b73234b7339760791b60608201526080019056fea2646970667358221220535f232bc393000c0245713b2c0e8c68054ae9cbf7af42338a97ed188b8ad73164736f6c63430008120033", "devdoc": { "details": "Router from Gnosis Chain to Arbitrum. Note: This contract is deployed on Ethereum.", "events": { @@ -565,7 +565,7 @@ "storageLayout": { "storage": [ { - "astId": 7480, + "astId": 5101, "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", "label": "L2GasBalance", "offset": 0, @@ -573,7 +573,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 7482, + "astId": 5103, "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", "label": "sequencerDelayLimit", "offset": 0, @@ -581,7 +581,7 @@ "type": "t_uint256" }, { - "astId": 7484, + "astId": 5105, "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", "label": "sequencerFutureLimit", "offset": 0, @@ -589,20 +589,20 @@ "type": "t_uint256" }, { - "astId": 7487, + "astId": 5108, "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "3", - "type": "t_struct(SequencerLimitDecreaseRequest)7495_storage" + "type": "t_struct(SequencerLimitDecreaseRequest)5116_storage" }, { - "astId": 7490, + "astId": 5111, "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", "label": "sequencerFutureLimitDecreaseRequest", "offset": 0, "slot": "5", - "type": "t_struct(SequencerLimitDecreaseRequest)7495_storage" + "type": "t_struct(SequencerLimitDecreaseRequest)5116_storage" } ], "types": { @@ -618,12 +618,12 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(SequencerLimitDecreaseRequest)7495_storage": { + "t_struct(SequencerLimitDecreaseRequest)5116_storage": { "encoding": "inplace", "label": "struct RouterGnosisToArb.SequencerLimitDecreaseRequest", "members": [ { - "astId": 7492, + "astId": 5113, "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", "label": "requestedSequencerLimit", "offset": 0, @@ -631,7 +631,7 @@ "type": "t_uint256" }, { - "astId": 7494, + "astId": 5115, "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/RouterGnosisToArbTestnet.json b/contracts/deployments/goerli/RouterGnosisToArbTestnet.json index e13dd5f2..272f35aa 100644 --- a/contracts/deployments/goerli/RouterGnosisToArbTestnet.json +++ b/contracts/deployments/goerli/RouterGnosisToArbTestnet.json @@ -1,5 +1,5 @@ { - "address": "0xC21c20a719fAc23c54c336FA0E16a0CFdC4baA00", + "address": "0x531754c9935A851173FA349b3bEadAF538c570aC", "abi": [ { "inputs": [ @@ -420,47 +420,47 @@ "type": "function" } ], - "transactionHash": "0xb10dea8416999f1d59f314e6911cd0e58f7d7e2fc8874059914aada67bb34b9d", + "transactionHash": "0xc75d7ea9110c4bda5d24c8b61586a95efec7a9e3306f8e177895e7e4163d809a", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xC21c20a719fAc23c54c336FA0E16a0CFdC4baA00", - "transactionIndex": 14, - "gasUsed": "1392489", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000800000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xcef9c424795a4bf31c36238071305a1cd6c2b6b3379b0aabc19d203c03e7cf6f", - "transactionHash": "0xb10dea8416999f1d59f314e6911cd0e58f7d7e2fc8874059914aada67bb34b9d", + "contractAddress": "0x531754c9935A851173FA349b3bEadAF538c570aC", + "transactionIndex": 82, + "gasUsed": "1392477", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000400000000000000000000000000000000000000", + "blockHash": "0xf0a18be3993d57ebb158489156f11ed455b3c1bc80fce508aca5850f16306aa5", + "transactionHash": "0xc75d7ea9110c4bda5d24c8b61586a95efec7a9e3306f8e177895e7e4163d809a", "logs": [ { - "transactionIndex": 14, - "blockNumber": 9254080, - "transactionHash": "0xb10dea8416999f1d59f314e6911cd0e58f7d7e2fc8874059914aada67bb34b9d", - "address": "0xC21c20a719fAc23c54c336FA0E16a0CFdC4baA00", + "transactionIndex": 82, + "blockNumber": 9254618, + "transactionHash": "0xc75d7ea9110c4bda5d24c8b61586a95efec7a9e3306f8e177895e7e4163d809a", + "address": "0x531754c9935A851173FA349b3bEadAF538c570aC", "topics": [ "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 34, - "blockHash": "0xcef9c424795a4bf31c36238071305a1cd6c2b6b3379b0aabc19d203c03e7cf6f" + "logIndex": 177, + "blockHash": "0xf0a18be3993d57ebb158489156f11ed455b3c1bc80fce508aca5850f16306aa5" } ], - "blockNumber": 9254080, - "cumulativeGasUsed": "3215058", + "blockNumber": 9254618, + "cumulativeGasUsed": "10799409", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0xB10EF39cc9b45A8EAfa87655063E3dD83D675075", - "0x663697f5748c5f4d46a15114Dde5514356E794F4", + "0xfF2B7048d673767754B798df1702C786E2c59F1F", + "0xF0492e87Be6d644A6a467fE20ee9EC5eFCB6cB23", 5 ], - "numDeployments": 1, - "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_inboxChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"L2GasBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerFutureLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Gnosis Chain to Arbitrum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,uint256)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer delay limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(uint256)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value\",\"params\":{\"_ticketID\":\"The ticketID from the delayed inbox of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer delay limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}},\"sequencerFutureLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer future limit has been made.\",\"params\":{\"_requestedSequencerFutureLimit\":\"The new sequencer limit requested.\"}},\"sequencerFutureLimitSent(uint256)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value\",\"params\":{\"_ticketID\":\"The ticketID from the delayed inbox of the cross-chain message.\"}},\"sequencerFutureLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer future limit updated.\",\"params\":{\"_newSequencerFutureLimit\":\"The new sequencer future limit.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_inboxChainId\":\"The chain ID of the inbox chain.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"executeSequencerFutureLimitDecreaseRequest()\":{\"details\":\"execute sequencerFutureLimitDecreaseRequest\"},\"route(uint256,bytes32,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to.\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee.\",\"_stateroot\":\"The true state root for the epoch.\"}},\"sendSequencerDelayLimit(uint256,uint256,address,uint256,uint256)\":{\"details\":\"Send the sequencer delay limit through the delayed inbox.\"},\"sendSequencerFutureLimit(uint256,uint256,address,uint256,uint256)\":{\"details\":\"Send the sequencer future limit through the delayed inbox.\"},\"updateSequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"},\"updateSequencerFutureLimit()\":{\"details\":\"Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,uint256,uint256,address,uint256,uint256)\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/RouterGnosisToArb.sol\":\"RouterGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IInbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IInbox.sol\\n// proxy: https://etherscan.io/address/0x4Dbd4fc535Ac27206064B68FfCf827b0A60BAB3f\\n// implementation: https://etherscan.io/address/0x5aed5f8a1e3607476f1f81c3d8fe126deb0afe94\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface IInbox {\\n function bridge() external view returns (IBridge);\\n\\n /**\\n * @notice Put a message in the L2 inbox that can be reexecuted for some fixed amount of time if it reverts\\n * @dev all msg.value will deposited to callValueRefundAddress on L2\\n * @dev Gas limit and maxFeePerGas should not be set to 1 as that is used to trigger the RetryableData error\\n * @param to destination L2 contract address\\n * @param l2CallValue call value for retryable L2 message\\n * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n * @param excessFeeRefundAddress gasLimit x maxFeePerGas - execution cost gets credited here on L2 balance\\n * @param callValueRefundAddress l2Callvalue gets credited here on L2 if retryable txn times out or gets cancelled\\n * @param gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n * @param maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n * @param data ABI encoded data of L2 message\\n * @return unique message number of the retryable transaction\\n */\\n function createRetryableTicket(\\n address to,\\n uint256 l2CallValue,\\n uint256 maxSubmissionCost,\\n address excessFeeRefundAddress,\\n address callValueRefundAddress,\\n uint256 gasLimit,\\n uint256 maxFeePerGas,\\n bytes calldata data\\n ) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x2497d8bd48681de9d2b9929152afbc3ad5508923cce0eb4e863bf576955ddec2\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/RouterGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerFutureUpdatable.sol\\\";\\n\\n/// @dev Router from Gnosis Chain to Arbitrum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterGnosisToArb is IRouterToArb {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxGnosisToArb; // The address of the veaInbox on Gnosis.\\n address public immutable veaOutboxGnosisToArb; // The address of the veaOutbox on Arbitrum.\\n uint256 internal immutable inboxChainId; // The chain ID of the inbox chain.\\n\\n mapping(address => uint256) public L2GasBalance;\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n SequencerLimitDecreaseRequest public sequencerFutureLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, uint256 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value\\n /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message.\\n event sequencerDelayLimitSent(uint256 _ticketID);\\n\\n /// @dev This event indicates the sequencer delay limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer delay limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value\\n /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message.\\n event sequencerFutureLimitSent(uint256 _ticketID);\\n\\n /// @dev This event indicates the sequencer future limit updated.\\n /// @param _newSequencerFutureLimit The new sequencer future limit.\\n event sequencerFutureLimitUpdated(uint256 _newSequencerFutureLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer future limit has been made.\\n /// @param _requestedSequencerFutureLimit The new sequencer limit requested.\\n event sequencerFutureLimitDecreaseRequested(uint256 _requestedSequencerFutureLimit);\\n\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n /// @param _inboxChainId The chain ID of the inbox chain.\\n constructor(\\n IBridge _bridge, \\n IAMB _amb,\\n address _veaInboxArbToGnosis,\\n address _veaOutboxArbToGnosis,\\n uint256 _inboxChainId\\n ) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxGnosisToArb = _veaInboxArbToGnosis;\\n veaOutboxGnosisToArb = _veaOutboxArbToGnosis;\\n inboxChainId = _inboxChainId;\\n\\n updateSequencerDelayLimit();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerFutureLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , , uint256 newSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerFutureLimit > sequencerFutureLimit) {\\n // For sequencerFutureLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerFutureLimit = newSequencerFutureLimit;\\n emit sequencerFutureLimitUpdated(newSequencerFutureLimit);\\n } else if (newSequencerFutureLimit < sequencerFutureLimit) {\\n require(\\n sequencerFutureLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerFutureLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerFutureLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerFutureLimitDecreaseRequested(newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerFutureLimitDecreaseRequest\\n function executeSequencerFutureLimitDecreaseRequest() external {\\n require(sequencerFutureLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerFutureLimitDecreaseRequest.timestamp + sequencerFutureLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerFutureLimit = sequencerFutureLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerFutureLimitDecreaseRequest;\\n\\n (, , , uint256 currentSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerFutureLimit == requestedSequencerFutureLimit) {\\n sequencerFutureLimit = requestedSequencerFutureLimit;\\n emit sequencerFutureLimitUpdated(requestedSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Send the sequencer future limit through the delayed inbox.\\n function sendSequencerFutureLimit(\\n uint256 _inboxIndex, \\n uint256 _maxSubmissionCost, \\n address _excessFeeRefundAddress, \\n uint256 _gasLimit, \\n uint256 _maxFeePerGas\\n ) external {\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n \\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(\\n ISequencerFutureUpdatable.updateSequencerFutureLimit,\\n (sequencerFutureLimit, block.timestamp)\\n );\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n \\n emit sequencerFutureLimitSent(ticketID);\\n }\\n\\n /// @dev Send the sequencer delay limit through the delayed inbox.\\n function sendSequencerDelayLimit(\\n uint256 _inboxIndex, \\n uint256 _maxSubmissionCost, \\n address _excessFeeRefundAddress, \\n uint256 _gasLimit, \\n uint256 _maxFeePerGas\\n ) external {\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n \\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n \\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function deposit() external payable{\\n L2GasBalance[msg.sender] += msg.value;\\n }\\n\\n function withdraw(uint256 _amount) external{\\n require(L2GasBalance[msg.sender] > _amount, \\\"Insufficient balance.\\\");\\n L2GasBalance[msg.sender] -= _amount;\\n payable(msg.sender).send(_amount); // User is responsible for accepting ETH.\\n }\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee.\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to.\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\\n function route(\\n uint256 _epoch, \\n bytes32 _stateroot, \\n uint256 _inboxIndex, \\n uint256 _maxSubmissionCost, \\n address _excessFeeRefundAddress, \\n uint256 _gasLimit, \\n uint256 _maxFeePerGas\\n ) external {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(inboxChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(veaInboxGnosisToArb == amb.messageSender(), \\\"Vea Inbox only.\\\");\\n\\n // Ethereum -> Arbitrum message passing with retryable tickets in the delayed inbox, the canonical Ethereum -> Arbitrum bridge.\\n // https://developer.arbitrum.io/arbos/l1-to-l2-messaging#submission\\n\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n \\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL2.resolveDisputedClaim, (_epoch, _stateroot));\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x1594be4399e2c77f45f6cc7acecb602172cfe387fe95ad78016f0838097829a3\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerFutureUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerFutureUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerFutureUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerFutureLimit The futureSeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0x5c8b8ffaec923126ec1699d9c1483329b5a660837803aefc4aa95d9f091ef21f\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101206040523480156200001257600080fd5b5060405162001aeb38038062001aeb833981016040819052620000359162000268565b6001600160a01b0380861660805284811660a05283811660c052821660e052610100819052620000646200006f565b50505050506200033a565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d89190620002dc565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000116573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200013c919062000303565b5092505050600154811115620001875760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6001548110156200024f5760045415620002015760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6001600160a01b03811681146200024f57600080fd5b600080600080600060a086880312156200028157600080fd5b85516200028e8162000252565b6020870151909550620002a18162000252565b6040870151909450620002b48162000252565b6060870151909350620002c78162000252565b80925050608086015190509295509295909350565b600060208284031215620002ef57600080fd5b8151620002fc8162000252565b9392505050565b600080600080608085870312156200031a57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e0516101005161170a620003e1600039600061085501526000818161021101528181610aed0152818161105401526112700152600081816102d7015261094201526000818161019001528181610759015281816107d301526108b701526000818161035301528181610410015281816105a401528181610a6f01528181610bc801528181610d7301528181610fd601526111f2015261170a6000f3fe6080604052600436106101095760003560e01c806365b0183511610095578063b6d7aeff11610064578063b6d7aeff146102f9578063c4977c8b14610319578063d0e30db014610339578063e78cea9214610341578063e813a7551461037557600080fd5b806365b018351461026857806377a43648146102955780637e260880146102aa5780639e75a705146102c557600080fd5b80631ff47dc0116100dc5780631ff47dc0146101ca5780632e1a7d4d146101df5780634738b97f146101ff578063507b5ad3146102335780635f43a47f1461025357600080fd5b8063051d19701461010e5780630c63fa84146101435780630e56752e1461015a5780631062b39a1461017e575b600080fd5b34801561011a57600080fd5b50600354600454610129919082565b604080519283526020830191909152015b60405180910390f35b34801561014f57600080fd5b5061015861038b565b005b34801561016657600080fd5b5061017060025481565b60405190815260200161013a565b34801561018a57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013a565b3480156101d657600080fd5b50610158610528565b3480156101eb57600080fd5b506101586101fa366004611357565b6106b5565b34801561020b57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561023f57600080fd5b5061015861024e366004611385565b61074e565b34801561025f57600080fd5b50610158610bc4565b34801561027457600080fd5b506101706102833660046113e4565b60006020819052908152604090205481565b3480156102a157600080fd5b50610158610d6f565b3480156102b657600080fd5b50600554600654610129919082565b3480156102d157600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561030557600080fd5b50610158610314366004611408565b610f0c565b34801561032557600080fd5b50610158610334366004611408565b611128565b610158611331565b34801561034d57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561038157600080fd5b5061017060015481565b6004546000036103b65760405162461bcd60e51b81526004016103ad90611451565b60405180910390fd5b6001546004546103c691906114b3565b42116103e45760405162461bcd60e51b81526004016103ad906114cc565b6003805460009182905560048281556040805163ee35f32760e01b815290519293926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263ee35f327928082019260209290918290030181865afa158015610459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047d919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de919061153b565b50925050508181036105245760018290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60065460000361054a5760405162461bcd60e51b81526004016103ad90611451565b60025460065461055a91906114b3565b42116105785760405162461bcd60e51b81526004016103ad906114cc565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156105ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610613919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610674919061153b565b93505050508181036105245760028290556040518281527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b2719060200161051b565b33600090815260208190526040902054811061070b5760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b60448201526064016103ad565b336000908152602081905260408120805483929061072a908490611571565b9091555050604051339082156108fc029083906000818181858888f1505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107d15760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190611584565b7f0000000000000000000000000000000000000000000000000000000000000000146108b55760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610913573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610937919061151e565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146109a95760405162461bcd60e51b815260206004820152600f60248201526e2b32b09024b73137bc1037b7363c9760891b60448201526064016103ad565b60006109b5828461159d565b6109bf90866114b3565b33600090815260208190526040902054909150818110156109f25760405162461bcd60e51b81526004016103ad906115b4565b6109fc8282611571565b33600090815260208190526040808220929092559051602481018b9052604481018a905260640160408051601f198184030181529181526020820180516001600160e01b0316631195d6f560e31b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af1158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b8152600401610b389897969594939291906115eb565b60206040518083038185885af1158015610b56573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b7b9190611584565b90508a7fcafd272887d09c9615b3354aa56a477e3ba7b4095d0b6201235c2bfabe2294c582604051610baf91815260200190565b60405180910390a25050505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c48919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca9919061153b565b5092505050600154811115610cf45760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a150565b600154811015610d6c5760045415610d1e5760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df3919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610e30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e54919061153b565b9350505050600254811115610e985760028190556040518181527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b27190602001610ce9565b600254811015610d6c5760065415610ec25760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600584905560065590518281527f326636d2e3d2c0d42c0fb6fd9f30ab0fcde3dff35e63db28f8abc38d566057f49101610ce9565b6000610f18828461159d565b610f2290866114b3565b3360009081526020819052604090205490915081811015610f555760405162461bcd60e51b81526004016103ad906115b4565b610f5f8282611571565b3360009081526020819052604080822092909255600254915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b031663710cc9a760e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561101f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611043919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b815260040161109f9897969594939291906115eb565b60206040518083038185885af11580156110bd573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110e29190611584565b90507f0bb0de69fc6722b8061f8161f450a46b49fd536c11535aab912024d630d505cf8160405161111591815260200190565b60405180910390a1505050505050505050565b6000611134828461159d565b61113e90866114b3565b33600090815260208190526040902054909150818110156111715760405162461bcd60e51b81526004016103ad906115b4565b61117b8282611571565b3360009081526020819052604080822092909255600154915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b0316632c19251960e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561123b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125f919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b81526004016112bb9897969594939291906115eb565b60206040518083038185885af11580156112d9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112fe9190611584565b90507fe68d5d0ca95adf855ddd4733abf1d205e40aaef86e1c7795f4002791d5e28a388160405161111591815260200190565b33600090815260208190526040812080543492906113509084906114b3565b9091555050565b60006020828403121561136957600080fd5b5035919050565b6001600160a01b0381168114610d6c57600080fd5b600080600080600080600060e0888a0312156113a057600080fd5b8735965060208801359550604088013594506060880135935060808801356113c781611370565b9699959850939692959460a0840135945060c09093013592915050565b6000602082840312156113f657600080fd5b813561140181611370565b9392505050565b600080600080600060a0868803121561142057600080fd5b8535945060208601359350604086013561143981611370565b94979396509394606081013594506080013592915050565b6020808252602c908201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560408201526b30b9b2903932b8bab2b9ba1760a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156114c6576114c661149d565b92915050565b60208082526032908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152711034b99039ba34b636103832b73234b7339760711b606082015260800190565b60006020828403121561153057600080fd5b815161140181611370565b6000806000806080858703121561155157600080fd5b505082516020840151604085015160609095015191969095509092509050565b818103818111156114c6576114c661149d565b60006020828403121561159657600080fd5b5051919050565b80820281158282048414176114c6576114c661149d565b6020808252601c908201527f496e73756666696369656e74204c32206761732062616c616e63652e00000000604082015260600190565b600061010060018060a01b03808c16845260208b818601528a6040860152818a16606086015281891660808601528760a08601528660c08601528260e0860152855191508183860152600092505b8183101561165857858301810151858401610120015291820191611639565b506101209150600082828601015281601f19601f830116850101925050509998505050505050505050565b60208082526031908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152701030b63932b0b23c903832b73234b7339760791b60608201526080019056fea26469706673582212206d347ab6da12947fbbaaedb3059a0725b4bd0933fadda0023baef951f2c4a69464736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101095760003560e01c806365b0183511610095578063b6d7aeff11610064578063b6d7aeff146102f9578063c4977c8b14610319578063d0e30db014610339578063e78cea9214610341578063e813a7551461037557600080fd5b806365b018351461026857806377a43648146102955780637e260880146102aa5780639e75a705146102c557600080fd5b80631ff47dc0116100dc5780631ff47dc0146101ca5780632e1a7d4d146101df5780634738b97f146101ff578063507b5ad3146102335780635f43a47f1461025357600080fd5b8063051d19701461010e5780630c63fa84146101435780630e56752e1461015a5780631062b39a1461017e575b600080fd5b34801561011a57600080fd5b50600354600454610129919082565b604080519283526020830191909152015b60405180910390f35b34801561014f57600080fd5b5061015861038b565b005b34801561016657600080fd5b5061017060025481565b60405190815260200161013a565b34801561018a57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013a565b3480156101d657600080fd5b50610158610528565b3480156101eb57600080fd5b506101586101fa366004611357565b6106b5565b34801561020b57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561023f57600080fd5b5061015861024e366004611385565b61074e565b34801561025f57600080fd5b50610158610bc4565b34801561027457600080fd5b506101706102833660046113e4565b60006020819052908152604090205481565b3480156102a157600080fd5b50610158610d6f565b3480156102b657600080fd5b50600554600654610129919082565b3480156102d157600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561030557600080fd5b50610158610314366004611408565b610f0c565b34801561032557600080fd5b50610158610334366004611408565b611128565b610158611331565b34801561034d57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561038157600080fd5b5061017060015481565b6004546000036103b65760405162461bcd60e51b81526004016103ad90611451565b60405180910390fd5b6001546004546103c691906114b3565b42116103e45760405162461bcd60e51b81526004016103ad906114cc565b6003805460009182905560048281556040805163ee35f32760e01b815290519293926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263ee35f327928082019260209290918290030181865afa158015610459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047d919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de919061153b565b50925050508181036105245760018290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60065460000361054a5760405162461bcd60e51b81526004016103ad90611451565b60025460065461055a91906114b3565b42116105785760405162461bcd60e51b81526004016103ad906114cc565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156105ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610613919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610674919061153b565b93505050508181036105245760028290556040518281527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b2719060200161051b565b33600090815260208190526040902054811061070b5760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b60448201526064016103ad565b336000908152602081905260408120805483929061072a908490611571565b9091555050604051339082156108fc029083906000818181858888f1505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107d15760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190611584565b7f0000000000000000000000000000000000000000000000000000000000000000146108b55760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610913573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610937919061151e565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146109a95760405162461bcd60e51b815260206004820152600f60248201526e2b32b09024b73137bc1037b7363c9760891b60448201526064016103ad565b60006109b5828461159d565b6109bf90866114b3565b33600090815260208190526040902054909150818110156109f25760405162461bcd60e51b81526004016103ad906115b4565b6109fc8282611571565b33600090815260208190526040808220929092559051602481018b9052604481018a905260640160408051601f198184030181529181526020820180516001600160e01b0316631195d6f560e31b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af1158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b8152600401610b389897969594939291906115eb565b60206040518083038185885af1158015610b56573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b7b9190611584565b90508a7fcafd272887d09c9615b3354aa56a477e3ba7b4095d0b6201235c2bfabe2294c582604051610baf91815260200190565b60405180910390a25050505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c48919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca9919061153b565b5092505050600154811115610cf45760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a150565b600154811015610d6c5760045415610d1e5760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df3919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610e30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e54919061153b565b9350505050600254811115610e985760028190556040518181527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b27190602001610ce9565b600254811015610d6c5760065415610ec25760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600584905560065590518281527f326636d2e3d2c0d42c0fb6fd9f30ab0fcde3dff35e63db28f8abc38d566057f49101610ce9565b6000610f18828461159d565b610f2290866114b3565b3360009081526020819052604090205490915081811015610f555760405162461bcd60e51b81526004016103ad906115b4565b610f5f8282611571565b3360009081526020819052604080822092909255600254915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b031663710cc9a760e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561101f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611043919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b815260040161109f9897969594939291906115eb565b60206040518083038185885af11580156110bd573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110e29190611584565b90507f0bb0de69fc6722b8061f8161f450a46b49fd536c11535aab912024d630d505cf8160405161111591815260200190565b60405180910390a1505050505050505050565b6000611134828461159d565b61113e90866114b3565b33600090815260208190526040902054909150818110156111715760405162461bcd60e51b81526004016103ad906115b4565b61117b8282611571565b3360009081526020819052604080822092909255600154915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b0316632c19251960e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561123b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125f919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b81526004016112bb9897969594939291906115eb565b60206040518083038185885af11580156112d9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112fe9190611584565b90507fe68d5d0ca95adf855ddd4733abf1d205e40aaef86e1c7795f4002791d5e28a388160405161111591815260200190565b33600090815260208190526040812080543492906113509084906114b3565b9091555050565b60006020828403121561136957600080fd5b5035919050565b6001600160a01b0381168114610d6c57600080fd5b600080600080600080600060e0888a0312156113a057600080fd5b8735965060208801359550604088013594506060880135935060808801356113c781611370565b9699959850939692959460a0840135945060c09093013592915050565b6000602082840312156113f657600080fd5b813561140181611370565b9392505050565b600080600080600060a0868803121561142057600080fd5b8535945060208601359350604086013561143981611370565b94979396509394606081013594506080013592915050565b6020808252602c908201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560408201526b30b9b2903932b8bab2b9ba1760a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156114c6576114c661149d565b92915050565b60208082526032908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152711034b99039ba34b636103832b73234b7339760711b606082015260800190565b60006020828403121561153057600080fd5b815161140181611370565b6000806000806080858703121561155157600080fd5b505082516020840151604085015160609095015191969095509092509050565b818103818111156114c6576114c661149d565b60006020828403121561159657600080fd5b5051919050565b80820281158282048414176114c6576114c661149d565b6020808252601c908201527f496e73756666696369656e74204c32206761732062616c616e63652e00000000604082015260600190565b600061010060018060a01b03808c16845260208b818601528a6040860152818a16606086015281891660808601528760a08601528660c08601528260e0860152855191508183860152600092505b8183101561165857858301810151858401610120015291820191611639565b506101209150600082828601015281601f19601f830116850101925050509998505050505050505050565b60208082526031908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152701030b63932b0b23c903832b73234b7339760791b60608201526080019056fea26469706673582212206d347ab6da12947fbbaaedb3059a0725b4bd0933fadda0023baef951f2c4a69464736f6c63430008120033", + "numDeployments": 3, + "solcInputHash": "916b5e2210e8e15d34b48798389f67fe", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_inboxChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"L2GasBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerFutureLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Gnosis Chain to Arbitrum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,uint256)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer delay limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(uint256)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value\",\"params\":{\"_ticketID\":\"The ticketID from the delayed inbox of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer delay limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}},\"sequencerFutureLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer future limit has been made.\",\"params\":{\"_requestedSequencerFutureLimit\":\"The new sequencer limit requested.\"}},\"sequencerFutureLimitSent(uint256)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value\",\"params\":{\"_ticketID\":\"The ticketID from the delayed inbox of the cross-chain message.\"}},\"sequencerFutureLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer future limit updated.\",\"params\":{\"_newSequencerFutureLimit\":\"The new sequencer future limit.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_inboxChainId\":\"The chain ID of the inbox chain.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"executeSequencerFutureLimitDecreaseRequest()\":{\"details\":\"execute sequencerFutureLimitDecreaseRequest\"},\"route(uint256,bytes32,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to.\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee.\",\"_stateroot\":\"The true state root for the epoch.\"}},\"sendSequencerDelayLimit(uint256,uint256,address,uint256,uint256)\":{\"details\":\"Send the sequencer delay limit through the delayed inbox.\"},\"sendSequencerFutureLimit(uint256,uint256,address,uint256,uint256)\":{\"details\":\"Send the sequencer future limit through the delayed inbox.\"},\"updateSequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"},\"updateSequencerFutureLimit()\":{\"details\":\"Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,uint256,uint256,address,uint256,uint256)\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/RouterGnosisToArb.sol\":\"RouterGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IInbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IInbox.sol\\n// proxy: https://etherscan.io/address/0x4Dbd4fc535Ac27206064B68FfCf827b0A60BAB3f\\n// implementation: https://etherscan.io/address/0x5aed5f8a1e3607476f1f81c3d8fe126deb0afe94\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface IInbox {\\n function bridge() external view returns (IBridge);\\n\\n /**\\n * @notice Put a message in the L2 inbox that can be reexecuted for some fixed amount of time if it reverts\\n * @dev all msg.value will deposited to callValueRefundAddress on L2\\n * @dev Gas limit and maxFeePerGas should not be set to 1 as that is used to trigger the RetryableData error\\n * @param to destination L2 contract address\\n * @param l2CallValue call value for retryable L2 message\\n * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n * @param excessFeeRefundAddress gasLimit x maxFeePerGas - execution cost gets credited here on L2 balance\\n * @param callValueRefundAddress l2Callvalue gets credited here on L2 if retryable txn times out or gets cancelled\\n * @param gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n * @param maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n * @param data ABI encoded data of L2 message\\n * @return unique message number of the retryable transaction\\n */\\n function createRetryableTicket(\\n address to,\\n uint256 l2CallValue,\\n uint256 maxSubmissionCost,\\n address excessFeeRefundAddress,\\n address callValueRefundAddress,\\n uint256 gasLimit,\\n uint256 maxFeePerGas,\\n bytes calldata data\\n ) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x2497d8bd48681de9d2b9929152afbc3ad5508923cce0eb4e863bf576955ddec2\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/RouterGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerFutureUpdatable.sol\\\";\\n\\n/// @dev Router from Gnosis Chain to Arbitrum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterGnosisToArb is IRouterToArb {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxGnosisToArb; // The address of the veaInbox on Gnosis.\\n address public immutable veaOutboxGnosisToArb; // The address of the veaOutbox on Arbitrum.\\n uint256 internal immutable inboxChainId; // The chain ID of the inbox chain.\\n\\n mapping(address => uint256) public L2GasBalance;\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n SequencerLimitDecreaseRequest public sequencerFutureLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, uint256 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value\\n /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message.\\n event sequencerDelayLimitSent(uint256 _ticketID);\\n\\n /// @dev This event indicates the sequencer delay limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer delay limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value\\n /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message.\\n event sequencerFutureLimitSent(uint256 _ticketID);\\n\\n /// @dev This event indicates the sequencer future limit updated.\\n /// @param _newSequencerFutureLimit The new sequencer future limit.\\n event sequencerFutureLimitUpdated(uint256 _newSequencerFutureLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer future limit has been made.\\n /// @param _requestedSequencerFutureLimit The new sequencer limit requested.\\n event sequencerFutureLimitDecreaseRequested(uint256 _requestedSequencerFutureLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n /// @param _inboxChainId The chain ID of the inbox chain.\\n constructor(\\n IBridge _bridge,\\n IAMB _amb,\\n address _veaInboxArbToGnosis,\\n address _veaOutboxArbToGnosis,\\n uint256 _inboxChainId\\n ) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxGnosisToArb = _veaInboxArbToGnosis;\\n veaOutboxGnosisToArb = _veaOutboxArbToGnosis;\\n inboxChainId = _inboxChainId;\\n\\n updateSequencerDelayLimit();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerFutureLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , , uint256 newSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerFutureLimit > sequencerFutureLimit) {\\n // For sequencerFutureLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerFutureLimit = newSequencerFutureLimit;\\n emit sequencerFutureLimitUpdated(newSequencerFutureLimit);\\n } else if (newSequencerFutureLimit < sequencerFutureLimit) {\\n require(\\n sequencerFutureLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerFutureLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerFutureLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerFutureLimitDecreaseRequested(newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerFutureLimitDecreaseRequest\\n function executeSequencerFutureLimitDecreaseRequest() external {\\n require(sequencerFutureLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerFutureLimitDecreaseRequest.timestamp + sequencerFutureLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerFutureLimit = sequencerFutureLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerFutureLimitDecreaseRequest;\\n\\n (, , , uint256 currentSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerFutureLimit == requestedSequencerFutureLimit) {\\n sequencerFutureLimit = requestedSequencerFutureLimit;\\n emit sequencerFutureLimitUpdated(requestedSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Send the sequencer future limit through the delayed inbox.\\n function sendSequencerFutureLimit(\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external {\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n\\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(\\n ISequencerFutureUpdatable.updateSequencerFutureLimit,\\n (sequencerFutureLimit, block.timestamp)\\n );\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit sequencerFutureLimitSent(ticketID);\\n }\\n\\n /// @dev Send the sequencer delay limit through the delayed inbox.\\n function sendSequencerDelayLimit(\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external {\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n\\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function deposit() external payable {\\n L2GasBalance[msg.sender] += msg.value;\\n }\\n\\n function withdraw(uint256 _amount) external {\\n require(L2GasBalance[msg.sender] > _amount, \\\"Insufficient balance.\\\");\\n L2GasBalance[msg.sender] -= _amount;\\n payable(msg.sender).send(_amount); // User is responsible for accepting ETH.\\n }\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee.\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to.\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(inboxChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(veaInboxGnosisToArb == amb.messageSender(), \\\"Vea Inbox only.\\\");\\n\\n // Ethereum -> Arbitrum message passing with retryable tickets in the delayed inbox, the canonical Ethereum -> Arbitrum bridge.\\n // https://developer.arbitrum.io/arbos/l1-to-l2-messaging#submission\\n\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n\\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL2.resolveDisputedClaim, (_epoch, _stateroot));\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xaab3a5d9b5a52671af6336f05306c66627bfe25dbf0dd51fc88882c14da15a3d\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerFutureUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerFutureUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerFutureUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerFutureLimit The futureSeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0x5c8b8ffaec923126ec1699d9c1483329b5a660837803aefc4aa95d9f091ef21f\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101206040523480156200001257600080fd5b5060405162001aeb38038062001aeb833981016040819052620000359162000268565b6001600160a01b0380861660805284811660a05283811660c052821660e052610100819052620000646200006f565b50505050506200033a565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d89190620002dc565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000116573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200013c919062000303565b5092505050600154811115620001875760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6001548110156200024f5760045415620002015760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6001600160a01b03811681146200024f57600080fd5b600080600080600060a086880312156200028157600080fd5b85516200028e8162000252565b6020870151909550620002a18162000252565b6040870151909450620002b48162000252565b6060870151909350620002c78162000252565b80925050608086015190509295509295909350565b600060208284031215620002ef57600080fd5b8151620002fc8162000252565b9392505050565b600080600080608085870312156200031a57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e0516101005161170a620003e1600039600061085501526000818161021101528181610aed0152818161105401526112700152600081816102d7015261094201526000818161019001528181610759015281816107d301526108b701526000818161035301528181610410015281816105a401528181610a6f01528181610bc801528181610d7301528181610fd601526111f2015261170a6000f3fe6080604052600436106101095760003560e01c806365b0183511610095578063b6d7aeff11610064578063b6d7aeff146102f9578063c4977c8b14610319578063d0e30db014610339578063e78cea9214610341578063e813a7551461037557600080fd5b806365b018351461026857806377a43648146102955780637e260880146102aa5780639e75a705146102c557600080fd5b80631ff47dc0116100dc5780631ff47dc0146101ca5780632e1a7d4d146101df5780634738b97f146101ff578063507b5ad3146102335780635f43a47f1461025357600080fd5b8063051d19701461010e5780630c63fa84146101435780630e56752e1461015a5780631062b39a1461017e575b600080fd5b34801561011a57600080fd5b50600354600454610129919082565b604080519283526020830191909152015b60405180910390f35b34801561014f57600080fd5b5061015861038b565b005b34801561016657600080fd5b5061017060025481565b60405190815260200161013a565b34801561018a57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013a565b3480156101d657600080fd5b50610158610528565b3480156101eb57600080fd5b506101586101fa366004611357565b6106b5565b34801561020b57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561023f57600080fd5b5061015861024e366004611385565b61074e565b34801561025f57600080fd5b50610158610bc4565b34801561027457600080fd5b506101706102833660046113e4565b60006020819052908152604090205481565b3480156102a157600080fd5b50610158610d6f565b3480156102b657600080fd5b50600554600654610129919082565b3480156102d157600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561030557600080fd5b50610158610314366004611408565b610f0c565b34801561032557600080fd5b50610158610334366004611408565b611128565b610158611331565b34801561034d57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561038157600080fd5b5061017060015481565b6004546000036103b65760405162461bcd60e51b81526004016103ad90611451565b60405180910390fd5b6001546004546103c691906114b3565b42116103e45760405162461bcd60e51b81526004016103ad906114cc565b6003805460009182905560048281556040805163ee35f32760e01b815290519293926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263ee35f327928082019260209290918290030181865afa158015610459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047d919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de919061153b565b50925050508181036105245760018290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60065460000361054a5760405162461bcd60e51b81526004016103ad90611451565b60025460065461055a91906114b3565b42116105785760405162461bcd60e51b81526004016103ad906114cc565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156105ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610613919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610674919061153b565b93505050508181036105245760028290556040518281527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b2719060200161051b565b33600090815260208190526040902054811061070b5760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b60448201526064016103ad565b336000908152602081905260408120805483929061072a908490611571565b9091555050604051339082156108fc029083906000818181858888f1505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107d15760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190611584565b7f0000000000000000000000000000000000000000000000000000000000000000146108b55760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610913573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610937919061151e565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146109a95760405162461bcd60e51b815260206004820152600f60248201526e2b32b09024b73137bc1037b7363c9760891b60448201526064016103ad565b60006109b5828461159d565b6109bf90866114b3565b33600090815260208190526040902054909150818110156109f25760405162461bcd60e51b81526004016103ad906115b4565b6109fc8282611571565b33600090815260208190526040808220929092559051602481018b9052604481018a905260640160408051601f198184030181529181526020820180516001600160e01b0316631195d6f560e31b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af1158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b8152600401610b389897969594939291906115eb565b60206040518083038185885af1158015610b56573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b7b9190611584565b90508a7fcafd272887d09c9615b3354aa56a477e3ba7b4095d0b6201235c2bfabe2294c582604051610baf91815260200190565b60405180910390a25050505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c48919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca9919061153b565b5092505050600154811115610cf45760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a150565b600154811015610d6c5760045415610d1e5760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df3919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610e30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e54919061153b565b9350505050600254811115610e985760028190556040518181527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b27190602001610ce9565b600254811015610d6c5760065415610ec25760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600584905560065590518281527f326636d2e3d2c0d42c0fb6fd9f30ab0fcde3dff35e63db28f8abc38d566057f49101610ce9565b6000610f18828461159d565b610f2290866114b3565b3360009081526020819052604090205490915081811015610f555760405162461bcd60e51b81526004016103ad906115b4565b610f5f8282611571565b3360009081526020819052604080822092909255600254915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b031663710cc9a760e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561101f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611043919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b815260040161109f9897969594939291906115eb565b60206040518083038185885af11580156110bd573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110e29190611584565b90507f0bb0de69fc6722b8061f8161f450a46b49fd536c11535aab912024d630d505cf8160405161111591815260200190565b60405180910390a1505050505050505050565b6000611134828461159d565b61113e90866114b3565b33600090815260208190526040902054909150818110156111715760405162461bcd60e51b81526004016103ad906115b4565b61117b8282611571565b3360009081526020819052604080822092909255600154915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b0316632c19251960e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561123b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125f919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b81526004016112bb9897969594939291906115eb565b60206040518083038185885af11580156112d9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112fe9190611584565b90507fe68d5d0ca95adf855ddd4733abf1d205e40aaef86e1c7795f4002791d5e28a388160405161111591815260200190565b33600090815260208190526040812080543492906113509084906114b3565b9091555050565b60006020828403121561136957600080fd5b5035919050565b6001600160a01b0381168114610d6c57600080fd5b600080600080600080600060e0888a0312156113a057600080fd5b8735965060208801359550604088013594506060880135935060808801356113c781611370565b9699959850939692959460a0840135945060c09093013592915050565b6000602082840312156113f657600080fd5b813561140181611370565b9392505050565b600080600080600060a0868803121561142057600080fd5b8535945060208601359350604086013561143981611370565b94979396509394606081013594506080013592915050565b6020808252602c908201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560408201526b30b9b2903932b8bab2b9ba1760a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156114c6576114c661149d565b92915050565b60208082526032908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152711034b99039ba34b636103832b73234b7339760711b606082015260800190565b60006020828403121561153057600080fd5b815161140181611370565b6000806000806080858703121561155157600080fd5b505082516020840151604085015160609095015191969095509092509050565b818103818111156114c6576114c661149d565b60006020828403121561159657600080fd5b5051919050565b80820281158282048414176114c6576114c661149d565b6020808252601c908201527f496e73756666696369656e74204c32206761732062616c616e63652e00000000604082015260600190565b600061010060018060a01b03808c16845260208b818601528a6040860152818a16606086015281891660808601528760a08601528660c08601528260e0860152855191508183860152600092505b8183101561165857858301810151858401610120015291820191611639565b506101209150600082828601015281601f19601f830116850101925050509998505050505050505050565b60208082526031908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152701030b63932b0b23c903832b73234b7339760791b60608201526080019056fea2646970667358221220535f232bc393000c0245713b2c0e8c68054ae9cbf7af42338a97ed188b8ad73164736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101095760003560e01c806365b0183511610095578063b6d7aeff11610064578063b6d7aeff146102f9578063c4977c8b14610319578063d0e30db014610339578063e78cea9214610341578063e813a7551461037557600080fd5b806365b018351461026857806377a43648146102955780637e260880146102aa5780639e75a705146102c557600080fd5b80631ff47dc0116100dc5780631ff47dc0146101ca5780632e1a7d4d146101df5780634738b97f146101ff578063507b5ad3146102335780635f43a47f1461025357600080fd5b8063051d19701461010e5780630c63fa84146101435780630e56752e1461015a5780631062b39a1461017e575b600080fd5b34801561011a57600080fd5b50600354600454610129919082565b604080519283526020830191909152015b60405180910390f35b34801561014f57600080fd5b5061015861038b565b005b34801561016657600080fd5b5061017060025481565b60405190815260200161013a565b34801561018a57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013a565b3480156101d657600080fd5b50610158610528565b3480156101eb57600080fd5b506101586101fa366004611357565b6106b5565b34801561020b57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561023f57600080fd5b5061015861024e366004611385565b61074e565b34801561025f57600080fd5b50610158610bc4565b34801561027457600080fd5b506101706102833660046113e4565b60006020819052908152604090205481565b3480156102a157600080fd5b50610158610d6f565b3480156102b657600080fd5b50600554600654610129919082565b3480156102d157600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561030557600080fd5b50610158610314366004611408565b610f0c565b34801561032557600080fd5b50610158610334366004611408565b611128565b610158611331565b34801561034d57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561038157600080fd5b5061017060015481565b6004546000036103b65760405162461bcd60e51b81526004016103ad90611451565b60405180910390fd5b6001546004546103c691906114b3565b42116103e45760405162461bcd60e51b81526004016103ad906114cc565b6003805460009182905560048281556040805163ee35f32760e01b815290519293926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263ee35f327928082019260209290918290030181865afa158015610459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047d919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de919061153b565b50925050508181036105245760018290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60065460000361054a5760405162461bcd60e51b81526004016103ad90611451565b60025460065461055a91906114b3565b42116105785760405162461bcd60e51b81526004016103ad906114cc565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156105ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610613919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610674919061153b565b93505050508181036105245760028290556040518281527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b2719060200161051b565b33600090815260208190526040902054811061070b5760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b60448201526064016103ad565b336000908152602081905260408120805483929061072a908490611571565b9091555050604051339082156108fc029083906000818181858888f1505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107d15760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190611584565b7f0000000000000000000000000000000000000000000000000000000000000000146108b55760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610913573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610937919061151e565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146109a95760405162461bcd60e51b815260206004820152600f60248201526e2b32b09024b73137bc1037b7363c9760891b60448201526064016103ad565b60006109b5828461159d565b6109bf90866114b3565b33600090815260208190526040902054909150818110156109f25760405162461bcd60e51b81526004016103ad906115b4565b6109fc8282611571565b33600090815260208190526040808220929092559051602481018b9052604481018a905260640160408051601f198184030181529181526020820180516001600160e01b0316631195d6f560e31b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af1158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b8152600401610b389897969594939291906115eb565b60206040518083038185885af1158015610b56573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b7b9190611584565b90508a7fcafd272887d09c9615b3354aa56a477e3ba7b4095d0b6201235c2bfabe2294c582604051610baf91815260200190565b60405180910390a25050505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c48919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca9919061153b565b5092505050600154811115610cf45760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a150565b600154811015610d6c5760045415610d1e5760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df3919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610e30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e54919061153b565b9350505050600254811115610e985760028190556040518181527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b27190602001610ce9565b600254811015610d6c5760065415610ec25760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600584905560065590518281527f326636d2e3d2c0d42c0fb6fd9f30ab0fcde3dff35e63db28f8abc38d566057f49101610ce9565b6000610f18828461159d565b610f2290866114b3565b3360009081526020819052604090205490915081811015610f555760405162461bcd60e51b81526004016103ad906115b4565b610f5f8282611571565b3360009081526020819052604080822092909255600254915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b031663710cc9a760e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561101f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611043919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b815260040161109f9897969594939291906115eb565b60206040518083038185885af11580156110bd573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110e29190611584565b90507f0bb0de69fc6722b8061f8161f450a46b49fd536c11535aab912024d630d505cf8160405161111591815260200190565b60405180910390a1505050505050505050565b6000611134828461159d565b61113e90866114b3565b33600090815260208190526040902054909150818110156111715760405162461bcd60e51b81526004016103ad906115b4565b61117b8282611571565b3360009081526020819052604080822092909255600154915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b0316632c19251960e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561123b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125f919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b81526004016112bb9897969594939291906115eb565b60206040518083038185885af11580156112d9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112fe9190611584565b90507fe68d5d0ca95adf855ddd4733abf1d205e40aaef86e1c7795f4002791d5e28a388160405161111591815260200190565b33600090815260208190526040812080543492906113509084906114b3565b9091555050565b60006020828403121561136957600080fd5b5035919050565b6001600160a01b0381168114610d6c57600080fd5b600080600080600080600060e0888a0312156113a057600080fd5b8735965060208801359550604088013594506060880135935060808801356113c781611370565b9699959850939692959460a0840135945060c09093013592915050565b6000602082840312156113f657600080fd5b813561140181611370565b9392505050565b600080600080600060a0868803121561142057600080fd5b8535945060208601359350604086013561143981611370565b94979396509394606081013594506080013592915050565b6020808252602c908201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560408201526b30b9b2903932b8bab2b9ba1760a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156114c6576114c661149d565b92915050565b60208082526032908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152711034b99039ba34b636103832b73234b7339760711b606082015260800190565b60006020828403121561153057600080fd5b815161140181611370565b6000806000806080858703121561155157600080fd5b505082516020840151604085015160609095015191969095509092509050565b818103818111156114c6576114c661149d565b60006020828403121561159657600080fd5b5051919050565b80820281158282048414176114c6576114c661149d565b6020808252601c908201527f496e73756666696369656e74204c32206761732062616c616e63652e00000000604082015260600190565b600061010060018060a01b03808c16845260208b818601528a6040860152818a16606086015281891660808601528760a08601528660c08601528260e0860152855191508183860152600092505b8183101561165857858301810151858401610120015291820191611639565b506101209150600082828601015281601f19601f830116850101925050509998505050505050505050565b60208082526031908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152701030b63932b0b23c903832b73234b7339760791b60608201526080019056fea2646970667358221220535f232bc393000c0245713b2c0e8c68054ae9cbf7af42338a97ed188b8ad73164736f6c63430008120033", "devdoc": { "details": "Router from Gnosis Chain to Arbitrum. Note: This contract is deployed on Ethereum.", "events": { @@ -565,7 +565,7 @@ "storageLayout": { "storage": [ { - "astId": 7480, + "astId": 5101, "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", "label": "L2GasBalance", "offset": 0, @@ -573,7 +573,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 7482, + "astId": 5103, "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", "label": "sequencerDelayLimit", "offset": 0, @@ -581,7 +581,7 @@ "type": "t_uint256" }, { - "astId": 7484, + "astId": 5105, "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", "label": "sequencerFutureLimit", "offset": 0, @@ -589,20 +589,20 @@ "type": "t_uint256" }, { - "astId": 7487, + "astId": 5108, "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "3", - "type": "t_struct(SequencerLimitDecreaseRequest)7495_storage" + "type": "t_struct(SequencerLimitDecreaseRequest)5116_storage" }, { - "astId": 7490, + "astId": 5111, "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", "label": "sequencerFutureLimitDecreaseRequest", "offset": 0, "slot": "5", - "type": "t_struct(SequencerLimitDecreaseRequest)7495_storage" + "type": "t_struct(SequencerLimitDecreaseRequest)5116_storage" } ], "types": { @@ -618,12 +618,12 @@ "numberOfBytes": "32", "value": "t_uint256" }, - "t_struct(SequencerLimitDecreaseRequest)7495_storage": { + "t_struct(SequencerLimitDecreaseRequest)5116_storage": { "encoding": "inplace", "label": "struct RouterGnosisToArb.SequencerLimitDecreaseRequest", "members": [ { - "astId": 7492, + "astId": 5113, "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", "label": "requestedSequencerLimit", "offset": 0, @@ -631,7 +631,7 @@ "type": "t_uint256" }, { - "astId": 7494, + "astId": 5115, "contract": "src/gnosisToArbitrum/RouterGnosisToArb.sol:RouterGnosisToArb", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json b/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json index 11953fa9..f3761026 100644 --- a/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json +++ b/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xE8ea62d3a4F06301016b9C23Ace108F3D8027839", + "address": "0x4B1275adA5014d7A10375B87bb0cfaCAbC47d3dC", "abi": [ { "inputs": [ @@ -37,11 +37,6 @@ "internalType": "uint256", "name": "_maxMissingBlocks", "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxClaimDelayEpochs", - "type": "uint256" } ], "stateMutability": "nonpayable", @@ -75,6 +70,12 @@ "name": "_claimer", "type": "address" }, + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, { "indexed": false, "internalType": "bytes32", @@ -489,19 +490,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "maxClaimDelayEpochs", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "maxMissingBlocks", @@ -1043,32 +1031,32 @@ "type": "function" } ], - "transactionHash": "0x5c2c676f65f97dff6eb83f88f00b39eae3cae1555dfb31a7f5baf1f2dee03217", + "transactionHash": "0xa710d88bcc4365d2a793f0c7cf746745fc3d35f6380ffe380491656e351d837f", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xE8ea62d3a4F06301016b9C23Ace108F3D8027839", - "transactionIndex": 52, - "gasUsed": "2219514", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000400000000000000000000000000000000000", - "blockHash": "0xf5246e490e7c09e5f8f7e811c32b3250f587f296a2bc840e007e195b94f446e3", - "transactionHash": "0x5c2c676f65f97dff6eb83f88f00b39eae3cae1555dfb31a7f5baf1f2dee03217", + "contractAddress": "0x4B1275adA5014d7A10375B87bb0cfaCAbC47d3dC", + "transactionIndex": 97, + "gasUsed": "2207177", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000002000000000000000010000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x6b5bfc52c0b647761a0704adbc88787f446a5254bff6f091e8e3c38b9d1dfb60", + "transactionHash": "0xa710d88bcc4365d2a793f0c7cf746745fc3d35f6380ffe380491656e351d837f", "logs": [ { - "transactionIndex": 52, - "blockNumber": 9254065, - "transactionHash": "0x5c2c676f65f97dff6eb83f88f00b39eae3cae1555dfb31a7f5baf1f2dee03217", - "address": "0xE8ea62d3a4F06301016b9C23Ace108F3D8027839", + "transactionIndex": 97, + "blockNumber": 9254595, + "transactionHash": "0xa710d88bcc4365d2a793f0c7cf746745fc3d35f6380ffe380491656e351d837f", + "address": "0x4B1275adA5014d7A10375B87bb0cfaCAbC47d3dC", "topics": [ "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 189, - "blockHash": "0xf5246e490e7c09e5f8f7e811c32b3250f587f296a2bc840e007e195b94f446e3" + "logIndex": 257, + "blockHash": "0x6b5bfc52c0b647761a0704adbc88787f446a5254bff6f091e8e3c38b9d1dfb60" } ], - "blockNumber": 9254065, - "cumulativeGasUsed": "12171994", + "blockNumber": 9254595, + "cumulativeGasUsed": "15695680", "status": 1, "byzantium": true }, @@ -1077,16 +1065,15 @@ 1800, 0, 10000000000000, - "0xDa528e9BE20a8A22437D28Ed6C63bb6d00Ad0032", + "0xe81afBecf7d0bB755fB9f1fb417b95Bf924534e6", "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", - 10000000000000, - 3 + 10000000000000 ], - "numDeployments": 1, - "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEthDevnet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxClaimDelayEpochs\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxClaimDelayEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer delay limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxClaimDelayEpochs\":\"The maximum number of epochs that can be claimed in the past.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEthDevnet\":\"The address of the inbox contract on Arbitrum.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":\"VeaOutboxArbToEthDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable maxClaimDelayEpochs; // The maximum number of epochs that can be claimed in the past.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer delay limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks,\\n uint256 _maxClaimDelayEpochs\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n maxClaimDelayEpochs = _maxClaimDelayEpochs;\\n\\n updateSequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n // If the sequencerDelayLimit is set larger than block.timestamp - epochPeriod by arbitrum governance, \\n // the checked arithmetic will revert due to underflow and the bridge will shutdown.\\n uint256 minEpochSequencerDelay = (block.timestamp - sequencerDelayLimit) / epochPeriod - 1;\\n\\n uint256 minEpochClaim;\\n \\n unchecked{\\n // deployed sets maxClaimWindowEpochs so no underflow is possible\\n minEpochClaim = block.timestamp / epochPeriod - maxClaimDelayEpochs;\\n }\\n\\n uint256 minClaimableEpoch = minEpochSequencerDelay > minEpochClaim ? minEpochSequencerDelay : minEpochClaim;\\n \\n require(_epoch >= minClaimableEpoch, \\\"Invalid epoch.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= uint256(_claim.timestampClaimed) + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x3a94e33e43dcab687319e91c809a9df5b9309d972508025bcda56eb9e44bb08f\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToEth/VeaOutboxArbToEth.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Goerli.\\n/// Note: This contract is deployed on Goerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEthDevnet The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEthDevnet,\\n address _bridge,\\n uint256 _maxMissingBlocks,\\n uint256 _maxClaimDelayEpochs\\n )\\n VeaOutboxArbToEth(\\n _deposit,\\n _epochPeriod,\\n _minChallengePeriod,\\n _timeoutEpochs,\\n _veaInboxArbToEthDevnet,\\n _bridge,\\n _maxMissingBlocks,\\n _maxClaimDelayEpochs\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x94ebc41c0b7451e524e490a8ca2eb5fdcc39ca0fd29c5fd57be06c591f7824a4\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101c06040523480156200001257600080fd5b5060405162002aa038038062002aa08339810160408190526200003591620002f7565b60c08890526101208790526101408690526101808590526001600160a01b0380851660a05283166080526101a082905261016081905287878787878787876200007d620000f7565b6200008a6002896200037e565b60e08190526200009c896002620003a1565b620000a89190620003c1565b6101005261012051600190620000bf90426200037e565b620000cb9190620003c1565b6001555050600780546001600160a01b0319163317905550620004339c50505050505050505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200013a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001609190620003d7565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156200019e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001c49190620003fc565b50925050506004548111156200020f5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002d75760065415620002895760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002f257600080fd5b919050565b600080600080600080600080610100898b0312156200031557600080fd5b885197506020890151965060408901519550606089015194506200033c60808a01620002da565b93506200034c60a08a01620002da565b60c08a015160e0909a0151989b979a5095989497939692505050565b634e487b7160e01b600052601160045260246000fd5b6000826200039c57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620003bb57620003bb62000368565b92915050565b81810381811115620003bb57620003bb62000368565b600060208284031215620003ea57600080fd5b620003f582620002da565b9392505050565b600080600080608085870312156200041357600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516125346200056c600039600081816104f50152611ee801526000818161052901528181610b160152818161191001528181611a9b0152611ca70152600061021a0152600081816105b10152611e7c01526000818161055d01528181610b3a01528181610e430152818161160a0152818161193401528181611abf0152611ccb01526000818161139701526114d001526000818161134401526114880152600081816105e5015281816106f101528181610878015281816108a501528181610e860152818161152001528181611c0501528181611c6c0152611e120152600081816104060152610c24015260008181610666015281816109fb01528181610bb501528181610c4e015261168b01526125346000f3fe6080604052600436106101ee5760003560e01c806369cd250d1161010d578063b5b7a184116100a0578063da2b7bc41161006f578063da2b7bc414610607578063df19e6ff14610627578063e78cea9214610654578063e813a75514610688578063eedcf2a91461069e57600080fd5b8063b5b7a1841461054b578063b633b9441461057f578063c2114a161461059f578063d0e30db0146105d357600080fd5b8063930f28af116100dc578063930f28af146104ad5780639588eca2146104cd578063aa22a1c6146104e3578063b044397e1461051757600080fd5b806369cd250d146103f45780638a619a71146104405780638ad3a8f71461046057806390df63b71461048057600080fd5b806331d144571161018557806349b4299e1161015457806349b4299e1461037f5780634a439cfe1461039f578063541adcca146103bf5780635f43a47f146103df57600080fd5b806331d144571461030c57806331ddf7431461031f5780633ce43cfd1461033f5780634788cb381461035f57600080fd5b80630f0adca5116101c15780630f0adca514610294578063222ae786146102b45780632639c060146102c957806327ee6bdd146102f657600080fd5b806301139b68146101f3578063042c4aaf14610208578063051d19701461024f5780630c63fa841461027f575b600080fd5b6102066102013660046120a2565b6106b1565b005b34801561021457600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561025b57600080fd5b5060055460065461026a919082565b60408051928352602083019190915201610246565b34801561028b57600080fd5b506102066108ef565b3480156102a057600080fd5b506102066102af3660046120d0565b610b14565b3480156102c057600080fd5b5061023c610e3c565b3480156102d557600080fd5b5061023c6102e4366004612107565b60026020526000908152604090205481565b34801561030257600080fd5b5061023c60015481565b61020661031a366004612120565b610e6d565b34801561032b57600080fd5b5061020661033a3660046121a3565b610fed565b34801561034b57600080fd5b5061020661035a366004612265565b61128d565b34801561036b57600080fd5b5061020661037a3660046120a2565b6113d4565b34801561038b57600080fd5b5061020661039a3660046120a2565b611558565b3480156103ab57600080fd5b5061023c6103ba366004612107565b611603565b3480156103cb57600080fd5b5061023c6103da36600461229e565b611635565b3480156103eb57600080fd5b50610206611687565b34801561040057600080fd5b506104287f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610246565b34801561044c57600080fd5b5061020661045b3660046122c1565b61187b565b34801561046c57600080fd5b50600754610428906001600160a01b031681565b34801561048c57600080fd5b5061023c61049b366004612107565b60036020526000908152604090205481565b3480156104b957600080fd5b506102066104c83660046120a2565b61190e565b3480156104d957600080fd5b5061023c60005481565b3480156104ef57600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561052357600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561055757600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561058b57600080fd5b5061020661059a3660046120a2565b611a99565b3480156105ab57600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105df57600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561061357600080fd5b506102066106223660046120a2565b611ca5565b34801561063357600080fd5b5061064761064236600461229e565b611e5e565b60405161024691906122f4565b34801561066057600080fd5b506104287f000000000000000000000000000000000000000000000000000000000000000081565b34801561069457600080fd5b5061023c60045481565b6102066106ac366004612120565b611f25565b6106ba81611635565b600083815260026020526040902054146106ef5760405162461bcd60e51b81526004016106e69061230e565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561075f5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106e6565b60c08101516001600160a01b0316156107ba5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106e6565b60008160a0015160028111156107d2576107d26122de565b1461081f5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106e6565b3360c082015261082e81611635565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108eb5760006108ca7f00000000000000000000000000000000000000000000000000000000000000003461234c565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036109565760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106e6565b600454600654610966919061235f565b42116109cf5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106e6565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612372565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb919061238f565b50925050508181036108eb5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610b6757610b676123c5565b04031115610baa5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106e6565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c225760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106e6565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610caa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cce9190612372565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2f9190612372565b6001600160a01b031614610d7e5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106e6565b60015483118015610d8e57508115155b15610dd157600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610dda81611635565b60008481526002602052604090205403610e37578051829003610e0357600160a0820152610e1e565b60c08101516001600160a01b031615610e1e57600260a08201525b610e2781611635565b6000848152600260205260409020555b505050565b6000610e687f0000000000000000000000000000000000000000000000000000000000000000426123db565b905090565b6007546001600160a01b03163314610e8457600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610ef45760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106e6565b80610f115760405162461bcd60e51b81526004016106e69061230e565b60008281526002602052604090205415610f635760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106e6565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610fa990611635565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161086e565b6040851061102f5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106e6565b60008484848460405160200161104894939291906123fd565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156110c857600088888381811061108a5761108a61243f565b905060200201359050828111156110af578260005280602052604060002092506110bf565b8060005282602052604060002092505b5060010161106e565b50806000541461110b5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106e6565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156111805760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106e6565b6000838152600360205260408082206001851b84179055516001600160a01b038916906111b09089908990612455565b6000604051808303816000865af19150503d80600081146111ed576040519150601f19603f3d011682016040523d82523d6000602084013e6111f2565b606091505b50509050806112435760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106e6565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61129f6103da3683900383018361229e565b600083815260026020526040902054146112cb5760405162461bcd60e51b81526004016106e69061230e565b60026112dd60c0830160a08401612465565b60028111156112ee576112ee6122de565b1461132f5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106e6565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061138993505060e0840191505060c083016122c1565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6113dd81611635565b600083815260026020526040902054146114095760405162461bcd60e51b81526004016106e69061230e565b60018160a001516002811115611421576114216122de565b1461145e5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106e6565b60008281526002602052604081205560c08101516001600160a01b03161561150a576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461156f57600080fd5b61157881611635565b600083815260026020526040902054146115a45760405162461bcd60e51b81526004016106e69061230e565b63ffffffff4281166060830152431660808201526115c181611635565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610b08565b600061162f7f0000000000000000000000000000000000000000000000000000000000000000836123db565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861166a989097969101612480565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156116e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061170b9190612372565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611748573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176c919061238f565b50925050506004548111156117b65760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015611878576006541561182a5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106e6565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6007546001600160a01b0316331461189257600080fd5b6007546001600160a01b031633146118ec5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106e6565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611961576119616123c5565b040311156119a45760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106e6565b6119ad81611635565b600083815260026020526040902054146119d95760405162461bcd60e51b81526004016106e69061230e565b60c08101516001600160a01b031615611a2b5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106e6565b600154821115611a7357600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611a8381611635565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611aec57611aec6123c5565b040311611b2d5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106e6565b611b3681611635565b60008381526002602052604090205414611b625760405162461bcd60e51b81526004016106e69061230e565b60008160a001516002811115611b7a57611b7a6122de565b14611bb95760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106e6565b60c08101516001600160a01b0316156108eb5760208101516001600160a01b0316611c3d5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611c5182611635565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cf857611cf86123c5565b040311611d395760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106e6565b611d4281611635565b60008381526002602052604090205414611d6e5760405162461bcd60e51b81526004016106e69061230e565b60008160a001516002811115611d8657611d866122de565b14611dc55760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106e6565b60208101516001600160a01b0316156108eb5760c08101516001600160a01b0316611e4a5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611c5182611635565b6000816060015163ffffffff16600003611e7a57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611eb657506003919050565b6000600c836060015163ffffffff16420381611ed457611ed46123c5565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611f185760019250611f1d565b600092505b50505b919050565b611f2f8282610e6d565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f768382611558565b63ffffffff428116606083015243166080820152611f94838261190e565b600160a0820152610e3783826113d4565b6001600160a01b038116811461187857600080fd5b8035611f2081611fa5565b803563ffffffff81168114611f2057600080fd5b803560038110611f2057600080fd5b600060e08284031215611ffa57600080fd5b60405160e0810181811067ffffffffffffffff8211171561202b57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061204160208401611fba565b602082015261205260408401611fc5565b604082015261206360608401611fc5565b606082015261207460808401611fc5565b608082015261208560a08401611fd9565b60a082015261209660c08401611fba565b60c08201525092915050565b60008061010083850312156120b657600080fd5b823591506120c78460208501611fe8565b90509250929050565b600080600061012084860312156120e657600080fd5b83359250602084013591506120fe8560408601611fe8565b90509250925092565b60006020828403121561211957600080fd5b5035919050565b6000806040838503121561213357600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611f2057600080fd5b60008083601f84011261216c57600080fd5b50813567ffffffffffffffff81111561218457600080fd5b60208301915083602082850101111561219c57600080fd5b9250929050565b600080600080600080608087890312156121bc57600080fd5b863567ffffffffffffffff808211156121d457600080fd5b818901915089601f8301126121e857600080fd5b8135818111156121f757600080fd5b8a60208260051b850101111561220c57600080fd5b6020830198508097505061222260208a01612142565b955061223060408a01611fba565b9450606089013591508082111561224657600080fd5b5061225389828a0161215a565b979a9699509497509295939492505050565b60008082840361010081121561227a57600080fd5b8335925060e0601f198201121561229057600080fd5b506020830190509250929050565b600060e082840312156122b057600080fd5b6122ba8383611fe8565b9392505050565b6000602082840312156122d357600080fd5b81356122ba81611fa5565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612308576123086122de565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561162f5761162f612336565b8082018082111561162f5761162f612336565b60006020828403121561238457600080fd5b81516122ba81611fa5565b600080600080608085870312156123a557600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b6000826123f857634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561247757600080fd5b6122ba82611fd9565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124d8576124d86122de565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212209c60d1c76eb843f8e6d3a11b4f0793b3f068f1a267c85486593da837494af1bd64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101ee5760003560e01c806369cd250d1161010d578063b5b7a184116100a0578063da2b7bc41161006f578063da2b7bc414610607578063df19e6ff14610627578063e78cea9214610654578063e813a75514610688578063eedcf2a91461069e57600080fd5b8063b5b7a1841461054b578063b633b9441461057f578063c2114a161461059f578063d0e30db0146105d357600080fd5b8063930f28af116100dc578063930f28af146104ad5780639588eca2146104cd578063aa22a1c6146104e3578063b044397e1461051757600080fd5b806369cd250d146103f45780638a619a71146104405780638ad3a8f71461046057806390df63b71461048057600080fd5b806331d144571161018557806349b4299e1161015457806349b4299e1461037f5780634a439cfe1461039f578063541adcca146103bf5780635f43a47f146103df57600080fd5b806331d144571461030c57806331ddf7431461031f5780633ce43cfd1461033f5780634788cb381461035f57600080fd5b80630f0adca5116101c15780630f0adca514610294578063222ae786146102b45780632639c060146102c957806327ee6bdd146102f657600080fd5b806301139b68146101f3578063042c4aaf14610208578063051d19701461024f5780630c63fa841461027f575b600080fd5b6102066102013660046120a2565b6106b1565b005b34801561021457600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561025b57600080fd5b5060055460065461026a919082565b60408051928352602083019190915201610246565b34801561028b57600080fd5b506102066108ef565b3480156102a057600080fd5b506102066102af3660046120d0565b610b14565b3480156102c057600080fd5b5061023c610e3c565b3480156102d557600080fd5b5061023c6102e4366004612107565b60026020526000908152604090205481565b34801561030257600080fd5b5061023c60015481565b61020661031a366004612120565b610e6d565b34801561032b57600080fd5b5061020661033a3660046121a3565b610fed565b34801561034b57600080fd5b5061020661035a366004612265565b61128d565b34801561036b57600080fd5b5061020661037a3660046120a2565b6113d4565b34801561038b57600080fd5b5061020661039a3660046120a2565b611558565b3480156103ab57600080fd5b5061023c6103ba366004612107565b611603565b3480156103cb57600080fd5b5061023c6103da36600461229e565b611635565b3480156103eb57600080fd5b50610206611687565b34801561040057600080fd5b506104287f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610246565b34801561044c57600080fd5b5061020661045b3660046122c1565b61187b565b34801561046c57600080fd5b50600754610428906001600160a01b031681565b34801561048c57600080fd5b5061023c61049b366004612107565b60036020526000908152604090205481565b3480156104b957600080fd5b506102066104c83660046120a2565b61190e565b3480156104d957600080fd5b5061023c60005481565b3480156104ef57600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561052357600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561055757600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561058b57600080fd5b5061020661059a3660046120a2565b611a99565b3480156105ab57600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105df57600080fd5b5061023c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561061357600080fd5b506102066106223660046120a2565b611ca5565b34801561063357600080fd5b5061064761064236600461229e565b611e5e565b60405161024691906122f4565b34801561066057600080fd5b506104287f000000000000000000000000000000000000000000000000000000000000000081565b34801561069457600080fd5b5061023c60045481565b6102066106ac366004612120565b611f25565b6106ba81611635565b600083815260026020526040902054146106ef5760405162461bcd60e51b81526004016106e69061230e565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561075f5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106e6565b60c08101516001600160a01b0316156107ba5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106e6565b60008160a0015160028111156107d2576107d26122de565b1461081f5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106e6565b3360c082015261082e81611635565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108eb5760006108ca7f00000000000000000000000000000000000000000000000000000000000000003461234c565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036109565760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106e6565b600454600654610966919061235f565b42116109cf5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106e6565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612372565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb919061238f565b50925050508181036108eb5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610b6757610b676123c5565b04031115610baa5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106e6565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c225760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106e6565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610caa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cce9190612372565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2f9190612372565b6001600160a01b031614610d7e5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106e6565b60015483118015610d8e57508115155b15610dd157600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610dda81611635565b60008481526002602052604090205403610e37578051829003610e0357600160a0820152610e1e565b60c08101516001600160a01b031615610e1e57600260a08201525b610e2781611635565b6000848152600260205260409020555b505050565b6000610e687f0000000000000000000000000000000000000000000000000000000000000000426123db565b905090565b6007546001600160a01b03163314610e8457600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610ef45760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106e6565b80610f115760405162461bcd60e51b81526004016106e69061230e565b60008281526002602052604090205415610f635760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106e6565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610fa990611635565b600083815260026020908152604091829020929092555182815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910161086e565b6040851061102f5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106e6565b60008484848460405160200161104894939291906123fd565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156110c857600088888381811061108a5761108a61243f565b905060200201359050828111156110af578260005280602052604060002092506110bf565b8060005282602052604060002092505b5060010161106e565b50806000541461110b5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106e6565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156111805760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106e6565b6000838152600360205260408082206001851b84179055516001600160a01b038916906111b09089908990612455565b6000604051808303816000865af19150503d80600081146111ed576040519150601f19603f3d011682016040523d82523d6000602084013e6111f2565b606091505b50509050806112435760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106e6565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61129f6103da3683900383018361229e565b600083815260026020526040902054146112cb5760405162461bcd60e51b81526004016106e69061230e565b60026112dd60c0830160a08401612465565b60028111156112ee576112ee6122de565b1461132f5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106e6565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061138993505060e0840191505060c083016122c1565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6113dd81611635565b600083815260026020526040902054146114095760405162461bcd60e51b81526004016106e69061230e565b60018160a001516002811115611421576114216122de565b1461145e5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106e6565b60008281526002602052604081205560c08101516001600160a01b03161561150a576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461156f57600080fd5b61157881611635565b600083815260026020526040902054146115a45760405162461bcd60e51b81526004016106e69061230e565b63ffffffff4281166060830152431660808201526115c181611635565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610b08565b600061162f7f0000000000000000000000000000000000000000000000000000000000000000836123db565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861166a989097969101612480565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156116e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061170b9190612372565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611748573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176c919061238f565b50925050506004548111156117b65760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015611878576006541561182a5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106e6565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6007546001600160a01b0316331461189257600080fd5b6007546001600160a01b031633146118ec5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106e6565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611961576119616123c5565b040311156119a45760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106e6565b6119ad81611635565b600083815260026020526040902054146119d95760405162461bcd60e51b81526004016106e69061230e565b60c08101516001600160a01b031615611a2b5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106e6565b600154821115611a7357600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611a8381611635565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611aec57611aec6123c5565b040311611b2d5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106e6565b611b3681611635565b60008381526002602052604090205414611b625760405162461bcd60e51b81526004016106e69061230e565b60008160a001516002811115611b7a57611b7a6122de565b14611bb95760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106e6565b60c08101516001600160a01b0316156108eb5760208101516001600160a01b0316611c3d5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611c5182611635565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cf857611cf86123c5565b040311611d395760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106e6565b611d4281611635565b60008381526002602052604090205414611d6e5760405162461bcd60e51b81526004016106e69061230e565b60008160a001516002811115611d8657611d866122de565b14611dc55760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106e6565b60208101516001600160a01b0316156108eb5760c08101516001600160a01b0316611e4a5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611c5182611635565b6000816060015163ffffffff16600003611e7a57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611eb657506003919050565b6000600c836060015163ffffffff16420381611ed457611ed46123c5565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611f185760019250611f1d565b600092505b50505b919050565b611f2f8282610e6d565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f768382611558565b63ffffffff428116606083015243166080820152611f94838261190e565b600160a0820152610e3783826113d4565b6001600160a01b038116811461187857600080fd5b8035611f2081611fa5565b803563ffffffff81168114611f2057600080fd5b803560038110611f2057600080fd5b600060e08284031215611ffa57600080fd5b60405160e0810181811067ffffffffffffffff8211171561202b57634e487b7160e01b600052604160045260246000fd5b6040528235815290508061204160208401611fba565b602082015261205260408401611fc5565b604082015261206360608401611fc5565b606082015261207460808401611fc5565b608082015261208560a08401611fd9565b60a082015261209660c08401611fba565b60c08201525092915050565b60008061010083850312156120b657600080fd5b823591506120c78460208501611fe8565b90509250929050565b600080600061012084860312156120e657600080fd5b83359250602084013591506120fe8560408601611fe8565b90509250925092565b60006020828403121561211957600080fd5b5035919050565b6000806040838503121561213357600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611f2057600080fd5b60008083601f84011261216c57600080fd5b50813567ffffffffffffffff81111561218457600080fd5b60208301915083602082850101111561219c57600080fd5b9250929050565b600080600080600080608087890312156121bc57600080fd5b863567ffffffffffffffff808211156121d457600080fd5b818901915089601f8301126121e857600080fd5b8135818111156121f757600080fd5b8a60208260051b850101111561220c57600080fd5b6020830198508097505061222260208a01612142565b955061223060408a01611fba565b9450606089013591508082111561224657600080fd5b5061225389828a0161215a565b979a9699509497509295939492505050565b60008082840361010081121561227a57600080fd5b8335925060e0601f198201121561229057600080fd5b506020830190509250929050565b600060e082840312156122b057600080fd5b6122ba8383611fe8565b9392505050565b6000602082840312156122d357600080fd5b81356122ba81611fa5565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612308576123086122de565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561162f5761162f612336565b8082018082111561162f5761162f612336565b60006020828403121561238457600080fd5b81516122ba81611fa5565b600080600080608085870312156123a557600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b6000826123f857634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561247757600080fd5b6122ba82611fd9565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124d8576124d86122de565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212209c60d1c76eb843f8e6d3a11b4f0793b3f068f1a267c85486593da837494af1bd64736f6c63430008120033", + "numDeployments": 3, + "solcInputHash": "6b0b750c6eee9aa0a5e450d1f0bbb2d2", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEthDevnet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer delay limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEthDevnet\":\"The address of the inbox contract on Arbitrum.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":\"VeaOutboxArbToEthDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer delay limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updateSequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch has not yet passed.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= uint256(_claim.timestampClaimed) + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0xe9d526edd46c7639759b1a7bd8d2f218ce5716f07638b2a8743ab5119b62ee35\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToEth/VeaOutboxArbToEth.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Goerli.\\n/// Note: This contract is deployed on Goerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEthDevnet The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEthDevnet,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n )\\n VeaOutboxArbToEth(\\n _deposit,\\n _epochPeriod,\\n _minChallengePeriod,\\n _timeoutEpochs,\\n _veaInboxArbToEthDevnet,\\n _bridge,\\n _maxMissingBlocks\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xf0e67794da490cd402c9297bc81bae6035da306d2a1b6ca89af9fd8947a55fab\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002a4b38038062002a4b8339810160408190526200003591620002ee565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190528686868686868662000076620000ee565b620000836002886200036c565b60e0819052620000958860026200038f565b620000a19190620003af565b6101005261012051600190620000b890426200036c565b620000c49190620003af565b6001555050600780546001600160a01b0319163317905550620004219a5050505050505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000131573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001579190620003c5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000195573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001bb9190620003ea565b5092505050600454811115620002065760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ce5760065415620002805760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002e957600080fd5b919050565b600080600080600080600060e0888a0312156200030a57600080fd5b875196506020880151955060408801519450606088015193506200033160808901620002d1565b92506200034160a08901620002d1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200038a57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620003a957620003a962000356565b92915050565b81810381811115620003a957620003a962000356565b600060208284031215620003d857600080fd5b620003e382620002d1565b9392505050565b600080600080608085870312156200040157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516124fc6200054f600039600081816104b60152611eb00152600081816104ea01528181610ad7015281816118d801528181611a630152611c6f0152600081816105720152611e4401526000818161051e01528181610afb01528181610e04015281816115d2015281816118fc01528181611a870152611c9301526000818161135f015261149801526000818161130c01526114500152600081816105a6015281816106b2015281816108390152818161086601528181610e47015281816114e801528181611bcd01528181611c340152611dda0152600081816103c70152610be5015260008181610627015281816109bc01528181610b7601528181610c0f015261165301526124fc6000f3fe6080604052600436106101e35760003560e01c80638a619a7111610102578063b633b94411610095578063df19e6ff11610064578063df19e6ff146105e8578063e78cea9214610615578063e813a75514610649578063eedcf2a91461065f57600080fd5b8063b633b94414610540578063c2114a1614610560578063d0e30db014610594578063da2b7bc4146105c857600080fd5b80639588eca2116100d15780639588eca21461048e578063aa22a1c6146104a4578063b044397e146104d8578063b5b7a1841461050c57600080fd5b80638a619a71146104015780638ad3a8f71461042157806390df63b714610441578063930f28af1461046e57600080fd5b806331ddf7431161017a5780634a439cfe116101495780634a439cfe14610360578063541adcca146103805780635f43a47f146103a057806369cd250d146103b557600080fd5b806331ddf743146102e05780633ce43cfd146103005780634788cb381461032057806349b4299e1461034057600080fd5b8063222ae786116101b6578063222ae786146102675780632639c0601461028a57806327ee6bdd146102b757806331d14457146102cd57600080fd5b806301139b68146101e8578063051d1970146101fd5780630c63fa84146102325780630f0adca514610247575b600080fd5b6101fb6101f636600461206a565b610672565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb6108b0565b34801561025357600080fd5b506101fb610262366004612098565b610ad5565b34801561027357600080fd5b5061027c610dfd565b604051908152602001610229565b34801561029657600080fd5b5061027c6102a53660046120cf565b60026020526000908152604090205481565b3480156102c357600080fd5b5061027c60015481565b6101fb6102db3660046120e8565b610e2e565b3480156102ec57600080fd5b506101fb6102fb36600461216b565b610fb5565b34801561030c57600080fd5b506101fb61031b36600461222d565b611255565b34801561032c57600080fd5b506101fb61033b36600461206a565b61139c565b34801561034c57600080fd5b506101fb61035b36600461206a565b611520565b34801561036c57600080fd5b5061027c61037b3660046120cf565b6115cb565b34801561038c57600080fd5b5061027c61039b366004612266565b6115fd565b3480156103ac57600080fd5b506101fb61164f565b3480156103c157600080fd5b506103e97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b34801561040d57600080fd5b506101fb61041c366004612289565b611843565b34801561042d57600080fd5b506007546103e9906001600160a01b031681565b34801561044d57600080fd5b5061027c61045c3660046120cf565b60036020526000908152604090205481565b34801561047a57600080fd5b506101fb61048936600461206a565b6118d6565b34801561049a57600080fd5b5061027c60005481565b3480156104b057600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104e457600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561051857600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054c57600080fd5b506101fb61055b36600461206a565b611a61565b34801561056c57600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a057600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d457600080fd5b506101fb6105e336600461206a565b611c6d565b3480156105f457600080fd5b50610608610603366004612266565b611e26565b60405161022991906122bc565b34801561062157600080fd5b506103e97f000000000000000000000000000000000000000000000000000000000000000081565b34801561065557600080fd5b5061027c60045481565b6101fb61066d3660046120e8565b611eed565b61067b816115fd565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122d6565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a001516002811115610793576107936122a6565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816115fd565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f000000000000000000000000000000000000000000000000000000000000000034612314565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036109175760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b6004546006546109279190612327565b42116109905760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610a07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2b919061233a565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610a68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8c9190612357565b50925050508181036108ac5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610b2857610b2861238d565b04031115610b6b5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610be35760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8f919061233a565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ccc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf0919061233a565b6001600160a01b031614610d3f5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610d4f57508115155b15610d9257600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610d9b816115fd565b60008481526002602052604090205403610df8578051829003610dc457600160a0820152610ddf565b60c08101516001600160a01b031615610ddf57600260a08201525b610de8816115fd565b6000848152600260205260409020555b505050565b6000610e297f0000000000000000000000000000000000000000000000000000000000000000426123a3565b905090565b6007546001600160a01b03163314610e4557600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610eb55760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610ed25760405162461bcd60e51b81526004016106a7906122d6565b60008281526002602052604090205415610f245760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610f6a906115fd565b60008381526002602090815260409182902092909255805184815291820183905233917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910161082f565b60408510610ff75760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b60008484848460405160200161101094939291906123c5565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561109057600088888381811061105257611052612407565b9050602002013590508281111561107757826000528060205260406000209250611087565b8060005282602052604060002092505b50600101611036565b5080600054146110d35760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156111485760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b03891690611178908990899061241d565b6000604051808303816000865af19150503d80600081146111b5576040519150601f19603f3d011682016040523d82523d6000602084013e6111ba565b606091505b505090508061120b5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61126761039b36839003830183612266565b600083815260026020526040902054146112935760405162461bcd60e51b81526004016106a7906122d6565b60026112a560c0830160a0840161242d565b60028111156112b6576112b66122a6565b146112f75760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061135193505060e0840191505060c08301612289565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6113a5816115fd565b600083815260026020526040902054146113d15760405162461bcd60e51b81526004016106a7906122d6565b60018160a0015160028111156113e9576113e96122a6565b146114265760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156114d2576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461153757600080fd5b611540816115fd565b6000838152600260205260409020541461156c5760405162461bcd60e51b81526004016106a7906122d6565b63ffffffff428116606083015243166080820152611589816115fd565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610ac9565b60006115f77f0000000000000000000000000000000000000000000000000000000000000000836123a3565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611632989097969101612448565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156116af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d3919061233a565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611710573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117349190612357565b509250505060045481111561177e5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b60045481101561184057600654156117f25760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6007546001600160a01b0316331461185a57600080fd5b6007546001600160a01b031633146118b45760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119295761192961238d565b0403111561196c5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b611975816115fd565b600083815260026020526040902054146119a15760405162461bcd60e51b81526004016106a7906122d6565b60c08101516001600160a01b0316156119f35760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b600154821115611a3b57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611a4b816115fd565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ab457611ab461238d565b040311611af55760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611afe816115fd565b60008381526002602052604090205414611b2a5760405162461bcd60e51b81526004016106a7906122d6565b60008160a001516002811115611b4257611b426122a6565b14611b815760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b0316611c055760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611c19826115fd565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cc057611cc061238d565b040311611d015760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611d0a816115fd565b60008381526002602052604090205414611d365760405162461bcd60e51b81526004016106a7906122d6565b60008160a001516002811115611d4e57611d4e6122a6565b14611d8d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611e125760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611c19826115fd565b6000816060015163ffffffff16600003611e4257506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7e57506003919050565b6000600c836060015163ffffffff16420381611e9c57611e9c61238d565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ee05760019250611ee5565b600092505b50505b919050565b611ef78282610e2e565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f3e8382611520565b63ffffffff428116606083015243166080820152611f5c83826118d6565b600160a0820152610df8838261139c565b6001600160a01b038116811461184057600080fd5b8035611ee881611f6d565b803563ffffffff81168114611ee857600080fd5b803560038110611ee857600080fd5b600060e08284031215611fc257600080fd5b60405160e0810181811067ffffffffffffffff82111715611ff357634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200960208401611f82565b602082015261201a60408401611f8d565b604082015261202b60608401611f8d565b606082015261203c60808401611f8d565b608082015261204d60a08401611fa1565b60a082015261205e60c08401611f82565b60c08201525092915050565b600080610100838503121561207e57600080fd5b8235915061208f8460208501611fb0565b90509250929050565b600080600061012084860312156120ae57600080fd5b83359250602084013591506120c68560408601611fb0565b90509250925092565b6000602082840312156120e157600080fd5b5035919050565b600080604083850312156120fb57600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee857600080fd5b60008083601f84011261213457600080fd5b50813567ffffffffffffffff81111561214c57600080fd5b60208301915083602082850101111561216457600080fd5b9250929050565b6000806000806000806080878903121561218457600080fd5b863567ffffffffffffffff8082111561219c57600080fd5b818901915089601f8301126121b057600080fd5b8135818111156121bf57600080fd5b8a60208260051b85010111156121d457600080fd5b602083019850809750506121ea60208a0161210a565b95506121f860408a01611f82565b9450606089013591508082111561220e57600080fd5b5061221b89828a01612122565b979a9699509497509295939492505050565b60008082840361010081121561224257600080fd5b8335925060e0601f198201121561225857600080fd5b506020830190509250929050565b600060e0828403121561227857600080fd5b6122828383611fb0565b9392505050565b60006020828403121561229b57600080fd5b813561228281611f6d565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122d0576122d06122a6565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156115f7576115f76122fe565b808201808211156115f7576115f76122fe565b60006020828403121561234c57600080fd5b815161228281611f6d565b6000806000806080858703121561236d57600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b6000826123c057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561243f57600080fd5b61228282611fa1565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124a0576124a06122a6565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212202e6d7450550becfa9dbdb8cdfba00c4bceb171e206d60b855763ac61ae1a6e4f64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101e35760003560e01c80638a619a7111610102578063b633b94411610095578063df19e6ff11610064578063df19e6ff146105e8578063e78cea9214610615578063e813a75514610649578063eedcf2a91461065f57600080fd5b8063b633b94414610540578063c2114a1614610560578063d0e30db014610594578063da2b7bc4146105c857600080fd5b80639588eca2116100d15780639588eca21461048e578063aa22a1c6146104a4578063b044397e146104d8578063b5b7a1841461050c57600080fd5b80638a619a71146104015780638ad3a8f71461042157806390df63b714610441578063930f28af1461046e57600080fd5b806331ddf7431161017a5780634a439cfe116101495780634a439cfe14610360578063541adcca146103805780635f43a47f146103a057806369cd250d146103b557600080fd5b806331ddf743146102e05780633ce43cfd146103005780634788cb381461032057806349b4299e1461034057600080fd5b8063222ae786116101b6578063222ae786146102675780632639c0601461028a57806327ee6bdd146102b757806331d14457146102cd57600080fd5b806301139b68146101e8578063051d1970146101fd5780630c63fa84146102325780630f0adca514610247575b600080fd5b6101fb6101f636600461206a565b610672565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb6108b0565b34801561025357600080fd5b506101fb610262366004612098565b610ad5565b34801561027357600080fd5b5061027c610dfd565b604051908152602001610229565b34801561029657600080fd5b5061027c6102a53660046120cf565b60026020526000908152604090205481565b3480156102c357600080fd5b5061027c60015481565b6101fb6102db3660046120e8565b610e2e565b3480156102ec57600080fd5b506101fb6102fb36600461216b565b610fb5565b34801561030c57600080fd5b506101fb61031b36600461222d565b611255565b34801561032c57600080fd5b506101fb61033b36600461206a565b61139c565b34801561034c57600080fd5b506101fb61035b36600461206a565b611520565b34801561036c57600080fd5b5061027c61037b3660046120cf565b6115cb565b34801561038c57600080fd5b5061027c61039b366004612266565b6115fd565b3480156103ac57600080fd5b506101fb61164f565b3480156103c157600080fd5b506103e97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b34801561040d57600080fd5b506101fb61041c366004612289565b611843565b34801561042d57600080fd5b506007546103e9906001600160a01b031681565b34801561044d57600080fd5b5061027c61045c3660046120cf565b60036020526000908152604090205481565b34801561047a57600080fd5b506101fb61048936600461206a565b6118d6565b34801561049a57600080fd5b5061027c60005481565b3480156104b057600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104e457600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561051857600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054c57600080fd5b506101fb61055b36600461206a565b611a61565b34801561056c57600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a057600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d457600080fd5b506101fb6105e336600461206a565b611c6d565b3480156105f457600080fd5b50610608610603366004612266565b611e26565b60405161022991906122bc565b34801561062157600080fd5b506103e97f000000000000000000000000000000000000000000000000000000000000000081565b34801561065557600080fd5b5061027c60045481565b6101fb61066d3660046120e8565b611eed565b61067b816115fd565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122d6565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a001516002811115610793576107936122a6565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816115fd565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f000000000000000000000000000000000000000000000000000000000000000034612314565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036109175760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b6004546006546109279190612327565b42116109905760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610a07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2b919061233a565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610a68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8c9190612357565b50925050508181036108ac5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610b2857610b2861238d565b04031115610b6b5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610be35760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8f919061233a565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ccc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf0919061233a565b6001600160a01b031614610d3f5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610d4f57508115155b15610d9257600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610d9b816115fd565b60008481526002602052604090205403610df8578051829003610dc457600160a0820152610ddf565b60c08101516001600160a01b031615610ddf57600260a08201525b610de8816115fd565b6000848152600260205260409020555b505050565b6000610e297f0000000000000000000000000000000000000000000000000000000000000000426123a3565b905090565b6007546001600160a01b03163314610e4557600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610eb55760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610ed25760405162461bcd60e51b81526004016106a7906122d6565b60008281526002602052604090205415610f245760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610f6a906115fd565b60008381526002602090815260409182902092909255805184815291820183905233917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910161082f565b60408510610ff75760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b60008484848460405160200161101094939291906123c5565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561109057600088888381811061105257611052612407565b9050602002013590508281111561107757826000528060205260406000209250611087565b8060005282602052604060002092505b50600101611036565b5080600054146110d35760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156111485760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b03891690611178908990899061241d565b6000604051808303816000865af19150503d80600081146111b5576040519150601f19603f3d011682016040523d82523d6000602084013e6111ba565b606091505b505090508061120b5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61126761039b36839003830183612266565b600083815260026020526040902054146112935760405162461bcd60e51b81526004016106a7906122d6565b60026112a560c0830160a0840161242d565b60028111156112b6576112b66122a6565b146112f75760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061135193505060e0840191505060c08301612289565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6113a5816115fd565b600083815260026020526040902054146113d15760405162461bcd60e51b81526004016106a7906122d6565b60018160a0015160028111156113e9576113e96122a6565b146114265760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156114d2576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461153757600080fd5b611540816115fd565b6000838152600260205260409020541461156c5760405162461bcd60e51b81526004016106a7906122d6565b63ffffffff428116606083015243166080820152611589816115fd565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610ac9565b60006115f77f0000000000000000000000000000000000000000000000000000000000000000836123a3565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611632989097969101612448565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156116af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d3919061233a565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611710573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117349190612357565b509250505060045481111561177e5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b60045481101561184057600654156117f25760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6007546001600160a01b0316331461185a57600080fd5b6007546001600160a01b031633146118b45760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119295761192961238d565b0403111561196c5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b611975816115fd565b600083815260026020526040902054146119a15760405162461bcd60e51b81526004016106a7906122d6565b60c08101516001600160a01b0316156119f35760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b600154821115611a3b57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611a4b816115fd565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ab457611ab461238d565b040311611af55760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611afe816115fd565b60008381526002602052604090205414611b2a5760405162461bcd60e51b81526004016106a7906122d6565b60008160a001516002811115611b4257611b426122a6565b14611b815760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b0316611c055760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611c19826115fd565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cc057611cc061238d565b040311611d015760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611d0a816115fd565b60008381526002602052604090205414611d365760405162461bcd60e51b81526004016106a7906122d6565b60008160a001516002811115611d4e57611d4e6122a6565b14611d8d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611e125760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611c19826115fd565b6000816060015163ffffffff16600003611e4257506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7e57506003919050565b6000600c836060015163ffffffff16420381611e9c57611e9c61238d565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ee05760019250611ee5565b600092505b50505b919050565b611ef78282610e2e565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f3e8382611520565b63ffffffff428116606083015243166080820152611f5c83826118d6565b600160a0820152610df8838261139c565b6001600160a01b038116811461184057600080fd5b8035611ee881611f6d565b803563ffffffff81168114611ee857600080fd5b803560038110611ee857600080fd5b600060e08284031215611fc257600080fd5b60405160e0810181811067ffffffffffffffff82111715611ff357634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200960208401611f82565b602082015261201a60408401611f8d565b604082015261202b60608401611f8d565b606082015261203c60808401611f8d565b608082015261204d60a08401611fa1565b60a082015261205e60c08401611f82565b60c08201525092915050565b600080610100838503121561207e57600080fd5b8235915061208f8460208501611fb0565b90509250929050565b600080600061012084860312156120ae57600080fd5b83359250602084013591506120c68560408601611fb0565b90509250925092565b6000602082840312156120e157600080fd5b5035919050565b600080604083850312156120fb57600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee857600080fd5b60008083601f84011261213457600080fd5b50813567ffffffffffffffff81111561214c57600080fd5b60208301915083602082850101111561216457600080fd5b9250929050565b6000806000806000806080878903121561218457600080fd5b863567ffffffffffffffff8082111561219c57600080fd5b818901915089601f8301126121b057600080fd5b8135818111156121bf57600080fd5b8a60208260051b85010111156121d457600080fd5b602083019850809750506121ea60208a0161210a565b95506121f860408a01611f82565b9450606089013591508082111561220e57600080fd5b5061221b89828a01612122565b979a9699509497509295939492505050565b60008082840361010081121561224257600080fd5b8335925060e0601f198201121561225857600080fd5b506020830190509250929050565b600060e0828403121561227857600080fd5b6122828383611fb0565b9392505050565b60006020828403121561229b57600080fd5b813561228281611f6d565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122d0576122d06122a6565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156115f7576115f76122fe565b808201808211156115f7576115f76122fe565b60006020828403121561234c57600080fd5b815161228281611f6d565b6000806000806080858703121561236d57600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b6000826123c057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561243f57600080fd5b61228282611fa1565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124a0576124a06122a6565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212202e6d7450550becfa9dbdb8cdfba00c4bceb171e206d60b855763ac61ae1a6e4f64736f6c63430008120033", "devdoc": { "details": "Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).", "events": { @@ -1097,10 +1084,11 @@ "_epoch": "The epoch associated with the challenged claim." } }, - "Claimed(address,bytes32)": { + "Claimed(address,uint256,bytes32)": { "details": "Watchers check this event to challenge fraud.", "params": { "_claimer": "The address of the claimer.", + "_epoch": "The epoch associated with the claim.", "_stateRoot": "The state root of the claim." } }, @@ -1171,7 +1159,6 @@ "params": { "_deposit": "The deposit amount to submit a claim in wei.", "_epochPeriod": "The duration of each epoch.", - "_maxClaimDelayEpochs": "The maximum number of epochs that can be claimed in the past.", "_maxMissingBlocks": "The maximum number of blocks that can be missing in a challenge period.", "_minChallengePeriod": "The minimum time window to challenge a claim.", "_timeoutEpochs": "The epochs before the bridge is considered shutdown.", @@ -1286,7 +1273,7 @@ "storageLayout": { "storage": [ { - "astId": 432, + "astId": 38, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "stateRoot", "offset": 0, @@ -1294,7 +1281,7 @@ "type": "t_bytes32" }, { - "astId": 434, + "astId": 40, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "latestVerifiedEpoch", "offset": 0, @@ -1302,7 +1289,7 @@ "type": "t_uint256" }, { - "astId": 438, + "astId": 44, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "claimHashes", "offset": 0, @@ -1310,7 +1297,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 442, + "astId": 48, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "relayed", "offset": 0, @@ -1318,7 +1305,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 444, + "astId": 50, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "sequencerDelayLimit", "offset": 0, @@ -1326,15 +1313,15 @@ "type": "t_uint256" }, { - "astId": 447, + "astId": 53, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "5", - "type": "t_struct(SequencerDelayLimitDecreaseRequest)452_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)58_storage" }, { - "astId": 6525, + "astId": 2895, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "devnetOperator", "offset": 0, @@ -1360,12 +1347,12 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_struct(SequencerDelayLimitDecreaseRequest)452_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)58_storage": { "encoding": "inplace", "label": "struct VeaOutboxArbToEth.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 449, + "astId": 55, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "requestedsequencerDelayLimit", "offset": 0, @@ -1373,7 +1360,7 @@ "type": "t_uint256" }, { - "astId": 451, + "astId": 57, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json b/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json index d8eead05..6aff1044 100644 --- a/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json +++ b/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x92Cd1F40e5A4FFa25f83Dd9231EBD9df02eD6a5F", + "address": "0x356f5D0756ab15C819015960C355386d0367d545", "abi": [ { "inputs": [ @@ -37,11 +37,6 @@ "internalType": "uint256", "name": "_maxMissingBlocks", "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxClaimDelayEpochs", - "type": "uint256" } ], "stateMutability": "nonpayable", @@ -75,6 +70,12 @@ "name": "_claimer", "type": "address" }, + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, { "indexed": false, "internalType": "bytes32", @@ -445,19 +446,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "maxClaimDelayEpochs", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "maxMissingBlocks", @@ -999,32 +987,32 @@ "type": "function" } ], - "transactionHash": "0xccfb57fdeb42e9b14be71245c827fc76dec738ba743b1bdb4d351737d876a1fa", + "transactionHash": "0x1d51029e1f031dec99caf6009ae4cd59eaa9343ff53540f5af14bd056e0a28e9", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x92Cd1F40e5A4FFa25f83Dd9231EBD9df02eD6a5F", - "transactionIndex": 69, - "gasUsed": "2299673", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020004000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000004000000000000000000", - "blockHash": "0x67fadb2b5c2178e00295e24fd3460fe66faf835696c6fdf09c2b55be72526351", - "transactionHash": "0xccfb57fdeb42e9b14be71245c827fc76dec738ba743b1bdb4d351737d876a1fa", + "contractAddress": "0x356f5D0756ab15C819015960C355386d0367d545", + "transactionIndex": 39, + "gasUsed": "2211392", + "logsBloom": "0x00000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000020001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x7d3ee96bbeda92130c5b387602ca3ea420c0ad1b0ba3d98c88d20d9772065985", + "transactionHash": "0x1d51029e1f031dec99caf6009ae4cd59eaa9343ff53540f5af14bd056e0a28e9", "logs": [ { - "transactionIndex": 69, - "blockNumber": 9254073, - "transactionHash": "0xccfb57fdeb42e9b14be71245c827fc76dec738ba743b1bdb4d351737d876a1fa", - "address": "0x92Cd1F40e5A4FFa25f83Dd9231EBD9df02eD6a5F", + "transactionIndex": 39, + "blockNumber": 9254610, + "transactionHash": "0x1d51029e1f031dec99caf6009ae4cd59eaa9343ff53540f5af14bd056e0a28e9", + "address": "0x356f5D0756ab15C819015960C355386d0367d545", "topics": [ "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 167, - "blockHash": "0x67fadb2b5c2178e00295e24fd3460fe66faf835696c6fdf09c2b55be72526351" + "logIndex": 102, + "blockHash": "0x7d3ee96bbeda92130c5b387602ca3ea420c0ad1b0ba3d98c88d20d9772065985" } ], - "blockNumber": 9254073, - "cumulativeGasUsed": "14654585", + "blockNumber": 9254610, + "cumulativeGasUsed": "12171356", "status": 1, "byzantium": true }, @@ -1033,16 +1021,15 @@ 7200, 10800, 1000000, - "0xE732B5b0DEE43619031e080Da461059F75a260E2", + "0xB00b74346d6cb2440F71cc3Fb19Cd2B50450571E", "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", - 1000000, - 3 + 1000000 ], - "numDeployments": 1, - "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxClaimDelayEpochs\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxClaimDelayEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer delay limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxClaimDelayEpochs\":\"The maximum number of epochs that can be claimed in the past.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEth\":\"The address of the inbox contract on Arbitrum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":\"VeaOutboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable maxClaimDelayEpochs; // The maximum number of epochs that can be claimed in the past.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer delay limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks,\\n uint256 _maxClaimDelayEpochs\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n maxClaimDelayEpochs = _maxClaimDelayEpochs;\\n\\n updateSequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n\\n require(_epoch < block.timestamp / epochPeriod, \\\"Epoch has not yet passed.\\\");\\n\\n // Allow claims to be made within the sequencerDelayLimit.\\n // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating.\\n // If the sequencerDelayLimit is set larger than block.timestamp - epochPeriod by arbitrum governance, \\n // the checked arithmetic will revert due to underflow and the bridge will shutdown.\\n uint256 minEpochSequencerDelay = (block.timestamp - sequencerDelayLimit) / epochPeriod - 1;\\n\\n uint256 minEpochClaim;\\n \\n unchecked{\\n // deployed sets maxClaimWindowEpochs so no underflow is possible\\n minEpochClaim = block.timestamp / epochPeriod - maxClaimDelayEpochs;\\n }\\n\\n uint256 minClaimableEpoch = minEpochSequencerDelay > minEpochClaim ? minEpochSequencerDelay : minEpochClaim;\\n \\n require(_epoch >= minClaimableEpoch, \\\"Invalid epoch.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= uint256(_claim.timestampClaimed) + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x3a94e33e43dcab687319e91c809a9df5b9309d972508025bcda56eb9e44bb08f\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101c06040523480156200001257600080fd5b5060405162002c8b38038062002c8b8339810160408190526200003591620002d5565b60c08890526101208790526101408690526101808590526001600160a01b0380851660a05283166080526101a082905261016081905262000075620000d5565b620000826002896200035c565b60e0819052620000948960026200037f565b620000a091906200039f565b6101005261012051600190620000b790426200035c565b620000c391906200039f565b60015550620004119650505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000118573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200013e9190620003b5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156200017c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001a29190620003da565b5092505050600454811115620001ed5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002b55760065415620002675760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002d057600080fd5b919050565b600080600080600080600080610100898b031215620002f357600080fd5b885197506020890151965060408901519550606089015194506200031a60808a01620002b8565b93506200032a60a08a01620002b8565b60c08a015160e0909a0151989b979a5095989497939692505050565b634e487b7160e01b600052601160045260246000fd5b6000826200037a57634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000399576200039962000346565b92915050565b8181038181111562000399576200039962000346565b600060208284031215620003c857600080fd5b620003d382620002b8565b9392505050565b60008060008060808587031215620003f157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516127176200057460003960008181610494015261214b0152600081816104c801528181610aa001528181611b0a01528181611cfe0152611f0a0152600081816101f90152610f2c01526000818161055001526120df0152600081816104fc01528181610ac401528181610dcd01528181610e6c01528181610ee501528181610f4d015281816116dd0152818161189701528181611b2e01528181611d220152611f2e015260006114f40152600081816114a101526116060152600081816105840152818161067d015281816108030152818161083001528181610df9015281816110d0015281816110fd0152818161166901528181611e6801528181611ecf01526120750152600081816103e50152610bae0152600081816106050152818161098601528181610b3f01528181610bd8015261191801526127176000f3fe6080604052600436106101cd5760003560e01c80635f43a47f116100f7578063b5b7a18411610095578063da2b7bc411610064578063da2b7bc4146105a6578063df19e6ff146105c6578063e78cea92146105f3578063e813a7551461062757600080fd5b8063b5b7a184146104ea578063b633b9441461051e578063c2114a161461053e578063d0e30db01461057257600080fd5b8063930f28af116100d1578063930f28af1461044c5780639588eca21461046c578063aa22a1c614610482578063b044397e146104b657600080fd5b80635f43a47f146103be57806369cd250d146103d357806390df63b71461041f57600080fd5b806327ee6bdd1161016f5780634788cb381161013e5780634788cb381461033e57806349b4299e1461035e5780634a439cfe1461037e578063541adcca1461039e57600080fd5b806327ee6bdd146102d557806331d14457146102eb57806331ddf743146102fe5780633ce43cfd1461031e57600080fd5b80630c63fa84116101ab5780630c63fa841461025e5780630f0adca514610273578063222ae786146102935780632639c060146102a857600080fd5b806301139b68146101d2578063042c4aaf146101e7578063051d19701461022e575b600080fd5b6101e56101e0366004612285565b61063d565b005b3480156101f357600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561023a57600080fd5b50600554600654610249919082565b60408051928352602083019190915201610225565b34801561026a57600080fd5b506101e561087a565b34801561027f57600080fd5b506101e561028e3660046122b3565b610a9e565b34801561029f57600080fd5b5061021b610dc6565b3480156102b457600080fd5b5061021b6102c33660046122ea565b60026020526000908152604090205481565b3480156102e157600080fd5b5061021b60015481565b6101e56102f9366004612303565b610df7565b34801561030a57600080fd5b506101e5610319366004612386565b61114a565b34801561032a57600080fd5b506101e5610339366004612448565b6113ea565b34801561034a57600080fd5b506101e5610359366004612448565b611531565b34801561036a57600080fd5b506101e5610379366004612285565b6116a6565b34801561038a57600080fd5b5061021b6103993660046122ea565b611890565b3480156103aa57600080fd5b5061021b6103b9366004612481565b6118c2565b3480156103ca57600080fd5b506101e5611914565b3480156103df57600080fd5b506104077f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610225565b34801561042b57600080fd5b5061021b61043a3660046122ea565b60036020526000908152604090205481565b34801561045857600080fd5b506101e5610467366004612285565b611b08565b34801561047857600080fd5b5061021b60005481565b34801561048e57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c257600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104f657600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561052a57600080fd5b506101e5610539366004612285565b611cfc565b34801561054a57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561057e57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105b257600080fd5b506101e56105c1366004612285565b611f08565b3480156105d257600080fd5b506105e66105e1366004612481565b6120c1565b60405161022591906124ba565b3480156105ff57600080fd5b506104077f000000000000000000000000000000000000000000000000000000000000000081565b34801561063357600080fd5b5061021b60045481565b610646816118c2565b6000838152600260205260409020541461067b5760405162461bcd60e51b8152600401610672906124d4565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106eb5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610672565b60c08101516001600160a01b0316156107465760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610672565b60008160a00151600281111561075e5761075e6124a4565b146107ab5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610672565b3360c08201526107ba816118c2565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108765760006108557f000000000000000000000000000000000000000000000000000000000000000034612512565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036108e15760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610672565b6004546006546108f19190612525565b421161095a5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610672565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156109d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f59190612538565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610a32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a569190612555565b50925050508181036108765760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610af157610af161258b565b04031115610b345760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610672565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610bac5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610672565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c589190612538565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb99190612538565b6001600160a01b031614610d085760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610672565b60015483118015610d1857508115155b15610d5b57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610d64816118c2565b60008481526002602052604090205403610dc1578051829003610d8d57600160a0820152610da8565b60c08101516001600160a01b031615610da857600260a08201525b610db1816118c2565b6000848152600260205260409020555b505050565b6000610df27f0000000000000000000000000000000000000000000000000000000000000000426125a1565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610e675760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610672565b610e917f0000000000000000000000000000000000000000000000000000000000000000426125a1565b8210610edf5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610672565b600060017f000000000000000000000000000000000000000000000000000000000000000060045442610f129190612512565b610f1c91906125a1565b610f269190612512565b905060007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000004281610f7a57610f7a61258b565b040390506000818311610f8d5781610f8f565b825b905080851015610fd25760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21032b837b1b41760911b6044820152606401610672565b83610fef5760405162461bcd60e51b8152600401610672906124d4565b600085815260026020526040902054156110415760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610672565b6040805160e0810182528581523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611087906118c2565b600086815260026020908152604091829020929092555185815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156111435760006111227f000000000000000000000000000000000000000000000000000000000000000034612512565b604051909150339082156108fc029083906000818181858888f15050505050505b5050505050565b6040851061118c5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610672565b6000848484846040516020016111a594939291906125c3565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156112255760008888838181106111e7576111e7612605565b9050602002013590508281111561120c5782600052806020526040600020925061121c565b8060005282602052604060002092505b506001016111cb565b5080600054146112685760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610672565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112dd5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610672565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061130d908990899061261b565b6000604051808303816000865af19150503d806000811461134a576040519150601f19603f3d011682016040523d82523d6000602084013e61134f565b606091505b50509050806113a05760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610672565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6113fc6103b936839003830183612481565b600083815260026020526040902054146114285760405162461bcd60e51b8152600401610672906124d4565b600261143a60c0830160a0840161262b565b600281111561144b5761144b6124a4565b1461148c5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610672565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114e693505060e0840191505060c08301612646565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6115436103b936839003830183612481565b6000838152600260205260409020541461156f5760405162461bcd60e51b8152600401610672906124d4565b600161158160c0830160a0840161262b565b6002811115611592576115926124a4565b146115cf5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610672565b60008281526002602052604081208190556115f060e0830160c08401612646565b6001600160a01b03161461164b576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114e69350506040840191505060208301612646565b61165b6040820160208301612646565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6116af816118c2565b600083815260026020526040902054146116db5760405162461bcd60e51b8152600401610672906124d4565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166117149190612525565b61171e9190612525565b4210156117825760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610672565b600061178d826120c1565b905060028160038111156117a3576117a36124a4565b14806117c0575060008160038111156117be576117be6124a4565b145b6118295760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610672565b63ffffffff428116606084015243166080830152611846826118c2565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006118bc7f0000000000000000000000000000000000000000000000000000000000000000836125a1565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986118f7989097969101612663565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015611974573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119989190612538565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156119d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f99190612555565b5092505050600454811115611a435760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015611b055760065415611ab75760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610672565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b5b57611b5b61258b565b04031115611b9e5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610672565b611ba7816118c2565b60008381526002602052604090205414611bd35760405162461bcd60e51b8152600401610672906124d4565b60c08101516001600160a01b031615611c255760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610672565b6001611c30826120c1565b6003811115611c4157611c416124a4565b14611c8e5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610672565b600154821115611cd657600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611ce6816118c2565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d4f57611d4f61258b565b040311611d905760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610672565b611d99816118c2565b60008381526002602052604090205414611dc55760405162461bcd60e51b8152600401610672906124d4565b60008160a001516002811115611ddd57611ddd6124a4565b14611e1c5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610672565b60c08101516001600160a01b0316156108765760208101516001600160a01b0316611ea05760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611eb4826118c2565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611f5b57611f5b61258b565b040311611f9c5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610672565b611fa5816118c2565b60008381526002602052604090205414611fd15760405162461bcd60e51b8152600401610672906124d4565b60008160a001516002811115611fe957611fe96124a4565b146120285760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610672565b60208101516001600160a01b0316156108765760c08101516001600160a01b03166120ad5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611eb4826118c2565b6000816060015163ffffffff166000036120dd57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561211957506003919050565b6000600c836060015163ffffffff164203816121375761213761258b565b608085015163ffffffff16919004019050437f00000000000000000000000000000000000000000000000000000000000000008183031161217b5760019250612180565b600092505b50505b919050565b6001600160a01b0381168114611b0557600080fd5b803561218381612188565b803563ffffffff8116811461218357600080fd5b80356003811061218357600080fd5b600060e082840312156121dd57600080fd5b60405160e0810181811067ffffffffffffffff8211171561220e57634e487b7160e01b600052604160045260246000fd5b604052823581529050806122246020840161219d565b6020820152612235604084016121a8565b6040820152612246606084016121a8565b6060820152612257608084016121a8565b608082015261226860a084016121bc565b60a082015261227960c0840161219d565b60c08201525092915050565b600080610100838503121561229957600080fd5b823591506122aa84602085016121cb565b90509250929050565b600080600061012084860312156122c957600080fd5b83359250602084013591506122e185604086016121cb565b90509250925092565b6000602082840312156122fc57600080fd5b5035919050565b6000806040838503121561231657600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461218357600080fd5b60008083601f84011261234f57600080fd5b50813567ffffffffffffffff81111561236757600080fd5b60208301915083602082850101111561237f57600080fd5b9250929050565b6000806000806000806080878903121561239f57600080fd5b863567ffffffffffffffff808211156123b757600080fd5b818901915089601f8301126123cb57600080fd5b8135818111156123da57600080fd5b8a60208260051b85010111156123ef57600080fd5b6020830198508097505061240560208a01612325565b955061241360408a0161219d565b9450606089013591508082111561242957600080fd5b5061243689828a0161233d565b979a9699509497509295939492505050565b60008082840361010081121561245d57600080fd5b8335925060e0601f198201121561247357600080fd5b506020830190509250929050565b600060e0828403121561249357600080fd5b61249d83836121cb565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106124ce576124ce6124a4565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156118bc576118bc6124fc565b808201808211156118bc576118bc6124fc565b60006020828403121561254a57600080fd5b815161249d81612188565b6000806000806080858703121561256b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b6000826125be57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561263d57600080fd5b61249d826121bc565b60006020828403121561265857600080fd5b813561249d81612188565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106126bb576126bb6124a4565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220af6b7bb1a2a01e26fd13c068961fe9cf4bd3863799379849841ae6b78e1b45b964736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101cd5760003560e01c80635f43a47f116100f7578063b5b7a18411610095578063da2b7bc411610064578063da2b7bc4146105a6578063df19e6ff146105c6578063e78cea92146105f3578063e813a7551461062757600080fd5b8063b5b7a184146104ea578063b633b9441461051e578063c2114a161461053e578063d0e30db01461057257600080fd5b8063930f28af116100d1578063930f28af1461044c5780639588eca21461046c578063aa22a1c614610482578063b044397e146104b657600080fd5b80635f43a47f146103be57806369cd250d146103d357806390df63b71461041f57600080fd5b806327ee6bdd1161016f5780634788cb381161013e5780634788cb381461033e57806349b4299e1461035e5780634a439cfe1461037e578063541adcca1461039e57600080fd5b806327ee6bdd146102d557806331d14457146102eb57806331ddf743146102fe5780633ce43cfd1461031e57600080fd5b80630c63fa84116101ab5780630c63fa841461025e5780630f0adca514610273578063222ae786146102935780632639c060146102a857600080fd5b806301139b68146101d2578063042c4aaf146101e7578063051d19701461022e575b600080fd5b6101e56101e0366004612285565b61063d565b005b3480156101f357600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b34801561023a57600080fd5b50600554600654610249919082565b60408051928352602083019190915201610225565b34801561026a57600080fd5b506101e561087a565b34801561027f57600080fd5b506101e561028e3660046122b3565b610a9e565b34801561029f57600080fd5b5061021b610dc6565b3480156102b457600080fd5b5061021b6102c33660046122ea565b60026020526000908152604090205481565b3480156102e157600080fd5b5061021b60015481565b6101e56102f9366004612303565b610df7565b34801561030a57600080fd5b506101e5610319366004612386565b61114a565b34801561032a57600080fd5b506101e5610339366004612448565b6113ea565b34801561034a57600080fd5b506101e5610359366004612448565b611531565b34801561036a57600080fd5b506101e5610379366004612285565b6116a6565b34801561038a57600080fd5b5061021b6103993660046122ea565b611890565b3480156103aa57600080fd5b5061021b6103b9366004612481565b6118c2565b3480156103ca57600080fd5b506101e5611914565b3480156103df57600080fd5b506104077f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610225565b34801561042b57600080fd5b5061021b61043a3660046122ea565b60036020526000908152604090205481565b34801561045857600080fd5b506101e5610467366004612285565b611b08565b34801561047857600080fd5b5061021b60005481565b34801561048e57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c257600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104f657600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561052a57600080fd5b506101e5610539366004612285565b611cfc565b34801561054a57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561057e57600080fd5b5061021b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105b257600080fd5b506101e56105c1366004612285565b611f08565b3480156105d257600080fd5b506105e66105e1366004612481565b6120c1565b60405161022591906124ba565b3480156105ff57600080fd5b506104077f000000000000000000000000000000000000000000000000000000000000000081565b34801561063357600080fd5b5061021b60045481565b610646816118c2565b6000838152600260205260409020541461067b5760405162461bcd60e51b8152600401610672906124d4565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106eb5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610672565b60c08101516001600160a01b0316156107465760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610672565b60008160a00151600281111561075e5761075e6124a4565b146107ab5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610672565b3360c08201526107ba816118c2565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108765760006108557f000000000000000000000000000000000000000000000000000000000000000034612512565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036108e15760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610672565b6004546006546108f19190612525565b421161095a5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610672565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156109d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f59190612538565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610a32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a569190612555565b50925050508181036108765760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610af157610af161258b565b04031115610b345760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610672565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610bac5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610672565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c589190612538565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb99190612538565b6001600160a01b031614610d085760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610672565b60015483118015610d1857508115155b15610d5b57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610d64816118c2565b60008481526002602052604090205403610dc1578051829003610d8d57600160a0820152610da8565b60c08101516001600160a01b031615610da857600260a08201525b610db1816118c2565b6000848152600260205260409020555b505050565b6000610df27f0000000000000000000000000000000000000000000000000000000000000000426125a1565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610e675760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610672565b610e917f0000000000000000000000000000000000000000000000000000000000000000426125a1565b8210610edf5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610672565b600060017f000000000000000000000000000000000000000000000000000000000000000060045442610f129190612512565b610f1c91906125a1565b610f269190612512565b905060007f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000004281610f7a57610f7a61258b565b040390506000818311610f8d5781610f8f565b825b905080851015610fd25760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21032b837b1b41760911b6044820152606401610672565b83610fef5760405162461bcd60e51b8152600401610672906124d4565b600085815260026020526040902054156110415760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610672565b6040805160e0810182528581523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611087906118c2565b600086815260026020908152604091829020929092555185815233917f91d697238e9aa9f3172d17522c9be529b94a892481554e1ea619369b5b12f39a910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156111435760006111227f000000000000000000000000000000000000000000000000000000000000000034612512565b604051909150339082156108fc029083906000818181858888f15050505050505b5050505050565b6040851061118c5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610672565b6000848484846040516020016111a594939291906125c3565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156112255760008888838181106111e7576111e7612605565b9050602002013590508281111561120c5782600052806020526040600020925061121c565b8060005282602052604060002092505b506001016111cb565b5080600054146112685760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610672565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112dd5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610672565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061130d908990899061261b565b6000604051808303816000865af19150503d806000811461134a576040519150601f19603f3d011682016040523d82523d6000602084013e61134f565b606091505b50509050806113a05760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610672565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6113fc6103b936839003830183612481565b600083815260026020526040902054146114285760405162461bcd60e51b8152600401610672906124d4565b600261143a60c0830160a0840161262b565b600281111561144b5761144b6124a4565b1461148c5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610672565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114e693505060e0840191505060c08301612646565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6115436103b936839003830183612481565b6000838152600260205260409020541461156f5760405162461bcd60e51b8152600401610672906124d4565b600161158160c0830160a0840161262b565b6002811115611592576115926124a4565b146115cf5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610672565b60008281526002602052604081208190556115f060e0830160c08401612646565b6001600160a01b03161461164b576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f1506114e69350506040840191505060208301612646565b61165b6040820160208301612646565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6116af816118c2565b600083815260026020526040902054146116db5760405162461bcd60e51b8152600401610672906124d4565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166117149190612525565b61171e9190612525565b4210156117825760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610672565b600061178d826120c1565b905060028160038111156117a3576117a36124a4565b14806117c0575060008160038111156117be576117be6124a4565b145b6118295760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610672565b63ffffffff428116606084015243166080830152611846826118c2565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b60006118bc7f0000000000000000000000000000000000000000000000000000000000000000836125a1565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986118f7989097969101612663565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015611974573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119989190612538565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156119d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119f99190612555565b5092505050600454811115611a435760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015611b055760065415611ab75760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610672565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b5b57611b5b61258b565b04031115611b9e5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610672565b611ba7816118c2565b60008381526002602052604090205414611bd35760405162461bcd60e51b8152600401610672906124d4565b60c08101516001600160a01b031615611c255760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610672565b6001611c30826120c1565b6003811115611c4157611c416124a4565b14611c8e5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610672565b600154821115611cd657600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611ce6816118c2565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d4f57611d4f61258b565b040311611d905760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610672565b611d99816118c2565b60008381526002602052604090205414611dc55760405162461bcd60e51b8152600401610672906124d4565b60008160a001516002811115611ddd57611ddd6124a4565b14611e1c5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610672565b60c08101516001600160a01b0316156108765760208101516001600160a01b0316611ea05760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611eb4826118c2565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611f5b57611f5b61258b565b040311611f9c5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610672565b611fa5816118c2565b60008381526002602052604090205414611fd15760405162461bcd60e51b8152600401610672906124d4565b60008160a001516002811115611fe957611fe96124a4565b146120285760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610672565b60208101516001600160a01b0316156108765760c08101516001600160a01b03166120ad5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611eb4826118c2565b6000816060015163ffffffff166000036120dd57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561211957506003919050565b6000600c836060015163ffffffff164203816121375761213761258b565b608085015163ffffffff16919004019050437f00000000000000000000000000000000000000000000000000000000000000008183031161217b5760019250612180565b600092505b50505b919050565b6001600160a01b0381168114611b0557600080fd5b803561218381612188565b803563ffffffff8116811461218357600080fd5b80356003811061218357600080fd5b600060e082840312156121dd57600080fd5b60405160e0810181811067ffffffffffffffff8211171561220e57634e487b7160e01b600052604160045260246000fd5b604052823581529050806122246020840161219d565b6020820152612235604084016121a8565b6040820152612246606084016121a8565b6060820152612257608084016121a8565b608082015261226860a084016121bc565b60a082015261227960c0840161219d565b60c08201525092915050565b600080610100838503121561229957600080fd5b823591506122aa84602085016121cb565b90509250929050565b600080600061012084860312156122c957600080fd5b83359250602084013591506122e185604086016121cb565b90509250925092565b6000602082840312156122fc57600080fd5b5035919050565b6000806040838503121561231657600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461218357600080fd5b60008083601f84011261234f57600080fd5b50813567ffffffffffffffff81111561236757600080fd5b60208301915083602082850101111561237f57600080fd5b9250929050565b6000806000806000806080878903121561239f57600080fd5b863567ffffffffffffffff808211156123b757600080fd5b818901915089601f8301126123cb57600080fd5b8135818111156123da57600080fd5b8a60208260051b85010111156123ef57600080fd5b6020830198508097505061240560208a01612325565b955061241360408a0161219d565b9450606089013591508082111561242957600080fd5b5061243689828a0161233d565b979a9699509497509295939492505050565b60008082840361010081121561245d57600080fd5b8335925060e0601f198201121561247357600080fd5b506020830190509250929050565b600060e0828403121561249357600080fd5b61249d83836121cb565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106124ce576124ce6124a4565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156118bc576118bc6124fc565b808201808211156118bc576118bc6124fc565b60006020828403121561254a57600080fd5b815161249d81612188565b6000806000806080858703121561256b57600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b6000826125be57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561263d57600080fd5b61249d826121bc565b60006020828403121561265857600080fd5b813561249d81612188565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106126bb576126bb6124a4565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220af6b7bb1a2a01e26fd13c068961fe9cf4bd3863799379849841ae6b78e1b45b964736f6c63430008120033", + "numDeployments": 3, + "solcInputHash": "6b0b750c6eee9aa0a5e450d1f0bbb2d2", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer delay limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEth\":\"The address of the inbox contract on Arbitrum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":\"VeaOutboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer delay limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updateSequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch has not yet passed.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= uint256(_claim.timestampClaimed) + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0xe9d526edd46c7639759b1a7bd8d2f218ce5716f07638b2a8743ab5119b62ee35\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002ab038038062002ab08339810160408190526200003591620002ce565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190526200006f620000ce565b6200007c6002886200034c565b60e08190526200008e8860026200036f565b6200009a91906200038f565b6101005261012051600190620000b190426200034c565b620000bd91906200038f565b600155506200040195505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000111573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001379190620003a5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200019b9190620003ca565b5092505050600454811115620001e65760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ae5760065415620002605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002c957600080fd5b919050565b600080600080600080600060e0888a031215620002ea57600080fd5b875196506020880151955060408801519450606088015193506200031160808901620002b1565b92506200032160a08901620002b1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200036a57634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000389576200038962000336565b92915050565b8181038181111562000389576200038962000336565b600060208284031215620003b857600080fd5b620003c382620002b1565b9392505050565b60008060008060808587031215620003e157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610100516101205161014051610160516101805161257a62000536600039600081816104550152611fae01526000818161048901528181610a620152818161196d01528181611b610152611d6d0152600081816105110152611f420152600081816104bd01528181610a8601528181610d8f01528181610e3001528181611540015281816116fa0152818161199101528181611b850152611d910152600061135701526000818161130401526114690152600081816105450152818161063e015281816107c5015281816107f201528181610dbb015281816114cc01528181611ccb01528181611d320152611ed80152600081816103a60152610b700152600081816105c60152818161094801528181610b0101528181610b9a015261177b015261257a6000f3fe6080604052600436106101c25760003560e01c80635f43a47f116100f7578063b5b7a18411610095578063da2b7bc411610064578063da2b7bc414610567578063df19e6ff14610587578063e78cea92146105b4578063e813a755146105e857600080fd5b8063b5b7a184146104ab578063b633b944146104df578063c2114a16146104ff578063d0e30db01461053357600080fd5b8063930f28af116100d1578063930f28af1461040d5780639588eca21461042d578063aa22a1c614610443578063b044397e1461047757600080fd5b80635f43a47f1461037f57806369cd250d1461039457806390df63b7146103e057600080fd5b806331d14457116101645780634788cb381161013e5780634788cb38146102ff57806349b4299e1461031f5780634a439cfe1461033f578063541adcca1461035f57600080fd5b806331d14457146102ac57806331ddf743146102bf5780633ce43cfd146102df57600080fd5b80630f0adca5116101a05780630f0adca514610226578063222ae786146102465780632639c0601461026957806327ee6bdd1461029657600080fd5b806301139b68146101c7578063051d1970146101dc5780630c63fa8414610211575b600080fd5b6101da6101d53660046120e8565b6105fe565b005b3480156101e857600080fd5b506005546006546101f7919082565b604080519283526020830191909152015b60405180910390f35b34801561021d57600080fd5b506101da61083c565b34801561023257600080fd5b506101da610241366004612116565b610a60565b34801561025257600080fd5b5061025b610d88565b604051908152602001610208565b34801561027557600080fd5b5061025b61028436600461214d565b60026020526000908152604090205481565b3480156102a257600080fd5b5061025b60015481565b6101da6102ba366004612166565b610db9565b3480156102cb57600080fd5b506101da6102da3660046121e9565b610fad565b3480156102eb57600080fd5b506101da6102fa3660046122ab565b61124d565b34801561030b57600080fd5b506101da61031a3660046122ab565b611394565b34801561032b57600080fd5b506101da61033a3660046120e8565b611509565b34801561034b57600080fd5b5061025b61035a36600461214d565b6116f3565b34801561036b57600080fd5b5061025b61037a3660046122e4565b611725565b34801561038b57600080fd5b506101da611777565b3480156103a057600080fd5b506103c87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610208565b3480156103ec57600080fd5b5061025b6103fb36600461214d565b60036020526000908152604090205481565b34801561041957600080fd5b506101da6104283660046120e8565b61196b565b34801561043957600080fd5b5061025b60005481565b34801561044f57600080fd5b5061025b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561048357600080fd5b5061025b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104b757600080fd5b5061025b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104eb57600080fd5b506101da6104fa3660046120e8565b611b5f565b34801561050b57600080fd5b5061025b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561053f57600080fd5b5061025b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561057357600080fd5b506101da6105823660046120e8565b611d6b565b34801561059357600080fd5b506105a76105a23660046122e4565b611f24565b604051610208919061231d565b3480156105c057600080fd5b506103c87f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f457600080fd5b5061025b60045481565b61060781611725565b6000838152600260205260409020541461063c5760405162461bcd60e51b815260040161063390612337565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f612307565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b81611725565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f000000000000000000000000000000000000000000000000000000000000000034612375565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036108a35760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b6004546006546108b39190612388565b421161091c5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610993573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b7919061239b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156109f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1891906123b8565b50925050508181036108385760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610ab357610ab36123ee565b04031115610af65760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b6e5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bf6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1a919061239b565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7b919061239b565b6001600160a01b031614610cca5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610cda57508115155b15610d1d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610d2681611725565b60008481526002602052604090205403610d83578051829003610d4f57600160a0820152610d6a565b60c08101516001600160a01b031615610d6a57600260a08201525b610d7381611725565b6000848152600260205260409020555b505050565b6000610db47f000000000000000000000000000000000000000000000000000000000000000042612404565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610e295760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b6001610e557f000000000000000000000000000000000000000000000000000000000000000042612404565b610e5f9190612375565b8214610ead5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b80610eca5760405162461bcd60e51b815260040161063390612337565b60008281526002602052604090205415610f1c5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610f6290611725565b60008381526002602090815260409182902092909255805184815291820183905233917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d5791016107bb565b60408510610fef5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b6000848484846040516020016110089493929190612426565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561108857600088888381811061104a5761104a612468565b9050602002013590508281111561106f5782600052806020526040600020925061107f565b8060005282602052604060002092505b5060010161102e565b5080600054146110cb5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156111405760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b03891690611170908990899061247e565b6000604051808303816000865af19150503d80600081146111ad576040519150601f19603f3d011682016040523d82523d6000602084013e6111b2565b606091505b50509050806112035760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61125f61037a368390038301836122e4565b6000838152600260205260409020541461128b5760405162461bcd60e51b815260040161063390612337565b600261129d60c0830160a0840161248e565b60028111156112ae576112ae612307565b146112ef5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061134993505060e0840191505060c083016124a9565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6113a661037a368390038301836122e4565b600083815260026020526040902054146113d25760405162461bcd60e51b815260040161063390612337565b60016113e460c0830160a0840161248e565b60028111156113f5576113f5612307565b146114325760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b600082815260026020526040812081905561145360e0830160c084016124a9565b6001600160a01b0316146114ae576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061134993505060408401915050602083016124a9565b6114be60408201602083016124a9565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61151281611725565b6000838152600260205260409020541461153e5760405162461bcd60e51b815260040161063390612337565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166115779190612388565b6115819190612388565b4210156115e55760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b60006115f082611f24565b9050600281600381111561160657611606612307565b14806116235750600081600381111561162157611621612307565b145b61168c5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526116a982611725565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b600061171f7f000000000000000000000000000000000000000000000000000000000000000083612404565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861175a9890979691016124c6565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117fb919061239b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611838573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185c91906123b8565b50925050506004548111156118a65760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015611968576006541561191a5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119be576119be6123ee565b04031115611a015760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b611a0a81611725565b60008381526002602052604090205414611a365760405162461bcd60e51b815260040161063390612337565b60c08101516001600160a01b031615611a885760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b6001611a9382611f24565b6003811115611aa457611aa4612307565b14611af15760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b600154821115611b3957600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b4981611725565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bb257611bb26123ee565b040311611bf35760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611bfc81611725565b60008381526002602052604090205414611c285760405162461bcd60e51b815260040161063390612337565b60008160a001516002811115611c4057611c40612307565b14611c7f5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611d035760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611d1782611725565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611dbe57611dbe6123ee565b040311611dff5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611e0881611725565b60008381526002602052604090205414611e345760405162461bcd60e51b815260040161063390612337565b60008160a001516002811115611e4c57611e4c612307565b14611e8b5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611f105760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611d1782611725565b6000816060015163ffffffff16600003611f4057506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f7c57506003919050565b6000600c836060015163ffffffff16420381611f9a57611f9a6123ee565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611fde5760019250611fe3565b600092505b50505b919050565b6001600160a01b038116811461196857600080fd5b8035611fe681611feb565b803563ffffffff81168114611fe657600080fd5b803560038110611fe657600080fd5b600060e0828403121561204057600080fd5b60405160e0810181811067ffffffffffffffff8211171561207157634e487b7160e01b600052604160045260246000fd5b6040528235815290508061208760208401612000565b60208201526120986040840161200b565b60408201526120a96060840161200b565b60608201526120ba6080840161200b565b60808201526120cb60a0840161201f565b60a08201526120dc60c08401612000565b60c08201525092915050565b60008061010083850312156120fc57600080fd5b8235915061210d846020850161202e565b90509250929050565b6000806000610120848603121561212c57600080fd5b8335925060208401359150612144856040860161202e565b90509250925092565b60006020828403121561215f57600080fd5b5035919050565b6000806040838503121561217957600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611fe657600080fd5b60008083601f8401126121b257600080fd5b50813567ffffffffffffffff8111156121ca57600080fd5b6020830191508360208285010111156121e257600080fd5b9250929050565b6000806000806000806080878903121561220257600080fd5b863567ffffffffffffffff8082111561221a57600080fd5b818901915089601f83011261222e57600080fd5b81358181111561223d57600080fd5b8a60208260051b850101111561225257600080fd5b6020830198508097505061226860208a01612188565b955061227660408a01612000565b9450606089013591508082111561228c57600080fd5b5061229989828a016121a0565b979a9699509497509295939492505050565b6000808284036101008112156122c057600080fd5b8335925060e0601f19820112156122d657600080fd5b506020830190509250929050565b600060e082840312156122f657600080fd5b612300838361202e565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061233157612331612307565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561171f5761171f61235f565b8082018082111561171f5761171f61235f565b6000602082840312156123ad57600080fd5b815161230081611feb565b600080600080608085870312156123ce57600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b60008261242157634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156124a057600080fd5b6123008261201f565b6000602082840312156124bb57600080fd5b813561230081611feb565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061251e5761251e612307565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212207649f9a69b696b8730d8471aecbf81907f8429893834f7171be4b946fa84812d64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101c25760003560e01c80635f43a47f116100f7578063b5b7a18411610095578063da2b7bc411610064578063da2b7bc414610567578063df19e6ff14610587578063e78cea92146105b4578063e813a755146105e857600080fd5b8063b5b7a184146104ab578063b633b944146104df578063c2114a16146104ff578063d0e30db01461053357600080fd5b8063930f28af116100d1578063930f28af1461040d5780639588eca21461042d578063aa22a1c614610443578063b044397e1461047757600080fd5b80635f43a47f1461037f57806369cd250d1461039457806390df63b7146103e057600080fd5b806331d14457116101645780634788cb381161013e5780634788cb38146102ff57806349b4299e1461031f5780634a439cfe1461033f578063541adcca1461035f57600080fd5b806331d14457146102ac57806331ddf743146102bf5780633ce43cfd146102df57600080fd5b80630f0adca5116101a05780630f0adca514610226578063222ae786146102465780632639c0601461026957806327ee6bdd1461029657600080fd5b806301139b68146101c7578063051d1970146101dc5780630c63fa8414610211575b600080fd5b6101da6101d53660046120e8565b6105fe565b005b3480156101e857600080fd5b506005546006546101f7919082565b604080519283526020830191909152015b60405180910390f35b34801561021d57600080fd5b506101da61083c565b34801561023257600080fd5b506101da610241366004612116565b610a60565b34801561025257600080fd5b5061025b610d88565b604051908152602001610208565b34801561027557600080fd5b5061025b61028436600461214d565b60026020526000908152604090205481565b3480156102a257600080fd5b5061025b60015481565b6101da6102ba366004612166565b610db9565b3480156102cb57600080fd5b506101da6102da3660046121e9565b610fad565b3480156102eb57600080fd5b506101da6102fa3660046122ab565b61124d565b34801561030b57600080fd5b506101da61031a3660046122ab565b611394565b34801561032b57600080fd5b506101da61033a3660046120e8565b611509565b34801561034b57600080fd5b5061025b61035a36600461214d565b6116f3565b34801561036b57600080fd5b5061025b61037a3660046122e4565b611725565b34801561038b57600080fd5b506101da611777565b3480156103a057600080fd5b506103c87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610208565b3480156103ec57600080fd5b5061025b6103fb36600461214d565b60036020526000908152604090205481565b34801561041957600080fd5b506101da6104283660046120e8565b61196b565b34801561043957600080fd5b5061025b60005481565b34801561044f57600080fd5b5061025b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561048357600080fd5b5061025b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104b757600080fd5b5061025b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104eb57600080fd5b506101da6104fa3660046120e8565b611b5f565b34801561050b57600080fd5b5061025b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561053f57600080fd5b5061025b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561057357600080fd5b506101da6105823660046120e8565b611d6b565b34801561059357600080fd5b506105a76105a23660046122e4565b611f24565b604051610208919061231d565b3480156105c057600080fd5b506103c87f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f457600080fd5b5061025b60045481565b61060781611725565b6000838152600260205260409020541461063c5760405162461bcd60e51b815260040161063390612337565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f612307565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b81611725565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f000000000000000000000000000000000000000000000000000000000000000034612375565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036108a35760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b6004546006546108b39190612388565b421161091c5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610993573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b7919061239b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156109f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1891906123b8565b50925050508181036108385760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610ab357610ab36123ee565b04031115610af65760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b6e5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bf6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1a919061239b565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7b919061239b565b6001600160a01b031614610cca5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610cda57508115155b15610d1d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610d2681611725565b60008481526002602052604090205403610d83578051829003610d4f57600160a0820152610d6a565b60c08101516001600160a01b031615610d6a57600260a08201525b610d7381611725565b6000848152600260205260409020555b505050565b6000610db47f000000000000000000000000000000000000000000000000000000000000000042612404565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610e295760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b6001610e557f000000000000000000000000000000000000000000000000000000000000000042612404565b610e5f9190612375565b8214610ead5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b80610eca5760405162461bcd60e51b815260040161063390612337565b60008281526002602052604090205415610f1c5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610f6290611725565b60008381526002602090815260409182902092909255805184815291820183905233917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d5791016107bb565b60408510610fef5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b6000848484846040516020016110089493929190612426565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561108857600088888381811061104a5761104a612468565b9050602002013590508281111561106f5782600052806020526040600020925061107f565b8060005282602052604060002092505b5060010161102e565b5080600054146110cb5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156111405760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b03891690611170908990899061247e565b6000604051808303816000865af19150503d80600081146111ad576040519150601f19603f3d011682016040523d82523d6000602084013e6111b2565b606091505b50509050806112035760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61125f61037a368390038301836122e4565b6000838152600260205260409020541461128b5760405162461bcd60e51b815260040161063390612337565b600261129d60c0830160a0840161248e565b60028111156112ae576112ae612307565b146112ef5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061134993505060e0840191505060c083016124a9565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6113a661037a368390038301836122e4565b600083815260026020526040902054146113d25760405162461bcd60e51b815260040161063390612337565b60016113e460c0830160a0840161248e565b60028111156113f5576113f5612307565b146114325760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b600082815260026020526040812081905561145360e0830160c084016124a9565b6001600160a01b0316146114ae576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061134993505060408401915050602083016124a9565b6114be60408201602083016124a9565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61151281611725565b6000838152600260205260409020541461153e5760405162461bcd60e51b815260040161063390612337565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166115779190612388565b6115819190612388565b4210156115e55760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b60006115f082611f24565b9050600281600381111561160657611606612307565b14806116235750600081600381111561162157611621612307565b145b61168c5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526116a982611725565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b600061171f7f000000000000000000000000000000000000000000000000000000000000000083612404565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861175a9890979691016124c6565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117fb919061239b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611838573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185c91906123b8565b50925050506004548111156118a65760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015611968576006541561191a5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119be576119be6123ee565b04031115611a015760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b611a0a81611725565b60008381526002602052604090205414611a365760405162461bcd60e51b815260040161063390612337565b60c08101516001600160a01b031615611a885760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b6001611a9382611f24565b6003811115611aa457611aa4612307565b14611af15760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b600154821115611b3957600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b4981611725565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bb257611bb26123ee565b040311611bf35760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611bfc81611725565b60008381526002602052604090205414611c285760405162461bcd60e51b815260040161063390612337565b60008160a001516002811115611c4057611c40612307565b14611c7f5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611d035760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611d1782611725565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611dbe57611dbe6123ee565b040311611dff5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611e0881611725565b60008381526002602052604090205414611e345760405162461bcd60e51b815260040161063390612337565b60008160a001516002811115611e4c57611e4c612307565b14611e8b5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611f105760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611d1782611725565b6000816060015163ffffffff16600003611f4057506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f7c57506003919050565b6000600c836060015163ffffffff16420381611f9a57611f9a6123ee565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611fde5760019250611fe3565b600092505b50505b919050565b6001600160a01b038116811461196857600080fd5b8035611fe681611feb565b803563ffffffff81168114611fe657600080fd5b803560038110611fe657600080fd5b600060e0828403121561204057600080fd5b60405160e0810181811067ffffffffffffffff8211171561207157634e487b7160e01b600052604160045260246000fd5b6040528235815290508061208760208401612000565b60208201526120986040840161200b565b60408201526120a96060840161200b565b60608201526120ba6080840161200b565b60808201526120cb60a0840161201f565b60a08201526120dc60c08401612000565b60c08201525092915050565b60008061010083850312156120fc57600080fd5b8235915061210d846020850161202e565b90509250929050565b6000806000610120848603121561212c57600080fd5b8335925060208401359150612144856040860161202e565b90509250925092565b60006020828403121561215f57600080fd5b5035919050565b6000806040838503121561217957600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611fe657600080fd5b60008083601f8401126121b257600080fd5b50813567ffffffffffffffff8111156121ca57600080fd5b6020830191508360208285010111156121e257600080fd5b9250929050565b6000806000806000806080878903121561220257600080fd5b863567ffffffffffffffff8082111561221a57600080fd5b818901915089601f83011261222e57600080fd5b81358181111561223d57600080fd5b8a60208260051b850101111561225257600080fd5b6020830198508097505061226860208a01612188565b955061227660408a01612000565b9450606089013591508082111561228c57600080fd5b5061229989828a016121a0565b979a9699509497509295939492505050565b6000808284036101008112156122c057600080fd5b8335925060e0601f19820112156122d657600080fd5b506020830190509250929050565b600060e082840312156122f657600080fd5b612300838361202e565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061233157612331612307565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561171f5761171f61235f565b8082018082111561171f5761171f61235f565b6000602082840312156123ad57600080fd5b815161230081611feb565b600080600080608085870312156123ce57600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b60008261242157634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156124a057600080fd5b6123008261201f565b6000602082840312156124bb57600080fd5b813561230081611feb565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061251e5761251e612307565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212207649f9a69b696b8730d8471aecbf81907f8429893834f7171be4b946fa84812d64736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.", "events": { @@ -1053,10 +1040,11 @@ "_epoch": "The epoch associated with the challenged claim." } }, - "Claimed(address,bytes32)": { + "Claimed(address,uint256,bytes32)": { "details": "Watchers check this event to challenge fraud.", "params": { "_claimer": "The address of the claimer.", + "_epoch": "The epoch associated with the claim.", "_stateRoot": "The state root of the claim." } }, @@ -1121,7 +1109,6 @@ "params": { "_deposit": "The deposit amount to submit a claim in wei.", "_epochPeriod": "The duration of each epoch.", - "_maxClaimDelayEpochs": "The maximum number of epochs that can be claimed in the past.", "_maxMissingBlocks": "The maximum number of blocks that can be missing in a challenge period.", "_minChallengePeriod": "The minimum time window to challenge a claim.", "_timeoutEpochs": "The epochs before the bridge is considered shutdown.", @@ -1229,7 +1216,7 @@ "storageLayout": { "storage": [ { - "astId": 432, + "astId": 38, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "stateRoot", "offset": 0, @@ -1237,7 +1224,7 @@ "type": "t_bytes32" }, { - "astId": 434, + "astId": 40, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "latestVerifiedEpoch", "offset": 0, @@ -1245,7 +1232,7 @@ "type": "t_uint256" }, { - "astId": 438, + "astId": 44, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "claimHashes", "offset": 0, @@ -1253,7 +1240,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 442, + "astId": 48, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "relayed", "offset": 0, @@ -1261,7 +1248,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 444, + "astId": 50, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "sequencerDelayLimit", "offset": 0, @@ -1269,12 +1256,12 @@ "type": "t_uint256" }, { - "astId": 447, + "astId": 53, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "5", - "type": "t_struct(SequencerDelayLimitDecreaseRequest)452_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)58_storage" } ], "types": { @@ -1290,12 +1277,12 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_struct(SequencerDelayLimitDecreaseRequest)452_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)58_storage": { "encoding": "inplace", "label": "struct VeaOutboxArbToEth.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 449, + "astId": 55, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "requestedsequencerDelayLimit", "offset": 0, @@ -1303,7 +1290,7 @@ "type": "t_uint256" }, { - "astId": 451, + "astId": 57, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "timestamp", "offset": 0, diff --git a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol index 8a2f4d7d..a4068b99 100644 --- a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol +++ b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol @@ -33,7 +33,6 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots. uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer. - uint256 public immutable maxClaimDelayEpochs; // The maximum number of epochs that can be claimed in the past. uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown. uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period. @@ -64,8 +63,9 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { /// @dev Watchers check this event to challenge fraud. /// @param _claimer The address of the claimer. + /// @param _epoch The epoch associated with the claim. /// @param _stateRoot The state root of the claim. - event Claimed(address indexed _claimer, bytes32 _stateRoot); + event Claimed(address indexed _claimer, uint256 _epoch, bytes32 _stateRoot); /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox. /// @param _epoch The epoch associated with the challenged claim. @@ -118,7 +118,6 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { /// @param _timeoutEpochs The epochs before the bridge is considered shutdown. /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum. /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period. - /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past. constructor( uint256 _deposit, uint256 _epochPeriod, @@ -126,8 +125,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { uint256 _timeoutEpochs, address _veaInboxArbToEth, address _bridge, - uint256 _maxMissingBlocks, - uint256 _maxClaimDelayEpochs + uint256 _maxMissingBlocks ) { deposit = _deposit; // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value. @@ -137,7 +135,6 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { veaInboxArbToEth = _veaInboxArbToEth; bridge = IBridge(_bridge); maxMissingBlocks = _maxMissingBlocks; - maxClaimDelayEpochs = _maxClaimDelayEpochs; updateSequencerDelayLimit(); @@ -206,26 +203,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { /// @param _stateRoot The state root to claim. function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual { require(msg.value >= deposit, "Insufficient claim deposit."); - - require(_epoch < block.timestamp / epochPeriod, "Epoch has not yet passed."); - - // Allow claims to be made within the sequencerDelayLimit. - // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating. - // If the sequencerDelayLimit is set larger than block.timestamp - epochPeriod by arbitrum governance, - // the checked arithmetic will revert due to underflow and the bridge will shutdown. - uint256 minEpochSequencerDelay = (block.timestamp - sequencerDelayLimit) / epochPeriod - 1; - - uint256 minEpochClaim; - - unchecked { - // deployed sets maxClaimWindowEpochs so no underflow is possible - minEpochClaim = block.timestamp / epochPeriod - maxClaimDelayEpochs; - } - - uint256 minClaimableEpoch = minEpochSequencerDelay > minEpochClaim ? minEpochSequencerDelay : minEpochClaim; - - require(_epoch >= minClaimableEpoch, "Invalid epoch."); - + require(_epoch == block.timestamp / epochPeriod - 1, "Epoch has not yet passed."); require(_stateRoot != bytes32(0), "Invalid claim."); require(claimHashes[_epoch] == bytes32(0), "Claim already made."); @@ -241,7 +219,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { }) ); - emit Claimed(msg.sender, _stateRoot); + emit Claimed(msg.sender, _epoch, _stateRoot); // Refund overpayment. if (msg.value > deposit) { diff --git a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol index 89e310ff..1cf36ba2 100644 --- a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol @@ -34,7 +34,6 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots. uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer. - uint256 public immutable maxClaimDelayEpochs; // The maximum number of epochs that can be claimed in the past. uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown. uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period. @@ -60,8 +59,9 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { /// @dev Watchers check this event to challenge fraud. /// @param _claimer The address of the claimer. + /// @param _epoch The epoch associated with the claim. /// @param _stateRoot The state root of the claim. - event Claimed(address indexed _claimer, bytes32 _stateRoot); + event Claimed(address indexed _claimer, uint256 _epoch, bytes32 _stateRoot); /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox. /// @param _epoch The epoch associated with the challenged claim. @@ -114,7 +114,6 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period. /// @param _routerChainId The chain id of the routerArbToGnosis. /// @param _weth The address of the WETH contract on Gnosis. - /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past. constructor( uint256 _deposit, uint256 _epochPeriod, @@ -125,8 +124,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { uint256 _sequencerDelayLimit, uint256 _maxMissingBlocks, uint256 _routerChainId, - IWETH _weth, - uint256 _maxClaimDelayEpochs + IWETH _weth ) { deposit = _deposit; // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value. @@ -140,7 +138,6 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { maxMissingBlocks = _maxMissingBlocks; routerChainId = _routerChainId; weth = _weth; - maxClaimDelayEpochs = _maxClaimDelayEpochs; // claimant and challenger are not sybil resistant // must burn half deposit to prevent zero cost griefing @@ -180,25 +177,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { /// @param _stateRoot The state root to claim. function claim(uint256 _epoch, bytes32 _stateRoot) external virtual { require(weth.transferFrom(msg.sender, address(this), deposit), "Failed WETH transfer."); - - require(_epoch < block.timestamp / epochPeriod, "Epoch has not yet passed."); - - // Allow claims to be made within the sequencerDelayLimit. - // Adds an epochs margin to permit L2 node syncing time in worst case sequencer backdating. - // If the sequencerDelayLimit is set larger than block.timestamp - epochPeriod by arbitrum governance, - // the checked arithmetic will revert due to underflow and the bridge will shutdown. - uint256 minEpochSequencerDelay = (block.timestamp - sequencerDelayLimit) / epochPeriod - 1; - - uint256 minEpochClaim; - - unchecked { - // deployer sets maxClaimDelayEpochs so no underflow is possible - minEpochClaim = block.timestamp / epochPeriod - maxClaimDelayEpochs; - } - - uint256 minClaimableEpoch = minEpochSequencerDelay > minEpochClaim ? minEpochSequencerDelay : minEpochClaim; - - require(_epoch >= minClaimableEpoch, "Invalid epoch."); + require(_epoch == block.timestamp / epochPeriod - 1, "Epoch has not yet passed."); require(_stateRoot != bytes32(0), "Invalid claim."); require(claimHashes[_epoch] == bytes32(0), "Claim already made."); @@ -215,7 +194,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { }) ); - emit Claimed(msg.sender, _stateRoot); + emit Claimed(msg.sender, _epoch, _stateRoot); } /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'. diff --git a/contracts/src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol b/contracts/src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol index 87f1dfdd..cf6a323c 100644 --- a/contracts/src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol +++ b/contracts/src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol @@ -49,7 +49,7 @@ contract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth { }) ); - emit Claimed(msg.sender, _stateRoot); + emit Claimed(msg.sender, _epoch, _stateRoot); // Refund overpayment. if (msg.value > deposit) { @@ -136,7 +136,6 @@ contract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth { /// @param _timeoutEpochs The epochs before the bridge is considered shutdown. /// @param _veaInboxArbToEthDevnet The address of the inbox contract on Arbitrum. /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period. - /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past. constructor( uint256 _deposit, uint256 _epochPeriod, @@ -144,8 +143,7 @@ contract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth { uint256 _timeoutEpochs, address _veaInboxArbToEthDevnet, address _bridge, - uint256 _maxMissingBlocks, - uint256 _maxClaimDelayEpochs + uint256 _maxMissingBlocks ) VeaOutboxArbToEth( _deposit, @@ -154,8 +152,7 @@ contract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth { _timeoutEpochs, _veaInboxArbToEthDevnet, _bridge, - _maxMissingBlocks, - _maxClaimDelayEpochs + _maxMissingBlocks ) { devnetOperator = msg.sender; diff --git a/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol b/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol index f07ec1c4..eede28fc 100644 --- a/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol +++ b/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol @@ -34,7 +34,6 @@ contract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis { /// @param _stateRoot The state root to claim. function claim(uint256 _epoch, bytes32 _stateRoot) public override onlyByDevnetOperator { require(weth.transferFrom(msg.sender, address(this), deposit), "Failed WETH transfer."); - require(_stateRoot != bytes32(0), "Invalid claim."); require(claimHashes[_epoch] == bytes32(0), "Claim already made."); @@ -50,7 +49,7 @@ contract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis { }) ); - emit Claimed(msg.sender, _stateRoot); + emit Claimed(msg.sender, _epoch, _stateRoot); } /// @dev Start verification for claim for 'epoch'. @@ -136,7 +135,6 @@ contract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis { /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period. /// @param _routerChainId The chain id of the routerArbToGnosis. /// @param _weth The address of the WETH contract on Gnosis. - /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past. constructor( uint256 _deposit, uint256 _epochPeriod, @@ -147,8 +145,7 @@ contract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis { uint256 _sequencerDelayLimit, uint256 _maxMissingBlocks, uint256 _routerChainId, - IWETH _weth, - uint256 _maxClaimDelayEpochs + IWETH _weth ) VeaOutboxArbToGnosis( _deposit, @@ -160,8 +157,7 @@ contract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis { _sequencerDelayLimit, _maxMissingBlocks, _routerChainId, - _weth, - _maxClaimDelayEpochs + _weth ) { devnetOperator = msg.sender; diff --git a/contracts/src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol b/contracts/src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol index 503145f9..dea3a5d4 100644 --- a/contracts/src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol +++ b/contracts/src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol @@ -34,23 +34,6 @@ contract VeaOutboxGnosisToArbDevnet is VeaOutboxGnosisToArb { /// @param _stateRoot The state root to claim. function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator { require(msg.value >= deposit, "Insufficient claim deposit."); - - uint256 epochMaxClaimableCalculated = (block.timestamp + sequencerDelayLimit) / epochPeriod + 1; - uint256 epochMaxClaimableCap = block.timestamp / epochPeriod + maxClaimFutureEpochs; - uint256 epochMaxClaimable = epochMaxClaimableCalculated < epochMaxClaimableCap - ? epochMaxClaimableCalculated - : epochMaxClaimableCap; - - require(_epoch <= epochMaxClaimable, "Epoch is invalid."); - - uint256 epochMinClaimableCalculated = (block.timestamp - sequencerFutureLimit) / epochPeriod - 1; - uint256 epochMinClaimableCap = block.timestamp / epochPeriod - maxClaimDelayEpochs; - uint256 epochMinClaimable = epochMinClaimableCalculated > epochMinClaimableCap - ? epochMinClaimableCap - : epochMinClaimableCap; - - require(_epoch >= epochMinClaimable, "Epoch is invalid."); - require(_stateRoot != bytes32(0), "Invalid claim."); require(claims[_epoch].claimer == address(0), "Claim already made."); @@ -61,7 +44,7 @@ contract VeaOutboxGnosisToArbDevnet is VeaOutboxGnosisToArb { honest: Party.None }); - emit Claimed(msg.sender, _stateRoot); + emit Claimed(msg.sender, _epoch, _stateRoot); // Refund overpayment. if (msg.value > deposit) { @@ -126,8 +109,6 @@ contract VeaOutboxGnosisToArbDevnet is VeaOutboxGnosisToArb { /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum. /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions. /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions. - /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past. - /// @param _maxClaimFutureEpochs The maximum number of epochs that can be claimed in the future. constructor( uint256 _deposit, uint256 _epochPeriod, @@ -135,9 +116,7 @@ contract VeaOutboxGnosisToArbDevnet is VeaOutboxGnosisToArb { uint256 _timeoutEpochs, address _routerGnosisToArb, uint256 _sequencerDelayLimit, - uint256 _sequencerFutureLimit, - uint256 _maxClaimDelayEpochs, - uint256 _maxClaimFutureEpochs + uint256 _sequencerFutureLimit ) VeaOutboxGnosisToArb( _deposit, @@ -146,9 +125,7 @@ contract VeaOutboxGnosisToArbDevnet is VeaOutboxGnosisToArb { _timeoutEpochs, _routerGnosisToArb, _sequencerDelayLimit, - _sequencerFutureLimit, - _maxClaimDelayEpochs, - _maxClaimFutureEpochs + _sequencerFutureLimit ) { devnetOperator = msg.sender; diff --git a/contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol b/contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol index 6b3943ed..457043e1 100644 --- a/contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol +++ b/contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol @@ -29,8 +29,6 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots. uint256 public immutable challengePeriod; // Claim challenge timewindow. uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown. - uint256 public immutable maxClaimDelayEpochs; // The maximum number of epochs that can be claimed in the past. - uint256 public immutable maxClaimFutureEpochs; // The maximum number of epochs that can be claimed in the future. uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock. uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock. @@ -61,10 +59,11 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { // * Events * // // ************************************* // - /// @dev Watcher check this event to challenge fraud. + /// @dev Watchers check this event to challenge fraud. /// @param _claimer The address of the claimer. + /// @param _epoch The epoch associated with the claim. /// @param _stateRoot The state root of the claim. - event Claimed(address indexed _claimer, bytes32 _stateRoot); + event Claimed(address indexed _claimer, uint256 _epoch, bytes32 _stateRoot); /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox. /// @param _epoch The epoch associated with the challenged claim. @@ -110,8 +109,6 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum. /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions. /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions. - /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past. - /// @param _maxClaimFutureEpochs The maximum number of epochs that can be claimed in the future. constructor( uint256 _deposit, uint256 _epochPeriod, @@ -119,9 +116,7 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { uint256 _timeoutEpochs, address _routerGnosisToArb, uint256 _sequencerDelayLimit, - uint256 _sequencerFutureLimit, - uint256 _maxClaimDelayEpochs, - uint256 _maxClaimFutureEpochs + uint256 _sequencerFutureLimit ) { deposit = _deposit; epochPeriod = _epochPeriod; @@ -130,8 +125,6 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { routerGnosisToArb = _routerGnosisToArb; sequencerDelayLimit = _sequencerDelayLimit; sequencerFutureLimit = _sequencerFutureLimit; - maxClaimDelayEpochs = _maxClaimDelayEpochs; - maxClaimFutureEpochs = _maxClaimFutureEpochs; // claimant and challenger are not sybil resistant // must burn half deposit to prevent zero cost griefing @@ -192,22 +185,7 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { /// @param _stateRoot The state root to claim. function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual { require(msg.value >= deposit, "Insufficient claim deposit."); - - uint256 epochMaxClaimableCalculated = (block.timestamp + sequencerDelayLimit) / epochPeriod + 1; - uint256 epochMaxClaimableCap = block.timestamp / epochPeriod + maxClaimFutureEpochs; - uint256 epochMaxClaimable = epochMaxClaimableCalculated < epochMaxClaimableCap - ? epochMaxClaimableCalculated - : epochMaxClaimableCap; - - require(_epoch <= epochMaxClaimable, "Epoch is invalid."); - - uint256 epochMinClaimableCalculated = (block.timestamp - sequencerFutureLimit) / epochPeriod - 1; - uint256 epochMinClaimableCap = block.timestamp / epochPeriod - maxClaimDelayEpochs; - uint256 epochMinClaimable = epochMinClaimableCalculated > epochMinClaimableCap - ? epochMinClaimableCap - : epochMinClaimableCap; - - require(_epoch >= epochMinClaimable, "Epoch is invalid."); + require(_epoch == block.timestamp / epochPeriod - 1, "Epoch is invalid."); require(_stateRoot != bytes32(0), "Invalid claim."); require(claims[_epoch].claimer == address(0), "Claim already made."); @@ -219,7 +197,7 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { honest: Party.None }); - emit Claimed(msg.sender, _stateRoot); + emit Claimed(msg.sender, _epoch, _stateRoot); // Refund overpayment. if (msg.value > deposit) { diff --git a/contracts/src/test/ArbitrumToEth/VeaOutboxMockArbToEth.sol b/contracts/src/test/ArbitrumToEth/VeaOutboxMockArbToEth.sol index c5dd1c7c..98a67b4d 100644 --- a/contracts/src/test/ArbitrumToEth/VeaOutboxMockArbToEth.sol +++ b/contracts/src/test/ArbitrumToEth/VeaOutboxMockArbToEth.sol @@ -54,7 +54,6 @@ contract VeaOutboxMockArbToEth is VeaOutboxArbToEth { /// @param _timeoutEpochs The epochs before the bridge is considered shutdown. /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum. /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period. - /// @param _maxClaimDelayEpochs The maximum number of epochs that can be claimed in the past. constructor( IArbSys _arbSys, uint256 _deposit, @@ -63,8 +62,7 @@ contract VeaOutboxMockArbToEth is VeaOutboxArbToEth { uint256 _timeoutEpochs, address _veaInboxArbToEth, address _bridge, - uint256 _maxMissingBlocks, - uint256 _maxClaimDelayEpochs + uint256 _maxMissingBlocks ) VeaOutboxArbToEth( _deposit, @@ -73,8 +71,7 @@ contract VeaOutboxMockArbToEth is VeaOutboxArbToEth { _timeoutEpochs, _veaInboxArbToEth, _bridge, - _maxMissingBlocks, - _maxClaimDelayEpochs + _maxMissingBlocks ) { arbSys = _arbSys; From fc25164ac684455d4ae80589dd8458f6bdb95983 Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Fri, 30 Jun 2023 18:02:43 +0900 Subject: [PATCH 17/58] chore(contracts): event updates --- contracts/README.md | 32 ++-- .../VeaInboxArbToEthDevnet.json | 52 +++--- .../VeaInboxArbToEthTestnet.json | 52 +++--- .../VeaInboxArbToGnosisDevnet.json | 58 +++--- .../VeaInboxArbToGnosisTestnet.json | 58 +++--- .../VeaOutboxGnosisToArbDevnet.json | 175 ++++++++++++------ .../VeaOutboxGnosisToArbTestnet.json | 173 +++++++++++------ .../chiado/VeaInboxGnosisToArbDevnet.json | 129 +++++++++---- .../chiado/VeaInboxGnosisToArbTestnet.json | 127 +++++++++---- .../chiado/VeaOutboxArbToGnosisDevnet.json | 124 +++++++++---- .../chiado/VeaOutboxArbToGnosisTestnet.json | 120 ++++++++---- .../goerli/RouterArbToGnosisDevnet.json | 24 +-- .../goerli/RouterArbToGnosisTestnet.json | 22 +-- .../goerli/RouterGnosisToArbDevnet.json | 36 ++-- .../goerli/RouterGnosisToArbTestnet.json | 36 ++-- .../goerli/VeaOutboxArbToEthDevnet.json | 146 ++++++++++----- .../goerli/VeaOutboxArbToEthTestnet.json | 144 +++++++++----- .../src/arbitrumToEth/VeaInboxArbToEth.sol | 16 +- .../src/arbitrumToEth/VeaOutboxArbToEth.sol | 45 +++-- .../arbitrumToGnosis/VeaInboxArbToGnosis.sol | 8 +- .../arbitrumToGnosis/VeaOutboxArbToGnosis.sol | 38 +++- .../gnosisToArbitrum/VeaInboxGnosisToArb.sol | 45 ++++- .../gnosisToArbitrum/VeaOutboxGnosisToArb.sol | 57 ++++-- contracts/test/integration/ArbToEth.ts | 2 +- 24 files changed, 1125 insertions(+), 594 deletions(-) diff --git a/contracts/README.md b/contracts/README.md index e9109e61..d8c528e9 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -10,28 +10,28 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments #### Goerli -- [RouterArbToGnosisDevnet](https://goerli.etherscan.io/address/0xef62E517bE7e319458f41014C4d8864117381255) -- [RouterArbToGnosisTestnet](https://goerli.etherscan.io/address/0x7Ee8Ad48EfA4765257a49486421A4CF11389E480) -- [RouterGnosisToArbDevnet](https://goerli.etherscan.io/address/0x65b577dC22D3bdfcB20298ac07EF99D574275D04) -- [RouterGnosisToArbTestnet](https://goerli.etherscan.io/address/0x531754c9935A851173FA349b3bEadAF538c570aC) -- [VeaOutboxArbToEthDevnet](https://goerli.etherscan.io/address/0x4B1275adA5014d7A10375B87bb0cfaCAbC47d3dC) -- [VeaOutboxArbToEthTestnet](https://goerli.etherscan.io/address/0x356f5D0756ab15C819015960C355386d0367d545) +- [RouterArbToGnosisDevnet](https://goerli.etherscan.io/address/0xEC337Fb9977848D0784dC4F01A69c237691755E0) +- [RouterArbToGnosisTestnet](https://goerli.etherscan.io/address/0x1224E83DF410b43A65ed3e375a6442813B1aea14) +- [RouterGnosisToArbDevnet](https://goerli.etherscan.io/address/0xb7d2C76641B21718cC8A0b595be438c863A6e031) +- [RouterGnosisToArbTestnet](https://goerli.etherscan.io/address/0x84de475fed07406aA3B05248f1a7b0Fca11DA012) +- [VeaOutboxArbToEthDevnet](https://goerli.etherscan.io/address/0x3D9356FF595C2151513DFc520380d5A178224564) +- [VeaOutboxArbToEthTestnet](https://goerli.etherscan.io/address/0x4738A566706eDd30Fe175e20eDDd21c5c7bD79Ea) #### Arbitrum Goerli -- [VeaInboxArbToEthDevnet](https://goerli.arbiscan.io/address/0xe81afBecf7d0bB755fB9f1fb417b95Bf924534e6) -- [VeaInboxArbToEthTestnet](https://goerli.arbiscan.io/address/0xB00b74346d6cb2440F71cc3Fb19Cd2B50450571E) -- [VeaInboxArbToGnosisDevnet](https://goerli.arbiscan.io/address/0x7CE671804C3bC9096669F37cE6a7419BA66b7fD8) -- [VeaInboxArbToGnosisTestnet](https://goerli.arbiscan.io/address/0x5EC6917F803bF2C9E55D43D3B7DD1032a625A979) -- [VeaOutboxGnosisToArbDevnet](https://goerli.arbiscan.io/address/0x016170Ad327cE0dCa07b3bd7a7592013a7488FAc) -- [VeaOutboxGnosisToArbTestnet](https://goerli.arbiscan.io/address/0xF0492e87Be6d644A6a467fE20ee9EC5eFCB6cB23) +- [VeaInboxArbToEthDevnet](https://goerli.arbiscan.io/address/0x935feC4B0bc8f48884f7315153839859832f385b) +- [VeaInboxArbToEthTestnet](https://goerli.arbiscan.io/address/0x0c45C5A1925085fF0672C1052f0b79D5e3ac2A78) +- [VeaInboxArbToGnosisDevnet](https://goerli.arbiscan.io/address/0x8179EBCA5D2EA4152ac61A5BCA7a1dc68f8BbF54) +- [VeaInboxArbToGnosisTestnet](https://goerli.arbiscan.io/address/0xdc201e4Ab6a25A17C1731D8bB7E56f89D0B86486) +- [VeaOutboxGnosisToArbDevnet](https://goerli.arbiscan.io/address/0x8Da07C6D68F17d7BbC8B42D59Bc9EEE90e9dD621) +- [VeaOutboxGnosisToArbTestnet](https://goerli.arbiscan.io/address/0x62581B897330CA4044C4db79Ebe96ca230569492) #### Chiado -- [VeaInboxGnosisToArbDevnet](https://blockscout.com/gnosis/chiado/address/0xA3FefC6FeE3fc66B9d9a8BEE794736ab71a74c55) -- [VeaInboxGnosisToArbTestnet](https://blockscout.com/gnosis/chiado/address/0xfF2B7048d673767754B798df1702C786E2c59F1F) -- [VeaOutboxArbToGnosisDevnet](https://blockscout.com/gnosis/chiado/address/0x660daB9A6436A814a6ae3a6f27b309356a4bE78c) -- [VeaOutboxArbToGnosisTestnet](https://blockscout.com/gnosis/chiado/address/0x9cF5c011e2A4CB7797413f311A35AcB021071c35) +- [VeaInboxGnosisToArbDevnet](https://blockscout.com/gnosis/chiado/address/0x9F4407785DFf95c08Bf9a0d9d4A5a164C48eC5CB) +- [VeaInboxGnosisToArbTestnet](https://blockscout.com/gnosis/chiado/address/0x8Bf88E6474d93bD2Dc0d76CB3BE8809c6BB84148) +- [VeaOutboxArbToGnosisDevnet](https://blockscout.com/gnosis/chiado/address/0xb0263478A46d885D715B01fbac745500B9576634) +- [VeaOutboxArbToGnosisTestnet](https://blockscout.com/gnosis/chiado/address/0xE8ea62d3a4F06301016b9C23Ace108F3D8027839) ## Getting Started diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json index 6d7881cf..61b792bd 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xe81afBecf7d0bB755fB9f1fb417b95Bf924534e6", + "address": "0x935feC4B0bc8f48884f7315153839859832f385b", "abi": [ { "inputs": [ @@ -108,7 +108,7 @@ }, { "inputs": [], - "name": "epochNow", + "name": "epochFinalized", "outputs": [ { "internalType": "uint256", @@ -121,11 +121,11 @@ }, { "inputs": [], - "name": "epochPeriod", + "name": "epochNow", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "epoch", "type": "uint256" } ], @@ -133,21 +133,15 @@ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "epochPeriod", + "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], - "name": "inbox", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], "stateMutability": "view", "type": "function" }, @@ -275,31 +269,31 @@ "type": "function" } ], - "transactionHash": "0x32a811644383bb79c6376ce5dc560bce76ac0d9d64cd90fc102dd637998ef6c2", + "transactionHash": "0xd480192016b3f73fa279d733c0c98822a2acb8c239d20f50d3246b50861cd672", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xe81afBecf7d0bB755fB9f1fb417b95Bf924534e6", + "contractAddress": "0x935feC4B0bc8f48884f7315153839859832f385b", "transactionIndex": 1, - "gasUsed": "31070233", + "gasUsed": "683021", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xf70d23cce295b0b682d9dd0a170511ad9105d296464c9c898bdafc1ea9364e2d", - "transactionHash": "0x32a811644383bb79c6376ce5dc560bce76ac0d9d64cd90fc102dd637998ef6c2", + "blockHash": "0xb9ee28ffdff0bcf64b899173ba7d59ab7d9b93dd7a6c1045e807eaab28852bee", + "transactionHash": "0xd480192016b3f73fa279d733c0c98822a2acb8c239d20f50d3246b50861cd672", "logs": [], - "blockNumber": 28630803, - "cumulativeGasUsed": "31070233", + "blockNumber": 28847721, + "cumulativeGasUsed": "683021", "status": 1, "byzantium": true }, "args": [ 1800, - "0x4B1275adA5014d7A10375B87bb0cfaCAbC47d3dC" + "0x3D9356FF595C2151513DFc520380d5A178224564" ], - "numDeployments": 3, - "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0xf7aedd98f0149c6f63c4d59ad9fd5d6d2d16b75a42fe95d2064a157ff181007b\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161012001526105b401526000818161015f015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122091c8e50a4eb68a04b97bfd09e6eedc0e624aaef5954f963f1f6df55f1f0da9cf64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122091c8e50a4eb68a04b97bfd09e6eedc0e624aaef5954f963f1f6df55f1f0da9cf64736f6c63430008120033", + "numDeployments": 8, + "solcInputHash": "76a6a9e6371fade9c8f1066bebbf4e7c", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochFinalized\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochFinalized()\":{\"details\":\"Get the most recent epoch for which snapshots are finalized.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] internal inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the most recent epoch for which snapshots are finalized.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochFinalized() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x33b5ac67822e209e961ff08283894a63a21504b4f72513d0252b0549e2fa8823\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610c34380380610c3483398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b626100d26000396000818161012801526105e1015260008181610167015281816101c3015281816101f60152818161022c0152818161025c01526104ee0152610b626000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80635f85896c116100665780635f85896c14610110578063744b49bf14610123578063b5b7a18414610162578063c705e41214610189578063d6565a2d1461019c57600080fd5b806306661abd146100a3578063222ae786146100d55780633ac3b6b6146100eb5780634a439cfe146100f35780635192053514610106575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101bc565b6040519081526020016100cc565b6100dd6101ed565b6100dd6101013660046106bd565b610225565b61010e610257565b005b6100b761011e366004610762565b61037b565b61014a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010e61019736600461083b565b6104ec565b6100dd6101aa3660046106bd565b60006020819052908152604090205481565b60006101e87f000000000000000000000000000000000000000000000000000000000000000042610903565b905090565b6000600161021b7f000000000000000000000000000000000000000000000000000000000000000042610903565b6101e89190610925565b60006102517f000000000000000000000000000000000000000000000000000000000000000083610903565b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000004281610289576102896108ed565b604154919004925060009067ffffffffffffffff165b80156102d857806001166001036102cc57600182604081106102c3576102c3610946565b015492506102d8565b6001918201911c61029f565b60011c5b801561031a5760019182019181811690036103125761030f6001836040811061030757610307610946565b01548461068c565b92505b60011c6102dc565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103d25760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103ee90889033908990602001610980565b60408051601f198184030181529082905261040d9392916020016109b6565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610471576104596001836040811061030757610307610946565b92506001918201911c677fffffffffffffff16610438565b50816001826040811061048657610486610946565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104d9908490610a31565b60405180910390a1509095945050505050565b7f0000000000000000000000000000000000000000000000000000000000000000428161051b5761051b6108ed565b0482106105755760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084016103c9565b6000828152602081905260408082205490516105979185918590602401610a4b565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a9061060b907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ae7565b6020604051808303816000875af115801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e9190610b13565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6000818310156106aa57826000528160205260406000209050610251565b5060009081526020919091526040902090565b6000602082840312156106cf57600080fd5b5035919050565b80356001600160a01b03811681146106ed57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff8111828210171561072b5761072b6106f2565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561075a5761075a6106f2565b604052919050565b60008060006060848603121561077757600080fd5b610780846106d6565b92506020848101356001600160e01b03198116811461079e57600080fd5b9250604085013567ffffffffffffffff808211156107bb57600080fd5b818701915087601f8301126107cf57600080fd5b8135818111156107e1576107e16106f2565b6107f3601f8201601f19168501610731565b9150808252888482850101111561080957600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106ed57600080fd5b60008082840361010081121561085057600080fd5b8335925060e0601f198201121561086657600080fd5b5061086f610708565b60208401358152610882604085016106d6565b602082015261089360608501610827565b60408201526108a460808501610827565b60608201526108b560a08501610827565b608082015260c0840135600381106108cc57600080fd5b60a08201526108dd60e085016106d6565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261092057634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561025157634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561097757818101518382015260200161095f565b50506000910152565b63ffffffff60e01b84168152826004820152600082516109a781602485016020870161095c565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109f681601c85016020870161095c565b91909101601c01949350505050565b60008151808452610a1d81602086016020860161095c565b601f01601f19169290920160200192915050565b602081526000610a446020830184610a05565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610ac557634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610b0b90830184610a05565b949350505050565b600060208284031215610b2557600080fd5b505191905056fea2646970667358221220fcebfa85c5b6f37a90499aad0c9ea8735daf80b5be5a5b008c1bd00021e79e2564736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80635f85896c116100665780635f85896c14610110578063744b49bf14610123578063b5b7a18414610162578063c705e41214610189578063d6565a2d1461019c57600080fd5b806306661abd146100a3578063222ae786146100d55780633ac3b6b6146100eb5780634a439cfe146100f35780635192053514610106575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101bc565b6040519081526020016100cc565b6100dd6101ed565b6100dd6101013660046106bd565b610225565b61010e610257565b005b6100b761011e366004610762565b61037b565b61014a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010e61019736600461083b565b6104ec565b6100dd6101aa3660046106bd565b60006020819052908152604090205481565b60006101e87f000000000000000000000000000000000000000000000000000000000000000042610903565b905090565b6000600161021b7f000000000000000000000000000000000000000000000000000000000000000042610903565b6101e89190610925565b60006102517f000000000000000000000000000000000000000000000000000000000000000083610903565b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000004281610289576102896108ed565b604154919004925060009067ffffffffffffffff165b80156102d857806001166001036102cc57600182604081106102c3576102c3610946565b015492506102d8565b6001918201911c61029f565b60011c5b801561031a5760019182019181811690036103125761030f6001836040811061030757610307610946565b01548461068c565b92505b60011c6102dc565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103d25760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103ee90889033908990602001610980565b60408051601f198184030181529082905261040d9392916020016109b6565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610471576104596001836040811061030757610307610946565b92506001918201911c677fffffffffffffff16610438565b50816001826040811061048657610486610946565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104d9908490610a31565b60405180910390a1509095945050505050565b7f0000000000000000000000000000000000000000000000000000000000000000428161051b5761051b6108ed565b0482106105755760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084016103c9565b6000828152602081905260408082205490516105979185918590602401610a4b565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a9061060b907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ae7565b6020604051808303816000875af115801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e9190610b13565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6000818310156106aa57826000528160205260406000209050610251565b5060009081526020919091526040902090565b6000602082840312156106cf57600080fd5b5035919050565b80356001600160a01b03811681146106ed57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff8111828210171561072b5761072b6106f2565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561075a5761075a6106f2565b604052919050565b60008060006060848603121561077757600080fd5b610780846106d6565b92506020848101356001600160e01b03198116811461079e57600080fd5b9250604085013567ffffffffffffffff808211156107bb57600080fd5b818701915087601f8301126107cf57600080fd5b8135818111156107e1576107e16106f2565b6107f3601f8201601f19168501610731565b9150808252888482850101111561080957600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106ed57600080fd5b60008082840361010081121561085057600080fd5b8335925060e0601f198201121561086657600080fd5b5061086f610708565b60208401358152610882604085016106d6565b602082015261089360608501610827565b60408201526108a460808501610827565b60608201526108b560a08501610827565b608082015260c0840135600381106108cc57600080fd5b60a08201526108dd60e085016106d6565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261092057634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561025157634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561097757818101518382015260200161095f565b50506000910152565b63ffffffff60e01b84168152826004820152600082516109a781602485016020870161095c565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109f681601c85016020870161095c565b91909101601c01949350505050565b60008151808452610a1d81602086016020860161095c565b601f01601f19169290920160200192915050565b602081526000610a446020830184610a05565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610ac557634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610b0b90830184610a05565b949350505050565b600060208284031215610b2557600080fd5b505191905056fea2646970667358221220fcebfa85c5b6f37a90499aad0c9ea8735daf80b5be5a5b008c1bd00021e79e2564736f6c63430008120033", "devdoc": { "details": "Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.", "events": { @@ -342,6 +336,12 @@ "epoch": "The calculated epoch." } }, + "epochFinalized()": { + "details": "Get the most recent epoch for which snapshots are finalized.", + "returns": { + "epoch": "The epoch associated with the current inbox block.timestamp" + } + }, "epochNow()": { "details": "Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.", "returns": { diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json index 5c8a8dc1..a7d9bbe0 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json @@ -1,5 +1,5 @@ { - "address": "0xB00b74346d6cb2440F71cc3Fb19Cd2B50450571E", + "address": "0x0c45C5A1925085fF0672C1052f0b79D5e3ac2A78", "abi": [ { "inputs": [ @@ -108,7 +108,7 @@ }, { "inputs": [], - "name": "epochNow", + "name": "epochFinalized", "outputs": [ { "internalType": "uint256", @@ -121,11 +121,11 @@ }, { "inputs": [], - "name": "epochPeriod", + "name": "epochNow", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "epoch", "type": "uint256" } ], @@ -133,21 +133,15 @@ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "epochPeriod", + "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], - "name": "inbox", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], "stateMutability": "view", "type": "function" }, @@ -275,31 +269,31 @@ "type": "function" } ], - "transactionHash": "0x9bacdcce3493b9d05b235d2299f93506b9f3ffc5539039f7c35903f7301a8318", + "transactionHash": "0xd8c08f7fe9f57228f4f408bb9c3f572edd2663c80b4e320a3da5fe89d7492c7a", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xB00b74346d6cb2440F71cc3Fb19Cd2B50450571E", + "contractAddress": "0x0c45C5A1925085fF0672C1052f0b79D5e3ac2A78", "transactionIndex": 1, - "gasUsed": "31029117", + "gasUsed": "683021", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc3ae08cec20fc1be913dcb607282b5db04a6465a7e7a8de9b7e8980e70e350a1", - "transactionHash": "0x9bacdcce3493b9d05b235d2299f93506b9f3ffc5539039f7c35903f7301a8318", + "blockHash": "0xce4a8f4a784e3bb9f8de744d040981ecc401f6ea8d51383f74039eb083abf168", + "transactionHash": "0xd8c08f7fe9f57228f4f408bb9c3f572edd2663c80b4e320a3da5fe89d7492c7a", "logs": [], - "blockNumber": 28630984, - "cumulativeGasUsed": "31029117", + "blockNumber": 28848440, + "cumulativeGasUsed": "683021", "status": 1, "byzantium": true }, "args": [ 7200, - "0x356f5D0756ab15C819015960C355386d0367d545" + "0x4738A566706eDd30Fe175e20eDDd21c5c7bD79Ea" ], - "numDeployments": 3, - "solcInputHash": "7298e2ccdbe09809d528e3141326e32b", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys, used for L2->L1 messaging.\\n // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0xf7aedd98f0149c6f63c4d59ad9fd5d6d2d16b75a42fe95d2064a157ff181007b\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b50604051610bf6380380610bf683398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b2b6100cb6000396000818161012001526105b401526000818161015f015281816101ce015281816101ff0152818161022f01526104c10152610b2b6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122091c8e50a4eb68a04b97bfd09e6eedc0e624aaef5954f963f1f6df55f1f0da9cf64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063744b49bf11610066578063744b49bf1461011b578063b5b7a1841461015a578063c705e41214610181578063d6565a2d14610194578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106a7565b6101f8565b61010661022a565b005b6100b761011636600461074c565b61034e565b6101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010661018f366004610825565b6104bf565b6100dd6101a23660046106a7565b60006020819052908152604090205481565b6100dd6101c23660046106a7565b61065f565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108ed565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108ed565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108d7565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661090f565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61090f565b015484610676565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610949565b60408051601f19818403018152908290526103e093929160200161097f565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61090f565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961090f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac9084906109fa565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108d7565b0482106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008281526020819052604080822054905161056a9185918590602401610a14565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a906105de907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ab0565b6020604051808303816000875af11580156105fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190610adc565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6001816040811061066f57600080fd5b0154905081565b60008183101561069457826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106b957600080fd5b5035919050565b80356001600160a01b03811681146106d757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610715576107156106dc565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610744576107446106dc565b604052919050565b60008060006060848603121561076157600080fd5b61076a846106c0565b92506020848101356001600160e01b03198116811461078857600080fd5b9250604085013567ffffffffffffffff808211156107a557600080fd5b818701915087601f8301126107b957600080fd5b8135818111156107cb576107cb6106dc565b6107dd601f8201601f1916850161071b565b915080825288848285010111156107f357600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106d757600080fd5b60008082840361010081121561083a57600080fd5b8335925060e0601f198201121561085057600080fd5b506108596106f2565b6020840135815261086c604085016106c0565b602082015261087d60608501610811565b604082015261088e60808501610811565b606082015261089f60a08501610811565b608082015260c0840135600381106108b657600080fd5b60a08201526108c760e085016106c0565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261090a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b83811015610940578181015183820152602001610928565b50506000910152565b63ffffffff60e01b8416815282600482015260008251610970816024850160208701610925565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bf81601c850160208701610925565b91909101601c01949350505050565b600081518084526109e6816020860160208601610925565b601f01601f19169290920160200192915050565b602081526000610a0d60208301846109ce565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610a8e57634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610ad4908301846109ce565b949350505050565b600060208284031215610aee57600080fd5b505191905056fea264697066735822122091c8e50a4eb68a04b97bfd09e6eedc0e624aaef5954f963f1f6df55f1f0da9cf64736f6c63430008120033", + "numDeployments": 6, + "solcInputHash": "76a6a9e6371fade9c8f1066bebbf4e7c", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochFinalized\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochFinalized()\":{\"details\":\"Get the most recent epoch for which snapshots are finalized.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] internal inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the most recent epoch for which snapshots are finalized.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochFinalized() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x33b5ac67822e209e961ff08283894a63a21504b4f72513d0252b0549e2fa8823\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610c34380380610c3483398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b626100d26000396000818161012801526105e1015260008181610167015281816101c3015281816101f60152818161022c0152818161025c01526104ee0152610b626000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80635f85896c116100665780635f85896c14610110578063744b49bf14610123578063b5b7a18414610162578063c705e41214610189578063d6565a2d1461019c57600080fd5b806306661abd146100a3578063222ae786146100d55780633ac3b6b6146100eb5780634a439cfe146100f35780635192053514610106575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101bc565b6040519081526020016100cc565b6100dd6101ed565b6100dd6101013660046106bd565b610225565b61010e610257565b005b6100b761011e366004610762565b61037b565b61014a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010e61019736600461083b565b6104ec565b6100dd6101aa3660046106bd565b60006020819052908152604090205481565b60006101e87f000000000000000000000000000000000000000000000000000000000000000042610903565b905090565b6000600161021b7f000000000000000000000000000000000000000000000000000000000000000042610903565b6101e89190610925565b60006102517f000000000000000000000000000000000000000000000000000000000000000083610903565b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000004281610289576102896108ed565b604154919004925060009067ffffffffffffffff165b80156102d857806001166001036102cc57600182604081106102c3576102c3610946565b015492506102d8565b6001918201911c61029f565b60011c5b801561031a5760019182019181811690036103125761030f6001836040811061030757610307610946565b01548461068c565b92505b60011c6102dc565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103d25760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103ee90889033908990602001610980565b60408051601f198184030181529082905261040d9392916020016109b6565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610471576104596001836040811061030757610307610946565b92506001918201911c677fffffffffffffff16610438565b50816001826040811061048657610486610946565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104d9908490610a31565b60405180910390a1509095945050505050565b7f0000000000000000000000000000000000000000000000000000000000000000428161051b5761051b6108ed565b0482106105755760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084016103c9565b6000828152602081905260408082205490516105979185918590602401610a4b565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a9061060b907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ae7565b6020604051808303816000875af115801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e9190610b13565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6000818310156106aa57826000528160205260406000209050610251565b5060009081526020919091526040902090565b6000602082840312156106cf57600080fd5b5035919050565b80356001600160a01b03811681146106ed57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff8111828210171561072b5761072b6106f2565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561075a5761075a6106f2565b604052919050565b60008060006060848603121561077757600080fd5b610780846106d6565b92506020848101356001600160e01b03198116811461079e57600080fd5b9250604085013567ffffffffffffffff808211156107bb57600080fd5b818701915087601f8301126107cf57600080fd5b8135818111156107e1576107e16106f2565b6107f3601f8201601f19168501610731565b9150808252888482850101111561080957600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106ed57600080fd5b60008082840361010081121561085057600080fd5b8335925060e0601f198201121561086657600080fd5b5061086f610708565b60208401358152610882604085016106d6565b602082015261089360608501610827565b60408201526108a460808501610827565b60608201526108b560a08501610827565b608082015260c0840135600381106108cc57600080fd5b60a08201526108dd60e085016106d6565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261092057634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561025157634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561097757818101518382015260200161095f565b50506000910152565b63ffffffff60e01b84168152826004820152600082516109a781602485016020870161095c565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109f681601c85016020870161095c565b91909101601c01949350505050565b60008151808452610a1d81602086016020860161095c565b601f01601f19169290920160200192915050565b602081526000610a446020830184610a05565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610ac557634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610b0b90830184610a05565b949350505050565b600060208284031215610b2557600080fd5b505191905056fea2646970667358221220fcebfa85c5b6f37a90499aad0c9ea8735daf80b5be5a5b008c1bd00021e79e2564736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80635f85896c116100665780635f85896c14610110578063744b49bf14610123578063b5b7a18414610162578063c705e41214610189578063d6565a2d1461019c57600080fd5b806306661abd146100a3578063222ae786146100d55780633ac3b6b6146100eb5780634a439cfe146100f35780635192053514610106575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101bc565b6040519081526020016100cc565b6100dd6101ed565b6100dd6101013660046106bd565b610225565b61010e610257565b005b6100b761011e366004610762565b61037b565b61014a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010e61019736600461083b565b6104ec565b6100dd6101aa3660046106bd565b60006020819052908152604090205481565b60006101e87f000000000000000000000000000000000000000000000000000000000000000042610903565b905090565b6000600161021b7f000000000000000000000000000000000000000000000000000000000000000042610903565b6101e89190610925565b60006102517f000000000000000000000000000000000000000000000000000000000000000083610903565b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000004281610289576102896108ed565b604154919004925060009067ffffffffffffffff165b80156102d857806001166001036102cc57600182604081106102c3576102c3610946565b015492506102d8565b6001918201911c61029f565b60011c5b801561031a5760019182019181811690036103125761030f6001836040811061030757610307610946565b01548461068c565b92505b60011c6102dc565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103d25760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103ee90889033908990602001610980565b60408051601f198184030181529082905261040d9392916020016109b6565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610471576104596001836040811061030757610307610946565b92506001918201911c677fffffffffffffff16610438565b50816001826040811061048657610486610946565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104d9908490610a31565b60405180910390a1509095945050505050565b7f0000000000000000000000000000000000000000000000000000000000000000428161051b5761051b6108ed565b0482106105755760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084016103c9565b6000828152602081905260408082205490516105979185918590602401610a4b565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a9061060b907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ae7565b6020604051808303816000875af115801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e9190610b13565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6000818310156106aa57826000528160205260406000209050610251565b5060009081526020919091526040902090565b6000602082840312156106cf57600080fd5b5035919050565b80356001600160a01b03811681146106ed57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff8111828210171561072b5761072b6106f2565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561075a5761075a6106f2565b604052919050565b60008060006060848603121561077757600080fd5b610780846106d6565b92506020848101356001600160e01b03198116811461079e57600080fd5b9250604085013567ffffffffffffffff808211156107bb57600080fd5b818701915087601f8301126107cf57600080fd5b8135818111156107e1576107e16106f2565b6107f3601f8201601f19168501610731565b9150808252888482850101111561080957600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106ed57600080fd5b60008082840361010081121561085057600080fd5b8335925060e0601f198201121561086657600080fd5b5061086f610708565b60208401358152610882604085016106d6565b602082015261089360608501610827565b60408201526108a460808501610827565b60608201526108b560a08501610827565b608082015260c0840135600381106108cc57600080fd5b60a08201526108dd60e085016106d6565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261092057634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561025157634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561097757818101518382015260200161095f565b50506000910152565b63ffffffff60e01b84168152826004820152600082516109a781602485016020870161095c565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109f681601c85016020870161095c565b91909101601c01949350505050565b60008151808452610a1d81602086016020860161095c565b601f01601f19169290920160200192915050565b602081526000610a446020830184610a05565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610ac557634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610b0b90830184610a05565b949350505050565b600060208284031215610b2557600080fd5b505191905056fea2646970667358221220fcebfa85c5b6f37a90499aad0c9ea8735daf80b5be5a5b008c1bd00021e79e2564736f6c63430008120033", "devdoc": { "details": "Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.", "events": { @@ -342,6 +336,12 @@ "epoch": "The calculated epoch." } }, + "epochFinalized()": { + "details": "Get the most recent epoch for which snapshots are finalized.", + "returns": { + "epoch": "The epoch associated with the current inbox block.timestamp" + } + }, "epochNow()": { "details": "Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.", "returns": { diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json index c5f83e28..2f375681 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x7CE671804C3bC9096669F37cE6a7419BA66b7fD8", + "address": "0x8179EBCA5D2EA4152ac61A5BCA7a1dc68f8BbF54", "abi": [ { "inputs": [ @@ -108,7 +108,7 @@ }, { "inputs": [], - "name": "epochNow", + "name": "epochFinalized", "outputs": [ { "internalType": "uint256", @@ -121,11 +121,11 @@ }, { "inputs": [], - "name": "epochPeriod", + "name": "epochNow", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "epoch", "type": "uint256" } ], @@ -133,21 +133,15 @@ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "epochPeriod", + "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], - "name": "inbox", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], "stateMutability": "view", "type": "function" }, @@ -280,31 +274,31 @@ "type": "function" } ], - "transactionHash": "0xc3465ec89f6add1cdbf68540f013623fb6482351df314bb504ff91f0cbd4e716", + "transactionHash": "0x98668e11b7bea5f2c3afc2354764cf0d3b9c7e0165306979539ae35110f88c3f", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x7CE671804C3bC9096669F37cE6a7419BA66b7fD8", + "contractAddress": "0x8179EBCA5D2EA4152ac61A5BCA7a1dc68f8BbF54", "transactionIndex": 1, - "gasUsed": "31417395", + "gasUsed": "687557", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7ca7dde41075b3f1e8c06154ce939874c76e51501dcafb2dc99383c0601e41a6", - "transactionHash": "0xc3465ec89f6add1cdbf68540f013623fb6482351df314bb504ff91f0cbd4e716", + "blockHash": "0x5ea2da8389755d0d35e805e7316c2526a8557c3a4464eda8d3ea0c2e4dc4c542", + "transactionHash": "0x98668e11b7bea5f2c3afc2354764cf0d3b9c7e0165306979539ae35110f88c3f", "logs": [], - "blockNumber": 28630816, - "cumulativeGasUsed": "31417395", + "blockNumber": 28847798, + "cumulativeGasUsed": "687557", "status": 1, "byzantium": true }, "args": [ 1800, - "0x660daB9A6436A814a6ae3a6f27b309356a4bE78c" + "0xb0263478A46d885D715B01fbac745500B9576634" ], - "numDeployments": 3, - "solcInputHash": "916b5e2210e8e15d34b48798389f67fe", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_gasLimit\":\"The gas limit for the AMB transaction on Gnosis.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _gasLimit The gas limit for the AMB transaction on Gnosis.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, uint256 _gasLimit, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToGnosis.route, (_epoch, snapshots[_epoch], _gasLimit, _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x48be8f225bcfe2373ec8328de18f9c291363bcd3c634b6445f49b788a7f3d59d\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, uint256 _gasLimit, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x084735de7ee128aa169f11f18a4a7de6656309e941b8df502e66b24a4bf93d0f\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b50604051610c0b380380610c0b83398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b406100cb6000396000818161014701526105b6015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b406000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063d5e6a9df14610142578063d6565a2d14610181578063dc881a72146101a1578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106aa565b6101f8565b61010661022a565b005b6100b761011636600461074f565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101697f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd61018f3660046106aa565b60006020819052908152604090205481565b6101066101af366004610828565b6104bf565b6100dd6101c23660046106aa565b610662565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108fa565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108fa565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108e4565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661091c565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61091c565b015484610679565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610956565b60408051601f19818403018152908290526103e093929160200161098c565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61091c565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961091c565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac908490610a07565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108e4565b0483106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008381526020819052604080822054905161056c91869186908690602401610a21565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a906105e0907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ac5565b6020604051808303816000875af11580156105ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106239190610af1565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6001816040811061067257600080fd5b0154905081565b60008183101561069757826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106bc57600080fd5b5035919050565b80356001600160a01b03811681146106da57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610718576107186106df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610747576107476106df565b604052919050565b60008060006060848603121561076457600080fd5b61076d846106c3565b92506020848101356001600160e01b03198116811461078b57600080fd5b9250604085013567ffffffffffffffff808211156107a857600080fd5b818701915087601f8301126107bc57600080fd5b8135818111156107ce576107ce6106df565b6107e0601f8201601f1916850161071e565b915080825288848285010111156107f657600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106da57600080fd5b600080600083850361012081121561083f57600080fd5b843593506020850135925060e0603f198201121561085c57600080fd5b506108656106f5565b60408501358152610878606086016106c3565b602082015261088960808601610814565b604082015261089a60a08601610814565b60608201526108ab60c08601610814565b608082015260e0850135600381106108c257600080fd5b60a08201526108d461010086016106c3565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261091757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b8381101561094d578181015183820152602001610935565b50506000910152565b63ffffffff60e01b841681528260048201526000825161097d816024850160208701610932565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109cc81601c850160208701610932565b91909101601c01949350505050565b600081518084526109f3816020860160208601610932565b601f01601f19169290920160200192915050565b602081526000610a1a60208301846109db565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610aa157634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610ae9908301846109db565b949350505050565b600060208284031215610b0357600080fd5b505191905056fea264697066735822122056dc6373469376ec427dddca0175325c8115fdc5486bdac95939d5af09683ddf64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063d5e6a9df14610142578063d6565a2d14610181578063dc881a72146101a1578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106aa565b6101f8565b61010661022a565b005b6100b761011636600461074f565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101697f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd61018f3660046106aa565b60006020819052908152604090205481565b6101066101af366004610828565b6104bf565b6100dd6101c23660046106aa565b610662565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108fa565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108fa565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108e4565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661091c565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61091c565b015484610679565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610956565b60408051601f19818403018152908290526103e093929160200161098c565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61091c565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961091c565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac908490610a07565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108e4565b0483106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008381526020819052604080822054905161056c91869186908690602401610a21565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a906105e0907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ac5565b6020604051808303816000875af11580156105ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106239190610af1565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6001816040811061067257600080fd5b0154905081565b60008183101561069757826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106bc57600080fd5b5035919050565b80356001600160a01b03811681146106da57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610718576107186106df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610747576107476106df565b604052919050565b60008060006060848603121561076457600080fd5b61076d846106c3565b92506020848101356001600160e01b03198116811461078b57600080fd5b9250604085013567ffffffffffffffff808211156107a857600080fd5b818701915087601f8301126107bc57600080fd5b8135818111156107ce576107ce6106df565b6107e0601f8201601f1916850161071e565b915080825288848285010111156107f657600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106da57600080fd5b600080600083850361012081121561083f57600080fd5b843593506020850135925060e0603f198201121561085c57600080fd5b506108656106f5565b60408501358152610878606086016106c3565b602082015261088960808601610814565b604082015261089a60a08601610814565b60608201526108ab60c08601610814565b608082015260e0850135600381106108c257600080fd5b60a08201526108d461010086016106c3565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261091757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b8381101561094d578181015183820152602001610935565b50506000910152565b63ffffffff60e01b841681528260048201526000825161097d816024850160208701610932565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109cc81601c850160208701610932565b91909101601c01949350505050565b600081518084526109f3816020860160208601610932565b601f01601f19169290920160200192915050565b602081526000610a1a60208301846109db565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610aa157634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610ae9908301846109db565b949350505050565b600060208284031215610b0357600080fd5b505191905056fea264697066735822122056dc6373469376ec427dddca0175325c8115fdc5486bdac95939d5af09683ddf64736f6c63430008120033", + "numDeployments": 8, + "solcInputHash": "76a6a9e6371fade9c8f1066bebbf4e7c", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochFinalized\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochFinalized()\":{\"details\":\"Get the most recent epoch for which snapshots are finalized.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_gasLimit\":\"The gas limit for the AMB transaction on Gnosis.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] internal inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _gasLimit The gas limit for the AMB transaction on Gnosis.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, uint256 _gasLimit, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToGnosis.route, (_epoch, snapshots[_epoch], _gasLimit, _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the most recent epoch for which snapshots are finalized.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochFinalized() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x30dad453fea95d78d7215ce3de9f423d975b394ab022f8f411e17a2ce736fc8d\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, uint256 _gasLimit, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x084735de7ee128aa169f11f18a4a7de6656309e941b8df502e66b24a4bf93d0f\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610c49380380610c4983398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b776100d26000396000818161014f01526105e3015260008181610128015281816101c3015281816101f60152818161022c0152818161025c01526104ee0152610b776000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80635f85896c116100665780635f85896c14610110578063b5b7a18414610123578063d5e6a9df1461014a578063d6565a2d14610189578063dc881a72146101a957600080fd5b806306661abd146100a3578063222ae786146100d55780633ac3b6b6146100eb5780634a439cfe146100f35780635192053514610106575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101bc565b6040519081526020016100cc565b6100dd6101ed565b6100dd6101013660046106c0565b610225565b61010e610257565b005b6100b761011e366004610765565b61037b565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101717f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101973660046106c0565b60006020819052908152604090205481565b61010e6101b736600461083e565b6104ec565b60006101e87f000000000000000000000000000000000000000000000000000000000000000042610910565b905090565b6000600161021b7f000000000000000000000000000000000000000000000000000000000000000042610910565b6101e89190610932565b60006102517f000000000000000000000000000000000000000000000000000000000000000083610910565b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000004281610289576102896108fa565b604154919004925060009067ffffffffffffffff165b80156102d857806001166001036102cc57600182604081106102c3576102c3610953565b015492506102d8565b6001918201911c61029f565b60011c5b801561031a5760019182019181811690036103125761030f6001836040811061030757610307610953565b01548461068f565b92505b60011c6102dc565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103d25760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103ee9088903390899060200161098d565b60408051601f198184030181529082905261040d9392916020016109c3565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610471576104596001836040811061030757610307610953565b92506001918201911c677fffffffffffffff16610438565b50816001826040811061048657610486610953565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104d9908490610a3e565b60405180910390a1509095945050505050565b7f0000000000000000000000000000000000000000000000000000000000000000428161051b5761051b6108fa565b0483106105755760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084016103c9565b60008381526020819052604080822054905161059991869186908690602401610a58565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a9061060d907f0000000000000000000000000000000000000000000000000000000000000000908690600401610afc565b6020604051808303816000875af115801561062c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106509190610b28565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6000818310156106ad57826000528160205260406000209050610251565b5060009081526020919091526040902090565b6000602082840312156106d257600080fd5b5035919050565b80356001600160a01b03811681146106f057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff8111828210171561072e5761072e6106f5565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561075d5761075d6106f5565b604052919050565b60008060006060848603121561077a57600080fd5b610783846106d9565b92506020848101356001600160e01b0319811681146107a157600080fd5b9250604085013567ffffffffffffffff808211156107be57600080fd5b818701915087601f8301126107d257600080fd5b8135818111156107e4576107e46106f5565b6107f6601f8201601f19168501610734565b9150808252888482850101111561080c57600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106f057600080fd5b600080600083850361012081121561085557600080fd5b843593506020850135925060e0603f198201121561087257600080fd5b5061087b61070b565b6040850135815261088e606086016106d9565b602082015261089f6080860161082a565b60408201526108b060a0860161082a565b60608201526108c160c0860161082a565b608082015260e0850135600381106108d857600080fd5b60a08201526108ea61010086016106d9565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261092d57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561025157634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561098457818101518382015260200161096c565b50506000910152565b63ffffffff60e01b84168152826004820152600082516109b4816024850160208701610969565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b16600882015260008251610a0381601c850160208701610969565b91909101601c01949350505050565b60008151808452610a2a816020860160208601610969565b601f01601f19169290920160200192915050565b602081526000610a516020830184610a12565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610ad857634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610b2090830184610a12565b949350505050565b600060208284031215610b3a57600080fd5b505191905056fea2646970667358221220e946b1562a2911d87273f6fe8d8a97409f3946f0bbe45ecb965c7172a235bce764736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80635f85896c116100665780635f85896c14610110578063b5b7a18414610123578063d5e6a9df1461014a578063d6565a2d14610189578063dc881a72146101a957600080fd5b806306661abd146100a3578063222ae786146100d55780633ac3b6b6146100eb5780634a439cfe146100f35780635192053514610106575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101bc565b6040519081526020016100cc565b6100dd6101ed565b6100dd6101013660046106c0565b610225565b61010e610257565b005b6100b761011e366004610765565b61037b565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101717f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101973660046106c0565b60006020819052908152604090205481565b61010e6101b736600461083e565b6104ec565b60006101e87f000000000000000000000000000000000000000000000000000000000000000042610910565b905090565b6000600161021b7f000000000000000000000000000000000000000000000000000000000000000042610910565b6101e89190610932565b60006102517f000000000000000000000000000000000000000000000000000000000000000083610910565b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000004281610289576102896108fa565b604154919004925060009067ffffffffffffffff165b80156102d857806001166001036102cc57600182604081106102c3576102c3610953565b015492506102d8565b6001918201911c61029f565b60011c5b801561031a5760019182019181811690036103125761030f6001836040811061030757610307610953565b01548461068f565b92505b60011c6102dc565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103d25760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103ee9088903390899060200161098d565b60408051601f198184030181529082905261040d9392916020016109c3565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610471576104596001836040811061030757610307610953565b92506001918201911c677fffffffffffffff16610438565b50816001826040811061048657610486610953565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104d9908490610a3e565b60405180910390a1509095945050505050565b7f0000000000000000000000000000000000000000000000000000000000000000428161051b5761051b6108fa565b0483106105755760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084016103c9565b60008381526020819052604080822054905161059991869186908690602401610a58565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a9061060d907f0000000000000000000000000000000000000000000000000000000000000000908690600401610afc565b6020604051808303816000875af115801561062c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106509190610b28565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6000818310156106ad57826000528160205260406000209050610251565b5060009081526020919091526040902090565b6000602082840312156106d257600080fd5b5035919050565b80356001600160a01b03811681146106f057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff8111828210171561072e5761072e6106f5565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561075d5761075d6106f5565b604052919050565b60008060006060848603121561077a57600080fd5b610783846106d9565b92506020848101356001600160e01b0319811681146107a157600080fd5b9250604085013567ffffffffffffffff808211156107be57600080fd5b818701915087601f8301126107d257600080fd5b8135818111156107e4576107e46106f5565b6107f6601f8201601f19168501610734565b9150808252888482850101111561080c57600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106f057600080fd5b600080600083850361012081121561085557600080fd5b843593506020850135925060e0603f198201121561087257600080fd5b5061087b61070b565b6040850135815261088e606086016106d9565b602082015261089f6080860161082a565b60408201526108b060a0860161082a565b60608201526108c160c0860161082a565b608082015260e0850135600381106108d857600080fd5b60a08201526108ea61010086016106d9565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261092d57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561025157634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561098457818101518382015260200161096c565b50506000910152565b63ffffffff60e01b84168152826004820152600082516109b4816024850160208701610969565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b16600882015260008251610a0381601c850160208701610969565b91909101601c01949350505050565b60008151808452610a2a816020860160208601610969565b601f01601f19169290920160200192915050565b602081526000610a516020830184610a12565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610ad857634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610b2090830184610a12565b949350505050565b600060208284031215610b3a57600080fd5b505191905056fea2646970667358221220e946b1562a2911d87273f6fe8d8a97409f3946f0bbe45ecb965c7172a235bce764736f6c63430008120033", "devdoc": { "details": "Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.", "events": { @@ -347,6 +341,12 @@ "epoch": "The calculated epoch." } }, + "epochFinalized()": { + "details": "Get the most recent epoch for which snapshots are finalized.", + "returns": { + "epoch": "The epoch associated with the current inbox block.timestamp" + } + }, "epochNow()": { "details": "Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.", "returns": { @@ -391,7 +391,7 @@ "storageLayout": { "storage": [ { - "astId": 1789, + "astId": 432, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "snapshots", "offset": 0, @@ -399,7 +399,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 1793, + "astId": 436, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "inbox", "offset": 0, @@ -407,7 +407,7 @@ "type": "t_array(t_bytes32)64_storage" }, { - "astId": 1795, + "astId": 438, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "count", "offset": 0, diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json index 63ea14aa..d6005ec1 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x5EC6917F803bF2C9E55D43D3B7DD1032a625A979", + "address": "0xdc201e4Ab6a25A17C1731D8bB7E56f89D0B86486", "abi": [ { "inputs": [ @@ -108,7 +108,7 @@ }, { "inputs": [], - "name": "epochNow", + "name": "epochFinalized", "outputs": [ { "internalType": "uint256", @@ -121,11 +121,11 @@ }, { "inputs": [], - "name": "epochPeriod", + "name": "epochNow", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "epoch", "type": "uint256" } ], @@ -133,21 +133,15 @@ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "epochPeriod", + "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], - "name": "inbox", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], "stateMutability": "view", "type": "function" }, @@ -280,31 +274,31 @@ "type": "function" } ], - "transactionHash": "0x305dd1739e8549e8f264bb9d691b8ae8de96d6fc5afc0b9a491399d58fd5ded8", + "transactionHash": "0x3314b20994c687aa8de214cfd19c044dabe425d69ed4ec09dd18cf751705c9af", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x5EC6917F803bF2C9E55D43D3B7DD1032a625A979", + "contractAddress": "0xdc201e4Ab6a25A17C1731D8bB7E56f89D0B86486", "transactionIndex": 1, - "gasUsed": "31431100", + "gasUsed": "687569", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xae7087c307f1dc18bb63cb5fa4dfa3f00ba2f344824cb743df013dcb6f652efd", - "transactionHash": "0x305dd1739e8549e8f264bb9d691b8ae8de96d6fc5afc0b9a491399d58fd5ded8", + "blockHash": "0x61eebae35c801a84002f759b4f47a43ebe548547b827950ef4480809bed3047a", + "transactionHash": "0x3314b20994c687aa8de214cfd19c044dabe425d69ed4ec09dd18cf751705c9af", "logs": [], - "blockNumber": 28631017, - "cumulativeGasUsed": "31431100", + "blockNumber": 28848501, + "cumulativeGasUsed": "687569", "status": 1, "byzantium": true }, "args": [ 3600, - "0x9cF5c011e2A4CB7797413f311A35AcB021071c35" + "0xE8ea62d3a4F06301016b9C23Ace108F3D8027839" ], - "numDeployments": 3, - "solcInputHash": "916b5e2210e8e15d34b48798389f67fe", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_gasLimit\":\"The gas limit for the AMB transaction on Gnosis.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _gasLimit The gas limit for the AMB transaction on Gnosis.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, uint256 _gasLimit, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToGnosis.route, (_epoch, snapshots[_epoch], _gasLimit, _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x48be8f225bcfe2373ec8328de18f9c291363bcd3c634b6445f49b788a7f3d59d\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, uint256 _gasLimit, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x084735de7ee128aa169f11f18a4a7de6656309e941b8df502e66b24a4bf93d0f\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c060405234801561001057600080fd5b50604051610c0b380380610c0b83398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b406100cb6000396000818161014701526105b6015260008181610120015281816101ce015281816101ff0152818161022f01526104c10152610b406000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063d5e6a9df14610142578063d6565a2d14610181578063dc881a72146101a1578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106aa565b6101f8565b61010661022a565b005b6100b761011636600461074f565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101697f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd61018f3660046106aa565b60006020819052908152604090205481565b6101066101af366004610828565b6104bf565b6100dd6101c23660046106aa565b610662565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108fa565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108fa565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108e4565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661091c565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61091c565b015484610679565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610956565b60408051601f19818403018152908290526103e093929160200161098c565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61091c565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961091c565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac908490610a07565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108e4565b0483106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008381526020819052604080822054905161056c91869186908690602401610a21565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a906105e0907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ac5565b6020604051808303816000875af11580156105ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106239190610af1565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6001816040811061067257600080fd5b0154905081565b60008183101561069757826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106bc57600080fd5b5035919050565b80356001600160a01b03811681146106da57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610718576107186106df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610747576107476106df565b604052919050565b60008060006060848603121561076457600080fd5b61076d846106c3565b92506020848101356001600160e01b03198116811461078b57600080fd5b9250604085013567ffffffffffffffff808211156107a857600080fd5b818701915087601f8301126107bc57600080fd5b8135818111156107ce576107ce6106df565b6107e0601f8201601f1916850161071e565b915080825288848285010111156107f657600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106da57600080fd5b600080600083850361012081121561083f57600080fd5b843593506020850135925060e0603f198201121561085c57600080fd5b506108656106f5565b60408501358152610878606086016106c3565b602082015261088960808601610814565b604082015261089a60a08601610814565b60608201526108ab60c08601610814565b608082015260e0850135600381106108c257600080fd5b60a08201526108d461010086016106c3565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261091757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b8381101561094d578181015183820152602001610935565b50506000910152565b63ffffffff60e01b841681528260048201526000825161097d816024850160208701610932565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109cc81601c850160208701610932565b91909101601c01949350505050565b600081518084526109f3816020860160208601610932565b601f01601f19169290920160200192915050565b602081526000610a1a60208301846109db565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610aa157634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610ae9908301846109db565b949350505050565b600060208284031215610b0357600080fd5b505191905056fea264697066735822122056dc6373469376ec427dddca0175325c8115fdc5486bdac95939d5af09683ddf64736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063b5b7a18411610066578063b5b7a1841461011b578063d5e6a9df14610142578063d6565a2d14610181578063dc881a72146101a1578063e5a1c356146101b457600080fd5b806306661abd146100a3578063222ae786146100d55780634a439cfe146100eb57806351920535146100fe5780635f85896c14610108575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101c7565b6040519081526020016100cc565b6100dd6100f93660046106aa565b6101f8565b61010661022a565b005b6100b761011636600461074f565b61034e565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101697f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd61018f3660046106aa565b60006020819052908152604090205481565b6101066101af366004610828565b6104bf565b6100dd6101c23660046106aa565b610662565b60006101f37f0000000000000000000000000000000000000000000000000000000000000000426108fa565b905090565b60006102247f0000000000000000000000000000000000000000000000000000000000000000836108fa565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161025c5761025c6108e4565b604154919004925060009067ffffffffffffffff165b80156102ab578060011660010361029f57600182604081106102965761029661091c565b015492506102ab565b6001918201911c610272565b60011c5b80156102ed5760019182019181811690036102e5576102e2600183604081106102da576102da61091c565b015484610679565b92505b60011c6102af565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103a55760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103c190889033908990602001610956565b60408051601f19818403018152908290526103e093929160200161098c565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b600181166000036104445761042c600183604081106102da576102da61091c565b92506001918201911c677fffffffffffffff1661040b565b5081600182604081106104595761045961091c565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104ac908490610a07565b60405180910390a1509095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000042816104ee576104ee6108e4565b0483106105485760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b606482015260840161039c565b60008381526020819052604080822054905161056c91869186908690602401610a21565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a906105e0907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ac5565b6020604051808303816000875af11580156105ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106239190610af1565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6001816040811061067257600080fd5b0154905081565b60008183101561069757826000528160205260406000209050610224565b5060009081526020919091526040902090565b6000602082840312156106bc57600080fd5b5035919050565b80356001600160a01b03811681146106da57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610718576107186106df565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610747576107476106df565b604052919050565b60008060006060848603121561076457600080fd5b61076d846106c3565b92506020848101356001600160e01b03198116811461078b57600080fd5b9250604085013567ffffffffffffffff808211156107a857600080fd5b818701915087601f8301126107bc57600080fd5b8135818111156107ce576107ce6106df565b6107e0601f8201601f1916850161071e565b915080825288848285010111156107f657600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106da57600080fd5b600080600083850361012081121561083f57600080fd5b843593506020850135925060e0603f198201121561085c57600080fd5b506108656106f5565b60408501358152610878606086016106c3565b602082015261088960808601610814565b604082015261089a60a08601610814565b60608201526108ab60c08601610814565b608082015260e0850135600381106108c257600080fd5b60a08201526108d461010086016106c3565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261091757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60005b8381101561094d578181015183820152602001610935565b50506000910152565b63ffffffff60e01b841681528260048201526000825161097d816024850160208701610932565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109cc81601c850160208701610932565b91909101601c01949350505050565b600081518084526109f3816020860160208601610932565b601f01601f19169290920160200192915050565b602081526000610a1a60208301846109db565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610aa157634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610ae9908301846109db565b949350505050565b600060208284031215610b0357600080fd5b505191905056fea264697066735822122056dc6373469376ec427dddca0175325c8115fdc5486bdac95939d5af09683ddf64736f6c63430008120033", + "numDeployments": 6, + "solcInputHash": "76a6a9e6371fade9c8f1066bebbf4e7c", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochFinalized\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochFinalized()\":{\"details\":\"Get the most recent epoch for which snapshots are finalized.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_gasLimit\":\"The gas limit for the AMB transaction on Gnosis.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] internal inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _gasLimit The gas limit for the AMB transaction on Gnosis.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, uint256 _gasLimit, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToGnosis.route, (_epoch, snapshots[_epoch], _gasLimit, _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the most recent epoch for which snapshots are finalized.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochFinalized() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x30dad453fea95d78d7215ce3de9f423d975b394ab022f8f411e17a2ce736fc8d\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, uint256 _gasLimit, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x084735de7ee128aa169f11f18a4a7de6656309e941b8df502e66b24a4bf93d0f\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610c49380380610c4983398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b776100d26000396000818161014f01526105e3015260008181610128015281816101c3015281816101f60152818161022c0152818161025c01526104ee0152610b776000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80635f85896c116100665780635f85896c14610110578063b5b7a18414610123578063d5e6a9df1461014a578063d6565a2d14610189578063dc881a72146101a957600080fd5b806306661abd146100a3578063222ae786146100d55780633ac3b6b6146100eb5780634a439cfe146100f35780635192053514610106575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101bc565b6040519081526020016100cc565b6100dd6101ed565b6100dd6101013660046106c0565b610225565b61010e610257565b005b6100b761011e366004610765565b61037b565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101717f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101973660046106c0565b60006020819052908152604090205481565b61010e6101b736600461083e565b6104ec565b60006101e87f000000000000000000000000000000000000000000000000000000000000000042610910565b905090565b6000600161021b7f000000000000000000000000000000000000000000000000000000000000000042610910565b6101e89190610932565b60006102517f000000000000000000000000000000000000000000000000000000000000000083610910565b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000004281610289576102896108fa565b604154919004925060009067ffffffffffffffff165b80156102d857806001166001036102cc57600182604081106102c3576102c3610953565b015492506102d8565b6001918201911c61029f565b60011c5b801561031a5760019182019181811690036103125761030f6001836040811061030757610307610953565b01548461068f565b92505b60011c6102dc565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103d25760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103ee9088903390899060200161098d565b60408051601f198184030181529082905261040d9392916020016109c3565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610471576104596001836040811061030757610307610953565b92506001918201911c677fffffffffffffff16610438565b50816001826040811061048657610486610953565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104d9908490610a3e565b60405180910390a1509095945050505050565b7f0000000000000000000000000000000000000000000000000000000000000000428161051b5761051b6108fa565b0483106105755760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084016103c9565b60008381526020819052604080822054905161059991869186908690602401610a58565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a9061060d907f0000000000000000000000000000000000000000000000000000000000000000908690600401610afc565b6020604051808303816000875af115801561062c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106509190610b28565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6000818310156106ad57826000528160205260406000209050610251565b5060009081526020919091526040902090565b6000602082840312156106d257600080fd5b5035919050565b80356001600160a01b03811681146106f057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff8111828210171561072e5761072e6106f5565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561075d5761075d6106f5565b604052919050565b60008060006060848603121561077a57600080fd5b610783846106d9565b92506020848101356001600160e01b0319811681146107a157600080fd5b9250604085013567ffffffffffffffff808211156107be57600080fd5b818701915087601f8301126107d257600080fd5b8135818111156107e4576107e46106f5565b6107f6601f8201601f19168501610734565b9150808252888482850101111561080c57600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106f057600080fd5b600080600083850361012081121561085557600080fd5b843593506020850135925060e0603f198201121561087257600080fd5b5061087b61070b565b6040850135815261088e606086016106d9565b602082015261089f6080860161082a565b60408201526108b060a0860161082a565b60608201526108c160c0860161082a565b608082015260e0850135600381106108d857600080fd5b60a08201526108ea61010086016106d9565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261092d57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561025157634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561098457818101518382015260200161096c565b50506000910152565b63ffffffff60e01b84168152826004820152600082516109b4816024850160208701610969565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b16600882015260008251610a0381601c850160208701610969565b91909101601c01949350505050565b60008151808452610a2a816020860160208601610969565b601f01601f19169290920160200192915050565b602081526000610a516020830184610a12565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610ad857634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610b2090830184610a12565b949350505050565b600060208284031215610b3a57600080fd5b505191905056fea2646970667358221220e946b1562a2911d87273f6fe8d8a97409f3946f0bbe45ecb965c7172a235bce764736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80635f85896c116100665780635f85896c14610110578063b5b7a18414610123578063d5e6a9df1461014a578063d6565a2d14610189578063dc881a72146101a957600080fd5b806306661abd146100a3578063222ae786146100d55780633ac3b6b6146100eb5780634a439cfe146100f35780635192053514610106575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101bc565b6040519081526020016100cc565b6100dd6101ed565b6100dd6101013660046106c0565b610225565b61010e610257565b005b6100b761011e366004610765565b61037b565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101717f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101973660046106c0565b60006020819052908152604090205481565b61010e6101b736600461083e565b6104ec565b60006101e87f000000000000000000000000000000000000000000000000000000000000000042610910565b905090565b6000600161021b7f000000000000000000000000000000000000000000000000000000000000000042610910565b6101e89190610932565b60006102517f000000000000000000000000000000000000000000000000000000000000000083610910565b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000004281610289576102896108fa565b604154919004925060009067ffffffffffffffff165b80156102d857806001166001036102cc57600182604081106102c3576102c3610953565b015492506102d8565b6001918201911c61029f565b60011c5b801561031a5760019182019181811690036103125761030f6001836040811061030757610307610953565b01548461068f565b92505b60011c6102dc565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103d25760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103ee9088903390899060200161098d565b60408051601f198184030181529082905261040d9392916020016109c3565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610471576104596001836040811061030757610307610953565b92506001918201911c677fffffffffffffff16610438565b50816001826040811061048657610486610953565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104d9908490610a3e565b60405180910390a1509095945050505050565b7f0000000000000000000000000000000000000000000000000000000000000000428161051b5761051b6108fa565b0483106105755760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084016103c9565b60008381526020819052604080822054905161059991869186908690602401610a58565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a9061060d907f0000000000000000000000000000000000000000000000000000000000000000908690600401610afc565b6020604051808303816000875af115801561062c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106509190610b28565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6000818310156106ad57826000528160205260406000209050610251565b5060009081526020919091526040902090565b6000602082840312156106d257600080fd5b5035919050565b80356001600160a01b03811681146106f057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff8111828210171561072e5761072e6106f5565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561075d5761075d6106f5565b604052919050565b60008060006060848603121561077a57600080fd5b610783846106d9565b92506020848101356001600160e01b0319811681146107a157600080fd5b9250604085013567ffffffffffffffff808211156107be57600080fd5b818701915087601f8301126107d257600080fd5b8135818111156107e4576107e46106f5565b6107f6601f8201601f19168501610734565b9150808252888482850101111561080c57600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106f057600080fd5b600080600083850361012081121561085557600080fd5b843593506020850135925060e0603f198201121561087257600080fd5b5061087b61070b565b6040850135815261088e606086016106d9565b602082015261089f6080860161082a565b60408201526108b060a0860161082a565b60608201526108c160c0860161082a565b608082015260e0850135600381106108d857600080fd5b60a08201526108ea61010086016106d9565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261092d57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561025157634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561098457818101518382015260200161096c565b50506000910152565b63ffffffff60e01b84168152826004820152600082516109b4816024850160208701610969565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b16600882015260008251610a0381601c850160208701610969565b91909101601c01949350505050565b60008151808452610a2a816020860160208601610969565b601f01601f19169290920160200192915050565b602081526000610a516020830184610a12565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610ad857634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610b2090830184610a12565b949350505050565b600060208284031215610b3a57600080fd5b505191905056fea2646970667358221220e946b1562a2911d87273f6fe8d8a97409f3946f0bbe45ecb965c7172a235bce764736f6c63430008120033", "devdoc": { "details": "Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.", "events": { @@ -347,6 +341,12 @@ "epoch": "The calculated epoch." } }, + "epochFinalized()": { + "details": "Get the most recent epoch for which snapshots are finalized.", + "returns": { + "epoch": "The epoch associated with the current inbox block.timestamp" + } + }, "epochNow()": { "details": "Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.", "returns": { @@ -391,7 +391,7 @@ "storageLayout": { "storage": [ { - "astId": 1789, + "astId": 432, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "snapshots", "offset": 0, @@ -399,7 +399,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 1793, + "astId": 436, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "inbox", "offset": 0, @@ -407,7 +407,7 @@ "type": "t_array(t_bytes32)64_storage" }, { - "astId": 1795, + "astId": 438, "contract": "src/arbitrumToGnosis/VeaInboxArbToGnosis.sol:VeaInboxArbToGnosis", "label": "count", "offset": 0, diff --git a/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbDevnet.json b/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbDevnet.json index 1d74a7fb..cae5a640 100644 --- a/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x016170Ad327cE0dCa07b3bd7a7592013a7488FAc", + "address": "0x8Da07C6D68F17d7BbC8B42D59Bc9EEE90e9dD621", "abi": [ { "inputs": [ @@ -71,7 +71,7 @@ "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "_epoch", "type": "uint256" @@ -118,13 +118,52 @@ { "indexed": false, "internalType": "uint256", - "name": "_newsequencerDelayLimit", + "name": "_newSequencerDelayLimit", "type": "uint256" } ], "name": "sequencerDelayLimitUpdateReceived", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newSequencerFutureLimit", + "type": "uint256" + } + ], + "name": "sequencerFutureLimitUpdateReceived", + "type": "event" + }, + { + "inputs": [], + "name": "BURN_ADDRESS", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "burn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -248,6 +287,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "depositPlusReward", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -325,34 +377,34 @@ "type": "function" }, { - "inputs": [], - "name": "latestVerifiedEpoch", - "outputs": [ + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "_msgId", "type": "uint256" } ], + "name": "isMsgRelayed", + "outputs": [ + { + "internalType": "bool", + "name": "isRelayed", + "type": "bool" + } + ], "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "latestVerifiedEpoch", + "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], - "name": "relayed", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], "stateMutability": "view", "type": "function" }, @@ -595,19 +647,19 @@ "type": "function" } ], - "transactionHash": "0x190c2fabdab03e016a5cff9d4d157762c8def2420db5f3c50d8bb5b2e4737d42", + "transactionHash": "0x5e21264c60c98d3ee54493bbe0369ad5fa51ae269a1853b136d6147f2d8a15d0", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x016170Ad327cE0dCa07b3bd7a7592013a7488FAc", + "contractAddress": "0x8Da07C6D68F17d7BbC8B42D59Bc9EEE90e9dD621", "transactionIndex": 1, - "gasUsed": "61874568", + "gasUsed": "1856900", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x0f3d8bb7982e5417659f8298758e10c2c444c09171f48fc60c63507509c930a9", - "transactionHash": "0x190c2fabdab03e016a5cff9d4d157762c8def2420db5f3c50d8bb5b2e4737d42", + "blockHash": "0x3efbe3b821039811299b5d3e64a6236899c3d439dcc27b54ebe294fb15fd94d9", + "transactionHash": "0x5e21264c60c98d3ee54493bbe0369ad5fa51ae269a1853b136d6147f2d8a15d0", "logs": [], - "blockNumber": 28630846, - "cumulativeGasUsed": "61874568", + "blockNumber": 28847864, + "cumulativeGasUsed": "1856900", "status": 1, "byzantium": true }, @@ -616,15 +668,15 @@ 1800, 0, 10000000000000, - "0x65b577dC22D3bdfcB20298ac07EF99D574275D04", + "0xb7d2C76641B21718cC8A0b595be438c863A6e031", 86400, 3600 ], - "numDeployments": 3, - "solcInputHash": "6b0b750c6eee9aa0a5e450d1f0bbb2d2", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerFutureLimit\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"challengers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claims\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"enum VeaOutboxGnosisToArb.Party\",\"name\":\"honest\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampFutureUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Chiado to ArbitrumGoerli. Note: This contract is deployed on ArbitrumGoerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"challenge(uint256)\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_routerGnosisToArb\":\"The address of the router on Ethereum that routes from Arbitrum to Ethereum.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_sequencerFutureLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded with header from VeaInbox.\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"updateSequencerFutureLimit(uint256,uint256)\":{\"details\":\"Set the sequencerFutureLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerFutureLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256)\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32)\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol\":\"VeaOutboxGnosisToArbDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/AddressAliasHelper.sol\":{\"content\":\"// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/libraries/AddressAliasHelper.sol\\n// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressAliasHelper {\\n uint160 internal 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\",\"keccak256\":\"0xfa8b6907a33c37e13b3de6e2459d6bd153708be4b8413db3c319ea3a5d8c9b00\",\"license\":\"BUSL-1.1\"},\"src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../gnosisToArbitrum/VeaOutboxGnosisToArb.sol\\\";\\n\\n/// @dev Vea Outbox From Chiado to ArbitrumGoerli.\\n/// Note: This contract is deployed on ArbitrumGoerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxGnosisToArbDevnet is VeaOutboxGnosisToArb {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) public override {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) public override OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n verifySnapshot(_epoch);\\n withdrawClaimDeposit(_epoch);\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit\\n )\\n VeaOutboxGnosisToArb(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _routerGnosisToArb,\\n _sequencerDelayLimit,\\n _sequencerFutureLimit\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x8c8b56464ddec74b6dfa3859a19feb1d25b630a58ec12cd943674a9881258cf5\",\"license\":\"MIT\"},\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/AddressAliasHelper.sol\\\";\\n\\n/// @dev Vea Outbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaOutboxGnosisToArb is IVeaOutboxOnL2 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public immutable routerGnosisToArb; // The address of the router from Gnosis to Arbitrum on Ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // address to send burned eth\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable challengePeriod; // Claim challenge timewindow.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n uint256 public timestampFutureUpdated; // The timestamp of the last sequencer future update.\\n\\n bytes32 public stateRoot;\\n uint256 public latestVerifiedEpoch;\\n\\n mapping(uint256 => Claim) public claims; // epoch => claim\\n mapping(uint256 => address) public challengers; // epoch => challenger\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n enum Party {\\n None,\\n Claimer,\\n Challenger\\n }\\n\\n struct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestamp;\\n Party honest;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod <= latestVerifiedEpoch + timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod > latestVerifiedEpoch + timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit\\n ) {\\n deposit = _deposit;\\n epochPeriod = _epochPeriod;\\n challengePeriod = _challengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n routerGnosisToArb = _routerGnosisToArb;\\n sequencerDelayLimit = _sequencerDelayLimit;\\n sequencerFutureLimit = _sequencerFutureLimit;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerFutureLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerFutureLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampFutureUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerFutureLimit != _newSequencerFutureLimit) {\\n sequencerFutureLimit = _newSequencerFutureLimit;\\n timestampFutureUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Set the sequencerDelayLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch is invalid.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n function challenge(uint256 _epoch) external payable virtual {\\n require(challengers[_epoch] == address(0), \\\"Claim already challenged.\\\");\\n require(claims[_epoch].claimer != address(0), \\\"No claim for epoch.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n\\n challengers[_epoch] = msg.sender;\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) external virtual OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external virtual OnlyBridgeRunning {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n bytes32 claimedStateRoot = claims[_epoch].stateRoot;\\n\\n if (claimedStateRoot != bytes32(0)) {\\n if (claimedStateRoot == _stateRoot) {\\n claims[_epoch].honest = Party.Claimer;\\n } else if (challengers[_epoch] != address(0)) {\\n claims[_epoch].honest = Party.Challenger;\\n }\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded with header from VeaInbox.\\n function sendMessage(bytes32[] memory _proof, uint64 _msgId, address _to, bytes memory _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) external virtual {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n function withdrawChallengeDeposit(uint256 _epoch) external {\\n require(claims[_epoch].honest == Party.Challenger, \\\"Challenge unsuccessful.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete claims[_epoch];\\n delete challengers[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (claimer != address(0)) {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawChallengerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete challengers[_epoch];\\n\\n if (challenger != address(0)) {\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x999ccae7dfc58d5c0e51726634e049b48ebc00dfeb2541f99d818f89a82a169b\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101606040523480156200001257600080fd5b5060405162002116380380620021168339810160408190526200003591620000e1565b60a08790526101008690526101208590526101408490526001600160a01b03831660805260008290556001819055868686868686866200007760028862000167565b60c0819052620000898860026200018a565b620000959190620001aa565b60e05261010051600190620000ab904262000167565b620000b79190620001aa565b6005555050600980546001600160a01b0319163317905550620001c09a5050505050505050505050565b600080600080600080600060e0888a031215620000fd57600080fd5b8751602089015160408a015160608b015160808c0151939a50919850965094506001600160a01b03811681146200013357600080fd5b8093505060a0880151915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200018557634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001a457620001a462000151565b92915050565b81810381811115620001a457620001a462000151565b60805160a05160c05160e051610100516101205161014051611e4c620002ca600039600081816104ce0152818161062101528181610dc5015281816110f501526114fb0152600081816105dd015261124401526000818161050201528181610646015281816107a201528181610dea01528181610f470152818161111a015261152001526000818161107001526119ec01526000818161102f01526119ab01526000818161053601528181610762015281816108cb01528181610aae01528181610adb01528181610f08015281816110bb015281816117800152818161184c0152611879015260008181610596015281816107d701528181611393015261159a0152611e4c6000f3fe6080604052600436106101cd5760003560e01c80638ad3a8f7116100f7578063b5b7a18411610095578063eb8dedfa11610064578063eb8dedfa14610584578063eedcf2a9146105b8578063f3f480d9146105cb578063f4cf751b146105ff57600080fd5b8063b5b7a184146104f0578063d0e30db014610524578063d6e01b3914610558578063e813a7551461056e57600080fd5b80639588eca2116100d15780639588eca21461042c578063a888c2cd14610442578063ab82d9a0146104a9578063b044397e146104bc57600080fd5b80638ad3a8f7146103bf5780638caeb7a8146103df57806390df63b7146103ff57600080fd5b80634518f79f1161016f5780636b45ebcb1161013e5780636b45ebcb1461031b578063710cc9a7146103695780637ffc2a6e146103895780638a619a711461039f57600080fd5b80634518f79f1461029b5780634a439cfe146102bb57806350b81dbe146102db57806364962849146102fb57600080fd5b806327ee6bdd116101ab57806327ee6bdd146102325780632c1925191461024857806331d144571461026857806331ddf7431461027b57600080fd5b80630e56752e146101d2578063114095d3146101fb578063222ae7861461021d575b600080fd5b3480156101de57600080fd5b506101e860015481565b6040519081526020015b60405180910390f35b34801561020757600080fd5b5061021b610216366004611a27565b61061f565b005b34801561022957600080fd5b506101e861079b565b34801561023e57600080fd5b506101e860055481565b34801561025457600080fd5b5061021b610263366004611a40565b6107cc565b61021b610276366004611a40565b6108b2565b34801561028757600080fd5b5061021b610296366004611b4d565b610b24565b3480156102a757600080fd5b5061021b6102b6366004611a27565b610dc3565b3480156102c757600080fd5b506101e86102d6366004611a27565b610f40565b3480156102e757600080fd5b5061021b6102f6366004611a27565b610f72565b34801561030757600080fd5b5061021b610316366004611a27565b6110f3565b34801561032757600080fd5b50610351610336366004611a27565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101f2565b34801561037557600080fd5b5061021b610384366004611a40565b611388565b34801561039557600080fd5b506101e860025481565b3480156103ab57600080fd5b5061021b6103ba366004611c39565b611466565b3480156103cb57600080fd5b50600954610351906001600160a01b031681565b3480156103eb57600080fd5b5061021b6103fa366004611a40565b6114f9565b34801561040b57600080fd5b506101e861041a366004611a27565b60086020526000908152604090205481565b34801561043857600080fd5b506101e860045481565b34801561044e57600080fd5b5061049961045d366004611a27565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516101f29493929190611c71565b61021b6104b7366004611a27565b6116bc565b3480156104c857600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b3480156104fc57600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561053057600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561056457600080fd5b506101e860035481565b34801561057a57600080fd5b506101e860005481565b34801561059057600080fd5b506103517f000000000000000000000000000000000000000000000000000000000000000081565b61021b6105c6366004611a40565b6118c2565b3480156105d757600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561060b57600080fd5b5061021b61061a366004611a27565b6118de565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161067357610673611cc0565b04116106b85760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff1660028111156106e6576106e6611c5b565b146107255760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106af565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b03168015610797576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006107c77f000000000000000000000000000000000000000000000000000000000000000042611cec565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461081f5760405162461bcd60e51b81526004016106af90611d0e565b80600254106108675760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106af565b816000541461079757600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6009546001600160a01b031633146108c957600080fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156109395760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106af565b806109775760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106af565b6000828152600660205260409020600101546001600160a01b0316156109d55760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106af565b6040805160808101825282815233602080830191825263ffffffff4281168486019081526000606086018181528982526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610a6a57610a6a611c5b565b02179055505060408051848152602081018490523392507fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115610797576000610b007f000000000000000000000000000000000000000000000000000000000000000034611d45565b604051909150339082156108fc029083906000818181858888f15050505050505050565b6040845110610b675760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106af565b6000838383604051602001610b7e93929190611d88565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610c00576000868281518110610bc157610bc1611dca565b6020026020010151905082811115610be757826000528060205260406000209250610bf7565b8060005282602052604060002092505b50600101610ba4565b508060045414610c435760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106af565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610cba5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106af565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610ce8908890611de0565b6000604051808303816000865af19150503d8060008114610d25576040519150601f19603f3d011682016040523d82523d6000602084013e610d2a565b606091505b5050905080610d7b5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106af565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f00000000000000000000000000000000000000000000000000000000000000004281610e1757610e17611cc0565b0411610e575760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106af565b60008082815260066020526040902060010154600160c01b900460ff166002811115610e8557610e85611c5b565b14610ec45760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106af565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b03168015610797576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6000610f6c7f000000000000000000000000000000000000000000000000000000000000000083611cec565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff166002811115610fa157610fa1611c5b565b14610fe45760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b60448201526064016106af565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b039182169116156110ab576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161114757611147611cc0565b0411156111895760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106af565b600081815260066020526040902060010154600160a01b900463ffffffff16806111e65760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106af565b6000828152600760205260409020546001600160a01b0316156112425760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106af565b7f000000000000000000000000000000000000000000000000000000000000000060015460005460026112759190611dec565b61127f9190611e03565b6112899190611e03565b6112938242611d45565b10156113075760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e00000000000000000060648201526084016106af565b6005548211156113635760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79061135a9084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146113db5760405162461bcd60e51b81526004016106af90611d0e565b80600354106114235760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106af565b816001541461079757600182905560038190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020016108a6565b6009546001600160a01b0316331461147d57600080fd5b6009546001600160a01b031633146114d75760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106af565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161154d5761154d611cc0565b04111561158f5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106af565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146115e25760405162461bcd60e51b81526004016106af90611d0e565b600554821180156115f257508015155b1561163557600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b60008281526006602052604090205480156116b7578181036116775750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b0316156116b7576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b0316156117215760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106af565b6000818152600660205260409020600101546001600160a01b031661177e5760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b60448201526064016106af565b7f00000000000000000000000000000000000000000000000000000000000000003410156117ee5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106af565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7906118429084815260200190565b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156118bf57600061189e7f000000000000000000000000000000000000000000000000000000000000000034611d45565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b6118cc82826108b2565b6118d5826110f3565b61079782610f72565b6002600082815260066020526040902060010154600160c01b900460ff16600281111561190d5761190d611c5b565b1461195a5760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e00000000000000000060448201526064016106af565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600060208284031215611a3957600080fd5b5035919050565b60008060408385031215611a5357600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611aa157611aa1611a62565b604052919050565b803567ffffffffffffffff81168114611ac157600080fd5b919050565b80356001600160a01b0381168114611ac157600080fd5b600082601f830112611aee57600080fd5b813567ffffffffffffffff811115611b0857611b08611a62565b611b1b601f8201601f1916602001611a78565b818152846020838601011115611b3057600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611b6357600080fd5b843567ffffffffffffffff80821115611b7b57600080fd5b818701915087601f830112611b8f57600080fd5b8135602082821115611ba357611ba3611a62565b8160051b611bb2828201611a78565b928352848101820192828101908c851115611bcc57600080fd5b958301955b84871015611bea57863582529583019590830190611bd1565b9950611bfa915050898201611aa9565b96505050611c0a60408801611ac6565b93506060870135915080821115611c2057600080fd5b50611c2d87828801611add565b91505092959194509250565b600060208284031215611c4b57600080fd5b611c5482611ac6565b9392505050565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611cb157634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611d0957634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b81810381811115610f6c57610f6c611cd6565b6000815160005b81811015611d795760208185018101518683015201611d5f565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611dc1601c830184611d58565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611c548284611d58565b8082028115828204841417610f6c57610f6c611cd6565b80820180821115610f6c57610f6c611cd656fea2646970667358221220e76f1f04ed49d33a147833dd04ad8a864eb7fdeca074d4525eabbfcec00e586d64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101cd5760003560e01c80638ad3a8f7116100f7578063b5b7a18411610095578063eb8dedfa11610064578063eb8dedfa14610584578063eedcf2a9146105b8578063f3f480d9146105cb578063f4cf751b146105ff57600080fd5b8063b5b7a184146104f0578063d0e30db014610524578063d6e01b3914610558578063e813a7551461056e57600080fd5b80639588eca2116100d15780639588eca21461042c578063a888c2cd14610442578063ab82d9a0146104a9578063b044397e146104bc57600080fd5b80638ad3a8f7146103bf5780638caeb7a8146103df57806390df63b7146103ff57600080fd5b80634518f79f1161016f5780636b45ebcb1161013e5780636b45ebcb1461031b578063710cc9a7146103695780637ffc2a6e146103895780638a619a711461039f57600080fd5b80634518f79f1461029b5780634a439cfe146102bb57806350b81dbe146102db57806364962849146102fb57600080fd5b806327ee6bdd116101ab57806327ee6bdd146102325780632c1925191461024857806331d144571461026857806331ddf7431461027b57600080fd5b80630e56752e146101d2578063114095d3146101fb578063222ae7861461021d575b600080fd5b3480156101de57600080fd5b506101e860015481565b6040519081526020015b60405180910390f35b34801561020757600080fd5b5061021b610216366004611a27565b61061f565b005b34801561022957600080fd5b506101e861079b565b34801561023e57600080fd5b506101e860055481565b34801561025457600080fd5b5061021b610263366004611a40565b6107cc565b61021b610276366004611a40565b6108b2565b34801561028757600080fd5b5061021b610296366004611b4d565b610b24565b3480156102a757600080fd5b5061021b6102b6366004611a27565b610dc3565b3480156102c757600080fd5b506101e86102d6366004611a27565b610f40565b3480156102e757600080fd5b5061021b6102f6366004611a27565b610f72565b34801561030757600080fd5b5061021b610316366004611a27565b6110f3565b34801561032757600080fd5b50610351610336366004611a27565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101f2565b34801561037557600080fd5b5061021b610384366004611a40565b611388565b34801561039557600080fd5b506101e860025481565b3480156103ab57600080fd5b5061021b6103ba366004611c39565b611466565b3480156103cb57600080fd5b50600954610351906001600160a01b031681565b3480156103eb57600080fd5b5061021b6103fa366004611a40565b6114f9565b34801561040b57600080fd5b506101e861041a366004611a27565b60086020526000908152604090205481565b34801561043857600080fd5b506101e860045481565b34801561044e57600080fd5b5061049961045d366004611a27565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516101f29493929190611c71565b61021b6104b7366004611a27565b6116bc565b3480156104c857600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b3480156104fc57600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561053057600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561056457600080fd5b506101e860035481565b34801561057a57600080fd5b506101e860005481565b34801561059057600080fd5b506103517f000000000000000000000000000000000000000000000000000000000000000081565b61021b6105c6366004611a40565b6118c2565b3480156105d757600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561060b57600080fd5b5061021b61061a366004611a27565b6118de565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161067357610673611cc0565b04116106b85760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff1660028111156106e6576106e6611c5b565b146107255760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106af565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b03168015610797576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006107c77f000000000000000000000000000000000000000000000000000000000000000042611cec565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461081f5760405162461bcd60e51b81526004016106af90611d0e565b80600254106108675760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106af565b816000541461079757600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6009546001600160a01b031633146108c957600080fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156109395760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106af565b806109775760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106af565b6000828152600660205260409020600101546001600160a01b0316156109d55760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106af565b6040805160808101825282815233602080830191825263ffffffff4281168486019081526000606086018181528982526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610a6a57610a6a611c5b565b02179055505060408051848152602081018490523392507fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115610797576000610b007f000000000000000000000000000000000000000000000000000000000000000034611d45565b604051909150339082156108fc029083906000818181858888f15050505050505050565b6040845110610b675760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106af565b6000838383604051602001610b7e93929190611d88565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610c00576000868281518110610bc157610bc1611dca565b6020026020010151905082811115610be757826000528060205260406000209250610bf7565b8060005282602052604060002092505b50600101610ba4565b508060045414610c435760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106af565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610cba5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106af565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610ce8908890611de0565b6000604051808303816000865af19150503d8060008114610d25576040519150601f19603f3d011682016040523d82523d6000602084013e610d2a565b606091505b5050905080610d7b5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106af565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f00000000000000000000000000000000000000000000000000000000000000004281610e1757610e17611cc0565b0411610e575760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106af565b60008082815260066020526040902060010154600160c01b900460ff166002811115610e8557610e85611c5b565b14610ec45760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106af565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b03168015610797576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6000610f6c7f000000000000000000000000000000000000000000000000000000000000000083611cec565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff166002811115610fa157610fa1611c5b565b14610fe45760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b60448201526064016106af565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b039182169116156110ab576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161114757611147611cc0565b0411156111895760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106af565b600081815260066020526040902060010154600160a01b900463ffffffff16806111e65760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106af565b6000828152600760205260409020546001600160a01b0316156112425760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106af565b7f000000000000000000000000000000000000000000000000000000000000000060015460005460026112759190611dec565b61127f9190611e03565b6112899190611e03565b6112938242611d45565b10156113075760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e00000000000000000060648201526084016106af565b6005548211156113635760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79061135a9084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146113db5760405162461bcd60e51b81526004016106af90611d0e565b80600354106114235760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106af565b816001541461079757600182905560038190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020016108a6565b6009546001600160a01b0316331461147d57600080fd5b6009546001600160a01b031633146114d75760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106af565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161154d5761154d611cc0565b04111561158f5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106af565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146115e25760405162461bcd60e51b81526004016106af90611d0e565b600554821180156115f257508015155b1561163557600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b60008281526006602052604090205480156116b7578181036116775750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b0316156116b7576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b0316156117215760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106af565b6000818152600660205260409020600101546001600160a01b031661177e5760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b60448201526064016106af565b7f00000000000000000000000000000000000000000000000000000000000000003410156117ee5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106af565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7906118429084815260200190565b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156118bf57600061189e7f000000000000000000000000000000000000000000000000000000000000000034611d45565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b6118cc82826108b2565b6118d5826110f3565b61079782610f72565b6002600082815260066020526040902060010154600160c01b900460ff16600281111561190d5761190d611c5b565b1461195a5760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e00000000000000000060448201526064016106af565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600060208284031215611a3957600080fd5b5035919050565b60008060408385031215611a5357600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611aa157611aa1611a62565b604052919050565b803567ffffffffffffffff81168114611ac157600080fd5b919050565b80356001600160a01b0381168114611ac157600080fd5b600082601f830112611aee57600080fd5b813567ffffffffffffffff811115611b0857611b08611a62565b611b1b601f8201601f1916602001611a78565b818152846020838601011115611b3057600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611b6357600080fd5b843567ffffffffffffffff80821115611b7b57600080fd5b818701915087601f830112611b8f57600080fd5b8135602082821115611ba357611ba3611a62565b8160051b611bb2828201611a78565b928352848101820192828101908c851115611bcc57600080fd5b958301955b84871015611bea57863582529583019590830190611bd1565b9950611bfa915050898201611aa9565b96505050611c0a60408801611ac6565b93506060870135915080821115611c2057600080fd5b50611c2d87828801611add565b91505092959194509250565b600060208284031215611c4b57600080fd5b611c5482611ac6565b9392505050565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611cb157634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611d0957634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b81810381811115610f6c57610f6c611cd6565b6000815160005b81811015611d795760208185018101518683015201611d5f565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611dc1601c830184611d58565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611c548284611d58565b8082028115828204841417610f6c57610f6c611cd6565b80820180821115610f6c57610f6c611cd656fea2646970667358221220e76f1f04ed49d33a147833dd04ad8a864eb7fdeca074d4525eabbfcec00e586d64736f6c63430008120033", + "numDeployments": 9, + "solcInputHash": "556bdf5fc9689e29dc99949f21bc913e", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerFutureLimit\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"challengers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claims\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"enum VeaOutboxGnosisToArb.Party\",\"name\":\"honest\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositPlusReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_msgId\",\"type\":\"uint256\"}],\"name\":\"isMsgRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRelayed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampFutureUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Chiado to ArbitrumGoerli. Note: This contract is deployed on ArbitrumGoerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer delay limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new max sequencer past timestamping power.\"}},\"sequencerFutureLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer futue limit updated.\",\"params\":{\"_newSequencerFutureLimit\":\"The new max sequencer future timestamping power.\"}}},\"kind\":\"dev\",\"methods\":{\"challenge(uint256)\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_routerGnosisToArb\":\"The address of the router on Ethereum that routes from Arbitrum to Ethereum.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_sequencerFutureLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"isMsgRelayed(uint256)\":{\"details\":\"Get the msg relayed status.\",\"params\":{\"_msgId\":\"The msgId to check.\"},\"returns\":{\"isRelayed\":\"True if the msg was relayed.\"}},\"resolveDisputedClaim(uint256,bytes32)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Arbitrum to call.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"updateSequencerFutureLimit(uint256,uint256)\":{\"details\":\"Set the sequencerFutureLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerFutureLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256)\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32)\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol\":\"VeaOutboxGnosisToArbDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/AddressAliasHelper.sol\":{\"content\":\"// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/libraries/AddressAliasHelper.sol\\n// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressAliasHelper {\\n uint160 internal 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\",\"keccak256\":\"0xfa8b6907a33c37e13b3de6e2459d6bd153708be4b8413db3c319ea3a5d8c9b00\",\"license\":\"BUSL-1.1\"},\"src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../gnosisToArbitrum/VeaOutboxGnosisToArb.sol\\\";\\n\\n/// @dev Vea Outbox From Chiado to ArbitrumGoerli.\\n/// Note: This contract is deployed on ArbitrumGoerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxGnosisToArbDevnet is VeaOutboxGnosisToArb {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) public override {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) public override OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n verifySnapshot(_epoch);\\n withdrawClaimDeposit(_epoch);\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit\\n )\\n VeaOutboxGnosisToArb(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _routerGnosisToArb,\\n _sequencerDelayLimit,\\n _sequencerFutureLimit\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x8c8b56464ddec74b6dfa3859a19feb1d25b630a58ec12cd943674a9881258cf5\",\"license\":\"MIT\"},\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/AddressAliasHelper.sol\\\";\\n\\n/// @dev Vea Outbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaOutboxGnosisToArb is IVeaOutboxOnL2 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public immutable routerGnosisToArb; // The address of the router from Gnosis to Arbitrum on Ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 public immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 public immutable depositPlusReward; // 2 * deposit - burn\\n\\n address public constant BURN_ADDRESS = address(0); // address to send burned eth\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable challengePeriod; // Claim challenge timewindow.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n uint256 public timestampFutureUpdated; // The timestamp of the last sequencer future update.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => Claim) public claims; // epoch => claim\\n mapping(uint256 => address) public challengers; // epoch => challenger\\n mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n enum Party {\\n None,\\n Claimer,\\n Challenger\\n }\\n\\n struct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestamp;\\n Party honest;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer delay limit updated.\\n /// @param _newSequencerDelayLimit The new max sequencer past timestamping power.\\n event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates the sequencer futue limit updated.\\n /// @param _newSequencerFutureLimit The new max sequencer future timestamping power.\\n event sequencerFutureLimitUpdateReceived(uint256 _newSequencerFutureLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit\\n ) {\\n deposit = _deposit;\\n epochPeriod = _epochPeriod;\\n challengePeriod = _challengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n routerGnosisToArb = _routerGnosisToArb;\\n sequencerDelayLimit = _sequencerDelayLimit;\\n sequencerFutureLimit = _sequencerFutureLimit;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerFutureLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerFutureLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampFutureUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerFutureLimit != _newSequencerFutureLimit) {\\n sequencerFutureLimit = _newSequencerFutureLimit;\\n timestampFutureUpdated = _timestamp;\\n emit sequencerFutureLimitUpdateReceived(_newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Set the sequencerDelayLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n unchecked {\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch is invalid.\\\");\\n }\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n function challenge(uint256 _epoch) external payable virtual {\\n require(challengers[_epoch] == address(0), \\\"Claim already challenged.\\\");\\n require(claims[_epoch].claimer != address(0), \\\"No claim for epoch.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n\\n challengers[_epoch] = msg.sender;\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) external virtual OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external virtual OnlyBridgeRunning {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n bytes32 claimedStateRoot = claims[_epoch].stateRoot;\\n\\n if (claimedStateRoot != bytes32(0)) {\\n if (claimedStateRoot == _stateRoot) {\\n claims[_epoch].honest = Party.Claimer;\\n } else if (challengers[_epoch] != address(0)) {\\n claims[_epoch].honest = Party.Challenger;\\n }\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Arbitrum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] memory _proof, uint64 _msgId, address _to, bytes memory _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) external virtual {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n function withdrawChallengeDeposit(uint256 _epoch) external {\\n require(claims[_epoch].honest == Party.Challenger, \\\"Challenge unsuccessful.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete claims[_epoch];\\n delete challengers[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (claimer != address(0)) {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawChallengerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete challengers[_epoch];\\n\\n if (challenger != address(0)) {\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the msg relayed status.\\n /// @param _msgId The msgId to check.\\n /// @return isRelayed True if the msg was relayed.\\n function isMsgRelayed(uint256 _msgId) external view returns(bool isRelayed) {\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1));\\n }\\n}\\n\",\"keccak256\":\"0xeb5a83ca5bd7d80f7cb115dc09851e4d25530e985e0b9a759e5d758f1a1732cb\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101606040523480156200001257600080fd5b50604051620021df380380620021df8339810160408190526200003591620000e1565b60a08790526101008690526101208590526101408490526001600160a01b03831660805260008290556001819055868686868686866200007760028862000167565b60c0819052620000898860026200018a565b620000959190620001aa565b60e05261010051600190620000ab904262000167565b620000b79190620001aa565b6005555050600980546001600160a01b0319163317905550620001c09a5050505050505050505050565b600080600080600080600060e0888a031215620000fd57600080fd5b8751602089015160408a015160608b015160808c0151939a50919850965094506001600160a01b03811681146200013357600080fd5b8093505060a0880151915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200018557634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001a457620001a462000151565b92915050565b81810381811115620001a457620001a462000151565b60805160a05160c05160e051610100516101205161014051611f07620002d860003960008181610578015281816106e001528181610e80015281816111b001526115b601526000818161068701526112ff0152600081816105ac015281816107040152818161086101528181610ea401528181611002015281816111d401526115da0152600081816104540152818161112b0152611aa701526000818161031c015281816110ea0152611a660152600081816105e0015281816108210152818161098a01528181610b6901528181610b9601528181610fc3015281816111760152818161183b015281816119070152611934015260008181610640015281816108960152818161144e01526116550152611f076000f3fe6080604052600436106101ee5760003560e01c8063836e344b1161010d578063b5b7a184116100a0578063eb8dedfa1161006f578063eb8dedfa1461062e578063eedcf2a914610662578063f3f480d914610675578063f4cf751b146106a9578063fccc2813146106c957600080fd5b8063b5b7a1841461059a578063d0e30db0146105ce578063d6e01b3914610602578063e813a7551461061857600080fd5b80639588eca2116100dc5780639588eca2146104d6578063a888c2cd146104ec578063ab82d9a014610553578063b044397e1461056657600080fd5b8063836e344b146104425780638a619a71146104765780638ad3a8f7146104965780638caeb7a8146104b657600080fd5b806344df8e70116101855780636496284911610154578063649628491461039e5780636b45ebcb146103be578063710cc9a71461040c5780637ffc2a6e1461042c57600080fd5b806344df8e701461030a5780634518f79f1461033e5780634a439cfe1461035e57806350b81dbe1461037e57600080fd5b80632c192519116101c15780632c1925191461026957806331d144571461028957806331ddf7431461029c57806343b066d5146102bc57600080fd5b80630e56752e146101f3578063114095d31461021c578063222ae7861461023e57806327ee6bdd14610253575b600080fd5b3480156101ff57600080fd5b5061020960015481565b6040519081526020015b60405180910390f35b34801561022857600080fd5b5061023c610237366004611ae2565b6106de565b005b34801561024a57600080fd5b5061020961085a565b34801561025f57600080fd5b5061020960055481565b34801561027557600080fd5b5061023c610284366004611afb565b61088b565b61023c610297366004611afb565b610971565b3480156102a857600080fd5b5061023c6102b7366004611c08565b610bdf565b3480156102c857600080fd5b506102fa6102d7366004611ae2565b600881811c60009081526020919091526040902054600160ff9092161c81161490565b6040519015158152602001610213565b34801561031657600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b34801561034a57600080fd5b5061023c610359366004611ae2565b610e7e565b34801561036a57600080fd5b50610209610379366004611ae2565b610ffb565b34801561038a57600080fd5b5061023c610399366004611ae2565b61102d565b3480156103aa57600080fd5b5061023c6103b9366004611ae2565b6111ae565b3480156103ca57600080fd5b506103f46103d9366004611ae2565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610213565b34801561041857600080fd5b5061023c610427366004611afb565b611443565b34801561043857600080fd5b5061020960025481565b34801561044e57600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b34801561048257600080fd5b5061023c610491366004611cf4565b611521565b3480156104a257600080fd5b506009546103f4906001600160a01b031681565b3480156104c257600080fd5b5061023c6104d1366004611afb565b6115b4565b3480156104e257600080fd5b5061020960045481565b3480156104f857600080fd5b50610543610507366004611ae2565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516102139493929190611d2c565b61023c610561366004611ae2565b611777565b34801561057257600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a657600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b3480156105da57600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b34801561060e57600080fd5b5061020960035481565b34801561062457600080fd5b5061020960005481565b34801561063a57600080fd5b506103f47f000000000000000000000000000000000000000000000000000000000000000081565b61023c610670366004611afb565b61197d565b34801561068157600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b3480156106b557600080fd5b5061023c6106c4366004611ae2565b611999565b3480156106d557600080fd5b506103f4600081565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161073157610731611d7b565b0403116107775760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff1660028111156107a5576107a5611d16565b146107e45760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161076e565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b03168015610856576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006108867f000000000000000000000000000000000000000000000000000000000000000042611da7565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146108de5760405162461bcd60e51b815260040161076e90611dc9565b80600254106109265760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161076e565b816000541461085657600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6009546001600160a01b0316331461098857600080fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156109f85760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e0000000000604482015260640161076e565b80610a365760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161076e565b6000828152600660205260409020600101546001600160a01b031615610a945760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161076e565b6040805160808101825282815233602080830191825263ffffffff4281168486019081526000606086018181528982526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610b2957610b29611d16565b02179055505060405182815283915033907fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d579060200160405180910390a37f0000000000000000000000000000000000000000000000000000000000000000341115610856576000610bbb7f000000000000000000000000000000000000000000000000000000000000000034611e00565b604051909150339082156108fc029083906000818181858888f15050505050505050565b6040845110610c225760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161076e565b6000838383604051602001610c3993929190611e43565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610cbb576000868281518110610c7c57610c7c611e85565b6020026020010151905082811115610ca257826000528060205260406000209250610cb2565b8060005282602052604060002092505b50600101610c5f565b508060045414610cfe5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161076e565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610d755760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161076e565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610da3908890611e9b565b6000604051808303816000865af19150503d8060008114610de0576040519150601f19603f3d011682016040523d82523d6000602084013e610de5565b606091505b5050905080610e365760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161076e565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f00000000000000000000000000000000000000000000000000000000000000004281610ed157610ed1611d7b565b040311610f125760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161076e565b60008082815260066020526040902060010154600160c01b900460ff166002811115610f4057610f40611d16565b14610f7f5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161076e565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b03168015610856576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006110277f000000000000000000000000000000000000000000000000000000000000000083611da7565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff16600281111561105c5761105c611d16565b1461109f5760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b604482015260640161076e565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b03918216911615611166576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161120157611201611d7b565b040311156112445760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161076e565b600081815260066020526040902060010154600160a01b900463ffffffff16806112a15760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161076e565b6000828152600760205260409020546001600160a01b0316156112fd5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161076e565b7f000000000000000000000000000000000000000000000000000000000000000060015460005460026113309190611ea7565b61133a9190611ebe565b6113449190611ebe565b61134e8242611e00565b10156113c25760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e000000000000000000606482015260840161076e565b60055482111561141e5760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f7906114159084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146114965760405162461bcd60e51b815260040161076e90611dc9565b80600354106114de5760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161076e565b816001541461085657600182905560038190556040518281527f5328ca176e0092ea14be7c843a94b093c0fe88c93d9c01ab0f0281d9e62e405590602001610965565b6009546001600160a01b0316331461153857600080fd5b6009546001600160a01b031633146115925760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f720000000000000000604482015260640161076e565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161160757611607611d7b565b0403111561164a5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161076e565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461169d5760405162461bcd60e51b815260040161076e90611dc9565b600554821180156116ad57508015155b156116f057600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b6000828152600660205260409020548015611772578181036117325750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b031615611772576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b0316156117dc5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161076e565b6000818152600660205260409020600101546001600160a01b03166118395760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b604482015260640161076e565b7f00000000000000000000000000000000000000000000000000000000000000003410156118a95760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e00604482015260640161076e565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7906118fd9084815260200190565b60405180910390a27f000000000000000000000000000000000000000000000000000000000000000034111561197a5760006119597f000000000000000000000000000000000000000000000000000000000000000034611e00565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b6119878282610971565b611990826111ae565b6108568261102d565b6002600082815260066020526040902060010154600160c01b900460ff1660028111156119c8576119c8611d16565b14611a155760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e000000000000000000604482015260640161076e565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600060208284031215611af457600080fd5b5035919050565b60008060408385031215611b0e57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611b5c57611b5c611b1d565b604052919050565b803567ffffffffffffffff81168114611b7c57600080fd5b919050565b80356001600160a01b0381168114611b7c57600080fd5b600082601f830112611ba957600080fd5b813567ffffffffffffffff811115611bc357611bc3611b1d565b611bd6601f8201601f1916602001611b33565b818152846020838601011115611beb57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611c1e57600080fd5b843567ffffffffffffffff80821115611c3657600080fd5b818701915087601f830112611c4a57600080fd5b8135602082821115611c5e57611c5e611b1d565b8160051b611c6d828201611b33565b928352848101820192828101908c851115611c8757600080fd5b958301955b84871015611ca557863582529583019590830190611c8c565b9950611cb5915050898201611b64565b96505050611cc560408801611b81565b93506060870135915080821115611cdb57600080fd5b50611ce887828801611b98565b91505092959194509250565b600060208284031215611d0657600080fd5b611d0f82611b81565b9392505050565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611d6c57634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611dc457634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b8181038181111561102757611027611d91565b6000815160005b81811015611e345760208185018101518683015201611e1a565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611e7c601c830184611e13565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611d0f8284611e13565b808202811582820484141761102757611027611d91565b8082018082111561102757611027611d9156fea2646970667358221220c6ccf20f30d0818d2c2f4feb9ef7fc3d66f9bb2fa7b7b01d57181b1ecc86abcb64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101ee5760003560e01c8063836e344b1161010d578063b5b7a184116100a0578063eb8dedfa1161006f578063eb8dedfa1461062e578063eedcf2a914610662578063f3f480d914610675578063f4cf751b146106a9578063fccc2813146106c957600080fd5b8063b5b7a1841461059a578063d0e30db0146105ce578063d6e01b3914610602578063e813a7551461061857600080fd5b80639588eca2116100dc5780639588eca2146104d6578063a888c2cd146104ec578063ab82d9a014610553578063b044397e1461056657600080fd5b8063836e344b146104425780638a619a71146104765780638ad3a8f7146104965780638caeb7a8146104b657600080fd5b806344df8e70116101855780636496284911610154578063649628491461039e5780636b45ebcb146103be578063710cc9a71461040c5780637ffc2a6e1461042c57600080fd5b806344df8e701461030a5780634518f79f1461033e5780634a439cfe1461035e57806350b81dbe1461037e57600080fd5b80632c192519116101c15780632c1925191461026957806331d144571461028957806331ddf7431461029c57806343b066d5146102bc57600080fd5b80630e56752e146101f3578063114095d31461021c578063222ae7861461023e57806327ee6bdd14610253575b600080fd5b3480156101ff57600080fd5b5061020960015481565b6040519081526020015b60405180910390f35b34801561022857600080fd5b5061023c610237366004611ae2565b6106de565b005b34801561024a57600080fd5b5061020961085a565b34801561025f57600080fd5b5061020960055481565b34801561027557600080fd5b5061023c610284366004611afb565b61088b565b61023c610297366004611afb565b610971565b3480156102a857600080fd5b5061023c6102b7366004611c08565b610bdf565b3480156102c857600080fd5b506102fa6102d7366004611ae2565b600881811c60009081526020919091526040902054600160ff9092161c81161490565b6040519015158152602001610213565b34801561031657600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b34801561034a57600080fd5b5061023c610359366004611ae2565b610e7e565b34801561036a57600080fd5b50610209610379366004611ae2565b610ffb565b34801561038a57600080fd5b5061023c610399366004611ae2565b61102d565b3480156103aa57600080fd5b5061023c6103b9366004611ae2565b6111ae565b3480156103ca57600080fd5b506103f46103d9366004611ae2565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610213565b34801561041857600080fd5b5061023c610427366004611afb565b611443565b34801561043857600080fd5b5061020960025481565b34801561044e57600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b34801561048257600080fd5b5061023c610491366004611cf4565b611521565b3480156104a257600080fd5b506009546103f4906001600160a01b031681565b3480156104c257600080fd5b5061023c6104d1366004611afb565b6115b4565b3480156104e257600080fd5b5061020960045481565b3480156104f857600080fd5b50610543610507366004611ae2565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516102139493929190611d2c565b61023c610561366004611ae2565b611777565b34801561057257600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a657600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b3480156105da57600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b34801561060e57600080fd5b5061020960035481565b34801561062457600080fd5b5061020960005481565b34801561063a57600080fd5b506103f47f000000000000000000000000000000000000000000000000000000000000000081565b61023c610670366004611afb565b61197d565b34801561068157600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b3480156106b557600080fd5b5061023c6106c4366004611ae2565b611999565b3480156106d557600080fd5b506103f4600081565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161073157610731611d7b565b0403116107775760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff1660028111156107a5576107a5611d16565b146107e45760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161076e565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b03168015610856576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006108867f000000000000000000000000000000000000000000000000000000000000000042611da7565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146108de5760405162461bcd60e51b815260040161076e90611dc9565b80600254106109265760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161076e565b816000541461085657600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6009546001600160a01b0316331461098857600080fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156109f85760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e0000000000604482015260640161076e565b80610a365760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161076e565b6000828152600660205260409020600101546001600160a01b031615610a945760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161076e565b6040805160808101825282815233602080830191825263ffffffff4281168486019081526000606086018181528982526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610b2957610b29611d16565b02179055505060405182815283915033907fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d579060200160405180910390a37f0000000000000000000000000000000000000000000000000000000000000000341115610856576000610bbb7f000000000000000000000000000000000000000000000000000000000000000034611e00565b604051909150339082156108fc029083906000818181858888f15050505050505050565b6040845110610c225760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161076e565b6000838383604051602001610c3993929190611e43565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610cbb576000868281518110610c7c57610c7c611e85565b6020026020010151905082811115610ca257826000528060205260406000209250610cb2565b8060005282602052604060002092505b50600101610c5f565b508060045414610cfe5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161076e565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610d755760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161076e565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610da3908890611e9b565b6000604051808303816000865af19150503d8060008114610de0576040519150601f19603f3d011682016040523d82523d6000602084013e610de5565b606091505b5050905080610e365760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161076e565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f00000000000000000000000000000000000000000000000000000000000000004281610ed157610ed1611d7b565b040311610f125760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161076e565b60008082815260066020526040902060010154600160c01b900460ff166002811115610f4057610f40611d16565b14610f7f5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161076e565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b03168015610856576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006110277f000000000000000000000000000000000000000000000000000000000000000083611da7565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff16600281111561105c5761105c611d16565b1461109f5760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b604482015260640161076e565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b03918216911615611166576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161120157611201611d7b565b040311156112445760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161076e565b600081815260066020526040902060010154600160a01b900463ffffffff16806112a15760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161076e565b6000828152600760205260409020546001600160a01b0316156112fd5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161076e565b7f000000000000000000000000000000000000000000000000000000000000000060015460005460026113309190611ea7565b61133a9190611ebe565b6113449190611ebe565b61134e8242611e00565b10156113c25760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e000000000000000000606482015260840161076e565b60055482111561141e5760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f7906114159084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146114965760405162461bcd60e51b815260040161076e90611dc9565b80600354106114de5760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161076e565b816001541461085657600182905560038190556040518281527f5328ca176e0092ea14be7c843a94b093c0fe88c93d9c01ab0f0281d9e62e405590602001610965565b6009546001600160a01b0316331461153857600080fd5b6009546001600160a01b031633146115925760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f720000000000000000604482015260640161076e565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161160757611607611d7b565b0403111561164a5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161076e565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461169d5760405162461bcd60e51b815260040161076e90611dc9565b600554821180156116ad57508015155b156116f057600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b6000828152600660205260409020548015611772578181036117325750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b031615611772576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b0316156117dc5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161076e565b6000818152600660205260409020600101546001600160a01b03166118395760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b604482015260640161076e565b7f00000000000000000000000000000000000000000000000000000000000000003410156118a95760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e00604482015260640161076e565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7906118fd9084815260200190565b60405180910390a27f000000000000000000000000000000000000000000000000000000000000000034111561197a5760006119597f000000000000000000000000000000000000000000000000000000000000000034611e00565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b6119878282610971565b611990826111ae565b6108568261102d565b6002600082815260066020526040902060010154600160c01b900460ff1660028111156119c8576119c8611d16565b14611a155760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e000000000000000000604482015260640161076e565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600060208284031215611af457600080fd5b5035919050565b60008060408385031215611b0e57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611b5c57611b5c611b1d565b604052919050565b803567ffffffffffffffff81168114611b7c57600080fd5b919050565b80356001600160a01b0381168114611b7c57600080fd5b600082601f830112611ba957600080fd5b813567ffffffffffffffff811115611bc357611bc3611b1d565b611bd6601f8201601f1916602001611b33565b818152846020838601011115611beb57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611c1e57600080fd5b843567ffffffffffffffff80821115611c3657600080fd5b818701915087601f830112611c4a57600080fd5b8135602082821115611c5e57611c5e611b1d565b8160051b611c6d828201611b33565b928352848101820192828101908c851115611c8757600080fd5b958301955b84871015611ca557863582529583019590830190611c8c565b9950611cb5915050898201611b64565b96505050611cc560408801611b81565b93506060870135915080821115611cdb57600080fd5b50611ce887828801611b98565b91505092959194509250565b600060208284031215611d0657600080fd5b611d0f82611b81565b9392505050565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611d6c57634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611dc457634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b8181038181111561102757611027611d91565b6000815160005b81811015611e345760208185018101518683015201611e1a565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611e7c601c830184611e13565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611d0f8284611e13565b808202811582820484141761102757611027611d91565b8082018082111561102757611027611d9156fea2646970667358221220c6ccf20f30d0818d2c2f4feb9ef7fc3d66f9bb2fa7b7b01d57181b1ecc86abcb64736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Chiado to ArbitrumGoerli. Note: This contract is deployed on ArbitrumGoerli. Note: This contract is permissioned for developer testing (devnet).", "events": { @@ -656,9 +708,15 @@ } }, "sequencerDelayLimitUpdateReceived(uint256)": { - "details": "This event indicates the sequencer limit updated.", + "details": "This event indicates the sequencer delay limit updated.", + "params": { + "_newSequencerDelayLimit": "The new max sequencer past timestamping power." + } + }, + "sequencerFutureLimitUpdateReceived(uint256)": { + "details": "This event indicates the sequencer futue limit updated.", "params": { - "_newsequencerDelayLimit": "The new maxL2StateSyncDelay." + "_newSequencerFutureLimit": "The new max sequencer future timestamping power." } } }, @@ -714,6 +772,15 @@ "epoch": "The hash of the claim." } }, + "isMsgRelayed(uint256)": { + "details": "Get the msg relayed status.", + "params": { + "_msgId": "The msgId to check." + }, + "returns": { + "isRelayed": "True if the msg was relayed." + } + }, "resolveDisputedClaim(uint256,bytes32)": { "details": "Resolves any challenge of the optimistic claim for '_epoch'.", "params": { @@ -724,10 +791,10 @@ "sendMessage(bytes32[],uint64,address,bytes)": { "details": "Verifies and relays the message. UNTRUSTED.", "params": { - "_message": "The message encoded with header from VeaInbox.", + "_message": "The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)", "_msgId": "The zero based index of the message in the inbox.", - "_proof": "The merkle proof to prove the message.", - "_to": "The address of the contract on Gnosis to call." + "_proof": "The merkle proof to prove the message inclusion in the inbox state root.", + "_to": "The address of the contract on Arbitrum to call." } }, "updateSequencerDelayLimit(uint256,uint256)": { @@ -789,7 +856,7 @@ "storageLayout": { "storage": [ { - "astId": 4180, + "astId": 5535, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "sequencerDelayLimit", "offset": 0, @@ -797,7 +864,7 @@ "type": "t_uint256" }, { - "astId": 4182, + "astId": 5537, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "sequencerFutureLimit", "offset": 0, @@ -805,7 +872,7 @@ "type": "t_uint256" }, { - "astId": 4184, + "astId": 5539, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "timestampDelayUpdated", "offset": 0, @@ -813,7 +880,7 @@ "type": "t_uint256" }, { - "astId": 4186, + "astId": 5541, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "timestampFutureUpdated", "offset": 0, @@ -821,7 +888,7 @@ "type": "t_uint256" }, { - "astId": 4188, + "astId": 5543, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "stateRoot", "offset": 0, @@ -829,7 +896,7 @@ "type": "t_bytes32" }, { - "astId": 4190, + "astId": 5545, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "latestVerifiedEpoch", "offset": 0, @@ -837,15 +904,15 @@ "type": "t_uint256" }, { - "astId": 4195, + "astId": 5550, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "claims", "offset": 0, "slot": "6", - "type": "t_mapping(t_uint256,t_struct(Claim)4217_storage)" + "type": "t_mapping(t_uint256,t_struct(Claim)5572_storage)" }, { - "astId": 4199, + "astId": 5554, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "challengers", "offset": 0, @@ -853,7 +920,7 @@ "type": "t_mapping(t_uint256,t_address)" }, { - "astId": 4203, + "astId": 5558, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "relayed", "offset": 0, @@ -861,7 +928,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 3824, + "astId": 4757, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "devnetOperator", "offset": 0, @@ -880,7 +947,7 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_enum(Party)4207": { + "t_enum(Party)5562": { "encoding": "inplace", "label": "enum VeaOutboxGnosisToArb.Party", "numberOfBytes": "1" @@ -899,19 +966,19 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_mapping(t_uint256,t_struct(Claim)4217_storage)": { + "t_mapping(t_uint256,t_struct(Claim)5572_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct VeaOutboxGnosisToArb.Claim)", "numberOfBytes": "32", - "value": "t_struct(Claim)4217_storage" + "value": "t_struct(Claim)5572_storage" }, - "t_struct(Claim)4217_storage": { + "t_struct(Claim)5572_storage": { "encoding": "inplace", "label": "struct VeaOutboxGnosisToArb.Claim", "members": [ { - "astId": 4209, + "astId": 5564, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "stateRoot", "offset": 0, @@ -919,7 +986,7 @@ "type": "t_bytes32" }, { - "astId": 4211, + "astId": 5566, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "claimer", "offset": 0, @@ -927,7 +994,7 @@ "type": "t_address" }, { - "astId": 4213, + "astId": 5568, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "timestamp", "offset": 20, @@ -935,12 +1002,12 @@ "type": "t_uint32" }, { - "astId": 4216, + "astId": 5571, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "honest", "offset": 24, "slot": "1", - "type": "t_enum(Party)4207" + "type": "t_enum(Party)5562" } ], "numberOfBytes": "64" diff --git a/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbTestnet.json b/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbTestnet.json index c4cb3534..581252b5 100644 --- a/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbTestnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbTestnet.json @@ -1,5 +1,5 @@ { - "address": "0xF0492e87Be6d644A6a467fE20ee9EC5eFCB6cB23", + "address": "0x62581B897330CA4044C4db79Ebe96ca230569492", "abi": [ { "inputs": [ @@ -71,7 +71,7 @@ "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "_epoch", "type": "uint256" @@ -118,13 +118,52 @@ { "indexed": false, "internalType": "uint256", - "name": "_newsequencerDelayLimit", + "name": "_newSequencerDelayLimit", "type": "uint256" } ], "name": "sequencerDelayLimitUpdateReceived", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newSequencerFutureLimit", + "type": "uint256" + } + ], + "name": "sequencerFutureLimitUpdateReceived", + "type": "event" + }, + { + "inputs": [], + "name": "BURN_ADDRESS", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "burn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -235,6 +274,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "depositPlusReward", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -281,34 +333,34 @@ "type": "function" }, { - "inputs": [], - "name": "latestVerifiedEpoch", - "outputs": [ + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "_msgId", "type": "uint256" } ], + "name": "isMsgRelayed", + "outputs": [ + { + "internalType": "bool", + "name": "isRelayed", + "type": "bool" + } + ], "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "latestVerifiedEpoch", + "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], - "name": "relayed", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], "stateMutability": "view", "type": "function" }, @@ -551,19 +603,19 @@ "type": "function" } ], - "transactionHash": "0x3f6c0bc3231f8d3bc295b945ffa1045c99324893887cdd6ccbfa9e2065b5e05d", + "transactionHash": "0x1695e89203559d6480d0030faa38c09dd543701116e9649f23da040c9961e1a3", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xF0492e87Be6d644A6a467fE20ee9EC5eFCB6cB23", + "contractAddress": "0x62581B897330CA4044C4db79Ebe96ca230569492", "transactionIndex": 1, - "gasUsed": "59059459", + "gasUsed": "1785672", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x5c665f88a8b40978b877644ede92816e1818b678a185055dd7ef2ab149d384e5", - "transactionHash": "0x3f6c0bc3231f8d3bc295b945ffa1045c99324893887cdd6ccbfa9e2065b5e05d", + "blockHash": "0x8fe19c396efc5cd46140a9ed03e1a3bee904aec2f3e5e9675073f67719888d6a", + "transactionHash": "0x1695e89203559d6480d0030faa38c09dd543701116e9649f23da040c9961e1a3", "logs": [], - "blockNumber": 28631092, - "cumulativeGasUsed": "59059459", + "blockNumber": 28848665, + "cumulativeGasUsed": "1785672", "status": 1, "byzantium": true }, @@ -572,15 +624,15 @@ 7200, 86400, 168, - "0x531754c9935A851173FA349b3bEadAF538c570aC", + "0x84de475fed07406aA3B05248f1a7b0Fca11DA012", 86400, 3600 ], - "numDeployments": 3, - "solcInputHash": "6b0b750c6eee9aa0a5e450d1f0bbb2d2", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerFutureLimit\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newsequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"challengers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claims\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"enum VeaOutboxGnosisToArb.Party\",\"name\":\"honest\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampFutureUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Gnosis to Arbitrum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newsequencerDelayLimit\":\"The new maxL2StateSyncDelay.\"}}},\"kind\":\"dev\",\"methods\":{\"challenge(uint256)\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_routerGnosisToArb\":\"The address of the router on Ethereum that routes from Arbitrum to Ethereum.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_sequencerFutureLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded with header from VeaInbox.\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"updateSequencerFutureLimit(uint256,uint256)\":{\"details\":\"Set the sequencerFutureLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerFutureLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256)\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32)\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":\"VeaOutboxGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/AddressAliasHelper.sol\":{\"content\":\"// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/libraries/AddressAliasHelper.sol\\n// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressAliasHelper {\\n uint160 internal 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\",\"keccak256\":\"0xfa8b6907a33c37e13b3de6e2459d6bd153708be4b8413db3c319ea3a5d8c9b00\",\"license\":\"BUSL-1.1\"},\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/AddressAliasHelper.sol\\\";\\n\\n/// @dev Vea Outbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaOutboxGnosisToArb is IVeaOutboxOnL2 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public immutable routerGnosisToArb; // The address of the router from Gnosis to Arbitrum on Ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // address to send burned eth\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable challengePeriod; // Claim challenge timewindow.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n uint256 public timestampFutureUpdated; // The timestamp of the last sequencer future update.\\n\\n bytes32 public stateRoot;\\n uint256 public latestVerifiedEpoch;\\n\\n mapping(uint256 => Claim) public claims; // epoch => claim\\n mapping(uint256 => address) public challengers; // epoch => challenger\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n enum Party {\\n None,\\n Claimer,\\n Challenger\\n }\\n\\n struct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestamp;\\n Party honest;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay.\\n event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod <= latestVerifiedEpoch + timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod > latestVerifiedEpoch + timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit\\n ) {\\n deposit = _deposit;\\n epochPeriod = _epochPeriod;\\n challengePeriod = _challengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n routerGnosisToArb = _routerGnosisToArb;\\n sequencerDelayLimit = _sequencerDelayLimit;\\n sequencerFutureLimit = _sequencerFutureLimit;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerFutureLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerFutureLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampFutureUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerFutureLimit != _newSequencerFutureLimit) {\\n sequencerFutureLimit = _newSequencerFutureLimit;\\n timestampFutureUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Set the sequencerDelayLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch is invalid.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n function challenge(uint256 _epoch) external payable virtual {\\n require(challengers[_epoch] == address(0), \\\"Claim already challenged.\\\");\\n require(claims[_epoch].claimer != address(0), \\\"No claim for epoch.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n\\n challengers[_epoch] = msg.sender;\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) external virtual OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external virtual OnlyBridgeRunning {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n bytes32 claimedStateRoot = claims[_epoch].stateRoot;\\n\\n if (claimedStateRoot != bytes32(0)) {\\n if (claimedStateRoot == _stateRoot) {\\n claims[_epoch].honest = Party.Claimer;\\n } else if (challengers[_epoch] != address(0)) {\\n claims[_epoch].honest = Party.Challenger;\\n }\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded with header from VeaInbox.\\n function sendMessage(bytes32[] memory _proof, uint64 _msgId, address _to, bytes memory _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) external virtual {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n function withdrawChallengeDeposit(uint256 _epoch) external {\\n require(claims[_epoch].honest == Party.Challenger, \\\"Challenge unsuccessful.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete claims[_epoch];\\n delete challengers[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (claimer != address(0)) {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawChallengerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete challengers[_epoch];\\n\\n if (challenger != address(0)) {\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x999ccae7dfc58d5c0e51726634e049b48ebc00dfeb2541f99d818f89a82a169b\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101606040523480156200001257600080fd5b5060405162002010380380620020108339810160408190526200003591620000c1565b60a08790526101008690526101208590526101408490526001600160a01b038316608052600082905560018190556200007060028862000147565b60c0819052620000828860026200016a565b6200008e91906200018a565b60e05261010051600190620000a4904262000147565b620000b091906200018a565b60055550620001a095505050505050565b600080600080600080600060e0888a031215620000dd57600080fd5b8751602089015160408a015160608b015160808c0151939a50919850965094506001600160a01b03811681146200011357600080fd5b8093505060a0880151915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200016557634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000184576200018462000131565b92915050565b8181038181111562000184576200018462000131565b60805160a05160c05160e051610100516101205161014051611d5f620002b16000396000818161045d0152818161059d01528181610da2015281816110d201526114450152600081816105590152611221015260008181610491015281816105c20152818161071e015281816108a501528181610dc701528181610f24015281816110f7015261146a01526000818161104d015261191a01526000818161100c01526118d90152600081816104c5015281816106de0152818161083001528181610a8b01528181610ab801528181610ee501528181611098015281816116ca0152818161179601526117c3015260008181610525015281816107530152818161137001526114e40152611d5f6000f3fe60806040526004361061019c5760003560e01c80637ffc2a6e116100ec578063b5b7a1841161008a578063e813a75511610064578063e813a755146104fd578063eb8dedfa14610513578063f3f480d914610547578063f4cf751b1461057b57600080fd5b8063b5b7a1841461047f578063d0e30db0146104b3578063d6e01b39146104e757600080fd5b80639588eca2116100c65780639588eca2146103bb578063a888c2cd146103d1578063ab82d9a014610438578063b044397e1461044b57600080fd5b80637ffc2a6e146103585780638caeb7a81461036e57806390df63b71461038e57600080fd5b806331ddf7431161015957806350b81dbe1161013357806350b81dbe146102aa57806364962849146102ca5780636b45ebcb146102ea578063710cc9a71461033857600080fd5b806331ddf7431461024a5780634518f79f1461026a5780634a439cfe1461028a57600080fd5b80630e56752e146101a1578063114095d3146101ca578063222ae786146101ec57806327ee6bdd146102015780632c1925191461021757806331d1445714610237575b600080fd5b3480156101ad57600080fd5b506101b760015481565b6040519081526020015b60405180910390f35b3480156101d657600080fd5b506101ea6101e5366004611955565b61059b565b005b3480156101f857600080fd5b506101b7610717565b34801561020d57600080fd5b506101b760055481565b34801561022357600080fd5b506101ea61023236600461196e565b610748565b6101ea61024536600461196e565b61082e565b34801561025657600080fd5b506101ea610265366004611a7b565b610b01565b34801561027657600080fd5b506101ea610285366004611955565b610da0565b34801561029657600080fd5b506101b76102a5366004611955565b610f1d565b3480156102b657600080fd5b506101ea6102c5366004611955565b610f4f565b3480156102d657600080fd5b506101ea6102e5366004611955565b6110d0565b3480156102f657600080fd5b50610320610305366004611955565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101c1565b34801561034457600080fd5b506101ea61035336600461196e565b611365565b34801561036457600080fd5b506101b760025481565b34801561037a57600080fd5b506101ea61038936600461196e565b611443565b34801561039a57600080fd5b506101b76103a9366004611955565b60086020526000908152604090205481565b3480156103c757600080fd5b506101b760045481565b3480156103dd57600080fd5b506104286103ec366004611955565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516101c19493929190611b7d565b6101ea610446366004611955565b611606565b34801561045757600080fd5b506101b77f000000000000000000000000000000000000000000000000000000000000000081565b34801561048b57600080fd5b506101b77f000000000000000000000000000000000000000000000000000000000000000081565b3480156104bf57600080fd5b506101b77f000000000000000000000000000000000000000000000000000000000000000081565b3480156104f357600080fd5b506101b760035481565b34801561050957600080fd5b506101b760005481565b34801561051f57600080fd5b506103207f000000000000000000000000000000000000000000000000000000000000000081565b34801561055357600080fd5b506101b77f000000000000000000000000000000000000000000000000000000000000000081565b34801561058757600080fd5b506101ea610596366004611955565b61180c565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f000000000000000000000000000000000000000000000000000000000000000042816105ef576105ef611bcc565b04116106345760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff16600281111561066257610662611b67565b146106a15760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161062b565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b03168015610713576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006107437f000000000000000000000000000000000000000000000000000000000000000042611bf8565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461079b5760405162461bcd60e51b815260040161062b90611c1a565b80600254106107e35760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161062b565b816000541461071357600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b7f000000000000000000000000000000000000000000000000000000000000000034101561089e5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e0000000000604482015260640161062b565b60016108ca7f000000000000000000000000000000000000000000000000000000000000000042611bf8565b6108d49190611c51565b82146109165760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b604482015260640161062b565b806109545760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161062b565b6000828152600660205260409020600101546001600160a01b0316156109b25760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161062b565b6040805160808101825282815233602080830191825263ffffffff4281168486019081526000606086018181528982526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610a4757610a47611b67565b02179055505060408051848152602081018490523392507fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115610713576000610add7f000000000000000000000000000000000000000000000000000000000000000034611c51565b604051909150339082156108fc029083906000818181858888f15050505050505050565b6040845110610b445760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161062b565b6000838383604051602001610b5b93929190611c94565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610bdd576000868281518110610b9e57610b9e611cd6565b6020026020010151905082811115610bc457826000528060205260406000209250610bd4565b8060005282602052604060002092505b50600101610b81565b508060045414610c205760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161062b565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610c975760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161062b565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610cc5908890611cec565b6000604051808303816000865af19150503d8060008114610d02576040519150601f19603f3d011682016040523d82523d6000602084013e610d07565b606091505b5050905080610d585760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161062b565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f00000000000000000000000000000000000000000000000000000000000000004281610df457610df4611bcc565b0411610e345760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161062b565b60008082815260066020526040902060010154600160c01b900460ff166002811115610e6257610e62611b67565b14610ea15760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161062b565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b03168015610713576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6000610f497f000000000000000000000000000000000000000000000000000000000000000083611bf8565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff166002811115610f7e57610f7e611b67565b14610fc15760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b604482015260640161062b565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b03918216911615611088576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161112457611124611bcc565b0411156111665760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161062b565b600081815260066020526040902060010154600160a01b900463ffffffff16806111c35760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161062b565b6000828152600760205260409020546001600160a01b03161561121f5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161062b565b7f000000000000000000000000000000000000000000000000000000000000000060015460005460026112529190611cff565b61125c9190611d16565b6112669190611d16565b6112708242611c51565b10156112e45760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e000000000000000000606482015260840161062b565b6005548211156113405760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f7906113379084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146113b85760405162461bcd60e51b815260040161062b90611c1a565b80600354106114005760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161062b565b816001541461071357600182905560038190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa70790602001610822565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161149757611497611bcc565b0411156114d95760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161062b565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461152c5760405162461bcd60e51b815260040161062b90611c1a565b6005548211801561153c57508015155b1561157f57600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b6000828152600660205260409020548015611601578181036115c15750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b031615611601576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b03161561166b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161062b565b6000818152600660205260409020600101546001600160a01b03166116c85760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b604482015260640161062b565b7f00000000000000000000000000000000000000000000000000000000000000003410156117385760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e00604482015260640161062b565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d79061178c9084815260200190565b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156118095760006117e87f000000000000000000000000000000000000000000000000000000000000000034611c51565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b6002600082815260066020526040902060010154600160c01b900460ff16600281111561183b5761183b611b67565b146118885760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e000000000000000000604482015260640161062b565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b60006020828403121561196757600080fd5b5035919050565b6000806040838503121561198157600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156119cf576119cf611990565b604052919050565b803567ffffffffffffffff811681146119ef57600080fd5b919050565b80356001600160a01b03811681146119ef57600080fd5b600082601f830112611a1c57600080fd5b813567ffffffffffffffff811115611a3657611a36611990565b611a49601f8201601f19166020016119a6565b818152846020838601011115611a5e57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611a9157600080fd5b843567ffffffffffffffff80821115611aa957600080fd5b818701915087601f830112611abd57600080fd5b8135602082821115611ad157611ad1611990565b8160051b611ae08282016119a6565b928352848101820192828101908c851115611afa57600080fd5b958301955b84871015611b1857863582529583019590830190611aff565b9950611b289150508982016119d7565b96505050611b38604088016119f4565b93506060870135915080821115611b4e57600080fd5b50611b5b87828801611a0b565b91505092959194509250565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611bbd57634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611c1557634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b81810381811115610f4957610f49611be2565b6000815160005b81811015611c855760208185018101518683015201611c6b565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611ccd601c830184611c64565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611cf88284611c64565b9392505050565b8082028115828204841417610f4957610f49611be2565b80820180821115610f4957610f49611be256fea264697066735822122039fffbfa0ff1f969a1c91abf7f0c19828e05fda7df5768914b1c5e812ad01eff64736f6c63430008120033", - "deployedBytecode": "0x60806040526004361061019c5760003560e01c80637ffc2a6e116100ec578063b5b7a1841161008a578063e813a75511610064578063e813a755146104fd578063eb8dedfa14610513578063f3f480d914610547578063f4cf751b1461057b57600080fd5b8063b5b7a1841461047f578063d0e30db0146104b3578063d6e01b39146104e757600080fd5b80639588eca2116100c65780639588eca2146103bb578063a888c2cd146103d1578063ab82d9a014610438578063b044397e1461044b57600080fd5b80637ffc2a6e146103585780638caeb7a81461036e57806390df63b71461038e57600080fd5b806331ddf7431161015957806350b81dbe1161013357806350b81dbe146102aa57806364962849146102ca5780636b45ebcb146102ea578063710cc9a71461033857600080fd5b806331ddf7431461024a5780634518f79f1461026a5780634a439cfe1461028a57600080fd5b80630e56752e146101a1578063114095d3146101ca578063222ae786146101ec57806327ee6bdd146102015780632c1925191461021757806331d1445714610237575b600080fd5b3480156101ad57600080fd5b506101b760015481565b6040519081526020015b60405180910390f35b3480156101d657600080fd5b506101ea6101e5366004611955565b61059b565b005b3480156101f857600080fd5b506101b7610717565b34801561020d57600080fd5b506101b760055481565b34801561022357600080fd5b506101ea61023236600461196e565b610748565b6101ea61024536600461196e565b61082e565b34801561025657600080fd5b506101ea610265366004611a7b565b610b01565b34801561027657600080fd5b506101ea610285366004611955565b610da0565b34801561029657600080fd5b506101b76102a5366004611955565b610f1d565b3480156102b657600080fd5b506101ea6102c5366004611955565b610f4f565b3480156102d657600080fd5b506101ea6102e5366004611955565b6110d0565b3480156102f657600080fd5b50610320610305366004611955565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101c1565b34801561034457600080fd5b506101ea61035336600461196e565b611365565b34801561036457600080fd5b506101b760025481565b34801561037a57600080fd5b506101ea61038936600461196e565b611443565b34801561039a57600080fd5b506101b76103a9366004611955565b60086020526000908152604090205481565b3480156103c757600080fd5b506101b760045481565b3480156103dd57600080fd5b506104286103ec366004611955565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516101c19493929190611b7d565b6101ea610446366004611955565b611606565b34801561045757600080fd5b506101b77f000000000000000000000000000000000000000000000000000000000000000081565b34801561048b57600080fd5b506101b77f000000000000000000000000000000000000000000000000000000000000000081565b3480156104bf57600080fd5b506101b77f000000000000000000000000000000000000000000000000000000000000000081565b3480156104f357600080fd5b506101b760035481565b34801561050957600080fd5b506101b760005481565b34801561051f57600080fd5b506103207f000000000000000000000000000000000000000000000000000000000000000081565b34801561055357600080fd5b506101b77f000000000000000000000000000000000000000000000000000000000000000081565b34801561058757600080fd5b506101ea610596366004611955565b61180c565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f000000000000000000000000000000000000000000000000000000000000000042816105ef576105ef611bcc565b04116106345760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff16600281111561066257610662611b67565b146106a15760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161062b565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b03168015610713576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006107437f000000000000000000000000000000000000000000000000000000000000000042611bf8565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461079b5760405162461bcd60e51b815260040161062b90611c1a565b80600254106107e35760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161062b565b816000541461071357600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b7f000000000000000000000000000000000000000000000000000000000000000034101561089e5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e0000000000604482015260640161062b565b60016108ca7f000000000000000000000000000000000000000000000000000000000000000042611bf8565b6108d49190611c51565b82146109165760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b604482015260640161062b565b806109545760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161062b565b6000828152600660205260409020600101546001600160a01b0316156109b25760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161062b565b6040805160808101825282815233602080830191825263ffffffff4281168486019081526000606086018181528982526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610a4757610a47611b67565b02179055505060408051848152602081018490523392507fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a27f0000000000000000000000000000000000000000000000000000000000000000341115610713576000610add7f000000000000000000000000000000000000000000000000000000000000000034611c51565b604051909150339082156108fc029083906000818181858888f15050505050505050565b6040845110610b445760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161062b565b6000838383604051602001610b5b93929190611c94565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610bdd576000868281518110610b9e57610b9e611cd6565b6020026020010151905082811115610bc457826000528060205260406000209250610bd4565b8060005282602052604060002092505b50600101610b81565b508060045414610c205760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161062b565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610c975760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161062b565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610cc5908890611cec565b6000604051808303816000865af19150503d8060008114610d02576040519150601f19603f3d011682016040523d82523d6000602084013e610d07565b606091505b5050905080610d585760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161062b565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f00000000000000000000000000000000000000000000000000000000000000004281610df457610df4611bcc565b0411610e345760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161062b565b60008082815260066020526040902060010154600160c01b900460ff166002811115610e6257610e62611b67565b14610ea15760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161062b565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b03168015610713576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6000610f497f000000000000000000000000000000000000000000000000000000000000000083611bf8565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff166002811115610f7e57610f7e611b67565b14610fc15760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b604482015260640161062b565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b03918216911615611088576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161112457611124611bcc565b0411156111665760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161062b565b600081815260066020526040902060010154600160a01b900463ffffffff16806111c35760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161062b565b6000828152600760205260409020546001600160a01b03161561121f5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161062b565b7f000000000000000000000000000000000000000000000000000000000000000060015460005460026112529190611cff565b61125c9190611d16565b6112669190611d16565b6112708242611c51565b10156112e45760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e000000000000000000606482015260840161062b565b6005548211156113405760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f7906113379084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146113b85760405162461bcd60e51b815260040161062b90611c1a565b80600354106114005760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161062b565b816001541461071357600182905560038190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa70790602001610822565b7f0000000000000000000000000000000000000000000000000000000000000000600554017f0000000000000000000000000000000000000000000000000000000000000000428161149757611497611bcc565b0411156114d95760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161062b565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461152c5760405162461bcd60e51b815260040161062b90611c1a565b6005548211801561153c57508015155b1561157f57600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b6000828152600660205260409020548015611601578181036115c15750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b031615611601576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b03161561166b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161062b565b6000818152600660205260409020600101546001600160a01b03166116c85760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b604482015260640161062b565b7f00000000000000000000000000000000000000000000000000000000000000003410156117385760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e00604482015260640161062b565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d79061178c9084815260200190565b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156118095760006117e87f000000000000000000000000000000000000000000000000000000000000000034611c51565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b6002600082815260066020526040902060010154600160c01b900460ff16600281111561183b5761183b611b67565b146118885760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e000000000000000000604482015260640161062b565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b60006020828403121561196757600080fd5b5035919050565b6000806040838503121561198157600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156119cf576119cf611990565b604052919050565b803567ffffffffffffffff811681146119ef57600080fd5b919050565b80356001600160a01b03811681146119ef57600080fd5b600082601f830112611a1c57600080fd5b813567ffffffffffffffff811115611a3657611a36611990565b611a49601f8201601f19166020016119a6565b818152846020838601011115611a5e57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611a9157600080fd5b843567ffffffffffffffff80821115611aa957600080fd5b818701915087601f830112611abd57600080fd5b8135602082821115611ad157611ad1611990565b8160051b611ae08282016119a6565b928352848101820192828101908c851115611afa57600080fd5b958301955b84871015611b1857863582529583019590830190611aff565b9950611b289150508982016119d7565b96505050611b38604088016119f4565b93506060870135915080821115611b4e57600080fd5b50611b5b87828801611a0b565b91505092959194509250565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611bbd57634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611c1557634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b81810381811115610f4957610f49611be2565b6000815160005b81811015611c855760208185018101518683015201611c6b565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611ccd601c830184611c64565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611cf88284611c64565b9392505050565b8082028115828204841417610f4957610f49611be2565b80820180821115610f4957610f49611be256fea264697066735822122039fffbfa0ff1f969a1c91abf7f0c19828e05fda7df5768914b1c5e812ad01eff64736f6c63430008120033", + "numDeployments": 7, + "solcInputHash": "556bdf5fc9689e29dc99949f21bc913e", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerFutureLimit\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"challengers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claims\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"enum VeaOutboxGnosisToArb.Party\",\"name\":\"honest\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositPlusReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_msgId\",\"type\":\"uint256\"}],\"name\":\"isMsgRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRelayed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampFutureUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Gnosis to Arbitrum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer delay limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new max sequencer past timestamping power.\"}},\"sequencerFutureLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer futue limit updated.\",\"params\":{\"_newSequencerFutureLimit\":\"The new max sequencer future timestamping power.\"}}},\"kind\":\"dev\",\"methods\":{\"challenge(uint256)\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_routerGnosisToArb\":\"The address of the router on Ethereum that routes from Arbitrum to Ethereum.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_sequencerFutureLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"isMsgRelayed(uint256)\":{\"details\":\"Get the msg relayed status.\",\"params\":{\"_msgId\":\"The msgId to check.\"},\"returns\":{\"isRelayed\":\"True if the msg was relayed.\"}},\"resolveDisputedClaim(uint256,bytes32)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Arbitrum to call.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"updateSequencerFutureLimit(uint256,uint256)\":{\"details\":\"Set the sequencerFutureLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerFutureLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256)\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32)\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":\"VeaOutboxGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/AddressAliasHelper.sol\":{\"content\":\"// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/libraries/AddressAliasHelper.sol\\n// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressAliasHelper {\\n uint160 internal 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\",\"keccak256\":\"0xfa8b6907a33c37e13b3de6e2459d6bd153708be4b8413db3c319ea3a5d8c9b00\",\"license\":\"BUSL-1.1\"},\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/AddressAliasHelper.sol\\\";\\n\\n/// @dev Vea Outbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaOutboxGnosisToArb is IVeaOutboxOnL2 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public immutable routerGnosisToArb; // The address of the router from Gnosis to Arbitrum on Ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 public immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 public immutable depositPlusReward; // 2 * deposit - burn\\n\\n address public constant BURN_ADDRESS = address(0); // address to send burned eth\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable challengePeriod; // Claim challenge timewindow.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n uint256 public timestampFutureUpdated; // The timestamp of the last sequencer future update.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => Claim) public claims; // epoch => claim\\n mapping(uint256 => address) public challengers; // epoch => challenger\\n mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n enum Party {\\n None,\\n Claimer,\\n Challenger\\n }\\n\\n struct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestamp;\\n Party honest;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer delay limit updated.\\n /// @param _newSequencerDelayLimit The new max sequencer past timestamping power.\\n event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates the sequencer futue limit updated.\\n /// @param _newSequencerFutureLimit The new max sequencer future timestamping power.\\n event sequencerFutureLimitUpdateReceived(uint256 _newSequencerFutureLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit\\n ) {\\n deposit = _deposit;\\n epochPeriod = _epochPeriod;\\n challengePeriod = _challengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n routerGnosisToArb = _routerGnosisToArb;\\n sequencerDelayLimit = _sequencerDelayLimit;\\n sequencerFutureLimit = _sequencerFutureLimit;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerFutureLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerFutureLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampFutureUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerFutureLimit != _newSequencerFutureLimit) {\\n sequencerFutureLimit = _newSequencerFutureLimit;\\n timestampFutureUpdated = _timestamp;\\n emit sequencerFutureLimitUpdateReceived(_newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Set the sequencerDelayLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n unchecked {\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch is invalid.\\\");\\n }\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n function challenge(uint256 _epoch) external payable virtual {\\n require(challengers[_epoch] == address(0), \\\"Claim already challenged.\\\");\\n require(claims[_epoch].claimer != address(0), \\\"No claim for epoch.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n\\n challengers[_epoch] = msg.sender;\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) external virtual OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external virtual OnlyBridgeRunning {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n bytes32 claimedStateRoot = claims[_epoch].stateRoot;\\n\\n if (claimedStateRoot != bytes32(0)) {\\n if (claimedStateRoot == _stateRoot) {\\n claims[_epoch].honest = Party.Claimer;\\n } else if (challengers[_epoch] != address(0)) {\\n claims[_epoch].honest = Party.Challenger;\\n }\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Arbitrum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] memory _proof, uint64 _msgId, address _to, bytes memory _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) external virtual {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n function withdrawChallengeDeposit(uint256 _epoch) external {\\n require(claims[_epoch].honest == Party.Challenger, \\\"Challenge unsuccessful.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete claims[_epoch];\\n delete challengers[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (claimer != address(0)) {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawChallengerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete challengers[_epoch];\\n\\n if (challenger != address(0)) {\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the msg relayed status.\\n /// @param _msgId The msgId to check.\\n /// @return isRelayed True if the msg was relayed.\\n function isMsgRelayed(uint256 _msgId) external view returns(bool isRelayed) {\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1));\\n }\\n}\\n\",\"keccak256\":\"0xeb5a83ca5bd7d80f7cb115dc09851e4d25530e985e0b9a759e5d758f1a1732cb\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101606040523480156200001257600080fd5b50604051620020e6380380620020e68339810160408190526200003591620000c1565b60a08790526101008690526101208590526101408490526001600160a01b038316608052600082905560018190556200007060028862000147565b60c0819052620000828860026200016a565b6200008e91906200018a565b60e05261010051600190620000a4904262000147565b620000b091906200018a565b60055550620001a095505050505050565b600080600080600080600060e0888a031215620000dd57600080fd5b8751602089015160408a015160608b015160808c0151939a50919850965094506001600160a01b03811681146200011357600080fd5b8093505060a0880151915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200016557634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000184576200018462000131565b92915050565b8181038181111562000184576200018462000131565b60805160a05160c05160e051610100516101205161014051611e27620002bf600039600081816105170152818161066c01528181610e6a0152818161119a015261150d01526000818161061301526112e901526000818161054b01528181610690015281816107ed0152818161097101528181610e8e01528181610fec015281816111be01526115310152600081816104330152818161111501526119e20152600081816102fb015281816110d401526119a101526000818161057f015281816107ad015281816108ff01528181610b5301528181610b8001528181610fad01528181611160015281816117920152818161185e015261188b0152600081816105df015281816108220152818161143801526115ac0152611e276000f3fe6080604052600436106101cd5760003560e01c80637ffc2a6e116100f7578063b5b7a18411610095578063eb8dedfa11610064578063eb8dedfa146105cd578063f3f480d914610601578063f4cf751b14610635578063fccc28131461065557600080fd5b8063b5b7a18414610539578063d0e30db01461056d578063d6e01b39146105a1578063e813a755146105b757600080fd5b80639588eca2116100d15780639588eca214610475578063a888c2cd1461048b578063ab82d9a0146104f2578063b044397e1461050557600080fd5b80637ffc2a6e1461040b578063836e344b146104215780638caeb7a81461045557600080fd5b806343b066d51161016f57806350b81dbe1161013e57806350b81dbe1461035d578063649628491461037d5780636b45ebcb1461039d578063710cc9a7146103eb57600080fd5b806343b066d51461029b57806344df8e70146102e95780634518f79f1461031d5780634a439cfe1461033d57600080fd5b806327ee6bdd116101ab57806327ee6bdd146102325780632c1925191461024857806331d144571461026857806331ddf7431461027b57600080fd5b80630e56752e146101d2578063114095d3146101fb578063222ae7861461021d575b600080fd5b3480156101de57600080fd5b506101e860015481565b6040519081526020015b60405180910390f35b34801561020757600080fd5b5061021b610216366004611a1d565b61066a565b005b34801561022957600080fd5b506101e86107e6565b34801561023e57600080fd5b506101e860055481565b34801561025457600080fd5b5061021b610263366004611a36565b610817565b61021b610276366004611a36565b6108fd565b34801561028757600080fd5b5061021b610296366004611b43565b610bc9565b3480156102a757600080fd5b506102d96102b6366004611a1d565b600881811c60009081526020919091526040902054600160ff9092161c81161490565b60405190151581526020016101f2565b3480156102f557600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561032957600080fd5b5061021b610338366004611a1d565b610e68565b34801561034957600080fd5b506101e8610358366004611a1d565b610fe5565b34801561036957600080fd5b5061021b610378366004611a1d565b611017565b34801561038957600080fd5b5061021b610398366004611a1d565b611198565b3480156103a957600080fd5b506103d36103b8366004611a1d565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101f2565b3480156103f757600080fd5b5061021b610406366004611a36565b61142d565b34801561041757600080fd5b506101e860025481565b34801561042d57600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561046157600080fd5b5061021b610470366004611a36565b61150b565b34801561048157600080fd5b506101e860045481565b34801561049757600080fd5b506104e26104a6366004611a1d565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516101f29493929190611c45565b61021b610500366004611a1d565b6116ce565b34801561051157600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561054557600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561057957600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ad57600080fd5b506101e860035481565b3480156105c357600080fd5b506101e860005481565b3480156105d957600080fd5b506103d37f000000000000000000000000000000000000000000000000000000000000000081565b34801561060d57600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561064157600080fd5b5061021b610650366004611a1d565b6118d4565b34801561066157600080fd5b506103d3600081565b7f00000000000000000000000000000000000000000000000000000000000000006005547f000000000000000000000000000000000000000000000000000000000000000042816106bd576106bd611c94565b0403116107035760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff16600281111561073157610731611c2f565b146107705760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106fa565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b031680156107e2576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006108127f000000000000000000000000000000000000000000000000000000000000000042611cc0565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461086a5760405162461bcd60e51b81526004016106fa90611ce2565b80600254106108b25760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106fa565b81600054146107e257600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b7f000000000000000000000000000000000000000000000000000000000000000034101561096d5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106fa565b60017f0000000000000000000000000000000000000000000000000000000000000000428161099e5761099e611c94565b040382146109e25760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b60448201526064016106fa565b80610a205760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106fa565b6000828152600660205260409020600101546001600160a01b031615610a7e5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106fa565b6040805160808101825282815233602080830191825263ffffffff4281168486019081526000606086018181528982526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610b1357610b13611c2f565b02179055505060405182815283915033907fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d579060200160405180910390a37f00000000000000000000000000000000000000000000000000000000000000003411156107e2576000610ba57f000000000000000000000000000000000000000000000000000000000000000034611d19565b604051909150339082156108fc029083906000818181858888f15050505050505050565b6040845110610c0c5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106fa565b6000838383604051602001610c2393929190611d5c565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610ca5576000868281518110610c6657610c66611d9e565b6020026020010151905082811115610c8c57826000528060205260406000209250610c9c565b8060005282602052604060002092505b50600101610c49565b508060045414610ce85760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106fa565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610d5f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106fa565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610d8d908890611db4565b6000604051808303816000865af19150503d8060008114610dca576040519150601f19603f3d011682016040523d82523d6000602084013e610dcf565b606091505b5050905080610e205760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106fa565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f00000000000000000000000000000000000000000000000000000000000000004281610ebb57610ebb611c94565b040311610efc5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106fa565b60008082815260066020526040902060010154600160c01b900460ff166002811115610f2a57610f2a611c2f565b14610f695760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106fa565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b031680156107e2576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006110117f000000000000000000000000000000000000000000000000000000000000000083611cc0565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff16600281111561104657611046611c2f565b146110895760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b60448201526064016106fa565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b03918216911615611150576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f000000000000000000000000000000000000000000000000000000000000000042816111eb576111eb611c94565b0403111561122e5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106fa565b600081815260066020526040902060010154600160a01b900463ffffffff168061128b5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106fa565b6000828152600760205260409020546001600160a01b0316156112e75760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106fa565b7f0000000000000000000000000000000000000000000000000000000000000000600154600054600261131a9190611dc7565b6113249190611dde565b61132e9190611dde565b6113388242611d19565b10156113ac5760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e00000000000000000060648201526084016106fa565b6005548211156114085760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f7906113ff9084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146114805760405162461bcd60e51b81526004016106fa90611ce2565b80600354106114c85760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106fa565b81600154146107e257600182905560038190556040518281527f5328ca176e0092ea14be7c843a94b093c0fe88c93d9c01ab0f0281d9e62e4055906020016108f1565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161155e5761155e611c94565b040311156115a15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106fa565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146115f45760405162461bcd60e51b81526004016106fa90611ce2565b6005548211801561160457508015155b1561164757600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b60008281526006602052604090205480156116c9578181036116895750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b0316156116c9576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b0316156117335760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106fa565b6000818152600660205260409020600101546001600160a01b03166117905760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b60448201526064016106fa565b7f00000000000000000000000000000000000000000000000000000000000000003410156118005760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106fa565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7906118549084815260200190565b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156118d15760006118b07f000000000000000000000000000000000000000000000000000000000000000034611d19565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b6002600082815260066020526040902060010154600160c01b900460ff16600281111561190357611903611c2f565b146119505760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e00000000000000000060448201526064016106fa565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600060208284031215611a2f57600080fd5b5035919050565b60008060408385031215611a4957600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611a9757611a97611a58565b604052919050565b803567ffffffffffffffff81168114611ab757600080fd5b919050565b80356001600160a01b0381168114611ab757600080fd5b600082601f830112611ae457600080fd5b813567ffffffffffffffff811115611afe57611afe611a58565b611b11601f8201601f1916602001611a6e565b818152846020838601011115611b2657600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611b5957600080fd5b843567ffffffffffffffff80821115611b7157600080fd5b818701915087601f830112611b8557600080fd5b8135602082821115611b9957611b99611a58565b8160051b611ba8828201611a6e565b928352848101820192828101908c851115611bc257600080fd5b958301955b84871015611be057863582529583019590830190611bc7565b9950611bf0915050898201611a9f565b96505050611c0060408801611abc565b93506060870135915080821115611c1657600080fd5b50611c2387828801611ad3565b91505092959194509250565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611c8557634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611cdd57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b8181038181111561101157611011611caa565b6000815160005b81811015611d4d5760208185018101518683015201611d33565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611d95601c830184611d2c565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611dc08284611d2c565b9392505050565b808202811582820484141761101157611011611caa565b8082018082111561101157611011611caa56fea264697066735822122055c1aa12c89ec044065051b8507e4df7a1c21c39aee8454e2a6e088cf08a362e64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101cd5760003560e01c80637ffc2a6e116100f7578063b5b7a18411610095578063eb8dedfa11610064578063eb8dedfa146105cd578063f3f480d914610601578063f4cf751b14610635578063fccc28131461065557600080fd5b8063b5b7a18414610539578063d0e30db01461056d578063d6e01b39146105a1578063e813a755146105b757600080fd5b80639588eca2116100d15780639588eca214610475578063a888c2cd1461048b578063ab82d9a0146104f2578063b044397e1461050557600080fd5b80637ffc2a6e1461040b578063836e344b146104215780638caeb7a81461045557600080fd5b806343b066d51161016f57806350b81dbe1161013e57806350b81dbe1461035d578063649628491461037d5780636b45ebcb1461039d578063710cc9a7146103eb57600080fd5b806343b066d51461029b57806344df8e70146102e95780634518f79f1461031d5780634a439cfe1461033d57600080fd5b806327ee6bdd116101ab57806327ee6bdd146102325780632c1925191461024857806331d144571461026857806331ddf7431461027b57600080fd5b80630e56752e146101d2578063114095d3146101fb578063222ae7861461021d575b600080fd5b3480156101de57600080fd5b506101e860015481565b6040519081526020015b60405180910390f35b34801561020757600080fd5b5061021b610216366004611a1d565b61066a565b005b34801561022957600080fd5b506101e86107e6565b34801561023e57600080fd5b506101e860055481565b34801561025457600080fd5b5061021b610263366004611a36565b610817565b61021b610276366004611a36565b6108fd565b34801561028757600080fd5b5061021b610296366004611b43565b610bc9565b3480156102a757600080fd5b506102d96102b6366004611a1d565b600881811c60009081526020919091526040902054600160ff9092161c81161490565b60405190151581526020016101f2565b3480156102f557600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561032957600080fd5b5061021b610338366004611a1d565b610e68565b34801561034957600080fd5b506101e8610358366004611a1d565b610fe5565b34801561036957600080fd5b5061021b610378366004611a1d565b611017565b34801561038957600080fd5b5061021b610398366004611a1d565b611198565b3480156103a957600080fd5b506103d36103b8366004611a1d565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101f2565b3480156103f757600080fd5b5061021b610406366004611a36565b61142d565b34801561041757600080fd5b506101e860025481565b34801561042d57600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561046157600080fd5b5061021b610470366004611a36565b61150b565b34801561048157600080fd5b506101e860045481565b34801561049757600080fd5b506104e26104a6366004611a1d565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516101f29493929190611c45565b61021b610500366004611a1d565b6116ce565b34801561051157600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561054557600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561057957600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ad57600080fd5b506101e860035481565b3480156105c357600080fd5b506101e860005481565b3480156105d957600080fd5b506103d37f000000000000000000000000000000000000000000000000000000000000000081565b34801561060d57600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561064157600080fd5b5061021b610650366004611a1d565b6118d4565b34801561066157600080fd5b506103d3600081565b7f00000000000000000000000000000000000000000000000000000000000000006005547f000000000000000000000000000000000000000000000000000000000000000042816106bd576106bd611c94565b0403116107035760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff16600281111561073157610731611c2f565b146107705760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106fa565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b031680156107e2576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006108127f000000000000000000000000000000000000000000000000000000000000000042611cc0565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461086a5760405162461bcd60e51b81526004016106fa90611ce2565b80600254106108b25760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106fa565b81600054146107e257600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b7f000000000000000000000000000000000000000000000000000000000000000034101561096d5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106fa565b60017f0000000000000000000000000000000000000000000000000000000000000000428161099e5761099e611c94565b040382146109e25760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b60448201526064016106fa565b80610a205760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106fa565b6000828152600660205260409020600101546001600160a01b031615610a7e5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106fa565b6040805160808101825282815233602080830191825263ffffffff4281168486019081526000606086018181528982526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610b1357610b13611c2f565b02179055505060405182815283915033907fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d579060200160405180910390a37f00000000000000000000000000000000000000000000000000000000000000003411156107e2576000610ba57f000000000000000000000000000000000000000000000000000000000000000034611d19565b604051909150339082156108fc029083906000818181858888f15050505050505050565b6040845110610c0c5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106fa565b6000838383604051602001610c2393929190611d5c565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610ca5576000868281518110610c6657610c66611d9e565b6020026020010151905082811115610c8c57826000528060205260406000209250610c9c565b8060005282602052604060002092505b50600101610c49565b508060045414610ce85760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106fa565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610d5f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106fa565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610d8d908890611db4565b6000604051808303816000865af19150503d8060008114610dca576040519150601f19603f3d011682016040523d82523d6000602084013e610dcf565b606091505b5050905080610e205760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106fa565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f00000000000000000000000000000000000000000000000000000000000000004281610ebb57610ebb611c94565b040311610efc5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106fa565b60008082815260066020526040902060010154600160c01b900460ff166002811115610f2a57610f2a611c2f565b14610f695760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106fa565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b031680156107e2576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006110117f000000000000000000000000000000000000000000000000000000000000000083611cc0565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff16600281111561104657611046611c2f565b146110895760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b60448201526064016106fa565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b03918216911615611150576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f000000000000000000000000000000000000000000000000000000000000000042816111eb576111eb611c94565b0403111561122e5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106fa565b600081815260066020526040902060010154600160a01b900463ffffffff168061128b5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106fa565b6000828152600760205260409020546001600160a01b0316156112e75760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106fa565b7f0000000000000000000000000000000000000000000000000000000000000000600154600054600261131a9190611dc7565b6113249190611dde565b61132e9190611dde565b6113388242611d19565b10156113ac5760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e00000000000000000060648201526084016106fa565b6005548211156114085760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f7906113ff9084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146114805760405162461bcd60e51b81526004016106fa90611ce2565b80600354106114c85760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106fa565b81600154146107e257600182905560038190556040518281527f5328ca176e0092ea14be7c843a94b093c0fe88c93d9c01ab0f0281d9e62e4055906020016108f1565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161155e5761155e611c94565b040311156115a15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106fa565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146115f45760405162461bcd60e51b81526004016106fa90611ce2565b6005548211801561160457508015155b1561164757600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b60008281526006602052604090205480156116c9578181036116895750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b0316156116c9576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b0316156117335760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106fa565b6000818152600660205260409020600101546001600160a01b03166117905760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b60448201526064016106fa565b7f00000000000000000000000000000000000000000000000000000000000000003410156118005760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106fa565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7906118549084815260200190565b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156118d15760006118b07f000000000000000000000000000000000000000000000000000000000000000034611d19565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b6002600082815260066020526040902060010154600160c01b900460ff16600281111561190357611903611c2f565b146119505760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e00000000000000000060448201526064016106fa565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600060208284031215611a2f57600080fd5b5035919050565b60008060408385031215611a4957600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611a9757611a97611a58565b604052919050565b803567ffffffffffffffff81168114611ab757600080fd5b919050565b80356001600160a01b0381168114611ab757600080fd5b600082601f830112611ae457600080fd5b813567ffffffffffffffff811115611afe57611afe611a58565b611b11601f8201601f1916602001611a6e565b818152846020838601011115611b2657600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611b5957600080fd5b843567ffffffffffffffff80821115611b7157600080fd5b818701915087601f830112611b8557600080fd5b8135602082821115611b9957611b99611a58565b8160051b611ba8828201611a6e565b928352848101820192828101908c851115611bc257600080fd5b958301955b84871015611be057863582529583019590830190611bc7565b9950611bf0915050898201611a9f565b96505050611c0060408801611abc565b93506060870135915080821115611c1657600080fd5b50611c2387828801611ad3565b91505092959194509250565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611c8557634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611cdd57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b8181038181111561101157611011611caa565b6000815160005b81811015611d4d5760208185018101518683015201611d33565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611d95601c830184611d2c565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611dc08284611d2c565b9392505050565b808202811582820484141761101157611011611caa565b8082018082111561101157611011611caa56fea264697066735822122055c1aa12c89ec044065051b8507e4df7a1c21c39aee8454e2a6e088cf08a362e64736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Gnosis to Arbitrum. Note: This contract is deployed on Arbitrum.", "events": { @@ -612,9 +664,15 @@ } }, "sequencerDelayLimitUpdateReceived(uint256)": { - "details": "This event indicates the sequencer limit updated.", + "details": "This event indicates the sequencer delay limit updated.", + "params": { + "_newSequencerDelayLimit": "The new max sequencer past timestamping power." + } + }, + "sequencerFutureLimitUpdateReceived(uint256)": { + "details": "This event indicates the sequencer futue limit updated.", "params": { - "_newsequencerDelayLimit": "The new maxL2StateSyncDelay." + "_newSequencerFutureLimit": "The new max sequencer future timestamping power." } } }, @@ -657,6 +715,15 @@ "epoch": "The hash of the claim." } }, + "isMsgRelayed(uint256)": { + "details": "Get the msg relayed status.", + "params": { + "_msgId": "The msgId to check." + }, + "returns": { + "isRelayed": "True if the msg was relayed." + } + }, "resolveDisputedClaim(uint256,bytes32)": { "details": "Resolves any challenge of the optimistic claim for '_epoch'.", "params": { @@ -667,10 +734,10 @@ "sendMessage(bytes32[],uint64,address,bytes)": { "details": "Verifies and relays the message. UNTRUSTED.", "params": { - "_message": "The message encoded with header from VeaInbox.", + "_message": "The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)", "_msgId": "The zero based index of the message in the inbox.", - "_proof": "The merkle proof to prove the message.", - "_to": "The address of the contract on Gnosis to call." + "_proof": "The merkle proof to prove the message inclusion in the inbox state root.", + "_to": "The address of the contract on Arbitrum to call." } }, "updateSequencerDelayLimit(uint256,uint256)": { @@ -732,7 +799,7 @@ "storageLayout": { "storage": [ { - "astId": 4180, + "astId": 5535, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "sequencerDelayLimit", "offset": 0, @@ -740,7 +807,7 @@ "type": "t_uint256" }, { - "astId": 4182, + "astId": 5537, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "sequencerFutureLimit", "offset": 0, @@ -748,7 +815,7 @@ "type": "t_uint256" }, { - "astId": 4184, + "astId": 5539, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "timestampDelayUpdated", "offset": 0, @@ -756,7 +823,7 @@ "type": "t_uint256" }, { - "astId": 4186, + "astId": 5541, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "timestampFutureUpdated", "offset": 0, @@ -764,7 +831,7 @@ "type": "t_uint256" }, { - "astId": 4188, + "astId": 5543, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "stateRoot", "offset": 0, @@ -772,7 +839,7 @@ "type": "t_bytes32" }, { - "astId": 4190, + "astId": 5545, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "latestVerifiedEpoch", "offset": 0, @@ -780,15 +847,15 @@ "type": "t_uint256" }, { - "astId": 4195, + "astId": 5550, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "claims", "offset": 0, "slot": "6", - "type": "t_mapping(t_uint256,t_struct(Claim)4217_storage)" + "type": "t_mapping(t_uint256,t_struct(Claim)5572_storage)" }, { - "astId": 4199, + "astId": 5554, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "challengers", "offset": 0, @@ -796,7 +863,7 @@ "type": "t_mapping(t_uint256,t_address)" }, { - "astId": 4203, + "astId": 5558, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "relayed", "offset": 0, @@ -815,7 +882,7 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_enum(Party)4207": { + "t_enum(Party)5562": { "encoding": "inplace", "label": "enum VeaOutboxGnosisToArb.Party", "numberOfBytes": "1" @@ -834,19 +901,19 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_mapping(t_uint256,t_struct(Claim)4217_storage)": { + "t_mapping(t_uint256,t_struct(Claim)5572_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct VeaOutboxGnosisToArb.Claim)", "numberOfBytes": "32", - "value": "t_struct(Claim)4217_storage" + "value": "t_struct(Claim)5572_storage" }, - "t_struct(Claim)4217_storage": { + "t_struct(Claim)5572_storage": { "encoding": "inplace", "label": "struct VeaOutboxGnosisToArb.Claim", "members": [ { - "astId": 4209, + "astId": 5564, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "stateRoot", "offset": 0, @@ -854,7 +921,7 @@ "type": "t_bytes32" }, { - "astId": 4211, + "astId": 5566, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "claimer", "offset": 0, @@ -862,7 +929,7 @@ "type": "t_address" }, { - "astId": 4213, + "astId": 5568, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "timestamp", "offset": 20, @@ -870,12 +937,12 @@ "type": "t_uint32" }, { - "astId": 4216, + "astId": 5571, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "honest", "offset": 24, "slot": "1", - "type": "t_enum(Party)4207" + "type": "t_enum(Party)5562" } ], "numberOfBytes": "64" diff --git a/contracts/deployments/chiado/VeaInboxGnosisToArbDevnet.json b/contracts/deployments/chiado/VeaInboxGnosisToArbDevnet.json index 23947ff0..1054f8d5 100644 --- a/contracts/deployments/chiado/VeaInboxGnosisToArbDevnet.json +++ b/contracts/deployments/chiado/VeaInboxGnosisToArbDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xA3FefC6FeE3fc66B9d9a8BEE794736ab71a74c55", + "address": "0x9F4407785DFf95c08Bf9a0d9d4A5a164C48eC5CB", "abi": [ { "inputs": [ @@ -38,6 +38,18 @@ { "anonymous": false, "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "_snapshot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, { "indexed": false, "internalType": "uint64", @@ -93,13 +105,32 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "epochAt", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], - "name": "epochPeriod", + "name": "epochFinalized", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "epoch", "type": "uint256" } ], @@ -107,19 +138,26 @@ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "epochNow", + "outputs": [ { "internalType": "uint256", - "name": "", + "name": "epoch", "type": "uint256" } ], - "name": "inbox", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochPeriod", "outputs": [ { - "internalType": "bytes32", + "internalType": "uint256", "name": "", - "type": "bytes32" + "type": "uint256" } ], "stateMutability": "view", @@ -208,13 +246,7 @@ } ], "name": "sendSnapshot", - "outputs": [ - { - "internalType": "bytes32", - "name": "ticketID", - "type": "bytes32" - } - ], + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -238,44 +270,46 @@ "type": "function" } ], - "transactionHash": "0x2eb2ee3596a9f80d632c42711d5844b35463557f2e8d28df75b841a7df637a1e", + "transactionHash": "0x905772713e5e9a6cc5d57b6a3d5b469c1d32fa36ce6707fc2d10dc6739124e72", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xA3FefC6FeE3fc66B9d9a8BEE794736ab71a74c55", - "transactionIndex": 1, - "gasUsed": "613732", + "contractAddress": "0x9F4407785DFf95c08Bf9a0d9d4A5a164C48eC5CB", + "transactionIndex": 2, + "gasUsed": "665312", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xe77fd5908172fb46dd58f981d8a6787c2e0437797aec4d52993952e5b32ce831", - "transactionHash": "0x2eb2ee3596a9f80d632c42711d5844b35463557f2e8d28df75b841a7df637a1e", + "blockHash": "0xd0c0d8bc011c7af0cc9569c3b1eac2c541ab929436be3bcd57b30219ab0ae5cb", + "transactionHash": "0x905772713e5e9a6cc5d57b6a3d5b469c1d32fa36ce6707fc2d10dc6739124e72", "logs": [], - "blockNumber": 4697792, - "cumulativeGasUsed": "641632", + "blockNumber": 4730115, + "cumulativeGasUsed": "723000", "status": 1, "byzantium": true }, "args": [ 1800, - "0x016170Ad327cE0dCa07b3bd7a7592013a7488FAc", + "0x8Da07C6D68F17d7BbC8B42D59Bc9EEE90e9dD621", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a" ], - "numDeployments": 3, - "solcInputHash": "916b5e2210e8e15d34b48798389f67fe", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSnapshot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"ticketID\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Gnosis to Arbitrum. Note: This contract is deployed on the Gnosis.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)\"}},\"SnapshotSaved(uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerGnosisToArb\":\"The router on Ethereum that routes from Gnosis to Arbitrum.\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See merkle tree documentation for details how inbox manages state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":\"VeaInboxGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\n\\n/// @dev Vea Inbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on the Gnosis.\\ncontract VeaInboxGnosisToArb is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between stateroot snapshots\\n address public immutable routerGnosisToArb; // The router on Ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerGnosisToArb The router on Ethereum that routes from Gnosis to Arbitrum.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n constructor(uint256 _epochPeriod, address _routerGnosisToArb, IAMB _amb) {\\n epochPeriod = _epochPeriod;\\n routerGnosisToArb = _routerGnosisToArb;\\n amb = _amb;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See merkle tree documentation for details how inbox manages state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // data for outbox relay\\n abi.encodePacked( // abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...) where _data is abi.encode(param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function sendSnapshot(\\n uint256 _epoch,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external virtual returns (bytes32 ticketID) {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(\\n IRouterToArb.route,\\n (\\n _epoch,\\n snapshots[_epoch],\\n _inboxIndex,\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n _gasLimit,\\n _maxFeePerGas\\n )\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n ticketID = amb.requireToPassMessage(routerGnosisToArb, data, amb.maxGasPerTx());\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x0125442dc06bc061fc1c6a3719018904fcc92db68696f93ea4bf770a4da66b15\",\"license\":\"MIT\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60e060405234801561001057600080fd5b50604051610b0b380380610b0b83398101604081905261002f91610064565b60a0929092526001600160a01b0390811660c052166080526100a7565b6001600160a01b038116811461006157600080fd5b50565b60008060006060848603121561007957600080fd5b83519250602084015161008b8161004c565b604085015190925061009c8161004c565b809150509250925092565b60805160a05160c051610a1a6100f1600039600081816101a6015261031701526000818161014c015281816101cc015261043301526000818160cf01526102ee0152610a1a6000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80635f85896c116100665780635f85896c14610134578063b5b7a18414610147578063d6565a2d1461016e578063e5a1c3561461018e578063eb8dedfa146101a157600080fd5b806306661abd146100985780631062b39a146100ca5780632bbb470414610109578063519205351461012a575b600080fd5b6041546100ac9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c1565b61011c61011736600461071b565b6101c8565b6040519081526020016100c1565b61013261042e565b005b6100ac610142366004610782565b610548565b61011c7f000000000000000000000000000000000000000000000000000000000000000081565b61011c61017c366004610863565b60006020819052908152604090205481565b61011c61019c366004610863565b6106b4565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000042816101f9576101f961087c565b0487106102585760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b600087815260208190526040808220549051602481018a9052604481019190915260648101889052608481018790526001600160a01b03861660a482015260c4810185905260e481018490526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928692869263e5789d039260048083019391928290030181865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190610892565b6040518463ffffffff1660e01b81526004016103a4939291906108fb565b6020604051808303816000875af11580156103c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e79190610892565b9150877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828360405161041b91815260200190565b60405180910390a2509695505050505050565b6000807f000000000000000000000000000000000000000000000000000000000000000042816104605761046061087c565b604154919004925060009067ffffffffffffffff165b80156104af57806001166001036104a3576001826040811061049a5761049a61092f565b015492506104af565b6001918201911c610476565b60011c5b80156104f15760019182019181811690036104e9576104e6600183604081106104de576104de61092f565b0154846106cb565b92505b60011c6104b3565b505060008281526020818152604091829020839055604154915167ffffffffffffffff90921682527f8d762ebc760982a11d9a00cc7c1c4c91f9c1084b85633ee8ca462da42465f1d9910160405180910390a15050565b60415460009067ffffffffffffffff90811690811061059a5760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b604482015260640161024f565b604051600090829087906105b690889033908990602001610945565b60408051601f19818403018152908290526105d593929160200161097b565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b6001811660000361063957610621600183604081106104de576104de61092f565b92506001918201911c677fffffffffffffff16610600565b50816001826040811061064e5761064e61092f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906106a19084906109ca565b60405180910390a1509095945050505050565b600181604081106106c457600080fd5b0154905081565b6000818310156106e9578260005281602052604060002090506106f9565b8160005282602052604060002090505b92915050565b80356001600160a01b038116811461071657600080fd5b919050565b60008060008060008060c0878903121561073457600080fd5b863595506020870135945060408701359350610752606088016106ff565b92506080870135915060a087013590509295509295509295565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561079757600080fd5b6107a0846106ff565b925060208401356001600160e01b0319811681146107bd57600080fd5b9150604084013567ffffffffffffffff808211156107da57600080fd5b818601915086601f8301126107ee57600080fd5b8135818111156108005761080061076c565b604051601f8201601f19908116603f011681019083821181831017156108285761082861076c565b8160405282815289602084870101111561084157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561087557600080fd5b5035919050565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156108a457600080fd5b5051919050565b60005b838110156108c65781810151838201526020016108ae565b50506000910152565b600081518084526108e78160208601602086016108ab565b601f01601f19169290920160200192915050565b6001600160a01b038416815260606020820181905260009061091f908301856108cf565b9050826040830152949350505050565b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b841681528260048201526000825161096c8160248501602087016108ab565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bb81601c8501602087016108ab565b91909101601c01949350505050565b6020815260006109dd60208301846108cf565b939250505056fea2646970667358221220f154e7c06a230a8584c6b8ca63e2df548a849b848ce8e10ae47300e98e2f281164736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80635f85896c116100665780635f85896c14610134578063b5b7a18414610147578063d6565a2d1461016e578063e5a1c3561461018e578063eb8dedfa146101a157600080fd5b806306661abd146100985780631062b39a146100ca5780632bbb470414610109578063519205351461012a575b600080fd5b6041546100ac9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c1565b61011c61011736600461071b565b6101c8565b6040519081526020016100c1565b61013261042e565b005b6100ac610142366004610782565b610548565b61011c7f000000000000000000000000000000000000000000000000000000000000000081565b61011c61017c366004610863565b60006020819052908152604090205481565b61011c61019c366004610863565b6106b4565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000042816101f9576101f961087c565b0487106102585760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b600087815260208190526040808220549051602481018a9052604481019190915260648101889052608481018790526001600160a01b03861660a482015260c4810185905260e481018490526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928692869263e5789d039260048083019391928290030181865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190610892565b6040518463ffffffff1660e01b81526004016103a4939291906108fb565b6020604051808303816000875af11580156103c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e79190610892565b9150877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828360405161041b91815260200190565b60405180910390a2509695505050505050565b6000807f000000000000000000000000000000000000000000000000000000000000000042816104605761046061087c565b604154919004925060009067ffffffffffffffff165b80156104af57806001166001036104a3576001826040811061049a5761049a61092f565b015492506104af565b6001918201911c610476565b60011c5b80156104f15760019182019181811690036104e9576104e6600183604081106104de576104de61092f565b0154846106cb565b92505b60011c6104b3565b505060008281526020818152604091829020839055604154915167ffffffffffffffff90921682527f8d762ebc760982a11d9a00cc7c1c4c91f9c1084b85633ee8ca462da42465f1d9910160405180910390a15050565b60415460009067ffffffffffffffff90811690811061059a5760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b604482015260640161024f565b604051600090829087906105b690889033908990602001610945565b60408051601f19818403018152908290526105d593929160200161097b565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b6001811660000361063957610621600183604081106104de576104de61092f565b92506001918201911c677fffffffffffffff16610600565b50816001826040811061064e5761064e61092f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906106a19084906109ca565b60405180910390a1509095945050505050565b600181604081106106c457600080fd5b0154905081565b6000818310156106e9578260005281602052604060002090506106f9565b8160005282602052604060002090505b92915050565b80356001600160a01b038116811461071657600080fd5b919050565b60008060008060008060c0878903121561073457600080fd5b863595506020870135945060408701359350610752606088016106ff565b92506080870135915060a087013590509295509295509295565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561079757600080fd5b6107a0846106ff565b925060208401356001600160e01b0319811681146107bd57600080fd5b9150604084013567ffffffffffffffff808211156107da57600080fd5b818601915086601f8301126107ee57600080fd5b8135818111156108005761080061076c565b604051601f8201601f19908116603f011681019083821181831017156108285761082861076c565b8160405282815289602084870101111561084157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561087557600080fd5b5035919050565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156108a457600080fd5b5051919050565b60005b838110156108c65781810151838201526020016108ae565b50506000910152565b600081518084526108e78160208601602086016108ab565b601f01601f19169290920160200192915050565b6001600160a01b038416815260606020820181905260009061091f908301856108cf565b9050826040830152949350505050565b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b841681528260048201526000825161096c8160248501602087016108ab565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bb81601c8501602087016108ab565b91909101601c01949350505050565b6020815260006109dd60208301846108cf565b939250505056fea2646970667358221220f154e7c06a230a8584c6b8ca63e2df548a849b848ce8e10ae47300e98e2f281164736f6c63430008120033", + "numDeployments": 9, + "solcInputHash": "76a6a9e6371fade9c8f1066bebbf4e7c", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochFinalized\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Gnosis to Arbitrum. Note: This contract is deployed on the Gnosis.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerGnosisToArb\":\"The router on Ethereum that routes from Gnosis to Arbitrum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochFinalized()\":{\"details\":\"Get the most recent epoch for which snapshots are finalized.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":\"VeaInboxGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\n\\n/// @dev Vea Inbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on the Gnosis.\\ncontract VeaInboxGnosisToArb is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerGnosisToArb; // The router on Ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] internal inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerGnosisToArb The router on Ethereum that routes from Gnosis to Arbitrum.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n constructor(uint256 _epochPeriod, address _routerGnosisToArb, IAMB _amb) {\\n epochPeriod = _epochPeriod;\\n routerGnosisToArb = _routerGnosisToArb;\\n amb = _amb;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function sendSnapshot(\\n uint256 _epoch,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(\\n IRouterToArb.route,\\n (\\n _epoch,\\n snapshots[_epoch],\\n _inboxIndex,\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n _gasLimit,\\n _maxFeePerGas\\n )\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(routerGnosisToArb, data, amb.maxGasPerTx());\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the most recent epoch for which snapshots are finalized.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochFinalized() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x0f6903fbd2d4f68f94851fa1325a6889fedb386ae9c270fefba850fbd9ce4da0\",\"license\":\"MIT\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60e060405234801561001057600080fd5b50604051610c12380380610c1283398101604081905261002f91610064565b60a0929092526001600160a01b0390811660c052166080526100a7565b6001600160a01b038116811461006157600080fd5b50565b60008060006060848603121561007957600080fd5b83519250602084015161008b8161004c565b604085015190925061009c8161004c565b809150509250925092565b60805160a05160c051610b0c610106600039600081816101cc015261036f015260008181610185015281816101f5015281816102210152818161048c015281816104c201526104f201526000818160e501526103460152610b0c6000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80634a439cfe116100715780634a439cfe1461015257806351920535146101655780635f85896c1461016d578063b5b7a18414610180578063d6565a2d146101a7578063eb8dedfa146101c757600080fd5b806306661abd146100ae5780631062b39a146100e0578063222ae7861461011f5780632bbb4704146101355780633ac3b6b61461014a575b600080fd5b6041546100c29067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6101077f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100d7565b6101276101ee565b6040519081526020016100d7565b6101486101433660046107ca565b61021f565b005b610127610483565b61012761016036600461081b565b6104bb565b6101486104ed565b6100c261017b36600461084a565b610611565b6101277f000000000000000000000000000000000000000000000000000000000000000081565b6101276101b536600461081b565b60006020819052908152604090205481565b6101077f000000000000000000000000000000000000000000000000000000000000000081565b600061021a7f000000000000000000000000000000000000000000000000000000000000000042610941565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000428161024e5761024e61092b565b0486106102ad5760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b60008681526020819052604080822054905160248101899052604481019190915260648101879052608481018690526001600160a01b03851660a482015260c4810184905260e481018390526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa1580156103b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103dc9190610963565b6040518463ffffffff1660e01b81526004016103fa939291906109cc565b6020604051808303816000875af1158015610419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043d9190610963565b9050877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828260405161047191815260200190565b60405180910390a25050505050505050565b600060016104b17f000000000000000000000000000000000000000000000000000000000000000042610941565b61021a9190610a00565b60006104e77f000000000000000000000000000000000000000000000000000000000000000083610941565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161051f5761051f61092b565b604154919004925060009067ffffffffffffffff165b801561056e5780600116600103610562576001826040811061055957610559610a21565b0154925061056e565b6001918201911c610535565b60011c5b80156105b05760019182019181811690036105a8576105a56001836040811061059d5761059d610a21565b01548461077d565b92505b60011c610572565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106106635760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064016102a4565b6040516000908290879061067f90889033908990602001610a37565b60408051601f198184030181529082905261069e939291602001610a6d565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610702576106ea6001836040811061059d5761059d610a21565b92506001918201911c677fffffffffffffff166106c9565b50816001826040811061071757610717610a21565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b0369061076a908490610abc565b60405180910390a1509095945050505050565b60008183101561079b578260005281602052604060002090506104e7565b5060009081526020919091526040902090565b80356001600160a01b03811681146107c557600080fd5b919050565b60008060008060008060c087890312156107e357600080fd5b863595506020870135945060408701359350610801606088016107ae565b92506080870135915060a087013590509295509295509295565b60006020828403121561082d57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561085f57600080fd5b610868846107ae565b925060208401356001600160e01b03198116811461088557600080fd5b9150604084013567ffffffffffffffff808211156108a257600080fd5b818601915086601f8301126108b657600080fd5b8135818111156108c8576108c8610834565b604051601f8201601f19908116603f011681019083821181831017156108f0576108f0610834565b8160405282815289602084870101111561090957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261095e57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561097557600080fd5b5051919050565b60005b8381101561099757818101518382015260200161097f565b50506000910152565b600081518084526109b881602086016020860161097c565b601f01601f19169290920160200192915050565b6001600160a01b03841681526060602082018190526000906109f0908301856109a0565b9050826040830152949350505050565b818103818111156104e757634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b8416815282600482015260008251610a5e81602485016020870161097c565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b16600882015260008251610aad81601c85016020870161097c565b91909101601c01949350505050565b602081526000610acf60208301846109a0565b939250505056fea26469706673582212208f85936a0d5ffa471af8a38c879ca78b06fcc0561f714b8395bb25bd09df413f64736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80634a439cfe116100715780634a439cfe1461015257806351920535146101655780635f85896c1461016d578063b5b7a18414610180578063d6565a2d146101a7578063eb8dedfa146101c757600080fd5b806306661abd146100ae5780631062b39a146100e0578063222ae7861461011f5780632bbb4704146101355780633ac3b6b61461014a575b600080fd5b6041546100c29067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6101077f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100d7565b6101276101ee565b6040519081526020016100d7565b6101486101433660046107ca565b61021f565b005b610127610483565b61012761016036600461081b565b6104bb565b6101486104ed565b6100c261017b36600461084a565b610611565b6101277f000000000000000000000000000000000000000000000000000000000000000081565b6101276101b536600461081b565b60006020819052908152604090205481565b6101077f000000000000000000000000000000000000000000000000000000000000000081565b600061021a7f000000000000000000000000000000000000000000000000000000000000000042610941565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000428161024e5761024e61092b565b0486106102ad5760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b60008681526020819052604080822054905160248101899052604481019190915260648101879052608481018690526001600160a01b03851660a482015260c4810184905260e481018390526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa1580156103b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103dc9190610963565b6040518463ffffffff1660e01b81526004016103fa939291906109cc565b6020604051808303816000875af1158015610419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043d9190610963565b9050877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828260405161047191815260200190565b60405180910390a25050505050505050565b600060016104b17f000000000000000000000000000000000000000000000000000000000000000042610941565b61021a9190610a00565b60006104e77f000000000000000000000000000000000000000000000000000000000000000083610941565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161051f5761051f61092b565b604154919004925060009067ffffffffffffffff165b801561056e5780600116600103610562576001826040811061055957610559610a21565b0154925061056e565b6001918201911c610535565b60011c5b80156105b05760019182019181811690036105a8576105a56001836040811061059d5761059d610a21565b01548461077d565b92505b60011c610572565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106106635760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064016102a4565b6040516000908290879061067f90889033908990602001610a37565b60408051601f198184030181529082905261069e939291602001610a6d565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610702576106ea6001836040811061059d5761059d610a21565b92506001918201911c677fffffffffffffff166106c9565b50816001826040811061071757610717610a21565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b0369061076a908490610abc565b60405180910390a1509095945050505050565b60008183101561079b578260005281602052604060002090506104e7565b5060009081526020919091526040902090565b80356001600160a01b03811681146107c557600080fd5b919050565b60008060008060008060c087890312156107e357600080fd5b863595506020870135945060408701359350610801606088016107ae565b92506080870135915060a087013590509295509295509295565b60006020828403121561082d57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561085f57600080fd5b610868846107ae565b925060208401356001600160e01b03198116811461088557600080fd5b9150604084013567ffffffffffffffff808211156108a257600080fd5b818601915086601f8301126108b657600080fd5b8135818111156108c8576108c8610834565b604051601f8201601f19908116603f011681019083821181831017156108f0576108f0610834565b8160405282815289602084870101111561090957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261095e57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561097557600080fd5b5051919050565b60005b8381101561099757818101518382015260200161097f565b50506000910152565b600081518084526109b881602086016020860161097c565b601f01601f19169290920160200192915050565b6001600160a01b03841681526060602082018190526000906109f0908301856109a0565b9050826040830152949350505050565b818103818111156104e757634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b8416815282600482015260008251610a5e81602485016020870161097c565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b16600882015260008251610aad81601c85016020870161097c565b91909101601c01949350505050565b602081526000610acf60208301846109a0565b939250505056fea26469706673582212208f85936a0d5ffa471af8a38c879ca78b06fcc0561f714b8395bb25bd09df413f64736f6c63430008120033", "devdoc": { "details": "Vea Inbox From Gnosis to Arbitrum. Note: This contract is deployed on the Gnosis.", "events": { "MessageSent(bytes)": { "details": "Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.", "params": { - "_nodeData": "The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)" + "_nodeData": "The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)." } }, - "SnapshotSaved(uint64)": { + "SnapshotSaved(bytes32,uint256,uint64)": { "params": { - "_count": "The count of messages in the merkle tree." + "_count": "The count of messages in the merkle tree.", + "_epoch": "The epoch of the snapshot.", + "_snapshot": "The snapshot of the merkle tree state root." } }, "SnapshotSent(uint256,bytes32)": { @@ -296,11 +330,32 @@ "_routerGnosisToArb": "The router on Ethereum that routes from Gnosis to Arbitrum." } }, + "epochAt(uint256)": { + "details": "Get the epoch from the inbox's point of view using timestamp.", + "params": { + "_timestamp": "The timestamp to calculate the epoch from." + }, + "returns": { + "epoch": "The calculated epoch." + } + }, + "epochFinalized()": { + "details": "Get the most recent epoch for which snapshots are finalized.", + "returns": { + "epoch": "The epoch associated with the current inbox block.timestamp" + } + }, + "epochNow()": { + "details": "Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.", + "returns": { + "epoch": "The epoch associated with the current inbox block.timestamp" + } + }, "saveSnapshot()": { "details": "Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state." }, "sendMessage(address,bytes4,bytes)": { - "details": "Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See merkle tree documentation for details how inbox manages state.", + "details": "Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.", "params": { "_data": "The message calldata, abi.encode(param1, param2, ...)", "_fnSelector": "The function selector of the receiving contract.", @@ -326,7 +381,7 @@ }, "userdoc": { "events": { - "SnapshotSaved(uint64)": { + "SnapshotSaved(bytes32,uint256,uint64)": { "notice": "The bridgers can watch this event to claim the stateRoot on the veaOutbox." } }, @@ -337,7 +392,7 @@ "storageLayout": { "storage": [ { - "astId": 5767, + "astId": 880, "contract": "src/gnosisToArbitrum/VeaInboxGnosisToArb.sol:VeaInboxGnosisToArb", "label": "snapshots", "offset": 0, @@ -345,7 +400,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 5771, + "astId": 884, "contract": "src/gnosisToArbitrum/VeaInboxGnosisToArb.sol:VeaInboxGnosisToArb", "label": "inbox", "offset": 0, @@ -353,7 +408,7 @@ "type": "t_array(t_bytes32)64_storage" }, { - "astId": 5773, + "astId": 886, "contract": "src/gnosisToArbitrum/VeaInboxGnosisToArb.sol:VeaInboxGnosisToArb", "label": "count", "offset": 0, diff --git a/contracts/deployments/chiado/VeaInboxGnosisToArbTestnet.json b/contracts/deployments/chiado/VeaInboxGnosisToArbTestnet.json index c341ad72..9ca6462b 100644 --- a/contracts/deployments/chiado/VeaInboxGnosisToArbTestnet.json +++ b/contracts/deployments/chiado/VeaInboxGnosisToArbTestnet.json @@ -1,5 +1,5 @@ { - "address": "0xfF2B7048d673767754B798df1702C786E2c59F1F", + "address": "0x8Bf88E6474d93bD2Dc0d76CB3BE8809c6BB84148", "abi": [ { "inputs": [ @@ -38,6 +38,18 @@ { "anonymous": false, "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "_snapshot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, { "indexed": false, "internalType": "uint64", @@ -93,13 +105,32 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "epochAt", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], - "name": "epochPeriod", + "name": "epochFinalized", "outputs": [ { "internalType": "uint256", - "name": "", + "name": "epoch", "type": "uint256" } ], @@ -107,19 +138,26 @@ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "epochNow", + "outputs": [ { "internalType": "uint256", - "name": "", + "name": "epoch", "type": "uint256" } ], - "name": "inbox", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochPeriod", "outputs": [ { - "internalType": "bytes32", + "internalType": "uint256", "name": "", - "type": "bytes32" + "type": "uint256" } ], "stateMutability": "view", @@ -208,13 +246,7 @@ } ], "name": "sendSnapshot", - "outputs": [ - { - "internalType": "bytes32", - "name": "ticketID", - "type": "bytes32" - } - ], + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -238,44 +270,46 @@ "type": "function" } ], - "transactionHash": "0x2ebd7f37e45d38d6a633271aa2b192413fff5d8d20a327cc1231a9674f3dee95", + "transactionHash": "0x9d7d921d78ec54ba49ed967a6790493bdd5952cec465c2b9a19313bb339c493c", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xfF2B7048d673767754B798df1702C786E2c59F1F", + "contractAddress": "0x8Bf88E6474d93bD2Dc0d76CB3BE8809c6BB84148", "transactionIndex": 1, - "gasUsed": "613732", + "gasUsed": "665312", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc6003090e783398168db648588767047b1d901b940262424b70df81740f3bb83", - "transactionHash": "0x2ebd7f37e45d38d6a633271aa2b192413fff5d8d20a327cc1231a9674f3dee95", + "blockHash": "0x808fdf9684af56c6091aa1a08f0bb1ee7631a04f45252c6df5b8c3c897596cef", + "transactionHash": "0x9d7d921d78ec54ba49ed967a6790493bdd5952cec465c2b9a19313bb339c493c", "logs": [], - "blockNumber": 4697843, - "cumulativeGasUsed": "642300", + "blockNumber": 4730186, + "cumulativeGasUsed": "693816", "status": 1, "byzantium": true }, "args": [ 7200, - "0xF0492e87Be6d644A6a467fE20ee9EC5eFCB6cB23", + "0x62581B897330CA4044C4db79Ebe96ca230569492", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a" ], - "numDeployments": 3, - "solcInputHash": "916b5e2210e8e15d34b48798389f67fe", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"inbox\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSnapshot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"ticketID\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Gnosis to Arbitrum. Note: This contract is deployed on the Gnosis.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)\"}},\"SnapshotSaved(uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerGnosisToArb\":\"The router on Ethereum that routes from Gnosis to Arbitrum.\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See merkle tree documentation for details how inbox manages state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":\"VeaInboxGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\n\\n/// @dev Vea Inbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on the Gnosis.\\ncontract VeaInboxGnosisToArb is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between stateroot snapshots\\n address public immutable routerGnosisToArb; // The router on Ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerGnosisToArb The router on Ethereum that routes from Gnosis to Arbitrum.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n constructor(uint256 _epochPeriod, address _routerGnosisToArb, IAMB _amb) {\\n epochPeriod = _epochPeriod;\\n routerGnosisToArb = _routerGnosisToArb;\\n amb = _amb;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See merkle tree documentation for details how inbox manages state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // data for outbox relay\\n abi.encodePacked( // abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...) where _data is abi.encode(param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function sendSnapshot(\\n uint256 _epoch,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external virtual returns (bytes32 ticketID) {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(\\n IRouterToArb.route,\\n (\\n _epoch,\\n snapshots[_epoch],\\n _inboxIndex,\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n _gasLimit,\\n _maxFeePerGas\\n )\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n ticketID = amb.requireToPassMessage(routerGnosisToArb, data, amb.maxGasPerTx());\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0x0125442dc06bc061fc1c6a3719018904fcc92db68696f93ea4bf770a4da66b15\",\"license\":\"MIT\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60e060405234801561001057600080fd5b50604051610b0b380380610b0b83398101604081905261002f91610064565b60a0929092526001600160a01b0390811660c052166080526100a7565b6001600160a01b038116811461006157600080fd5b50565b60008060006060848603121561007957600080fd5b83519250602084015161008b8161004c565b604085015190925061009c8161004c565b809150509250925092565b60805160a05160c051610a1a6100f1600039600081816101a6015261031701526000818161014c015281816101cc015261043301526000818160cf01526102ee0152610a1a6000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80635f85896c116100665780635f85896c14610134578063b5b7a18414610147578063d6565a2d1461016e578063e5a1c3561461018e578063eb8dedfa146101a157600080fd5b806306661abd146100985780631062b39a146100ca5780632bbb470414610109578063519205351461012a575b600080fd5b6041546100ac9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c1565b61011c61011736600461071b565b6101c8565b6040519081526020016100c1565b61013261042e565b005b6100ac610142366004610782565b610548565b61011c7f000000000000000000000000000000000000000000000000000000000000000081565b61011c61017c366004610863565b60006020819052908152604090205481565b61011c61019c366004610863565b6106b4565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000042816101f9576101f961087c565b0487106102585760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b600087815260208190526040808220549051602481018a9052604481019190915260648101889052608481018790526001600160a01b03861660a482015260c4810185905260e481018490526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928692869263e5789d039260048083019391928290030181865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190610892565b6040518463ffffffff1660e01b81526004016103a4939291906108fb565b6020604051808303816000875af11580156103c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e79190610892565b9150877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828360405161041b91815260200190565b60405180910390a2509695505050505050565b6000807f000000000000000000000000000000000000000000000000000000000000000042816104605761046061087c565b604154919004925060009067ffffffffffffffff165b80156104af57806001166001036104a3576001826040811061049a5761049a61092f565b015492506104af565b6001918201911c610476565b60011c5b80156104f15760019182019181811690036104e9576104e6600183604081106104de576104de61092f565b0154846106cb565b92505b60011c6104b3565b505060008281526020818152604091829020839055604154915167ffffffffffffffff90921682527f8d762ebc760982a11d9a00cc7c1c4c91f9c1084b85633ee8ca462da42465f1d9910160405180910390a15050565b60415460009067ffffffffffffffff90811690811061059a5760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b604482015260640161024f565b604051600090829087906105b690889033908990602001610945565b60408051601f19818403018152908290526105d593929160200161097b565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b6001811660000361063957610621600183604081106104de576104de61092f565b92506001918201911c677fffffffffffffff16610600565b50816001826040811061064e5761064e61092f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906106a19084906109ca565b60405180910390a1509095945050505050565b600181604081106106c457600080fd5b0154905081565b6000818310156106e9578260005281602052604060002090506106f9565b8160005282602052604060002090505b92915050565b80356001600160a01b038116811461071657600080fd5b919050565b60008060008060008060c0878903121561073457600080fd5b863595506020870135945060408701359350610752606088016106ff565b92506080870135915060a087013590509295509295509295565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561079757600080fd5b6107a0846106ff565b925060208401356001600160e01b0319811681146107bd57600080fd5b9150604084013567ffffffffffffffff808211156107da57600080fd5b818601915086601f8301126107ee57600080fd5b8135818111156108005761080061076c565b604051601f8201601f19908116603f011681019083821181831017156108285761082861076c565b8160405282815289602084870101111561084157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561087557600080fd5b5035919050565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156108a457600080fd5b5051919050565b60005b838110156108c65781810151838201526020016108ae565b50506000910152565b600081518084526108e78160208601602086016108ab565b601f01601f19169290920160200192915050565b6001600160a01b038416815260606020820181905260009061091f908301856108cf565b9050826040830152949350505050565b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b841681528260048201526000825161096c8160248501602087016108ab565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bb81601c8501602087016108ab565b91909101601c01949350505050565b6020815260006109dd60208301846108cf565b939250505056fea2646970667358221220f154e7c06a230a8584c6b8ca63e2df548a849b848ce8e10ae47300e98e2f281164736f6c63430008120033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80635f85896c116100665780635f85896c14610134578063b5b7a18414610147578063d6565a2d1461016e578063e5a1c3561461018e578063eb8dedfa146101a157600080fd5b806306661abd146100985780631062b39a146100ca5780632bbb470414610109578063519205351461012a575b600080fd5b6041546100ac9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c1565b61011c61011736600461071b565b6101c8565b6040519081526020016100c1565b61013261042e565b005b6100ac610142366004610782565b610548565b61011c7f000000000000000000000000000000000000000000000000000000000000000081565b61011c61017c366004610863565b60006020819052908152604090205481565b61011c61019c366004610863565b6106b4565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000042816101f9576101f961087c565b0487106102585760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b600087815260208190526040808220549051602481018a9052604481019190915260648101889052608481018790526001600160a01b03861660a482015260c4810185905260e481018490526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928692869263e5789d039260048083019391928290030181865afa158015610362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103869190610892565b6040518463ffffffff1660e01b81526004016103a4939291906108fb565b6020604051808303816000875af11580156103c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103e79190610892565b9150877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828360405161041b91815260200190565b60405180910390a2509695505050505050565b6000807f000000000000000000000000000000000000000000000000000000000000000042816104605761046061087c565b604154919004925060009067ffffffffffffffff165b80156104af57806001166001036104a3576001826040811061049a5761049a61092f565b015492506104af565b6001918201911c610476565b60011c5b80156104f15760019182019181811690036104e9576104e6600183604081106104de576104de61092f565b0154846106cb565b92505b60011c6104b3565b505060008281526020818152604091829020839055604154915167ffffffffffffffff90921682527f8d762ebc760982a11d9a00cc7c1c4c91f9c1084b85633ee8ca462da42465f1d9910160405180910390a15050565b60415460009067ffffffffffffffff90811690811061059a5760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b604482015260640161024f565b604051600090829087906105b690889033908990602001610945565b60408051601f19818403018152908290526105d593929160200161097b565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b6001811660000361063957610621600183604081106104de576104de61092f565b92506001918201911c677fffffffffffffff16610600565b50816001826040811061064e5761064e61092f565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906106a19084906109ca565b60405180910390a1509095945050505050565b600181604081106106c457600080fd5b0154905081565b6000818310156106e9578260005281602052604060002090506106f9565b8160005282602052604060002090505b92915050565b80356001600160a01b038116811461071657600080fd5b919050565b60008060008060008060c0878903121561073457600080fd5b863595506020870135945060408701359350610752606088016106ff565b92506080870135915060a087013590509295509295509295565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561079757600080fd5b6107a0846106ff565b925060208401356001600160e01b0319811681146107bd57600080fd5b9150604084013567ffffffffffffffff808211156107da57600080fd5b818601915086601f8301126107ee57600080fd5b8135818111156108005761080061076c565b604051601f8201601f19908116603f011681019083821181831017156108285761082861076c565b8160405282815289602084870101111561084157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60006020828403121561087557600080fd5b5035919050565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156108a457600080fd5b5051919050565b60005b838110156108c65781810151838201526020016108ae565b50506000910152565b600081518084526108e78160208601602086016108ab565b601f01601f19169290920160200192915050565b6001600160a01b038416815260606020820181905260009061091f908301856108cf565b9050826040830152949350505050565b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b841681528260048201526000825161096c8160248501602087016108ab565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109bb81601c8501602087016108ab565b91909101601c01949350505050565b6020815260006109dd60208301846108cf565b939250505056fea2646970667358221220f154e7c06a230a8584c6b8ca63e2df548a849b848ce8e10ae47300e98e2f281164736f6c63430008120033", + "numDeployments": 7, + "solcInputHash": "76a6a9e6371fade9c8f1066bebbf4e7c", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochFinalized\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Gnosis to Arbitrum. Note: This contract is deployed on the Gnosis.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerGnosisToArb\":\"The router on Ethereum that routes from Gnosis to Arbitrum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochFinalized()\":{\"details\":\"Get the most recent epoch for which snapshots are finalized.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":\"VeaInboxGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\n\\n/// @dev Vea Inbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on the Gnosis.\\ncontract VeaInboxGnosisToArb is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerGnosisToArb; // The router on Ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] internal inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerGnosisToArb The router on Ethereum that routes from Gnosis to Arbitrum.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n constructor(uint256 _epochPeriod, address _routerGnosisToArb, IAMB _amb) {\\n epochPeriod = _epochPeriod;\\n routerGnosisToArb = _routerGnosisToArb;\\n amb = _amb;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function sendSnapshot(\\n uint256 _epoch,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(\\n IRouterToArb.route,\\n (\\n _epoch,\\n snapshots[_epoch],\\n _inboxIndex,\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n _gasLimit,\\n _maxFeePerGas\\n )\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(routerGnosisToArb, data, amb.maxGasPerTx());\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the most recent epoch for which snapshots are finalized.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochFinalized() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x0f6903fbd2d4f68f94851fa1325a6889fedb386ae9c270fefba850fbd9ce4da0\",\"license\":\"MIT\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60e060405234801561001057600080fd5b50604051610c12380380610c1283398101604081905261002f91610064565b60a0929092526001600160a01b0390811660c052166080526100a7565b6001600160a01b038116811461006157600080fd5b50565b60008060006060848603121561007957600080fd5b83519250602084015161008b8161004c565b604085015190925061009c8161004c565b809150509250925092565b60805160a05160c051610b0c610106600039600081816101cc015261036f015260008181610185015281816101f5015281816102210152818161048c015281816104c201526104f201526000818160e501526103460152610b0c6000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80634a439cfe116100715780634a439cfe1461015257806351920535146101655780635f85896c1461016d578063b5b7a18414610180578063d6565a2d146101a7578063eb8dedfa146101c757600080fd5b806306661abd146100ae5780631062b39a146100e0578063222ae7861461011f5780632bbb4704146101355780633ac3b6b61461014a575b600080fd5b6041546100c29067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6101077f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100d7565b6101276101ee565b6040519081526020016100d7565b6101486101433660046107ca565b61021f565b005b610127610483565b61012761016036600461081b565b6104bb565b6101486104ed565b6100c261017b36600461084a565b610611565b6101277f000000000000000000000000000000000000000000000000000000000000000081565b6101276101b536600461081b565b60006020819052908152604090205481565b6101077f000000000000000000000000000000000000000000000000000000000000000081565b600061021a7f000000000000000000000000000000000000000000000000000000000000000042610941565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000428161024e5761024e61092b565b0486106102ad5760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b60008681526020819052604080822054905160248101899052604481019190915260648101879052608481018690526001600160a01b03851660a482015260c4810184905260e481018390526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa1580156103b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103dc9190610963565b6040518463ffffffff1660e01b81526004016103fa939291906109cc565b6020604051808303816000875af1158015610419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043d9190610963565b9050877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828260405161047191815260200190565b60405180910390a25050505050505050565b600060016104b17f000000000000000000000000000000000000000000000000000000000000000042610941565b61021a9190610a00565b60006104e77f000000000000000000000000000000000000000000000000000000000000000083610941565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161051f5761051f61092b565b604154919004925060009067ffffffffffffffff165b801561056e5780600116600103610562576001826040811061055957610559610a21565b0154925061056e565b6001918201911c610535565b60011c5b80156105b05760019182019181811690036105a8576105a56001836040811061059d5761059d610a21565b01548461077d565b92505b60011c610572565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106106635760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064016102a4565b6040516000908290879061067f90889033908990602001610a37565b60408051601f198184030181529082905261069e939291602001610a6d565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610702576106ea6001836040811061059d5761059d610a21565b92506001918201911c677fffffffffffffff166106c9565b50816001826040811061071757610717610a21565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b0369061076a908490610abc565b60405180910390a1509095945050505050565b60008183101561079b578260005281602052604060002090506104e7565b5060009081526020919091526040902090565b80356001600160a01b03811681146107c557600080fd5b919050565b60008060008060008060c087890312156107e357600080fd5b863595506020870135945060408701359350610801606088016107ae565b92506080870135915060a087013590509295509295509295565b60006020828403121561082d57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561085f57600080fd5b610868846107ae565b925060208401356001600160e01b03198116811461088557600080fd5b9150604084013567ffffffffffffffff808211156108a257600080fd5b818601915086601f8301126108b657600080fd5b8135818111156108c8576108c8610834565b604051601f8201601f19908116603f011681019083821181831017156108f0576108f0610834565b8160405282815289602084870101111561090957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261095e57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561097557600080fd5b5051919050565b60005b8381101561099757818101518382015260200161097f565b50506000910152565b600081518084526109b881602086016020860161097c565b601f01601f19169290920160200192915050565b6001600160a01b03841681526060602082018190526000906109f0908301856109a0565b9050826040830152949350505050565b818103818111156104e757634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b8416815282600482015260008251610a5e81602485016020870161097c565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b16600882015260008251610aad81601c85016020870161097c565b91909101601c01949350505050565b602081526000610acf60208301846109a0565b939250505056fea26469706673582212208f85936a0d5ffa471af8a38c879ca78b06fcc0561f714b8395bb25bd09df413f64736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80634a439cfe116100715780634a439cfe1461015257806351920535146101655780635f85896c1461016d578063b5b7a18414610180578063d6565a2d146101a7578063eb8dedfa146101c757600080fd5b806306661abd146100ae5780631062b39a146100e0578063222ae7861461011f5780632bbb4704146101355780633ac3b6b61461014a575b600080fd5b6041546100c29067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6101077f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100d7565b6101276101ee565b6040519081526020016100d7565b6101486101433660046107ca565b61021f565b005b610127610483565b61012761016036600461081b565b6104bb565b6101486104ed565b6100c261017b36600461084a565b610611565b6101277f000000000000000000000000000000000000000000000000000000000000000081565b6101276101b536600461081b565b60006020819052908152604090205481565b6101077f000000000000000000000000000000000000000000000000000000000000000081565b600061021a7f000000000000000000000000000000000000000000000000000000000000000042610941565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000428161024e5761024e61092b565b0486106102ad5760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b60008681526020819052604080822054905160248101899052604481019190915260648101879052608481018690526001600160a01b03851660a482015260c4810184905260e481018390526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa1580156103b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103dc9190610963565b6040518463ffffffff1660e01b81526004016103fa939291906109cc565b6020604051808303816000875af1158015610419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043d9190610963565b9050877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828260405161047191815260200190565b60405180910390a25050505050505050565b600060016104b17f000000000000000000000000000000000000000000000000000000000000000042610941565b61021a9190610a00565b60006104e77f000000000000000000000000000000000000000000000000000000000000000083610941565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161051f5761051f61092b565b604154919004925060009067ffffffffffffffff165b801561056e5780600116600103610562576001826040811061055957610559610a21565b0154925061056e565b6001918201911c610535565b60011c5b80156105b05760019182019181811690036105a8576105a56001836040811061059d5761059d610a21565b01548461077d565b92505b60011c610572565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106106635760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064016102a4565b6040516000908290879061067f90889033908990602001610a37565b60408051601f198184030181529082905261069e939291602001610a6d565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610702576106ea6001836040811061059d5761059d610a21565b92506001918201911c677fffffffffffffff166106c9565b50816001826040811061071757610717610a21565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b0369061076a908490610abc565b60405180910390a1509095945050505050565b60008183101561079b578260005281602052604060002090506104e7565b5060009081526020919091526040902090565b80356001600160a01b03811681146107c557600080fd5b919050565b60008060008060008060c087890312156107e357600080fd5b863595506020870135945060408701359350610801606088016107ae565b92506080870135915060a087013590509295509295509295565b60006020828403121561082d57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561085f57600080fd5b610868846107ae565b925060208401356001600160e01b03198116811461088557600080fd5b9150604084013567ffffffffffffffff808211156108a257600080fd5b818601915086601f8301126108b657600080fd5b8135818111156108c8576108c8610834565b604051601f8201601f19908116603f011681019083821181831017156108f0576108f0610834565b8160405282815289602084870101111561090957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261095e57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561097557600080fd5b5051919050565b60005b8381101561099757818101518382015260200161097f565b50506000910152565b600081518084526109b881602086016020860161097c565b601f01601f19169290920160200192915050565b6001600160a01b03841681526060602082018190526000906109f0908301856109a0565b9050826040830152949350505050565b818103818111156104e757634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b8416815282600482015260008251610a5e81602485016020870161097c565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b16600882015260008251610aad81601c85016020870161097c565b91909101601c01949350505050565b602081526000610acf60208301846109a0565b939250505056fea26469706673582212208f85936a0d5ffa471af8a38c879ca78b06fcc0561f714b8395bb25bd09df413f64736f6c63430008120033", "devdoc": { "details": "Vea Inbox From Gnosis to Arbitrum. Note: This contract is deployed on the Gnosis.", "events": { "MessageSent(bytes)": { "details": "Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.", "params": { - "_nodeData": "The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)" + "_nodeData": "The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)." } }, - "SnapshotSaved(uint64)": { + "SnapshotSaved(bytes32,uint256,uint64)": { "params": { - "_count": "The count of messages in the merkle tree." + "_count": "The count of messages in the merkle tree.", + "_epoch": "The epoch of the snapshot.", + "_snapshot": "The snapshot of the merkle tree state root." } }, "SnapshotSent(uint256,bytes32)": { @@ -296,11 +330,32 @@ "_routerGnosisToArb": "The router on Ethereum that routes from Gnosis to Arbitrum." } }, + "epochAt(uint256)": { + "details": "Get the epoch from the inbox's point of view using timestamp.", + "params": { + "_timestamp": "The timestamp to calculate the epoch from." + }, + "returns": { + "epoch": "The calculated epoch." + } + }, + "epochFinalized()": { + "details": "Get the most recent epoch for which snapshots are finalized.", + "returns": { + "epoch": "The epoch associated with the current inbox block.timestamp" + } + }, + "epochNow()": { + "details": "Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.", + "returns": { + "epoch": "The epoch associated with the current inbox block.timestamp" + } + }, "saveSnapshot()": { "details": "Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state." }, "sendMessage(address,bytes4,bytes)": { - "details": "Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See merkle tree documentation for details how inbox manages state.", + "details": "Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.", "params": { "_data": "The message calldata, abi.encode(param1, param2, ...)", "_fnSelector": "The function selector of the receiving contract.", @@ -326,7 +381,7 @@ }, "userdoc": { "events": { - "SnapshotSaved(uint64)": { + "SnapshotSaved(bytes32,uint256,uint64)": { "notice": "The bridgers can watch this event to claim the stateRoot on the veaOutbox." } }, @@ -337,7 +392,7 @@ "storageLayout": { "storage": [ { - "astId": 5767, + "astId": 880, "contract": "src/gnosisToArbitrum/VeaInboxGnosisToArb.sol:VeaInboxGnosisToArb", "label": "snapshots", "offset": 0, @@ -345,7 +400,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 5771, + "astId": 884, "contract": "src/gnosisToArbitrum/VeaInboxGnosisToArb.sol:VeaInboxGnosisToArb", "label": "inbox", "offset": 0, @@ -353,7 +408,7 @@ "type": "t_array(t_bytes32)64_storage" }, { - "astId": 5773, + "astId": 886, "contract": "src/gnosisToArbitrum/VeaInboxGnosisToArb.sol:VeaInboxGnosisToArb", "label": "count", "offset": 0, diff --git a/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json b/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json index 7c30cd13..31676027 100644 --- a/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json +++ b/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x660daB9A6436A814a6ae3a6f27b309356a4bE78c", + "address": "0xb0263478A46d885D715B01fbac745500B9576634", "abi": [ { "inputs": [ @@ -86,7 +86,7 @@ "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "_epoch", "type": "uint256" @@ -166,6 +166,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "burn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -340,6 +353,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "depositPlusReward", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -473,21 +499,27 @@ "type": "function" }, { - "inputs": [], - "name": "latestVerifiedEpoch", - "outputs": [ + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "_msgId", "type": "uint256" } ], + "name": "isMsgRelayed", + "outputs": [ + { + "internalType": "bool", + "name": "isRelayed", + "type": "bool" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "maxMissingBlocks", + "name": "latestVerifiedEpoch", "outputs": [ { "internalType": "uint256", @@ -500,7 +532,7 @@ }, { "inputs": [], - "name": "minChallengePeriod", + "name": "maxMissingBlocks", "outputs": [ { "internalType": "uint256", @@ -512,21 +544,15 @@ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "minChallengePeriod", + "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], - "name": "relayed", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], "stateMutability": "view", "type": "function" }, @@ -603,6 +629,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "routerChainId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -1045,19 +1084,19 @@ "type": "function" } ], - "transactionHash": "0x2dc8136b82a0655fca9bb5c03a80e97c91cfbc99d6a50deeab3a2f3e15d9c7c3", + "transactionHash": "0xa7c8c5e98a40522136eca8d57c0fddf408d045b28b64caf9c5fc150874062ab4", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x660daB9A6436A814a6ae3a6f27b309356a4bE78c", - "transactionIndex": 1, - "gasUsed": "2286994", + "contractAddress": "0xb0263478A46d885D715B01fbac745500B9576634", + "transactionIndex": 2, + "gasUsed": "2334192", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x99ae32440ed53f65c12bb9bc00084ff63f6a902e8110a6b945b7256c9ad4e829", - "transactionHash": "0x2dc8136b82a0655fca9bb5c03a80e97c91cfbc99d6a50deeab3a2f3e15d9c7c3", + "blockHash": "0x8cff3c0731e77708e948f4a7c27f300bf03ef448ef04f7916af70e67f0339bc5", + "transactionHash": "0xa7c8c5e98a40522136eca8d57c0fddf408d045b28b64caf9c5fc150874062ab4", "logs": [], - "blockNumber": 4697782, - "cumulativeGasUsed": "2315498", + "blockNumber": 4730103, + "cumulativeGasUsed": "2391840", "status": 1, "byzantium": true }, @@ -1067,17 +1106,17 @@ 0, 10000000000000, "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0xef62E517bE7e319458f41014C4d8864117381255", + "0xEC337Fb9977848D0784dC4F01A69c237691755E0", 86400, 10000000000000, 5, "0x8d74e5e4DA11629537C4575cB0f33b4F0Dfa42EB" ], - "numDeployments": 3, - "solcInputHash": "6b0b750c6eee9aa0a5e450d1f0bbb2d2", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IWETH\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_weth\":\"The address of the WETH contract on Gnosis.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by receiving a message from the AMB.\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":\"VeaOutboxArbToGnosisDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/tokens/gnosis/IWETH.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n IWETH public immutable weth; // The address of the WETH contract on Gnosis.\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 internal immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 _epoch, bytes32 _stateRoot);\\n\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n weth = _weth;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerDelayLimit by receiving a message from the AMB.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n // If _newSequencerDelayLimit > timeout * epochPeriod, then the bridge will shutdown.\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external virtual {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch has not yet passed.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.challenger, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x621689dc95671db595076306497c677a91238979e114854dc3292ec984286a29\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToGnosis/VeaOutboxArbToGnosis.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Chiado.\\n/// Note: This contract is deployed on Chiado.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public override onlyByDevnetOperator {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth\\n )\\n VeaOutboxArbToGnosis(\\n _deposit,\\n _epochPeriod,\\n _minChallengePeriod,\\n _timeoutEpochs,\\n _amb,\\n _routerArbToGnosis,\\n _sequencerDelayLimit,\\n _maxMissingBlocks,\\n _routerChainId,\\n _weth\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xf0586aed26d7bd8cc6b397f996d6d7220abb2f8676670749d81d7f6133ad8a27\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/tokens/gnosis/IWETH.sol\":{\"content\":\"// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5daaf60d11ee2075260d0f3adfb22b1c536db983/contracts/token/ERC20/BurnableToken.sol\\n// implementation: https://gnosisscan.io/address/0xf8d1677c8a0c961938bf2f9adc3f3cfda759a9d9#code\\n// proxy: https://gnosisscan.io/token/0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1#readProxyContract\\n\\n/**\\n * @title Burnable Token\\n * @dev Token that can be irreversibly burned (destroyed).\\n */\\ninterface IWETH {\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n event Burn(address indexed burner, uint256 value);\\n\\n /**\\n * @dev Burns a specific amount of tokens.\\n * @param _value The amount of token to be burned.\\n */\\n function burn(uint256 _value) external;\\n\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Transfer tokens from one address to another\\n * @param _from address The address which you want to send tokens from\\n * @param _to address The address which you want to transfer to\\n * @param _value uint256 the amount of tokens to be transferred\\n */\\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd7cb8c8585a387464c451c2ff81ad3f9f02e291fe0dad802ff84646ff18d1eb2\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101e06040523480156200001257600080fd5b5060405162002b0538038062002b0583398101604081905262000035916200012f565b60e08a90526101608990526101a08790526101808890526001600160a01b0380871660805280861660a05260048590556101c0849052610140839052811660c052898989898989898989896200008d60028b620001e0565b610100819052620000a08b600262000203565b620000ac919062000223565b6101205261016051600190620000c39042620001e0565b620000cf919062000223565b6001819055505050505050505050505033600660006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050505050505050505062000239565b6001600160a01b03811681146200012c57600080fd5b50565b6000806000806000806000806000806101408b8d0312156200015057600080fd5b8a51995060208b0151985060408b0151975060608b0151965060808b0151620001798162000116565b60a08c01519096506200018c8162000116565b8095505060c08b0151935060e08b015192506101008b015191506101208b0151620001b78162000116565b809150509295989b9194979a5092959850565b634e487b7160e01b600052601160045260246000fd5b600082620001fe57634e487b7160e01b600052601260045260246000fd5b500490565b80820281158282048414176200021d576200021d620001ca565b92915050565b818103818111156200021d576200021d620001ca565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c051612734620003d1600039600081816104d301526120ed015260008181610507015281816108bc01528181611a3501528181611bc00152611e7f01526000818161058f015261208101526000818161053b015281816108e001528181610c710152818161192301528181611a5901528181611be40152611ea3015260008181610a570152610d8a0152600081816115af015261179f0152600081816114be01526116f10152600081816105c3015281816106aa01528181610fa50152818161181a01528181611d3901528181611dce0152611ff8015260008181610366015281816106d001528181610fcb015281816114e40152818161155001528181611717015281816117c50152818161184001528181611d5f01528181611df4015261201e0152600081816105f701528181610b440152610e7701526000818161022f0152818161095b015281816109d501528181610ab901528181610ca601528181610d080152610dec01526127346000f3fe6080604052600436106101e35760003560e01c80638a619a7111610102578063b633b94411610095578063da2b7bc411610064578063da2b7bc414610619578063df19e6ff14610639578063e813a75514610666578063eedcf2a91461067c57600080fd5b8063b633b9441461055d578063c2114a161461057d578063d0e30db0146105b1578063d5e6a9df146105e557600080fd5b80639588eca2116100d15780639588eca2146104ab578063aa22a1c6146104c1578063b044397e146104f5578063b5b7a1841461052957600080fd5b80638a619a711461041e5780638ad3a8f71461043e57806390df63b71461045e578063930f28af1461048b57600080fd5b806331ddf7431161017a57806349b4299e1161014957806349b4299e146103a85780634a439cfe146103c8578063541adcca146103e85780637ffc2a6e1461040857600080fd5b806331ddf743146103145780633ce43cfd146103345780633fc8cef3146103545780634788cb381461038857600080fd5b80632639c060116101b65780632639c0601461029157806327ee6bdd146102be5780632c192519146102d457806331d14457146102f457600080fd5b806301139b68146101e85780630f0adca5146101fd5780631062b39a1461021d578063222ae7861461026e575b600080fd5b6101fb6101f63660046122aa565b61068f565b005b34801561020957600080fd5b506101fb6102183660046122d8565b6108ba565b34801561022957600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561027a57600080fd5b50610283610c6a565b604051908152602001610265565b34801561029d57600080fd5b506102836102ac36600461230f565b60026020526000908152604090205481565b3480156102ca57600080fd5b5061028360015481565b3480156102e057600080fd5b506101fb6102ef366004612328565b610c9b565b34801561030057600080fd5b506101fb61030f366004612328565b610f73565b34801561032057600080fd5b506101fb61032f3660046123ab565b61115c565b34801561034057600080fd5b506101fb61034f36600461246d565b6113fc565b34801561036057600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b34801561039457600080fd5b506101fb6103a33660046122aa565b611636565b3480156103b457600080fd5b506101fb6103c33660046122aa565b611871565b3480156103d457600080fd5b506102836103e336600461230f565b61191c565b3480156103f457600080fd5b506102836104033660046124a6565b61194e565b34801561041457600080fd5b5061028360055481565b34801561042a57600080fd5b506101fb6104393660046124c9565b6119a0565b34801561044a57600080fd5b50600654610251906001600160a01b031681565b34801561046a57600080fd5b5061028361047936600461230f565b60036020526000908152604090205481565b34801561049757600080fd5b506101fb6104a63660046122aa565b611a33565b3480156104b757600080fd5b5061028360005481565b3480156104cd57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561050157600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561053557600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561056957600080fd5b506101fb6105783660046122aa565b611bbe565b34801561058957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105bd57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f157600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b34801561062557600080fd5b506101fb6106343660046122aa565b611e7d565b34801561064557600080fd5b506106596106543660046124a6565b612063565b60405161026591906124fc565b34801561067257600080fd5b5061028360045481565b6101fb61068a366004612328565b61212a565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610721573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107459190612516565b61076a5760405162461bcd60e51b815260040161076190612538565b60405180910390fd5b6107738161194e565b6000838152600260205260409020541461079f5760405162461bcd60e51b815260040161076190612567565b60c08101516001600160a01b0316156107fa5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610761565b60008160a001516002811115610812576108126124e6565b1461085f5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610761565b3360c082015261086e8161194e565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090d5761090d61258f565b040311156109505760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610761565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109d35760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610761565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5591906125a5565b7f000000000000000000000000000000000000000000000000000000000000000014610ab75760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610761565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3991906125be565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610bac5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610761565b60015483118015610bbc57508115155b15610bff57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610c088161194e565b60008481526002602052604090205403610c65578051829003610c3157600160a0820152610c4c565b60c08101516001600160a01b031615610c4c57600260a08201525b610c558161194e565b6000848152600260205260409020555b505050565b6000610c967f0000000000000000000000000000000000000000000000000000000000000000426125db565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d065760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610761565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8891906125a5565b7f000000000000000000000000000000000000000000000000000000000000000014610dea5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610761565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6c91906125be565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610edf5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610761565b8060055410610f275760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b6044820152606401610761565b8160045414610f6f57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15b5050565b6006546001600160a01b03163314610f8a57600080fd5b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561101c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110409190612516565b61105c5760405162461bcd60e51b815260040161076190612538565b806110795760405162461bcd60e51b815260040161076190612567565b600082815260026020526040902054156110cb5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610761565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526111119061194e565b60008381526002602090815260409182902092909255805184815291820183905233917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d5791016108ae565b6040851061119e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610761565b6000848484846040516020016111b794939291906125fd565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156112375760008888838181106111f9576111f961263f565b9050602002013590508281111561121e5782600052806020526040600020925061122e565b8060005282602052604060002092505b506001016111dd565b50806000541461127a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610761565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112ef5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610761565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061131f9089908990612655565b6000604051808303816000865af19150503d806000811461135c576040519150601f19603f3d011682016040523d82523d6000602084013e611361565b606091505b50509050806113b25760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610761565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61140e610403368390038301836124a6565b6000838152600260205260409020541461143a5760405162461bcd60e51b815260040161076190612567565b600261144c60c0830160a08401612665565b600281111561145d5761145d6124e6565b1461149e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610761565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561153057600080fd5b505af1158015611544573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061158960e0840160c085016124c9565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af11580156115f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161a9190612516565b610f6f5760405162461bcd60e51b815260040161076190612538565b61163f8161194e565b6000838152600260205260409020541461166b5760405162461bcd60e51b815260040161076190612567565b60018160a001516002811115611683576116836124e6565b146116c05760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610761565b60008281526002602052604081205560c08101516001600160a01b0316156117f657604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561176357600080fd5b505af1158015611777573d6000803e3d6000fd5b50505050602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115d7565b602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115d7565b6006546001600160a01b0316331461188857600080fd5b6118918161194e565b600083815260026020526040902054146118bd5760405162461bcd60e51b815260040161076190612567565b63ffffffff4281166060830152431660808201526118da8161194e565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610f66565b60006119487f0000000000000000000000000000000000000000000000000000000000000000836125db565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611983989097969101612680565b604051602081830303815290604052805190602001209050919050565b6006546001600160a01b031633146119b757600080fd5b6006546001600160a01b03163314611a115760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610761565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a8657611a8661258f565b04031115611ac95760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610761565b611ad28161194e565b60008381526002602052604090205414611afe5760405162461bcd60e51b815260040161076190612567565b60c08101516001600160a01b031615611b505760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610761565b600154821115611b9857600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611ba88161194e565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c1157611c1161258f565b040311611c525760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610761565b611c5b8161194e565b60008381526002602052604090205414611c875760405162461bcd60e51b815260040161076190612567565b60008160a001516002811115611c9f57611c9f6124e6565b14611cde5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610761565b60c08101516001600160a01b031615610f6f5760208101516001600160a01b0316611d90576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115d7565b60c0810180516000909152611da48261194e565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015611e3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e619190612516565b610c655760405162461bcd60e51b815260040161076190612538565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ed057611ed061258f565b040311611f115760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610761565b611f1a8161194e565b60008381526002602052604090205414611f465760405162461bcd60e51b815260040161076190612567565b60008160a001516002811115611f5e57611f5e6124e6565b14611f9d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610761565b60208101516001600160a01b031615610f6f5760c08101516001600160a01b031661204f57600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115d7565b6020810180516000909152611da48261194e565b6000816060015163ffffffff1660000361207f57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff16420310156120bb57506003919050565b60006005836060015163ffffffff164203816120d9576120d961258f565b608085015163ffffffff16919004019050437f00000000000000000000000000000000000000000000000000000000000000008183031161211d5760019250612122565b600092505b50505b919050565b6121348282610f73565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261217b8382611871565b63ffffffff4281166060830152431660808201526121998382611a33565b600160a0820152610c658382611636565b6001600160a01b03811681146121bf57600080fd5b50565b8035612125816121aa565b803563ffffffff8116811461212557600080fd5b80356003811061212557600080fd5b600060e0828403121561220257600080fd5b60405160e0810181811067ffffffffffffffff8211171561223357634e487b7160e01b600052604160045260246000fd5b60405282358152905080612249602084016121c2565b602082015261225a604084016121cd565b604082015261226b606084016121cd565b606082015261227c608084016121cd565b608082015261228d60a084016121e1565b60a082015261229e60c084016121c2565b60c08201525092915050565b60008061010083850312156122be57600080fd5b823591506122cf84602085016121f0565b90509250929050565b600080600061012084860312156122ee57600080fd5b833592506020840135915061230685604086016121f0565b90509250925092565b60006020828403121561232157600080fd5b5035919050565b6000806040838503121561233b57600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461212557600080fd5b60008083601f84011261237457600080fd5b50813567ffffffffffffffff81111561238c57600080fd5b6020830191508360208285010111156123a457600080fd5b9250929050565b600080600080600080608087890312156123c457600080fd5b863567ffffffffffffffff808211156123dc57600080fd5b818901915089601f8301126123f057600080fd5b8135818111156123ff57600080fd5b8a60208260051b850101111561241457600080fd5b6020830198508097505061242a60208a0161234a565b955061243860408a016121c2565b9450606089013591508082111561244e57600080fd5b5061245b89828a01612362565b979a9699509497509295939492505050565b60008082840361010081121561248257600080fd5b8335925060e0601f198201121561249857600080fd5b506020830190509250929050565b600060e082840312156124b857600080fd5b6124c283836121f0565b9392505050565b6000602082840312156124db57600080fd5b81356124c2816121aa565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612510576125106124e6565b91905290565b60006020828403121561252857600080fd5b815180151581146124c257600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156125b757600080fd5b5051919050565b6000602082840312156125d057600080fd5b81516124c2816121aa565b6000826125f857634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561267757600080fd5b6124c2826121e1565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106126d8576126d86124e6565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220f42e1bfed5051197c44c7324e2206d07e94b08f047231a0764df362b30e8daae64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101e35760003560e01c80638a619a7111610102578063b633b94411610095578063da2b7bc411610064578063da2b7bc414610619578063df19e6ff14610639578063e813a75514610666578063eedcf2a91461067c57600080fd5b8063b633b9441461055d578063c2114a161461057d578063d0e30db0146105b1578063d5e6a9df146105e557600080fd5b80639588eca2116100d15780639588eca2146104ab578063aa22a1c6146104c1578063b044397e146104f5578063b5b7a1841461052957600080fd5b80638a619a711461041e5780638ad3a8f71461043e57806390df63b71461045e578063930f28af1461048b57600080fd5b806331ddf7431161017a57806349b4299e1161014957806349b4299e146103a85780634a439cfe146103c8578063541adcca146103e85780637ffc2a6e1461040857600080fd5b806331ddf743146103145780633ce43cfd146103345780633fc8cef3146103545780634788cb381461038857600080fd5b80632639c060116101b65780632639c0601461029157806327ee6bdd146102be5780632c192519146102d457806331d14457146102f457600080fd5b806301139b68146101e85780630f0adca5146101fd5780631062b39a1461021d578063222ae7861461026e575b600080fd5b6101fb6101f63660046122aa565b61068f565b005b34801561020957600080fd5b506101fb6102183660046122d8565b6108ba565b34801561022957600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561027a57600080fd5b50610283610c6a565b604051908152602001610265565b34801561029d57600080fd5b506102836102ac36600461230f565b60026020526000908152604090205481565b3480156102ca57600080fd5b5061028360015481565b3480156102e057600080fd5b506101fb6102ef366004612328565b610c9b565b34801561030057600080fd5b506101fb61030f366004612328565b610f73565b34801561032057600080fd5b506101fb61032f3660046123ab565b61115c565b34801561034057600080fd5b506101fb61034f36600461246d565b6113fc565b34801561036057600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b34801561039457600080fd5b506101fb6103a33660046122aa565b611636565b3480156103b457600080fd5b506101fb6103c33660046122aa565b611871565b3480156103d457600080fd5b506102836103e336600461230f565b61191c565b3480156103f457600080fd5b506102836104033660046124a6565b61194e565b34801561041457600080fd5b5061028360055481565b34801561042a57600080fd5b506101fb6104393660046124c9565b6119a0565b34801561044a57600080fd5b50600654610251906001600160a01b031681565b34801561046a57600080fd5b5061028361047936600461230f565b60036020526000908152604090205481565b34801561049757600080fd5b506101fb6104a63660046122aa565b611a33565b3480156104b757600080fd5b5061028360005481565b3480156104cd57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561050157600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561053557600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561056957600080fd5b506101fb6105783660046122aa565b611bbe565b34801561058957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105bd57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f157600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b34801561062557600080fd5b506101fb6106343660046122aa565b611e7d565b34801561064557600080fd5b506106596106543660046124a6565b612063565b60405161026591906124fc565b34801561067257600080fd5b5061028360045481565b6101fb61068a366004612328565b61212a565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610721573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107459190612516565b61076a5760405162461bcd60e51b815260040161076190612538565b60405180910390fd5b6107738161194e565b6000838152600260205260409020541461079f5760405162461bcd60e51b815260040161076190612567565b60c08101516001600160a01b0316156107fa5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610761565b60008160a001516002811115610812576108126124e6565b1461085f5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610761565b3360c082015261086e8161194e565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161090d5761090d61258f565b040311156109505760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610761565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109d35760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b6064820152608401610761565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5591906125a5565b7f000000000000000000000000000000000000000000000000000000000000000014610ab75760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610761565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3991906125be565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610bac5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610761565b60015483118015610bbc57508115155b15610bff57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610c088161194e565b60008481526002602052604090205403610c65578051829003610c3157600160a0820152610c4c565b60c08101516001600160a01b031615610c4c57600260a08201525b610c558161194e565b6000848152600260205260409020555b505050565b6000610c967f0000000000000000000000000000000000000000000000000000000000000000426125db565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d065760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610761565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8891906125a5565b7f000000000000000000000000000000000000000000000000000000000000000014610dea5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b6044820152606401610761565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6c91906125be565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610edf5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b6044820152606401610761565b8060055410610f275760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b6044820152606401610761565b8160045414610f6f57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15b5050565b6006546001600160a01b03163314610f8a57600080fd5b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561101c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110409190612516565b61105c5760405162461bcd60e51b815260040161076190612538565b806110795760405162461bcd60e51b815260040161076190612567565b600082815260026020526040902054156110cb5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610761565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526111119061194e565b60008381526002602090815260409182902092909255805184815291820183905233917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d5791016108ae565b6040851061119e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610761565b6000848484846040516020016111b794939291906125fd565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156112375760008888838181106111f9576111f961263f565b9050602002013590508281111561121e5782600052806020526040600020925061122e565b8060005282602052604060002092505b506001016111dd565b50806000541461127a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610761565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112ef5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610761565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061131f9089908990612655565b6000604051808303816000865af19150503d806000811461135c576040519150601f19603f3d011682016040523d82523d6000602084013e611361565b606091505b50509050806113b25760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610761565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61140e610403368390038301836124a6565b6000838152600260205260409020541461143a5760405162461bcd60e51b815260040161076190612567565b600261144c60c0830160a08401612665565b600281111561145d5761145d6124e6565b1461149e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610761565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561153057600080fd5b505af1158015611544573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061158960e0840160c085016124c9565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af11580156115f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161a9190612516565b610f6f5760405162461bcd60e51b815260040161076190612538565b61163f8161194e565b6000838152600260205260409020541461166b5760405162461bcd60e51b815260040161076190612567565b60018160a001516002811115611683576116836124e6565b146116c05760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610761565b60008281526002602052604081205560c08101516001600160a01b0316156117f657604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561176357600080fd5b505af1158015611777573d6000803e3d6000fd5b50505050602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115d7565b602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115d7565b6006546001600160a01b0316331461188857600080fd5b6118918161194e565b600083815260026020526040902054146118bd5760405162461bcd60e51b815260040161076190612567565b63ffffffff4281166060830152431660808201526118da8161194e565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610f66565b60006119487f0000000000000000000000000000000000000000000000000000000000000000836125db565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611983989097969101612680565b604051602081830303815290604052805190602001209050919050565b6006546001600160a01b031633146119b757600080fd5b6006546001600160a01b03163314611a115760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610761565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a8657611a8661258f565b04031115611ac95760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610761565b611ad28161194e565b60008381526002602052604090205414611afe5760405162461bcd60e51b815260040161076190612567565b60c08101516001600160a01b031615611b505760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610761565b600154821115611b9857600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611ba88161194e565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c1157611c1161258f565b040311611c525760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610761565b611c5b8161194e565b60008381526002602052604090205414611c875760405162461bcd60e51b815260040161076190612567565b60008160a001516002811115611c9f57611c9f6124e6565b14611cde5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610761565b60c08101516001600160a01b031615610f6f5760208101516001600160a01b0316611d90576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115d7565b60c0810180516000909152611da48261194e565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015611e3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e619190612516565b610c655760405162461bcd60e51b815260040161076190612538565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ed057611ed061258f565b040311611f115760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610761565b611f1a8161194e565b60008381526002602052604090205414611f465760405162461bcd60e51b815260040161076190612567565b60008160a001516002811115611f5e57611f5e6124e6565b14611f9d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610761565b60208101516001600160a01b031615610f6f5760c08101516001600160a01b031661204f57600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115d7565b6020810180516000909152611da48261194e565b6000816060015163ffffffff1660000361207f57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff16420310156120bb57506003919050565b60006005836060015163ffffffff164203816120d9576120d961258f565b608085015163ffffffff16919004019050437f00000000000000000000000000000000000000000000000000000000000000008183031161211d5760019250612122565b600092505b50505b919050565b6121348282610f73565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261217b8382611871565b63ffffffff4281166060830152431660808201526121998382611a33565b600160a0820152610c658382611636565b6001600160a01b03811681146121bf57600080fd5b50565b8035612125816121aa565b803563ffffffff8116811461212557600080fd5b80356003811061212557600080fd5b600060e0828403121561220257600080fd5b60405160e0810181811067ffffffffffffffff8211171561223357634e487b7160e01b600052604160045260246000fd5b60405282358152905080612249602084016121c2565b602082015261225a604084016121cd565b604082015261226b606084016121cd565b606082015261227c608084016121cd565b608082015261228d60a084016121e1565b60a082015261229e60c084016121c2565b60c08201525092915050565b60008061010083850312156122be57600080fd5b823591506122cf84602085016121f0565b90509250929050565b600080600061012084860312156122ee57600080fd5b833592506020840135915061230685604086016121f0565b90509250925092565b60006020828403121561232157600080fd5b5035919050565b6000806040838503121561233b57600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461212557600080fd5b60008083601f84011261237457600080fd5b50813567ffffffffffffffff81111561238c57600080fd5b6020830191508360208285010111156123a457600080fd5b9250929050565b600080600080600080608087890312156123c457600080fd5b863567ffffffffffffffff808211156123dc57600080fd5b818901915089601f8301126123f057600080fd5b8135818111156123ff57600080fd5b8a60208260051b850101111561241457600080fd5b6020830198508097505061242a60208a0161234a565b955061243860408a016121c2565b9450606089013591508082111561244e57600080fd5b5061245b89828a01612362565b979a9699509497509295939492505050565b60008082840361010081121561248257600080fd5b8335925060e0601f198201121561249857600080fd5b506020830190509250929050565b600060e082840312156124b857600080fd5b6124c283836121f0565b9392505050565b6000602082840312156124db57600080fd5b81356124c2816121aa565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612510576125106124e6565b91905290565b60006020828403121561252857600080fd5b815180151581146124c257600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156125b757600080fd5b5051919050565b6000602082840312156125d057600080fd5b81516124c2816121aa565b6000826125f857634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561267757600080fd5b6124c2826121e1565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106126d8576126d86124e6565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220f42e1bfed5051197c44c7324e2206d07e94b08f047231a0764df362b30e8daae64736f6c63430008120033", + "numDeployments": 8, + "solcInputHash": "74af439f219888d42665a3312cefc0fc", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IWETH\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositPlusReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_msgId\",\"type\":\"uint256\"}],\"name\":\"isMsgRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRelayed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_weth\":\"The address of the WETH contract on Gnosis.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"isMsgRelayed(uint256)\":{\"details\":\"Get the msg relayed status.\",\"params\":{\"_msgId\":\"The msgId to check.\"},\"returns\":{\"isRelayed\":\"True if the msg was relayed.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by receiving a message from the AMB.\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":\"VeaOutboxArbToGnosisDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/tokens/gnosis/IWETH.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n IWETH public immutable weth; // The address of the WETH contract on Gnosis.\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 public immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 public immutable depositPlusReward; // 2 * deposit - burn\\n\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n weth = _weth;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerDelayLimit by receiving a message from the AMB.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n // If _newSequencerDelayLimit > timeout * epochPeriod, then the bridge will shutdown.\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external virtual {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n unchecked {\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch has not yet passed.\\\");\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.challenger, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) {\\n status = CensorshipTestStatus.NotStarted;\\n } else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod) {\\n status = CensorshipTestStatus.InProgress;\\n } else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the msg relayed status.\\n /// @param _msgId The msgId to check.\\n /// @return isRelayed True if the msg was relayed.\\n function isMsgRelayed(uint256 _msgId) external view returns(bool isRelayed) {\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1));\\n }\\n}\\n\",\"keccak256\":\"0xa3ed4eae38d473838a56aea19aacc8302e93c17cab7e82af74315c462d44132a\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToGnosis/VeaOutboxArbToGnosis.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Chiado.\\n/// Note: This contract is deployed on Chiado.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public override onlyByDevnetOperator {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth\\n )\\n VeaOutboxArbToGnosis(\\n _deposit,\\n _epochPeriod,\\n _minChallengePeriod,\\n _timeoutEpochs,\\n _amb,\\n _routerArbToGnosis,\\n _sequencerDelayLimit,\\n _maxMissingBlocks,\\n _routerChainId,\\n _weth\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xf0586aed26d7bd8cc6b397f996d6d7220abb2f8676670749d81d7f6133ad8a27\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/tokens/gnosis/IWETH.sol\":{\"content\":\"// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5daaf60d11ee2075260d0f3adfb22b1c536db983/contracts/token/ERC20/BurnableToken.sol\\n// implementation: https://gnosisscan.io/address/0xf8d1677c8a0c961938bf2f9adc3f3cfda759a9d9#code\\n// proxy: https://gnosisscan.io/token/0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1#readProxyContract\\n\\n/**\\n * @title Burnable Token\\n * @dev Token that can be irreversibly burned (destroyed).\\n */\\ninterface IWETH {\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n event Burn(address indexed burner, uint256 value);\\n\\n /**\\n * @dev Burns a specific amount of tokens.\\n * @param _value The amount of token to be burned.\\n */\\n function burn(uint256 _value) external;\\n\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Transfer tokens from one address to another\\n * @param _from address The address which you want to send tokens from\\n * @param _to address The address which you want to transfer to\\n * @param _value uint256 the amount of tokens to be transferred\\n */\\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd7cb8c8585a387464c451c2ff81ad3f9f02e291fe0dad802ff84646ff18d1eb2\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101e06040523480156200001257600080fd5b5060405162002bf838038062002bf883398101604081905262000035916200012f565b60e08a90526101608990526101a08790526101808890526001600160a01b0380871660805280861660a05260048590556101c0849052610140839052811660c052898989898989898989896200008d60028b620001e0565b610100819052620000a08b600262000203565b620000ac919062000223565b6101205261016051600190620000c39042620001e0565b620000cf919062000223565b6001819055505050505050505050505033600660006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050505050505050505062000239565b6001600160a01b03811681146200012c57600080fd5b50565b6000806000806000806000806000806101408b8d0312156200015057600080fd5b8a51995060208b0151985060408b0151975060608b0151965060808b0151620001798162000116565b60a08c01519096506200018c8162000116565b8095505060c08b0151935060e08b015192506101008b015191506101208b0151620001b78162000116565b809150509295989b9194979a5092959850565b634e487b7160e01b600052601160045260246000fd5b600082620001fe57634e487b7160e01b600052601260045260246000fd5b500490565b80820281158282048414176200021d576200021d620001ca565b92915050565b818103818111156200021d576200021d620001ca565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c051612812620003e6600039600081816105b001526121cb0152600081816105e40152818161099801528181611b1301528181611c9e0152611f5d01526000818161066c015261215f015260008181610618015281816109bc01528181610d4d01528181611a0101528181611b3701528181611cc20152611f8101526000818161054601528181610b330152610e660152600081816104d20152818161168d015261187d0152600081816104080152818161159c01526117cf0152600081816106a00152818161078701528181611081015281816118f801528181611e1701528181611eac01526120d6015260008181610387015281816107ad015281816110a7015281816115c20152818161162e015281816117f5015281816118a30152818161191e01528181611e3d01528181611ed201526120fc0152600081816106d401528181610c200152610f5301526000818161025001528181610a3701528181610ab101528181610b9501528181610d8201528181610de40152610ec801526128126000f3fe6080604052600436106102045760003560e01c80637ffc2a6e11610118578063b5b7a184116100a0578063d5e6a9df1161006f578063d5e6a9df146106c2578063da2b7bc4146106f6578063df19e6ff14610716578063e813a75514610743578063eedcf2a91461075957600080fd5b8063b5b7a18414610606578063b633b9441461063a578063c2114a161461065a578063d0e30db01461068e57600080fd5b80638d96fdea116100e75780638d96fdea14610534578063930f28af146105685780639588eca214610588578063aa22a1c61461059e578063b044397e146105d257600080fd5b80637ffc2a6e146104aa578063836e344b146104c05780638a619a71146104f45780638ad3a8f71461051457600080fd5b806331ddf7431161019b57806344df8e701161016a57806344df8e70146103f65780634788cb381461042a57806349b4299e1461044a5780634a439cfe1461046a578063541adcca1461048a57600080fd5b806331ddf743146103355780633ce43cfd146103555780633fc8cef31461037557806343b066d5146103a957600080fd5b80632639c060116101d75780632639c060146102b257806327ee6bdd146102df5780632c192519146102f557806331d144571461031557600080fd5b806301139b68146102095780630f0adca51461021e5780631062b39a1461023e578063222ae7861461028f575b600080fd5b61021c610217366004612388565b61076c565b005b34801561022a57600080fd5b5061021c6102393660046123b6565b610996565b34801561024a57600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561029b57600080fd5b506102a4610d46565b604051908152602001610286565b3480156102be57600080fd5b506102a46102cd3660046123ed565b60026020526000908152604090205481565b3480156102eb57600080fd5b506102a460015481565b34801561030157600080fd5b5061021c610310366004612406565b610d77565b34801561032157600080fd5b5061021c610330366004612406565b61104f565b34801561034157600080fd5b5061021c610350366004612489565b61123a565b34801561036157600080fd5b5061021c61037036600461254b565b6114da565b34801561038157600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b3480156103b557600080fd5b506103e66103c43660046123ed565b600881901c600090815260036020526040902054600160ff9092161c81161490565b6040519015158152602001610286565b34801561040257600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561043657600080fd5b5061021c610445366004612388565b611714565b34801561045657600080fd5b5061021c610465366004612388565b61194f565b34801561047657600080fd5b506102a46104853660046123ed565b6119fa565b34801561049657600080fd5b506102a46104a5366004612584565b611a2c565b3480156104b657600080fd5b506102a460055481565b3480156104cc57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561050057600080fd5b5061021c61050f3660046125a7565b611a7e565b34801561052057600080fd5b50600654610272906001600160a01b031681565b34801561054057600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561057457600080fd5b5061021c610583366004612388565b611b11565b34801561059457600080fd5b506102a460005481565b3480156105aa57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b3480156105de57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561061257600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561064657600080fd5b5061021c610655366004612388565b611c9c565b34801561066657600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561069a57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b3480156106ce57600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b34801561070257600080fd5b5061021c610711366004612388565b611f5b565b34801561072257600080fd5b50610736610731366004612584565b612141565b60405161028691906125da565b34801561074f57600080fd5b506102a460045481565b61021c610767366004612406565b612208565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156107fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082291906125f4565b6108475760405162461bcd60e51b815260040161083e90612616565b60405180910390fd5b61085081611a2c565b6000838152600260205260409020541461087c5760405162461bcd60e51b815260040161083e90612645565b60c08101516001600160a01b0316156108d75760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161083e565b60008160a0015160028111156108ef576108ef6125c4565b1461093c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e000000000000000000604482015260640161083e565b3360c082015261094b81611a2c565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816109e9576109e961266d565b04031115610a2c5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161083e565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610aaf5760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b606482015260840161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b319190612683565b7f000000000000000000000000000000000000000000000000000000000000000014610b935760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c15919061269c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610c885760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161083e565b60015483118015610c9857508115155b15610cdb57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610ce481611a2c565b60008481526002602052604090205403610d41578051829003610d0d57600160a0820152610d28565b60c08101516001600160a01b031615610d2857600260a08201525b610d3181611a2c565b6000848152600260205260409020555b505050565b6000610d727f0000000000000000000000000000000000000000000000000000000000000000426126b9565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610de25760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b604482015260640161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e649190612683565b7f000000000000000000000000000000000000000000000000000000000000000014610ec65760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f48919061269c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610fbb5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161083e565b80600554106110035760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161083e565b816004541461104b57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15b5050565b6006546001600160a01b0316331461106657600080fd5b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156110f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111c91906125f4565b6111385760405162461bcd60e51b815260040161083e90612616565b806111555760405162461bcd60e51b815260040161083e90612645565b600082815260026020526040902054156111a75760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161083e565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526111ed90611a2c565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a35050565b6040851061127c5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161083e565b60008484848460405160200161129594939291906126db565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156113155760008888838181106112d7576112d761271d565b905060200201359050828111156112fc5782600052806020526040600020925061130c565b8060005282602052604060002092505b506001016112bb565b5080600054146113585760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161083e565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156113cd5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161083e565b6000838152600360205260408082206001851b84179055516001600160a01b038916906113fd9089908990612733565b6000604051808303816000865af19150503d806000811461143a576040519150601f19603f3d011682016040523d82523d6000602084013e61143f565b606091505b50509050806114905760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161083e565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6114ec6104a536839003830183612584565b600083815260026020526040902054146115185760405162461bcd60e51b815260040161083e90612645565b600261152a60c0830160a08401612743565b600281111561153b5761153b6125c4565b1461157c5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b604482015260640161083e565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561160e57600080fd5b505af1158015611622573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061166760e0840160c085016125a7565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af11580156116d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f891906125f4565b61104b5760405162461bcd60e51b815260040161083e90612616565b61171d81611a2c565b600083815260026020526040902054146117495760405162461bcd60e51b815260040161083e90612645565b60018160a001516002811115611761576117616125c4565b1461179e5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b604482015260640161083e565b60008281526002602052604081205560c08101516001600160a01b0316156118d457604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561184157600080fd5b505af1158015611855573d6000803e3d6000fd5b50505050602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116b5565b602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116b5565b6006546001600160a01b0316331461196657600080fd5b61196f81611a2c565b6000838152600260205260409020541461199b5760405162461bcd60e51b815260040161083e90612645565b63ffffffff4281166060830152431660808201526119b881611a2c565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101611042565b6000611a267f0000000000000000000000000000000000000000000000000000000000000000836126b9565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611a6198909796910161275e565b604051602081830303815290604052805190602001209050919050565b6006546001600160a01b03163314611a9557600080fd5b6006546001600160a01b03163314611aef5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f720000000000000000604482015260640161083e565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b6457611b6461266d565b04031115611ba75760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161083e565b611bb081611a2c565b60008381526002602052604090205414611bdc5760405162461bcd60e51b815260040161083e90612645565b60c08101516001600160a01b031615611c2e5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161083e565b600154821115611c7657600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611c8681611a2c565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cef57611cef61266d565b040311611d305760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161083e565b611d3981611a2c565b60008381526002602052604090205414611d655760405162461bcd60e51b815260040161083e90612645565b60008160a001516002811115611d7d57611d7d6125c4565b14611dbc5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161083e565b60c08101516001600160a01b03161561104b5760208101516001600160a01b0316611e6e576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116b5565b60c0810180516000909152611e8282611a2c565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015611f1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f3f91906125f4565b610d415760405162461bcd60e51b815260040161083e90612616565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611fae57611fae61266d565b040311611fef5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161083e565b611ff881611a2c565b600083815260026020526040902054146120245760405162461bcd60e51b815260040161083e90612645565b60008160a00151600281111561203c5761203c6125c4565b1461207b5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161083e565b60208101516001600160a01b03161561104b5760c08101516001600160a01b031661212d57600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116b5565b6020810180516000909152611e8282611a2c565b6000816060015163ffffffff1660000361215d57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561219957506003919050565b60006005836060015163ffffffff164203816121b7576121b761266d565b608085015163ffffffff16919004019050437f0000000000000000000000000000000000000000000000000000000000000000818303116121fb5760019250612200565b600092505b50505b919050565b612212828261104f565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152612259838261194f565b63ffffffff4281166060830152431660808201526122778382611b11565b600160a0820152610d418382611714565b6001600160a01b038116811461229d57600080fd5b50565b803561220381612288565b803563ffffffff8116811461220357600080fd5b80356003811061220357600080fd5b600060e082840312156122e057600080fd5b60405160e0810181811067ffffffffffffffff8211171561231157634e487b7160e01b600052604160045260246000fd5b60405282358152905080612327602084016122a0565b6020820152612338604084016122ab565b6040820152612349606084016122ab565b606082015261235a608084016122ab565b608082015261236b60a084016122bf565b60a082015261237c60c084016122a0565b60c08201525092915050565b600080610100838503121561239c57600080fd5b823591506123ad84602085016122ce565b90509250929050565b600080600061012084860312156123cc57600080fd5b83359250602084013591506123e485604086016122ce565b90509250925092565b6000602082840312156123ff57600080fd5b5035919050565b6000806040838503121561241957600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461220357600080fd5b60008083601f84011261245257600080fd5b50813567ffffffffffffffff81111561246a57600080fd5b60208301915083602082850101111561248257600080fd5b9250929050565b600080600080600080608087890312156124a257600080fd5b863567ffffffffffffffff808211156124ba57600080fd5b818901915089601f8301126124ce57600080fd5b8135818111156124dd57600080fd5b8a60208260051b85010111156124f257600080fd5b6020830198508097505061250860208a01612428565b955061251660408a016122a0565b9450606089013591508082111561252c57600080fd5b5061253989828a01612440565b979a9699509497509295939492505050565b60008082840361010081121561256057600080fd5b8335925060e0601f198201121561257657600080fd5b506020830190509250929050565b600060e0828403121561259657600080fd5b6125a083836122ce565b9392505050565b6000602082840312156125b957600080fd5b81356125a081612288565b634e487b7160e01b600052602160045260246000fd5b60208101600483106125ee576125ee6125c4565b91905290565b60006020828403121561260657600080fd5b815180151581146125a057600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561269557600080fd5b5051919050565b6000602082840312156126ae57600080fd5b81516125a081612288565b6000826126d657634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561275557600080fd5b6125a0826122bf565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106127b6576127b66125c4565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212205c1c17d4aaa68df59bee711a4c79352292853d491afe014364ffe5d6b86fb99a64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106102045760003560e01c80637ffc2a6e11610118578063b5b7a184116100a0578063d5e6a9df1161006f578063d5e6a9df146106c2578063da2b7bc4146106f6578063df19e6ff14610716578063e813a75514610743578063eedcf2a91461075957600080fd5b8063b5b7a18414610606578063b633b9441461063a578063c2114a161461065a578063d0e30db01461068e57600080fd5b80638d96fdea116100e75780638d96fdea14610534578063930f28af146105685780639588eca214610588578063aa22a1c61461059e578063b044397e146105d257600080fd5b80637ffc2a6e146104aa578063836e344b146104c05780638a619a71146104f45780638ad3a8f71461051457600080fd5b806331ddf7431161019b57806344df8e701161016a57806344df8e70146103f65780634788cb381461042a57806349b4299e1461044a5780634a439cfe1461046a578063541adcca1461048a57600080fd5b806331ddf743146103355780633ce43cfd146103555780633fc8cef31461037557806343b066d5146103a957600080fd5b80632639c060116101d75780632639c060146102b257806327ee6bdd146102df5780632c192519146102f557806331d144571461031557600080fd5b806301139b68146102095780630f0adca51461021e5780631062b39a1461023e578063222ae7861461028f575b600080fd5b61021c610217366004612388565b61076c565b005b34801561022a57600080fd5b5061021c6102393660046123b6565b610996565b34801561024a57600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561029b57600080fd5b506102a4610d46565b604051908152602001610286565b3480156102be57600080fd5b506102a46102cd3660046123ed565b60026020526000908152604090205481565b3480156102eb57600080fd5b506102a460015481565b34801561030157600080fd5b5061021c610310366004612406565b610d77565b34801561032157600080fd5b5061021c610330366004612406565b61104f565b34801561034157600080fd5b5061021c610350366004612489565b61123a565b34801561036157600080fd5b5061021c61037036600461254b565b6114da565b34801561038157600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b3480156103b557600080fd5b506103e66103c43660046123ed565b600881901c600090815260036020526040902054600160ff9092161c81161490565b6040519015158152602001610286565b34801561040257600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561043657600080fd5b5061021c610445366004612388565b611714565b34801561045657600080fd5b5061021c610465366004612388565b61194f565b34801561047657600080fd5b506102a46104853660046123ed565b6119fa565b34801561049657600080fd5b506102a46104a5366004612584565b611a2c565b3480156104b657600080fd5b506102a460055481565b3480156104cc57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561050057600080fd5b5061021c61050f3660046125a7565b611a7e565b34801561052057600080fd5b50600654610272906001600160a01b031681565b34801561054057600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561057457600080fd5b5061021c610583366004612388565b611b11565b34801561059457600080fd5b506102a460005481565b3480156105aa57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b3480156105de57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561061257600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561064657600080fd5b5061021c610655366004612388565b611c9c565b34801561066657600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561069a57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b3480156106ce57600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b34801561070257600080fd5b5061021c610711366004612388565b611f5b565b34801561072257600080fd5b50610736610731366004612584565b612141565b60405161028691906125da565b34801561074f57600080fd5b506102a460045481565b61021c610767366004612406565b612208565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156107fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082291906125f4565b6108475760405162461bcd60e51b815260040161083e90612616565b60405180910390fd5b61085081611a2c565b6000838152600260205260409020541461087c5760405162461bcd60e51b815260040161083e90612645565b60c08101516001600160a01b0316156108d75760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161083e565b60008160a0015160028111156108ef576108ef6125c4565b1461093c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e000000000000000000604482015260640161083e565b3360c082015261094b81611a2c565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816109e9576109e961266d565b04031115610a2c5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161083e565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610aaf5760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b606482015260840161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b319190612683565b7f000000000000000000000000000000000000000000000000000000000000000014610b935760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c15919061269c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610c885760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161083e565b60015483118015610c9857508115155b15610cdb57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610ce481611a2c565b60008481526002602052604090205403610d41578051829003610d0d57600160a0820152610d28565b60c08101516001600160a01b031615610d2857600260a08201525b610d3181611a2c565b6000848152600260205260409020555b505050565b6000610d727f0000000000000000000000000000000000000000000000000000000000000000426126b9565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610de25760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b604482015260640161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e649190612683565b7f000000000000000000000000000000000000000000000000000000000000000014610ec65760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f48919061269c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610fbb5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161083e565b80600554106110035760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161083e565b816004541461104b57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15b5050565b6006546001600160a01b0316331461106657600080fd5b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156110f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111c91906125f4565b6111385760405162461bcd60e51b815260040161083e90612616565b806111555760405162461bcd60e51b815260040161083e90612645565b600082815260026020526040902054156111a75760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161083e565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526111ed90611a2c565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a35050565b6040851061127c5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161083e565b60008484848460405160200161129594939291906126db565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156113155760008888838181106112d7576112d761271d565b905060200201359050828111156112fc5782600052806020526040600020925061130c565b8060005282602052604060002092505b506001016112bb565b5080600054146113585760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161083e565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156113cd5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161083e565b6000838152600360205260408082206001851b84179055516001600160a01b038916906113fd9089908990612733565b6000604051808303816000865af19150503d806000811461143a576040519150601f19603f3d011682016040523d82523d6000602084013e61143f565b606091505b50509050806114905760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161083e565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6114ec6104a536839003830183612584565b600083815260026020526040902054146115185760405162461bcd60e51b815260040161083e90612645565b600261152a60c0830160a08401612743565b600281111561153b5761153b6125c4565b1461157c5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b604482015260640161083e565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561160e57600080fd5b505af1158015611622573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061166760e0840160c085016125a7565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af11580156116d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f891906125f4565b61104b5760405162461bcd60e51b815260040161083e90612616565b61171d81611a2c565b600083815260026020526040902054146117495760405162461bcd60e51b815260040161083e90612645565b60018160a001516002811115611761576117616125c4565b1461179e5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b604482015260640161083e565b60008281526002602052604081205560c08101516001600160a01b0316156118d457604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561184157600080fd5b505af1158015611855573d6000803e3d6000fd5b50505050602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116b5565b602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116b5565b6006546001600160a01b0316331461196657600080fd5b61196f81611a2c565b6000838152600260205260409020541461199b5760405162461bcd60e51b815260040161083e90612645565b63ffffffff4281166060830152431660808201526119b881611a2c565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101611042565b6000611a267f0000000000000000000000000000000000000000000000000000000000000000836126b9565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611a6198909796910161275e565b604051602081830303815290604052805190602001209050919050565b6006546001600160a01b03163314611a9557600080fd5b6006546001600160a01b03163314611aef5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f720000000000000000604482015260640161083e565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b6457611b6461266d565b04031115611ba75760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161083e565b611bb081611a2c565b60008381526002602052604090205414611bdc5760405162461bcd60e51b815260040161083e90612645565b60c08101516001600160a01b031615611c2e5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161083e565b600154821115611c7657600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611c8681611a2c565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cef57611cef61266d565b040311611d305760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161083e565b611d3981611a2c565b60008381526002602052604090205414611d655760405162461bcd60e51b815260040161083e90612645565b60008160a001516002811115611d7d57611d7d6125c4565b14611dbc5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161083e565b60c08101516001600160a01b03161561104b5760208101516001600160a01b0316611e6e576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116b5565b60c0810180516000909152611e8282611a2c565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015611f1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f3f91906125f4565b610d415760405162461bcd60e51b815260040161083e90612616565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611fae57611fae61266d565b040311611fef5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161083e565b611ff881611a2c565b600083815260026020526040902054146120245760405162461bcd60e51b815260040161083e90612645565b60008160a00151600281111561203c5761203c6125c4565b1461207b5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161083e565b60208101516001600160a01b03161561104b5760c08101516001600160a01b031661212d57600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116b5565b6020810180516000909152611e8282611a2c565b6000816060015163ffffffff1660000361215d57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561219957506003919050565b60006005836060015163ffffffff164203816121b7576121b761266d565b608085015163ffffffff16919004019050437f0000000000000000000000000000000000000000000000000000000000000000818303116121fb5760019250612200565b600092505b50505b919050565b612212828261104f565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152612259838261194f565b63ffffffff4281166060830152431660808201526122778382611b11565b600160a0820152610d418382611714565b6001600160a01b038116811461229d57600080fd5b50565b803561220381612288565b803563ffffffff8116811461220357600080fd5b80356003811061220357600080fd5b600060e082840312156122e057600080fd5b60405160e0810181811067ffffffffffffffff8211171561231157634e487b7160e01b600052604160045260246000fd5b60405282358152905080612327602084016122a0565b6020820152612338604084016122ab565b6040820152612349606084016122ab565b606082015261235a608084016122ab565b608082015261236b60a084016122bf565b60a082015261237c60c084016122a0565b60c08201525092915050565b600080610100838503121561239c57600080fd5b823591506123ad84602085016122ce565b90509250929050565b600080600061012084860312156123cc57600080fd5b83359250602084013591506123e485604086016122ce565b90509250925092565b6000602082840312156123ff57600080fd5b5035919050565b6000806040838503121561241957600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461220357600080fd5b60008083601f84011261245257600080fd5b50813567ffffffffffffffff81111561246a57600080fd5b60208301915083602082850101111561248257600080fd5b9250929050565b600080600080600080608087890312156124a257600080fd5b863567ffffffffffffffff808211156124ba57600080fd5b818901915089601f8301126124ce57600080fd5b8135818111156124dd57600080fd5b8a60208260051b85010111156124f257600080fd5b6020830198508097505061250860208a01612428565b955061251660408a016122a0565b9450606089013591508082111561252c57600080fd5b5061253989828a01612440565b979a9699509497509295939492505050565b60008082840361010081121561256057600080fd5b8335925060e0601f198201121561257657600080fd5b506020830190509250929050565b600060e0828403121561259657600080fd5b6125a083836122ce565b9392505050565b6000602082840312156125b957600080fd5b81356125a081612288565b634e487b7160e01b600052602160045260246000fd5b60208101600483106125ee576125ee6125c4565b91905290565b60006020828403121561260657600080fd5b815180151581146125a057600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561269557600080fd5b5051919050565b6000602082840312156126ae57600080fd5b81516125a081612288565b6000826126d657634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561275557600080fd5b6125a0826122bf565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106127b6576127b66125c4565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212205c1c17d4aaa68df59bee711a4c79352292853d491afe014364ffe5d6b86fb99a64736f6c63430008120033", "devdoc": { "details": "Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).", "events": { @@ -1195,6 +1234,15 @@ "hashedClaim": "The hash of the claim." } }, + "isMsgRelayed(uint256)": { + "details": "Get the msg relayed status.", + "params": { + "_msgId": "The msgId to check." + }, + "returns": { + "isRelayed": "True if the msg was relayed." + } + }, "resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Resolves any challenge of the optimistic claim for '_epoch'.", "params": { @@ -1276,7 +1324,7 @@ "storageLayout": { "storage": [ { - "astId": 1438, + "astId": 2314, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "stateRoot", "offset": 0, @@ -1284,7 +1332,7 @@ "type": "t_bytes32" }, { - "astId": 1440, + "astId": 2316, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "latestVerifiedEpoch", "offset": 0, @@ -1292,7 +1340,7 @@ "type": "t_uint256" }, { - "astId": 1444, + "astId": 2320, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "claimHashes", "offset": 0, @@ -1300,7 +1348,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 1448, + "astId": 2324, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "relayed", "offset": 0, @@ -1308,7 +1356,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 1450, + "astId": 2326, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "sequencerDelayLimit", "offset": 0, @@ -1316,7 +1364,7 @@ "type": "t_uint256" }, { - "astId": 1452, + "astId": 2328, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "timestampDelayUpdated", "offset": 0, @@ -1324,7 +1372,7 @@ "type": "t_uint256" }, { - "astId": 3362, + "astId": 4242, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "devnetOperator", "offset": 0, diff --git a/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json b/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json index 478b9914..2e40f62d 100644 --- a/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json +++ b/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x9cF5c011e2A4CB7797413f311A35AcB021071c35", + "address": "0xE8ea62d3a4F06301016b9C23Ace108F3D8027839", "abi": [ { "inputs": [ @@ -86,7 +86,7 @@ "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "_epoch", "type": "uint256" @@ -166,6 +166,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "burn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -327,6 +340,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "depositPlusReward", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -429,21 +455,27 @@ "type": "function" }, { - "inputs": [], - "name": "latestVerifiedEpoch", - "outputs": [ + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "_msgId", "type": "uint256" } ], + "name": "isMsgRelayed", + "outputs": [ + { + "internalType": "bool", + "name": "isRelayed", + "type": "bool" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "maxMissingBlocks", + "name": "latestVerifiedEpoch", "outputs": [ { "internalType": "uint256", @@ -456,7 +488,7 @@ }, { "inputs": [], - "name": "minChallengePeriod", + "name": "maxMissingBlocks", "outputs": [ { "internalType": "uint256", @@ -468,21 +500,15 @@ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "minChallengePeriod", + "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], - "name": "relayed", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], "stateMutability": "view", "type": "function" }, @@ -559,6 +585,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "routerChainId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -1001,19 +1040,19 @@ "type": "function" } ], - "transactionHash": "0x63ff133667d56fb584e0a722bc3874702a2e75cc14fdca2bfef4a8058f7e3241", + "transactionHash": "0xf91c6b9bcd26cc0d87be197612c0d9dedffab791bd8e12d2976a70ae23fe4d02", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x9cF5c011e2A4CB7797413f311A35AcB021071c35", + "contractAddress": "0xE8ea62d3a4F06301016b9C23Ace108F3D8027839", "transactionIndex": 0, - "gasUsed": "2306024", + "gasUsed": "2352599", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xe7bf551e42e516eb1d9c99a53628bf266be748d1fba2f720c272016fd175615a", - "transactionHash": "0x63ff133667d56fb584e0a722bc3874702a2e75cc14fdca2bfef4a8058f7e3241", + "blockHash": "0xb074e1e290b276712d0f39edc34fcbdd28c15ca9af183070a6ab1c7b24b6e237", + "transactionHash": "0xf91c6b9bcd26cc0d87be197612c0d9dedffab791bd8e12d2976a70ae23fe4d02", "logs": [], - "blockNumber": 4697829, - "cumulativeGasUsed": "2306024", + "blockNumber": 4730167, + "cumulativeGasUsed": "2352599", "status": 1, "byzantium": true }, @@ -1023,17 +1062,17 @@ 10800, 1000000, "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0x7Ee8Ad48EfA4765257a49486421A4CF11389E480", + "0x1224E83DF410b43A65ed3e375a6442813B1aea14", 86400, 1000000, 5, "0x8d74e5e4DA11629537C4575cB0f33b4F0Dfa42EB" ], - "numDeployments": 3, - "solcInputHash": "6b0b750c6eee9aa0a5e450d1f0bbb2d2", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IWETH\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_weth\":\"The address of the WETH contract on Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by receiving a message from the AMB.\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":\"VeaOutboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/tokens/gnosis/IWETH.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n IWETH public immutable weth; // The address of the WETH contract on Gnosis.\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 internal immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 _epoch, bytes32 _stateRoot);\\n\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n weth = _weth;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerDelayLimit by receiving a message from the AMB.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n // If _newSequencerDelayLimit > timeout * epochPeriod, then the bridge will shutdown.\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external virtual {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch has not yet passed.\\\");\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.challenger, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x621689dc95671db595076306497c677a91238979e114854dc3292ec984286a29\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/tokens/gnosis/IWETH.sol\":{\"content\":\"// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5daaf60d11ee2075260d0f3adfb22b1c536db983/contracts/token/ERC20/BurnableToken.sol\\n// implementation: https://gnosisscan.io/address/0xf8d1677c8a0c961938bf2f9adc3f3cfda759a9d9#code\\n// proxy: https://gnosisscan.io/token/0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1#readProxyContract\\n\\n/**\\n * @title Burnable Token\\n * @dev Token that can be irreversibly burned (destroyed).\\n */\\ninterface IWETH {\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n event Burn(address indexed burner, uint256 value);\\n\\n /**\\n * @dev Burns a specific amount of tokens.\\n * @param _value The amount of token to be burned.\\n */\\n function burn(uint256 _value) external;\\n\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Transfer tokens from one address to another\\n * @param _from address The address which you want to send tokens from\\n * @param _to address The address which you want to transfer to\\n * @param _value uint256 the amount of tokens to be transferred\\n */\\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd7cb8c8585a387464c451c2ff81ad3f9f02e291fe0dad802ff84646ff18d1eb2\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101e06040523480156200001257600080fd5b5060405162002b9438038062002b948339810160408190526200003591620000f2565b60e08a90526101608990526101a08790526101808890526001600160a01b0380871660805285811660a05260048590556101c0849052610140839052811660c0526200008360028b620001a3565b610100819052620000968b6002620001c6565b620000a29190620001e6565b6101205261016051600190620000b99042620001a3565b620000c59190620001e6565b60015550620001fc98505050505050505050565b6001600160a01b0381168114620000ef57600080fd5b50565b6000806000806000806000806000806101408b8d0312156200011357600080fd5b8a51995060208b0151985060408b0151975060608b0151965060808b01516200013c81620000d9565b60a08c01519096506200014f81620000d9565b8095505060c08b0151935060e08b015192506101008b015191506101208b01516200017a81620000d9565b809150509295989b9194979a5092959850565b634e487b7160e01b600052601160045260246000fd5b600082620001c157634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001e057620001e06200018d565b92915050565b81810381811115620001e057620001e06200018d565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516127f96200039b6000396000818161047201526121f60152600081816104a60152818161084801528181611ad501528181611cc90152611f8801526000818161052e015261218a0152600081816104da0152818161086c01528181610bfd01528181610fd70152818161189d01528181611a5601528181611af901528181611ced0152611fac0152600081816109e30152610d16015260006115a70152600081816114b6015261170a0152600081816105620152818161063601528181610f190152818161183a01528181611e4201528181611ed701526121010152600081816103450152818161065c01528181610f3f015281816114dc01528181611548015281816117300152818161179c015281816117df01528181611e6801528181611efd015261212701526000818161059601528181610ad00152610e0301526000818161020e015281816108e70152818161096101528181610a4501528181610c3201528181610c940152610d7801526127f96000f3fe6080604052600436106101c25760003560e01c8063541adcca116100f7578063b5b7a18411610095578063d5e6a9df11610064578063d5e6a9df14610584578063da2b7bc4146105b8578063df19e6ff146105d8578063e813a7551461060557600080fd5b8063b5b7a184146104c8578063b633b944146104fc578063c2114a161461051c578063d0e30db01461055057600080fd5b8063930f28af116100d1578063930f28af1461042a5780639588eca21461044a578063aa22a1c614610460578063b044397e1461049457600080fd5b8063541adcca146103c75780637ffc2a6e146103e757806390df63b7146103fd57600080fd5b806331d14457116101645780633fc8cef31161013e5780633fc8cef3146103335780634788cb381461036757806349b4299e146103875780634a439cfe146103a757600080fd5b806331d14457146102d357806331ddf743146102f35780633ce43cfd1461031357600080fd5b8063222ae786116101a0578063222ae7861461024d5780632639c0601461027057806327ee6bdd1461029d5780632c192519146102b357600080fd5b806301139b68146101c75780630f0adca5146101dc5780631062b39a146101fc575b600080fd5b6101da6101d5366004612333565b61061b565b005b3480156101e857600080fd5b506101da6101f7366004612361565b610846565b34801561020857600080fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561025957600080fd5b50610262610bf6565b604051908152602001610244565b34801561027c57600080fd5b5061026261028b366004612398565b60026020526000908152604090205481565b3480156102a957600080fd5b5061026260015481565b3480156102bf57600080fd5b506101da6102ce3660046123b1565b610c27565b3480156102df57600080fd5b506101da6102ee3660046123b1565b610efe565b3480156102ff57600080fd5b506101da61030e366004612434565b611154565b34801561031f57600080fd5b506101da61032e3660046124f6565b6113f4565b34801561033f57600080fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b34801561037357600080fd5b506101da6103823660046124f6565b61162e565b34801561039357600080fd5b506101da6103a2366004612333565b611866565b3480156103b357600080fd5b506102626103c2366004612398565b611a4f565b3480156103d357600080fd5b506102626103e236600461252f565b611a81565b3480156103f357600080fd5b5061026260055481565b34801561040957600080fd5b50610262610418366004612398565b60036020526000908152604090205481565b34801561043657600080fd5b506101da610445366004612333565b611ad3565b34801561045657600080fd5b5061026260005481565b34801561046c57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a057600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d457600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561050857600080fd5b506101da610517366004612333565b611cc7565b34801561052857600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561055c57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561059057600080fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c457600080fd5b506101da6105d3366004612333565b611f86565b3480156105e457600080fd5b506105f86105f336600461252f565b61216c565b6040516102449190612568565b34801561061157600080fd5b5061026260045481565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156106ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d19190612582565b6106f65760405162461bcd60e51b81526004016106ed906125a4565b60405180910390fd5b6106ff81611a81565b6000838152600260205260409020541461072b5760405162461bcd60e51b81526004016106ed906125d3565b60c08101516001600160a01b0316156107865760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106ed565b60008160a00151600281111561079e5761079e612552565b146107eb5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106ed565b3360c08201526107fa81611a81565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610899576108996125fb565b040311156108dc5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106ed565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461095f5760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016106ed565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e19190612611565b7f000000000000000000000000000000000000000000000000000000000000000014610a435760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016106ed565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac5919061262a565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b385760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016106ed565b60015483118015610b4857508115155b15610b8b57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b9481611a81565b60008481526002602052604090205403610bf1578051829003610bbd57600160a0820152610bd8565b60c08101516001600160a01b031615610bd857600260a08201525b610be181611a81565b6000848152600260205260409020555b505050565b6000610c227f00000000000000000000000000000000000000000000000000000000000000004261265d565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c925760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b60448201526064016106ed565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cf0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d149190612611565b7f000000000000000000000000000000000000000000000000000000000000000014610d765760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016106ed565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df8919061262a565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610e6b5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016106ed565b8060055410610eb35760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106ed565b8160045414610efa57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b5050565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610f90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb49190612582565b610fd05760405162461bcd60e51b81526004016106ed906125a4565b6001610ffc7f00000000000000000000000000000000000000000000000000000000000000004261265d565b611006919061267f565b82146110545760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e0000000000000060448201526064016106ed565b806110715760405162461bcd60e51b81526004016106ed906125d3565b600082815260026020526040902054156110c35760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106ed565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261110990611a81565b60008381526002602090815260409182902092909255805184815291820183905233917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910161083a565b604085106111965760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106ed565b6000848484846040516020016111af9493929190612692565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561122f5760008888838181106111f1576111f16126d4565b9050602002013590508281111561121657826000528060205260406000209250611226565b8060005282602052604060002092505b506001016111d5565b5080600054146112725760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106ed565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112e75760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106ed565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061131790899089906126ea565b6000604051808303816000865af19150503d8060008114611354576040519150601f19603f3d011682016040523d82523d6000602084013e611359565b606091505b50509050806113aa5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106ed565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6114066103e23683900383018361252f565b600083815260026020526040902054146114325760405162461bcd60e51b81526004016106ed906125d3565b600261144460c0830160a084016126fa565b600281111561145557611455612552565b146114965760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106ed565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561152857600080fd5b505af115801561153c573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061158160e0840160c08501612715565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af11580156115ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116129190612582565b610efa5760405162461bcd60e51b81526004016106ed906125a4565b6116406103e23683900383018361252f565b6000838152600260205260409020541461166c5760405162461bcd60e51b81526004016106ed906125d3565b600161167e60c0830160a084016126fa565b600281111561168f5761168f612552565b146116cc5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106ed565b60008281526002602052604081208190556116ed60e0830160c08401612715565b6001600160a01b0316146117d557604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561177c57600080fd5b505af1158015611790573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb90506115816040840160208501612715565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb6118146040840160208501612715565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044016115cf565b61186f81611a81565b6000838152600260205260409020541461189b5760405162461bcd60e51b81526004016106ed906125d3565b7f00000000000000000000000000000000000000000000000000000000000000006004546118c99190612732565b60408201516118de9063ffffffff164261267f565b10156119415760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b60648201526084016106ed565b600061194c8261216c565b9050600281600381111561196257611962612552565b148061197f5750600081600381111561197d5761197d612552565b145b6119e85760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b60648201526084016106ed565b63ffffffff428116606084015243166080830152611a0582611a81565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b6000611a7b7f00000000000000000000000000000000000000000000000000000000000000008361265d565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611ab6989097969101612745565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b2657611b266125fb565b04031115611b695760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106ed565b611b7281611a81565b60008381526002602052604090205414611b9e5760405162461bcd60e51b81526004016106ed906125d3565b60c08101516001600160a01b031615611bf05760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106ed565b6001611bfb8261216c565b6003811115611c0c57611c0c612552565b14611c595760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e000000000060448201526064016106ed565b600154821115611ca157600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611cb181611a81565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d1a57611d1a6125fb565b040311611d5b5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106ed565b611d6481611a81565b60008381526002602052604090205414611d905760405162461bcd60e51b81526004016106ed906125d3565b60008160a001516002811115611da857611da8612552565b14611de75760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106ed565b60c08101516001600160a01b031615610efa5760208101516001600160a01b0316611e99576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115cf565b60c0810180516000909152611ead82611a81565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015611f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6a9190612582565b610bf15760405162461bcd60e51b81526004016106ed906125a4565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611fd957611fd96125fb565b04031161201a5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106ed565b61202381611a81565b6000838152600260205260409020541461204f5760405162461bcd60e51b81526004016106ed906125d3565b60008160a00151600281111561206757612067612552565b146120a65760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106ed565b60208101516001600160a01b031615610efa5760c08101516001600160a01b031661215857600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115cf565b6020810180516000909152611ead82611a81565b6000816060015163ffffffff1660000361218857506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff16420310156121c457506003919050565b60006005836060015163ffffffff164203816121e2576121e26125fb565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612226576001925061222b565b600092505b50505b919050565b6001600160a01b038116811461224857600080fd5b50565b803561222e81612233565b803563ffffffff8116811461222e57600080fd5b80356003811061222e57600080fd5b600060e0828403121561228b57600080fd5b60405160e0810181811067ffffffffffffffff821117156122bc57634e487b7160e01b600052604160045260246000fd5b604052823581529050806122d26020840161224b565b60208201526122e360408401612256565b60408201526122f460608401612256565b606082015261230560808401612256565b608082015261231660a0840161226a565b60a082015261232760c0840161224b565b60c08201525092915050565b600080610100838503121561234757600080fd5b823591506123588460208501612279565b90509250929050565b6000806000610120848603121561237757600080fd5b833592506020840135915061238f8560408601612279565b90509250925092565b6000602082840312156123aa57600080fd5b5035919050565b600080604083850312156123c457600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461222e57600080fd5b60008083601f8401126123fd57600080fd5b50813567ffffffffffffffff81111561241557600080fd5b60208301915083602082850101111561242d57600080fd5b9250929050565b6000806000806000806080878903121561244d57600080fd5b863567ffffffffffffffff8082111561246557600080fd5b818901915089601f83011261247957600080fd5b81358181111561248857600080fd5b8a60208260051b850101111561249d57600080fd5b602083019850809750506124b360208a016123d3565b95506124c160408a0161224b565b945060608901359150808211156124d757600080fd5b506124e489828a016123eb565b979a9699509497509295939492505050565b60008082840361010081121561250b57600080fd5b8335925060e0601f198201121561252157600080fd5b506020830190509250929050565b600060e0828403121561254157600080fd5b61254b8383612279565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061257c5761257c612552565b91905290565b60006020828403121561259457600080fd5b8151801515811461254b57600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561262357600080fd5b5051919050565b60006020828403121561263c57600080fd5b815161254b81612233565b634e487b7160e01b600052601160045260246000fd5b60008261267a57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115611a7b57611a7b612647565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561270c57600080fd5b61254b8261226a565b60006020828403121561272757600080fd5b813561254b81612233565b80820180821115611a7b57611a7b612647565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061279d5761279d612552565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212202838608f469e27ff16acc37107c1d8f295dd023bfd5b117a8b3b8510ff738c0064736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101c25760003560e01c8063541adcca116100f7578063b5b7a18411610095578063d5e6a9df11610064578063d5e6a9df14610584578063da2b7bc4146105b8578063df19e6ff146105d8578063e813a7551461060557600080fd5b8063b5b7a184146104c8578063b633b944146104fc578063c2114a161461051c578063d0e30db01461055057600080fd5b8063930f28af116100d1578063930f28af1461042a5780639588eca21461044a578063aa22a1c614610460578063b044397e1461049457600080fd5b8063541adcca146103c75780637ffc2a6e146103e757806390df63b7146103fd57600080fd5b806331d14457116101645780633fc8cef31161013e5780633fc8cef3146103335780634788cb381461036757806349b4299e146103875780634a439cfe146103a757600080fd5b806331d14457146102d357806331ddf743146102f35780633ce43cfd1461031357600080fd5b8063222ae786116101a0578063222ae7861461024d5780632639c0601461027057806327ee6bdd1461029d5780632c192519146102b357600080fd5b806301139b68146101c75780630f0adca5146101dc5780631062b39a146101fc575b600080fd5b6101da6101d5366004612333565b61061b565b005b3480156101e857600080fd5b506101da6101f7366004612361565b610846565b34801561020857600080fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561025957600080fd5b50610262610bf6565b604051908152602001610244565b34801561027c57600080fd5b5061026261028b366004612398565b60026020526000908152604090205481565b3480156102a957600080fd5b5061026260015481565b3480156102bf57600080fd5b506101da6102ce3660046123b1565b610c27565b3480156102df57600080fd5b506101da6102ee3660046123b1565b610efe565b3480156102ff57600080fd5b506101da61030e366004612434565b611154565b34801561031f57600080fd5b506101da61032e3660046124f6565b6113f4565b34801561033f57600080fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b34801561037357600080fd5b506101da6103823660046124f6565b61162e565b34801561039357600080fd5b506101da6103a2366004612333565b611866565b3480156103b357600080fd5b506102626103c2366004612398565b611a4f565b3480156103d357600080fd5b506102626103e236600461252f565b611a81565b3480156103f357600080fd5b5061026260055481565b34801561040957600080fd5b50610262610418366004612398565b60036020526000908152604090205481565b34801561043657600080fd5b506101da610445366004612333565b611ad3565b34801561045657600080fd5b5061026260005481565b34801561046c57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b3480156104a057600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d457600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561050857600080fd5b506101da610517366004612333565b611cc7565b34801561052857600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561055c57600080fd5b506102627f000000000000000000000000000000000000000000000000000000000000000081565b34801561059057600080fd5b506102307f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c457600080fd5b506101da6105d3366004612333565b611f86565b3480156105e457600080fd5b506105f86105f336600461252f565b61216c565b6040516102449190612568565b34801561061157600080fd5b5061026260045481565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156106ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d19190612582565b6106f65760405162461bcd60e51b81526004016106ed906125a4565b60405180910390fd5b6106ff81611a81565b6000838152600260205260409020541461072b5760405162461bcd60e51b81526004016106ed906125d3565b60c08101516001600160a01b0316156107865760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106ed565b60008160a00151600281111561079e5761079e612552565b146107eb5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106ed565b3360c08201526107fa81611a81565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610899576108996125fb565b040311156108dc5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106ed565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461095f5760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016106ed565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e19190612611565b7f000000000000000000000000000000000000000000000000000000000000000014610a435760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016106ed565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac5919061262a565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b385760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016106ed565b60015483118015610b4857508115155b15610b8b57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610b9481611a81565b60008481526002602052604090205403610bf1578051829003610bbd57600160a0820152610bd8565b60c08101516001600160a01b031615610bd857600260a08201525b610be181611a81565b6000848152600260205260409020555b505050565b6000610c227f00000000000000000000000000000000000000000000000000000000000000004261265d565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c925760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b60448201526064016106ed565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cf0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d149190612611565b7f000000000000000000000000000000000000000000000000000000000000000014610d765760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016106ed565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df8919061262a565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610e6b5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016106ed565b8060055410610eb35760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106ed565b8160045414610efa57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b5050565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610f90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb49190612582565b610fd05760405162461bcd60e51b81526004016106ed906125a4565b6001610ffc7f00000000000000000000000000000000000000000000000000000000000000004261265d565b611006919061267f565b82146110545760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e0000000000000060448201526064016106ed565b806110715760405162461bcd60e51b81526004016106ed906125d3565b600082815260026020526040902054156110c35760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106ed565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261110990611a81565b60008381526002602090815260409182902092909255805184815291820183905233917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910161083a565b604085106111965760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106ed565b6000848484846040516020016111af9493929190612692565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561122f5760008888838181106111f1576111f16126d4565b9050602002013590508281111561121657826000528060205260406000209250611226565b8060005282602052604060002092505b506001016111d5565b5080600054146112725760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106ed565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112e75760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106ed565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061131790899089906126ea565b6000604051808303816000865af19150503d8060008114611354576040519150601f19603f3d011682016040523d82523d6000602084013e611359565b606091505b50509050806113aa5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106ed565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6114066103e23683900383018361252f565b600083815260026020526040902054146114325760405162461bcd60e51b81526004016106ed906125d3565b600261144460c0830160a084016126fa565b600281111561145557611455612552565b146114965760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106ed565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561152857600080fd5b505af115801561153c573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061158160e0840160c08501612715565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af11580156115ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116129190612582565b610efa5760405162461bcd60e51b81526004016106ed906125a4565b6116406103e23683900383018361252f565b6000838152600260205260409020541461166c5760405162461bcd60e51b81526004016106ed906125d3565b600161167e60c0830160a084016126fa565b600281111561168f5761168f612552565b146116cc5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106ed565b60008281526002602052604081208190556116ed60e0830160c08401612715565b6001600160a01b0316146117d557604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561177c57600080fd5b505af1158015611790573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb90506115816040840160208501612715565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb6118146040840160208501612715565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044016115cf565b61186f81611a81565b6000838152600260205260409020541461189b5760405162461bcd60e51b81526004016106ed906125d3565b7f00000000000000000000000000000000000000000000000000000000000000006004546118c99190612732565b60408201516118de9063ffffffff164261267f565b10156119415760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b60648201526084016106ed565b600061194c8261216c565b9050600281600381111561196257611962612552565b148061197f5750600081600381111561197d5761197d612552565b145b6119e85760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b60648201526084016106ed565b63ffffffff428116606084015243166080830152611a0582611a81565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b6000611a7b7f00000000000000000000000000000000000000000000000000000000000000008361265d565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611ab6989097969101612745565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b2657611b266125fb565b04031115611b695760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106ed565b611b7281611a81565b60008381526002602052604090205414611b9e5760405162461bcd60e51b81526004016106ed906125d3565b60c08101516001600160a01b031615611bf05760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106ed565b6001611bfb8261216c565b6003811115611c0c57611c0c612552565b14611c595760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e000000000060448201526064016106ed565b600154821115611ca157600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611cb181611a81565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611d1a57611d1a6125fb565b040311611d5b5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106ed565b611d6481611a81565b60008381526002602052604090205414611d905760405162461bcd60e51b81526004016106ed906125d3565b60008160a001516002811115611da857611da8612552565b14611de75760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106ed565b60c08101516001600160a01b031615610efa5760208101516001600160a01b0316611e99576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115cf565b60c0810180516000909152611ead82611a81565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015611f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6a9190612582565b610bf15760405162461bcd60e51b81526004016106ed906125a4565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611fd957611fd96125fb565b04031161201a5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106ed565b61202381611a81565b6000838152600260205260409020541461204f5760405162461bcd60e51b81526004016106ed906125d3565b60008160a00151600281111561206757612067612552565b146120a65760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106ed565b60208101516001600160a01b031615610efa5760c08101516001600160a01b031661215857600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016115cf565b6020810180516000909152611ead82611a81565b6000816060015163ffffffff1660000361218857506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff16420310156121c457506003919050565b60006005836060015163ffffffff164203816121e2576121e26125fb565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311612226576001925061222b565b600092505b50505b919050565b6001600160a01b038116811461224857600080fd5b50565b803561222e81612233565b803563ffffffff8116811461222e57600080fd5b80356003811061222e57600080fd5b600060e0828403121561228b57600080fd5b60405160e0810181811067ffffffffffffffff821117156122bc57634e487b7160e01b600052604160045260246000fd5b604052823581529050806122d26020840161224b565b60208201526122e360408401612256565b60408201526122f460608401612256565b606082015261230560808401612256565b608082015261231660a0840161226a565b60a082015261232760c0840161224b565b60c08201525092915050565b600080610100838503121561234757600080fd5b823591506123588460208501612279565b90509250929050565b6000806000610120848603121561237757600080fd5b833592506020840135915061238f8560408601612279565b90509250925092565b6000602082840312156123aa57600080fd5b5035919050565b600080604083850312156123c457600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461222e57600080fd5b60008083601f8401126123fd57600080fd5b50813567ffffffffffffffff81111561241557600080fd5b60208301915083602082850101111561242d57600080fd5b9250929050565b6000806000806000806080878903121561244d57600080fd5b863567ffffffffffffffff8082111561246557600080fd5b818901915089601f83011261247957600080fd5b81358181111561248857600080fd5b8a60208260051b850101111561249d57600080fd5b602083019850809750506124b360208a016123d3565b95506124c160408a0161224b565b945060608901359150808211156124d757600080fd5b506124e489828a016123eb565b979a9699509497509295939492505050565b60008082840361010081121561250b57600080fd5b8335925060e0601f198201121561252157600080fd5b506020830190509250929050565b600060e0828403121561254157600080fd5b61254b8383612279565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061257c5761257c612552565b91905290565b60006020828403121561259457600080fd5b8151801515811461254b57600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561262357600080fd5b5051919050565b60006020828403121561263c57600080fd5b815161254b81612233565b634e487b7160e01b600052601160045260246000fd5b60008261267a57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115611a7b57611a7b612647565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561270c57600080fd5b61254b8261226a565b60006020828403121561272757600080fd5b813561254b81612233565b80820180821115611a7b57611a7b612647565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061279d5761279d612552565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212202838608f469e27ff16acc37107c1d8f295dd023bfd5b117a8b3b8510ff738c0064736f6c63430008120033", + "numDeployments": 6, + "solcInputHash": "74af439f219888d42665a3312cefc0fc", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IWETH\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositPlusReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_msgId\",\"type\":\"uint256\"}],\"name\":\"isMsgRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRelayed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_weth\":\"The address of the WETH contract on Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"isMsgRelayed(uint256)\":{\"details\":\"Get the msg relayed status.\",\"params\":{\"_msgId\":\"The msgId to check.\"},\"returns\":{\"isRelayed\":\"True if the msg was relayed.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by receiving a message from the AMB.\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":\"VeaOutboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/tokens/gnosis/IWETH.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n IWETH public immutable weth; // The address of the WETH contract on Gnosis.\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 public immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 public immutable depositPlusReward; // 2 * deposit - burn\\n\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n weth = _weth;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerDelayLimit by receiving a message from the AMB.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n // If _newSequencerDelayLimit > timeout * epochPeriod, then the bridge will shutdown.\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external virtual {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n unchecked {\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch has not yet passed.\\\");\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.challenger, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) {\\n status = CensorshipTestStatus.NotStarted;\\n } else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod) {\\n status = CensorshipTestStatus.InProgress;\\n } else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the msg relayed status.\\n /// @param _msgId The msgId to check.\\n /// @return isRelayed True if the msg was relayed.\\n function isMsgRelayed(uint256 _msgId) external view returns(bool isRelayed) {\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1));\\n }\\n}\\n\",\"keccak256\":\"0xa3ed4eae38d473838a56aea19aacc8302e93c17cab7e82af74315c462d44132a\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/tokens/gnosis/IWETH.sol\":{\"content\":\"// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5daaf60d11ee2075260d0f3adfb22b1c536db983/contracts/token/ERC20/BurnableToken.sol\\n// implementation: https://gnosisscan.io/address/0xf8d1677c8a0c961938bf2f9adc3f3cfda759a9d9#code\\n// proxy: https://gnosisscan.io/token/0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1#readProxyContract\\n\\n/**\\n * @title Burnable Token\\n * @dev Token that can be irreversibly burned (destroyed).\\n */\\ninterface IWETH {\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n event Burn(address indexed burner, uint256 value);\\n\\n /**\\n * @dev Burns a specific amount of tokens.\\n * @param _value The amount of token to be burned.\\n */\\n function burn(uint256 _value) external;\\n\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Transfer tokens from one address to another\\n * @param _from address The address which you want to send tokens from\\n * @param _to address The address which you want to transfer to\\n * @param _value uint256 the amount of tokens to be transferred\\n */\\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd7cb8c8585a387464c451c2ff81ad3f9f02e291fe0dad802ff84646ff18d1eb2\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101e06040523480156200001257600080fd5b5060405162002c8438038062002c848339810160408190526200003591620000f2565b60e08a90526101608990526101a08790526101808890526001600160a01b0380871660805285811660a05260048590556101c0849052610140839052811660c0526200008360028b620001a3565b610100819052620000968b6002620001c6565b620000a29190620001e6565b6101205261016051600190620000b99042620001a3565b620000c59190620001e6565b60015550620001fc98505050505050505050565b6001600160a01b0381168114620000ef57600080fd5b50565b6000806000806000806000806000806101408b8d0312156200011357600080fd5b8a51995060208b0151985060408b0151975060608b0151965060808b01516200013c81620000d9565b60a08c01519096506200014f81620000d9565b8095505060c08b0151935060e08b015192506101008b015191506101208b01516200017a81620000d9565b809150509295989b9194979a5092959850565b634e487b7160e01b600052601160045260246000fd5b600082620001c157634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001e057620001e06200018d565b92915050565b81810381811115620001e057620001e06200018d565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516128d4620003b06000396000818161054f01526122d10152600081816105830152818161092401528181611bb001528181611da4015261206301526000818161060b01526122650152600081816105b70152818161094801528181610cd9015281816110b00152818161197801528181611b3101528181611bd401528181611dc801526120870152600081816104e501528181610abf0152610df20152600081816104b101526116820152600081816103e70152818161159101526117e501526000818161063f0152818161071301528181610ff50152818161191501528181611f1d01528181611fb201526121dc015260008181610366015281816107390152818161101b015281816115b7015281816116230152818161180b01528181611877015281816118ba01528181611f4301528181611fd8015261220201526000818161067301528181610bac0152610edf01526000818161022f015281816109c301528181610a3d01528181610b2101528181610d0e01528181610d700152610e5401526128d46000f3fe6080604052600436106101e35760003560e01c8063541adcca11610102578063b5b7a18411610095578063d5e6a9df11610064578063d5e6a9df14610661578063da2b7bc414610695578063df19e6ff146106b5578063e813a755146106e257600080fd5b8063b5b7a184146105a5578063b633b944146105d9578063c2114a16146105f9578063d0e30db01461062d57600080fd5b8063930f28af116100d1578063930f28af146105075780639588eca214610527578063aa22a1c61461053d578063b044397e1461057157600080fd5b8063541adcca146104695780637ffc2a6e14610489578063836e344b1461049f5780638d96fdea146104d357600080fd5b806331ddf7431161017a57806344df8e701161014957806344df8e70146103d55780634788cb381461040957806349b4299e146104295780634a439cfe1461044957600080fd5b806331ddf743146103145780633ce43cfd146103345780633fc8cef31461035457806343b066d51461038857600080fd5b80632639c060116101b65780632639c0601461029157806327ee6bdd146102be5780632c192519146102d457806331d14457146102f457600080fd5b806301139b68146101e85780630f0adca5146101fd5780631062b39a1461021d578063222ae7861461026e575b600080fd5b6101fb6101f636600461240e565b6106f8565b005b34801561020957600080fd5b506101fb61021836600461243c565b610922565b34801561022957600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561027a57600080fd5b50610283610cd2565b604051908152602001610265565b34801561029d57600080fd5b506102836102ac366004612473565b60026020526000908152604090205481565b3480156102ca57600080fd5b5061028360015481565b3480156102e057600080fd5b506101fb6102ef36600461248c565b610d03565b34801561030057600080fd5b506101fb61030f36600461248c565b610fda565b34801561032057600080fd5b506101fb61032f36600461250f565b61122f565b34801561034057600080fd5b506101fb61034f3660046125d1565b6114cf565b34801561036057600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b34801561039457600080fd5b506103c56103a3366004612473565b600881901c600090815260036020526040902054600160ff9092161c81161490565b6040519015158152602001610265565b3480156103e157600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561041557600080fd5b506101fb6104243660046125d1565b611709565b34801561043557600080fd5b506101fb61044436600461240e565b611941565b34801561045557600080fd5b50610283610464366004612473565b611b2a565b34801561047557600080fd5b5061028361048436600461260a565b611b5c565b34801561049557600080fd5b5061028360055481565b3480156104ab57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156104df57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561051357600080fd5b506101fb61052236600461240e565b611bae565b34801561053357600080fd5b5061028360005481565b34801561054957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561057d57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105b157600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e557600080fd5b506101fb6105f436600461240e565b611da2565b34801561060557600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561063957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561066d57600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b3480156106a157600080fd5b506101fb6106b036600461240e565b612061565b3480156106c157600080fd5b506106d56106d036600461260a565b612247565b6040516102659190612643565b3480156106ee57600080fd5b5061028360045481565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561078a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ae919061265d565b6107d35760405162461bcd60e51b81526004016107ca9061267f565b60405180910390fd5b6107dc81611b5c565b600083815260026020526040902054146108085760405162461bcd60e51b81526004016107ca906126ae565b60c08101516001600160a01b0316156108635760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016107ca565b60008160a00151600281111561087b5761087b61262d565b146108c85760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016107ca565b3360c08201526108d781611b5c565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610975576109756126d6565b040311156109b85760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107ca565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a3b5760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abd91906126ec565b7f000000000000000000000000000000000000000000000000000000000000000014610b1f5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba19190612705565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610c145760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016107ca565b60015483118015610c2457508115155b15610c6757600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610c7081611b5c565b60008481526002602052604090205403610ccd578051829003610c9957600160a0820152610cb4565b60c08101516001600160a01b031615610cb457600260a08201525b610cbd81611b5c565b6000848152600260205260409020555b505050565b6000610cfe7f000000000000000000000000000000000000000000000000000000000000000042612738565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d6e5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b60448201526064016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df091906126ec565b7f000000000000000000000000000000000000000000000000000000000000000014610e525760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610eb0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed49190612705565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610f475760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016107ca565b8060055410610f8f5760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016107ca565b8160045414610fd657600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b5050565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561106c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611090919061265d565b6110ac5760405162461bcd60e51b81526004016107ca9061267f565b60017f000000000000000000000000000000000000000000000000000000000000000042816110dd576110dd6126d6565b0403821461112d5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e0000000000000060448201526064016107ca565b8061114a5760405162461bcd60e51b81526004016107ca906126ae565b6000828152600260205260409020541561119c5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016107ca565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526111e290611b5c565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a35050565b604085106112715760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016107ca565b60008484848460405160200161128a949392919061275a565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561130a5760008888838181106112cc576112cc61279c565b905060200201359050828111156112f157826000528060205260406000209250611301565b8060005282602052604060002092505b506001016112b0565b50806000541461134d5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016107ca565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156113c25760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016107ca565b6000838152600360205260408082206001851b84179055516001600160a01b038916906113f290899089906127b2565b6000604051808303816000865af19150503d806000811461142f576040519150601f19603f3d011682016040523d82523d6000602084013e611434565b606091505b50509050806114855760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016107ca565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6114e16104843683900383018361260a565b6000838152600260205260409020541461150d5760405162461bcd60e51b81526004016107ca906126ae565b600261151f60c0830160a084016127c2565b60028111156115305761153061262d565b146115715760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016107ca565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561160357600080fd5b505af1158015611617573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061165c60e0840160c085016127dd565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af11580156116c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ed919061265d565b610fd65760405162461bcd60e51b81526004016107ca9061267f565b61171b6104843683900383018361260a565b600083815260026020526040902054146117475760405162461bcd60e51b81526004016107ca906126ae565b600161175960c0830160a084016127c2565b600281111561176a5761176a61262d565b146117a75760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016107ca565b60008281526002602052604081208190556117c860e0830160c084016127dd565b6001600160a01b0316146118b057604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561185757600080fd5b505af115801561186b573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061165c60408401602085016127dd565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb6118ef60408401602085016127dd565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044016116aa565b61194a81611b5c565b600083815260026020526040902054146119765760405162461bcd60e51b81526004016107ca906126ae565b7f00000000000000000000000000000000000000000000000000000000000000006004546119a491906127fa565b60408201516119b99063ffffffff164261280d565b1015611a1c5760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b60648201526084016107ca565b6000611a2782612247565b90506002816003811115611a3d57611a3d61262d565b1480611a5a57506000816003811115611a5857611a5861262d565b145b611ac35760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b60648201526084016107ca565b63ffffffff428116606084015243166080830152611ae082611b5c565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b6000611b567f000000000000000000000000000000000000000000000000000000000000000083612738565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611b91989097969101612820565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c0157611c016126d6565b04031115611c445760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107ca565b611c4d81611b5c565b60008381526002602052604090205414611c795760405162461bcd60e51b81526004016107ca906126ae565b60c08101516001600160a01b031615611ccb5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016107ca565b6001611cd682612247565b6003811115611ce757611ce761262d565b14611d345760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e000000000060448201526064016107ca565b600154821115611d7c57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611d8c81611b5c565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611df557611df56126d6565b040311611e365760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107ca565b611e3f81611b5c565b60008381526002602052604090205414611e6b5760405162461bcd60e51b81526004016107ca906126ae565b60008160a001516002811115611e8357611e8361262d565b14611ec25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107ca565b60c08101516001600160a01b031615610fd65760208101516001600160a01b0316611f74576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116aa565b60c0810180516000909152611f8882611b5c565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015612021573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612045919061265d565b610ccd5760405162461bcd60e51b81526004016107ca9061267f565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816120b4576120b46126d6565b0403116120f55760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107ca565b6120fe81611b5c565b6000838152600260205260409020541461212a5760405162461bcd60e51b81526004016107ca906126ae565b60008160a0015160028111156121425761214261262d565b146121815760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107ca565b60208101516001600160a01b031615610fd65760c08101516001600160a01b031661223357600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116aa565b6020810180516000909152611f8882611b5c565b6000816060015163ffffffff1660000361226357506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561229f57506003919050565b60006005836060015163ffffffff164203816122bd576122bd6126d6565b608085015163ffffffff16919004019050437f0000000000000000000000000000000000000000000000000000000000000000818303116123015760019250612306565b600092505b50505b919050565b6001600160a01b038116811461232357600080fd5b50565b80356123098161230e565b803563ffffffff8116811461230957600080fd5b80356003811061230957600080fd5b600060e0828403121561236657600080fd5b60405160e0810181811067ffffffffffffffff8211171561239757634e487b7160e01b600052604160045260246000fd5b604052823581529050806123ad60208401612326565b60208201526123be60408401612331565b60408201526123cf60608401612331565b60608201526123e060808401612331565b60808201526123f160a08401612345565b60a082015261240260c08401612326565b60c08201525092915050565b600080610100838503121561242257600080fd5b823591506124338460208501612354565b90509250929050565b6000806000610120848603121561245257600080fd5b833592506020840135915061246a8560408601612354565b90509250925092565b60006020828403121561248557600080fd5b5035919050565b6000806040838503121561249f57600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461230957600080fd5b60008083601f8401126124d857600080fd5b50813567ffffffffffffffff8111156124f057600080fd5b60208301915083602082850101111561250857600080fd5b9250929050565b6000806000806000806080878903121561252857600080fd5b863567ffffffffffffffff8082111561254057600080fd5b818901915089601f83011261255457600080fd5b81358181111561256357600080fd5b8a60208260051b850101111561257857600080fd5b6020830198508097505061258e60208a016124ae565b955061259c60408a01612326565b945060608901359150808211156125b257600080fd5b506125bf89828a016124c6565b979a9699509497509295939492505050565b6000808284036101008112156125e657600080fd5b8335925060e0601f19820112156125fc57600080fd5b506020830190509250929050565b600060e0828403121561261c57600080fd5b6126268383612354565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106126575761265761262d565b91905290565b60006020828403121561266f57600080fd5b8151801515811461262657600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156126fe57600080fd5b5051919050565b60006020828403121561271757600080fd5b81516126268161230e565b634e487b7160e01b600052601160045260246000fd5b60008261275557634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156127d457600080fd5b61262682612345565b6000602082840312156127ef57600080fd5b81356126268161230e565b80820180821115611b5657611b56612722565b81810381811115611b5657611b56612722565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106128785761287861262d565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122031052008c53960a426b4b775a73365b0a279ac9190f49c5d62d2741344743b2764736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101e35760003560e01c8063541adcca11610102578063b5b7a18411610095578063d5e6a9df11610064578063d5e6a9df14610661578063da2b7bc414610695578063df19e6ff146106b5578063e813a755146106e257600080fd5b8063b5b7a184146105a5578063b633b944146105d9578063c2114a16146105f9578063d0e30db01461062d57600080fd5b8063930f28af116100d1578063930f28af146105075780639588eca214610527578063aa22a1c61461053d578063b044397e1461057157600080fd5b8063541adcca146104695780637ffc2a6e14610489578063836e344b1461049f5780638d96fdea146104d357600080fd5b806331ddf7431161017a57806344df8e701161014957806344df8e70146103d55780634788cb381461040957806349b4299e146104295780634a439cfe1461044957600080fd5b806331ddf743146103145780633ce43cfd146103345780633fc8cef31461035457806343b066d51461038857600080fd5b80632639c060116101b65780632639c0601461029157806327ee6bdd146102be5780632c192519146102d457806331d14457146102f457600080fd5b806301139b68146101e85780630f0adca5146101fd5780631062b39a1461021d578063222ae7861461026e575b600080fd5b6101fb6101f636600461240e565b6106f8565b005b34801561020957600080fd5b506101fb61021836600461243c565b610922565b34801561022957600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561027a57600080fd5b50610283610cd2565b604051908152602001610265565b34801561029d57600080fd5b506102836102ac366004612473565b60026020526000908152604090205481565b3480156102ca57600080fd5b5061028360015481565b3480156102e057600080fd5b506101fb6102ef36600461248c565b610d03565b34801561030057600080fd5b506101fb61030f36600461248c565b610fda565b34801561032057600080fd5b506101fb61032f36600461250f565b61122f565b34801561034057600080fd5b506101fb61034f3660046125d1565b6114cf565b34801561036057600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b34801561039457600080fd5b506103c56103a3366004612473565b600881901c600090815260036020526040902054600160ff9092161c81161490565b6040519015158152602001610265565b3480156103e157600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561041557600080fd5b506101fb6104243660046125d1565b611709565b34801561043557600080fd5b506101fb61044436600461240e565b611941565b34801561045557600080fd5b50610283610464366004612473565b611b2a565b34801561047557600080fd5b5061028361048436600461260a565b611b5c565b34801561049557600080fd5b5061028360055481565b3480156104ab57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156104df57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561051357600080fd5b506101fb61052236600461240e565b611bae565b34801561053357600080fd5b5061028360005481565b34801561054957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561057d57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105b157600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e557600080fd5b506101fb6105f436600461240e565b611da2565b34801561060557600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561063957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561066d57600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b3480156106a157600080fd5b506101fb6106b036600461240e565b612061565b3480156106c157600080fd5b506106d56106d036600461260a565b612247565b6040516102659190612643565b3480156106ee57600080fd5b5061028360045481565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561078a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ae919061265d565b6107d35760405162461bcd60e51b81526004016107ca9061267f565b60405180910390fd5b6107dc81611b5c565b600083815260026020526040902054146108085760405162461bcd60e51b81526004016107ca906126ae565b60c08101516001600160a01b0316156108635760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016107ca565b60008160a00151600281111561087b5761087b61262d565b146108c85760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016107ca565b3360c08201526108d781611b5c565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610975576109756126d6565b040311156109b85760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107ca565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a3b5760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abd91906126ec565b7f000000000000000000000000000000000000000000000000000000000000000014610b1f5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba19190612705565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610c145760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016107ca565b60015483118015610c2457508115155b15610c6757600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610c7081611b5c565b60008481526002602052604090205403610ccd578051829003610c9957600160a0820152610cb4565b60c08101516001600160a01b031615610cb457600260a08201525b610cbd81611b5c565b6000848152600260205260409020555b505050565b6000610cfe7f000000000000000000000000000000000000000000000000000000000000000042612738565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d6e5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b60448201526064016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df091906126ec565b7f000000000000000000000000000000000000000000000000000000000000000014610e525760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610eb0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed49190612705565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610f475760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016107ca565b8060055410610f8f5760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016107ca565b8160045414610fd657600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b5050565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561106c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611090919061265d565b6110ac5760405162461bcd60e51b81526004016107ca9061267f565b60017f000000000000000000000000000000000000000000000000000000000000000042816110dd576110dd6126d6565b0403821461112d5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e0000000000000060448201526064016107ca565b8061114a5760405162461bcd60e51b81526004016107ca906126ae565b6000828152600260205260409020541561119c5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016107ca565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526111e290611b5c565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a35050565b604085106112715760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016107ca565b60008484848460405160200161128a949392919061275a565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561130a5760008888838181106112cc576112cc61279c565b905060200201359050828111156112f157826000528060205260406000209250611301565b8060005282602052604060002092505b506001016112b0565b50806000541461134d5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016107ca565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156113c25760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016107ca565b6000838152600360205260408082206001851b84179055516001600160a01b038916906113f290899089906127b2565b6000604051808303816000865af19150503d806000811461142f576040519150601f19603f3d011682016040523d82523d6000602084013e611434565b606091505b50509050806114855760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016107ca565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6114e16104843683900383018361260a565b6000838152600260205260409020541461150d5760405162461bcd60e51b81526004016107ca906126ae565b600261151f60c0830160a084016127c2565b60028111156115305761153061262d565b146115715760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016107ca565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561160357600080fd5b505af1158015611617573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061165c60e0840160c085016127dd565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af11580156116c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ed919061265d565b610fd65760405162461bcd60e51b81526004016107ca9061267f565b61171b6104843683900383018361260a565b600083815260026020526040902054146117475760405162461bcd60e51b81526004016107ca906126ae565b600161175960c0830160a084016127c2565b600281111561176a5761176a61262d565b146117a75760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016107ca565b60008281526002602052604081208190556117c860e0830160c084016127dd565b6001600160a01b0316146118b057604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561185757600080fd5b505af115801561186b573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061165c60408401602085016127dd565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb6118ef60408401602085016127dd565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044016116aa565b61194a81611b5c565b600083815260026020526040902054146119765760405162461bcd60e51b81526004016107ca906126ae565b7f00000000000000000000000000000000000000000000000000000000000000006004546119a491906127fa565b60408201516119b99063ffffffff164261280d565b1015611a1c5760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b60648201526084016107ca565b6000611a2782612247565b90506002816003811115611a3d57611a3d61262d565b1480611a5a57506000816003811115611a5857611a5861262d565b145b611ac35760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b60648201526084016107ca565b63ffffffff428116606084015243166080830152611ae082611b5c565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b6000611b567f000000000000000000000000000000000000000000000000000000000000000083612738565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611b91989097969101612820565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c0157611c016126d6565b04031115611c445760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107ca565b611c4d81611b5c565b60008381526002602052604090205414611c795760405162461bcd60e51b81526004016107ca906126ae565b60c08101516001600160a01b031615611ccb5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016107ca565b6001611cd682612247565b6003811115611ce757611ce761262d565b14611d345760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e000000000060448201526064016107ca565b600154821115611d7c57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611d8c81611b5c565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611df557611df56126d6565b040311611e365760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107ca565b611e3f81611b5c565b60008381526002602052604090205414611e6b5760405162461bcd60e51b81526004016107ca906126ae565b60008160a001516002811115611e8357611e8361262d565b14611ec25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107ca565b60c08101516001600160a01b031615610fd65760208101516001600160a01b0316611f74576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116aa565b60c0810180516000909152611f8882611b5c565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015612021573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612045919061265d565b610ccd5760405162461bcd60e51b81526004016107ca9061267f565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816120b4576120b46126d6565b0403116120f55760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107ca565b6120fe81611b5c565b6000838152600260205260409020541461212a5760405162461bcd60e51b81526004016107ca906126ae565b60008160a0015160028111156121425761214261262d565b146121815760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107ca565b60208101516001600160a01b031615610fd65760c08101516001600160a01b031661223357600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116aa565b6020810180516000909152611f8882611b5c565b6000816060015163ffffffff1660000361226357506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561229f57506003919050565b60006005836060015163ffffffff164203816122bd576122bd6126d6565b608085015163ffffffff16919004019050437f0000000000000000000000000000000000000000000000000000000000000000818303116123015760019250612306565b600092505b50505b919050565b6001600160a01b038116811461232357600080fd5b50565b80356123098161230e565b803563ffffffff8116811461230957600080fd5b80356003811061230957600080fd5b600060e0828403121561236657600080fd5b60405160e0810181811067ffffffffffffffff8211171561239757634e487b7160e01b600052604160045260246000fd5b604052823581529050806123ad60208401612326565b60208201526123be60408401612331565b60408201526123cf60608401612331565b60608201526123e060808401612331565b60808201526123f160a08401612345565b60a082015261240260c08401612326565b60c08201525092915050565b600080610100838503121561242257600080fd5b823591506124338460208501612354565b90509250929050565b6000806000610120848603121561245257600080fd5b833592506020840135915061246a8560408601612354565b90509250925092565b60006020828403121561248557600080fd5b5035919050565b6000806040838503121561249f57600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461230957600080fd5b60008083601f8401126124d857600080fd5b50813567ffffffffffffffff8111156124f057600080fd5b60208301915083602082850101111561250857600080fd5b9250929050565b6000806000806000806080878903121561252857600080fd5b863567ffffffffffffffff8082111561254057600080fd5b818901915089601f83011261255457600080fd5b81358181111561256357600080fd5b8a60208260051b850101111561257857600080fd5b6020830198508097505061258e60208a016124ae565b955061259c60408a01612326565b945060608901359150808211156125b257600080fd5b506125bf89828a016124c6565b979a9699509497509295939492505050565b6000808284036101008112156125e657600080fd5b8335925060e0601f19820112156125fc57600080fd5b506020830190509250929050565b600060e0828403121561261c57600080fd5b6126268383612354565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106126575761265761262d565b91905290565b60006020828403121561266f57600080fd5b8151801515811461262657600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156126fe57600080fd5b5051919050565b60006020828403121561271757600080fd5b81516126268161230e565b634e487b7160e01b600052601160045260246000fd5b60008261275557634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156127d457600080fd5b61262682612345565b6000602082840312156127ef57600080fd5b81356126268161230e565b80820180821115611b5657611b56612722565b81810381811115611b5657611b56612722565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106128785761287861262d565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122031052008c53960a426b4b775a73365b0a279ac9190f49c5d62d2741344743b2764736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.", "events": { @@ -1138,6 +1177,15 @@ "hashedClaim": "The hash of the claim." } }, + "isMsgRelayed(uint256)": { + "details": "Get the msg relayed status.", + "params": { + "_msgId": "The msgId to check." + }, + "returns": { + "isRelayed": "True if the msg was relayed." + } + }, "resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Resolves any challenge of the optimistic claim for '_epoch'.", "params": { @@ -1219,7 +1267,7 @@ "storageLayout": { "storage": [ { - "astId": 1438, + "astId": 2314, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "stateRoot", "offset": 0, @@ -1227,7 +1275,7 @@ "type": "t_bytes32" }, { - "astId": 1440, + "astId": 2316, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "latestVerifiedEpoch", "offset": 0, @@ -1235,7 +1283,7 @@ "type": "t_uint256" }, { - "astId": 1444, + "astId": 2320, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "claimHashes", "offset": 0, @@ -1243,7 +1291,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 1448, + "astId": 2324, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "relayed", "offset": 0, @@ -1251,7 +1299,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 1450, + "astId": 2326, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "sequencerDelayLimit", "offset": 0, @@ -1259,7 +1307,7 @@ "type": "t_uint256" }, { - "astId": 1452, + "astId": 2328, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "timestampDelayUpdated", "offset": 0, diff --git a/contracts/deployments/goerli/RouterArbToGnosisDevnet.json b/contracts/deployments/goerli/RouterArbToGnosisDevnet.json index f39dfdb3..01665acd 100644 --- a/contracts/deployments/goerli/RouterArbToGnosisDevnet.json +++ b/contracts/deployments/goerli/RouterArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xef62E517bE7e319458f41014C4d8864117381255", + "address": "0xEC337Fb9977848D0784dC4F01A69c237691755E0", "abi": [ { "inputs": [ @@ -248,29 +248,29 @@ "type": "function" } ], - "transactionHash": "0x5b3301805207c51cb0b121bcd585b293ac4903b21177a25bcfbbbb8214500811", + "transactionHash": "0xf3dc0f0de5d2ad3b85c0209b141d677a20436d708404e580c54cc845e5bd78b4", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xef62E517bE7e319458f41014C4d8864117381255", - "transactionIndex": 64, - "gasUsed": "866965", + "contractAddress": "0xEC337Fb9977848D0784dC4F01A69c237691755E0", + "transactionIndex": 17, + "gasUsed": "866953", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2f754b4c7433ad347517224b88e1351df69c29160946727956b3611b5a390978", - "transactionHash": "0x5b3301805207c51cb0b121bcd585b293ac4903b21177a25bcfbbbb8214500811", + "blockHash": "0x9892be0de819a192509238d2d1cfac6e77f5d218847a3394f769add3a07f367d", + "transactionHash": "0xf3dc0f0de5d2ad3b85c0209b141d677a20436d708404e580c54cc845e5bd78b4", "logs": [], - "blockNumber": 9254597, - "cumulativeGasUsed": "9009996", + "blockNumber": 9265259, + "cumulativeGasUsed": "2557043", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0x7CE671804C3bC9096669F37cE6a7419BA66b7fD8", - "0x660daB9A6436A814a6ae3a6f27b309356a4bE78c" + "0x8179EBCA5D2EA4152ac61A5BCA7a1dc68f8BbF54", + "0xb0263478A46d885D715B01fbac745500B9576634" ], - "numDeployments": 3, + "numDeployments": 8, "solcInputHash": "916b5e2210e8e15d34b48798389f67fe", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_gasLimit\":\"The true batch gas limit for the epoch.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToGnosis {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Send the sequencer delay limit.\\n function sendSequencerDelayLimit() internal {\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _gasLimit The true batch gas limit for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, uint256 _gasLimit, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n\\n uint256 maxGasPerTx = amb.maxGasPerTx();\\n uint256 gasLimitCapped = _gasLimit > maxGasPerTx ? maxGasPerTx : _gasLimit;\\n\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, gasLimitCapped);\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xfc827e3a369ec32a1a85f9058905e56f6c43c41889b027070da878dccbfb873e\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, uint256 _gasLimit, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x084735de7ee128aa169f11f18a4a7de6656309e941b8df502e66b24a4bf93d0f\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x6101006040523480156200001257600080fd5b506040516200102c3803806200102c833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610da06200028c6000396000818161010e015281816108b20152610a04015260008181610135015261064c01526000818160cf015281816107fe0152818161088301526109db015260008181610177015281816102c1015281816103e7015281816105ea01526106760152610da06000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063b1126dad1461015f578063e78cea9214610172578063e813a7551461019957600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100c861016d366004610b05565b6105df565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100b7565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b4f565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610baf565b50925050508181036103df5760008290556103aa61097a565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610baf565b509250505060005481111561051a5760008190556104e461097a565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b8b565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b8b565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008484836040516024016107b593929190610c3a565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263e5789d039260048083019391928290030181865afa158015610846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086a9190610cec565b9050600081851161087b578461087d565b815b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663dc8601b37f000000000000000000000000000000000000000000000000000000000000000086856040518463ffffffff1660e01b81526004016108f193929190610d05565b6020604051808303816000875af1158015610910573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109349190610cec565b9050877f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161096891815260200190565b60405180910390a25050505050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a719190610cec565b6040518463ffffffff1660e01b8152600401610a8f93929190610d05565b6020604051808303816000875af1158015610aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad29190610cec565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b600080600080848603610140811215610b1d57600080fd5b85359450602086013593506040860135925060e0605f1982011215610b4157600080fd5b509295919450926060019150565b80820180821115610b7057634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b9d57600080fd5b8151610ba881610b76565b9392505050565b60008060008060808587031215610bc557600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bf081610b76565b919050565b803563ffffffff81168114610bf057600080fd5b803560038110610bf057600080fd5b60038110610c3657634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c5e81610b76565b6001600160a01b03166060830152610c7860408401610bf5565b63ffffffff808216608085015280610c9260608701610bf5565b1660a085015280610ca560808701610bf5565b1660c08501525050610cb960a08401610c09565b610cc660e0840182610c18565b50610cd360c08401610be5565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cfe57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610d4157868101830151858201608001528201610d25565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea26469706673582212208afa84787b7d0d1b68f4557074fa129ad3f8bb5052cd83db225e4c8688730a8064736f6c63430008120033", diff --git a/contracts/deployments/goerli/RouterArbToGnosisTestnet.json b/contracts/deployments/goerli/RouterArbToGnosisTestnet.json index c903b2af..a347b417 100644 --- a/contracts/deployments/goerli/RouterArbToGnosisTestnet.json +++ b/contracts/deployments/goerli/RouterArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x7Ee8Ad48EfA4765257a49486421A4CF11389E480", + "address": "0x1224E83DF410b43A65ed3e375a6442813B1aea14", "abi": [ { "inputs": [ @@ -248,29 +248,29 @@ "type": "function" } ], - "transactionHash": "0xa3e81c75927f0bdd8b053ee8fae0b089110922c45795da2b7edb44171b48c428", + "transactionHash": "0xb70b293d78c953bddfa524ee0593540c345212e86f2beedb433f4182d5b6588b", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x7Ee8Ad48EfA4765257a49486421A4CF11389E480", - "transactionIndex": 97, + "contractAddress": "0x1224E83DF410b43A65ed3e375a6442813B1aea14", + "transactionIndex": 93, "gasUsed": "866965", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x5a7b5577baa760547818ddbb90c91e8e1fc88c740701b679e5fe1abbd3e928a5", - "transactionHash": "0xa3e81c75927f0bdd8b053ee8fae0b089110922c45795da2b7edb44171b48c428", + "blockHash": "0xa88e3b97f6674908e52a0373fdc6db5d9cfec481ef414cba4a8268e91c0b78ea", + "transactionHash": "0xb70b293d78c953bddfa524ee0593540c345212e86f2beedb433f4182d5b6588b", "logs": [], - "blockNumber": 9254614, - "cumulativeGasUsed": "13695788", + "blockNumber": 9265279, + "cumulativeGasUsed": "15406110", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x87A19d769D875964E9Cd41dDBfc397B2543764E6", - "0x5EC6917F803bF2C9E55D43D3B7DD1032a625A979", - "0x9cF5c011e2A4CB7797413f311A35AcB021071c35" + "0xdc201e4Ab6a25A17C1731D8bB7E56f89D0B86486", + "0xE8ea62d3a4F06301016b9C23Ace108F3D8027839" ], - "numDeployments": 3, + "numDeployments": 6, "solcInputHash": "916b5e2210e8e15d34b48798389f67fe", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_gasLimit\":\"The true batch gas limit for the epoch.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToGnosis {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Send the sequencer delay limit.\\n function sendSequencerDelayLimit() internal {\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _gasLimit The true batch gas limit for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, uint256 _gasLimit, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n\\n uint256 maxGasPerTx = amb.maxGasPerTx();\\n uint256 gasLimitCapped = _gasLimit > maxGasPerTx ? maxGasPerTx : _gasLimit;\\n\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, gasLimitCapped);\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xfc827e3a369ec32a1a85f9058905e56f6c43c41889b027070da878dccbfb873e\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, uint256 _gasLimit, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x084735de7ee128aa169f11f18a4a7de6656309e941b8df502e66b24a4bf93d0f\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x6101006040523480156200001257600080fd5b506040516200102c3803806200102c833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610da06200028c6000396000818161010e015281816108b20152610a04015260008181610135015261064c01526000818160cf015281816107fe0152818161088301526109db015260008181610177015281816102c1015281816103e7015281816105ea01526106760152610da06000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063b1126dad1461015f578063e78cea9214610172578063e813a7551461019957600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100c861016d366004610b05565b6105df565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100b7565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b4f565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610baf565b50925050508181036103df5760008290556103aa61097a565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610baf565b509250505060005481111561051a5760008190556104e461097a565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b8b565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b8b565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008484836040516024016107b593929190610c3a565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263e5789d039260048083019391928290030181865afa158015610846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086a9190610cec565b9050600081851161087b578461087d565b815b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663dc8601b37f000000000000000000000000000000000000000000000000000000000000000086856040518463ffffffff1660e01b81526004016108f193929190610d05565b6020604051808303816000875af1158015610910573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109349190610cec565b9050877f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161096891815260200190565b60405180910390a25050505050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a719190610cec565b6040518463ffffffff1660e01b8152600401610a8f93929190610d05565b6020604051808303816000875af1158015610aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad29190610cec565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b600080600080848603610140811215610b1d57600080fd5b85359450602086013593506040860135925060e0605f1982011215610b4157600080fd5b509295919450926060019150565b80820180821115610b7057634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b9d57600080fd5b8151610ba881610b76565b9392505050565b60008060008060808587031215610bc557600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bf081610b76565b919050565b803563ffffffff81168114610bf057600080fd5b803560038110610bf057600080fd5b60038110610c3657634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c5e81610b76565b6001600160a01b03166060830152610c7860408401610bf5565b63ffffffff808216608085015280610c9260608701610bf5565b1660a085015280610ca560808701610bf5565b1660c08501525050610cb960a08401610c09565b610cc660e0840182610c18565b50610cd360c08401610be5565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cfe57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610d4157868101830151858201608001528201610d25565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea26469706673582212208afa84787b7d0d1b68f4557074fa129ad3f8bb5052cd83db225e4c8688730a8064736f6c63430008120033", diff --git a/contracts/deployments/goerli/RouterGnosisToArbDevnet.json b/contracts/deployments/goerli/RouterGnosisToArbDevnet.json index 07653cfa..cc73926e 100644 --- a/contracts/deployments/goerli/RouterGnosisToArbDevnet.json +++ b/contracts/deployments/goerli/RouterGnosisToArbDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x65b577dC22D3bdfcB20298ac07EF99D574275D04", + "address": "0xb7d2C76641B21718cC8A0b595be438c863A6e031", "abi": [ { "inputs": [ @@ -420,43 +420,43 @@ "type": "function" } ], - "transactionHash": "0x139ec222f5bd1e2cdde213a7d7c51fb5987bb911b272b1e1e94ee4bb144e95e7", + "transactionHash": "0x3b7414b467d1f4468bb9ddbcf718da14a8df64378b7eb62c2b5727ecbb8ddb7e", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x65b577dC22D3bdfcB20298ac07EF99D574275D04", - "transactionIndex": 32, + "contractAddress": "0xb7d2C76641B21718cC8A0b595be438c863A6e031", + "transactionIndex": 30, "gasUsed": "1392477", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000", - "blockHash": "0x5778ed7d15b4ef45ef94c9af6937a5d9bee3ae09b36e130758e2a4aa62463058", - "transactionHash": "0x139ec222f5bd1e2cdde213a7d7c51fb5987bb911b272b1e1e94ee4bb144e95e7", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x7378f507297a43de45553f059cadf3604f2420d4c45c648e8d5b4346f029e3a3", + "transactionHash": "0x3b7414b467d1f4468bb9ddbcf718da14a8df64378b7eb62c2b5727ecbb8ddb7e", "logs": [ { - "transactionIndex": 32, - "blockNumber": 9254600, - "transactionHash": "0x139ec222f5bd1e2cdde213a7d7c51fb5987bb911b272b1e1e94ee4bb144e95e7", - "address": "0x65b577dC22D3bdfcB20298ac07EF99D574275D04", + "transactionIndex": 30, + "blockNumber": 9265262, + "transactionHash": "0x3b7414b467d1f4468bb9ddbcf718da14a8df64378b7eb62c2b5727ecbb8ddb7e", + "address": "0xb7d2C76641B21718cC8A0b595be438c863A6e031", "topics": [ "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 57, - "blockHash": "0x5778ed7d15b4ef45ef94c9af6937a5d9bee3ae09b36e130758e2a4aa62463058" + "logIndex": 41, + "blockHash": "0x7378f507297a43de45553f059cadf3604f2420d4c45c648e8d5b4346f029e3a3" } ], - "blockNumber": 9254600, - "cumulativeGasUsed": "4149312", + "blockNumber": 9265262, + "cumulativeGasUsed": "4995955", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0xA3FefC6FeE3fc66B9d9a8BEE794736ab71a74c55", - "0x016170Ad327cE0dCa07b3bd7a7592013a7488FAc", + "0x9F4407785DFf95c08Bf9a0d9d4A5a164C48eC5CB", + "0x8Da07C6D68F17d7BbC8B42D59Bc9EEE90e9dD621", 5 ], - "numDeployments": 3, + "numDeployments": 9, "solcInputHash": "916b5e2210e8e15d34b48798389f67fe", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_inboxChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"L2GasBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerFutureLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Gnosis Chain to Arbitrum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,uint256)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer delay limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(uint256)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value\",\"params\":{\"_ticketID\":\"The ticketID from the delayed inbox of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer delay limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}},\"sequencerFutureLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer future limit has been made.\",\"params\":{\"_requestedSequencerFutureLimit\":\"The new sequencer limit requested.\"}},\"sequencerFutureLimitSent(uint256)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value\",\"params\":{\"_ticketID\":\"The ticketID from the delayed inbox of the cross-chain message.\"}},\"sequencerFutureLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer future limit updated.\",\"params\":{\"_newSequencerFutureLimit\":\"The new sequencer future limit.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_inboxChainId\":\"The chain ID of the inbox chain.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"executeSequencerFutureLimitDecreaseRequest()\":{\"details\":\"execute sequencerFutureLimitDecreaseRequest\"},\"route(uint256,bytes32,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to.\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee.\",\"_stateroot\":\"The true state root for the epoch.\"}},\"sendSequencerDelayLimit(uint256,uint256,address,uint256,uint256)\":{\"details\":\"Send the sequencer delay limit through the delayed inbox.\"},\"sendSequencerFutureLimit(uint256,uint256,address,uint256,uint256)\":{\"details\":\"Send the sequencer future limit through the delayed inbox.\"},\"updateSequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"},\"updateSequencerFutureLimit()\":{\"details\":\"Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,uint256,uint256,address,uint256,uint256)\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/RouterGnosisToArb.sol\":\"RouterGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IInbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IInbox.sol\\n// proxy: https://etherscan.io/address/0x4Dbd4fc535Ac27206064B68FfCf827b0A60BAB3f\\n// implementation: https://etherscan.io/address/0x5aed5f8a1e3607476f1f81c3d8fe126deb0afe94\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface IInbox {\\n function bridge() external view returns (IBridge);\\n\\n /**\\n * @notice Put a message in the L2 inbox that can be reexecuted for some fixed amount of time if it reverts\\n * @dev all msg.value will deposited to callValueRefundAddress on L2\\n * @dev Gas limit and maxFeePerGas should not be set to 1 as that is used to trigger the RetryableData error\\n * @param to destination L2 contract address\\n * @param l2CallValue call value for retryable L2 message\\n * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n * @param excessFeeRefundAddress gasLimit x maxFeePerGas - execution cost gets credited here on L2 balance\\n * @param callValueRefundAddress l2Callvalue gets credited here on L2 if retryable txn times out or gets cancelled\\n * @param gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n * @param maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n * @param data ABI encoded data of L2 message\\n * @return unique message number of the retryable transaction\\n */\\n function createRetryableTicket(\\n address to,\\n uint256 l2CallValue,\\n uint256 maxSubmissionCost,\\n address excessFeeRefundAddress,\\n address callValueRefundAddress,\\n uint256 gasLimit,\\n uint256 maxFeePerGas,\\n bytes calldata data\\n ) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x2497d8bd48681de9d2b9929152afbc3ad5508923cce0eb4e863bf576955ddec2\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/RouterGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerFutureUpdatable.sol\\\";\\n\\n/// @dev Router from Gnosis Chain to Arbitrum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterGnosisToArb is IRouterToArb {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxGnosisToArb; // The address of the veaInbox on Gnosis.\\n address public immutable veaOutboxGnosisToArb; // The address of the veaOutbox on Arbitrum.\\n uint256 internal immutable inboxChainId; // The chain ID of the inbox chain.\\n\\n mapping(address => uint256) public L2GasBalance;\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n SequencerLimitDecreaseRequest public sequencerFutureLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, uint256 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value\\n /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message.\\n event sequencerDelayLimitSent(uint256 _ticketID);\\n\\n /// @dev This event indicates the sequencer delay limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer delay limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value\\n /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message.\\n event sequencerFutureLimitSent(uint256 _ticketID);\\n\\n /// @dev This event indicates the sequencer future limit updated.\\n /// @param _newSequencerFutureLimit The new sequencer future limit.\\n event sequencerFutureLimitUpdated(uint256 _newSequencerFutureLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer future limit has been made.\\n /// @param _requestedSequencerFutureLimit The new sequencer limit requested.\\n event sequencerFutureLimitDecreaseRequested(uint256 _requestedSequencerFutureLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n /// @param _inboxChainId The chain ID of the inbox chain.\\n constructor(\\n IBridge _bridge,\\n IAMB _amb,\\n address _veaInboxArbToGnosis,\\n address _veaOutboxArbToGnosis,\\n uint256 _inboxChainId\\n ) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxGnosisToArb = _veaInboxArbToGnosis;\\n veaOutboxGnosisToArb = _veaOutboxArbToGnosis;\\n inboxChainId = _inboxChainId;\\n\\n updateSequencerDelayLimit();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerFutureLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , , uint256 newSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerFutureLimit > sequencerFutureLimit) {\\n // For sequencerFutureLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerFutureLimit = newSequencerFutureLimit;\\n emit sequencerFutureLimitUpdated(newSequencerFutureLimit);\\n } else if (newSequencerFutureLimit < sequencerFutureLimit) {\\n require(\\n sequencerFutureLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerFutureLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerFutureLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerFutureLimitDecreaseRequested(newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerFutureLimitDecreaseRequest\\n function executeSequencerFutureLimitDecreaseRequest() external {\\n require(sequencerFutureLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerFutureLimitDecreaseRequest.timestamp + sequencerFutureLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerFutureLimit = sequencerFutureLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerFutureLimitDecreaseRequest;\\n\\n (, , , uint256 currentSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerFutureLimit == requestedSequencerFutureLimit) {\\n sequencerFutureLimit = requestedSequencerFutureLimit;\\n emit sequencerFutureLimitUpdated(requestedSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Send the sequencer future limit through the delayed inbox.\\n function sendSequencerFutureLimit(\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external {\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n\\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(\\n ISequencerFutureUpdatable.updateSequencerFutureLimit,\\n (sequencerFutureLimit, block.timestamp)\\n );\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit sequencerFutureLimitSent(ticketID);\\n }\\n\\n /// @dev Send the sequencer delay limit through the delayed inbox.\\n function sendSequencerDelayLimit(\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external {\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n\\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function deposit() external payable {\\n L2GasBalance[msg.sender] += msg.value;\\n }\\n\\n function withdraw(uint256 _amount) external {\\n require(L2GasBalance[msg.sender] > _amount, \\\"Insufficient balance.\\\");\\n L2GasBalance[msg.sender] -= _amount;\\n payable(msg.sender).send(_amount); // User is responsible for accepting ETH.\\n }\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee.\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to.\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(inboxChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(veaInboxGnosisToArb == amb.messageSender(), \\\"Vea Inbox only.\\\");\\n\\n // Ethereum -> Arbitrum message passing with retryable tickets in the delayed inbox, the canonical Ethereum -> Arbitrum bridge.\\n // https://developer.arbitrum.io/arbos/l1-to-l2-messaging#submission\\n\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n\\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL2.resolveDisputedClaim, (_epoch, _stateroot));\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xaab3a5d9b5a52671af6336f05306c66627bfe25dbf0dd51fc88882c14da15a3d\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerFutureUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerFutureUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerFutureUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerFutureLimit The futureSeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0x5c8b8ffaec923126ec1699d9c1483329b5a660837803aefc4aa95d9f091ef21f\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x6101206040523480156200001257600080fd5b5060405162001aeb38038062001aeb833981016040819052620000359162000268565b6001600160a01b0380861660805284811660a05283811660c052821660e052610100819052620000646200006f565b50505050506200033a565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d89190620002dc565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000116573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200013c919062000303565b5092505050600154811115620001875760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6001548110156200024f5760045415620002015760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6001600160a01b03811681146200024f57600080fd5b600080600080600060a086880312156200028157600080fd5b85516200028e8162000252565b6020870151909550620002a18162000252565b6040870151909450620002b48162000252565b6060870151909350620002c78162000252565b80925050608086015190509295509295909350565b600060208284031215620002ef57600080fd5b8151620002fc8162000252565b9392505050565b600080600080608085870312156200031a57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e0516101005161170a620003e1600039600061085501526000818161021101528181610aed0152818161105401526112700152600081816102d7015261094201526000818161019001528181610759015281816107d301526108b701526000818161035301528181610410015281816105a401528181610a6f01528181610bc801528181610d7301528181610fd601526111f2015261170a6000f3fe6080604052600436106101095760003560e01c806365b0183511610095578063b6d7aeff11610064578063b6d7aeff146102f9578063c4977c8b14610319578063d0e30db014610339578063e78cea9214610341578063e813a7551461037557600080fd5b806365b018351461026857806377a43648146102955780637e260880146102aa5780639e75a705146102c557600080fd5b80631ff47dc0116100dc5780631ff47dc0146101ca5780632e1a7d4d146101df5780634738b97f146101ff578063507b5ad3146102335780635f43a47f1461025357600080fd5b8063051d19701461010e5780630c63fa84146101435780630e56752e1461015a5780631062b39a1461017e575b600080fd5b34801561011a57600080fd5b50600354600454610129919082565b604080519283526020830191909152015b60405180910390f35b34801561014f57600080fd5b5061015861038b565b005b34801561016657600080fd5b5061017060025481565b60405190815260200161013a565b34801561018a57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013a565b3480156101d657600080fd5b50610158610528565b3480156101eb57600080fd5b506101586101fa366004611357565b6106b5565b34801561020b57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561023f57600080fd5b5061015861024e366004611385565b61074e565b34801561025f57600080fd5b50610158610bc4565b34801561027457600080fd5b506101706102833660046113e4565b60006020819052908152604090205481565b3480156102a157600080fd5b50610158610d6f565b3480156102b657600080fd5b50600554600654610129919082565b3480156102d157600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561030557600080fd5b50610158610314366004611408565b610f0c565b34801561032557600080fd5b50610158610334366004611408565b611128565b610158611331565b34801561034d57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561038157600080fd5b5061017060015481565b6004546000036103b65760405162461bcd60e51b81526004016103ad90611451565b60405180910390fd5b6001546004546103c691906114b3565b42116103e45760405162461bcd60e51b81526004016103ad906114cc565b6003805460009182905560048281556040805163ee35f32760e01b815290519293926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263ee35f327928082019260209290918290030181865afa158015610459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047d919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de919061153b565b50925050508181036105245760018290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60065460000361054a5760405162461bcd60e51b81526004016103ad90611451565b60025460065461055a91906114b3565b42116105785760405162461bcd60e51b81526004016103ad906114cc565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156105ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610613919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610674919061153b565b93505050508181036105245760028290556040518281527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b2719060200161051b565b33600090815260208190526040902054811061070b5760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b60448201526064016103ad565b336000908152602081905260408120805483929061072a908490611571565b9091555050604051339082156108fc029083906000818181858888f1505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107d15760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190611584565b7f0000000000000000000000000000000000000000000000000000000000000000146108b55760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610913573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610937919061151e565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146109a95760405162461bcd60e51b815260206004820152600f60248201526e2b32b09024b73137bc1037b7363c9760891b60448201526064016103ad565b60006109b5828461159d565b6109bf90866114b3565b33600090815260208190526040902054909150818110156109f25760405162461bcd60e51b81526004016103ad906115b4565b6109fc8282611571565b33600090815260208190526040808220929092559051602481018b9052604481018a905260640160408051601f198184030181529181526020820180516001600160e01b0316631195d6f560e31b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af1158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b8152600401610b389897969594939291906115eb565b60206040518083038185885af1158015610b56573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b7b9190611584565b90508a7fcafd272887d09c9615b3354aa56a477e3ba7b4095d0b6201235c2bfabe2294c582604051610baf91815260200190565b60405180910390a25050505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c48919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca9919061153b565b5092505050600154811115610cf45760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a150565b600154811015610d6c5760045415610d1e5760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df3919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610e30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e54919061153b565b9350505050600254811115610e985760028190556040518181527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b27190602001610ce9565b600254811015610d6c5760065415610ec25760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600584905560065590518281527f326636d2e3d2c0d42c0fb6fd9f30ab0fcde3dff35e63db28f8abc38d566057f49101610ce9565b6000610f18828461159d565b610f2290866114b3565b3360009081526020819052604090205490915081811015610f555760405162461bcd60e51b81526004016103ad906115b4565b610f5f8282611571565b3360009081526020819052604080822092909255600254915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b031663710cc9a760e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561101f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611043919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b815260040161109f9897969594939291906115eb565b60206040518083038185885af11580156110bd573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110e29190611584565b90507f0bb0de69fc6722b8061f8161f450a46b49fd536c11535aab912024d630d505cf8160405161111591815260200190565b60405180910390a1505050505050505050565b6000611134828461159d565b61113e90866114b3565b33600090815260208190526040902054909150818110156111715760405162461bcd60e51b81526004016103ad906115b4565b61117b8282611571565b3360009081526020819052604080822092909255600154915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b0316632c19251960e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561123b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125f919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b81526004016112bb9897969594939291906115eb565b60206040518083038185885af11580156112d9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112fe9190611584565b90507fe68d5d0ca95adf855ddd4733abf1d205e40aaef86e1c7795f4002791d5e28a388160405161111591815260200190565b33600090815260208190526040812080543492906113509084906114b3565b9091555050565b60006020828403121561136957600080fd5b5035919050565b6001600160a01b0381168114610d6c57600080fd5b600080600080600080600060e0888a0312156113a057600080fd5b8735965060208801359550604088013594506060880135935060808801356113c781611370565b9699959850939692959460a0840135945060c09093013592915050565b6000602082840312156113f657600080fd5b813561140181611370565b9392505050565b600080600080600060a0868803121561142057600080fd5b8535945060208601359350604086013561143981611370565b94979396509394606081013594506080013592915050565b6020808252602c908201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560408201526b30b9b2903932b8bab2b9ba1760a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156114c6576114c661149d565b92915050565b60208082526032908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152711034b99039ba34b636103832b73234b7339760711b606082015260800190565b60006020828403121561153057600080fd5b815161140181611370565b6000806000806080858703121561155157600080fd5b505082516020840151604085015160609095015191969095509092509050565b818103818111156114c6576114c661149d565b60006020828403121561159657600080fd5b5051919050565b80820281158282048414176114c6576114c661149d565b6020808252601c908201527f496e73756666696369656e74204c32206761732062616c616e63652e00000000604082015260600190565b600061010060018060a01b03808c16845260208b818601528a6040860152818a16606086015281891660808601528760a08601528660c08601528260e0860152855191508183860152600092505b8183101561165857858301810151858401610120015291820191611639565b506101209150600082828601015281601f19601f830116850101925050509998505050505050505050565b60208082526031908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152701030b63932b0b23c903832b73234b7339760791b60608201526080019056fea2646970667358221220535f232bc393000c0245713b2c0e8c68054ae9cbf7af42338a97ed188b8ad73164736f6c63430008120033", diff --git a/contracts/deployments/goerli/RouterGnosisToArbTestnet.json b/contracts/deployments/goerli/RouterGnosisToArbTestnet.json index 272f35aa..bbf283fc 100644 --- a/contracts/deployments/goerli/RouterGnosisToArbTestnet.json +++ b/contracts/deployments/goerli/RouterGnosisToArbTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x531754c9935A851173FA349b3bEadAF538c570aC", + "address": "0x84de475fed07406aA3B05248f1a7b0Fca11DA012", "abi": [ { "inputs": [ @@ -420,43 +420,43 @@ "type": "function" } ], - "transactionHash": "0xc75d7ea9110c4bda5d24c8b61586a95efec7a9e3306f8e177895e7e4163d809a", + "transactionHash": "0xcdf232bdbba982e1d7394afee9d20eb7c28910fc4805f36eabdda985d5c01d42", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x531754c9935A851173FA349b3bEadAF538c570aC", - "transactionIndex": 82, + "contractAddress": "0x84de475fed07406aA3B05248f1a7b0Fca11DA012", + "transactionIndex": 36, "gasUsed": "1392477", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000400000000000000000000000000000000000000", - "blockHash": "0xf0a18be3993d57ebb158489156f11ed455b3c1bc80fce508aca5850f16306aa5", - "transactionHash": "0xc75d7ea9110c4bda5d24c8b61586a95efec7a9e3306f8e177895e7e4163d809a", + "logsBloom": "0x00000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200800000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x366e42b0ce390c1cc23490bd427e0bee5bfa116f54d1e015f1fd0fb29ed721a2", + "transactionHash": "0xcdf232bdbba982e1d7394afee9d20eb7c28910fc4805f36eabdda985d5c01d42", "logs": [ { - "transactionIndex": 82, - "blockNumber": 9254618, - "transactionHash": "0xc75d7ea9110c4bda5d24c8b61586a95efec7a9e3306f8e177895e7e4163d809a", - "address": "0x531754c9935A851173FA349b3bEadAF538c570aC", + "transactionIndex": 36, + "blockNumber": 9265281, + "transactionHash": "0xcdf232bdbba982e1d7394afee9d20eb7c28910fc4805f36eabdda985d5c01d42", + "address": "0x84de475fed07406aA3B05248f1a7b0Fca11DA012", "topics": [ "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 177, - "blockHash": "0xf0a18be3993d57ebb158489156f11ed455b3c1bc80fce508aca5850f16306aa5" + "logIndex": 54, + "blockHash": "0x366e42b0ce390c1cc23490bd427e0bee5bfa116f54d1e015f1fd0fb29ed721a2" } ], - "blockNumber": 9254618, - "cumulativeGasUsed": "10799409", + "blockNumber": 9265281, + "cumulativeGasUsed": "4697361", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0xfF2B7048d673767754B798df1702C786E2c59F1F", - "0xF0492e87Be6d644A6a467fE20ee9EC5eFCB6cB23", + "0x8Bf88E6474d93bD2Dc0d76CB3BE8809c6BB84148", + "0x62581B897330CA4044C4db79Ebe96ca230569492", 5 ], - "numDeployments": 3, + "numDeployments": 7, "solcInputHash": "916b5e2210e8e15d34b48798389f67fe", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_inboxChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"L2GasBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerFutureLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Gnosis Chain to Arbitrum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,uint256)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer delay limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(uint256)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value\",\"params\":{\"_ticketID\":\"The ticketID from the delayed inbox of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer delay limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}},\"sequencerFutureLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer future limit has been made.\",\"params\":{\"_requestedSequencerFutureLimit\":\"The new sequencer limit requested.\"}},\"sequencerFutureLimitSent(uint256)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value\",\"params\":{\"_ticketID\":\"The ticketID from the delayed inbox of the cross-chain message.\"}},\"sequencerFutureLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer future limit updated.\",\"params\":{\"_newSequencerFutureLimit\":\"The new sequencer future limit.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_inboxChainId\":\"The chain ID of the inbox chain.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"executeSequencerFutureLimitDecreaseRequest()\":{\"details\":\"execute sequencerFutureLimitDecreaseRequest\"},\"route(uint256,bytes32,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to.\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee.\",\"_stateroot\":\"The true state root for the epoch.\"}},\"sendSequencerDelayLimit(uint256,uint256,address,uint256,uint256)\":{\"details\":\"Send the sequencer delay limit through the delayed inbox.\"},\"sendSequencerFutureLimit(uint256,uint256,address,uint256,uint256)\":{\"details\":\"Send the sequencer future limit through the delayed inbox.\"},\"updateSequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"},\"updateSequencerFutureLimit()\":{\"details\":\"Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,uint256,uint256,address,uint256,uint256)\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/RouterGnosisToArb.sol\":\"RouterGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IInbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IInbox.sol\\n// proxy: https://etherscan.io/address/0x4Dbd4fc535Ac27206064B68FfCf827b0A60BAB3f\\n// implementation: https://etherscan.io/address/0x5aed5f8a1e3607476f1f81c3d8fe126deb0afe94\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface IInbox {\\n function bridge() external view returns (IBridge);\\n\\n /**\\n * @notice Put a message in the L2 inbox that can be reexecuted for some fixed amount of time if it reverts\\n * @dev all msg.value will deposited to callValueRefundAddress on L2\\n * @dev Gas limit and maxFeePerGas should not be set to 1 as that is used to trigger the RetryableData error\\n * @param to destination L2 contract address\\n * @param l2CallValue call value for retryable L2 message\\n * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n * @param excessFeeRefundAddress gasLimit x maxFeePerGas - execution cost gets credited here on L2 balance\\n * @param callValueRefundAddress l2Callvalue gets credited here on L2 if retryable txn times out or gets cancelled\\n * @param gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n * @param maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n * @param data ABI encoded data of L2 message\\n * @return unique message number of the retryable transaction\\n */\\n function createRetryableTicket(\\n address to,\\n uint256 l2CallValue,\\n uint256 maxSubmissionCost,\\n address excessFeeRefundAddress,\\n address callValueRefundAddress,\\n uint256 gasLimit,\\n uint256 maxFeePerGas,\\n bytes calldata data\\n ) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x2497d8bd48681de9d2b9929152afbc3ad5508923cce0eb4e863bf576955ddec2\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/RouterGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerFutureUpdatable.sol\\\";\\n\\n/// @dev Router from Gnosis Chain to Arbitrum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterGnosisToArb is IRouterToArb {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxGnosisToArb; // The address of the veaInbox on Gnosis.\\n address public immutable veaOutboxGnosisToArb; // The address of the veaOutbox on Arbitrum.\\n uint256 internal immutable inboxChainId; // The chain ID of the inbox chain.\\n\\n mapping(address => uint256) public L2GasBalance;\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n SequencerLimitDecreaseRequest public sequencerFutureLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, uint256 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value\\n /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message.\\n event sequencerDelayLimitSent(uint256 _ticketID);\\n\\n /// @dev This event indicates the sequencer delay limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer delay limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value\\n /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message.\\n event sequencerFutureLimitSent(uint256 _ticketID);\\n\\n /// @dev This event indicates the sequencer future limit updated.\\n /// @param _newSequencerFutureLimit The new sequencer future limit.\\n event sequencerFutureLimitUpdated(uint256 _newSequencerFutureLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer future limit has been made.\\n /// @param _requestedSequencerFutureLimit The new sequencer limit requested.\\n event sequencerFutureLimitDecreaseRequested(uint256 _requestedSequencerFutureLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n /// @param _inboxChainId The chain ID of the inbox chain.\\n constructor(\\n IBridge _bridge,\\n IAMB _amb,\\n address _veaInboxArbToGnosis,\\n address _veaOutboxArbToGnosis,\\n uint256 _inboxChainId\\n ) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxGnosisToArb = _veaInboxArbToGnosis;\\n veaOutboxGnosisToArb = _veaOutboxArbToGnosis;\\n inboxChainId = _inboxChainId;\\n\\n updateSequencerDelayLimit();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerFutureLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , , uint256 newSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerFutureLimit > sequencerFutureLimit) {\\n // For sequencerFutureLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerFutureLimit = newSequencerFutureLimit;\\n emit sequencerFutureLimitUpdated(newSequencerFutureLimit);\\n } else if (newSequencerFutureLimit < sequencerFutureLimit) {\\n require(\\n sequencerFutureLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerFutureLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerFutureLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerFutureLimitDecreaseRequested(newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerFutureLimitDecreaseRequest\\n function executeSequencerFutureLimitDecreaseRequest() external {\\n require(sequencerFutureLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerFutureLimitDecreaseRequest.timestamp + sequencerFutureLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerFutureLimit = sequencerFutureLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerFutureLimitDecreaseRequest;\\n\\n (, , , uint256 currentSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerFutureLimit == requestedSequencerFutureLimit) {\\n sequencerFutureLimit = requestedSequencerFutureLimit;\\n emit sequencerFutureLimitUpdated(requestedSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Send the sequencer future limit through the delayed inbox.\\n function sendSequencerFutureLimit(\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external {\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n\\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(\\n ISequencerFutureUpdatable.updateSequencerFutureLimit,\\n (sequencerFutureLimit, block.timestamp)\\n );\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit sequencerFutureLimitSent(ticketID);\\n }\\n\\n /// @dev Send the sequencer delay limit through the delayed inbox.\\n function sendSequencerDelayLimit(\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external {\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n\\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function deposit() external payable {\\n L2GasBalance[msg.sender] += msg.value;\\n }\\n\\n function withdraw(uint256 _amount) external {\\n require(L2GasBalance[msg.sender] > _amount, \\\"Insufficient balance.\\\");\\n L2GasBalance[msg.sender] -= _amount;\\n payable(msg.sender).send(_amount); // User is responsible for accepting ETH.\\n }\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee.\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to.\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(inboxChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(veaInboxGnosisToArb == amb.messageSender(), \\\"Vea Inbox only.\\\");\\n\\n // Ethereum -> Arbitrum message passing with retryable tickets in the delayed inbox, the canonical Ethereum -> Arbitrum bridge.\\n // https://developer.arbitrum.io/arbos/l1-to-l2-messaging#submission\\n\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n\\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL2.resolveDisputedClaim, (_epoch, _stateroot));\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xaab3a5d9b5a52671af6336f05306c66627bfe25dbf0dd51fc88882c14da15a3d\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerFutureUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerFutureUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerFutureUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerFutureLimit The futureSeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0x5c8b8ffaec923126ec1699d9c1483329b5a660837803aefc4aa95d9f091ef21f\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x6101206040523480156200001257600080fd5b5060405162001aeb38038062001aeb833981016040819052620000359162000268565b6001600160a01b0380861660805284811660a05283811660c052821660e052610100819052620000646200006f565b50505050506200033a565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d89190620002dc565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000116573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200013c919062000303565b5092505050600154811115620001875760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6001548110156200024f5760045415620002015760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6001600160a01b03811681146200024f57600080fd5b600080600080600060a086880312156200028157600080fd5b85516200028e8162000252565b6020870151909550620002a18162000252565b6040870151909450620002b48162000252565b6060870151909350620002c78162000252565b80925050608086015190509295509295909350565b600060208284031215620002ef57600080fd5b8151620002fc8162000252565b9392505050565b600080600080608085870312156200031a57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e0516101005161170a620003e1600039600061085501526000818161021101528181610aed0152818161105401526112700152600081816102d7015261094201526000818161019001528181610759015281816107d301526108b701526000818161035301528181610410015281816105a401528181610a6f01528181610bc801528181610d7301528181610fd601526111f2015261170a6000f3fe6080604052600436106101095760003560e01c806365b0183511610095578063b6d7aeff11610064578063b6d7aeff146102f9578063c4977c8b14610319578063d0e30db014610339578063e78cea9214610341578063e813a7551461037557600080fd5b806365b018351461026857806377a43648146102955780637e260880146102aa5780639e75a705146102c557600080fd5b80631ff47dc0116100dc5780631ff47dc0146101ca5780632e1a7d4d146101df5780634738b97f146101ff578063507b5ad3146102335780635f43a47f1461025357600080fd5b8063051d19701461010e5780630c63fa84146101435780630e56752e1461015a5780631062b39a1461017e575b600080fd5b34801561011a57600080fd5b50600354600454610129919082565b604080519283526020830191909152015b60405180910390f35b34801561014f57600080fd5b5061015861038b565b005b34801561016657600080fd5b5061017060025481565b60405190815260200161013a565b34801561018a57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013a565b3480156101d657600080fd5b50610158610528565b3480156101eb57600080fd5b506101586101fa366004611357565b6106b5565b34801561020b57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561023f57600080fd5b5061015861024e366004611385565b61074e565b34801561025f57600080fd5b50610158610bc4565b34801561027457600080fd5b506101706102833660046113e4565b60006020819052908152604090205481565b3480156102a157600080fd5b50610158610d6f565b3480156102b657600080fd5b50600554600654610129919082565b3480156102d157600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561030557600080fd5b50610158610314366004611408565b610f0c565b34801561032557600080fd5b50610158610334366004611408565b611128565b610158611331565b34801561034d57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561038157600080fd5b5061017060015481565b6004546000036103b65760405162461bcd60e51b81526004016103ad90611451565b60405180910390fd5b6001546004546103c691906114b3565b42116103e45760405162461bcd60e51b81526004016103ad906114cc565b6003805460009182905560048281556040805163ee35f32760e01b815290519293926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263ee35f327928082019260209290918290030181865afa158015610459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047d919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de919061153b565b50925050508181036105245760018290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60065460000361054a5760405162461bcd60e51b81526004016103ad90611451565b60025460065461055a91906114b3565b42116105785760405162461bcd60e51b81526004016103ad906114cc565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156105ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610613919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610674919061153b565b93505050508181036105245760028290556040518281527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b2719060200161051b565b33600090815260208190526040902054811061070b5760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b60448201526064016103ad565b336000908152602081905260408120805483929061072a908490611571565b9091555050604051339082156108fc029083906000818181858888f1505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107d15760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190611584565b7f0000000000000000000000000000000000000000000000000000000000000000146108b55760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610913573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610937919061151e565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146109a95760405162461bcd60e51b815260206004820152600f60248201526e2b32b09024b73137bc1037b7363c9760891b60448201526064016103ad565b60006109b5828461159d565b6109bf90866114b3565b33600090815260208190526040902054909150818110156109f25760405162461bcd60e51b81526004016103ad906115b4565b6109fc8282611571565b33600090815260208190526040808220929092559051602481018b9052604481018a905260640160408051601f198184030181529181526020820180516001600160e01b0316631195d6f560e31b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af1158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b8152600401610b389897969594939291906115eb565b60206040518083038185885af1158015610b56573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b7b9190611584565b90508a7fcafd272887d09c9615b3354aa56a477e3ba7b4095d0b6201235c2bfabe2294c582604051610baf91815260200190565b60405180910390a25050505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c48919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca9919061153b565b5092505050600154811115610cf45760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a150565b600154811015610d6c5760045415610d1e5760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df3919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610e30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e54919061153b565b9350505050600254811115610e985760028190556040518181527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b27190602001610ce9565b600254811015610d6c5760065415610ec25760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600584905560065590518281527f326636d2e3d2c0d42c0fb6fd9f30ab0fcde3dff35e63db28f8abc38d566057f49101610ce9565b6000610f18828461159d565b610f2290866114b3565b3360009081526020819052604090205490915081811015610f555760405162461bcd60e51b81526004016103ad906115b4565b610f5f8282611571565b3360009081526020819052604080822092909255600254915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b031663710cc9a760e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561101f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611043919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b815260040161109f9897969594939291906115eb565b60206040518083038185885af11580156110bd573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110e29190611584565b90507f0bb0de69fc6722b8061f8161f450a46b49fd536c11535aab912024d630d505cf8160405161111591815260200190565b60405180910390a1505050505050505050565b6000611134828461159d565b61113e90866114b3565b33600090815260208190526040902054909150818110156111715760405162461bcd60e51b81526004016103ad906115b4565b61117b8282611571565b3360009081526020819052604080822092909255600154915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b0316632c19251960e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561123b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125f919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b81526004016112bb9897969594939291906115eb565b60206040518083038185885af11580156112d9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112fe9190611584565b90507fe68d5d0ca95adf855ddd4733abf1d205e40aaef86e1c7795f4002791d5e28a388160405161111591815260200190565b33600090815260208190526040812080543492906113509084906114b3565b9091555050565b60006020828403121561136957600080fd5b5035919050565b6001600160a01b0381168114610d6c57600080fd5b600080600080600080600060e0888a0312156113a057600080fd5b8735965060208801359550604088013594506060880135935060808801356113c781611370565b9699959850939692959460a0840135945060c09093013592915050565b6000602082840312156113f657600080fd5b813561140181611370565b9392505050565b600080600080600060a0868803121561142057600080fd5b8535945060208601359350604086013561143981611370565b94979396509394606081013594506080013592915050565b6020808252602c908201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560408201526b30b9b2903932b8bab2b9ba1760a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156114c6576114c661149d565b92915050565b60208082526032908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152711034b99039ba34b636103832b73234b7339760711b606082015260800190565b60006020828403121561153057600080fd5b815161140181611370565b6000806000806080858703121561155157600080fd5b505082516020840151604085015160609095015191969095509092509050565b818103818111156114c6576114c661149d565b60006020828403121561159657600080fd5b5051919050565b80820281158282048414176114c6576114c661149d565b6020808252601c908201527f496e73756666696369656e74204c32206761732062616c616e63652e00000000604082015260600190565b600061010060018060a01b03808c16845260208b818601528a6040860152818a16606086015281891660808601528760a08601528660c08601528260e0860152855191508183860152600092505b8183101561165857858301810151858401610120015291820191611639565b506101209150600082828601015281601f19601f830116850101925050509998505050505050505050565b60208082526031908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152701030b63932b0b23c903832b73234b7339760791b60608201526080019056fea2646970667358221220535f232bc393000c0245713b2c0e8c68054ae9cbf7af42338a97ed188b8ad73164736f6c63430008120033", diff --git a/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json b/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json index f3761026..fdaf6a9e 100644 --- a/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json +++ b/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x4B1275adA5014d7A10375B87bb0cfaCAbC47d3dC", + "address": "0x3D9356FF595C2151513DFc520380d5A178224564", "abi": [ { "inputs": [ @@ -71,7 +71,7 @@ "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "_epoch", "type": "uint256" @@ -151,6 +151,19 @@ "name": "sequencerDelayLimitUpdated", "type": "event" }, + { + "inputs": [], + "name": "BURN_ADDRESS", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "bridge", @@ -164,6 +177,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "burn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -338,6 +364,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "depositPlusReward", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -478,21 +517,27 @@ "type": "function" }, { - "inputs": [], - "name": "latestVerifiedEpoch", - "outputs": [ + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "_msgId", "type": "uint256" } ], + "name": "isMsgRelayed", + "outputs": [ + { + "internalType": "bool", + "name": "isRelayed", + "type": "bool" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "maxMissingBlocks", + "name": "latestVerifiedEpoch", "outputs": [ { "internalType": "uint256", @@ -505,7 +550,7 @@ }, { "inputs": [], - "name": "minChallengePeriod", + "name": "maxMissingBlocks", "outputs": [ { "internalType": "uint256", @@ -517,21 +562,15 @@ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "minChallengePeriod", + "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], - "name": "relayed", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], "stateMutability": "view", "type": "function" }, @@ -1031,32 +1070,32 @@ "type": "function" } ], - "transactionHash": "0xa710d88bcc4365d2a793f0c7cf746745fc3d35f6380ffe380491656e351d837f", + "transactionHash": "0xda473ec704995cbb838a357f2a6395fb79af9800e6f8cf242ea4046b0831f967", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x4B1275adA5014d7A10375B87bb0cfaCAbC47d3dC", - "transactionIndex": 97, - "gasUsed": "2207177", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000002000000000000000010000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x6b5bfc52c0b647761a0704adbc88787f446a5254bff6f091e8e3c38b9d1dfb60", - "transactionHash": "0xa710d88bcc4365d2a793f0c7cf746745fc3d35f6380ffe380491656e351d837f", + "contractAddress": "0x3D9356FF595C2151513DFc520380d5A178224564", + "transactionIndex": 42, + "gasUsed": "2264719", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000400000000000000020000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xdf56b18926fadf4031d724671a23bd4ae21adb50a2bd9ad1c188e3b96562ce57", + "transactionHash": "0xda473ec704995cbb838a357f2a6395fb79af9800e6f8cf242ea4046b0831f967", "logs": [ { - "transactionIndex": 97, - "blockNumber": 9254595, - "transactionHash": "0xa710d88bcc4365d2a793f0c7cf746745fc3d35f6380ffe380491656e351d837f", - "address": "0x4B1275adA5014d7A10375B87bb0cfaCAbC47d3dC", + "transactionIndex": 42, + "blockNumber": 9265255, + "transactionHash": "0xda473ec704995cbb838a357f2a6395fb79af9800e6f8cf242ea4046b0831f967", + "address": "0x3D9356FF595C2151513DFc520380d5A178224564", "topics": [ "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 257, - "blockHash": "0x6b5bfc52c0b647761a0704adbc88787f446a5254bff6f091e8e3c38b9d1dfb60" + "logIndex": 98, + "blockHash": "0xdf56b18926fadf4031d724671a23bd4ae21adb50a2bd9ad1c188e3b96562ce57" } ], - "blockNumber": 9254595, - "cumulativeGasUsed": "15695680", + "blockNumber": 9265255, + "cumulativeGasUsed": "11028244", "status": 1, "byzantium": true }, @@ -1065,15 +1104,15 @@ 1800, 0, 10000000000000, - "0xe81afBecf7d0bB755fB9f1fb417b95Bf924534e6", + "0x935feC4B0bc8f48884f7315153839859832f385b", "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", 10000000000000 ], - "numDeployments": 3, - "solcInputHash": "6b0b750c6eee9aa0a5e450d1f0bbb2d2", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEthDevnet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer delay limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEthDevnet\":\"The address of the inbox contract on Arbitrum.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":\"VeaOutboxArbToEthDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer delay limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updateSequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch has not yet passed.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= uint256(_claim.timestampClaimed) + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0xe9d526edd46c7639759b1a7bd8d2f218ce5716f07638b2a8743ab5119b62ee35\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToEth/VeaOutboxArbToEth.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Goerli.\\n/// Note: This contract is deployed on Goerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEthDevnet The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEthDevnet,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n )\\n VeaOutboxArbToEth(\\n _deposit,\\n _epochPeriod,\\n _minChallengePeriod,\\n _timeoutEpochs,\\n _veaInboxArbToEthDevnet,\\n _bridge,\\n _maxMissingBlocks\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xf0e67794da490cd402c9297bc81bae6035da306d2a1b6ca89af9fd8947a55fab\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002a4b38038062002a4b8339810160408190526200003591620002ee565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190528686868686868662000076620000ee565b620000836002886200036c565b60e0819052620000958860026200038f565b620000a19190620003af565b6101005261012051600190620000b890426200036c565b620000c49190620003af565b6001555050600780546001600160a01b0319163317905550620004219a5050505050505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000131573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001579190620003c5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000195573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001bb9190620003ea565b5092505050600454811115620002065760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ce5760065415620002805760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002e957600080fd5b919050565b600080600080600080600060e0888a0312156200030a57600080fd5b875196506020880151955060408801519450606088015193506200033160808901620002d1565b92506200034160a08901620002d1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200038a57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620003a957620003a962000356565b92915050565b81810381811115620003a957620003a962000356565b600060208284031215620003d857600080fd5b620003e382620002d1565b9392505050565b600080600080608085870312156200040157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516124fc6200054f600039600081816104b60152611eb00152600081816104ea01528181610ad7015281816118d801528181611a630152611c6f0152600081816105720152611e4401526000818161051e01528181610afb01528181610e04015281816115d2015281816118fc01528181611a870152611c9301526000818161135f015261149801526000818161130c01526114500152600081816105a6015281816106b2015281816108390152818161086601528181610e47015281816114e801528181611bcd01528181611c340152611dda0152600081816103c70152610be5015260008181610627015281816109bc01528181610b7601528181610c0f015261165301526124fc6000f3fe6080604052600436106101e35760003560e01c80638a619a7111610102578063b633b94411610095578063df19e6ff11610064578063df19e6ff146105e8578063e78cea9214610615578063e813a75514610649578063eedcf2a91461065f57600080fd5b8063b633b94414610540578063c2114a1614610560578063d0e30db014610594578063da2b7bc4146105c857600080fd5b80639588eca2116100d15780639588eca21461048e578063aa22a1c6146104a4578063b044397e146104d8578063b5b7a1841461050c57600080fd5b80638a619a71146104015780638ad3a8f71461042157806390df63b714610441578063930f28af1461046e57600080fd5b806331ddf7431161017a5780634a439cfe116101495780634a439cfe14610360578063541adcca146103805780635f43a47f146103a057806369cd250d146103b557600080fd5b806331ddf743146102e05780633ce43cfd146103005780634788cb381461032057806349b4299e1461034057600080fd5b8063222ae786116101b6578063222ae786146102675780632639c0601461028a57806327ee6bdd146102b757806331d14457146102cd57600080fd5b806301139b68146101e8578063051d1970146101fd5780630c63fa84146102325780630f0adca514610247575b600080fd5b6101fb6101f636600461206a565b610672565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb6108b0565b34801561025357600080fd5b506101fb610262366004612098565b610ad5565b34801561027357600080fd5b5061027c610dfd565b604051908152602001610229565b34801561029657600080fd5b5061027c6102a53660046120cf565b60026020526000908152604090205481565b3480156102c357600080fd5b5061027c60015481565b6101fb6102db3660046120e8565b610e2e565b3480156102ec57600080fd5b506101fb6102fb36600461216b565b610fb5565b34801561030c57600080fd5b506101fb61031b36600461222d565b611255565b34801561032c57600080fd5b506101fb61033b36600461206a565b61139c565b34801561034c57600080fd5b506101fb61035b36600461206a565b611520565b34801561036c57600080fd5b5061027c61037b3660046120cf565b6115cb565b34801561038c57600080fd5b5061027c61039b366004612266565b6115fd565b3480156103ac57600080fd5b506101fb61164f565b3480156103c157600080fd5b506103e97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b34801561040d57600080fd5b506101fb61041c366004612289565b611843565b34801561042d57600080fd5b506007546103e9906001600160a01b031681565b34801561044d57600080fd5b5061027c61045c3660046120cf565b60036020526000908152604090205481565b34801561047a57600080fd5b506101fb61048936600461206a565b6118d6565b34801561049a57600080fd5b5061027c60005481565b3480156104b057600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104e457600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561051857600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054c57600080fd5b506101fb61055b36600461206a565b611a61565b34801561056c57600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a057600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d457600080fd5b506101fb6105e336600461206a565b611c6d565b3480156105f457600080fd5b50610608610603366004612266565b611e26565b60405161022991906122bc565b34801561062157600080fd5b506103e97f000000000000000000000000000000000000000000000000000000000000000081565b34801561065557600080fd5b5061027c60045481565b6101fb61066d3660046120e8565b611eed565b61067b816115fd565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122d6565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a001516002811115610793576107936122a6565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816115fd565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f000000000000000000000000000000000000000000000000000000000000000034612314565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036109175760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b6004546006546109279190612327565b42116109905760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610a07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2b919061233a565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610a68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8c9190612357565b50925050508181036108ac5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610b2857610b2861238d565b04031115610b6b5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610be35760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8f919061233a565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ccc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf0919061233a565b6001600160a01b031614610d3f5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610d4f57508115155b15610d9257600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610d9b816115fd565b60008481526002602052604090205403610df8578051829003610dc457600160a0820152610ddf565b60c08101516001600160a01b031615610ddf57600260a08201525b610de8816115fd565b6000848152600260205260409020555b505050565b6000610e297f0000000000000000000000000000000000000000000000000000000000000000426123a3565b905090565b6007546001600160a01b03163314610e4557600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610eb55760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610ed25760405162461bcd60e51b81526004016106a7906122d6565b60008281526002602052604090205415610f245760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610f6a906115fd565b60008381526002602090815260409182902092909255805184815291820183905233917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910161082f565b60408510610ff75760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b60008484848460405160200161101094939291906123c5565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561109057600088888381811061105257611052612407565b9050602002013590508281111561107757826000528060205260406000209250611087565b8060005282602052604060002092505b50600101611036565b5080600054146110d35760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156111485760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b03891690611178908990899061241d565b6000604051808303816000865af19150503d80600081146111b5576040519150601f19603f3d011682016040523d82523d6000602084013e6111ba565b606091505b505090508061120b5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61126761039b36839003830183612266565b600083815260026020526040902054146112935760405162461bcd60e51b81526004016106a7906122d6565b60026112a560c0830160a0840161242d565b60028111156112b6576112b66122a6565b146112f75760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061135193505060e0840191505060c08301612289565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6113a5816115fd565b600083815260026020526040902054146113d15760405162461bcd60e51b81526004016106a7906122d6565b60018160a0015160028111156113e9576113e96122a6565b146114265760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156114d2576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461153757600080fd5b611540816115fd565b6000838152600260205260409020541461156c5760405162461bcd60e51b81526004016106a7906122d6565b63ffffffff428116606083015243166080820152611589816115fd565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610ac9565b60006115f77f0000000000000000000000000000000000000000000000000000000000000000836123a3565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611632989097969101612448565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156116af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d3919061233a565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611710573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117349190612357565b509250505060045481111561177e5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b60045481101561184057600654156117f25760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6007546001600160a01b0316331461185a57600080fd5b6007546001600160a01b031633146118b45760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119295761192961238d565b0403111561196c5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b611975816115fd565b600083815260026020526040902054146119a15760405162461bcd60e51b81526004016106a7906122d6565b60c08101516001600160a01b0316156119f35760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b600154821115611a3b57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611a4b816115fd565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ab457611ab461238d565b040311611af55760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611afe816115fd565b60008381526002602052604090205414611b2a5760405162461bcd60e51b81526004016106a7906122d6565b60008160a001516002811115611b4257611b426122a6565b14611b815760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b0316611c055760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611c19826115fd565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cc057611cc061238d565b040311611d015760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611d0a816115fd565b60008381526002602052604090205414611d365760405162461bcd60e51b81526004016106a7906122d6565b60008160a001516002811115611d4e57611d4e6122a6565b14611d8d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611e125760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611c19826115fd565b6000816060015163ffffffff16600003611e4257506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7e57506003919050565b6000600c836060015163ffffffff16420381611e9c57611e9c61238d565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ee05760019250611ee5565b600092505b50505b919050565b611ef78282610e2e565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f3e8382611520565b63ffffffff428116606083015243166080820152611f5c83826118d6565b600160a0820152610df8838261139c565b6001600160a01b038116811461184057600080fd5b8035611ee881611f6d565b803563ffffffff81168114611ee857600080fd5b803560038110611ee857600080fd5b600060e08284031215611fc257600080fd5b60405160e0810181811067ffffffffffffffff82111715611ff357634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200960208401611f82565b602082015261201a60408401611f8d565b604082015261202b60608401611f8d565b606082015261203c60808401611f8d565b608082015261204d60a08401611fa1565b60a082015261205e60c08401611f82565b60c08201525092915050565b600080610100838503121561207e57600080fd5b8235915061208f8460208501611fb0565b90509250929050565b600080600061012084860312156120ae57600080fd5b83359250602084013591506120c68560408601611fb0565b90509250925092565b6000602082840312156120e157600080fd5b5035919050565b600080604083850312156120fb57600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee857600080fd5b60008083601f84011261213457600080fd5b50813567ffffffffffffffff81111561214c57600080fd5b60208301915083602082850101111561216457600080fd5b9250929050565b6000806000806000806080878903121561218457600080fd5b863567ffffffffffffffff8082111561219c57600080fd5b818901915089601f8301126121b057600080fd5b8135818111156121bf57600080fd5b8a60208260051b85010111156121d457600080fd5b602083019850809750506121ea60208a0161210a565b95506121f860408a01611f82565b9450606089013591508082111561220e57600080fd5b5061221b89828a01612122565b979a9699509497509295939492505050565b60008082840361010081121561224257600080fd5b8335925060e0601f198201121561225857600080fd5b506020830190509250929050565b600060e0828403121561227857600080fd5b6122828383611fb0565b9392505050565b60006020828403121561229b57600080fd5b813561228281611f6d565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122d0576122d06122a6565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156115f7576115f76122fe565b808201808211156115f7576115f76122fe565b60006020828403121561234c57600080fd5b815161228281611f6d565b6000806000806080858703121561236d57600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b6000826123c057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561243f57600080fd5b61228282611fa1565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124a0576124a06122a6565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212202e6d7450550becfa9dbdb8cdfba00c4bceb171e206d60b855763ac61ae1a6e4f64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101e35760003560e01c80638a619a7111610102578063b633b94411610095578063df19e6ff11610064578063df19e6ff146105e8578063e78cea9214610615578063e813a75514610649578063eedcf2a91461065f57600080fd5b8063b633b94414610540578063c2114a1614610560578063d0e30db014610594578063da2b7bc4146105c857600080fd5b80639588eca2116100d15780639588eca21461048e578063aa22a1c6146104a4578063b044397e146104d8578063b5b7a1841461050c57600080fd5b80638a619a71146104015780638ad3a8f71461042157806390df63b714610441578063930f28af1461046e57600080fd5b806331ddf7431161017a5780634a439cfe116101495780634a439cfe14610360578063541adcca146103805780635f43a47f146103a057806369cd250d146103b557600080fd5b806331ddf743146102e05780633ce43cfd146103005780634788cb381461032057806349b4299e1461034057600080fd5b8063222ae786116101b6578063222ae786146102675780632639c0601461028a57806327ee6bdd146102b757806331d14457146102cd57600080fd5b806301139b68146101e8578063051d1970146101fd5780630c63fa84146102325780630f0adca514610247575b600080fd5b6101fb6101f636600461206a565b610672565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb6108b0565b34801561025357600080fd5b506101fb610262366004612098565b610ad5565b34801561027357600080fd5b5061027c610dfd565b604051908152602001610229565b34801561029657600080fd5b5061027c6102a53660046120cf565b60026020526000908152604090205481565b3480156102c357600080fd5b5061027c60015481565b6101fb6102db3660046120e8565b610e2e565b3480156102ec57600080fd5b506101fb6102fb36600461216b565b610fb5565b34801561030c57600080fd5b506101fb61031b36600461222d565b611255565b34801561032c57600080fd5b506101fb61033b36600461206a565b61139c565b34801561034c57600080fd5b506101fb61035b36600461206a565b611520565b34801561036c57600080fd5b5061027c61037b3660046120cf565b6115cb565b34801561038c57600080fd5b5061027c61039b366004612266565b6115fd565b3480156103ac57600080fd5b506101fb61164f565b3480156103c157600080fd5b506103e97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b34801561040d57600080fd5b506101fb61041c366004612289565b611843565b34801561042d57600080fd5b506007546103e9906001600160a01b031681565b34801561044d57600080fd5b5061027c61045c3660046120cf565b60036020526000908152604090205481565b34801561047a57600080fd5b506101fb61048936600461206a565b6118d6565b34801561049a57600080fd5b5061027c60005481565b3480156104b057600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104e457600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561051857600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054c57600080fd5b506101fb61055b36600461206a565b611a61565b34801561056c57600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a057600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d457600080fd5b506101fb6105e336600461206a565b611c6d565b3480156105f457600080fd5b50610608610603366004612266565b611e26565b60405161022991906122bc565b34801561062157600080fd5b506103e97f000000000000000000000000000000000000000000000000000000000000000081565b34801561065557600080fd5b5061027c60045481565b6101fb61066d3660046120e8565b611eed565b61067b816115fd565b600083815260026020526040902054146106b05760405162461bcd60e51b81526004016106a7906122d6565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107205760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106a7565b60c08101516001600160a01b03161561077b5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106a7565b60008160a001516002811115610793576107936122a6565b146107e05760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106a7565b3360c08201526107ef816115fd565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108ac57600061088b7f000000000000000000000000000000000000000000000000000000000000000034612314565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036109175760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106a7565b6004546006546109279190612327565b42116109905760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106a7565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610a07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2b919061233a565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610a68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8c9190612357565b50925050508181036108ac5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610b2857610b2861238d565b04031115610b6b5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610be35760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106a7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8f919061233a565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ccc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf0919061233a565b6001600160a01b031614610d3f5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106a7565b60015483118015610d4f57508115155b15610d9257600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610d9b816115fd565b60008481526002602052604090205403610df8578051829003610dc457600160a0820152610ddf565b60c08101516001600160a01b031615610ddf57600260a08201525b610de8816115fd565b6000848152600260205260409020555b505050565b6000610e297f0000000000000000000000000000000000000000000000000000000000000000426123a3565b905090565b6007546001600160a01b03163314610e4557600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610eb55760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106a7565b80610ed25760405162461bcd60e51b81526004016106a7906122d6565b60008281526002602052604090205415610f245760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106a7565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610f6a906115fd565b60008381526002602090815260409182902092909255805184815291820183905233917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910161082f565b60408510610ff75760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106a7565b60008484848460405160200161101094939291906123c5565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561109057600088888381811061105257611052612407565b9050602002013590508281111561107757826000528060205260406000209250611087565b8060005282602052604060002092505b50600101611036565b5080600054146110d35760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106a7565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156111485760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106a7565b6000838152600360205260408082206001851b84179055516001600160a01b03891690611178908990899061241d565b6000604051808303816000865af19150503d80600081146111b5576040519150601f19603f3d011682016040523d82523d6000602084013e6111ba565b606091505b505090508061120b5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106a7565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61126761039b36839003830183612266565b600083815260026020526040902054146112935760405162461bcd60e51b81526004016106a7906122d6565b60026112a560c0830160a0840161242d565b60028111156112b6576112b66122a6565b146112f75760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106a7565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061135193505060e0840191505060c08301612289565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6113a5816115fd565b600083815260026020526040902054146113d15760405162461bcd60e51b81526004016106a7906122d6565b60018160a0015160028111156113e9576113e96122a6565b146114265760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106a7565b60008281526002602052604081205560c08101516001600160a01b0316156114d2576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461153757600080fd5b611540816115fd565b6000838152600260205260409020541461156c5760405162461bcd60e51b81526004016106a7906122d6565b63ffffffff428116606083015243166080820152611589816115fd565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610ac9565b60006115f77f0000000000000000000000000000000000000000000000000000000000000000836123a3565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611632989097969101612448565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156116af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d3919061233a565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611710573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117349190612357565b509250505060045481111561177e5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b60045481101561184057600654156117f25760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106a7565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6007546001600160a01b0316331461185a57600080fd5b6007546001600160a01b031633146118b45760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016106a7565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119295761192961238d565b0403111561196c5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106a7565b611975816115fd565b600083815260026020526040902054146119a15760405162461bcd60e51b81526004016106a7906122d6565b60c08101516001600160a01b0316156119f35760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106a7565b600154821115611a3b57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611a4b816115fd565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ab457611ab461238d565b040311611af55760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611afe816115fd565b60008381526002602052604090205414611b2a5760405162461bcd60e51b81526004016106a7906122d6565b60008160a001516002811115611b4257611b426122a6565b14611b815760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60c08101516001600160a01b0316156108ac5760208101516001600160a01b0316611c055760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611c19826115fd565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cc057611cc061238d565b040311611d015760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106a7565b611d0a816115fd565b60008381526002602052604090205414611d365760405162461bcd60e51b81526004016106a7906122d6565b60008160a001516002811115611d4e57611d4e6122a6565b14611d8d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106a7565b60208101516001600160a01b0316156108ac5760c08101516001600160a01b0316611e125760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611c19826115fd565b6000816060015163ffffffff16600003611e4257506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e7e57506003919050565b6000600c836060015163ffffffff16420381611e9c57611e9c61238d565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611ee05760019250611ee5565b600092505b50505b919050565b611ef78282610e2e565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611f3e8382611520565b63ffffffff428116606083015243166080820152611f5c83826118d6565b600160a0820152610df8838261139c565b6001600160a01b038116811461184057600080fd5b8035611ee881611f6d565b803563ffffffff81168114611ee857600080fd5b803560038110611ee857600080fd5b600060e08284031215611fc257600080fd5b60405160e0810181811067ffffffffffffffff82111715611ff357634e487b7160e01b600052604160045260246000fd5b6040528235815290508061200960208401611f82565b602082015261201a60408401611f8d565b604082015261202b60608401611f8d565b606082015261203c60808401611f8d565b608082015261204d60a08401611fa1565b60a082015261205e60c08401611f82565b60c08201525092915050565b600080610100838503121561207e57600080fd5b8235915061208f8460208501611fb0565b90509250929050565b600080600061012084860312156120ae57600080fd5b83359250602084013591506120c68560408601611fb0565b90509250925092565b6000602082840312156120e157600080fd5b5035919050565b600080604083850312156120fb57600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ee857600080fd5b60008083601f84011261213457600080fd5b50813567ffffffffffffffff81111561214c57600080fd5b60208301915083602082850101111561216457600080fd5b9250929050565b6000806000806000806080878903121561218457600080fd5b863567ffffffffffffffff8082111561219c57600080fd5b818901915089601f8301126121b057600080fd5b8135818111156121bf57600080fd5b8a60208260051b85010111156121d457600080fd5b602083019850809750506121ea60208a0161210a565b95506121f860408a01611f82565b9450606089013591508082111561220e57600080fd5b5061221b89828a01612122565b979a9699509497509295939492505050565b60008082840361010081121561224257600080fd5b8335925060e0601f198201121561225857600080fd5b506020830190509250929050565b600060e0828403121561227857600080fd5b6122828383611fb0565b9392505050565b60006020828403121561229b57600080fd5b813561228281611f6d565b634e487b7160e01b600052602160045260246000fd5b60208101600483106122d0576122d06122a6565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156115f7576115f76122fe565b808201808211156115f7576115f76122fe565b60006020828403121561234c57600080fd5b815161228281611f6d565b6000806000806080858703121561236d57600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b6000826123c057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561243f57600080fd5b61228282611fa1565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106124a0576124a06122a6565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212202e6d7450550becfa9dbdb8cdfba00c4bceb171e206d60b855763ac61ae1a6e4f64736f6c63430008120033", + "numDeployments": 8, + "solcInputHash": "74af439f219888d42665a3312cefc0fc", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEthDevnet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositPlusReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_msgId\",\"type\":\"uint256\"}],\"name\":\"isMsgRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRelayed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer delay limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEthDevnet\":\"The address of the inbox contract on Arbitrum.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"isMsgRelayed(uint256)\":{\"details\":\"Get the msg relayed status.\",\"params\":{\"_msgId\":\"The msgId to check.\"},\"returns\":{\"isRelayed\":\"True if the msg was relayed.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":\"VeaOutboxArbToEthDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 public immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 public immutable depositPlusReward; // 2 * deposit - burn\\n\\n address public constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer delay limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updateSequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n unchecked {\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch has not yet passed.\\\");\\n }\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) {\\n status = CensorshipTestStatus.NotStarted;\\n } else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod) {\\n status = CensorshipTestStatus.InProgress;\\n } else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the msg relayed status.\\n /// @param _msgId The msgId to check.\\n /// @return isRelayed True if the msg was relayed.\\n function isMsgRelayed(uint256 _msgId) external view returns(bool isRelayed) {\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1));\\n }\\n}\\n\",\"keccak256\":\"0x9deaca1e49d658f2ec56564a57987e7a711cfb16c43e3f0fb518007b01b21fdf\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToEth/VeaOutboxArbToEth.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Goerli.\\n/// Note: This contract is deployed on Goerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEthDevnet The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEthDevnet,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n )\\n VeaOutboxArbToEth(\\n _deposit,\\n _epochPeriod,\\n _minChallengePeriod,\\n _timeoutEpochs,\\n _veaInboxArbToEthDevnet,\\n _bridge,\\n _maxMissingBlocks\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xf0e67794da490cd402c9297bc81bae6035da306d2a1b6ca89af9fd8947a55fab\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002b7638038062002b768339810160408190526200003591620002ee565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190528686868686868662000076620000ee565b620000836002886200036c565b60e0819052620000958860026200038f565b620000a19190620003af565b6101005261012051600190620000b890426200036c565b620000c49190620003af565b6001555050600780546001600160a01b0319163317905550620004219a5050505050505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000131573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001579190620003c5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000195573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001bb9190620003ea565b5092505050600454811115620002065760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ce5760065415620002805760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002e957600080fd5b919050565b600080600080600080600060e0888a0312156200030a57600080fd5b875196506020880151955060408801519450606088015193506200033160808901620002d1565b92506200034160a08901620002d1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200038a57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620003a957620003a962000356565b92915050565b81810381811115620003a957620003a962000356565b600060208284031215620003d857600080fd5b620003e382620002d1565b9392505050565b600080600080608085870312156200040157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610100516101205161014051610160516101805161260b6200056b6000396000818161055f0152611fbf01526000818161059301528181610b94015281816119e701528181611b720152611d7e01526000818161061b0152611f530152600081816105c701528181610bb801528181610ec1015281816116e101528181611a0b01528181611b960152611da20152600081816104b50152818161146e01526115a70152600081816103a00152818161141b015261155f01526000818161064f01528181610770015281816108f60152818161092301528181610f04015281816110720152818161109f015281816115f701528181611cdc01528181611d430152611ee90152600081816104690152610ca20152600081816106d001528181610a7901528181610c3301528181610ccc0152611762015261260b6000f3fe6080604052600436106102045760003560e01c806369cd250d11610118578063b633b944116100a0578063df19e6ff1161006f578063df19e6ff14610691578063e78cea92146106be578063e813a755146106f2578063eedcf2a914610708578063fccc28131461071b57600080fd5b8063b633b944146105e9578063c2114a1614610609578063d0e30db01461063d578063da2b7bc41461067157600080fd5b8063930f28af116100e7578063930f28af146105175780639588eca214610537578063aa22a1c61461054d578063b044397e14610581578063b5b7a184146105b557600080fd5b806369cd250d14610457578063836e344b146104a35780638a619a71146104d75780638ad3a8f7146104f757600080fd5b806331ddf7431161019b5780634788cb381161016a5780634788cb38146103c257806349b4299e146103e25780634a439cfe14610402578063541adcca146104225780635f43a47f1461044257600080fd5b806331ddf743146103015780633ce43cfd1461032157806343b066d51461034157806344df8e701461038e57600080fd5b8063222ae786116101d7578063222ae786146102885780632639c060146102ab57806327ee6bdd146102d857806331d14457146102ee57600080fd5b806301139b6814610209578063051d19701461021e5780630c63fa84146102535780630f0adca514610268575b600080fd5b61021c610217366004612179565b610730565b005b34801561022a57600080fd5b50600554600654610239919082565b604080519283526020830191909152015b60405180910390f35b34801561025f57600080fd5b5061021c61096d565b34801561027457600080fd5b5061021c6102833660046121a7565b610b92565b34801561029457600080fd5b5061029d610eba565b60405190815260200161024a565b3480156102b757600080fd5b5061029d6102c63660046121de565b60026020526000908152604090205481565b3480156102e457600080fd5b5061029d60015481565b61021c6102fc3660046121f7565b610eeb565b34801561030d57600080fd5b5061021c61031c36600461227a565b6110c4565b34801561032d57600080fd5b5061021c61033c36600461233c565b611364565b34801561034d57600080fd5b5061037e61035c3660046121de565b600881901c600090815260036020526040902054600160ff9092161c81161490565b604051901515815260200161024a565b34801561039a57600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103ce57600080fd5b5061021c6103dd366004612179565b6114ab565b3480156103ee57600080fd5b5061021c6103fd366004612179565b61162f565b34801561040e57600080fd5b5061029d61041d3660046121de565b6116da565b34801561042e57600080fd5b5061029d61043d366004612375565b61170c565b34801561044e57600080fd5b5061021c61175e565b34801561046357600080fd5b5061048b7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161024a565b3480156104af57600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104e357600080fd5b5061021c6104f2366004612398565b611952565b34801561050357600080fd5b5060075461048b906001600160a01b031681565b34801561052357600080fd5b5061021c610532366004612179565b6119e5565b34801561054357600080fd5b5061029d60005481565b34801561055957600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561058d57600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c157600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f557600080fd5b5061021c610604366004612179565b611b70565b34801561061557600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561064957600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561067d57600080fd5b5061021c61068c366004612179565b611d7c565b34801561069d57600080fd5b506106b16106ac366004612375565b611f35565b60405161024a91906123cb565b3480156106ca57600080fd5b5061048b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156106fe57600080fd5b5061029d60045481565b61021c6107163660046121f7565b611ffc565b34801561072757600080fd5b5061048b600081565b6107398161170c565b6000838152600260205260409020541461076e5760405162461bcd60e51b8152600401610765906123e5565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107de5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610765565b60c08101516001600160a01b0316156108395760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610765565b60008160a001516002811115610851576108516123b5565b1461089e5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610765565b3360c08201526108ad8161170c565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156109695760006109487f000000000000000000000000000000000000000000000000000000000000000034612423565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036109d45760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610765565b6004546006546109e49190612436565b4211610a4d5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610765565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610ac4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae89190612449565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610b25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b499190612466565b50925050508181036109695760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610be557610be561249c565b04031115610c285760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610765565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610ca05760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610765565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4c9190612449565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dad9190612449565b6001600160a01b031614610dfc5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610765565b60015483118015610e0c57508115155b15610e4f57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610e588161170c565b60008481526002602052604090205403610eb5578051829003610e8157600160a0820152610e9c565b60c08101516001600160a01b031615610e9c57600260a08201525b610ea58161170c565b6000848152600260205260409020555b505050565b6000610ee67f0000000000000000000000000000000000000000000000000000000000000000426124b2565b905090565b6007546001600160a01b03163314610f0257600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610f725760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610765565b80610f8f5760405162461bcd60e51b8152600401610765906123e5565b60008281526002602052604090205415610fe15760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610765565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526110279061170c565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a37f00000000000000000000000000000000000000000000000000000000000000003411156109695760006109487f000000000000000000000000000000000000000000000000000000000000000034612423565b604085106111065760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610765565b60008484848460405160200161111f94939291906124d4565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561119f57600088888381811061116157611161612516565b9050602002013590508281111561118657826000528060205260406000209250611196565b8060005282602052604060002092505b50600101611145565b5080600054146111e25760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610765565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112575760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610765565b6000838152600360205260408082206001851b84179055516001600160a01b03891690611287908990899061252c565b6000604051808303816000865af19150503d80600081146112c4576040519150601f19603f3d011682016040523d82523d6000602084013e6112c9565b606091505b505090508061131a5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610765565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61137661043d36839003830183612375565b600083815260026020526040902054146113a25760405162461bcd60e51b8152600401610765906123e5565b60026113b460c0830160a0840161253c565b60028111156113c5576113c56123b5565b146114065760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610765565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061146093505060e0840191505060c08301612398565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114b48161170c565b600083815260026020526040902054146114e05760405162461bcd60e51b8152600401610765906123e5565b60018160a0015160028111156114f8576114f86123b5565b146115355760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610765565b60008281526002602052604081205560c08101516001600160a01b0316156115e1576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461164657600080fd5b61164f8161170c565b6000838152600260205260409020541461167b5760405162461bcd60e51b8152600401610765906123e5565b63ffffffff4281166060830152431660808201526116988161170c565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610b86565b60006117067f0000000000000000000000000000000000000000000000000000000000000000836124b2565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611741989097969101612557565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e29190612449565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561181f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118439190612466565b509250505060045481111561188d5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b60045481101561194f57600654156119015760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610765565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6007546001600160a01b0316331461196957600080fd5b6007546001600160a01b031633146119c35760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610765565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a3857611a3861249c565b04031115611a7b5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610765565b611a848161170c565b60008381526002602052604090205414611ab05760405162461bcd60e51b8152600401610765906123e5565b60c08101516001600160a01b031615611b025760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610765565b600154821115611b4a57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b5a8161170c565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bc357611bc361249c565b040311611c045760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610765565b611c0d8161170c565b60008381526002602052604090205414611c395760405162461bcd60e51b8152600401610765906123e5565b60008160a001516002811115611c5157611c516123b5565b14611c905760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610765565b60c08101516001600160a01b0316156109695760208101516001600160a01b0316611d145760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611d288261170c565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611dcf57611dcf61249c565b040311611e105760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610765565b611e198161170c565b60008381526002602052604090205414611e455760405162461bcd60e51b8152600401610765906123e5565b60008160a001516002811115611e5d57611e5d6123b5565b14611e9c5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610765565b60208101516001600160a01b0316156109695760c08101516001600160a01b0316611f215760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611d288261170c565b6000816060015163ffffffff16600003611f5157506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f8d57506003919050565b6000600c836060015163ffffffff16420381611fab57611fab61249c565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611fef5760019250611ff4565b600092505b50505b919050565b6120068282610eeb565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261204d838261162f565b63ffffffff42811660608301524316608082015261206b83826119e5565b600160a0820152610eb583826114ab565b6001600160a01b038116811461194f57600080fd5b8035611ff78161207c565b803563ffffffff81168114611ff757600080fd5b803560038110611ff757600080fd5b600060e082840312156120d157600080fd5b60405160e0810181811067ffffffffffffffff8211171561210257634e487b7160e01b600052604160045260246000fd5b6040528235815290508061211860208401612091565b60208201526121296040840161209c565b604082015261213a6060840161209c565b606082015261214b6080840161209c565b608082015261215c60a084016120b0565b60a082015261216d60c08401612091565b60c08201525092915050565b600080610100838503121561218d57600080fd5b8235915061219e84602085016120bf565b90509250929050565b600080600061012084860312156121bd57600080fd5b83359250602084013591506121d585604086016120bf565b90509250925092565b6000602082840312156121f057600080fd5b5035919050565b6000806040838503121561220a57600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ff757600080fd5b60008083601f84011261224357600080fd5b50813567ffffffffffffffff81111561225b57600080fd5b60208301915083602082850101111561227357600080fd5b9250929050565b6000806000806000806080878903121561229357600080fd5b863567ffffffffffffffff808211156122ab57600080fd5b818901915089601f8301126122bf57600080fd5b8135818111156122ce57600080fd5b8a60208260051b85010111156122e357600080fd5b602083019850809750506122f960208a01612219565b955061230760408a01612091565b9450606089013591508082111561231d57600080fd5b5061232a89828a01612231565b979a9699509497509295939492505050565b60008082840361010081121561235157600080fd5b8335925060e0601f198201121561236757600080fd5b506020830190509250929050565b600060e0828403121561238757600080fd5b61239183836120bf565b9392505050565b6000602082840312156123aa57600080fd5b81356123918161207c565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123df576123df6123b5565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156117065761170661240d565b808201808211156117065761170661240d565b60006020828403121561245b57600080fd5b81516123918161207c565b6000806000806080858703121561247c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b6000826124cf57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561254e57600080fd5b612391826120b0565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106125af576125af6123b5565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220c4b955f1fbcb64c303e3df8d95b173141d12289c7037bc602bdfdae9a4b9532b64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106102045760003560e01c806369cd250d11610118578063b633b944116100a0578063df19e6ff1161006f578063df19e6ff14610691578063e78cea92146106be578063e813a755146106f2578063eedcf2a914610708578063fccc28131461071b57600080fd5b8063b633b944146105e9578063c2114a1614610609578063d0e30db01461063d578063da2b7bc41461067157600080fd5b8063930f28af116100e7578063930f28af146105175780639588eca214610537578063aa22a1c61461054d578063b044397e14610581578063b5b7a184146105b557600080fd5b806369cd250d14610457578063836e344b146104a35780638a619a71146104d75780638ad3a8f7146104f757600080fd5b806331ddf7431161019b5780634788cb381161016a5780634788cb38146103c257806349b4299e146103e25780634a439cfe14610402578063541adcca146104225780635f43a47f1461044257600080fd5b806331ddf743146103015780633ce43cfd1461032157806343b066d51461034157806344df8e701461038e57600080fd5b8063222ae786116101d7578063222ae786146102885780632639c060146102ab57806327ee6bdd146102d857806331d14457146102ee57600080fd5b806301139b6814610209578063051d19701461021e5780630c63fa84146102535780630f0adca514610268575b600080fd5b61021c610217366004612179565b610730565b005b34801561022a57600080fd5b50600554600654610239919082565b604080519283526020830191909152015b60405180910390f35b34801561025f57600080fd5b5061021c61096d565b34801561027457600080fd5b5061021c6102833660046121a7565b610b92565b34801561029457600080fd5b5061029d610eba565b60405190815260200161024a565b3480156102b757600080fd5b5061029d6102c63660046121de565b60026020526000908152604090205481565b3480156102e457600080fd5b5061029d60015481565b61021c6102fc3660046121f7565b610eeb565b34801561030d57600080fd5b5061021c61031c36600461227a565b6110c4565b34801561032d57600080fd5b5061021c61033c36600461233c565b611364565b34801561034d57600080fd5b5061037e61035c3660046121de565b600881901c600090815260036020526040902054600160ff9092161c81161490565b604051901515815260200161024a565b34801561039a57600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103ce57600080fd5b5061021c6103dd366004612179565b6114ab565b3480156103ee57600080fd5b5061021c6103fd366004612179565b61162f565b34801561040e57600080fd5b5061029d61041d3660046121de565b6116da565b34801561042e57600080fd5b5061029d61043d366004612375565b61170c565b34801561044e57600080fd5b5061021c61175e565b34801561046357600080fd5b5061048b7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161024a565b3480156104af57600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104e357600080fd5b5061021c6104f2366004612398565b611952565b34801561050357600080fd5b5060075461048b906001600160a01b031681565b34801561052357600080fd5b5061021c610532366004612179565b6119e5565b34801561054357600080fd5b5061029d60005481565b34801561055957600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561058d57600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c157600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f557600080fd5b5061021c610604366004612179565b611b70565b34801561061557600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561064957600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561067d57600080fd5b5061021c61068c366004612179565b611d7c565b34801561069d57600080fd5b506106b16106ac366004612375565b611f35565b60405161024a91906123cb565b3480156106ca57600080fd5b5061048b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156106fe57600080fd5b5061029d60045481565b61021c6107163660046121f7565b611ffc565b34801561072757600080fd5b5061048b600081565b6107398161170c565b6000838152600260205260409020541461076e5760405162461bcd60e51b8152600401610765906123e5565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107de5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610765565b60c08101516001600160a01b0316156108395760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610765565b60008160a001516002811115610851576108516123b5565b1461089e5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610765565b3360c08201526108ad8161170c565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156109695760006109487f000000000000000000000000000000000000000000000000000000000000000034612423565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036109d45760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610765565b6004546006546109e49190612436565b4211610a4d5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610765565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610ac4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae89190612449565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610b25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b499190612466565b50925050508181036109695760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610be557610be561249c565b04031115610c285760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610765565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610ca05760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610765565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4c9190612449565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dad9190612449565b6001600160a01b031614610dfc5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610765565b60015483118015610e0c57508115155b15610e4f57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610e588161170c565b60008481526002602052604090205403610eb5578051829003610e8157600160a0820152610e9c565b60c08101516001600160a01b031615610e9c57600260a08201525b610ea58161170c565b6000848152600260205260409020555b505050565b6000610ee67f0000000000000000000000000000000000000000000000000000000000000000426124b2565b905090565b6007546001600160a01b03163314610f0257600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610f725760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610765565b80610f8f5760405162461bcd60e51b8152600401610765906123e5565b60008281526002602052604090205415610fe15760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610765565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526110279061170c565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a37f00000000000000000000000000000000000000000000000000000000000000003411156109695760006109487f000000000000000000000000000000000000000000000000000000000000000034612423565b604085106111065760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610765565b60008484848460405160200161111f94939291906124d4565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561119f57600088888381811061116157611161612516565b9050602002013590508281111561118657826000528060205260406000209250611196565b8060005282602052604060002092505b50600101611145565b5080600054146111e25760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610765565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112575760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610765565b6000838152600360205260408082206001851b84179055516001600160a01b03891690611287908990899061252c565b6000604051808303816000865af19150503d80600081146112c4576040519150601f19603f3d011682016040523d82523d6000602084013e6112c9565b606091505b505090508061131a5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610765565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61137661043d36839003830183612375565b600083815260026020526040902054146113a25760405162461bcd60e51b8152600401610765906123e5565b60026113b460c0830160a0840161253c565b60028111156113c5576113c56123b5565b146114065760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610765565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061146093505060e0840191505060c08301612398565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114b48161170c565b600083815260026020526040902054146114e05760405162461bcd60e51b8152600401610765906123e5565b60018160a0015160028111156114f8576114f86123b5565b146115355760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610765565b60008281526002602052604081205560c08101516001600160a01b0316156115e1576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461164657600080fd5b61164f8161170c565b6000838152600260205260409020541461167b5760405162461bcd60e51b8152600401610765906123e5565b63ffffffff4281166060830152431660808201526116988161170c565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610b86565b60006117067f0000000000000000000000000000000000000000000000000000000000000000836124b2565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611741989097969101612557565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e29190612449565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561181f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118439190612466565b509250505060045481111561188d5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b60045481101561194f57600654156119015760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610765565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6007546001600160a01b0316331461196957600080fd5b6007546001600160a01b031633146119c35760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610765565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a3857611a3861249c565b04031115611a7b5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610765565b611a848161170c565b60008381526002602052604090205414611ab05760405162461bcd60e51b8152600401610765906123e5565b60c08101516001600160a01b031615611b025760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610765565b600154821115611b4a57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b5a8161170c565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bc357611bc361249c565b040311611c045760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610765565b611c0d8161170c565b60008381526002602052604090205414611c395760405162461bcd60e51b8152600401610765906123e5565b60008160a001516002811115611c5157611c516123b5565b14611c905760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610765565b60c08101516001600160a01b0316156109695760208101516001600160a01b0316611d145760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611d288261170c565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611dcf57611dcf61249c565b040311611e105760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610765565b611e198161170c565b60008381526002602052604090205414611e455760405162461bcd60e51b8152600401610765906123e5565b60008160a001516002811115611e5d57611e5d6123b5565b14611e9c5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610765565b60208101516001600160a01b0316156109695760c08101516001600160a01b0316611f215760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611d288261170c565b6000816060015163ffffffff16600003611f5157506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f8d57506003919050565b6000600c836060015163ffffffff16420381611fab57611fab61249c565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611fef5760019250611ff4565b600092505b50505b919050565b6120068282610eeb565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261204d838261162f565b63ffffffff42811660608301524316608082015261206b83826119e5565b600160a0820152610eb583826114ab565b6001600160a01b038116811461194f57600080fd5b8035611ff78161207c565b803563ffffffff81168114611ff757600080fd5b803560038110611ff757600080fd5b600060e082840312156120d157600080fd5b60405160e0810181811067ffffffffffffffff8211171561210257634e487b7160e01b600052604160045260246000fd5b6040528235815290508061211860208401612091565b60208201526121296040840161209c565b604082015261213a6060840161209c565b606082015261214b6080840161209c565b608082015261215c60a084016120b0565b60a082015261216d60c08401612091565b60c08201525092915050565b600080610100838503121561218d57600080fd5b8235915061219e84602085016120bf565b90509250929050565b600080600061012084860312156121bd57600080fd5b83359250602084013591506121d585604086016120bf565b90509250925092565b6000602082840312156121f057600080fd5b5035919050565b6000806040838503121561220a57600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ff757600080fd5b60008083601f84011261224357600080fd5b50813567ffffffffffffffff81111561225b57600080fd5b60208301915083602082850101111561227357600080fd5b9250929050565b6000806000806000806080878903121561229357600080fd5b863567ffffffffffffffff808211156122ab57600080fd5b818901915089601f8301126122bf57600080fd5b8135818111156122ce57600080fd5b8a60208260051b85010111156122e357600080fd5b602083019850809750506122f960208a01612219565b955061230760408a01612091565b9450606089013591508082111561231d57600080fd5b5061232a89828a01612231565b979a9699509497509295939492505050565b60008082840361010081121561235157600080fd5b8335925060e0601f198201121561236757600080fd5b506020830190509250929050565b600060e0828403121561238757600080fd5b61239183836120bf565b9392505050565b6000602082840312156123aa57600080fd5b81356123918161207c565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123df576123df6123b5565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156117065761170661240d565b808201808211156117065761170661240d565b60006020828403121561245b57600080fd5b81516123918161207c565b6000806000806080858703121561247c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b6000826124cf57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561254e57600080fd5b612391826120b0565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106125af576125af6123b5565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220c4b955f1fbcb64c303e3df8d95b173141d12289c7037bc602bdfdae9a4b9532b64736f6c63430008120033", "devdoc": { "details": "Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).", "events": { @@ -1196,6 +1235,15 @@ "hashedClaim": "The hash of the claim." } }, + "isMsgRelayed(uint256)": { + "details": "Get the msg relayed status.", + "params": { + "_msgId": "The msgId to check." + }, + "returns": { + "isRelayed": "True if the msg was relayed." + } + }, "resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Resolves any challenge of the optimistic claim for '_epoch'.", "params": { @@ -1273,7 +1321,7 @@ "storageLayout": { "storage": [ { - "astId": 38, + "astId": 446, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "stateRoot", "offset": 0, @@ -1281,7 +1329,7 @@ "type": "t_bytes32" }, { - "astId": 40, + "astId": 448, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "latestVerifiedEpoch", "offset": 0, @@ -1289,7 +1337,7 @@ "type": "t_uint256" }, { - "astId": 44, + "astId": 452, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "claimHashes", "offset": 0, @@ -1297,7 +1345,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 48, + "astId": 456, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "relayed", "offset": 0, @@ -1305,7 +1353,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 50, + "astId": 458, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "sequencerDelayLimit", "offset": 0, @@ -1313,15 +1361,15 @@ "type": "t_uint256" }, { - "astId": 53, + "astId": 461, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "5", - "type": "t_struct(SequencerDelayLimitDecreaseRequest)58_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)466_storage" }, { - "astId": 2895, + "astId": 3775, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "devnetOperator", "offset": 0, @@ -1347,12 +1395,12 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_struct(SequencerDelayLimitDecreaseRequest)58_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)466_storage": { "encoding": "inplace", "label": "struct VeaOutboxArbToEth.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 55, + "astId": 463, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "requestedsequencerDelayLimit", "offset": 0, @@ -1360,7 +1408,7 @@ "type": "t_uint256" }, { - "astId": 57, + "astId": 465, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json b/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json index 6aff1044..2ea7dcb3 100644 --- a/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json +++ b/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x356f5D0756ab15C819015960C355386d0367d545", + "address": "0x4738A566706eDd30Fe175e20eDDd21c5c7bD79Ea", "abi": [ { "inputs": [ @@ -71,7 +71,7 @@ "type": "address" }, { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "_epoch", "type": "uint256" @@ -151,6 +151,19 @@ "name": "sequencerDelayLimitUpdated", "type": "event" }, + { + "inputs": [], + "name": "BURN_ADDRESS", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "bridge", @@ -164,6 +177,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "burn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -325,6 +351,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "depositPlusReward", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -434,21 +473,27 @@ "type": "function" }, { - "inputs": [], - "name": "latestVerifiedEpoch", - "outputs": [ + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "_msgId", "type": "uint256" } ], + "name": "isMsgRelayed", + "outputs": [ + { + "internalType": "bool", + "name": "isRelayed", + "type": "bool" + } + ], "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "maxMissingBlocks", + "name": "latestVerifiedEpoch", "outputs": [ { "internalType": "uint256", @@ -461,7 +506,7 @@ }, { "inputs": [], - "name": "minChallengePeriod", + "name": "maxMissingBlocks", "outputs": [ { "internalType": "uint256", @@ -473,21 +518,15 @@ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "minChallengePeriod", + "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], - "name": "relayed", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], "stateMutability": "view", "type": "function" }, @@ -987,32 +1026,32 @@ "type": "function" } ], - "transactionHash": "0x1d51029e1f031dec99caf6009ae4cd59eaa9343ff53540f5af14bd056e0a28e9", + "transactionHash": "0x2ef9aacf6ffb63f19d6abe870c39d41db1a9140d2d369e667479144f70e4a427", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x356f5D0756ab15C819015960C355386d0367d545", - "transactionIndex": 39, - "gasUsed": "2211392", - "logsBloom": "0x00000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000020001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7d3ee96bbeda92130c5b387602ca3ea420c0ad1b0ba3d98c88d20d9772065985", - "transactionHash": "0x1d51029e1f031dec99caf6009ae4cd59eaa9343ff53540f5af14bd056e0a28e9", + "contractAddress": "0x4738A566706eDd30Fe175e20eDDd21c5c7bD79Ea", + "transactionIndex": 31, + "gasUsed": "2268143", + "logsBloom": "0x00000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000010400000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x16ce36d77e126d8c8b4bdb9e48a255ae7947be6ed0ec6d11d78ea70acc26fd27", + "transactionHash": "0x2ef9aacf6ffb63f19d6abe870c39d41db1a9140d2d369e667479144f70e4a427", "logs": [ { - "transactionIndex": 39, - "blockNumber": 9254610, - "transactionHash": "0x1d51029e1f031dec99caf6009ae4cd59eaa9343ff53540f5af14bd056e0a28e9", - "address": "0x356f5D0756ab15C819015960C355386d0367d545", + "transactionIndex": 31, + "blockNumber": 9265276, + "transactionHash": "0x2ef9aacf6ffb63f19d6abe870c39d41db1a9140d2d369e667479144f70e4a427", + "address": "0x4738A566706eDd30Fe175e20eDDd21c5c7bD79Ea", "topics": [ "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 102, - "blockHash": "0x7d3ee96bbeda92130c5b387602ca3ea420c0ad1b0ba3d98c88d20d9772065985" + "logIndex": 70, + "blockHash": "0x16ce36d77e126d8c8b4bdb9e48a255ae7947be6ed0ec6d11d78ea70acc26fd27" } ], - "blockNumber": 9254610, - "cumulativeGasUsed": "12171356", + "blockNumber": 9265276, + "cumulativeGasUsed": "5796774", "status": 1, "byzantium": true }, @@ -1021,15 +1060,15 @@ 7200, 10800, 1000000, - "0xB00b74346d6cb2440F71cc3Fb19Cd2B50450571E", + "0x0c45C5A1925085fF0672C1052f0b79D5e3ac2A78", "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", 1000000 ], - "numDeployments": 3, - "solcInputHash": "6b0b750c6eee9aa0a5e450d1f0bbb2d2", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"relayed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer delay limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEth\":\"The address of the inbox contract on Arbitrum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":\"VeaOutboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 internal immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 internal immutable depositPlusReward; // 2 * deposit - burn\\n\\n address internal constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer delay limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updateSequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch has not yet passed.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp >= uint256(_claim.timestampClaimed) + sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted;\\n else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod)\\n status = CensorshipTestStatus.InProgress;\\n else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0xe9d526edd46c7639759b1a7bd8d2f218ce5716f07638b2a8743ab5119b62ee35\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002ab038038062002ab08339810160408190526200003591620002ce565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190526200006f620000ce565b6200007c6002886200034c565b60e08190526200008e8860026200036f565b6200009a91906200038f565b6101005261012051600190620000b190426200034c565b620000bd91906200038f565b600155506200040195505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000111573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001379190620003a5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200019b9190620003ca565b5092505050600454811115620001e65760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ae5760065415620002605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002c957600080fd5b919050565b600080600080600080600060e0888a031215620002ea57600080fd5b875196506020880151955060408801519450606088015193506200031160808901620002b1565b92506200032160a08901620002b1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200036a57634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000389576200038962000336565b92915050565b8181038181111562000389576200038962000336565b600060208284031215620003b857600080fd5b620003c382620002b1565b9392505050565b60008060008060808587031215620003e157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610100516101205161014051610160516101805161257a62000536600039600081816104550152611fae01526000818161048901528181610a620152818161196d01528181611b610152611d6d0152600081816105110152611f420152600081816104bd01528181610a8601528181610d8f01528181610e3001528181611540015281816116fa0152818161199101528181611b850152611d910152600061135701526000818161130401526114690152600081816105450152818161063e015281816107c5015281816107f201528181610dbb015281816114cc01528181611ccb01528181611d320152611ed80152600081816103a60152610b700152600081816105c60152818161094801528181610b0101528181610b9a015261177b015261257a6000f3fe6080604052600436106101c25760003560e01c80635f43a47f116100f7578063b5b7a18411610095578063da2b7bc411610064578063da2b7bc414610567578063df19e6ff14610587578063e78cea92146105b4578063e813a755146105e857600080fd5b8063b5b7a184146104ab578063b633b944146104df578063c2114a16146104ff578063d0e30db01461053357600080fd5b8063930f28af116100d1578063930f28af1461040d5780639588eca21461042d578063aa22a1c614610443578063b044397e1461047757600080fd5b80635f43a47f1461037f57806369cd250d1461039457806390df63b7146103e057600080fd5b806331d14457116101645780634788cb381161013e5780634788cb38146102ff57806349b4299e1461031f5780634a439cfe1461033f578063541adcca1461035f57600080fd5b806331d14457146102ac57806331ddf743146102bf5780633ce43cfd146102df57600080fd5b80630f0adca5116101a05780630f0adca514610226578063222ae786146102465780632639c0601461026957806327ee6bdd1461029657600080fd5b806301139b68146101c7578063051d1970146101dc5780630c63fa8414610211575b600080fd5b6101da6101d53660046120e8565b6105fe565b005b3480156101e857600080fd5b506005546006546101f7919082565b604080519283526020830191909152015b60405180910390f35b34801561021d57600080fd5b506101da61083c565b34801561023257600080fd5b506101da610241366004612116565b610a60565b34801561025257600080fd5b5061025b610d88565b604051908152602001610208565b34801561027557600080fd5b5061025b61028436600461214d565b60026020526000908152604090205481565b3480156102a257600080fd5b5061025b60015481565b6101da6102ba366004612166565b610db9565b3480156102cb57600080fd5b506101da6102da3660046121e9565b610fad565b3480156102eb57600080fd5b506101da6102fa3660046122ab565b61124d565b34801561030b57600080fd5b506101da61031a3660046122ab565b611394565b34801561032b57600080fd5b506101da61033a3660046120e8565b611509565b34801561034b57600080fd5b5061025b61035a36600461214d565b6116f3565b34801561036b57600080fd5b5061025b61037a3660046122e4565b611725565b34801561038b57600080fd5b506101da611777565b3480156103a057600080fd5b506103c87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610208565b3480156103ec57600080fd5b5061025b6103fb36600461214d565b60036020526000908152604090205481565b34801561041957600080fd5b506101da6104283660046120e8565b61196b565b34801561043957600080fd5b5061025b60005481565b34801561044f57600080fd5b5061025b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561048357600080fd5b5061025b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104b757600080fd5b5061025b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104eb57600080fd5b506101da6104fa3660046120e8565b611b5f565b34801561050b57600080fd5b5061025b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561053f57600080fd5b5061025b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561057357600080fd5b506101da6105823660046120e8565b611d6b565b34801561059357600080fd5b506105a76105a23660046122e4565b611f24565b604051610208919061231d565b3480156105c057600080fd5b506103c87f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f457600080fd5b5061025b60045481565b61060781611725565b6000838152600260205260409020541461063c5760405162461bcd60e51b815260040161063390612337565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f612307565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b81611725565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f000000000000000000000000000000000000000000000000000000000000000034612375565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036108a35760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b6004546006546108b39190612388565b421161091c5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610993573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b7919061239b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156109f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1891906123b8565b50925050508181036108385760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610ab357610ab36123ee565b04031115610af65760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b6e5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bf6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1a919061239b565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7b919061239b565b6001600160a01b031614610cca5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610cda57508115155b15610d1d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610d2681611725565b60008481526002602052604090205403610d83578051829003610d4f57600160a0820152610d6a565b60c08101516001600160a01b031615610d6a57600260a08201525b610d7381611725565b6000848152600260205260409020555b505050565b6000610db47f000000000000000000000000000000000000000000000000000000000000000042612404565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610e295760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b6001610e557f000000000000000000000000000000000000000000000000000000000000000042612404565b610e5f9190612375565b8214610ead5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b80610eca5760405162461bcd60e51b815260040161063390612337565b60008281526002602052604090205415610f1c5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610f6290611725565b60008381526002602090815260409182902092909255805184815291820183905233917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d5791016107bb565b60408510610fef5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b6000848484846040516020016110089493929190612426565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561108857600088888381811061104a5761104a612468565b9050602002013590508281111561106f5782600052806020526040600020925061107f565b8060005282602052604060002092505b5060010161102e565b5080600054146110cb5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156111405760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b03891690611170908990899061247e565b6000604051808303816000865af19150503d80600081146111ad576040519150601f19603f3d011682016040523d82523d6000602084013e6111b2565b606091505b50509050806112035760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61125f61037a368390038301836122e4565b6000838152600260205260409020541461128b5760405162461bcd60e51b815260040161063390612337565b600261129d60c0830160a0840161248e565b60028111156112ae576112ae612307565b146112ef5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061134993505060e0840191505060c083016124a9565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6113a661037a368390038301836122e4565b600083815260026020526040902054146113d25760405162461bcd60e51b815260040161063390612337565b60016113e460c0830160a0840161248e565b60028111156113f5576113f5612307565b146114325760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b600082815260026020526040812081905561145360e0830160c084016124a9565b6001600160a01b0316146114ae576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061134993505060408401915050602083016124a9565b6114be60408201602083016124a9565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61151281611725565b6000838152600260205260409020541461153e5760405162461bcd60e51b815260040161063390612337565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166115779190612388565b6115819190612388565b4210156115e55760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b60006115f082611f24565b9050600281600381111561160657611606612307565b14806116235750600081600381111561162157611621612307565b145b61168c5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526116a982611725565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b600061171f7f000000000000000000000000000000000000000000000000000000000000000083612404565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861175a9890979691016124c6565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117fb919061239b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611838573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185c91906123b8565b50925050506004548111156118a65760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015611968576006541561191a5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119be576119be6123ee565b04031115611a015760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b611a0a81611725565b60008381526002602052604090205414611a365760405162461bcd60e51b815260040161063390612337565b60c08101516001600160a01b031615611a885760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b6001611a9382611f24565b6003811115611aa457611aa4612307565b14611af15760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b600154821115611b3957600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b4981611725565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bb257611bb26123ee565b040311611bf35760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611bfc81611725565b60008381526002602052604090205414611c285760405162461bcd60e51b815260040161063390612337565b60008160a001516002811115611c4057611c40612307565b14611c7f5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611d035760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611d1782611725565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611dbe57611dbe6123ee565b040311611dff5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611e0881611725565b60008381526002602052604090205414611e345760405162461bcd60e51b815260040161063390612337565b60008160a001516002811115611e4c57611e4c612307565b14611e8b5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611f105760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611d1782611725565b6000816060015163ffffffff16600003611f4057506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f7c57506003919050565b6000600c836060015163ffffffff16420381611f9a57611f9a6123ee565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611fde5760019250611fe3565b600092505b50505b919050565b6001600160a01b038116811461196857600080fd5b8035611fe681611feb565b803563ffffffff81168114611fe657600080fd5b803560038110611fe657600080fd5b600060e0828403121561204057600080fd5b60405160e0810181811067ffffffffffffffff8211171561207157634e487b7160e01b600052604160045260246000fd5b6040528235815290508061208760208401612000565b60208201526120986040840161200b565b60408201526120a96060840161200b565b60608201526120ba6080840161200b565b60808201526120cb60a0840161201f565b60a08201526120dc60c08401612000565b60c08201525092915050565b60008061010083850312156120fc57600080fd5b8235915061210d846020850161202e565b90509250929050565b6000806000610120848603121561212c57600080fd5b8335925060208401359150612144856040860161202e565b90509250925092565b60006020828403121561215f57600080fd5b5035919050565b6000806040838503121561217957600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611fe657600080fd5b60008083601f8401126121b257600080fd5b50813567ffffffffffffffff8111156121ca57600080fd5b6020830191508360208285010111156121e257600080fd5b9250929050565b6000806000806000806080878903121561220257600080fd5b863567ffffffffffffffff8082111561221a57600080fd5b818901915089601f83011261222e57600080fd5b81358181111561223d57600080fd5b8a60208260051b850101111561225257600080fd5b6020830198508097505061226860208a01612188565b955061227660408a01612000565b9450606089013591508082111561228c57600080fd5b5061229989828a016121a0565b979a9699509497509295939492505050565b6000808284036101008112156122c057600080fd5b8335925060e0601f19820112156122d657600080fd5b506020830190509250929050565b600060e082840312156122f657600080fd5b612300838361202e565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061233157612331612307565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561171f5761171f61235f565b8082018082111561171f5761171f61235f565b6000602082840312156123ad57600080fd5b815161230081611feb565b600080600080608085870312156123ce57600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b60008261242157634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156124a057600080fd5b6123008261201f565b6000602082840312156124bb57600080fd5b813561230081611feb565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061251e5761251e612307565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212207649f9a69b696b8730d8471aecbf81907f8429893834f7171be4b946fa84812d64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101c25760003560e01c80635f43a47f116100f7578063b5b7a18411610095578063da2b7bc411610064578063da2b7bc414610567578063df19e6ff14610587578063e78cea92146105b4578063e813a755146105e857600080fd5b8063b5b7a184146104ab578063b633b944146104df578063c2114a16146104ff578063d0e30db01461053357600080fd5b8063930f28af116100d1578063930f28af1461040d5780639588eca21461042d578063aa22a1c614610443578063b044397e1461047757600080fd5b80635f43a47f1461037f57806369cd250d1461039457806390df63b7146103e057600080fd5b806331d14457116101645780634788cb381161013e5780634788cb38146102ff57806349b4299e1461031f5780634a439cfe1461033f578063541adcca1461035f57600080fd5b806331d14457146102ac57806331ddf743146102bf5780633ce43cfd146102df57600080fd5b80630f0adca5116101a05780630f0adca514610226578063222ae786146102465780632639c0601461026957806327ee6bdd1461029657600080fd5b806301139b68146101c7578063051d1970146101dc5780630c63fa8414610211575b600080fd5b6101da6101d53660046120e8565b6105fe565b005b3480156101e857600080fd5b506005546006546101f7919082565b604080519283526020830191909152015b60405180910390f35b34801561021d57600080fd5b506101da61083c565b34801561023257600080fd5b506101da610241366004612116565b610a60565b34801561025257600080fd5b5061025b610d88565b604051908152602001610208565b34801561027557600080fd5b5061025b61028436600461214d565b60026020526000908152604090205481565b3480156102a257600080fd5b5061025b60015481565b6101da6102ba366004612166565b610db9565b3480156102cb57600080fd5b506101da6102da3660046121e9565b610fad565b3480156102eb57600080fd5b506101da6102fa3660046122ab565b61124d565b34801561030b57600080fd5b506101da61031a3660046122ab565b611394565b34801561032b57600080fd5b506101da61033a3660046120e8565b611509565b34801561034b57600080fd5b5061025b61035a36600461214d565b6116f3565b34801561036b57600080fd5b5061025b61037a3660046122e4565b611725565b34801561038b57600080fd5b506101da611777565b3480156103a057600080fd5b506103c87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610208565b3480156103ec57600080fd5b5061025b6103fb36600461214d565b60036020526000908152604090205481565b34801561041957600080fd5b506101da6104283660046120e8565b61196b565b34801561043957600080fd5b5061025b60005481565b34801561044f57600080fd5b5061025b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561048357600080fd5b5061025b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104b757600080fd5b5061025b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104eb57600080fd5b506101da6104fa3660046120e8565b611b5f565b34801561050b57600080fd5b5061025b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561053f57600080fd5b5061025b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561057357600080fd5b506101da6105823660046120e8565b611d6b565b34801561059357600080fd5b506105a76105a23660046122e4565b611f24565b604051610208919061231d565b3480156105c057600080fd5b506103c87f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f457600080fd5b5061025b60045481565b61060781611725565b6000838152600260205260409020541461063c5760405162461bcd60e51b815260040161063390612337565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156106ac5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610633565b60c08101516001600160a01b0316156107075760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610633565b60008160a00151600281111561071f5761071f612307565b1461076c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610633565b3360c082015261077b81611725565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d791015b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108385760006108177f000000000000000000000000000000000000000000000000000000000000000034612375565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036108a35760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610633565b6004546006546108b39190612388565b421161091c5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610633565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610993573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b7919061239b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156109f4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1891906123b8565b50925050508181036108385760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610ab357610ab36123ee565b04031115610af65760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b6e5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610633565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bf6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1a919061239b565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7b919061239b565b6001600160a01b031614610cca5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610633565b60015483118015610cda57508115155b15610d1d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610d2681611725565b60008481526002602052604090205403610d83578051829003610d4f57600160a0820152610d6a565b60c08101516001600160a01b031615610d6a57600260a08201525b610d7381611725565b6000848152600260205260409020555b505050565b6000610db47f000000000000000000000000000000000000000000000000000000000000000042612404565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610e295760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610633565b6001610e557f000000000000000000000000000000000000000000000000000000000000000042612404565b610e5f9190612375565b8214610ead5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e000000000000006044820152606401610633565b80610eca5760405162461bcd60e51b815260040161063390612337565b60008281526002602052604090205415610f1c5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610633565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610f6290611725565b60008381526002602090815260409182902092909255805184815291820183905233917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d5791016107bb565b60408510610fef5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610633565b6000848484846040516020016110089493929190612426565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561108857600088888381811061104a5761104a612468565b9050602002013590508281111561106f5782600052806020526040600020925061107f565b8060005282602052604060002092505b5060010161102e565b5080600054146110cb5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610633565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156111405760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610633565b6000838152600360205260408082206001851b84179055516001600160a01b03891690611170908990899061247e565b6000604051808303816000865af19150503d80600081146111ad576040519150601f19603f3d011682016040523d82523d6000602084013e6111b2565b606091505b50509050806112035760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610633565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61125f61037a368390038301836122e4565b6000838152600260205260409020541461128b5760405162461bcd60e51b815260040161063390612337565b600261129d60c0830160a0840161248e565b60028111156112ae576112ae612307565b146112ef5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610633565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061134993505060e0840191505060c083016124a9565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6113a661037a368390038301836122e4565b600083815260026020526040902054146113d25760405162461bcd60e51b815260040161063390612337565b60016113e460c0830160a0840161248e565b60028111156113f5576113f5612307565b146114325760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610633565b600082815260026020526040812081905561145360e0830160c084016124a9565b6001600160a01b0316146114ae576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061134993505060408401915050602083016124a9565b6114be60408201602083016124a9565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61151281611725565b6000838152600260205260409020541461153e5760405162461bcd60e51b815260040161063390612337565b7f0000000000000000000000000000000000000000000000000000000000000000600454826040015163ffffffff166115779190612388565b6115819190612388565b4210156115e55760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b6064820152608401610633565b60006115f082611f24565b9050600281600381111561160657611606612307565b14806116235750600081600381111561162157611621612307565b145b61168c5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b6064820152608401610633565b63ffffffff4281166060840152431660808301526116a982611725565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b600061171f7f000000000000000000000000000000000000000000000000000000000000000083612404565b92915050565b80516020808301516040808501516060860151608087015160a088015160c0890151945160009861175a9890979691016124c6565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117fb919061239b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611838573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185c91906123b8565b50925050506004548111156118a65760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015611968576006541561191a5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610633565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119be576119be6123ee565b04031115611a015760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610633565b611a0a81611725565b60008381526002602052604090205414611a365760405162461bcd60e51b815260040161063390612337565b60c08101516001600160a01b031615611a885760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610633565b6001611a9382611f24565b6003811115611aa457611aa4612307565b14611af15760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e00000000006044820152606401610633565b600154821115611b3957600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b4981611725565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bb257611bb26123ee565b040311611bf35760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611bfc81611725565b60008381526002602052604090205414611c285760405162461bcd60e51b815260040161063390612337565b60008160a001516002811115611c4057611c40612307565b14611c7f5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60c08101516001600160a01b0316156108385760208101516001600160a01b0316611d035760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611d1782611725565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611dbe57611dbe6123ee565b040311611dff5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610633565b611e0881611725565b60008381526002602052604090205414611e345760405162461bcd60e51b815260040161063390612337565b60008160a001516002811115611e4c57611e4c612307565b14611e8b5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610633565b60208101516001600160a01b0316156108385760c08101516001600160a01b0316611f105760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611d1782611725565b6000816060015163ffffffff16600003611f4057506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f7c57506003919050565b6000600c836060015163ffffffff16420381611f9a57611f9a6123ee565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611fde5760019250611fe3565b600092505b50505b919050565b6001600160a01b038116811461196857600080fd5b8035611fe681611feb565b803563ffffffff81168114611fe657600080fd5b803560038110611fe657600080fd5b600060e0828403121561204057600080fd5b60405160e0810181811067ffffffffffffffff8211171561207157634e487b7160e01b600052604160045260246000fd5b6040528235815290508061208760208401612000565b60208201526120986040840161200b565b60408201526120a96060840161200b565b60608201526120ba6080840161200b565b60808201526120cb60a0840161201f565b60a08201526120dc60c08401612000565b60c08201525092915050565b60008061010083850312156120fc57600080fd5b8235915061210d846020850161202e565b90509250929050565b6000806000610120848603121561212c57600080fd5b8335925060208401359150612144856040860161202e565b90509250925092565b60006020828403121561215f57600080fd5b5035919050565b6000806040838503121561217957600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611fe657600080fd5b60008083601f8401126121b257600080fd5b50813567ffffffffffffffff8111156121ca57600080fd5b6020830191508360208285010111156121e257600080fd5b9250929050565b6000806000806000806080878903121561220257600080fd5b863567ffffffffffffffff8082111561221a57600080fd5b818901915089601f83011261222e57600080fd5b81358181111561223d57600080fd5b8a60208260051b850101111561225257600080fd5b6020830198508097505061226860208a01612188565b955061227660408a01612000565b9450606089013591508082111561228c57600080fd5b5061229989828a016121a0565b979a9699509497509295939492505050565b6000808284036101008112156122c057600080fd5b8335925060e0601f19820112156122d657600080fd5b506020830190509250929050565b600060e082840312156122f657600080fd5b612300838361202e565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061233157612331612307565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561171f5761171f61235f565b8082018082111561171f5761171f61235f565b6000602082840312156123ad57600080fd5b815161230081611feb565b600080600080608085870312156123ce57600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b60008261242157634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156124a057600080fd5b6123008261201f565b6000602082840312156124bb57600080fd5b813561230081611feb565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061251e5761251e612307565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212207649f9a69b696b8730d8471aecbf81907f8429893834f7171be4b946fa84812d64736f6c63430008120033", + "numDeployments": 6, + "solcInputHash": "74af439f219888d42665a3312cefc0fc", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositPlusReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_msgId\",\"type\":\"uint256\"}],\"name\":\"isMsgRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRelayed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer delay limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEth\":\"The address of the inbox contract on Arbitrum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"isMsgRelayed(uint256)\":{\"details\":\"Get the msg relayed status.\",\"params\":{\"_msgId\":\"The msgId to check.\"},\"returns\":{\"isRelayed\":\"True if the msg was relayed.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":\"VeaOutboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 public immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 public immutable depositPlusReward; // 2 * deposit - burn\\n\\n address public constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer delay limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updateSequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n unchecked {\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch has not yet passed.\\\");\\n }\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) {\\n status = CensorshipTestStatus.NotStarted;\\n } else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod) {\\n status = CensorshipTestStatus.InProgress;\\n } else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the msg relayed status.\\n /// @param _msgId The msgId to check.\\n /// @return isRelayed True if the msg was relayed.\\n function isMsgRelayed(uint256 _msgId) external view returns(bool isRelayed) {\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1));\\n }\\n}\\n\",\"keccak256\":\"0x9deaca1e49d658f2ec56564a57987e7a711cfb16c43e3f0fb518007b01b21fdf\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002bd738038062002bd78339810160408190526200003591620002ce565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190526200006f620000ce565b6200007c6002886200034c565b60e08190526200008e8860026200036f565b6200009a91906200038f565b6101005261012051600190620000b190426200034c565b620000bd91906200038f565b600155506200040195505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000111573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001379190620003a5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200019b9190620003ca565b5092505050600454811115620001e65760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ae5760065415620002605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002c957600080fd5b919050565b600080600080600080600060e0888a031215620002ea57600080fd5b875196506020880151955060408801519450606088015193506200031160808901620002b1565b92506200032160a08901620002b1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200036a57634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000389576200038962000336565b92915050565b8181038181111562000389576200038962000336565b600060208284031215620003b857600080fd5b620003c382620002b1565b9392505050565b60008060008060808587031215620003e157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610100516101205161014051610160516101805161268562000552600039600081816104fe01526120b901526000818161053201528181610b1f01528181611a7801528181611c6c0152611e780152600081816105ba015261204d01526000818161056601528181610b4301528181610e4c01528181610eea0152818161164c0152818161180501528181611a9c01528181611c900152611e9c015260008181610494015261146301526000818161037f0152818161141001526115750152600081816105ee015281816106fc01528181610882015281816108af01528181610e780152818161106701528181611094015281816115d801528181611dd601528181611e3d0152611fe30152600081816104480152610c2d01526000818161066f01528181610a0501528181610bbe01528181610c57015261188601526126856000f3fe6080604052600436106101e35760003560e01c80635f43a47f11610102578063b633b94411610095578063df19e6ff11610064578063df19e6ff14610630578063e78cea921461065d578063e813a75514610691578063fccc2813146106a757600080fd5b8063b633b94414610588578063c2114a16146105a8578063d0e30db0146105dc578063da2b7bc41461061057600080fd5b80639588eca2116100d15780639588eca2146104d6578063aa22a1c6146104ec578063b044397e14610520578063b5b7a1841461055457600080fd5b80635f43a47f1461042157806369cd250d14610436578063836e344b14610482578063930f28af146104b657600080fd5b806331ddf7431161017a5780634788cb38116101495780634788cb38146103a157806349b4299e146103c15780634a439cfe146103e1578063541adcca1461040157600080fd5b806331ddf743146102e05780633ce43cfd1461030057806343b066d51461032057806344df8e701461036d57600080fd5b8063222ae786116101b6578063222ae786146102675780632639c0601461028a57806327ee6bdd146102b757806331d14457146102cd57600080fd5b806301139b68146101e8578063051d1970146101fd5780630c63fa84146102325780630f0adca514610247575b600080fd5b6101fb6101f63660046121f3565b6106bc565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb6108f9565b34801561025357600080fd5b506101fb610262366004612221565b610b1d565b34801561027357600080fd5b5061027c610e45565b604051908152602001610229565b34801561029657600080fd5b5061027c6102a5366004612258565b60026020526000908152604090205481565b3480156102c357600080fd5b5061027c60015481565b6101fb6102db366004612271565b610e76565b3480156102ec57600080fd5b506101fb6102fb3660046122f4565b6110b9565b34801561030c57600080fd5b506101fb61031b3660046123b6565b611359565b34801561032c57600080fd5b5061035d61033b366004612258565b600881901c600090815260036020526040902054600160ff9092161c81161490565b6040519015158152602001610229565b34801561037957600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103ad57600080fd5b506101fb6103bc3660046123b6565b6114a0565b3480156103cd57600080fd5b506101fb6103dc3660046121f3565b611615565b3480156103ed57600080fd5b5061027c6103fc366004612258565b6117fe565b34801561040d57600080fd5b5061027c61041c3660046123ef565b611830565b34801561042d57600080fd5b506101fb611882565b34801561044257600080fd5b5061046a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b34801561048e57600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c257600080fd5b506101fb6104d13660046121f3565b611a76565b3480156104e257600080fd5b5061027c60005481565b3480156104f857600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561052c57600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561056057600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561059457600080fd5b506101fb6105a33660046121f3565b611c6a565b3480156105b457600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e857600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561061c57600080fd5b506101fb61062b3660046121f3565b611e76565b34801561063c57600080fd5b5061065061064b3660046123ef565b61202f565b6040516102299190612428565b34801561066957600080fd5b5061046a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561069d57600080fd5b5061027c60045481565b3480156106b357600080fd5b5061046a600081565b6106c581611830565b600083815260026020526040902054146106fa5760405162461bcd60e51b81526004016106f190612442565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561076a5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106f1565b60c08101516001600160a01b0316156107c55760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106f1565b60008160a0015160028111156107dd576107dd612412565b1461082a5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106f1565b3360c082015261083981611830565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108f55760006108d47f000000000000000000000000000000000000000000000000000000000000000034612480565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036109605760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106f1565b6004546006546109709190612493565b42116109d95760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106f1565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610a50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7491906124a6565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad591906124c3565b50925050508181036108f55760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610b7057610b706124f9565b04031115610bb35760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106f1565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c2b5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106f1565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd791906124a6565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3891906124a6565b6001600160a01b031614610d875760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106f1565b60015483118015610d9757508115155b15610dda57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610de381611830565b60008481526002602052604090205403610e40578051829003610e0c57600160a0820152610e27565b60c08101516001600160a01b031615610e2757600260a08201525b610e3081611830565b6000848152600260205260409020555b505050565b6000610e717f00000000000000000000000000000000000000000000000000000000000000004261250f565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610ee65760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106f1565b60017f00000000000000000000000000000000000000000000000000000000000000004281610f1757610f176124f9565b04038214610f675760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e0000000000000060448201526064016106f1565b80610f845760405162461bcd60e51b81526004016106f190612442565b60008281526002602052604090205415610fd65760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106f1565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261101c90611830565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a37f00000000000000000000000000000000000000000000000000000000000000003411156108f55760006108d47f000000000000000000000000000000000000000000000000000000000000000034612480565b604085106110fb5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106f1565b6000848484846040516020016111149493929190612531565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561119457600088888381811061115657611156612573565b9050602002013590508281111561117b5782600052806020526040600020925061118b565b8060005282602052604060002092505b5060010161113a565b5080600054146111d75760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106f1565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561124c5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106f1565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061127c9089908990612589565b6000604051808303816000865af19150503d80600081146112b9576040519150601f19603f3d011682016040523d82523d6000602084013e6112be565b606091505b505090508061130f5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106f1565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61136b61041c368390038301836123ef565b600083815260026020526040902054146113975760405162461bcd60e51b81526004016106f190612442565b60026113a960c0830160a08401612599565b60028111156113ba576113ba612412565b146113fb5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106f1565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061145593505060e0840191505060c083016125b4565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114b261041c368390038301836123ef565b600083815260026020526040902054146114de5760405162461bcd60e51b81526004016106f190612442565b60016114f060c0830160a08401612599565b600281111561150157611501612412565b1461153e5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106f1565b600082815260026020526040812081905561155f60e0830160c084016125b4565b6001600160a01b0316146115ba576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061145593505060408401915050602083016125b4565b6115ca60408201602083016125b4565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61161e81611830565b6000838152600260205260409020541461164a5760405162461bcd60e51b81526004016106f190612442565b7f00000000000000000000000000000000000000000000000000000000000000006004546116789190612493565b604082015161168d9063ffffffff1642612480565b10156116f05760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b60648201526084016106f1565b60006116fb8261202f565b9050600281600381111561171157611711612412565b148061172e5750600081600381111561172c5761172c612412565b145b6117975760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b60648201526084016106f1565b63ffffffff4281166060840152431660808301526117b482611830565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b600061182a7f00000000000000000000000000000000000000000000000000000000000000008361250f565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986118659890979691016125d1565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061190691906124a6565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611943573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061196791906124c3565b50925050506004548111156119b15760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015611a735760065415611a255760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106f1565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ac957611ac96124f9565b04031115611b0c5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106f1565b611b1581611830565b60008381526002602052604090205414611b415760405162461bcd60e51b81526004016106f190612442565b60c08101516001600160a01b031615611b935760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106f1565b6001611b9e8261202f565b6003811115611baf57611baf612412565b14611bfc5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e000000000060448201526064016106f1565b600154821115611c4457600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611c5481611830565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cbd57611cbd6124f9565b040311611cfe5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106f1565b611d0781611830565b60008381526002602052604090205414611d335760405162461bcd60e51b81526004016106f190612442565b60008160a001516002811115611d4b57611d4b612412565b14611d8a5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106f1565b60c08101516001600160a01b0316156108f55760208101516001600160a01b0316611e0e5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611e2282611830565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ec957611ec96124f9565b040311611f0a5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106f1565b611f1381611830565b60008381526002602052604090205414611f3f5760405162461bcd60e51b81526004016106f190612442565b60008160a001516002811115611f5757611f57612412565b14611f965760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106f1565b60208101516001600160a01b0316156108f55760c08101516001600160a01b031661201b5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611e2282611830565b6000816060015163ffffffff1660000361204b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561208757506003919050565b6000600c836060015163ffffffff164203816120a5576120a56124f9565b608085015163ffffffff16919004019050437f0000000000000000000000000000000000000000000000000000000000000000818303116120e957600192506120ee565b600092505b50505b919050565b6001600160a01b0381168114611a7357600080fd5b80356120f1816120f6565b803563ffffffff811681146120f157600080fd5b8035600381106120f157600080fd5b600060e0828403121561214b57600080fd5b60405160e0810181811067ffffffffffffffff8211171561217c57634e487b7160e01b600052604160045260246000fd5b604052823581529050806121926020840161210b565b60208201526121a360408401612116565b60408201526121b460608401612116565b60608201526121c560808401612116565b60808201526121d660a0840161212a565b60a08201526121e760c0840161210b565b60c08201525092915050565b600080610100838503121561220757600080fd5b823591506122188460208501612139565b90509250929050565b6000806000610120848603121561223757600080fd5b833592506020840135915061224f8560408601612139565b90509250925092565b60006020828403121561226a57600080fd5b5035919050565b6000806040838503121561228457600080fd5b50508035926020909101359150565b803567ffffffffffffffff811681146120f157600080fd5b60008083601f8401126122bd57600080fd5b50813567ffffffffffffffff8111156122d557600080fd5b6020830191508360208285010111156122ed57600080fd5b9250929050565b6000806000806000806080878903121561230d57600080fd5b863567ffffffffffffffff8082111561232557600080fd5b818901915089601f83011261233957600080fd5b81358181111561234857600080fd5b8a60208260051b850101111561235d57600080fd5b6020830198508097505061237360208a01612293565b955061238160408a0161210b565b9450606089013591508082111561239757600080fd5b506123a489828a016122ab565b979a9699509497509295939492505050565b6000808284036101008112156123cb57600080fd5b8335925060e0601f19820112156123e157600080fd5b506020830190509250929050565b600060e0828403121561240157600080fd5b61240b8383612139565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061243c5761243c612412565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561182a5761182a61246a565b8082018082111561182a5761182a61246a565b6000602082840312156124b857600080fd5b815161240b816120f6565b600080600080608085870312156124d957600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b60008261252c57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156125ab57600080fd5b61240b8261212a565b6000602082840312156125c657600080fd5b813561240b816120f6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061262957612629612412565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212207e5789ac88e28911cf415f7ea8bbc367a0cf6c54c0da6785c4b6e9afb3a5141764736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101e35760003560e01c80635f43a47f11610102578063b633b94411610095578063df19e6ff11610064578063df19e6ff14610630578063e78cea921461065d578063e813a75514610691578063fccc2813146106a757600080fd5b8063b633b94414610588578063c2114a16146105a8578063d0e30db0146105dc578063da2b7bc41461061057600080fd5b80639588eca2116100d15780639588eca2146104d6578063aa22a1c6146104ec578063b044397e14610520578063b5b7a1841461055457600080fd5b80635f43a47f1461042157806369cd250d14610436578063836e344b14610482578063930f28af146104b657600080fd5b806331ddf7431161017a5780634788cb38116101495780634788cb38146103a157806349b4299e146103c15780634a439cfe146103e1578063541adcca1461040157600080fd5b806331ddf743146102e05780633ce43cfd1461030057806343b066d51461032057806344df8e701461036d57600080fd5b8063222ae786116101b6578063222ae786146102675780632639c0601461028a57806327ee6bdd146102b757806331d14457146102cd57600080fd5b806301139b68146101e8578063051d1970146101fd5780630c63fa84146102325780630f0adca514610247575b600080fd5b6101fb6101f63660046121f3565b6106bc565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb6108f9565b34801561025357600080fd5b506101fb610262366004612221565b610b1d565b34801561027357600080fd5b5061027c610e45565b604051908152602001610229565b34801561029657600080fd5b5061027c6102a5366004612258565b60026020526000908152604090205481565b3480156102c357600080fd5b5061027c60015481565b6101fb6102db366004612271565b610e76565b3480156102ec57600080fd5b506101fb6102fb3660046122f4565b6110b9565b34801561030c57600080fd5b506101fb61031b3660046123b6565b611359565b34801561032c57600080fd5b5061035d61033b366004612258565b600881901c600090815260036020526040902054600160ff9092161c81161490565b6040519015158152602001610229565b34801561037957600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103ad57600080fd5b506101fb6103bc3660046123b6565b6114a0565b3480156103cd57600080fd5b506101fb6103dc3660046121f3565b611615565b3480156103ed57600080fd5b5061027c6103fc366004612258565b6117fe565b34801561040d57600080fd5b5061027c61041c3660046123ef565b611830565b34801561042d57600080fd5b506101fb611882565b34801561044257600080fd5b5061046a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b34801561048e57600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c257600080fd5b506101fb6104d13660046121f3565b611a76565b3480156104e257600080fd5b5061027c60005481565b3480156104f857600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561052c57600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561056057600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561059457600080fd5b506101fb6105a33660046121f3565b611c6a565b3480156105b457600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e857600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561061c57600080fd5b506101fb61062b3660046121f3565b611e76565b34801561063c57600080fd5b5061065061064b3660046123ef565b61202f565b6040516102299190612428565b34801561066957600080fd5b5061046a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561069d57600080fd5b5061027c60045481565b3480156106b357600080fd5b5061046a600081565b6106c581611830565b600083815260026020526040902054146106fa5760405162461bcd60e51b81526004016106f190612442565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561076a5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106f1565b60c08101516001600160a01b0316156107c55760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106f1565b60008160a0015160028111156107dd576107dd612412565b1461082a5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106f1565b3360c082015261083981611830565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108f55760006108d47f000000000000000000000000000000000000000000000000000000000000000034612480565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036109605760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106f1565b6004546006546109709190612493565b42116109d95760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106f1565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610a50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7491906124a6565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad591906124c3565b50925050508181036108f55760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610b7057610b706124f9565b04031115610bb35760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106f1565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c2b5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106f1565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd791906124a6565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3891906124a6565b6001600160a01b031614610d875760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106f1565b60015483118015610d9757508115155b15610dda57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610de381611830565b60008481526002602052604090205403610e40578051829003610e0c57600160a0820152610e27565b60c08101516001600160a01b031615610e2757600260a08201525b610e3081611830565b6000848152600260205260409020555b505050565b6000610e717f00000000000000000000000000000000000000000000000000000000000000004261250f565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610ee65760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106f1565b60017f00000000000000000000000000000000000000000000000000000000000000004281610f1757610f176124f9565b04038214610f675760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e0000000000000060448201526064016106f1565b80610f845760405162461bcd60e51b81526004016106f190612442565b60008281526002602052604090205415610fd65760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106f1565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261101c90611830565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a37f00000000000000000000000000000000000000000000000000000000000000003411156108f55760006108d47f000000000000000000000000000000000000000000000000000000000000000034612480565b604085106110fb5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106f1565b6000848484846040516020016111149493929190612531565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561119457600088888381811061115657611156612573565b9050602002013590508281111561117b5782600052806020526040600020925061118b565b8060005282602052604060002092505b5060010161113a565b5080600054146111d75760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106f1565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561124c5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106f1565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061127c9089908990612589565b6000604051808303816000865af19150503d80600081146112b9576040519150601f19603f3d011682016040523d82523d6000602084013e6112be565b606091505b505090508061130f5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106f1565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61136b61041c368390038301836123ef565b600083815260026020526040902054146113975760405162461bcd60e51b81526004016106f190612442565b60026113a960c0830160a08401612599565b60028111156113ba576113ba612412565b146113fb5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106f1565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061145593505060e0840191505060c083016125b4565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114b261041c368390038301836123ef565b600083815260026020526040902054146114de5760405162461bcd60e51b81526004016106f190612442565b60016114f060c0830160a08401612599565b600281111561150157611501612412565b1461153e5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106f1565b600082815260026020526040812081905561155f60e0830160c084016125b4565b6001600160a01b0316146115ba576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061145593505060408401915050602083016125b4565b6115ca60408201602083016125b4565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61161e81611830565b6000838152600260205260409020541461164a5760405162461bcd60e51b81526004016106f190612442565b7f00000000000000000000000000000000000000000000000000000000000000006004546116789190612493565b604082015161168d9063ffffffff1642612480565b10156116f05760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b60648201526084016106f1565b60006116fb8261202f565b9050600281600381111561171157611711612412565b148061172e5750600081600381111561172c5761172c612412565b145b6117975760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b60648201526084016106f1565b63ffffffff4281166060840152431660808301526117b482611830565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b600061182a7f00000000000000000000000000000000000000000000000000000000000000008361250f565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986118659890979691016125d1565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061190691906124a6565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611943573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061196791906124c3565b50925050506004548111156119b15760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015611a735760065415611a255760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106f1565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ac957611ac96124f9565b04031115611b0c5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106f1565b611b1581611830565b60008381526002602052604090205414611b415760405162461bcd60e51b81526004016106f190612442565b60c08101516001600160a01b031615611b935760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106f1565b6001611b9e8261202f565b6003811115611baf57611baf612412565b14611bfc5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e000000000060448201526064016106f1565b600154821115611c4457600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611c5481611830565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cbd57611cbd6124f9565b040311611cfe5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106f1565b611d0781611830565b60008381526002602052604090205414611d335760405162461bcd60e51b81526004016106f190612442565b60008160a001516002811115611d4b57611d4b612412565b14611d8a5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106f1565b60c08101516001600160a01b0316156108f55760208101516001600160a01b0316611e0e5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611e2282611830565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ec957611ec96124f9565b040311611f0a5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106f1565b611f1381611830565b60008381526002602052604090205414611f3f5760405162461bcd60e51b81526004016106f190612442565b60008160a001516002811115611f5757611f57612412565b14611f965760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106f1565b60208101516001600160a01b0316156108f55760c08101516001600160a01b031661201b5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611e2282611830565b6000816060015163ffffffff1660000361204b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561208757506003919050565b6000600c836060015163ffffffff164203816120a5576120a56124f9565b608085015163ffffffff16919004019050437f0000000000000000000000000000000000000000000000000000000000000000818303116120e957600192506120ee565b600092505b50505b919050565b6001600160a01b0381168114611a7357600080fd5b80356120f1816120f6565b803563ffffffff811681146120f157600080fd5b8035600381106120f157600080fd5b600060e0828403121561214b57600080fd5b60405160e0810181811067ffffffffffffffff8211171561217c57634e487b7160e01b600052604160045260246000fd5b604052823581529050806121926020840161210b565b60208201526121a360408401612116565b60408201526121b460608401612116565b60608201526121c560808401612116565b60808201526121d660a0840161212a565b60a08201526121e760c0840161210b565b60c08201525092915050565b600080610100838503121561220757600080fd5b823591506122188460208501612139565b90509250929050565b6000806000610120848603121561223757600080fd5b833592506020840135915061224f8560408601612139565b90509250925092565b60006020828403121561226a57600080fd5b5035919050565b6000806040838503121561228457600080fd5b50508035926020909101359150565b803567ffffffffffffffff811681146120f157600080fd5b60008083601f8401126122bd57600080fd5b50813567ffffffffffffffff8111156122d557600080fd5b6020830191508360208285010111156122ed57600080fd5b9250929050565b6000806000806000806080878903121561230d57600080fd5b863567ffffffffffffffff8082111561232557600080fd5b818901915089601f83011261233957600080fd5b81358181111561234857600080fd5b8a60208260051b850101111561235d57600080fd5b6020830198508097505061237360208a01612293565b955061238160408a0161210b565b9450606089013591508082111561239757600080fd5b506123a489828a016122ab565b979a9699509497509295939492505050565b6000808284036101008112156123cb57600080fd5b8335925060e0601f19820112156123e157600080fd5b506020830190509250929050565b600060e0828403121561240157600080fd5b61240b8383612139565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061243c5761243c612412565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561182a5761182a61246a565b8082018082111561182a5761182a61246a565b6000602082840312156124b857600080fd5b815161240b816120f6565b600080600080608085870312156124d957600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b60008261252c57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156125ab57600080fd5b61240b8261212a565b6000602082840312156125c657600080fd5b813561240b816120f6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061262957612629612412565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212207e5789ac88e28911cf415f7ea8bbc367a0cf6c54c0da6785c4b6e9afb3a5141764736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.", "events": { @@ -1139,6 +1178,15 @@ "hashedClaim": "The hash of the claim." } }, + "isMsgRelayed(uint256)": { + "details": "Get the msg relayed status.", + "params": { + "_msgId": "The msgId to check." + }, + "returns": { + "isRelayed": "True if the msg was relayed." + } + }, "resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { "details": "Resolves any challenge of the optimistic claim for '_epoch'.", "params": { @@ -1216,7 +1264,7 @@ "storageLayout": { "storage": [ { - "astId": 38, + "astId": 446, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "stateRoot", "offset": 0, @@ -1224,7 +1272,7 @@ "type": "t_bytes32" }, { - "astId": 40, + "astId": 448, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "latestVerifiedEpoch", "offset": 0, @@ -1232,7 +1280,7 @@ "type": "t_uint256" }, { - "astId": 44, + "astId": 452, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "claimHashes", "offset": 0, @@ -1240,7 +1288,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 48, + "astId": 456, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "relayed", "offset": 0, @@ -1248,7 +1296,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 50, + "astId": 458, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "sequencerDelayLimit", "offset": 0, @@ -1256,12 +1304,12 @@ "type": "t_uint256" }, { - "astId": 53, + "astId": 461, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "5", - "type": "t_struct(SequencerDelayLimitDecreaseRequest)58_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)466_storage" } ], "types": { @@ -1277,12 +1325,12 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_struct(SequencerDelayLimitDecreaseRequest)58_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)466_storage": { "encoding": "inplace", "label": "struct VeaOutboxArbToEth.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 55, + "astId": 463, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "requestedsequencerDelayLimit", "offset": 0, @@ -1290,7 +1338,7 @@ "type": "t_uint256" }, { - "astId": 57, + "astId": 465, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "timestamp", "offset": 0, diff --git a/contracts/src/arbitrumToEth/VeaInboxArbToEth.sol b/contracts/src/arbitrumToEth/VeaInboxArbToEth.sol index 2094bf6a..cd6f6af9 100644 --- a/contracts/src/arbitrumToEth/VeaInboxArbToEth.sol +++ b/contracts/src/arbitrumToEth/VeaInboxArbToEth.sol @@ -19,8 +19,7 @@ contract VeaInboxArbToEth is IVeaInbox { // * Storage * // // ************************************* // - // Arbitrum precompile ArbSys, used for L2->L1 messaging. - // docs: https://developer.arbitrum.io/arbos/precompiles#arbsys + // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys IArbSys internal constant ARB_SYS = IArbSys(address(100)); uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots. @@ -29,9 +28,9 @@ contract VeaInboxArbToEth is IVeaInbox { mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot // Inbox represents minimum data availability to maintain incremental merkle tree. - // Supports a max of 2^64 - 1 messages. See merkle tree docs for more details on inbox data management. + // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state. - bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment. + bytes32[64] internal inbox; // stores minimal set of complete subtree roots of the merkle tree to increment. uint64 public count; // count of messages in the merkle tree // ************************************* // @@ -177,7 +176,8 @@ contract VeaInboxArbToEth is IVeaInbox { } /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right. - /// Note: EVM scratch space is used to efficiently calculate hashes. /// @param _left The left hash. + /// Note: EVM scratch space is used to efficiently calculate hashes. + /// @param _left The left hash. /// @param _right The right hash. /// @return parent The parent hash. function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) { @@ -226,6 +226,12 @@ contract VeaInboxArbToEth is IVeaInbox { epoch = block.timestamp / epochPeriod; } + /// @dev Get the most recent epoch for which snapshots are finalized. + /// @return epoch The epoch associated with the current inbox block.timestamp + function epochFinalized() external view returns (uint256 epoch) { + epoch = block.timestamp / epochPeriod - 1; + } + /// @dev Get the epoch from the inbox's point of view using timestamp. /// @param _timestamp The timestamp to calculate the epoch from. /// @return epoch The calculated epoch. diff --git a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol index a4068b99..838f7b5c 100644 --- a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol +++ b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol @@ -24,10 +24,10 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum. uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge - uint256 internal immutable burn; // The amount of wei to burn. deposit / 2 - uint256 internal immutable depositPlusReward; // 2 * deposit - burn + uint256 public immutable burn; // The amount of wei to burn. deposit / 2 + uint256 public immutable depositPlusReward; // 2 * deposit - burn - address internal constant BURN_ADDRESS = address(0); // Address to send burned eth + address public constant BURN_ADDRESS = address(0); // Address to send burned eth uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots. @@ -40,7 +40,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { uint256 public latestVerifiedEpoch; // The latest epoch that has been verified. mapping(uint256 => bytes32) public claimHashes; // epoch => claim - mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message + mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock. SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here. @@ -65,7 +65,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { /// @param _claimer The address of the claimer. /// @param _epoch The epoch associated with the claim. /// @param _stateRoot The state root of the claim. - event Claimed(address indexed _claimer, uint256 _epoch, bytes32 _stateRoot); + event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot); /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox. /// @param _epoch The epoch associated with the challenged claim. @@ -203,7 +203,9 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { /// @param _stateRoot The state root to claim. function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual { require(msg.value >= deposit, "Insufficient claim deposit."); - require(_epoch == block.timestamp / epochPeriod - 1, "Epoch has not yet passed."); + unchecked { + require(_epoch == block.timestamp / epochPeriod - 1, "Epoch has not yet passed."); + } require(_stateRoot != bytes32(0), "Invalid claim."); require(claimHashes[_epoch] == bytes32(0), "Claim already made."); @@ -258,14 +260,14 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock. // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value require( - block.timestamp >= uint256(_claim.timestampClaimed) + sequencerDelayLimit + epochPeriod, + block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod, "Claim must wait atleast maxL2StateSyncDelay." ); - CensorshipTestStatus censorshipTestStatus = censorshipTestStatus(_claim); + CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim); require( - censorshipTestStatus == CensorshipTestStatus.NotStarted || - censorshipTestStatus == CensorshipTestStatus.Failed, + _censorshipTestStatus == CensorshipTestStatus.NotStarted || + _censorshipTestStatus == CensorshipTestStatus.Failed, "Claim verification in progress or already completed." ); @@ -489,10 +491,11 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { /// @return status True if the claim passed the censorship test. function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) { unchecked { - if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted; - else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod) + if (uint256(_claim.timestampVerification) == 0) { + status = CensorshipTestStatus.NotStarted; + } else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod) { status = CensorshipTestStatus.InProgress; - else { + } else { uint256 expectedBlocks = uint256(_claim.blocknumberVerification) + (block.timestamp - uint256(_claim.timestampVerification)) / SLOT_TIME; @@ -517,4 +520,20 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { function epochAt(uint256 timestamp) external view returns (uint256 epoch) { epoch = timestamp / epochPeriod; } + + /// @dev Get the msg relayed status. + /// @param _msgId The msgId to check. + /// @return isRelayed True if the msg was relayed. + function isMsgRelayed(uint256 _msgId) external view returns (bool isRelayed) { + uint256 relayIndex = _msgId >> 8; + uint256 offset; + + unchecked { + offset = _msgId % 256; + } + + bytes32 replay = relayed[relayIndex]; + + isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1)); + } } diff --git a/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol b/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol index 35425f14..31abf822 100644 --- a/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol @@ -30,7 +30,7 @@ contract VeaInboxArbToGnosis is IVeaInbox { // Inbox represents minimum data availability to maintain incremental merkle tree. // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state. - bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment. + bytes32[64] internal inbox; // stores minimal set of complete subtree roots of the merkle tree to increment. uint64 public count; // count of messages in the merkle tree // ************************************* // @@ -227,6 +227,12 @@ contract VeaInboxArbToGnosis is IVeaInbox { epoch = block.timestamp / epochPeriod; } + /// @dev Get the most recent epoch for which snapshots are finalized. + /// @return epoch The epoch associated with the current inbox block.timestamp + function epochFinalized() external view returns (uint256 epoch) { + epoch = block.timestamp / epochPeriod - 1; + } + /// @dev Get the epoch from the inbox's point of view using timestamp. /// @param _timestamp The timestamp to calculate the epoch from. /// @return epoch The calculated epoch. diff --git a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol index 1cf36ba2..5fd298a0 100644 --- a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol @@ -25,12 +25,12 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { IWETH public immutable weth; // The address of the WETH contract on Gnosis. uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge - uint256 internal immutable burn; // The amount of wei to burn. deposit / 2 - uint256 internal immutable depositPlusReward; // 2 * deposit - burn + uint256 public immutable burn; // The amount of wei to burn. deposit / 2 + uint256 public immutable depositPlusReward; // 2 * deposit - burn uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time - uint256 internal immutable routerChainId; // Router chain id for authentication of messages from the AMB. + uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB. uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots. uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer. @@ -41,7 +41,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { uint256 public latestVerifiedEpoch; // The latest epoch that has been verified. mapping(uint256 => bytes32) public claimHashes; // epoch => claim - mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message + mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock. uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update. @@ -61,7 +61,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { /// @param _claimer The address of the claimer. /// @param _epoch The epoch associated with the claim. /// @param _stateRoot The state root of the claim. - event Claimed(address indexed _claimer, uint256 _epoch, bytes32 _stateRoot); + event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot); /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox. /// @param _epoch The epoch associated with the challenged claim. @@ -177,7 +177,9 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { /// @param _stateRoot The state root to claim. function claim(uint256 _epoch, bytes32 _stateRoot) external virtual { require(weth.transferFrom(msg.sender, address(this), deposit), "Failed WETH transfer."); - require(_epoch == block.timestamp / epochPeriod - 1, "Epoch has not yet passed."); + unchecked { + require(_epoch == block.timestamp / epochPeriod - 1, "Epoch has not yet passed."); + } require(_stateRoot != bytes32(0), "Invalid claim."); require(claimHashes[_epoch] == bytes32(0), "Claim already made."); @@ -202,7 +204,6 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { /// @param _claim The claim associated with the epoch. function challenge(uint256 _epoch, Claim memory _claim) external payable { require(weth.transferFrom(msg.sender, address(this), deposit), "Failed WETH transfer."); - require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); require(_claim.challenger == address(0), "Claim already challenged."); require(_claim.honest == Party.None, "Claim already verified."); @@ -451,10 +452,11 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { /// @return status True if the claim passed the censorship test. function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) { unchecked { - if (uint256(_claim.timestampVerification) == 0) status = CensorshipTestStatus.NotStarted; - else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod) + if (uint256(_claim.timestampVerification) == 0) { + status = CensorshipTestStatus.NotStarted; + } else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod) { status = CensorshipTestStatus.InProgress; - else { + } else { uint256 expectedBlocks = uint256(_claim.blocknumberVerification) + (block.timestamp - uint256(_claim.timestampVerification)) / SLOT_TIME; @@ -479,4 +481,20 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { function epochAt(uint256 timestamp) external view returns (uint256 epoch) { epoch = timestamp / epochPeriod; } + + /// @dev Get the msg relayed status. + /// @param _msgId The msgId to check. + /// @return isRelayed True if the msg was relayed. + function isMsgRelayed(uint256 _msgId) external view returns (bool isRelayed) { + uint256 relayIndex = _msgId >> 8; + uint256 offset; + + unchecked { + offset = _msgId % 256; + } + + bytes32 replay = relayed[relayIndex]; + + isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1)); + } } diff --git a/contracts/src/gnosisToArbitrum/VeaInboxGnosisToArb.sol b/contracts/src/gnosisToArbitrum/VeaInboxGnosisToArb.sol index 2049e79e..92a78533 100644 --- a/contracts/src/gnosisToArbitrum/VeaInboxGnosisToArb.sol +++ b/contracts/src/gnosisToArbitrum/VeaInboxGnosisToArb.sol @@ -21,7 +21,7 @@ contract VeaInboxGnosisToArb is IVeaInbox { IAMB public immutable amb; // The address of the AMB contract on Gnosis. - uint256 public immutable epochPeriod; // Epochs mark the period between stateroot snapshots + uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots. address public immutable routerGnosisToArb; // The router on Ethereum. mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot @@ -29,7 +29,7 @@ contract VeaInboxGnosisToArb is IVeaInbox { // Inbox represents minimum data availability to maintain incremental merkle tree. // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state. - bytes32[64] public inbox; // stores minimal set of complete subtree roots of the merkle tree to increment. + bytes32[64] internal inbox; // stores minimal set of complete subtree roots of the merkle tree to increment. uint64 public count; // count of messages in the merkle tree // ************************************* // @@ -37,12 +37,14 @@ contract VeaInboxGnosisToArb is IVeaInbox { // ************************************* // /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum. - /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message) + /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message). event MessageSent(bytes _nodeData); /// The bridgers can watch this event to claim the stateRoot on the veaOutbox. + /// @param _snapshot The snapshot of the merkle tree state root. + /// @param _epoch The epoch of the snapshot. /// @param _count The count of messages in the merkle tree. - event SnapshotSaved(uint64 _count); + event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count); /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge. /// @param _epochSent The epoch of the snapshot. @@ -67,7 +69,7 @@ contract VeaInboxGnosisToArb is IVeaInbox { /// @dev Sends an arbitrary message to Gnosis. /// `O(log(count))` where count is the number of messages already sent. /// Amortized cost is constant. - /// Note: See merkle tree documentation for details how inbox manages state. + /// Note: See docs for details how inbox manages merkle tree state. /// @param _to The address of the contract on the receiving chain which receives the calldata. /// @param _fnSelector The function selector of the receiving contract. /// @param _data The message calldata, abi.encode(param1, param2, ...) @@ -82,8 +84,8 @@ contract VeaInboxGnosisToArb is IVeaInbox { bytes memory nodeData = abi.encodePacked( oldCount, _to, - // data for outbox relay - abi.encodePacked( // abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...) where _data is abi.encode(param1, param2, ...) + // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data + abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...) _fnSelector, bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector _data @@ -171,7 +173,7 @@ contract VeaInboxGnosisToArb is IVeaInbox { snapshots[epoch] = stateRoot; - emit SnapshotSaved(count); + emit SnapshotSaved(stateRoot, epoch, count); } /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right. @@ -211,7 +213,7 @@ contract VeaInboxGnosisToArb is IVeaInbox { address _excessFeeRefundAddress, uint256 _gasLimit, uint256 _maxFeePerGas - ) external virtual returns (bytes32 ticketID) { + ) external virtual { unchecked { require(_epoch < block.timestamp / epochPeriod, "Can only send past epoch snapshot."); } @@ -229,8 +231,31 @@ contract VeaInboxGnosisToArb is IVeaInbox { ) ); // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit. - ticketID = amb.requireToPassMessage(routerGnosisToArb, data, amb.maxGasPerTx()); + bytes32 ticketID = amb.requireToPassMessage(routerGnosisToArb, data, amb.maxGasPerTx()); emit SnapshotSent(_epoch, ticketID); } + + // ************************************* // + // * Pure / Views * // + // ************************************* // + + /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock. + /// @return epoch The epoch associated with the current inbox block.timestamp + function epochNow() external view returns (uint256 epoch) { + epoch = block.timestamp / epochPeriod; + } + + /// @dev Get the most recent epoch for which snapshots are finalized. + /// @return epoch The epoch associated with the current inbox block.timestamp + function epochFinalized() external view returns (uint256 epoch) { + epoch = block.timestamp / epochPeriod - 1; + } + + /// @dev Get the epoch from the inbox's point of view using timestamp. + /// @param _timestamp The timestamp to calculate the epoch from. + /// @return epoch The calculated epoch. + function epochAt(uint256 _timestamp) external view returns (uint256 epoch) { + epoch = _timestamp / epochPeriod; + } } diff --git a/contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol b/contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol index 457043e1..b8fb1a0d 100644 --- a/contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol +++ b/contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol @@ -21,10 +21,10 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { address public immutable routerGnosisToArb; // The address of the router from Gnosis to Arbitrum on Ethereum. uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge - uint256 internal immutable burn; // The amount of wei to burn. deposit / 2 - uint256 internal immutable depositPlusReward; // 2 * deposit - burn + uint256 public immutable burn; // The amount of wei to burn. deposit / 2 + uint256 public immutable depositPlusReward; // 2 * deposit - burn - address internal constant BURN_ADDRESS = address(0); // address to send burned eth + address public constant BURN_ADDRESS = address(0); // address to send burned eth uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots. uint256 public immutable challengePeriod; // Claim challenge timewindow. @@ -35,12 +35,12 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update. uint256 public timestampFutureUpdated; // The timestamp of the last sequencer future update. - bytes32 public stateRoot; - uint256 public latestVerifiedEpoch; + bytes32 public stateRoot; // merkle root of the outbox state + uint256 public latestVerifiedEpoch; // The latest epoch that has been verified. mapping(uint256 => Claim) public claims; // epoch => claim mapping(uint256 => address) public challengers; // epoch => challenger - mapping(uint256 => bytes32) public relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message + mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message enum Party { None, @@ -63,7 +63,7 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { /// @param _claimer The address of the claimer. /// @param _epoch The epoch associated with the claim. /// @param _stateRoot The state root of the claim. - event Claimed(address indexed _claimer, uint256 _epoch, bytes32 _stateRoot); + event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot); /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox. /// @param _epoch The epoch associated with the challenged claim. @@ -78,9 +78,13 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { /// @param _epoch The epoch that was verified. event Verified(uint256 _epoch); - /// @dev This event indicates the sequencer limit updated. - /// @param _newsequencerDelayLimit The new maxL2StateSyncDelay. - event sequencerDelayLimitUpdateReceived(uint256 _newsequencerDelayLimit); + /// @dev This event indicates the sequencer delay limit updated. + /// @param _newSequencerDelayLimit The new max sequencer past timestamping power. + event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit); + + /// @dev This event indicates the sequencer futue limit updated. + /// @param _newSequencerFutureLimit The new max sequencer future timestamping power. + event sequencerFutureLimitUpdateReceived(uint256 _newSequencerFutureLimit); // ************************************* // // * Function Modifiers * // @@ -88,14 +92,14 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { modifier OnlyBridgeRunning() { unchecked { - require(block.timestamp / epochPeriod <= latestVerifiedEpoch + timeoutEpochs, "Bridge Shutdown."); + require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, "Bridge Shutdown."); } _; } modifier OnlyBridgeShutdown() { unchecked { - require(block.timestamp / epochPeriod > latestVerifiedEpoch + timeoutEpochs, "Bridge Running."); + require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, "Bridge Running."); } _; } @@ -153,7 +157,7 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { if (sequencerFutureLimit != _newSequencerFutureLimit) { sequencerFutureLimit = _newSequencerFutureLimit; timestampFutureUpdated = _timestamp; - emit sequencerDelayLimitUpdateReceived(_newSequencerFutureLimit); + emit sequencerFutureLimitUpdateReceived(_newSequencerFutureLimit); } } @@ -185,8 +189,9 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { /// @param _stateRoot The state root to claim. function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual { require(msg.value >= deposit, "Insufficient claim deposit."); - require(_epoch == block.timestamp / epochPeriod - 1, "Epoch is invalid."); - + unchecked { + require(_epoch == block.timestamp / epochPeriod - 1, "Epoch is invalid."); + } require(_stateRoot != bytes32(0), "Invalid claim."); require(claims[_epoch].claimer == address(0), "Claim already made."); @@ -274,10 +279,10 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { } /// @dev Verifies and relays the message. UNTRUSTED. - /// @param _proof The merkle proof to prove the message. + /// @param _proof The merkle proof to prove the message inclusion in the inbox state root. /// @param _msgId The zero based index of the message in the inbox. - /// @param _to The address of the contract on Gnosis to call. - /// @param _message The message encoded with header from VeaInbox. + /// @param _to The address of the contract on Arbitrum to call. + /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...) function sendMessage(bytes32[] memory _proof, uint64 _msgId, address _to, bytes memory _message) external { require(_proof.length < 64, "Proof too long."); @@ -409,4 +414,20 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { function epochAt(uint256 timestamp) external view returns (uint256 epoch) { epoch = timestamp / epochPeriod; } + + /// @dev Get the msg relayed status. + /// @param _msgId The msgId to check. + /// @return isRelayed True if the msg was relayed. + function isMsgRelayed(uint256 _msgId) external view returns (bool isRelayed) { + uint256 relayIndex = _msgId >> 8; + uint256 offset; + + unchecked { + offset = _msgId % 256; + } + + bytes32 replay = relayed[relayIndex]; + + isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1)); + } } diff --git a/contracts/test/integration/ArbToEth.ts b/contracts/test/integration/ArbToEth.ts index 6cd011f3..95b3bf73 100644 --- a/contracts/test/integration/ArbToEth.ts +++ b/contracts/test/integration/ArbToEth.ts @@ -137,7 +137,7 @@ describe("Integration tests", async () => { const bridgerClaimTx = await veaOutbox.connect(bridger).claim(epoch, batchMerkleRoot, { value: TEN_ETH }); - await expect(bridgerClaimTx).to.emit(veaOutbox, "Claimed").withArgs(bridger.address, batchMerkleRoot); + await expect(bridgerClaimTx).to.emit(veaOutbox, "Claimed").withArgs(bridger.address, epoch, batchMerkleRoot); await expect(veaOutbox.connect(bridger).claim(epoch, batchMerkleRoot, { value: TEN_ETH })).to.be.revertedWith( "Claim already made." From 69284700029b845c4d3faea2d67b804eadb4af4b Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Sun, 20 Aug 2023 20:02:06 +0100 Subject: [PATCH 18/58] fix: typo --- contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol | 4 ++-- contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol index 838f7b5c..ea0d45d3 100644 --- a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol +++ b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol @@ -438,7 +438,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { } else { address claimer = _claim.claimer; _claim.claimer = address(0); - claimHashes[_epoch] == hashClaim(_claim); + claimHashes[_epoch] = hashClaim(_claim); payable(claimer).send(deposit); // User is responsible for accepting ETH. } } @@ -458,7 +458,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { } else { address challenger = _claim.challenger; _claim.challenger = address(0); - claimHashes[_epoch] == hashClaim(_claim); + claimHashes[_epoch] = hashClaim(_claim); payable(challenger).send(deposit); // User is responsible for accepting ETH. } } diff --git a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol index 5fd298a0..4b053d90 100644 --- a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol @@ -399,7 +399,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { } else { address claimer = _claim.claimer; _claim.claimer = address(0); - claimHashes[_epoch] == hashClaim(_claim); + claimHashes[_epoch] = hashClaim(_claim); require(weth.transfer(claimer, deposit), "Failed WETH transfer."); // should revert on errors, but we check return value anyways } } @@ -419,7 +419,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { } else { address challenger = _claim.challenger; _claim.challenger = address(0); - claimHashes[_epoch] == hashClaim(_claim); + claimHashes[_epoch] = hashClaim(_claim); require(weth.transfer(challenger, deposit), "Failed WETH transfer."); // should revert on errors, but we check return value anyways } } From 0f3f2ad428d95a7cf712e6e952c19b8af6d0decf Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Thu, 12 Oct 2023 17:34:34 -0700 Subject: [PATCH 19/58] chore: update deploy script --- .../01-outbox/01-arb-to-gnosis-outbox.ts | 14 +--- .../deploy/02-inbox/02-arb-to-gnosis-inbox.ts | 24 ++++-- .../VeaInboxArbToEthDevnet.json | 20 ++--- .../VeaInboxArbToEthTestnet.json | 16 ++-- .../VeaInboxArbToGnosisDevnet.json | 16 ++-- .../VeaInboxArbToGnosisTestnet.json | 16 ++-- .../VeaOutboxGnosisToArbDevnet.json | 80 ++++++++++--------- .../VeaOutboxGnosisToArbTestnet.json | 78 +++++++++--------- .../chiado/VeaInboxGnosisToArbDevnet.json | 20 ++--- .../chiado/VeaInboxGnosisToArbTestnet.json | 20 ++--- .../chiado/VeaOutboxArbToGnosisDevnet.json | 48 +++++------ .../chiado/VeaOutboxArbToGnosisTestnet.json | 46 +++++------ .../goerli/RouterArbToGnosisDevnet.json | 24 +++--- .../goerli/RouterArbToGnosisTestnet.json | 22 ++--- .../goerli/RouterGnosisToArbDevnet.json | 36 ++++----- .../goerli/RouterGnosisToArbTestnet.json | 38 ++++----- .../goerli/VeaOutboxArbToEthDevnet.json | 70 ++++++++-------- .../goerli/VeaOutboxArbToEthTestnet.json | 68 ++++++++-------- 18 files changed, 332 insertions(+), 324 deletions(-) diff --git a/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts b/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts index 8c8711fd..29084355 100644 --- a/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts @@ -60,12 +60,6 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const chainId = Number(await getChainId()); console.log("deploying to chainId %s with deployer %s", chainId, deployer); - const senderNetworks = { - GNOSIS_MAINNET: config.networks.arbitrum, - GNOSIS_CHIADO: config.networks.arbitrumGoerli, - HARDHAT: config.networks.localhost, - }; - const routerNetworks = { GNOSIS_MAINNET: config.networks.mainnet, GNOSIS_CHIADO: config.networks.goerli, @@ -115,17 +109,11 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { // ---------------------------------------------------------------------------------------------- const liveDeployer = async () => { - const senderChainProvider = new providers.JsonRpcProvider(senderNetworks[ReceiverChains[chainId]].url); - let nonce = await senderChainProvider.getTransactionCount(deployer); - const routerChainProvider = new providers.JsonRpcProvider(routerNetworks[ReceiverChains[chainId]].url); let nonceRouter = await routerChainProvider.getTransactionCount(deployer); - const veaInboxAddress = getContractAddress(deployer, nonce); - console.log("calculated future veaInbox for nonce %d: %s", nonce, veaInboxAddress); - const routerAddress = getContractAddress(deployer, nonceRouter); - console.log("calculated future router for nonce %d: %s", nonce, routerAddress); + console.log("calculated future router for nonce %d: %s", nonceRouter, routerAddress); const txn = await deploy("VeaOutboxArbToGnosis" + (chainId === 100 ? "" : "Testnet"), { contract: "VeaOutboxArbToGnosis", diff --git a/contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts b/contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts index a7223292..685db93a 100644 --- a/contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts +++ b/contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts @@ -1,5 +1,6 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; +import getContractAddress from "../../deploy-helpers/getContractAddress"; enum SenderChains { ARBITRUM = 42161, @@ -9,11 +10,9 @@ enum SenderChains { const paramsByChainId = { ARBITRUM: { epochPeriod: 3600, // 1 hours - companion: (hre: HardhatRuntimeEnvironment) => hre.companionNetworks.gnosischain, }, ARBITRUM_GOERLI: { epochPeriod: 3600, // 1 hours - companion: (hre: HardhatRuntimeEnvironment) => hre.companionNetworks.chiado, }, HARDHAT: { epochPeriod: 1800, // 30 minutes @@ -22,25 +21,34 @@ const paramsByChainId = { // TODO: use deterministic deployments const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { - const { deployments, getNamedAccounts, getChainId } = hre; + const { ethers, deployments, getNamedAccounts, getChainId, config } = hre; const { deploy, execute } = deployments; const chainId = Number(await getChainId()); + const { providers } = ethers; const deployer = (await getNamedAccounts()).deployer; console.log("deployer: %s", deployer); - const { epochPeriod, companion } = paramsByChainId[SenderChains[chainId]]; + const { epochPeriod } = paramsByChainId[SenderChains[chainId]]; + + const routerNetworks = { + ARBITRUM: config.networks.mainnet, + ARBITRUM_GOERLI: config.networks.goerli, + HARDHAT: config.networks.localhost, + }; // ---------------------------------------------------------------------------------------------- - const veaOutboxGnosis = await companion(hre).deployments.get( - "VeaOutboxArbToGnosis" + (chainId === 42161 ? "" : "Testnet") - ); + const routerChainProvider = new providers.JsonRpcProvider(routerNetworks[SenderChains[chainId]].url); + let nonceRouter = await routerChainProvider.getTransactionCount(deployer); + + const routerAddress = getContractAddress(deployer, nonceRouter); + console.log("calculated future router for nonce %d: %s", nonceRouter, routerAddress); await deploy("VeaInboxArbToGnosis" + (chainId === 42161 ? "" : "Testnet"), { contract: "VeaInboxArbToGnosis", from: deployer, - args: [epochPeriod, veaOutboxGnosis.address], + args: [epochPeriod, routerAddress], log: true, }); }; diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json index 61b792bd..e38068db 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x935feC4B0bc8f48884f7315153839859832f385b", + "address": "0xE99C6177CD8731DE6F108443CcAf7449074f6aED", "abi": [ { "inputs": [ @@ -269,27 +269,27 @@ "type": "function" } ], - "transactionHash": "0xd480192016b3f73fa279d733c0c98822a2acb8c239d20f50d3246b50861cd672", + "transactionHash": "0xd1811f4a9df21c2275106cbb76fecb4742b1b4922b329639a6f49d2594a104d0", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x935feC4B0bc8f48884f7315153839859832f385b", + "contractAddress": "0xE99C6177CD8731DE6F108443CcAf7449074f6aED", "transactionIndex": 1, - "gasUsed": "683021", + "gasUsed": "682997", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xb9ee28ffdff0bcf64b899173ba7d59ab7d9b93dd7a6c1045e807eaab28852bee", - "transactionHash": "0xd480192016b3f73fa279d733c0c98822a2acb8c239d20f50d3246b50861cd672", + "blockHash": "0xf7bd950a57276b9f81f3f8f8b98c4cc97356e15f07c7d210d706e0fc0f9f1a82", + "transactionHash": "0xd1811f4a9df21c2275106cbb76fecb4742b1b4922b329639a6f49d2594a104d0", "logs": [], - "blockNumber": 28847721, - "cumulativeGasUsed": "683021", + "blockNumber": 29413389, + "cumulativeGasUsed": "682997", "status": 1, "byzantium": true }, "args": [ 1800, - "0x3D9356FF595C2151513DFc520380d5A178224564" + "0xDa528e9BE20a8A22437D28Ed6C63bb6d00Ad0032" ], - "numDeployments": 8, + "numDeployments": 9, "solcInputHash": "76a6a9e6371fade9c8f1066bebbf4e7c", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochFinalized\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochFinalized()\":{\"details\":\"Get the most recent epoch for which snapshots are finalized.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] internal inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the most recent epoch for which snapshots are finalized.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochFinalized() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x33b5ac67822e209e961ff08283894a63a21504b4f72513d0252b0549e2fa8823\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60c060405234801561001057600080fd5b50604051610c34380380610c3483398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b626100d26000396000818161012801526105e1015260008181610167015281816101c3015281816101f60152818161022c0152818161025c01526104ee0152610b626000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80635f85896c116100665780635f85896c14610110578063744b49bf14610123578063b5b7a18414610162578063c705e41214610189578063d6565a2d1461019c57600080fd5b806306661abd146100a3578063222ae786146100d55780633ac3b6b6146100eb5780634a439cfe146100f35780635192053514610106575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101bc565b6040519081526020016100cc565b6100dd6101ed565b6100dd6101013660046106bd565b610225565b61010e610257565b005b6100b761011e366004610762565b61037b565b61014a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010e61019736600461083b565b6104ec565b6100dd6101aa3660046106bd565b60006020819052908152604090205481565b60006101e87f000000000000000000000000000000000000000000000000000000000000000042610903565b905090565b6000600161021b7f000000000000000000000000000000000000000000000000000000000000000042610903565b6101e89190610925565b60006102517f000000000000000000000000000000000000000000000000000000000000000083610903565b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000004281610289576102896108ed565b604154919004925060009067ffffffffffffffff165b80156102d857806001166001036102cc57600182604081106102c3576102c3610946565b015492506102d8565b6001918201911c61029f565b60011c5b801561031a5760019182019181811690036103125761030f6001836040811061030757610307610946565b01548461068c565b92505b60011c6102dc565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103d25760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103ee90889033908990602001610980565b60408051601f198184030181529082905261040d9392916020016109b6565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610471576104596001836040811061030757610307610946565b92506001918201911c677fffffffffffffff16610438565b50816001826040811061048657610486610946565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104d9908490610a31565b60405180910390a1509095945050505050565b7f0000000000000000000000000000000000000000000000000000000000000000428161051b5761051b6108ed565b0482106105755760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084016103c9565b6000828152602081905260408082205490516105979185918590602401610a4b565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a9061060b907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ae7565b6020604051808303816000875af115801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e9190610b13565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6000818310156106aa57826000528160205260406000209050610251565b5060009081526020919091526040902090565b6000602082840312156106cf57600080fd5b5035919050565b80356001600160a01b03811681146106ed57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff8111828210171561072b5761072b6106f2565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561075a5761075a6106f2565b604052919050565b60008060006060848603121561077757600080fd5b610780846106d6565b92506020848101356001600160e01b03198116811461079e57600080fd5b9250604085013567ffffffffffffffff808211156107bb57600080fd5b818701915087601f8301126107cf57600080fd5b8135818111156107e1576107e16106f2565b6107f3601f8201601f19168501610731565b9150808252888482850101111561080957600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106ed57600080fd5b60008082840361010081121561085057600080fd5b8335925060e0601f198201121561086657600080fd5b5061086f610708565b60208401358152610882604085016106d6565b602082015261089360608501610827565b60408201526108a460808501610827565b60608201526108b560a08501610827565b608082015260c0840135600381106108cc57600080fd5b60a08201526108dd60e085016106d6565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261092057634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561025157634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561097757818101518382015260200161095f565b50506000910152565b63ffffffff60e01b84168152826004820152600082516109a781602485016020870161095c565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109f681601c85016020870161095c565b91909101601c01949350505050565b60008151808452610a1d81602086016020860161095c565b601f01601f19169290920160200192915050565b602081526000610a446020830184610a05565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610ac557634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610b0b90830184610a05565b949350505050565b600060208284031215610b2557600080fd5b505191905056fea2646970667358221220fcebfa85c5b6f37a90499aad0c9ea8735daf80b5be5a5b008c1bd00021e79e2564736f6c63430008120033", diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json index a7d9bbe0..12c4eb45 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToEthTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x0c45C5A1925085fF0672C1052f0b79D5e3ac2A78", + "address": "0x95100f56d040fD48AA52dcDD05A9Fc477d55bd2E", "abi": [ { "inputs": [ @@ -269,27 +269,27 @@ "type": "function" } ], - "transactionHash": "0xd8c08f7fe9f57228f4f408bb9c3f572edd2663c80b4e320a3da5fe89d7492c7a", + "transactionHash": "0xd652b8934b70673d0d2af1bece14ade123a1f3185275822292a7bb55a6318e45", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x0c45C5A1925085fF0672C1052f0b79D5e3ac2A78", + "contractAddress": "0x95100f56d040fD48AA52dcDD05A9Fc477d55bd2E", "transactionIndex": 1, "gasUsed": "683021", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xce4a8f4a784e3bb9f8de744d040981ecc401f6ea8d51383f74039eb083abf168", - "transactionHash": "0xd8c08f7fe9f57228f4f408bb9c3f572edd2663c80b4e320a3da5fe89d7492c7a", + "blockHash": "0xef3473c3d618b3819428e38f49799e1e230b7fd3f2946d4641a707b198913198", + "transactionHash": "0xd652b8934b70673d0d2af1bece14ade123a1f3185275822292a7bb55a6318e45", "logs": [], - "blockNumber": 28848440, + "blockNumber": 29413003, "cumulativeGasUsed": "683021", "status": 1, "byzantium": true }, "args": [ 7200, - "0x4738A566706eDd30Fe175e20eDDd21c5c7bD79Ea" + "0xDF216C98773DA7998EE49AE8106BFe9724cf2944" ], - "numDeployments": 6, + "numDeployments": 7, "solcInputHash": "76a6a9e6371fade9c8f1066bebbf4e7c", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochFinalized\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochFinalized()\":{\"details\":\"Get the most recent epoch for which snapshots are finalized.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] internal inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the most recent epoch for which snapshots are finalized.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochFinalized() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x33b5ac67822e209e961ff08283894a63a21504b4f72513d0252b0549e2fa8823\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60c060405234801561001057600080fd5b50604051610c34380380610c3483398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b626100d26000396000818161012801526105e1015260008181610167015281816101c3015281816101f60152818161022c0152818161025c01526104ee0152610b626000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80635f85896c116100665780635f85896c14610110578063744b49bf14610123578063b5b7a18414610162578063c705e41214610189578063d6565a2d1461019c57600080fd5b806306661abd146100a3578063222ae786146100d55780633ac3b6b6146100eb5780634a439cfe146100f35780635192053514610106575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101bc565b6040519081526020016100cc565b6100dd6101ed565b6100dd6101013660046106bd565b610225565b61010e610257565b005b6100b761011e366004610762565b61037b565b61014a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010e61019736600461083b565b6104ec565b6100dd6101aa3660046106bd565b60006020819052908152604090205481565b60006101e87f000000000000000000000000000000000000000000000000000000000000000042610903565b905090565b6000600161021b7f000000000000000000000000000000000000000000000000000000000000000042610903565b6101e89190610925565b60006102517f000000000000000000000000000000000000000000000000000000000000000083610903565b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000004281610289576102896108ed565b604154919004925060009067ffffffffffffffff165b80156102d857806001166001036102cc57600182604081106102c3576102c3610946565b015492506102d8565b6001918201911c61029f565b60011c5b801561031a5760019182019181811690036103125761030f6001836040811061030757610307610946565b01548461068c565b92505b60011c6102dc565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103d25760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103ee90889033908990602001610980565b60408051601f198184030181529082905261040d9392916020016109b6565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610471576104596001836040811061030757610307610946565b92506001918201911c677fffffffffffffff16610438565b50816001826040811061048657610486610946565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104d9908490610a31565b60405180910390a1509095945050505050565b7f0000000000000000000000000000000000000000000000000000000000000000428161051b5761051b6108ed565b0482106105755760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084016103c9565b6000828152602081905260408082205490516105979185918590602401610a4b565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a9061060b907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ae7565b6020604051808303816000875af115801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e9190610b13565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6000818310156106aa57826000528160205260406000209050610251565b5060009081526020919091526040902090565b6000602082840312156106cf57600080fd5b5035919050565b80356001600160a01b03811681146106ed57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff8111828210171561072b5761072b6106f2565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561075a5761075a6106f2565b604052919050565b60008060006060848603121561077757600080fd5b610780846106d6565b92506020848101356001600160e01b03198116811461079e57600080fd5b9250604085013567ffffffffffffffff808211156107bb57600080fd5b818701915087601f8301126107cf57600080fd5b8135818111156107e1576107e16106f2565b6107f3601f8201601f19168501610731565b9150808252888482850101111561080957600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106ed57600080fd5b60008082840361010081121561085057600080fd5b8335925060e0601f198201121561086657600080fd5b5061086f610708565b60208401358152610882604085016106d6565b602082015261089360608501610827565b60408201526108a460808501610827565b60608201526108b560a08501610827565b608082015260c0840135600381106108cc57600080fd5b60a08201526108dd60e085016106d6565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261092057634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561025157634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561097757818101518382015260200161095f565b50506000910152565b63ffffffff60e01b84168152826004820152600082516109a781602485016020870161095c565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109f681601c85016020870161095c565b91909101601c01949350505050565b60008151808452610a1d81602086016020860161095c565b601f01601f19169290920160200192915050565b602081526000610a446020830184610a05565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610ac557634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610b0b90830184610a05565b949350505050565b600060208284031215610b2557600080fd5b505191905056fea2646970667358221220fcebfa85c5b6f37a90499aad0c9ea8735daf80b5be5a5b008c1bd00021e79e2564736f6c63430008120033", diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json index 2f375681..812655f9 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x8179EBCA5D2EA4152ac61A5BCA7a1dc68f8BbF54", + "address": "0xf38b8739635d2F4cb38Bd453453AB9d41fD16300", "abi": [ { "inputs": [ @@ -274,27 +274,27 @@ "type": "function" } ], - "transactionHash": "0x98668e11b7bea5f2c3afc2354764cf0d3b9c7e0165306979539ae35110f88c3f", + "transactionHash": "0x3def95203f24ea92bc30bade034551bf02663c35879a48c851126c75fb4c8d53", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x8179EBCA5D2EA4152ac61A5BCA7a1dc68f8BbF54", + "contractAddress": "0xf38b8739635d2F4cb38Bd453453AB9d41fD16300", "transactionIndex": 1, "gasUsed": "687557", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x5ea2da8389755d0d35e805e7316c2526a8557c3a4464eda8d3ea0c2e4dc4c542", - "transactionHash": "0x98668e11b7bea5f2c3afc2354764cf0d3b9c7e0165306979539ae35110f88c3f", + "blockHash": "0x04372f62a3f701826ace773d1ae03bb9534cc04169175744a04f2a697ee161d5", + "transactionHash": "0x3def95203f24ea92bc30bade034551bf02663c35879a48c851126c75fb4c8d53", "logs": [], - "blockNumber": 28847798, + "blockNumber": 29413437, "cumulativeGasUsed": "687557", "status": 1, "byzantium": true }, "args": [ 1800, - "0xb0263478A46d885D715B01fbac745500B9576634" + "0x9481b3A49ac67d03D9022E6200eFD81850BADDB4" ], - "numDeployments": 8, + "numDeployments": 9, "solcInputHash": "76a6a9e6371fade9c8f1066bebbf4e7c", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochFinalized\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochFinalized()\":{\"details\":\"Get the most recent epoch for which snapshots are finalized.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_gasLimit\":\"The gas limit for the AMB transaction on Gnosis.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] internal inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _gasLimit The gas limit for the AMB transaction on Gnosis.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, uint256 _gasLimit, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToGnosis.route, (_epoch, snapshots[_epoch], _gasLimit, _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the most recent epoch for which snapshots are finalized.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochFinalized() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x30dad453fea95d78d7215ce3de9f423d975b394ab022f8f411e17a2ce736fc8d\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, uint256 _gasLimit, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x084735de7ee128aa169f11f18a4a7de6656309e941b8df502e66b24a4bf93d0f\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60c060405234801561001057600080fd5b50604051610c49380380610c4983398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b776100d26000396000818161014f01526105e3015260008181610128015281816101c3015281816101f60152818161022c0152818161025c01526104ee0152610b776000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80635f85896c116100665780635f85896c14610110578063b5b7a18414610123578063d5e6a9df1461014a578063d6565a2d14610189578063dc881a72146101a957600080fd5b806306661abd146100a3578063222ae786146100d55780633ac3b6b6146100eb5780634a439cfe146100f35780635192053514610106575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101bc565b6040519081526020016100cc565b6100dd6101ed565b6100dd6101013660046106c0565b610225565b61010e610257565b005b6100b761011e366004610765565b61037b565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101717f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101973660046106c0565b60006020819052908152604090205481565b61010e6101b736600461083e565b6104ec565b60006101e87f000000000000000000000000000000000000000000000000000000000000000042610910565b905090565b6000600161021b7f000000000000000000000000000000000000000000000000000000000000000042610910565b6101e89190610932565b60006102517f000000000000000000000000000000000000000000000000000000000000000083610910565b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000004281610289576102896108fa565b604154919004925060009067ffffffffffffffff165b80156102d857806001166001036102cc57600182604081106102c3576102c3610953565b015492506102d8565b6001918201911c61029f565b60011c5b801561031a5760019182019181811690036103125761030f6001836040811061030757610307610953565b01548461068f565b92505b60011c6102dc565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103d25760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103ee9088903390899060200161098d565b60408051601f198184030181529082905261040d9392916020016109c3565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610471576104596001836040811061030757610307610953565b92506001918201911c677fffffffffffffff16610438565b50816001826040811061048657610486610953565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104d9908490610a3e565b60405180910390a1509095945050505050565b7f0000000000000000000000000000000000000000000000000000000000000000428161051b5761051b6108fa565b0483106105755760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084016103c9565b60008381526020819052604080822054905161059991869186908690602401610a58565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a9061060d907f0000000000000000000000000000000000000000000000000000000000000000908690600401610afc565b6020604051808303816000875af115801561062c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106509190610b28565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6000818310156106ad57826000528160205260406000209050610251565b5060009081526020919091526040902090565b6000602082840312156106d257600080fd5b5035919050565b80356001600160a01b03811681146106f057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff8111828210171561072e5761072e6106f5565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561075d5761075d6106f5565b604052919050565b60008060006060848603121561077a57600080fd5b610783846106d9565b92506020848101356001600160e01b0319811681146107a157600080fd5b9250604085013567ffffffffffffffff808211156107be57600080fd5b818701915087601f8301126107d257600080fd5b8135818111156107e4576107e46106f5565b6107f6601f8201601f19168501610734565b9150808252888482850101111561080c57600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106f057600080fd5b600080600083850361012081121561085557600080fd5b843593506020850135925060e0603f198201121561087257600080fd5b5061087b61070b565b6040850135815261088e606086016106d9565b602082015261089f6080860161082a565b60408201526108b060a0860161082a565b60608201526108c160c0860161082a565b608082015260e0850135600381106108d857600080fd5b60a08201526108ea61010086016106d9565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261092d57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561025157634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561098457818101518382015260200161096c565b50506000910152565b63ffffffff60e01b84168152826004820152600082516109b4816024850160208701610969565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b16600882015260008251610a0381601c850160208701610969565b91909101601c01949350505050565b60008151808452610a2a816020860160208601610969565b601f01601f19169290920160200192915050565b602081526000610a516020830184610a12565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610ad857634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610b2090830184610a12565b949350505050565b600060208284031215610b3a57600080fd5b505191905056fea2646970667358221220e946b1562a2911d87273f6fe8d8a97409f3946f0bbe45ecb965c7172a235bce764736f6c63430008120033", diff --git a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json index d6005ec1..11f53844 100644 --- a/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaInboxArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0xdc201e4Ab6a25A17C1731D8bB7E56f89D0B86486", + "address": "0x4B4217FF81bdD7F163401147F67f770f55Cc2616", "abi": [ { "inputs": [ @@ -274,27 +274,27 @@ "type": "function" } ], - "transactionHash": "0x3314b20994c687aa8de214cfd19c044dabe425d69ed4ec09dd18cf751705c9af", + "transactionHash": "0xa896762801473261212bac972e0433ae468825804ea6085789f7a0e67a4f107a", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xdc201e4Ab6a25A17C1731D8bB7E56f89D0B86486", + "contractAddress": "0x4B4217FF81bdD7F163401147F67f770f55Cc2616", "transactionIndex": 1, "gasUsed": "687569", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x61eebae35c801a84002f759b4f47a43ebe548547b827950ef4480809bed3047a", - "transactionHash": "0x3314b20994c687aa8de214cfd19c044dabe425d69ed4ec09dd18cf751705c9af", + "blockHash": "0x45e6a386bb7d127c4a3967807f1cad6fc6ceb133048d28a6a0270769c4869797", + "transactionHash": "0xa896762801473261212bac972e0433ae468825804ea6085789f7a0e67a4f107a", "logs": [], - "blockNumber": 28848501, + "blockNumber": 32793107, "cumulativeGasUsed": "687569", "status": 1, "byzantium": true }, "args": [ 3600, - "0xE8ea62d3a4F06301016b9C23Ace108F3D8027839" + "0xD75dB719B04842174cDB7b1d8C6f60957ab6A25E" ], - "numDeployments": 6, + "numDeployments": 11, "solcInputHash": "76a6a9e6371fade9c8f1066bebbf4e7c", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochFinalized\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Gnosis. Note: This contract is deployed on the Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerArbToGnosis\":\"The router on Ethereum that routes from Arbitrum to Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochFinalized()\":{\"details\":\"Get the most recent epoch for which snapshots are finalized.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_gasLimit\":\"The gas limit for the AMB transaction on Gnosis.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":\"VeaInboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaInboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on the Arbitrum.\\ncontract VeaInboxArbToGnosis is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerArbToGnosis; // The router on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] internal inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Gnosis.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToGnosis contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerArbToGnosis The router on Ethereum that routes from Arbitrum to Gnosis.\\n constructor(uint256 _epochPeriod, address _routerArbToGnosis) {\\n epochPeriod = _epochPeriod;\\n routerArbToGnosis = _routerArbToGnosis;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _gasLimit The gas limit for the AMB transaction on Gnosis.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, uint256 _gasLimit, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IRouterToGnosis.route, (_epoch, snapshots[_epoch], _gasLimit, _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(routerArbToGnosis, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the most recent epoch for which snapshots are finalized.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochFinalized() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x30dad453fea95d78d7215ce3de9f423d975b394ab022f8f411e17a2ce736fc8d\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, uint256 _gasLimit, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x084735de7ee128aa169f11f18a4a7de6656309e941b8df502e66b24a4bf93d0f\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60c060405234801561001057600080fd5b50604051610c49380380610c4983398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b776100d26000396000818161014f01526105e3015260008181610128015281816101c3015281816101f60152818161022c0152818161025c01526104ee0152610b776000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80635f85896c116100665780635f85896c14610110578063b5b7a18414610123578063d5e6a9df1461014a578063d6565a2d14610189578063dc881a72146101a957600080fd5b806306661abd146100a3578063222ae786146100d55780633ac3b6b6146100eb5780634a439cfe146100f35780635192053514610106575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101bc565b6040519081526020016100cc565b6100dd6101ed565b6100dd6101013660046106c0565b610225565b61010e610257565b005b6100b761011e366004610765565b61037b565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b6101717f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd6101973660046106c0565b60006020819052908152604090205481565b61010e6101b736600461083e565b6104ec565b60006101e87f000000000000000000000000000000000000000000000000000000000000000042610910565b905090565b6000600161021b7f000000000000000000000000000000000000000000000000000000000000000042610910565b6101e89190610932565b60006102517f000000000000000000000000000000000000000000000000000000000000000083610910565b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000004281610289576102896108fa565b604154919004925060009067ffffffffffffffff165b80156102d857806001166001036102cc57600182604081106102c3576102c3610953565b015492506102d8565b6001918201911c61029f565b60011c5b801561031a5760019182019181811690036103125761030f6001836040811061030757610307610953565b01548461068f565b92505b60011c6102dc565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103d25760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103ee9088903390899060200161098d565b60408051601f198184030181529082905261040d9392916020016109c3565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610471576104596001836040811061030757610307610953565b92506001918201911c677fffffffffffffff16610438565b50816001826040811061048657610486610953565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104d9908490610a3e565b60405180910390a1509095945050505050565b7f0000000000000000000000000000000000000000000000000000000000000000428161051b5761051b6108fa565b0483106105755760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084016103c9565b60008381526020819052604080822054905161059991869186908690602401610a58565b60408051601f198184030181529181526020820180516001600160e01b031663b1126dad60e01b179052516349460b4d60e11b815290915060009060649063928c169a9061060d907f0000000000000000000000000000000000000000000000000000000000000000908690600401610afc565b6020604051808303816000875af115801561062c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106509190610b28565b60405181815290915085907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a25050505050565b6000818310156106ad57826000528160205260406000209050610251565b5060009081526020919091526040902090565b6000602082840312156106d257600080fd5b5035919050565b80356001600160a01b03811681146106f057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff8111828210171561072e5761072e6106f5565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561075d5761075d6106f5565b604052919050565b60008060006060848603121561077a57600080fd5b610783846106d9565b92506020848101356001600160e01b0319811681146107a157600080fd5b9250604085013567ffffffffffffffff808211156107be57600080fd5b818701915087601f8301126107d257600080fd5b8135818111156107e4576107e46106f5565b6107f6601f8201601f19168501610734565b9150808252888482850101111561080c57600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106f057600080fd5b600080600083850361012081121561085557600080fd5b843593506020850135925060e0603f198201121561087257600080fd5b5061087b61070b565b6040850135815261088e606086016106d9565b602082015261089f6080860161082a565b60408201526108b060a0860161082a565b60608201526108c160c0860161082a565b608082015260e0850135600381106108d857600080fd5b60a08201526108ea61010086016106d9565b60c0820152809150509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261092d57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561025157634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561098457818101518382015260200161096c565b50506000910152565b63ffffffff60e01b84168152826004820152600082516109b4816024850160208701610969565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b16600882015260008251610a0381601c850160208701610969565b91909101601c01949350505050565b60008151808452610a2a816020860160208601610969565b601f01601f19169290920160200192915050565b602081526000610a516020830184610a12565b9392505050565b6000610140820190508582528460208301528360408301528251606083015260018060a01b036020840151166080830152604083015163ffffffff80821660a08501528060608601511660c08501528060808601511660e0850152505060a083015160038110610ad857634e487b7160e01b600052602160045260246000fd5b61010083015260c092909201516001600160a01b0316610120909101529392505050565b6001600160a01b0383168152604060208201819052600090610b2090830184610a12565b949350505050565b600060208284031215610b3a57600080fd5b505191905056fea2646970667358221220e946b1562a2911d87273f6fe8d8a97409f3946f0bbe45ecb965c7172a235bce764736f6c63430008120033", diff --git a/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbDevnet.json b/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbDevnet.json index cae5a640..932fdc97 100644 --- a/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbDevnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x8Da07C6D68F17d7BbC8B42D59Bc9EEE90e9dD621", + "address": "0xE14fA0B3910CB0853E811375B9a6fcEEE32db521", "abi": [ { "inputs": [ @@ -46,7 +46,7 @@ "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "_epoch", "type": "uint256" @@ -103,7 +103,7 @@ "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "_epoch", "type": "uint256" @@ -170,6 +170,11 @@ "internalType": "uint256", "name": "_epoch", "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_disputedStateRoot", + "type": "bytes32" } ], "name": "challenge", @@ -647,19 +652,19 @@ "type": "function" } ], - "transactionHash": "0x5e21264c60c98d3ee54493bbe0369ad5fa51ae269a1853b136d6147f2d8a15d0", + "transactionHash": "0x846e791b916c3b4189e457d2d8d747bdf2203bc8409583c7af551f30334f213e", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x8Da07C6D68F17d7BbC8B42D59Bc9EEE90e9dD621", + "contractAddress": "0xE14fA0B3910CB0853E811375B9a6fcEEE32db521", "transactionIndex": 1, - "gasUsed": "1856900", + "gasUsed": "1837679", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x3efbe3b821039811299b5d3e64a6236899c3d439dcc27b54ebe294fb15fd94d9", - "transactionHash": "0x5e21264c60c98d3ee54493bbe0369ad5fa51ae269a1853b136d6147f2d8a15d0", + "blockHash": "0x8d57dd60353456c04e59db28a70609ebaf1c3ef97bdeecaab7e95e982321e226", + "transactionHash": "0x846e791b916c3b4189e457d2d8d747bdf2203bc8409583c7af551f30334f213e", "logs": [], - "blockNumber": 28847864, - "cumulativeGasUsed": "1856900", + "blockNumber": 29413497, + "cumulativeGasUsed": "1837679", "status": 1, "byzantium": true }, @@ -668,15 +673,15 @@ 1800, 0, 10000000000000, - "0xb7d2C76641B21718cC8A0b595be438c863A6e031", + "0xcC196cC90bD30109E39400817e6ef63A1b744659", 86400, 3600 ], - "numDeployments": 9, - "solcInputHash": "556bdf5fc9689e29dc99949f21bc913e", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerFutureLimit\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"challengers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claims\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"enum VeaOutboxGnosisToArb.Party\",\"name\":\"honest\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositPlusReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_msgId\",\"type\":\"uint256\"}],\"name\":\"isMsgRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRelayed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampFutureUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Chiado to ArbitrumGoerli. Note: This contract is deployed on ArbitrumGoerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer delay limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new max sequencer past timestamping power.\"}},\"sequencerFutureLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer futue limit updated.\",\"params\":{\"_newSequencerFutureLimit\":\"The new max sequencer future timestamping power.\"}}},\"kind\":\"dev\",\"methods\":{\"challenge(uint256)\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_routerGnosisToArb\":\"The address of the router on Ethereum that routes from Arbitrum to Ethereum.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_sequencerFutureLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"isMsgRelayed(uint256)\":{\"details\":\"Get the msg relayed status.\",\"params\":{\"_msgId\":\"The msgId to check.\"},\"returns\":{\"isRelayed\":\"True if the msg was relayed.\"}},\"resolveDisputedClaim(uint256,bytes32)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Arbitrum to call.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"updateSequencerFutureLimit(uint256,uint256)\":{\"details\":\"Set the sequencerFutureLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerFutureLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256)\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32)\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol\":\"VeaOutboxGnosisToArbDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/AddressAliasHelper.sol\":{\"content\":\"// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/libraries/AddressAliasHelper.sol\\n// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressAliasHelper {\\n uint160 internal 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\",\"keccak256\":\"0xfa8b6907a33c37e13b3de6e2459d6bd153708be4b8413db3c319ea3a5d8c9b00\",\"license\":\"BUSL-1.1\"},\"src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../gnosisToArbitrum/VeaOutboxGnosisToArb.sol\\\";\\n\\n/// @dev Vea Outbox From Chiado to ArbitrumGoerli.\\n/// Note: This contract is deployed on ArbitrumGoerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxGnosisToArbDevnet is VeaOutboxGnosisToArb {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) public override {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) public override OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n verifySnapshot(_epoch);\\n withdrawClaimDeposit(_epoch);\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit\\n )\\n VeaOutboxGnosisToArb(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _routerGnosisToArb,\\n _sequencerDelayLimit,\\n _sequencerFutureLimit\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x8c8b56464ddec74b6dfa3859a19feb1d25b630a58ec12cd943674a9881258cf5\",\"license\":\"MIT\"},\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/AddressAliasHelper.sol\\\";\\n\\n/// @dev Vea Outbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaOutboxGnosisToArb is IVeaOutboxOnL2 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public immutable routerGnosisToArb; // The address of the router from Gnosis to Arbitrum on Ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 public immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 public immutable depositPlusReward; // 2 * deposit - burn\\n\\n address public constant BURN_ADDRESS = address(0); // address to send burned eth\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable challengePeriod; // Claim challenge timewindow.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n uint256 public timestampFutureUpdated; // The timestamp of the last sequencer future update.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => Claim) public claims; // epoch => claim\\n mapping(uint256 => address) public challengers; // epoch => challenger\\n mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n enum Party {\\n None,\\n Claimer,\\n Challenger\\n }\\n\\n struct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestamp;\\n Party honest;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer delay limit updated.\\n /// @param _newSequencerDelayLimit The new max sequencer past timestamping power.\\n event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates the sequencer futue limit updated.\\n /// @param _newSequencerFutureLimit The new max sequencer future timestamping power.\\n event sequencerFutureLimitUpdateReceived(uint256 _newSequencerFutureLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit\\n ) {\\n deposit = _deposit;\\n epochPeriod = _epochPeriod;\\n challengePeriod = _challengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n routerGnosisToArb = _routerGnosisToArb;\\n sequencerDelayLimit = _sequencerDelayLimit;\\n sequencerFutureLimit = _sequencerFutureLimit;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerFutureLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerFutureLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampFutureUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerFutureLimit != _newSequencerFutureLimit) {\\n sequencerFutureLimit = _newSequencerFutureLimit;\\n timestampFutureUpdated = _timestamp;\\n emit sequencerFutureLimitUpdateReceived(_newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Set the sequencerDelayLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n unchecked {\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch is invalid.\\\");\\n }\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n function challenge(uint256 _epoch) external payable virtual {\\n require(challengers[_epoch] == address(0), \\\"Claim already challenged.\\\");\\n require(claims[_epoch].claimer != address(0), \\\"No claim for epoch.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n\\n challengers[_epoch] = msg.sender;\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) external virtual OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external virtual OnlyBridgeRunning {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n bytes32 claimedStateRoot = claims[_epoch].stateRoot;\\n\\n if (claimedStateRoot != bytes32(0)) {\\n if (claimedStateRoot == _stateRoot) {\\n claims[_epoch].honest = Party.Claimer;\\n } else if (challengers[_epoch] != address(0)) {\\n claims[_epoch].honest = Party.Challenger;\\n }\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Arbitrum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] memory _proof, uint64 _msgId, address _to, bytes memory _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) external virtual {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n function withdrawChallengeDeposit(uint256 _epoch) external {\\n require(claims[_epoch].honest == Party.Challenger, \\\"Challenge unsuccessful.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete claims[_epoch];\\n delete challengers[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (claimer != address(0)) {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawChallengerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete challengers[_epoch];\\n\\n if (challenger != address(0)) {\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the msg relayed status.\\n /// @param _msgId The msgId to check.\\n /// @return isRelayed True if the msg was relayed.\\n function isMsgRelayed(uint256 _msgId) external view returns(bool isRelayed) {\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1));\\n }\\n}\\n\",\"keccak256\":\"0xeb5a83ca5bd7d80f7cb115dc09851e4d25530e985e0b9a759e5d758f1a1732cb\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101606040523480156200001257600080fd5b50604051620021df380380620021df8339810160408190526200003591620000e1565b60a08790526101008690526101208590526101408490526001600160a01b03831660805260008290556001819055868686868686866200007760028862000167565b60c0819052620000898860026200018a565b620000959190620001aa565b60e05261010051600190620000ab904262000167565b620000b79190620001aa565b6005555050600980546001600160a01b0319163317905550620001c09a5050505050505050505050565b600080600080600080600060e0888a031215620000fd57600080fd5b8751602089015160408a015160608b015160808c0151939a50919850965094506001600160a01b03811681146200013357600080fd5b8093505060a0880151915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200018557634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001a457620001a462000151565b92915050565b81810381811115620001a457620001a462000151565b60805160a05160c05160e051610100516101205161014051611f07620002d860003960008181610578015281816106e001528181610e80015281816111b001526115b601526000818161068701526112ff0152600081816105ac015281816107040152818161086101528181610ea401528181611002015281816111d401526115da0152600081816104540152818161112b0152611aa701526000818161031c015281816110ea0152611a660152600081816105e0015281816108210152818161098a01528181610b6901528181610b9601528181610fc3015281816111760152818161183b015281816119070152611934015260008181610640015281816108960152818161144e01526116550152611f076000f3fe6080604052600436106101ee5760003560e01c8063836e344b1161010d578063b5b7a184116100a0578063eb8dedfa1161006f578063eb8dedfa1461062e578063eedcf2a914610662578063f3f480d914610675578063f4cf751b146106a9578063fccc2813146106c957600080fd5b8063b5b7a1841461059a578063d0e30db0146105ce578063d6e01b3914610602578063e813a7551461061857600080fd5b80639588eca2116100dc5780639588eca2146104d6578063a888c2cd146104ec578063ab82d9a014610553578063b044397e1461056657600080fd5b8063836e344b146104425780638a619a71146104765780638ad3a8f7146104965780638caeb7a8146104b657600080fd5b806344df8e70116101855780636496284911610154578063649628491461039e5780636b45ebcb146103be578063710cc9a71461040c5780637ffc2a6e1461042c57600080fd5b806344df8e701461030a5780634518f79f1461033e5780634a439cfe1461035e57806350b81dbe1461037e57600080fd5b80632c192519116101c15780632c1925191461026957806331d144571461028957806331ddf7431461029c57806343b066d5146102bc57600080fd5b80630e56752e146101f3578063114095d31461021c578063222ae7861461023e57806327ee6bdd14610253575b600080fd5b3480156101ff57600080fd5b5061020960015481565b6040519081526020015b60405180910390f35b34801561022857600080fd5b5061023c610237366004611ae2565b6106de565b005b34801561024a57600080fd5b5061020961085a565b34801561025f57600080fd5b5061020960055481565b34801561027557600080fd5b5061023c610284366004611afb565b61088b565b61023c610297366004611afb565b610971565b3480156102a857600080fd5b5061023c6102b7366004611c08565b610bdf565b3480156102c857600080fd5b506102fa6102d7366004611ae2565b600881811c60009081526020919091526040902054600160ff9092161c81161490565b6040519015158152602001610213565b34801561031657600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b34801561034a57600080fd5b5061023c610359366004611ae2565b610e7e565b34801561036a57600080fd5b50610209610379366004611ae2565b610ffb565b34801561038a57600080fd5b5061023c610399366004611ae2565b61102d565b3480156103aa57600080fd5b5061023c6103b9366004611ae2565b6111ae565b3480156103ca57600080fd5b506103f46103d9366004611ae2565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610213565b34801561041857600080fd5b5061023c610427366004611afb565b611443565b34801561043857600080fd5b5061020960025481565b34801561044e57600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b34801561048257600080fd5b5061023c610491366004611cf4565b611521565b3480156104a257600080fd5b506009546103f4906001600160a01b031681565b3480156104c257600080fd5b5061023c6104d1366004611afb565b6115b4565b3480156104e257600080fd5b5061020960045481565b3480156104f857600080fd5b50610543610507366004611ae2565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516102139493929190611d2c565b61023c610561366004611ae2565b611777565b34801561057257600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a657600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b3480156105da57600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b34801561060e57600080fd5b5061020960035481565b34801561062457600080fd5b5061020960005481565b34801561063a57600080fd5b506103f47f000000000000000000000000000000000000000000000000000000000000000081565b61023c610670366004611afb565b61197d565b34801561068157600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b3480156106b557600080fd5b5061023c6106c4366004611ae2565b611999565b3480156106d557600080fd5b506103f4600081565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161073157610731611d7b565b0403116107775760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff1660028111156107a5576107a5611d16565b146107e45760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161076e565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b03168015610856576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006108867f000000000000000000000000000000000000000000000000000000000000000042611da7565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146108de5760405162461bcd60e51b815260040161076e90611dc9565b80600254106109265760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161076e565b816000541461085657600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6009546001600160a01b0316331461098857600080fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156109f85760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e0000000000604482015260640161076e565b80610a365760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161076e565b6000828152600660205260409020600101546001600160a01b031615610a945760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161076e565b6040805160808101825282815233602080830191825263ffffffff4281168486019081526000606086018181528982526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610b2957610b29611d16565b02179055505060405182815283915033907fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d579060200160405180910390a37f0000000000000000000000000000000000000000000000000000000000000000341115610856576000610bbb7f000000000000000000000000000000000000000000000000000000000000000034611e00565b604051909150339082156108fc029083906000818181858888f15050505050505050565b6040845110610c225760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161076e565b6000838383604051602001610c3993929190611e43565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610cbb576000868281518110610c7c57610c7c611e85565b6020026020010151905082811115610ca257826000528060205260406000209250610cb2565b8060005282602052604060002092505b50600101610c5f565b508060045414610cfe5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161076e565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610d755760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161076e565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610da3908890611e9b565b6000604051808303816000865af19150503d8060008114610de0576040519150601f19603f3d011682016040523d82523d6000602084013e610de5565b606091505b5050905080610e365760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161076e565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f00000000000000000000000000000000000000000000000000000000000000004281610ed157610ed1611d7b565b040311610f125760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161076e565b60008082815260066020526040902060010154600160c01b900460ff166002811115610f4057610f40611d16565b14610f7f5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161076e565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b03168015610856576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006110277f000000000000000000000000000000000000000000000000000000000000000083611da7565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff16600281111561105c5761105c611d16565b1461109f5760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b604482015260640161076e565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b03918216911615611166576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161120157611201611d7b565b040311156112445760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161076e565b600081815260066020526040902060010154600160a01b900463ffffffff16806112a15760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161076e565b6000828152600760205260409020546001600160a01b0316156112fd5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161076e565b7f000000000000000000000000000000000000000000000000000000000000000060015460005460026113309190611ea7565b61133a9190611ebe565b6113449190611ebe565b61134e8242611e00565b10156113c25760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e000000000000000000606482015260840161076e565b60055482111561141e5760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f7906114159084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146114965760405162461bcd60e51b815260040161076e90611dc9565b80600354106114de5760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161076e565b816001541461085657600182905560038190556040518281527f5328ca176e0092ea14be7c843a94b093c0fe88c93d9c01ab0f0281d9e62e405590602001610965565b6009546001600160a01b0316331461153857600080fd5b6009546001600160a01b031633146115925760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f720000000000000000604482015260640161076e565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161160757611607611d7b565b0403111561164a5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161076e565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461169d5760405162461bcd60e51b815260040161076e90611dc9565b600554821180156116ad57508015155b156116f057600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b6000828152600660205260409020548015611772578181036117325750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b031615611772576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b0316156117dc5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161076e565b6000818152600660205260409020600101546001600160a01b03166118395760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b604482015260640161076e565b7f00000000000000000000000000000000000000000000000000000000000000003410156118a95760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e00604482015260640161076e565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7906118fd9084815260200190565b60405180910390a27f000000000000000000000000000000000000000000000000000000000000000034111561197a5760006119597f000000000000000000000000000000000000000000000000000000000000000034611e00565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b6119878282610971565b611990826111ae565b6108568261102d565b6002600082815260066020526040902060010154600160c01b900460ff1660028111156119c8576119c8611d16565b14611a155760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e000000000000000000604482015260640161076e565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600060208284031215611af457600080fd5b5035919050565b60008060408385031215611b0e57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611b5c57611b5c611b1d565b604052919050565b803567ffffffffffffffff81168114611b7c57600080fd5b919050565b80356001600160a01b0381168114611b7c57600080fd5b600082601f830112611ba957600080fd5b813567ffffffffffffffff811115611bc357611bc3611b1d565b611bd6601f8201601f1916602001611b33565b818152846020838601011115611beb57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611c1e57600080fd5b843567ffffffffffffffff80821115611c3657600080fd5b818701915087601f830112611c4a57600080fd5b8135602082821115611c5e57611c5e611b1d565b8160051b611c6d828201611b33565b928352848101820192828101908c851115611c8757600080fd5b958301955b84871015611ca557863582529583019590830190611c8c565b9950611cb5915050898201611b64565b96505050611cc560408801611b81565b93506060870135915080821115611cdb57600080fd5b50611ce887828801611b98565b91505092959194509250565b600060208284031215611d0657600080fd5b611d0f82611b81565b9392505050565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611d6c57634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611dc457634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b8181038181111561102757611027611d91565b6000815160005b81811015611e345760208185018101518683015201611e1a565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611e7c601c830184611e13565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611d0f8284611e13565b808202811582820484141761102757611027611d91565b8082018082111561102757611027611d9156fea2646970667358221220c6ccf20f30d0818d2c2f4feb9ef7fc3d66f9bb2fa7b7b01d57181b1ecc86abcb64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101ee5760003560e01c8063836e344b1161010d578063b5b7a184116100a0578063eb8dedfa1161006f578063eb8dedfa1461062e578063eedcf2a914610662578063f3f480d914610675578063f4cf751b146106a9578063fccc2813146106c957600080fd5b8063b5b7a1841461059a578063d0e30db0146105ce578063d6e01b3914610602578063e813a7551461061857600080fd5b80639588eca2116100dc5780639588eca2146104d6578063a888c2cd146104ec578063ab82d9a014610553578063b044397e1461056657600080fd5b8063836e344b146104425780638a619a71146104765780638ad3a8f7146104965780638caeb7a8146104b657600080fd5b806344df8e70116101855780636496284911610154578063649628491461039e5780636b45ebcb146103be578063710cc9a71461040c5780637ffc2a6e1461042c57600080fd5b806344df8e701461030a5780634518f79f1461033e5780634a439cfe1461035e57806350b81dbe1461037e57600080fd5b80632c192519116101c15780632c1925191461026957806331d144571461028957806331ddf7431461029c57806343b066d5146102bc57600080fd5b80630e56752e146101f3578063114095d31461021c578063222ae7861461023e57806327ee6bdd14610253575b600080fd5b3480156101ff57600080fd5b5061020960015481565b6040519081526020015b60405180910390f35b34801561022857600080fd5b5061023c610237366004611ae2565b6106de565b005b34801561024a57600080fd5b5061020961085a565b34801561025f57600080fd5b5061020960055481565b34801561027557600080fd5b5061023c610284366004611afb565b61088b565b61023c610297366004611afb565b610971565b3480156102a857600080fd5b5061023c6102b7366004611c08565b610bdf565b3480156102c857600080fd5b506102fa6102d7366004611ae2565b600881811c60009081526020919091526040902054600160ff9092161c81161490565b6040519015158152602001610213565b34801561031657600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b34801561034a57600080fd5b5061023c610359366004611ae2565b610e7e565b34801561036a57600080fd5b50610209610379366004611ae2565b610ffb565b34801561038a57600080fd5b5061023c610399366004611ae2565b61102d565b3480156103aa57600080fd5b5061023c6103b9366004611ae2565b6111ae565b3480156103ca57600080fd5b506103f46103d9366004611ae2565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610213565b34801561041857600080fd5b5061023c610427366004611afb565b611443565b34801561043857600080fd5b5061020960025481565b34801561044e57600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b34801561048257600080fd5b5061023c610491366004611cf4565b611521565b3480156104a257600080fd5b506009546103f4906001600160a01b031681565b3480156104c257600080fd5b5061023c6104d1366004611afb565b6115b4565b3480156104e257600080fd5b5061020960045481565b3480156104f857600080fd5b50610543610507366004611ae2565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516102139493929190611d2c565b61023c610561366004611ae2565b611777565b34801561057257600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a657600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b3480156105da57600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b34801561060e57600080fd5b5061020960035481565b34801561062457600080fd5b5061020960005481565b34801561063a57600080fd5b506103f47f000000000000000000000000000000000000000000000000000000000000000081565b61023c610670366004611afb565b61197d565b34801561068157600080fd5b506102097f000000000000000000000000000000000000000000000000000000000000000081565b3480156106b557600080fd5b5061023c6106c4366004611ae2565b611999565b3480156106d557600080fd5b506103f4600081565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161073157610731611d7b565b0403116107775760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff1660028111156107a5576107a5611d16565b146107e45760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161076e565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b03168015610856576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006108867f000000000000000000000000000000000000000000000000000000000000000042611da7565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146108de5760405162461bcd60e51b815260040161076e90611dc9565b80600254106109265760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161076e565b816000541461085657600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6009546001600160a01b0316331461098857600080fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156109f85760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e0000000000604482015260640161076e565b80610a365760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161076e565b6000828152600660205260409020600101546001600160a01b031615610a945760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161076e565b6040805160808101825282815233602080830191825263ffffffff4281168486019081526000606086018181528982526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610b2957610b29611d16565b02179055505060405182815283915033907fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d579060200160405180910390a37f0000000000000000000000000000000000000000000000000000000000000000341115610856576000610bbb7f000000000000000000000000000000000000000000000000000000000000000034611e00565b604051909150339082156108fc029083906000818181858888f15050505050505050565b6040845110610c225760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161076e565b6000838383604051602001610c3993929190611e43565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610cbb576000868281518110610c7c57610c7c611e85565b6020026020010151905082811115610ca257826000528060205260406000209250610cb2565b8060005282602052604060002092505b50600101610c5f565b508060045414610cfe5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161076e565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610d755760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161076e565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610da3908890611e9b565b6000604051808303816000865af19150503d8060008114610de0576040519150601f19603f3d011682016040523d82523d6000602084013e610de5565b606091505b5050905080610e365760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161076e565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f00000000000000000000000000000000000000000000000000000000000000004281610ed157610ed1611d7b565b040311610f125760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161076e565b60008082815260066020526040902060010154600160c01b900460ff166002811115610f4057610f40611d16565b14610f7f5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161076e565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b03168015610856576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006110277f000000000000000000000000000000000000000000000000000000000000000083611da7565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff16600281111561105c5761105c611d16565b1461109f5760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b604482015260640161076e565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b03918216911615611166576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161120157611201611d7b565b040311156112445760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161076e565b600081815260066020526040902060010154600160a01b900463ffffffff16806112a15760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161076e565b6000828152600760205260409020546001600160a01b0316156112fd5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161076e565b7f000000000000000000000000000000000000000000000000000000000000000060015460005460026113309190611ea7565b61133a9190611ebe565b6113449190611ebe565b61134e8242611e00565b10156113c25760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e000000000000000000606482015260840161076e565b60055482111561141e5760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f7906114159084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146114965760405162461bcd60e51b815260040161076e90611dc9565b80600354106114de5760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161076e565b816001541461085657600182905560038190556040518281527f5328ca176e0092ea14be7c843a94b093c0fe88c93d9c01ab0f0281d9e62e405590602001610965565b6009546001600160a01b0316331461153857600080fd5b6009546001600160a01b031633146115925760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f720000000000000000604482015260640161076e565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161160757611607611d7b565b0403111561164a5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161076e565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461169d5760405162461bcd60e51b815260040161076e90611dc9565b600554821180156116ad57508015155b156116f057600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b6000828152600660205260409020548015611772578181036117325750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b031615611772576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b0316156117dc5760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161076e565b6000818152600660205260409020600101546001600160a01b03166118395760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b604482015260640161076e565b7f00000000000000000000000000000000000000000000000000000000000000003410156118a95760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e00604482015260640161076e565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7906118fd9084815260200190565b60405180910390a27f000000000000000000000000000000000000000000000000000000000000000034111561197a5760006119597f000000000000000000000000000000000000000000000000000000000000000034611e00565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b6119878282610971565b611990826111ae565b6108568261102d565b6002600082815260066020526040902060010154600160c01b900460ff1660028111156119c8576119c8611d16565b14611a155760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e000000000000000000604482015260640161076e565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600060208284031215611af457600080fd5b5035919050565b60008060408385031215611b0e57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611b5c57611b5c611b1d565b604052919050565b803567ffffffffffffffff81168114611b7c57600080fd5b919050565b80356001600160a01b0381168114611b7c57600080fd5b600082601f830112611ba957600080fd5b813567ffffffffffffffff811115611bc357611bc3611b1d565b611bd6601f8201601f1916602001611b33565b818152846020838601011115611beb57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611c1e57600080fd5b843567ffffffffffffffff80821115611c3657600080fd5b818701915087601f830112611c4a57600080fd5b8135602082821115611c5e57611c5e611b1d565b8160051b611c6d828201611b33565b928352848101820192828101908c851115611c8757600080fd5b958301955b84871015611ca557863582529583019590830190611c8c565b9950611cb5915050898201611b64565b96505050611cc560408801611b81565b93506060870135915080821115611cdb57600080fd5b50611ce887828801611b98565b91505092959194509250565b600060208284031215611d0657600080fd5b611d0f82611b81565b9392505050565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611d6c57634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611dc457634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b8181038181111561102757611027611d91565b6000815160005b81811015611e345760208185018101518683015201611e1a565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611e7c601c830184611e13565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611d0f8284611e13565b808202811582820484141761102757611027611d91565b8082018082111561102757611027611d9156fea2646970667358221220c6ccf20f30d0818d2c2f4feb9ef7fc3d66f9bb2fa7b7b01d57181b1ecc86abcb64736f6c63430008120033", + "numDeployments": 10, + "solcInputHash": "18d8b299616ba6ea1bb506a660a35de5", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerFutureLimit\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_disputedStateRoot\",\"type\":\"bytes32\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"challengers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claims\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"enum VeaOutboxGnosisToArb.Party\",\"name\":\"honest\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositPlusReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_msgId\",\"type\":\"uint256\"}],\"name\":\"isMsgRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRelayed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampFutureUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Chiado to ArbitrumGoerli. Note: This contract is deployed on ArbitrumGoerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer delay limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new max sequencer past timestamping power.\"}},\"sequencerFutureLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer futue limit updated.\",\"params\":{\"_newSequencerFutureLimit\":\"The new max sequencer future timestamping power.\"}}},\"kind\":\"dev\",\"methods\":{\"challenge(uint256,bytes32)\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_disputedStateRoot\":\"The claimed state root to challenge, included to ensure txn reverts if claim is removed due to a block reorg.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_routerGnosisToArb\":\"The address of the router on Ethereum that routes from Arbitrum to Ethereum.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_sequencerFutureLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"isMsgRelayed(uint256)\":{\"details\":\"Get the msg relayed status.\",\"params\":{\"_msgId\":\"The msgId to check.\"},\"returns\":{\"isRelayed\":\"True if the msg was relayed.\"}},\"resolveDisputedClaim(uint256,bytes32)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Arbitrum to call.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"updateSequencerFutureLimit(uint256,uint256)\":{\"details\":\"Set the sequencerFutureLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerFutureLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256)\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32)\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol\":\"VeaOutboxGnosisToArbDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/AddressAliasHelper.sol\":{\"content\":\"// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/libraries/AddressAliasHelper.sol\\n// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressAliasHelper {\\n uint160 internal 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\",\"keccak256\":\"0xfa8b6907a33c37e13b3de6e2459d6bd153708be4b8413db3c319ea3a5d8c9b00\",\"license\":\"BUSL-1.1\"},\"src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../gnosisToArbitrum/VeaOutboxGnosisToArb.sol\\\";\\n\\n/// @dev Vea Outbox From Chiado to ArbitrumGoerli.\\n/// Note: This contract is deployed on ArbitrumGoerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxGnosisToArbDevnet is VeaOutboxGnosisToArb {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) public override {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) public override OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n verifySnapshot(_epoch);\\n withdrawClaimDeposit(_epoch);\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit\\n )\\n VeaOutboxGnosisToArb(\\n _deposit,\\n _epochPeriod,\\n _challengePeriod,\\n _timeoutEpochs,\\n _routerGnosisToArb,\\n _sequencerDelayLimit,\\n _sequencerFutureLimit\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x8c8b56464ddec74b6dfa3859a19feb1d25b630a58ec12cd943674a9881258cf5\",\"license\":\"MIT\"},\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/AddressAliasHelper.sol\\\";\\n\\n/// @dev Vea Outbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaOutboxGnosisToArb is IVeaOutboxOnL2 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public immutable routerGnosisToArb; // The address of the router from Gnosis to Arbitrum on Ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 public immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 public immutable depositPlusReward; // 2 * deposit - burn\\n\\n address public constant BURN_ADDRESS = address(0); // address to send burned eth\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable challengePeriod; // Claim challenge timewindow.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n uint256 public timestampFutureUpdated; // The timestamp of the last sequencer future update.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => Claim) public claims; // epoch => claim\\n mapping(uint256 => address) public challengers; // epoch => challenger\\n mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n enum Party {\\n None,\\n Claimer,\\n Challenger\\n }\\n\\n struct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestamp;\\n Party honest;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 indexed _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 indexed _epoch);\\n\\n /// @dev This event indicates the sequencer delay limit updated.\\n /// @param _newSequencerDelayLimit The new max sequencer past timestamping power.\\n event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates the sequencer futue limit updated.\\n /// @param _newSequencerFutureLimit The new max sequencer future timestamping power.\\n event sequencerFutureLimitUpdateReceived(uint256 _newSequencerFutureLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit\\n ) {\\n deposit = _deposit;\\n epochPeriod = _epochPeriod;\\n challengePeriod = _challengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n routerGnosisToArb = _routerGnosisToArb;\\n sequencerDelayLimit = _sequencerDelayLimit;\\n sequencerFutureLimit = _sequencerFutureLimit;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerFutureLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerFutureLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampFutureUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerFutureLimit != _newSequencerFutureLimit) {\\n sequencerFutureLimit = _newSequencerFutureLimit;\\n timestampFutureUpdated = _timestamp;\\n emit sequencerFutureLimitUpdateReceived(_newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Set the sequencerDelayLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n unchecked {\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch is invalid.\\\");\\n }\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _disputedStateRoot The claimed state root to challenge, included to ensure txn reverts if claim is removed due to a block reorg.\\n function challenge(uint256 _epoch, bytes32 _disputedStateRoot) external payable virtual {\\n require(challengers[_epoch] == address(0), \\\"Claim already challenged.\\\");\\n require(claims[_epoch].stateRoot == _disputedStateRoot, \\\"No claim for epoch.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n\\n challengers[_epoch] = msg.sender;\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) external virtual OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external virtual OnlyBridgeRunning {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n bytes32 claimedStateRoot = claims[_epoch].stateRoot;\\n\\n if (claimedStateRoot != bytes32(0)) {\\n if (claimedStateRoot == _stateRoot) {\\n claims[_epoch].honest = Party.Claimer;\\n } else if (challengers[_epoch] != address(0)) {\\n claims[_epoch].honest = Party.Challenger;\\n }\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Arbitrum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] memory _proof, uint64 _msgId, address _to, bytes memory _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) external virtual {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n function withdrawChallengeDeposit(uint256 _epoch) external {\\n require(claims[_epoch].honest == Party.Challenger, \\\"Challenge unsuccessful.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete claims[_epoch];\\n delete challengers[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (claimer != address(0)) {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawChallengerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete challengers[_epoch];\\n\\n if (challenger != address(0)) {\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the msg relayed status.\\n /// @param _msgId The msgId to check.\\n /// @return isRelayed True if the msg was relayed.\\n function isMsgRelayed(uint256 _msgId) external view returns (bool isRelayed) {\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1));\\n }\\n}\\n\",\"keccak256\":\"0x5ade88ecc27d6f259a80429cca2e3d457235638a5297d266c55875f5d848f27b\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101606040523480156200001257600080fd5b5060405162002186380380620021868339810160408190526200003591620000e1565b60a08790526101008690526101208590526101408490526001600160a01b03831660805260008290556001819055868686868686866200007760028862000167565b60c0819052620000898860026200018a565b620000959190620001aa565b60e05261010051600190620000ab904262000167565b620000b79190620001aa565b6005555050600980546001600160a01b0319163317905550620001c09a5050505050505050505050565b600080600080600080600060e0888a031215620000fd57600080fd5b8751602089015160408a015160608b015160808c0151939a50919850965094506001600160a01b03811681146200013357600080fd5b8093505060a0880151915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200018557634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001a457620001a462000151565b92915050565b81810381811115620001a457620001a462000151565b60805160a05160c05160e051610100516101205161014051611eae620002d860003960008181610578015281816108d20152818161104801528181611378015261176b01526000818161068701526114c70152600081816105ac015281816108f601528181610a4d0152818161106c015281816111ca0152818161139c015261178f015260008181610467015281816112f30152611a4e01526000818161032f015281816112b20152611a0d0152600081816105e00152818161079d015281816108590152818161088601528181610a0e01528181610b7601528181610d5501528181610d820152818161118b015261133e01526000818161064001528181610a8201528181611603015261180a0152611eae6000f3fe6080604052600436106101ee5760003560e01c80637ffc2a6e1161010d578063b5b7a184116100a0578063eb8dedfa1161006f578063eb8dedfa1461062e578063eedcf2a914610662578063f3f480d914610675578063f4cf751b146106a9578063fccc2813146106c957600080fd5b8063b5b7a1841461059a578063d0e30db0146105ce578063d6e01b3914610602578063e813a7551461061857600080fd5b80638caeb7a8116100dc5780638caeb7a8146104c95780639588eca2146104e9578063a888c2cd146104ff578063b044397e1461056657600080fd5b80637ffc2a6e1461043f578063836e344b146104555780638a619a71146104895780638ad3a8f7146104a957600080fd5b806343b066d51161018557806350b81dbe1161015457806350b81dbe1461039157806364962849146103b15780636b45ebcb146103d1578063710cc9a71461041f57600080fd5b806343b066d5146102cf57806344df8e701461031d5780634518f79f146103515780634a439cfe1461037157600080fd5b806327ee6bdd116101c157806327ee6bdd146102665780632c1925191461027c57806331d144571461029c57806331ddf743146102af57600080fd5b806302b2f7c7146101f35780630e56752e14610208578063114095d314610231578063222ae78614610251575b600080fd5b610206610201366004611a89565b6106de565b005b34801561021457600080fd5b5061021e60015481565b6040519081526020015b60405180910390f35b34801561023d57600080fd5b5061020661024c366004611aab565b6108d0565b34801561025d57600080fd5b5061021e610a46565b34801561027257600080fd5b5061021e60055481565b34801561028857600080fd5b50610206610297366004611a89565b610a77565b6102066102aa366004611a89565b610b5d565b3480156102bb57600080fd5b506102066102ca366004611baf565b610da7565b3480156102db57600080fd5b5061030d6102ea366004611aab565b600881811c60009081526020919091526040902054600160ff9092161c81161490565b6040519015158152602001610228565b34801561032957600080fd5b5061021e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561035d57600080fd5b5061020661036c366004611aab565b611046565b34801561037d57600080fd5b5061021e61038c366004611aab565b6111c3565b34801561039d57600080fd5b506102066103ac366004611aab565b6111f5565b3480156103bd57600080fd5b506102066103cc366004611aab565b611376565b3480156103dd57600080fd5b506104076103ec366004611aab565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610228565b34801561042b57600080fd5b5061020661043a366004611a89565b6115f8565b34801561044b57600080fd5b5061021e60025481565b34801561046157600080fd5b5061021e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561049557600080fd5b506102066104a4366004611c9b565b6116d6565b3480156104b557600080fd5b50600954610407906001600160a01b031681565b3480156104d557600080fd5b506102066104e4366004611a89565b611769565b3480156104f557600080fd5b5061021e60045481565b34801561050b57600080fd5b5061055661051a366004611aab565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516102289493929190611cd3565b34801561057257600080fd5b5061021e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a657600080fd5b5061021e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105da57600080fd5b5061021e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561060e57600080fd5b5061021e60035481565b34801561062457600080fd5b5061021e60005481565b34801561063a57600080fd5b506104077f000000000000000000000000000000000000000000000000000000000000000081565b610206610670366004611a89565b611924565b34801561068157600080fd5b5061021e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156106b557600080fd5b506102066106c4366004611aab565b611940565b3480156106d557600080fd5b50610407600081565b6000828152600760205260409020546001600160a01b0316156107485760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064015b60405180910390fd5b600082815260066020526040902054811461079b5760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b604482015260640161073f565b7f000000000000000000000000000000000000000000000000000000000000000034101561080b5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e00604482015260640161073f565b60008281526007602052604080822080546001600160a01b031916339081179091559051909184917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d79190a37f00000000000000000000000000000000000000000000000000000000000000003411156108cc5760006108ab7f000000000000000000000000000000000000000000000000000000000000000034611d38565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161092357610923611d4b565b0403116109645760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161073f565b60008082815260066020526040902060010154600160c01b900460ff16600281111561099257610992611cbd565b146109d15760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161073f565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b031680156108cc576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6000610a727f000000000000000000000000000000000000000000000000000000000000000042611d61565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b01011614610aca5760405162461bcd60e51b815260040161073f90611d83565b8060025410610b125760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161073f565b81600054146108cc57600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6009546001600160a01b03163314610b7457600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610be45760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e0000000000604482015260640161073f565b80610c225760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161073f565b6000828152600660205260409020600101546001600160a01b031615610c805760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161073f565b6040805160808101825282815233602080830191825263ffffffff4281168486019081526000606086018181528982526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610d1557610d15611cbd565b02179055505060405182815283915033907fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d579060200160405180910390a37f00000000000000000000000000000000000000000000000000000000000000003411156108cc5760006108ab7f000000000000000000000000000000000000000000000000000000000000000034611d38565b6040845110610dea5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161073f565b6000838383604051602001610e0193929190611dea565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610e83576000868281518110610e4457610e44611e2c565b6020026020010151905082811115610e6a57826000528060205260406000209250610e7a565b8060005282602052604060002092505b50600101610e27565b508060045414610ec65760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161073f565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610f3d5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161073f565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610f6b908890611e42565b6000604051808303816000865af19150503d8060008114610fa8576040519150601f19603f3d011682016040523d82523d6000602084013e610fad565b606091505b5050905080610ffe5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161073f565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161109957611099611d4b565b0403116110da5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161073f565b60008082815260066020526040902060010154600160c01b900460ff16600281111561110857611108611cbd565b146111475760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161073f565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b031680156108cc576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006111ef7f000000000000000000000000000000000000000000000000000000000000000083611d61565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff16600281111561122457611224611cbd565b146112675760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b604482015260640161073f565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b0391821691161561132e576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f000000000000000000000000000000000000000000000000000000000000000042816113c9576113c9611d4b565b0403111561140c5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161073f565b600081815260066020526040902060010154600160a01b900463ffffffff16806114695760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161073f565b6000828152600760205260409020546001600160a01b0316156114c55760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161073f565b7f000000000000000000000000000000000000000000000000000000000000000060015460005460026114f89190611e4e565b6115029190611e65565b61150c9190611e65565b6115168242611d38565b101561158a5760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e000000000000000000606482015260840161073f565b6005548211156115d3576005829055600082815260066020526040808220546004555183917ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f791a25b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461164b5760405162461bcd60e51b815260040161073f90611d83565b80600354106116935760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161073f565b81600154146108cc57600182905560038190556040518281527f5328ca176e0092ea14be7c843a94b093c0fe88c93d9c01ab0f0281d9e62e405590602001610b51565b6009546001600160a01b031633146116ed57600080fd5b6009546001600160a01b031633146117475760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f720000000000000000604482015260640161073f565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006005547f000000000000000000000000000000000000000000000000000000000000000042816117bc576117bc611d4b565b040311156117ff5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161073f565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146118525760405162461bcd60e51b815260040161073f90611d83565b6005548211801561186257508015155b1561189d576005829055600481905560405182907ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f790600090a25b600082815260066020526040902054801561191f578181036118df5750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b03161561191f576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b61192e8282610b5d565b61193782611376565b6108cc826111f5565b6002600082815260066020526040902060010154600160c01b900460ff16600281111561196f5761196f611cbd565b146119bc5760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e000000000000000000604482015260640161073f565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b60008060408385031215611a9c57600080fd5b50508035926020909101359150565b600060208284031215611abd57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611b0357611b03611ac4565b604052919050565b803567ffffffffffffffff81168114611b2357600080fd5b919050565b80356001600160a01b0381168114611b2357600080fd5b600082601f830112611b5057600080fd5b813567ffffffffffffffff811115611b6a57611b6a611ac4565b611b7d601f8201601f1916602001611ada565b818152846020838601011115611b9257600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611bc557600080fd5b843567ffffffffffffffff80821115611bdd57600080fd5b818701915087601f830112611bf157600080fd5b8135602082821115611c0557611c05611ac4565b8160051b611c14828201611ada565b928352848101820192828101908c851115611c2e57600080fd5b958301955b84871015611c4c57863582529583019590830190611c33565b9950611c5c915050898201611b0b565b96505050611c6c60408801611b28565b93506060870135915080821115611c8257600080fd5b50611c8f87828801611b3f565b91505092959194509250565b600060208284031215611cad57600080fd5b611cb682611b28565b9392505050565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611d1357634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156111ef576111ef611d22565b634e487b7160e01b600052601260045260246000fd5b600082611d7e57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b6000815160005b81811015611ddb5760208185018101518683015201611dc1565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611e23601c830184611dba565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611cb68284611dba565b80820281158282048414176111ef576111ef611d22565b808201808211156111ef576111ef611d2256fea2646970667358221220386d791c31a21c841928d78e81eafdfac0bf780f1b11812b6ce5bce9f12587fe64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101ee5760003560e01c80637ffc2a6e1161010d578063b5b7a184116100a0578063eb8dedfa1161006f578063eb8dedfa1461062e578063eedcf2a914610662578063f3f480d914610675578063f4cf751b146106a9578063fccc2813146106c957600080fd5b8063b5b7a1841461059a578063d0e30db0146105ce578063d6e01b3914610602578063e813a7551461061857600080fd5b80638caeb7a8116100dc5780638caeb7a8146104c95780639588eca2146104e9578063a888c2cd146104ff578063b044397e1461056657600080fd5b80637ffc2a6e1461043f578063836e344b146104555780638a619a71146104895780638ad3a8f7146104a957600080fd5b806343b066d51161018557806350b81dbe1161015457806350b81dbe1461039157806364962849146103b15780636b45ebcb146103d1578063710cc9a71461041f57600080fd5b806343b066d5146102cf57806344df8e701461031d5780634518f79f146103515780634a439cfe1461037157600080fd5b806327ee6bdd116101c157806327ee6bdd146102665780632c1925191461027c57806331d144571461029c57806331ddf743146102af57600080fd5b806302b2f7c7146101f35780630e56752e14610208578063114095d314610231578063222ae78614610251575b600080fd5b610206610201366004611a89565b6106de565b005b34801561021457600080fd5b5061021e60015481565b6040519081526020015b60405180910390f35b34801561023d57600080fd5b5061020661024c366004611aab565b6108d0565b34801561025d57600080fd5b5061021e610a46565b34801561027257600080fd5b5061021e60055481565b34801561028857600080fd5b50610206610297366004611a89565b610a77565b6102066102aa366004611a89565b610b5d565b3480156102bb57600080fd5b506102066102ca366004611baf565b610da7565b3480156102db57600080fd5b5061030d6102ea366004611aab565b600881811c60009081526020919091526040902054600160ff9092161c81161490565b6040519015158152602001610228565b34801561032957600080fd5b5061021e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561035d57600080fd5b5061020661036c366004611aab565b611046565b34801561037d57600080fd5b5061021e61038c366004611aab565b6111c3565b34801561039d57600080fd5b506102066103ac366004611aab565b6111f5565b3480156103bd57600080fd5b506102066103cc366004611aab565b611376565b3480156103dd57600080fd5b506104076103ec366004611aab565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610228565b34801561042b57600080fd5b5061020661043a366004611a89565b6115f8565b34801561044b57600080fd5b5061021e60025481565b34801561046157600080fd5b5061021e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561049557600080fd5b506102066104a4366004611c9b565b6116d6565b3480156104b557600080fd5b50600954610407906001600160a01b031681565b3480156104d557600080fd5b506102066104e4366004611a89565b611769565b3480156104f557600080fd5b5061021e60045481565b34801561050b57600080fd5b5061055661051a366004611aab565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516102289493929190611cd3565b34801561057257600080fd5b5061021e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a657600080fd5b5061021e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105da57600080fd5b5061021e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561060e57600080fd5b5061021e60035481565b34801561062457600080fd5b5061021e60005481565b34801561063a57600080fd5b506104077f000000000000000000000000000000000000000000000000000000000000000081565b610206610670366004611a89565b611924565b34801561068157600080fd5b5061021e7f000000000000000000000000000000000000000000000000000000000000000081565b3480156106b557600080fd5b506102066106c4366004611aab565b611940565b3480156106d557600080fd5b50610407600081565b6000828152600760205260409020546001600160a01b0316156107485760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064015b60405180910390fd5b600082815260066020526040902054811461079b5760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b604482015260640161073f565b7f000000000000000000000000000000000000000000000000000000000000000034101561080b5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e00604482015260640161073f565b60008281526007602052604080822080546001600160a01b031916339081179091559051909184917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d79190a37f00000000000000000000000000000000000000000000000000000000000000003411156108cc5760006108ab7f000000000000000000000000000000000000000000000000000000000000000034611d38565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161092357610923611d4b565b0403116109645760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161073f565b60008082815260066020526040902060010154600160c01b900460ff16600281111561099257610992611cbd565b146109d15760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161073f565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b031680156108cc576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6000610a727f000000000000000000000000000000000000000000000000000000000000000042611d61565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b01011614610aca5760405162461bcd60e51b815260040161073f90611d83565b8060025410610b125760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161073f565b81600054146108cc57600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b6009546001600160a01b03163314610b7457600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610be45760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e0000000000604482015260640161073f565b80610c225760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161073f565b6000828152600660205260409020600101546001600160a01b031615610c805760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161073f565b6040805160808101825282815233602080830191825263ffffffff4281168486019081526000606086018181528982526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610d1557610d15611cbd565b02179055505060405182815283915033907fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d579060200160405180910390a37f00000000000000000000000000000000000000000000000000000000000000003411156108cc5760006108ab7f000000000000000000000000000000000000000000000000000000000000000034611d38565b6040845110610dea5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161073f565b6000838383604051602001610e0193929190611dea565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610e83576000868281518110610e4457610e44611e2c565b6020026020010151905082811115610e6a57826000528060205260406000209250610e7a565b8060005282602052604060002092505b50600101610e27565b508060045414610ec65760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161073f565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610f3d5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161073f565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610f6b908890611e42565b6000604051808303816000865af19150503d8060008114610fa8576040519150601f19603f3d011682016040523d82523d6000602084013e610fad565b606091505b5050905080610ffe5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161073f565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161109957611099611d4b565b0403116110da5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161073f565b60008082815260066020526040902060010154600160c01b900460ff16600281111561110857611108611cbd565b146111475760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161073f565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b031680156108cc576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006111ef7f000000000000000000000000000000000000000000000000000000000000000083611d61565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff16600281111561122457611224611cbd565b146112675760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b604482015260640161073f565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b0391821691161561132e576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f000000000000000000000000000000000000000000000000000000000000000042816113c9576113c9611d4b565b0403111561140c5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161073f565b600081815260066020526040902060010154600160a01b900463ffffffff16806114695760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b604482015260640161073f565b6000828152600760205260409020546001600160a01b0316156114c55760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161073f565b7f000000000000000000000000000000000000000000000000000000000000000060015460005460026114f89190611e4e565b6115029190611e65565b61150c9190611e65565b6115168242611d38565b101561158a5760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e000000000000000000606482015260840161073f565b6005548211156115d3576005829055600082815260066020526040808220546004555183917ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f791a25b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461164b5760405162461bcd60e51b815260040161073f90611d83565b80600354106116935760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161073f565b81600154146108cc57600182905560038190556040518281527f5328ca176e0092ea14be7c843a94b093c0fe88c93d9c01ab0f0281d9e62e405590602001610b51565b6009546001600160a01b031633146116ed57600080fd5b6009546001600160a01b031633146117475760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f720000000000000000604482015260640161073f565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006005547f000000000000000000000000000000000000000000000000000000000000000042816117bc576117bc611d4b565b040311156117ff5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161073f565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146118525760405162461bcd60e51b815260040161073f90611d83565b6005548211801561186257508015155b1561189d576005829055600481905560405182907ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f790600090a25b600082815260066020526040902054801561191f578181036118df5750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b03161561191f576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b61192e8282610b5d565b61193782611376565b6108cc826111f5565b6002600082815260066020526040902060010154600160c01b900460ff16600281111561196f5761196f611cbd565b146119bc5760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e000000000000000000604482015260640161073f565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b60008060408385031215611a9c57600080fd5b50508035926020909101359150565b600060208284031215611abd57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611b0357611b03611ac4565b604052919050565b803567ffffffffffffffff81168114611b2357600080fd5b919050565b80356001600160a01b0381168114611b2357600080fd5b600082601f830112611b5057600080fd5b813567ffffffffffffffff811115611b6a57611b6a611ac4565b611b7d601f8201601f1916602001611ada565b818152846020838601011115611b9257600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611bc557600080fd5b843567ffffffffffffffff80821115611bdd57600080fd5b818701915087601f830112611bf157600080fd5b8135602082821115611c0557611c05611ac4565b8160051b611c14828201611ada565b928352848101820192828101908c851115611c2e57600080fd5b958301955b84871015611c4c57863582529583019590830190611c33565b9950611c5c915050898201611b0b565b96505050611c6c60408801611b28565b93506060870135915080821115611c8257600080fd5b50611c8f87828801611b3f565b91505092959194509250565b600060208284031215611cad57600080fd5b611cb682611b28565b9392505050565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611d1357634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156111ef576111ef611d22565b634e487b7160e01b600052601260045260246000fd5b600082611d7e57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b6000815160005b81811015611ddb5760208185018101518683015201611dc1565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611e23601c830184611dba565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611cb68284611dba565b80820281158282048414176111ef576111ef611d22565b808201808211156111ef576111ef611d2256fea2646970667358221220386d791c31a21c841928d78e81eafdfac0bf780f1b11812b6ce5bce9f12587fe64736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Chiado to ArbitrumGoerli. Note: This contract is deployed on ArbitrumGoerli. Note: This contract is permissioned for developer testing (devnet).", "events": { @@ -722,9 +727,10 @@ }, "kind": "dev", "methods": { - "challenge(uint256)": { + "challenge(uint256,bytes32)": { "details": "Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.", "params": { + "_disputedStateRoot": "The claimed state root to challenge, included to ensure txn reverts if claim is removed due to a block reorg.", "_epoch": "The epoch of the claim to challenge." } }, @@ -856,7 +862,7 @@ "storageLayout": { "storage": [ { - "astId": 5535, + "astId": 4294, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "sequencerDelayLimit", "offset": 0, @@ -864,7 +870,7 @@ "type": "t_uint256" }, { - "astId": 5537, + "astId": 4296, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "sequencerFutureLimit", "offset": 0, @@ -872,7 +878,7 @@ "type": "t_uint256" }, { - "astId": 5539, + "astId": 4298, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "timestampDelayUpdated", "offset": 0, @@ -880,7 +886,7 @@ "type": "t_uint256" }, { - "astId": 5541, + "astId": 4300, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "timestampFutureUpdated", "offset": 0, @@ -888,7 +894,7 @@ "type": "t_uint256" }, { - "astId": 5543, + "astId": 4302, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "stateRoot", "offset": 0, @@ -896,7 +902,7 @@ "type": "t_bytes32" }, { - "astId": 5545, + "astId": 4304, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "latestVerifiedEpoch", "offset": 0, @@ -904,15 +910,15 @@ "type": "t_uint256" }, { - "astId": 5550, + "astId": 4309, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "claims", "offset": 0, "slot": "6", - "type": "t_mapping(t_uint256,t_struct(Claim)5572_storage)" + "type": "t_mapping(t_uint256,t_struct(Claim)4331_storage)" }, { - "astId": 5554, + "astId": 4313, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "challengers", "offset": 0, @@ -920,7 +926,7 @@ "type": "t_mapping(t_uint256,t_address)" }, { - "astId": 5558, + "astId": 4317, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "relayed", "offset": 0, @@ -928,7 +934,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 4757, + "astId": 3938, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "devnetOperator", "offset": 0, @@ -947,7 +953,7 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_enum(Party)5562": { + "t_enum(Party)4321": { "encoding": "inplace", "label": "enum VeaOutboxGnosisToArb.Party", "numberOfBytes": "1" @@ -966,19 +972,19 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_mapping(t_uint256,t_struct(Claim)5572_storage)": { + "t_mapping(t_uint256,t_struct(Claim)4331_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct VeaOutboxGnosisToArb.Claim)", "numberOfBytes": "32", - "value": "t_struct(Claim)5572_storage" + "value": "t_struct(Claim)4331_storage" }, - "t_struct(Claim)5572_storage": { + "t_struct(Claim)4331_storage": { "encoding": "inplace", "label": "struct VeaOutboxGnosisToArb.Claim", "members": [ { - "astId": 5564, + "astId": 4323, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "stateRoot", "offset": 0, @@ -986,7 +992,7 @@ "type": "t_bytes32" }, { - "astId": 5566, + "astId": 4325, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "claimer", "offset": 0, @@ -994,7 +1000,7 @@ "type": "t_address" }, { - "astId": 5568, + "astId": 4327, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "timestamp", "offset": 20, @@ -1002,12 +1008,12 @@ "type": "t_uint32" }, { - "astId": 5571, + "astId": 4330, "contract": "src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol:VeaOutboxGnosisToArbDevnet", "label": "honest", "offset": 24, "slot": "1", - "type": "t_enum(Party)5562" + "type": "t_enum(Party)4321" } ], "numberOfBytes": "64" diff --git a/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbTestnet.json b/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbTestnet.json index 581252b5..f749bfe8 100644 --- a/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbTestnet.json +++ b/contracts/deployments/arbitrumGoerli/VeaOutboxGnosisToArbTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x62581B897330CA4044C4db79Ebe96ca230569492", + "address": "0x18AB70ea8dBc7072D1C1C90bA0bC1547d92198CF", "abi": [ { "inputs": [ @@ -46,7 +46,7 @@ "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "_epoch", "type": "uint256" @@ -103,7 +103,7 @@ "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "_epoch", "type": "uint256" @@ -170,6 +170,11 @@ "internalType": "uint256", "name": "_epoch", "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_disputedStateRoot", + "type": "bytes32" } ], "name": "challenge", @@ -603,19 +608,19 @@ "type": "function" } ], - "transactionHash": "0x1695e89203559d6480d0030faa38c09dd543701116e9649f23da040c9961e1a3", + "transactionHash": "0xce5e6121a5f97ecc4879e53ac01c81e76edda2ff561b6bae320eae44c39ae4ad", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x62581B897330CA4044C4db79Ebe96ca230569492", + "contractAddress": "0x18AB70ea8dBc7072D1C1C90bA0bC1547d92198CF", "transactionIndex": 1, - "gasUsed": "1785672", + "gasUsed": "1766439", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x8fe19c396efc5cd46140a9ed03e1a3bee904aec2f3e5e9675073f67719888d6a", - "transactionHash": "0x1695e89203559d6480d0030faa38c09dd543701116e9649f23da040c9961e1a3", + "blockHash": "0x81f6ce4228226eab44ba0bc14ffd43352e7bd87729631884852ee5937cf5d4cb", + "transactionHash": "0xce5e6121a5f97ecc4879e53ac01c81e76edda2ff561b6bae320eae44c39ae4ad", "logs": [], - "blockNumber": 28848665, - "cumulativeGasUsed": "1785672", + "blockNumber": 29413141, + "cumulativeGasUsed": "1766439", "status": 1, "byzantium": true }, @@ -624,15 +629,15 @@ 7200, 86400, 168, - "0x84de475fed07406aA3B05248f1a7b0Fca11DA012", + "0x6bC3C7Bcd2C6C2d8BFEAA3642c425cAE25F7fe17", 86400, 3600 ], - "numDeployments": 7, - "solcInputHash": "556bdf5fc9689e29dc99949f21bc913e", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerFutureLimit\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"challengers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claims\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"enum VeaOutboxGnosisToArb.Party\",\"name\":\"honest\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositPlusReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_msgId\",\"type\":\"uint256\"}],\"name\":\"isMsgRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRelayed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampFutureUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Gnosis to Arbitrum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer delay limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new max sequencer past timestamping power.\"}},\"sequencerFutureLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer futue limit updated.\",\"params\":{\"_newSequencerFutureLimit\":\"The new max sequencer future timestamping power.\"}}},\"kind\":\"dev\",\"methods\":{\"challenge(uint256)\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_routerGnosisToArb\":\"The address of the router on Ethereum that routes from Arbitrum to Ethereum.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_sequencerFutureLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"isMsgRelayed(uint256)\":{\"details\":\"Get the msg relayed status.\",\"params\":{\"_msgId\":\"The msgId to check.\"},\"returns\":{\"isRelayed\":\"True if the msg was relayed.\"}},\"resolveDisputedClaim(uint256,bytes32)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Arbitrum to call.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"updateSequencerFutureLimit(uint256,uint256)\":{\"details\":\"Set the sequencerFutureLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerFutureLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256)\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32)\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":\"VeaOutboxGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/AddressAliasHelper.sol\":{\"content\":\"// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/libraries/AddressAliasHelper.sol\\n// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressAliasHelper {\\n uint160 internal 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\",\"keccak256\":\"0xfa8b6907a33c37e13b3de6e2459d6bd153708be4b8413db3c319ea3a5d8c9b00\",\"license\":\"BUSL-1.1\"},\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/AddressAliasHelper.sol\\\";\\n\\n/// @dev Vea Outbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaOutboxGnosisToArb is IVeaOutboxOnL2 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public immutable routerGnosisToArb; // The address of the router from Gnosis to Arbitrum on Ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 public immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 public immutable depositPlusReward; // 2 * deposit - burn\\n\\n address public constant BURN_ADDRESS = address(0); // address to send burned eth\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable challengePeriod; // Claim challenge timewindow.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n uint256 public timestampFutureUpdated; // The timestamp of the last sequencer future update.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => Claim) public claims; // epoch => claim\\n mapping(uint256 => address) public challengers; // epoch => challenger\\n mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n enum Party {\\n None,\\n Claimer,\\n Challenger\\n }\\n\\n struct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestamp;\\n Party honest;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer delay limit updated.\\n /// @param _newSequencerDelayLimit The new max sequencer past timestamping power.\\n event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates the sequencer futue limit updated.\\n /// @param _newSequencerFutureLimit The new max sequencer future timestamping power.\\n event sequencerFutureLimitUpdateReceived(uint256 _newSequencerFutureLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit\\n ) {\\n deposit = _deposit;\\n epochPeriod = _epochPeriod;\\n challengePeriod = _challengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n routerGnosisToArb = _routerGnosisToArb;\\n sequencerDelayLimit = _sequencerDelayLimit;\\n sequencerFutureLimit = _sequencerFutureLimit;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerFutureLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerFutureLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampFutureUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerFutureLimit != _newSequencerFutureLimit) {\\n sequencerFutureLimit = _newSequencerFutureLimit;\\n timestampFutureUpdated = _timestamp;\\n emit sequencerFutureLimitUpdateReceived(_newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Set the sequencerDelayLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n unchecked {\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch is invalid.\\\");\\n }\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n function challenge(uint256 _epoch) external payable virtual {\\n require(challengers[_epoch] == address(0), \\\"Claim already challenged.\\\");\\n require(claims[_epoch].claimer != address(0), \\\"No claim for epoch.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n\\n challengers[_epoch] = msg.sender;\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) external virtual OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external virtual OnlyBridgeRunning {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n bytes32 claimedStateRoot = claims[_epoch].stateRoot;\\n\\n if (claimedStateRoot != bytes32(0)) {\\n if (claimedStateRoot == _stateRoot) {\\n claims[_epoch].honest = Party.Claimer;\\n } else if (challengers[_epoch] != address(0)) {\\n claims[_epoch].honest = Party.Challenger;\\n }\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Arbitrum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] memory _proof, uint64 _msgId, address _to, bytes memory _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) external virtual {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n function withdrawChallengeDeposit(uint256 _epoch) external {\\n require(claims[_epoch].honest == Party.Challenger, \\\"Challenge unsuccessful.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete claims[_epoch];\\n delete challengers[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (claimer != address(0)) {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawChallengerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete challengers[_epoch];\\n\\n if (challenger != address(0)) {\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the msg relayed status.\\n /// @param _msgId The msgId to check.\\n /// @return isRelayed True if the msg was relayed.\\n function isMsgRelayed(uint256 _msgId) external view returns(bool isRelayed) {\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1));\\n }\\n}\\n\",\"keccak256\":\"0xeb5a83ca5bd7d80f7cb115dc09851e4d25530e985e0b9a759e5d758f1a1732cb\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101606040523480156200001257600080fd5b50604051620020e6380380620020e68339810160408190526200003591620000c1565b60a08790526101008690526101208590526101408490526001600160a01b038316608052600082905560018190556200007060028862000147565b60c0819052620000828860026200016a565b6200008e91906200018a565b60e05261010051600190620000a4904262000147565b620000b091906200018a565b60055550620001a095505050505050565b600080600080600080600060e0888a031215620000dd57600080fd5b8751602089015160408a015160608b015160808c0151939a50919850965094506001600160a01b03811681146200011357600080fd5b8093505060a0880151915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200016557634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000184576200018462000131565b92915050565b8181038181111562000184576200018462000131565b60805160a05160c05160e051610100516101205161014051611e27620002bf600039600081816105170152818161066c01528181610e6a0152818161119a015261150d01526000818161061301526112e901526000818161054b01528181610690015281816107ed0152818161097101528181610e8e01528181610fec015281816111be01526115310152600081816104330152818161111501526119e20152600081816102fb015281816110d401526119a101526000818161057f015281816107ad015281816108ff01528181610b5301528181610b8001528181610fad01528181611160015281816117920152818161185e015261188b0152600081816105df015281816108220152818161143801526115ac0152611e276000f3fe6080604052600436106101cd5760003560e01c80637ffc2a6e116100f7578063b5b7a18411610095578063eb8dedfa11610064578063eb8dedfa146105cd578063f3f480d914610601578063f4cf751b14610635578063fccc28131461065557600080fd5b8063b5b7a18414610539578063d0e30db01461056d578063d6e01b39146105a1578063e813a755146105b757600080fd5b80639588eca2116100d15780639588eca214610475578063a888c2cd1461048b578063ab82d9a0146104f2578063b044397e1461050557600080fd5b80637ffc2a6e1461040b578063836e344b146104215780638caeb7a81461045557600080fd5b806343b066d51161016f57806350b81dbe1161013e57806350b81dbe1461035d578063649628491461037d5780636b45ebcb1461039d578063710cc9a7146103eb57600080fd5b806343b066d51461029b57806344df8e70146102e95780634518f79f1461031d5780634a439cfe1461033d57600080fd5b806327ee6bdd116101ab57806327ee6bdd146102325780632c1925191461024857806331d144571461026857806331ddf7431461027b57600080fd5b80630e56752e146101d2578063114095d3146101fb578063222ae7861461021d575b600080fd5b3480156101de57600080fd5b506101e860015481565b6040519081526020015b60405180910390f35b34801561020757600080fd5b5061021b610216366004611a1d565b61066a565b005b34801561022957600080fd5b506101e86107e6565b34801561023e57600080fd5b506101e860055481565b34801561025457600080fd5b5061021b610263366004611a36565b610817565b61021b610276366004611a36565b6108fd565b34801561028757600080fd5b5061021b610296366004611b43565b610bc9565b3480156102a757600080fd5b506102d96102b6366004611a1d565b600881811c60009081526020919091526040902054600160ff9092161c81161490565b60405190151581526020016101f2565b3480156102f557600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561032957600080fd5b5061021b610338366004611a1d565b610e68565b34801561034957600080fd5b506101e8610358366004611a1d565b610fe5565b34801561036957600080fd5b5061021b610378366004611a1d565b611017565b34801561038957600080fd5b5061021b610398366004611a1d565b611198565b3480156103a957600080fd5b506103d36103b8366004611a1d565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101f2565b3480156103f757600080fd5b5061021b610406366004611a36565b61142d565b34801561041757600080fd5b506101e860025481565b34801561042d57600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561046157600080fd5b5061021b610470366004611a36565b61150b565b34801561048157600080fd5b506101e860045481565b34801561049757600080fd5b506104e26104a6366004611a1d565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516101f29493929190611c45565b61021b610500366004611a1d565b6116ce565b34801561051157600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561054557600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561057957600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ad57600080fd5b506101e860035481565b3480156105c357600080fd5b506101e860005481565b3480156105d957600080fd5b506103d37f000000000000000000000000000000000000000000000000000000000000000081565b34801561060d57600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561064157600080fd5b5061021b610650366004611a1d565b6118d4565b34801561066157600080fd5b506103d3600081565b7f00000000000000000000000000000000000000000000000000000000000000006005547f000000000000000000000000000000000000000000000000000000000000000042816106bd576106bd611c94565b0403116107035760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff16600281111561073157610731611c2f565b146107705760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106fa565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b031680156107e2576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006108127f000000000000000000000000000000000000000000000000000000000000000042611cc0565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461086a5760405162461bcd60e51b81526004016106fa90611ce2565b80600254106108b25760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106fa565b81600054146107e257600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b7f000000000000000000000000000000000000000000000000000000000000000034101561096d5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106fa565b60017f0000000000000000000000000000000000000000000000000000000000000000428161099e5761099e611c94565b040382146109e25760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b60448201526064016106fa565b80610a205760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106fa565b6000828152600660205260409020600101546001600160a01b031615610a7e5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106fa565b6040805160808101825282815233602080830191825263ffffffff4281168486019081526000606086018181528982526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610b1357610b13611c2f565b02179055505060405182815283915033907fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d579060200160405180910390a37f00000000000000000000000000000000000000000000000000000000000000003411156107e2576000610ba57f000000000000000000000000000000000000000000000000000000000000000034611d19565b604051909150339082156108fc029083906000818181858888f15050505050505050565b6040845110610c0c5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106fa565b6000838383604051602001610c2393929190611d5c565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610ca5576000868281518110610c6657610c66611d9e565b6020026020010151905082811115610c8c57826000528060205260406000209250610c9c565b8060005282602052604060002092505b50600101610c49565b508060045414610ce85760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106fa565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610d5f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106fa565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610d8d908890611db4565b6000604051808303816000865af19150503d8060008114610dca576040519150601f19603f3d011682016040523d82523d6000602084013e610dcf565b606091505b5050905080610e205760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106fa565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f00000000000000000000000000000000000000000000000000000000000000004281610ebb57610ebb611c94565b040311610efc5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106fa565b60008082815260066020526040902060010154600160c01b900460ff166002811115610f2a57610f2a611c2f565b14610f695760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106fa565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b031680156107e2576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006110117f000000000000000000000000000000000000000000000000000000000000000083611cc0565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff16600281111561104657611046611c2f565b146110895760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b60448201526064016106fa565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b03918216911615611150576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f000000000000000000000000000000000000000000000000000000000000000042816111eb576111eb611c94565b0403111561122e5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106fa565b600081815260066020526040902060010154600160a01b900463ffffffff168061128b5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106fa565b6000828152600760205260409020546001600160a01b0316156112e75760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106fa565b7f0000000000000000000000000000000000000000000000000000000000000000600154600054600261131a9190611dc7565b6113249190611dde565b61132e9190611dde565b6113388242611d19565b10156113ac5760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e00000000000000000060648201526084016106fa565b6005548211156114085760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f7906113ff9084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146114805760405162461bcd60e51b81526004016106fa90611ce2565b80600354106114c85760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106fa565b81600154146107e257600182905560038190556040518281527f5328ca176e0092ea14be7c843a94b093c0fe88c93d9c01ab0f0281d9e62e4055906020016108f1565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161155e5761155e611c94565b040311156115a15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106fa565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146115f45760405162461bcd60e51b81526004016106fa90611ce2565b6005548211801561160457508015155b1561164757600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b60008281526006602052604090205480156116c9578181036116895750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b0316156116c9576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b0316156117335760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106fa565b6000818152600660205260409020600101546001600160a01b03166117905760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b60448201526064016106fa565b7f00000000000000000000000000000000000000000000000000000000000000003410156118005760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106fa565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7906118549084815260200190565b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156118d15760006118b07f000000000000000000000000000000000000000000000000000000000000000034611d19565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b6002600082815260066020526040902060010154600160c01b900460ff16600281111561190357611903611c2f565b146119505760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e00000000000000000060448201526064016106fa565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600060208284031215611a2f57600080fd5b5035919050565b60008060408385031215611a4957600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611a9757611a97611a58565b604052919050565b803567ffffffffffffffff81168114611ab757600080fd5b919050565b80356001600160a01b0381168114611ab757600080fd5b600082601f830112611ae457600080fd5b813567ffffffffffffffff811115611afe57611afe611a58565b611b11601f8201601f1916602001611a6e565b818152846020838601011115611b2657600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611b5957600080fd5b843567ffffffffffffffff80821115611b7157600080fd5b818701915087601f830112611b8557600080fd5b8135602082821115611b9957611b99611a58565b8160051b611ba8828201611a6e565b928352848101820192828101908c851115611bc257600080fd5b958301955b84871015611be057863582529583019590830190611bc7565b9950611bf0915050898201611a9f565b96505050611c0060408801611abc565b93506060870135915080821115611c1657600080fd5b50611c2387828801611ad3565b91505092959194509250565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611c8557634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611cdd57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b8181038181111561101157611011611caa565b6000815160005b81811015611d4d5760208185018101518683015201611d33565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611d95601c830184611d2c565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611dc08284611d2c565b9392505050565b808202811582820484141761101157611011611caa565b8082018082111561101157611011611caa56fea264697066735822122055c1aa12c89ec044065051b8507e4df7a1c21c39aee8454e2a6e088cf08a362e64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101cd5760003560e01c80637ffc2a6e116100f7578063b5b7a18411610095578063eb8dedfa11610064578063eb8dedfa146105cd578063f3f480d914610601578063f4cf751b14610635578063fccc28131461065557600080fd5b8063b5b7a18414610539578063d0e30db01461056d578063d6e01b39146105a1578063e813a755146105b757600080fd5b80639588eca2116100d15780639588eca214610475578063a888c2cd1461048b578063ab82d9a0146104f2578063b044397e1461050557600080fd5b80637ffc2a6e1461040b578063836e344b146104215780638caeb7a81461045557600080fd5b806343b066d51161016f57806350b81dbe1161013e57806350b81dbe1461035d578063649628491461037d5780636b45ebcb1461039d578063710cc9a7146103eb57600080fd5b806343b066d51461029b57806344df8e70146102e95780634518f79f1461031d5780634a439cfe1461033d57600080fd5b806327ee6bdd116101ab57806327ee6bdd146102325780632c1925191461024857806331d144571461026857806331ddf7431461027b57600080fd5b80630e56752e146101d2578063114095d3146101fb578063222ae7861461021d575b600080fd5b3480156101de57600080fd5b506101e860015481565b6040519081526020015b60405180910390f35b34801561020757600080fd5b5061021b610216366004611a1d565b61066a565b005b34801561022957600080fd5b506101e86107e6565b34801561023e57600080fd5b506101e860055481565b34801561025457600080fd5b5061021b610263366004611a36565b610817565b61021b610276366004611a36565b6108fd565b34801561028757600080fd5b5061021b610296366004611b43565b610bc9565b3480156102a757600080fd5b506102d96102b6366004611a1d565b600881811c60009081526020919091526040902054600160ff9092161c81161490565b60405190151581526020016101f2565b3480156102f557600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561032957600080fd5b5061021b610338366004611a1d565b610e68565b34801561034957600080fd5b506101e8610358366004611a1d565b610fe5565b34801561036957600080fd5b5061021b610378366004611a1d565b611017565b34801561038957600080fd5b5061021b610398366004611a1d565b611198565b3480156103a957600080fd5b506103d36103b8366004611a1d565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101f2565b3480156103f757600080fd5b5061021b610406366004611a36565b61142d565b34801561041757600080fd5b506101e860025481565b34801561042d57600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561046157600080fd5b5061021b610470366004611a36565b61150b565b34801561048157600080fd5b506101e860045481565b34801561049757600080fd5b506104e26104a6366004611a1d565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516101f29493929190611c45565b61021b610500366004611a1d565b6116ce565b34801561051157600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561054557600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561057957600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ad57600080fd5b506101e860035481565b3480156105c357600080fd5b506101e860005481565b3480156105d957600080fd5b506103d37f000000000000000000000000000000000000000000000000000000000000000081565b34801561060d57600080fd5b506101e87f000000000000000000000000000000000000000000000000000000000000000081565b34801561064157600080fd5b5061021b610650366004611a1d565b6118d4565b34801561066157600080fd5b506103d3600081565b7f00000000000000000000000000000000000000000000000000000000000000006005547f000000000000000000000000000000000000000000000000000000000000000042816106bd576106bd611c94565b0403116107035760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064015b60405180910390fd5b60008082815260066020526040902060010154600160c01b900460ff16600281111561073157610731611c2f565b146107705760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106fa565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b031680156107e2576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505b5050565b60006108127f000000000000000000000000000000000000000000000000000000000000000042611cc0565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b0101161461086a5760405162461bcd60e51b81526004016106fa90611ce2565b80600254106108b25760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106fa565b81600054146107e257600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b7f000000000000000000000000000000000000000000000000000000000000000034101561096d5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106fa565b60017f0000000000000000000000000000000000000000000000000000000000000000428161099e5761099e611c94565b040382146109e25760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b60448201526064016106fa565b80610a205760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106fa565b6000828152600660205260409020600101546001600160a01b031615610a7e5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106fa565b6040805160808101825282815233602080830191825263ffffffff4281168486019081526000606086018181528982526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610b1357610b13611c2f565b02179055505060405182815283915033907fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d579060200160405180910390a37f00000000000000000000000000000000000000000000000000000000000000003411156107e2576000610ba57f000000000000000000000000000000000000000000000000000000000000000034611d19565b604051909150339082156108fc029083906000818181858888f15050505050505050565b6040845110610c0c5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106fa565b6000838383604051602001610c2393929190611d5c565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610ca5576000868281518110610c6657610c66611d9e565b6020026020010151905082811115610c8c57826000528060205260406000209250610c9c565b8060005282602052604060002092505b50600101610c49565b508060045414610ce85760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106fa565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610d5f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106fa565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610d8d908890611db4565b6000604051808303816000865af19150503d8060008114610dca576040519150601f19603f3d011682016040523d82523d6000602084013e610dcf565b606091505b5050905080610e205760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106fa565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f00000000000000000000000000000000000000000000000000000000000000004281610ebb57610ebb611c94565b040311610efc5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106fa565b60008082815260066020526040902060010154600160c01b900460ff166002811115610f2a57610f2a611c2f565b14610f695760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106fa565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b031680156107e2576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006110117f000000000000000000000000000000000000000000000000000000000000000083611cc0565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff16600281111561104657611046611c2f565b146110895760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b60448201526064016106fa565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b03918216911615611150576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f000000000000000000000000000000000000000000000000000000000000000042816111eb576111eb611c94565b0403111561122e5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106fa565b600081815260066020526040902060010154600160a01b900463ffffffff168061128b5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106fa565b6000828152600760205260409020546001600160a01b0316156112e75760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106fa565b7f0000000000000000000000000000000000000000000000000000000000000000600154600054600261131a9190611dc7565b6113249190611dde565b61132e9190611dde565b6113388242611d19565b10156113ac5760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e00000000000000000060648201526084016106fa565b6005548211156114085760058290556000828152600660205260409081902054600455517ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f7906113ff9084815260200190565b60405180910390a15b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146114805760405162461bcd60e51b81526004016106fa90611ce2565b80600354106114c85760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106fa565b81600154146107e257600182905560038190556040518281527f5328ca176e0092ea14be7c843a94b093c0fe88c93d9c01ab0f0281d9e62e4055906020016108f1565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161155e5761155e611c94565b040311156115a15760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106fa565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146115f45760405162461bcd60e51b81526004016106fa90611ce2565b6005548211801561160457508015155b1561164757600582905560048190556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b60008281526006602052604090205480156116c9578181036116895750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b0316156116c9576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6000818152600760205260409020546001600160a01b0316156117335760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106fa565b6000818152600660205260409020600101546001600160a01b03166117905760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b60448201526064016106fa565b7f00000000000000000000000000000000000000000000000000000000000000003410156118005760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106fa565b6000818152600760205260409081902080546001600160a01b0319163390811790915590517fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7906118549084815260200190565b60405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156118d15760006118b07f000000000000000000000000000000000000000000000000000000000000000034611d19565b604051909150339082156108fc029083906000818181858888f15050505050505b50565b6002600082815260066020526040902060010154600160c01b900460ff16600281111561190357611903611c2f565b146119505760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e00000000000000000060448201526064016106fa565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600060208284031215611a2f57600080fd5b5035919050565b60008060408385031215611a4957600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611a9757611a97611a58565b604052919050565b803567ffffffffffffffff81168114611ab757600080fd5b919050565b80356001600160a01b0381168114611ab757600080fd5b600082601f830112611ae457600080fd5b813567ffffffffffffffff811115611afe57611afe611a58565b611b11601f8201601f1916602001611a6e565b818152846020838601011115611b2657600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611b5957600080fd5b843567ffffffffffffffff80821115611b7157600080fd5b818701915087601f830112611b8557600080fd5b8135602082821115611b9957611b99611a58565b8160051b611ba8828201611a6e565b928352848101820192828101908c851115611bc257600080fd5b958301955b84871015611be057863582529583019590830190611bc7565b9950611bf0915050898201611a9f565b96505050611c0060408801611abc565b93506060870135915080821115611c1657600080fd5b50611c2387828801611ad3565b91505092959194509250565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611c8557634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082611cdd57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b8181038181111561101157611011611caa565b6000815160005b81811015611d4d5760208185018101518683015201611d33565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611d95601c830184611d2c565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611dc08284611d2c565b9392505050565b808202811582820484141761101157611011611caa565b8082018082111561101157611011611caa56fea264697066735822122055c1aa12c89ec044065051b8507e4df7a1c21c39aee8454e2a6e088cf08a362e64736f6c63430008120033", + "numDeployments": 8, + "solcInputHash": "18d8b299616ba6ea1bb506a660a35de5", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_challengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerFutureLimit\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_disputedStateRoot\",\"type\":\"bytes32\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"challengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"challengers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claims\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"enum VeaOutboxGnosisToArb.Party\",\"name\":\"honest\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositPlusReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_msgId\",\"type\":\"uint256\"}],\"name\":\"isMsgRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRelayed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampFutureUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Gnosis to Arbitrum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer delay limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new max sequencer past timestamping power.\"}},\"sequencerFutureLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer futue limit updated.\",\"params\":{\"_newSequencerFutureLimit\":\"The new max sequencer future timestamping power.\"}}},\"kind\":\"dev\",\"methods\":{\"challenge(uint256,bytes32)\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_disputedStateRoot\":\"The claimed state root to challenge, included to ensure txn reverts if claim is removed due to a block reorg.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_challengePeriod\":\"The duration of the period allowing to challenge a claim.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_routerGnosisToArb\":\"The address of the router on Ethereum that routes from Arbitrum to Ethereum.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_sequencerFutureLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"isMsgRelayed(uint256)\":{\"details\":\"Get the msg relayed status.\",\"params\":{\"_msgId\":\"The msgId to check.\"},\"returns\":{\"isRelayed\":\"True if the msg was relayed.\"}},\"resolveDisputedClaim(uint256,bytes32)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Arbitrum to call.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"updateSequencerFutureLimit(uint256,uint256)\":{\"details\":\"Set the sequencerFutureLimit by reading from the Arbitrum Bridge\",\"params\":{\"_newSequencerFutureLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256)\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256)\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256)\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32)\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":\"VeaOutboxGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/AddressAliasHelper.sol\":{\"content\":\"// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/libraries/AddressAliasHelper.sol\\n// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nlibrary AddressAliasHelper {\\n uint160 internal 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\",\"keccak256\":\"0xfa8b6907a33c37e13b3de6e2459d6bd153708be4b8413db3c319ea3a5d8c9b00\",\"license\":\"BUSL-1.1\"},\"src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/AddressAliasHelper.sol\\\";\\n\\n/// @dev Vea Outbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaOutboxGnosisToArb is IVeaOutboxOnL2 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n address public immutable routerGnosisToArb; // The address of the router from Gnosis to Arbitrum on Ethereum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 public immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 public immutable depositPlusReward; // 2 * deposit - burn\\n\\n address public constant BURN_ADDRESS = address(0); // address to send burned eth\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable challengePeriod; // Claim challenge timewindow.\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n uint256 public timestampFutureUpdated; // The timestamp of the last sequencer future update.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => Claim) public claims; // epoch => claim\\n mapping(uint256 => address) public challengers; // epoch => challenger\\n mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n enum Party {\\n None,\\n Claimer,\\n Challenger\\n }\\n\\n struct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestamp;\\n Party honest;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 indexed _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 indexed _epoch);\\n\\n /// @dev This event indicates the sequencer delay limit updated.\\n /// @param _newSequencerDelayLimit The new max sequencer past timestamping power.\\n event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates the sequencer futue limit updated.\\n /// @param _newSequencerFutureLimit The new max sequencer future timestamping power.\\n event sequencerFutureLimitUpdateReceived(uint256 _newSequencerFutureLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxGnosisToArb contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _challengePeriod The duration of the period allowing to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _routerGnosisToArb The address of the router on Ethereum that routes from Arbitrum to Ethereum.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _sequencerFutureLimit The maximum delay in seconds that the Arbitrum sequencer can futuredate transactions.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _challengePeriod,\\n uint256 _timeoutEpochs,\\n address _routerGnosisToArb,\\n uint256 _sequencerDelayLimit,\\n uint256 _sequencerFutureLimit\\n ) {\\n deposit = _deposit;\\n epochPeriod = _epochPeriod;\\n challengePeriod = _challengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n routerGnosisToArb = _routerGnosisToArb;\\n sequencerDelayLimit = _sequencerDelayLimit;\\n sequencerFutureLimit = _sequencerFutureLimit;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerFutureLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerFutureLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampFutureUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerFutureLimit != _newSequencerFutureLimit) {\\n sequencerFutureLimit = _newSequencerFutureLimit;\\n timestampFutureUpdated = _timestamp;\\n emit sequencerFutureLimitUpdateReceived(_newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Set the sequencerDelayLimit by reading from the Arbitrum Bridge\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n unchecked {\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch is invalid.\\\");\\n }\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claims[_epoch].claimer == address(0), \\\"Claim already made.\\\");\\n\\n claims[_epoch] = Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestamp: uint32(block.timestamp),\\n honest: Party.None\\n });\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _disputedStateRoot The claimed state root to challenge, included to ensure txn reverts if claim is removed due to a block reorg.\\n function challenge(uint256 _epoch, bytes32 _disputedStateRoot) external payable virtual {\\n require(challengers[_epoch] == address(0), \\\"Claim already challenged.\\\");\\n require(claims[_epoch].stateRoot == _disputedStateRoot, \\\"No claim for epoch.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n\\n challengers[_epoch] = msg.sender;\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n function verifySnapshot(uint256 _epoch) external virtual OnlyBridgeRunning {\\n uint256 claimTimestamp = uint256(claims[_epoch].timestamp);\\n require(claimTimestamp > 0, \\\"Invalid claim.\\\");\\n require(challengers[_epoch] == address(0), \\\"Claim is challenged.\\\");\\n\\n require(\\n block.timestamp - claimTimestamp >= 2 * sequencerDelayLimit + sequencerFutureLimit + challengePeriod,\\n \\\"Claim must wait for sequencerDelay and challengePeriod.\\\"\\n );\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = claims[_epoch].stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n claims[_epoch].honest = Party.Claimer;\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external virtual OnlyBridgeRunning {\\n // Ethereum -> Arbitrum retryable ticket message authentication with the canonical Ethereum -> Arbitrum bridge.\\n // example https://github.com/OffchainLabs/arbitrum-tutorials/blob/672b0b1e514f199133761daac000db954f0b5447/packages/greeter/contracts/arbitrum/GreeterL2.sol\\n // docs https://developer.arbitrum.io/arbos/l1-to-l2-messaging#address-aliasing\\n\\n require(msg.sender == AddressAliasHelper.applyL1ToL2Alias(routerGnosisToArb), \\\"Only L1 routerGnosisToArb.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n bytes32 claimedStateRoot = claims[_epoch].stateRoot;\\n\\n if (claimedStateRoot != bytes32(0)) {\\n if (claimedStateRoot == _stateRoot) {\\n claims[_epoch].honest = Party.Claimer;\\n } else if (challengers[_epoch] != address(0)) {\\n claims[_epoch].honest = Party.Challenger;\\n }\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Arbitrum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] memory _proof, uint64 _msgId, address _to, bytes memory _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch) external virtual {\\n require(claims[_epoch].honest == Party.Claimer, \\\"Claim unsuccessful.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (challengers[_epoch] != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n function withdrawChallengeDeposit(uint256 _epoch) external {\\n require(claims[_epoch].honest == Party.Challenger, \\\"Challenge unsuccessful.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete claims[_epoch];\\n delete challengers[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address claimer = claims[_epoch].claimer;\\n\\n delete claims[_epoch];\\n\\n if (claimer != address(0)) {\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawChallengerEscapeHatch(uint256 _epoch) external OnlyBridgeShutdown {\\n require(claims[_epoch].honest == Party.None, \\\"Claim resolved.\\\");\\n\\n address challenger = challengers[_epoch];\\n\\n delete challengers[_epoch];\\n\\n if (challenger != address(0)) {\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the msg relayed status.\\n /// @param _msgId The msgId to check.\\n /// @return isRelayed True if the msg was relayed.\\n function isMsgRelayed(uint256 _msgId) external view returns (bool isRelayed) {\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1));\\n }\\n}\\n\",\"keccak256\":\"0x5ade88ecc27d6f259a80429cca2e3d457235638a5297d266c55875f5d848f27b\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101606040523480156200001257600080fd5b506040516200208d3803806200208d8339810160408190526200003591620000c1565b60a08790526101008690526101208590526101408490526001600160a01b038316608052600082905560018190556200007060028862000147565b60c0819052620000828860026200016a565b6200008e91906200018a565b60e05261010051600190620000a4904262000147565b620000b091906200018a565b60055550620001a095505050505050565b600080600080600080600060e0888a031215620000dd57600080fd5b8751602089015160408a015160608b015160808c0151939a50919850965094506001600160a01b03811681146200011357600080fd5b8093505060a0880151915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200016557634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000184576200018462000131565b92915050565b8181038181111562000184576200018462000131565b60805160a05160c05160e051610100516101205161014051611dce620002bf600039600081816105170152818161085e015281816110320152818161136201526116c201526000818161061301526114b101526000818161054b01528181610882015281816109d901528181610b5d01528181611056015281816111b40152818161138601526116e6015260008181610446015281816112dd015261198901526000818161030e0152818161129c015261194801526000818161057f01528181610729015281816107e5015281816108120152818161099a01528181610aeb01528181610d3f01528181610d6c0152818161117501526113280152600081816105df01528181610a0e015281816115ed01526117610152611dce6000f3fe6080604052600436106101cd5760003560e01c8063710cc9a7116100f7578063b5b7a18411610095578063eb8dedfa11610064578063eb8dedfa146105cd578063f3f480d914610601578063f4cf751b14610635578063fccc28131461065557600080fd5b8063b5b7a18414610539578063d0e30db01461056d578063d6e01b39146105a1578063e813a755146105b757600080fd5b80638caeb7a8116100d15780638caeb7a8146104685780639588eca214610488578063a888c2cd1461049e578063b044397e1461050557600080fd5b8063710cc9a7146103fe5780637ffc2a6e1461041e578063836e344b1461043457600080fd5b806331ddf7431161016f5780634a439cfe1161013e5780634a439cfe1461035057806350b81dbe1461037057806364962849146103905780636b45ebcb146103b057600080fd5b806331ddf7431461028e57806343b066d5146102ae57806344df8e70146102fc5780634518f79f1461033057600080fd5b8063222ae786116101ab578063222ae7861461023057806327ee6bdd146102455780632c1925191461025b57806331d144571461027b57600080fd5b806302b2f7c7146101d25780630e56752e146101e7578063114095d314610210575b600080fd5b6101e56101e03660046119c4565b61066a565b005b3480156101f357600080fd5b506101fd60015481565b6040519081526020015b60405180910390f35b34801561021c57600080fd5b506101e561022b3660046119e6565b61085c565b34801561023c57600080fd5b506101fd6109d2565b34801561025157600080fd5b506101fd60055481565b34801561026757600080fd5b506101e56102763660046119c4565b610a03565b6101e56102893660046119c4565b610ae9565b34801561029a57600080fd5b506101e56102a9366004611aea565b610d91565b3480156102ba57600080fd5b506102ec6102c93660046119e6565b600881811c60009081526020919091526040902054600160ff9092161c81161490565b6040519015158152602001610207565b34801561030857600080fd5b506101fd7f000000000000000000000000000000000000000000000000000000000000000081565b34801561033c57600080fd5b506101e561034b3660046119e6565b611030565b34801561035c57600080fd5b506101fd61036b3660046119e6565b6111ad565b34801561037c57600080fd5b506101e561038b3660046119e6565b6111df565b34801561039c57600080fd5b506101e56103ab3660046119e6565b611360565b3480156103bc57600080fd5b506103e66103cb3660046119e6565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610207565b34801561040a57600080fd5b506101e56104193660046119c4565b6115e2565b34801561042a57600080fd5b506101fd60025481565b34801561044057600080fd5b506101fd7f000000000000000000000000000000000000000000000000000000000000000081565b34801561047457600080fd5b506101e56104833660046119c4565b6116c0565b34801561049457600080fd5b506101fd60045481565b3480156104aa57600080fd5b506104f56104b93660046119e6565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516102079493929190611bec565b34801561051157600080fd5b506101fd7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054557600080fd5b506101fd7f000000000000000000000000000000000000000000000000000000000000000081565b34801561057957600080fd5b506101fd7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ad57600080fd5b506101fd60035481565b3480156105c357600080fd5b506101fd60005481565b3480156105d957600080fd5b506103e67f000000000000000000000000000000000000000000000000000000000000000081565b34801561060d57600080fd5b506101fd7f000000000000000000000000000000000000000000000000000000000000000081565b34801561064157600080fd5b506101e56106503660046119e6565b61187b565b34801561066157600080fd5b506103e6600081565b6000828152600760205260409020546001600160a01b0316156106d45760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064015b60405180910390fd5b60008281526006602052604090205481146107275760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b60448201526064016106cb565b7f00000000000000000000000000000000000000000000000000000000000000003410156107975760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106cb565b60008281526007602052604080822080546001600160a01b031916339081179091559051909184917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d79190a37f00000000000000000000000000000000000000000000000000000000000000003411156108585760006108377f000000000000000000000000000000000000000000000000000000000000000034611c51565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f000000000000000000000000000000000000000000000000000000000000000042816108af576108af611c64565b0403116108f05760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106cb565b60008082815260066020526040902060010154600160c01b900460ff16600281111561091e5761091e611bd6565b1461095d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106cb565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b03168015610858576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006109fe7f000000000000000000000000000000000000000000000000000000000000000042611c7a565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b01011614610a565760405162461bcd60e51b81526004016106cb90611c9c565b8060025410610a9e5760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106cb565b816000541461085857600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b7f0000000000000000000000000000000000000000000000000000000000000000341015610b595760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106cb565b60017f00000000000000000000000000000000000000000000000000000000000000004281610b8a57610b8a611c64565b04038214610bce5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b60448201526064016106cb565b80610c0c5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106cb565b6000828152600660205260409020600101546001600160a01b031615610c6a5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106cb565b6040805160808101825282815233602080830191825263ffffffff4281168486019081526000606086018181528982526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610cff57610cff611bd6565b02179055505060405182815283915033907fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d579060200160405180910390a37f00000000000000000000000000000000000000000000000000000000000000003411156108585760006108377f000000000000000000000000000000000000000000000000000000000000000034611c51565b6040845110610dd45760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106cb565b6000838383604051602001610deb93929190611d03565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610e6d576000868281518110610e2e57610e2e611d45565b6020026020010151905082811115610e5457826000528060205260406000209250610e64565b8060005282602052604060002092505b50600101610e11565b508060045414610eb05760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106cb565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610f275760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106cb565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610f55908890611d5b565b6000604051808303816000865af19150503d8060008114610f92576040519150601f19603f3d011682016040523d82523d6000602084013e610f97565b606091505b5050905080610fe85760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106cb565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161108357611083611c64565b0403116110c45760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106cb565b60008082815260066020526040902060010154600160c01b900460ff1660028111156110f2576110f2611bd6565b146111315760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106cb565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b03168015610858576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006111d97f000000000000000000000000000000000000000000000000000000000000000083611c7a565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff16600281111561120e5761120e611bd6565b146112515760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b60448201526064016106cb565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b03918216911615611318576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f000000000000000000000000000000000000000000000000000000000000000042816113b3576113b3611c64565b040311156113f65760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106cb565b600081815260066020526040902060010154600160a01b900463ffffffff16806114535760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106cb565b6000828152600760205260409020546001600160a01b0316156114af5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106cb565b7f000000000000000000000000000000000000000000000000000000000000000060015460005460026114e29190611d6e565b6114ec9190611d85565b6114f69190611d85565b6115008242611c51565b10156115745760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e00000000000000000060648201526084016106cb565b6005548211156115bd576005829055600082815260066020526040808220546004555183917ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f791a25b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146116355760405162461bcd60e51b81526004016106cb90611c9c565b806003541061167d5760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106cb565b816001541461085857600182905560038190556040518281527f5328ca176e0092ea14be7c843a94b093c0fe88c93d9c01ab0f0281d9e62e405590602001610add565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161171357611713611c64565b040311156117565760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106cb565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146117a95760405162461bcd60e51b81526004016106cb90611c9c565b600554821180156117b957508015155b156117f4576005829055600481905560405182907ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f790600090a25b6000828152600660205260409020548015611876578181036118365750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b031615611876576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6002600082815260066020526040902060010154600160c01b900460ff1660028111156118aa576118aa611bd6565b146118f75760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e00000000000000000060448201526064016106cb565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600080604083850312156119d757600080fd5b50508035926020909101359150565b6000602082840312156119f857600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611a3e57611a3e6119ff565b604052919050565b803567ffffffffffffffff81168114611a5e57600080fd5b919050565b80356001600160a01b0381168114611a5e57600080fd5b600082601f830112611a8b57600080fd5b813567ffffffffffffffff811115611aa557611aa56119ff565b611ab8601f8201601f1916602001611a15565b818152846020838601011115611acd57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611b0057600080fd5b843567ffffffffffffffff80821115611b1857600080fd5b818701915087601f830112611b2c57600080fd5b8135602082821115611b4057611b406119ff565b8160051b611b4f828201611a15565b928352848101820192828101908c851115611b6957600080fd5b958301955b84871015611b8757863582529583019590830190611b6e565b9950611b97915050898201611a46565b96505050611ba760408801611a63565b93506060870135915080821115611bbd57600080fd5b50611bca87828801611a7a565b91505092959194509250565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611c2c57634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156111d9576111d9611c3b565b634e487b7160e01b600052601260045260246000fd5b600082611c9757634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b6000815160005b81811015611cf45760208185018101518683015201611cda565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611d3c601c830184611cd3565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611d678284611cd3565b9392505050565b80820281158282048414176111d9576111d9611c3b565b808201808211156111d9576111d9611c3b56fea26469706673582212206a9e2f2a8c0c0fb56828fdb44d278c3cab1104c2ab82d7990e1080cf25370ced64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101cd5760003560e01c8063710cc9a7116100f7578063b5b7a18411610095578063eb8dedfa11610064578063eb8dedfa146105cd578063f3f480d914610601578063f4cf751b14610635578063fccc28131461065557600080fd5b8063b5b7a18414610539578063d0e30db01461056d578063d6e01b39146105a1578063e813a755146105b757600080fd5b80638caeb7a8116100d15780638caeb7a8146104685780639588eca214610488578063a888c2cd1461049e578063b044397e1461050557600080fd5b8063710cc9a7146103fe5780637ffc2a6e1461041e578063836e344b1461043457600080fd5b806331ddf7431161016f5780634a439cfe1161013e5780634a439cfe1461035057806350b81dbe1461037057806364962849146103905780636b45ebcb146103b057600080fd5b806331ddf7431461028e57806343b066d5146102ae57806344df8e70146102fc5780634518f79f1461033057600080fd5b8063222ae786116101ab578063222ae7861461023057806327ee6bdd146102455780632c1925191461025b57806331d144571461027b57600080fd5b806302b2f7c7146101d25780630e56752e146101e7578063114095d314610210575b600080fd5b6101e56101e03660046119c4565b61066a565b005b3480156101f357600080fd5b506101fd60015481565b6040519081526020015b60405180910390f35b34801561021c57600080fd5b506101e561022b3660046119e6565b61085c565b34801561023c57600080fd5b506101fd6109d2565b34801561025157600080fd5b506101fd60055481565b34801561026757600080fd5b506101e56102763660046119c4565b610a03565b6101e56102893660046119c4565b610ae9565b34801561029a57600080fd5b506101e56102a9366004611aea565b610d91565b3480156102ba57600080fd5b506102ec6102c93660046119e6565b600881811c60009081526020919091526040902054600160ff9092161c81161490565b6040519015158152602001610207565b34801561030857600080fd5b506101fd7f000000000000000000000000000000000000000000000000000000000000000081565b34801561033c57600080fd5b506101e561034b3660046119e6565b611030565b34801561035c57600080fd5b506101fd61036b3660046119e6565b6111ad565b34801561037c57600080fd5b506101e561038b3660046119e6565b6111df565b34801561039c57600080fd5b506101e56103ab3660046119e6565b611360565b3480156103bc57600080fd5b506103e66103cb3660046119e6565b6007602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610207565b34801561040a57600080fd5b506101e56104193660046119c4565b6115e2565b34801561042a57600080fd5b506101fd60025481565b34801561044057600080fd5b506101fd7f000000000000000000000000000000000000000000000000000000000000000081565b34801561047457600080fd5b506101e56104833660046119c4565b6116c0565b34801561049457600080fd5b506101fd60045481565b3480156104aa57600080fd5b506104f56104b93660046119e6565b600660205260009081526040902080546001909101546001600160a01b03811690600160a01b810463ffffffff1690600160c01b900460ff1684565b6040516102079493929190611bec565b34801561051157600080fd5b506101fd7f000000000000000000000000000000000000000000000000000000000000000081565b34801561054557600080fd5b506101fd7f000000000000000000000000000000000000000000000000000000000000000081565b34801561057957600080fd5b506101fd7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ad57600080fd5b506101fd60035481565b3480156105c357600080fd5b506101fd60005481565b3480156105d957600080fd5b506103e67f000000000000000000000000000000000000000000000000000000000000000081565b34801561060d57600080fd5b506101fd7f000000000000000000000000000000000000000000000000000000000000000081565b34801561064157600080fd5b506101e56106503660046119e6565b61187b565b34801561066157600080fd5b506103e6600081565b6000828152600760205260409020546001600160a01b0316156106d45760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064015b60405180910390fd5b60008281526006602052604090205481146107275760405162461bcd60e51b815260206004820152601360248201527227379031b630b4b6903337b91032b837b1b41760691b60448201526064016106cb565b7f00000000000000000000000000000000000000000000000000000000000000003410156107975760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106cb565b60008281526007602052604080822080546001600160a01b031916339081179091559051909184917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d79190a37f00000000000000000000000000000000000000000000000000000000000000003411156108585760006108377f000000000000000000000000000000000000000000000000000000000000000034611c51565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f000000000000000000000000000000000000000000000000000000000000000042816108af576108af611c64565b0403116108f05760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106cb565b60008082815260066020526040902060010154600160c01b900460ff16600281111561091e5761091e611bd6565b1461095d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106cb565b600081815260076020526040902080546001600160a01b031981169091556001600160a01b03168015610858576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006109fe7f000000000000000000000000000000000000000000000000000000000000000042611c7a565b905090565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b01011614610a565760405162461bcd60e51b81526004016106cb90611c9c565b8060025410610a9e5760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106cb565b816000541461085857600082905560028190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15050565b7f0000000000000000000000000000000000000000000000000000000000000000341015610b595760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106cb565b60017f00000000000000000000000000000000000000000000000000000000000000004281610b8a57610b8a611c64565b04038214610bce5760405162461bcd60e51b815260206004820152601160248201527022b837b1b41034b99034b73b30b634b21760791b60448201526064016106cb565b80610c0c5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106cb565b6000828152600660205260409020600101546001600160a01b031615610c6a5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106cb565b6040805160808101825282815233602080830191825263ffffffff4281168486019081526000606086018181528982526006909452959095208451815592516001840180549651909216600160a01b026001600160c01b03199096166001600160a01b039091161794909417808555905192939192919060ff60c01b1916600160c01b836002811115610cff57610cff611bd6565b02179055505060405182815283915033907fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d579060200160405180910390a37f00000000000000000000000000000000000000000000000000000000000000003411156108585760006108377f000000000000000000000000000000000000000000000000000000000000000034611c51565b6040845110610dd45760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106cb565b6000838383604051602001610deb93929190611d03565b604051602081830303815290604052805190602001209050806000526020600020905060005b8551811015610e6d576000868281518110610e2e57610e2e611d45565b6020026020010151905082811115610e5457826000528060205260406000209250610e64565b8060005282602052604060002092505b50600101610e11565b508060045414610eb05760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106cb565b600884811c66ffffffffffffff16600081815260209290925260409091205460ff86169080821c60011615610f275760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106cb565b6000838152600860205260408082206001851b84179055516001600160a01b03881690610f55908890611d5b565b6000604051808303816000865af19150503d8060008114610f92576040519150601f19603f3d011682016040523d82523d6000602084013e610f97565b606091505b5050905080610fe85760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106cb565b60405167ffffffffffffffff891681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a1505050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161108357611083611c64565b0403116110c45760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106cb565b60008082815260066020526040902060010154600160c01b900460ff1660028111156110f2576110f2611bd6565b146111315760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106cb565b6000818152600660205260408120600181018054929091556001600160c81b0319821690556001600160a01b03168015610858576040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b60006111d97f000000000000000000000000000000000000000000000000000000000000000083611c7a565b92915050565b6001600082815260066020526040902060010154600160c01b900460ff16600281111561120e5761120e611bd6565b146112515760405162461bcd60e51b815260206004820152601360248201527221b630b4b6903ab739bab1b1b2b9b9b33ab61760691b60448201526064016106cb565b6000818152600660209081526040808320600181018054918590556001600160c81b0319821690556007909252909120546001600160a01b03918216911615611318576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b6040516001600160a01b038216907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006005547f000000000000000000000000000000000000000000000000000000000000000042816113b3576113b3611c64565b040311156113f65760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106cb565b600081815260066020526040902060010154600160a01b900463ffffffff16806114535760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21031b630b4b69760911b60448201526064016106cb565b6000828152600760205260409020546001600160a01b0316156114af5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106cb565b7f000000000000000000000000000000000000000000000000000000000000000060015460005460026114e29190611d6e565b6114ec9190611d85565b6114f69190611d85565b6115008242611c51565b10156115745760405162461bcd60e51b815260206004820152603760248201527f436c61696d206d757374207761697420666f722073657175656e63657244656c60448201527f617920616e64206368616c6c656e6765506572696f642e00000000000000000060648201526084016106cb565b6005548211156115bd576005829055600082815260066020526040808220546004555183917ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f791a25b506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146116355760405162461bcd60e51b81526004016106cb90611c9c565b806003541061167d5760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016106cb565b816001541461085857600182905560038190556040518281527f5328ca176e0092ea14be7c843a94b093c0fe88c93d9c01ab0f0281d9e62e405590602001610add565b7f00000000000000000000000000000000000000000000000000000000000000006005547f0000000000000000000000000000000000000000000000000000000000000000428161171357611713611c64565b040311156117565760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106cb565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000061111161111160901b010116146117a95760405162461bcd60e51b81526004016106cb90611c9c565b600554821180156117b957508015155b156117f4576005829055600481905560405182907ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f790600090a25b6000828152600660205260409020548015611876578181036118365750506000908152600660205260409020600101805460ff60c01b1916600160c01b179055565b6000838152600760205260409020546001600160a01b031615611876576000838152600660205260409020600101805460ff60c01b1916600160c11b1790555b505050565b6002600082815260066020526040902060010154600160c01b900460ff1660028111156118aa576118aa611bd6565b146118f75760405162461bcd60e51b815260206004820152601760248201527f4368616c6c656e676520756e7375636365737366756c2e00000000000000000060448201526064016106cb565b600081815260076020818152604080842080546006845282862086815560010180546001600160c81b03191690559390925281546001600160a01b031916909155516001600160a01b0390911691907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150506040516001600160a01b03851693507f000000000000000000000000000000000000000000000000000000000000000080156108fc02935091506000818181858888f150505050505050565b600080604083850312156119d757600080fd5b50508035926020909101359150565b6000602082840312156119f857600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611a3e57611a3e6119ff565b604052919050565b803567ffffffffffffffff81168114611a5e57600080fd5b919050565b80356001600160a01b0381168114611a5e57600080fd5b600082601f830112611a8b57600080fd5b813567ffffffffffffffff811115611aa557611aa56119ff565b611ab8601f8201601f1916602001611a15565b818152846020838601011115611acd57600080fd5b816020850160208301376000918101602001919091529392505050565b60008060008060808587031215611b0057600080fd5b843567ffffffffffffffff80821115611b1857600080fd5b818701915087601f830112611b2c57600080fd5b8135602082821115611b4057611b406119ff565b8160051b611b4f828201611a15565b928352848101820192828101908c851115611b6957600080fd5b958301955b84871015611b8757863582529583019590830190611b6e565b9950611b97915050898201611a46565b96505050611ba760408801611a63565b93506060870135915080821115611bbd57600080fd5b50611bca87828801611a7a565b91505092959194509250565b634e487b7160e01b600052602160045260246000fd5b8481526001600160a01b038416602082015263ffffffff831660408201526080810160038310611c2c57634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156111d9576111d9611c3b565b634e487b7160e01b600052601260045260246000fd5b600082611c9757634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f4f6e6c79204c3120726f75746572476e6f736973546f4172622e000000000000604082015260600190565b6000815160005b81811015611cf45760208185018101518683015201611cda565b50600093019283525090919050565b60c084901b6001600160c01b0319168152606083901b6bffffffffffffffffffffffff191660088201526000611d3c601c830184611cd3565b95945050505050565b634e487b7160e01b600052603260045260246000fd5b6000611d678284611cd3565b9392505050565b80820281158282048414176111d9576111d9611c3b565b808201808211156111d9576111d9611c3b56fea26469706673582212206a9e2f2a8c0c0fb56828fdb44d278c3cab1104c2ab82d7990e1080cf25370ced64736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Gnosis to Arbitrum. Note: This contract is deployed on Arbitrum.", "events": { @@ -678,9 +683,10 @@ }, "kind": "dev", "methods": { - "challenge(uint256)": { + "challenge(uint256,bytes32)": { "details": "Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.", "params": { + "_disputedStateRoot": "The claimed state root to challenge, included to ensure txn reverts if claim is removed due to a block reorg.", "_epoch": "The epoch of the claim to challenge." } }, @@ -799,7 +805,7 @@ "storageLayout": { "storage": [ { - "astId": 5535, + "astId": 4294, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "sequencerDelayLimit", "offset": 0, @@ -807,7 +813,7 @@ "type": "t_uint256" }, { - "astId": 5537, + "astId": 4296, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "sequencerFutureLimit", "offset": 0, @@ -815,7 +821,7 @@ "type": "t_uint256" }, { - "astId": 5539, + "astId": 4298, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "timestampDelayUpdated", "offset": 0, @@ -823,7 +829,7 @@ "type": "t_uint256" }, { - "astId": 5541, + "astId": 4300, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "timestampFutureUpdated", "offset": 0, @@ -831,7 +837,7 @@ "type": "t_uint256" }, { - "astId": 5543, + "astId": 4302, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "stateRoot", "offset": 0, @@ -839,7 +845,7 @@ "type": "t_bytes32" }, { - "astId": 5545, + "astId": 4304, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "latestVerifiedEpoch", "offset": 0, @@ -847,15 +853,15 @@ "type": "t_uint256" }, { - "astId": 5550, + "astId": 4309, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "claims", "offset": 0, "slot": "6", - "type": "t_mapping(t_uint256,t_struct(Claim)5572_storage)" + "type": "t_mapping(t_uint256,t_struct(Claim)4331_storage)" }, { - "astId": 5554, + "astId": 4313, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "challengers", "offset": 0, @@ -863,7 +869,7 @@ "type": "t_mapping(t_uint256,t_address)" }, { - "astId": 5558, + "astId": 4317, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "relayed", "offset": 0, @@ -882,7 +888,7 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_enum(Party)5562": { + "t_enum(Party)4321": { "encoding": "inplace", "label": "enum VeaOutboxGnosisToArb.Party", "numberOfBytes": "1" @@ -901,19 +907,19 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_mapping(t_uint256,t_struct(Claim)5572_storage)": { + "t_mapping(t_uint256,t_struct(Claim)4331_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct VeaOutboxGnosisToArb.Claim)", "numberOfBytes": "32", - "value": "t_struct(Claim)5572_storage" + "value": "t_struct(Claim)4331_storage" }, - "t_struct(Claim)5572_storage": { + "t_struct(Claim)4331_storage": { "encoding": "inplace", "label": "struct VeaOutboxGnosisToArb.Claim", "members": [ { - "astId": 5564, + "astId": 4323, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "stateRoot", "offset": 0, @@ -921,7 +927,7 @@ "type": "t_bytes32" }, { - "astId": 5566, + "astId": 4325, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "claimer", "offset": 0, @@ -929,7 +935,7 @@ "type": "t_address" }, { - "astId": 5568, + "astId": 4327, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "timestamp", "offset": 20, @@ -937,12 +943,12 @@ "type": "t_uint32" }, { - "astId": 5571, + "astId": 4330, "contract": "src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol:VeaOutboxGnosisToArb", "label": "honest", "offset": 24, "slot": "1", - "type": "t_enum(Party)5562" + "type": "t_enum(Party)4321" } ], "numberOfBytes": "64" diff --git a/contracts/deployments/chiado/VeaInboxGnosisToArbDevnet.json b/contracts/deployments/chiado/VeaInboxGnosisToArbDevnet.json index 1054f8d5..d6070d9c 100644 --- a/contracts/deployments/chiado/VeaInboxGnosisToArbDevnet.json +++ b/contracts/deployments/chiado/VeaInboxGnosisToArbDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x9F4407785DFf95c08Bf9a0d9d4A5a164C48eC5CB", + "address": "0xc0804E4FcEEfD958050356A429DAaaA71aA39385", "abi": [ { "inputs": [ @@ -270,28 +270,28 @@ "type": "function" } ], - "transactionHash": "0x905772713e5e9a6cc5d57b6a3d5b469c1d32fa36ce6707fc2d10dc6739124e72", + "transactionHash": "0x998c4f6ddfab1e8ad2fc22782c2dd772df2da39b78371f280030474e7e5987fd", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x9F4407785DFf95c08Bf9a0d9d4A5a164C48eC5CB", - "transactionIndex": 2, + "contractAddress": "0xc0804E4FcEEfD958050356A429DAaaA71aA39385", + "transactionIndex": 1, "gasUsed": "665312", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xd0c0d8bc011c7af0cc9569c3b1eac2c541ab929436be3bcd57b30219ab0ae5cb", - "transactionHash": "0x905772713e5e9a6cc5d57b6a3d5b469c1d32fa36ce6707fc2d10dc6739124e72", + "blockHash": "0xe56be25709b6fa265d73a0f589c3fc0e76f7016b2a25dc34cbacf5a8ed3724fa", + "transactionHash": "0x998c4f6ddfab1e8ad2fc22782c2dd772df2da39b78371f280030474e7e5987fd", "logs": [], - "blockNumber": 4730115, - "cumulativeGasUsed": "723000", + "blockNumber": 4814093, + "cumulativeGasUsed": "694400", "status": 1, "byzantium": true }, "args": [ 1800, - "0x8Da07C6D68F17d7BbC8B42D59Bc9EEE90e9dD621", + "0xE14fA0B3910CB0853E811375B9a6fcEEE32db521", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a" ], - "numDeployments": 9, + "numDeployments": 10, "solcInputHash": "76a6a9e6371fade9c8f1066bebbf4e7c", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochFinalized\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Gnosis to Arbitrum. Note: This contract is deployed on the Gnosis.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerGnosisToArb\":\"The router on Ethereum that routes from Gnosis to Arbitrum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochFinalized()\":{\"details\":\"Get the most recent epoch for which snapshots are finalized.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":\"VeaInboxGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\n\\n/// @dev Vea Inbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on the Gnosis.\\ncontract VeaInboxGnosisToArb is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerGnosisToArb; // The router on Ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] internal inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerGnosisToArb The router on Ethereum that routes from Gnosis to Arbitrum.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n constructor(uint256 _epochPeriod, address _routerGnosisToArb, IAMB _amb) {\\n epochPeriod = _epochPeriod;\\n routerGnosisToArb = _routerGnosisToArb;\\n amb = _amb;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function sendSnapshot(\\n uint256 _epoch,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(\\n IRouterToArb.route,\\n (\\n _epoch,\\n snapshots[_epoch],\\n _inboxIndex,\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n _gasLimit,\\n _maxFeePerGas\\n )\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(routerGnosisToArb, data, amb.maxGasPerTx());\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the most recent epoch for which snapshots are finalized.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochFinalized() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x0f6903fbd2d4f68f94851fa1325a6889fedb386ae9c270fefba850fbd9ce4da0\",\"license\":\"MIT\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60e060405234801561001057600080fd5b50604051610c12380380610c1283398101604081905261002f91610064565b60a0929092526001600160a01b0390811660c052166080526100a7565b6001600160a01b038116811461006157600080fd5b50565b60008060006060848603121561007957600080fd5b83519250602084015161008b8161004c565b604085015190925061009c8161004c565b809150509250925092565b60805160a05160c051610b0c610106600039600081816101cc015261036f015260008181610185015281816101f5015281816102210152818161048c015281816104c201526104f201526000818160e501526103460152610b0c6000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80634a439cfe116100715780634a439cfe1461015257806351920535146101655780635f85896c1461016d578063b5b7a18414610180578063d6565a2d146101a7578063eb8dedfa146101c757600080fd5b806306661abd146100ae5780631062b39a146100e0578063222ae7861461011f5780632bbb4704146101355780633ac3b6b61461014a575b600080fd5b6041546100c29067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6101077f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100d7565b6101276101ee565b6040519081526020016100d7565b6101486101433660046107ca565b61021f565b005b610127610483565b61012761016036600461081b565b6104bb565b6101486104ed565b6100c261017b36600461084a565b610611565b6101277f000000000000000000000000000000000000000000000000000000000000000081565b6101276101b536600461081b565b60006020819052908152604090205481565b6101077f000000000000000000000000000000000000000000000000000000000000000081565b600061021a7f000000000000000000000000000000000000000000000000000000000000000042610941565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000428161024e5761024e61092b565b0486106102ad5760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b60008681526020819052604080822054905160248101899052604481019190915260648101879052608481018690526001600160a01b03851660a482015260c4810184905260e481018390526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa1580156103b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103dc9190610963565b6040518463ffffffff1660e01b81526004016103fa939291906109cc565b6020604051808303816000875af1158015610419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043d9190610963565b9050877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828260405161047191815260200190565b60405180910390a25050505050505050565b600060016104b17f000000000000000000000000000000000000000000000000000000000000000042610941565b61021a9190610a00565b60006104e77f000000000000000000000000000000000000000000000000000000000000000083610941565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161051f5761051f61092b565b604154919004925060009067ffffffffffffffff165b801561056e5780600116600103610562576001826040811061055957610559610a21565b0154925061056e565b6001918201911c610535565b60011c5b80156105b05760019182019181811690036105a8576105a56001836040811061059d5761059d610a21565b01548461077d565b92505b60011c610572565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106106635760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064016102a4565b6040516000908290879061067f90889033908990602001610a37565b60408051601f198184030181529082905261069e939291602001610a6d565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610702576106ea6001836040811061059d5761059d610a21565b92506001918201911c677fffffffffffffff166106c9565b50816001826040811061071757610717610a21565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b0369061076a908490610abc565b60405180910390a1509095945050505050565b60008183101561079b578260005281602052604060002090506104e7565b5060009081526020919091526040902090565b80356001600160a01b03811681146107c557600080fd5b919050565b60008060008060008060c087890312156107e357600080fd5b863595506020870135945060408701359350610801606088016107ae565b92506080870135915060a087013590509295509295509295565b60006020828403121561082d57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561085f57600080fd5b610868846107ae565b925060208401356001600160e01b03198116811461088557600080fd5b9150604084013567ffffffffffffffff808211156108a257600080fd5b818601915086601f8301126108b657600080fd5b8135818111156108c8576108c8610834565b604051601f8201601f19908116603f011681019083821181831017156108f0576108f0610834565b8160405282815289602084870101111561090957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261095e57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561097557600080fd5b5051919050565b60005b8381101561099757818101518382015260200161097f565b50506000910152565b600081518084526109b881602086016020860161097c565b601f01601f19169290920160200192915050565b6001600160a01b03841681526060602082018190526000906109f0908301856109a0565b9050826040830152949350505050565b818103818111156104e757634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b8416815282600482015260008251610a5e81602485016020870161097c565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b16600882015260008251610aad81601c85016020870161097c565b91909101601c01949350505050565b602081526000610acf60208301846109a0565b939250505056fea26469706673582212208f85936a0d5ffa471af8a38c879ca78b06fcc0561f714b8395bb25bd09df413f64736f6c63430008120033", diff --git a/contracts/deployments/chiado/VeaInboxGnosisToArbTestnet.json b/contracts/deployments/chiado/VeaInboxGnosisToArbTestnet.json index 9ca6462b..8fb15964 100644 --- a/contracts/deployments/chiado/VeaInboxGnosisToArbTestnet.json +++ b/contracts/deployments/chiado/VeaInboxGnosisToArbTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x8Bf88E6474d93bD2Dc0d76CB3BE8809c6BB84148", + "address": "0xC21c20a719fAc23c54c336FA0E16a0CFdC4baA00", "abi": [ { "inputs": [ @@ -270,28 +270,28 @@ "type": "function" } ], - "transactionHash": "0x9d7d921d78ec54ba49ed967a6790493bdd5952cec465c2b9a19313bb339c493c", + "transactionHash": "0x1a55a618bf45d5bc51bf4cb28f10b3f2245e4693d62baf563fa01a31578b2de3", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x8Bf88E6474d93bD2Dc0d76CB3BE8809c6BB84148", - "transactionIndex": 1, + "contractAddress": "0xC21c20a719fAc23c54c336FA0E16a0CFdC4baA00", + "transactionIndex": 0, "gasUsed": "665312", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x808fdf9684af56c6091aa1a08f0bb1ee7631a04f45252c6df5b8c3c897596cef", - "transactionHash": "0x9d7d921d78ec54ba49ed967a6790493bdd5952cec465c2b9a19313bb339c493c", + "blockHash": "0xdd9c7358639288db01ef3c3212f0adbeb1c77d99dfadb23e93c82eea126d9cb8", + "transactionHash": "0x1a55a618bf45d5bc51bf4cb28f10b3f2245e4693d62baf563fa01a31578b2de3", "logs": [], - "blockNumber": 4730186, - "cumulativeGasUsed": "693816", + "blockNumber": 4814060, + "cumulativeGasUsed": "665312", "status": 1, "byzantium": true }, "args": [ 7200, - "0x62581B897330CA4044C4db79Ebe96ca230569492", + "0x18AB70ea8dBc7072D1C1C90bA0bC1547d92198CF", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a" ], - "numDeployments": 7, + "numDeployments": 8, "solcInputHash": "76a6a9e6371fade9c8f1066bebbf4e7c", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_routerGnosisToArb\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochFinalized\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Gnosis to Arbitrum. Note: This contract is deployed on the Gnosis.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_routerGnosisToArb\":\"The router on Ethereum that routes from Gnosis to Arbitrum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochFinalized()\":{\"details\":\"Get the most recent epoch for which snapshots are finalized.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Gnosis. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_epoch\":\"The epoch of the snapshot requested to send.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":\"VeaInboxGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/VeaInboxGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\n\\n/// @dev Vea Inbox From Gnosis to Arbitrum.\\n/// Note: This contract is deployed on the Gnosis.\\ncontract VeaInboxGnosisToArb is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable routerGnosisToArb; // The router on Ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] internal inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxGnosisToArb contract deployment on Gnosis, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _routerGnosisToArb The router on Ethereum that routes from Gnosis to Arbitrum.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n constructor(uint256 _epochPeriod, address _routerGnosisToArb, IAMB _amb) {\\n epochPeriod = _epochPeriod;\\n routerGnosisToArb = _routerGnosisToArb;\\n amb = _amb;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Gnosis.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function sendSnapshot(\\n uint256 _epoch,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(\\n IRouterToArb.route,\\n (\\n _epoch,\\n snapshots[_epoch],\\n _inboxIndex,\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n _gasLimit,\\n _maxFeePerGas\\n )\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(routerGnosisToArb, data, amb.maxGasPerTx());\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the most recent epoch for which snapshots are finalized.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochFinalized() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x0f6903fbd2d4f68f94851fa1325a6889fedb386ae9c270fefba850fbd9ce4da0\",\"license\":\"MIT\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60e060405234801561001057600080fd5b50604051610c12380380610c1283398101604081905261002f91610064565b60a0929092526001600160a01b0390811660c052166080526100a7565b6001600160a01b038116811461006157600080fd5b50565b60008060006060848603121561007957600080fd5b83519250602084015161008b8161004c565b604085015190925061009c8161004c565b809150509250925092565b60805160a05160c051610b0c610106600039600081816101cc015261036f015260008181610185015281816101f5015281816102210152818161048c015281816104c201526104f201526000818160e501526103460152610b0c6000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80634a439cfe116100715780634a439cfe1461015257806351920535146101655780635f85896c1461016d578063b5b7a18414610180578063d6565a2d146101a7578063eb8dedfa146101c757600080fd5b806306661abd146100ae5780631062b39a146100e0578063222ae7861461011f5780632bbb4704146101355780633ac3b6b61461014a575b600080fd5b6041546100c29067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6101077f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100d7565b6101276101ee565b6040519081526020016100d7565b6101486101433660046107ca565b61021f565b005b610127610483565b61012761016036600461081b565b6104bb565b6101486104ed565b6100c261017b36600461084a565b610611565b6101277f000000000000000000000000000000000000000000000000000000000000000081565b6101276101b536600461081b565b60006020819052908152604090205481565b6101077f000000000000000000000000000000000000000000000000000000000000000081565b600061021a7f000000000000000000000000000000000000000000000000000000000000000042610941565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000428161024e5761024e61092b565b0486106102ad5760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084015b60405180910390fd5b60008681526020819052604080822054905160248101899052604481019190915260648101879052608481018690526001600160a01b03851660a482015260c4810184905260e481018390526101040160408051601f19818403018152918152602080830180516001600160e01b031663507b5ad360e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa1580156103b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103dc9190610963565b6040518463ffffffff1660e01b81526004016103fa939291906109cc565b6020604051808303816000875af1158015610419573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043d9190610963565b9050877f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b828260405161047191815260200190565b60405180910390a25050505050505050565b600060016104b17f000000000000000000000000000000000000000000000000000000000000000042610941565b61021a9190610a00565b60006104e77f000000000000000000000000000000000000000000000000000000000000000083610941565b92915050565b6000807f0000000000000000000000000000000000000000000000000000000000000000428161051f5761051f61092b565b604154919004925060009067ffffffffffffffff165b801561056e5780600116600103610562576001826040811061055957610559610a21565b0154925061056e565b6001918201911c610535565b60011c5b80156105b05760019182019181811690036105a8576105a56001836040811061059d5761059d610a21565b01548461077d565b92505b60011c610572565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106106635760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064016102a4565b6040516000908290879061067f90889033908990602001610a37565b60408051601f198184030181529082905261069e939291602001610a6d565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610702576106ea6001836040811061059d5761059d610a21565b92506001918201911c677fffffffffffffff166106c9565b50816001826040811061071757610717610a21565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b0369061076a908490610abc565b60405180910390a1509095945050505050565b60008183101561079b578260005281602052604060002090506104e7565b5060009081526020919091526040902090565b80356001600160a01b03811681146107c557600080fd5b919050565b60008060008060008060c087890312156107e357600080fd5b863595506020870135945060408701359350610801606088016107ae565b92506080870135915060a087013590509295509295509295565b60006020828403121561082d57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561085f57600080fd5b610868846107ae565b925060208401356001600160e01b03198116811461088557600080fd5b9150604084013567ffffffffffffffff808211156108a257600080fd5b818601915086601f8301126108b657600080fd5b8135818111156108c8576108c8610834565b604051601f8201601f19908116603f011681019083821181831017156108f0576108f0610834565b8160405282815289602084870101111561090957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b634e487b7160e01b600052601260045260246000fd5b60008261095e57634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561097557600080fd5b5051919050565b60005b8381101561099757818101518382015260200161097f565b50506000910152565b600081518084526109b881602086016020860161097c565b601f01601f19169290920160200192915050565b6001600160a01b03841681526060602082018190526000906109f0908301856109a0565b9050826040830152949350505050565b818103818111156104e757634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b63ffffffff60e01b8416815282600482015260008251610a5e81602485016020870161097c565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b16600882015260008251610aad81601c85016020870161097c565b91909101601c01949350505050565b602081526000610acf60208301846109a0565b939250505056fea26469706673582212208f85936a0d5ffa471af8a38c879ca78b06fcc0561f714b8395bb25bd09df413f64736f6c63430008120033", diff --git a/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json b/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json index 31676027..d3751a95 100644 --- a/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json +++ b/contracts/deployments/chiado/VeaOutboxArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xb0263478A46d885D715B01fbac745500B9576634", + "address": "0x9481b3A49ac67d03D9022E6200eFD81850BADDB4", "abi": [ { "inputs": [ @@ -61,7 +61,7 @@ "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "_epoch", "type": "uint256" @@ -118,7 +118,7 @@ "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "_epoch", "type": "uint256" @@ -1084,19 +1084,19 @@ "type": "function" } ], - "transactionHash": "0xa7c8c5e98a40522136eca8d57c0fddf408d045b28b64caf9c5fc150874062ab4", + "transactionHash": "0x024db3d1dc9984392dd35c23aa942791b6dc91c007f9b58567beb8e192e35880", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xb0263478A46d885D715B01fbac745500B9576634", - "transactionIndex": 2, - "gasUsed": "2334192", + "contractAddress": "0x9481b3A49ac67d03D9022E6200eFD81850BADDB4", + "transactionIndex": 0, + "gasUsed": "2330964", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x8cff3c0731e77708e948f4a7c27f300bf03ef448ef04f7916af70e67f0339bc5", - "transactionHash": "0xa7c8c5e98a40522136eca8d57c0fddf408d045b28b64caf9c5fc150874062ab4", + "blockHash": "0x1cc726cf09c666bb1572ade935022b165e152421f2f5cbf59944e9822e0c1e10", + "transactionHash": "0x024db3d1dc9984392dd35c23aa942791b6dc91c007f9b58567beb8e192e35880", "logs": [], - "blockNumber": 4730103, - "cumulativeGasUsed": "2391840", + "blockNumber": 4814083, + "cumulativeGasUsed": "2330964", "status": 1, "byzantium": true }, @@ -1106,17 +1106,17 @@ 0, 10000000000000, "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0xEC337Fb9977848D0784dC4F01A69c237691755E0", + "0x6164EA58a1f5359D2E54ea8eB9e5971B7C8dB0f1", 86400, 10000000000000, 5, "0x8d74e5e4DA11629537C4575cB0f33b4F0Dfa42EB" ], - "numDeployments": 8, - "solcInputHash": "74af439f219888d42665a3312cefc0fc", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IWETH\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositPlusReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_msgId\",\"type\":\"uint256\"}],\"name\":\"isMsgRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRelayed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_weth\":\"The address of the WETH contract on Gnosis.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"isMsgRelayed(uint256)\":{\"details\":\"Get the msg relayed status.\",\"params\":{\"_msgId\":\"The msgId to check.\"},\"returns\":{\"isRelayed\":\"True if the msg was relayed.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by receiving a message from the AMB.\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":\"VeaOutboxArbToGnosisDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/tokens/gnosis/IWETH.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n IWETH public immutable weth; // The address of the WETH contract on Gnosis.\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 public immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 public immutable depositPlusReward; // 2 * deposit - burn\\n\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n weth = _weth;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerDelayLimit by receiving a message from the AMB.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n // If _newSequencerDelayLimit > timeout * epochPeriod, then the bridge will shutdown.\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external virtual {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n unchecked {\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch has not yet passed.\\\");\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.challenger, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) {\\n status = CensorshipTestStatus.NotStarted;\\n } else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod) {\\n status = CensorshipTestStatus.InProgress;\\n } else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the msg relayed status.\\n /// @param _msgId The msgId to check.\\n /// @return isRelayed True if the msg was relayed.\\n function isMsgRelayed(uint256 _msgId) external view returns(bool isRelayed) {\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1));\\n }\\n}\\n\",\"keccak256\":\"0xa3ed4eae38d473838a56aea19aacc8302e93c17cab7e82af74315c462d44132a\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToGnosis/VeaOutboxArbToGnosis.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Chiado.\\n/// Note: This contract is deployed on Chiado.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public override onlyByDevnetOperator {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth\\n )\\n VeaOutboxArbToGnosis(\\n _deposit,\\n _epochPeriod,\\n _minChallengePeriod,\\n _timeoutEpochs,\\n _amb,\\n _routerArbToGnosis,\\n _sequencerDelayLimit,\\n _maxMissingBlocks,\\n _routerChainId,\\n _weth\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xf0586aed26d7bd8cc6b397f996d6d7220abb2f8676670749d81d7f6133ad8a27\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/tokens/gnosis/IWETH.sol\":{\"content\":\"// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5daaf60d11ee2075260d0f3adfb22b1c536db983/contracts/token/ERC20/BurnableToken.sol\\n// implementation: https://gnosisscan.io/address/0xf8d1677c8a0c961938bf2f9adc3f3cfda759a9d9#code\\n// proxy: https://gnosisscan.io/token/0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1#readProxyContract\\n\\n/**\\n * @title Burnable Token\\n * @dev Token that can be irreversibly burned (destroyed).\\n */\\ninterface IWETH {\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n event Burn(address indexed burner, uint256 value);\\n\\n /**\\n * @dev Burns a specific amount of tokens.\\n * @param _value The amount of token to be burned.\\n */\\n function burn(uint256 _value) external;\\n\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Transfer tokens from one address to another\\n * @param _from address The address which you want to send tokens from\\n * @param _to address The address which you want to transfer to\\n * @param _value uint256 the amount of tokens to be transferred\\n */\\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd7cb8c8585a387464c451c2ff81ad3f9f02e291fe0dad802ff84646ff18d1eb2\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101e06040523480156200001257600080fd5b5060405162002bf838038062002bf883398101604081905262000035916200012f565b60e08a90526101608990526101a08790526101808890526001600160a01b0380871660805280861660a05260048590556101c0849052610140839052811660c052898989898989898989896200008d60028b620001e0565b610100819052620000a08b600262000203565b620000ac919062000223565b6101205261016051600190620000c39042620001e0565b620000cf919062000223565b6001819055505050505050505050505033600660006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050505050505050505062000239565b6001600160a01b03811681146200012c57600080fd5b50565b6000806000806000806000806000806101408b8d0312156200015057600080fd5b8a51995060208b0151985060408b0151975060608b0151965060808b0151620001798162000116565b60a08c01519096506200018c8162000116565b8095505060c08b0151935060e08b015192506101008b015191506101208b0151620001b78162000116565b809150509295989b9194979a5092959850565b634e487b7160e01b600052601160045260246000fd5b600082620001fe57634e487b7160e01b600052601260045260246000fd5b500490565b80820281158282048414176200021d576200021d620001ca565b92915050565b818103818111156200021d576200021d620001ca565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c051612812620003e6600039600081816105b001526121cb0152600081816105e40152818161099801528181611b1301528181611c9e0152611f5d01526000818161066c015261215f015260008181610618015281816109bc01528181610d4d01528181611a0101528181611b3701528181611cc20152611f8101526000818161054601528181610b330152610e660152600081816104d20152818161168d015261187d0152600081816104080152818161159c01526117cf0152600081816106a00152818161078701528181611081015281816118f801528181611e1701528181611eac01526120d6015260008181610387015281816107ad015281816110a7015281816115c20152818161162e015281816117f5015281816118a30152818161191e01528181611e3d01528181611ed201526120fc0152600081816106d401528181610c200152610f5301526000818161025001528181610a3701528181610ab101528181610b9501528181610d8201528181610de40152610ec801526128126000f3fe6080604052600436106102045760003560e01c80637ffc2a6e11610118578063b5b7a184116100a0578063d5e6a9df1161006f578063d5e6a9df146106c2578063da2b7bc4146106f6578063df19e6ff14610716578063e813a75514610743578063eedcf2a91461075957600080fd5b8063b5b7a18414610606578063b633b9441461063a578063c2114a161461065a578063d0e30db01461068e57600080fd5b80638d96fdea116100e75780638d96fdea14610534578063930f28af146105685780639588eca214610588578063aa22a1c61461059e578063b044397e146105d257600080fd5b80637ffc2a6e146104aa578063836e344b146104c05780638a619a71146104f45780638ad3a8f71461051457600080fd5b806331ddf7431161019b57806344df8e701161016a57806344df8e70146103f65780634788cb381461042a57806349b4299e1461044a5780634a439cfe1461046a578063541adcca1461048a57600080fd5b806331ddf743146103355780633ce43cfd146103555780633fc8cef31461037557806343b066d5146103a957600080fd5b80632639c060116101d75780632639c060146102b257806327ee6bdd146102df5780632c192519146102f557806331d144571461031557600080fd5b806301139b68146102095780630f0adca51461021e5780631062b39a1461023e578063222ae7861461028f575b600080fd5b61021c610217366004612388565b61076c565b005b34801561022a57600080fd5b5061021c6102393660046123b6565b610996565b34801561024a57600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561029b57600080fd5b506102a4610d46565b604051908152602001610286565b3480156102be57600080fd5b506102a46102cd3660046123ed565b60026020526000908152604090205481565b3480156102eb57600080fd5b506102a460015481565b34801561030157600080fd5b5061021c610310366004612406565b610d77565b34801561032157600080fd5b5061021c610330366004612406565b61104f565b34801561034157600080fd5b5061021c610350366004612489565b61123a565b34801561036157600080fd5b5061021c61037036600461254b565b6114da565b34801561038157600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b3480156103b557600080fd5b506103e66103c43660046123ed565b600881901c600090815260036020526040902054600160ff9092161c81161490565b6040519015158152602001610286565b34801561040257600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561043657600080fd5b5061021c610445366004612388565b611714565b34801561045657600080fd5b5061021c610465366004612388565b61194f565b34801561047657600080fd5b506102a46104853660046123ed565b6119fa565b34801561049657600080fd5b506102a46104a5366004612584565b611a2c565b3480156104b657600080fd5b506102a460055481565b3480156104cc57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561050057600080fd5b5061021c61050f3660046125a7565b611a7e565b34801561052057600080fd5b50600654610272906001600160a01b031681565b34801561054057600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561057457600080fd5b5061021c610583366004612388565b611b11565b34801561059457600080fd5b506102a460005481565b3480156105aa57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b3480156105de57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561061257600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561064657600080fd5b5061021c610655366004612388565b611c9c565b34801561066657600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561069a57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b3480156106ce57600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b34801561070257600080fd5b5061021c610711366004612388565b611f5b565b34801561072257600080fd5b50610736610731366004612584565b612141565b60405161028691906125da565b34801561074f57600080fd5b506102a460045481565b61021c610767366004612406565b612208565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156107fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082291906125f4565b6108475760405162461bcd60e51b815260040161083e90612616565b60405180910390fd5b61085081611a2c565b6000838152600260205260409020541461087c5760405162461bcd60e51b815260040161083e90612645565b60c08101516001600160a01b0316156108d75760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161083e565b60008160a0015160028111156108ef576108ef6125c4565b1461093c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e000000000000000000604482015260640161083e565b3360c082015261094b81611a2c565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816109e9576109e961266d565b04031115610a2c5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161083e565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610aaf5760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b606482015260840161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b319190612683565b7f000000000000000000000000000000000000000000000000000000000000000014610b935760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c15919061269c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610c885760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161083e565b60015483118015610c9857508115155b15610cdb57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610ce481611a2c565b60008481526002602052604090205403610d41578051829003610d0d57600160a0820152610d28565b60c08101516001600160a01b031615610d2857600260a08201525b610d3181611a2c565b6000848152600260205260409020555b505050565b6000610d727f0000000000000000000000000000000000000000000000000000000000000000426126b9565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610de25760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b604482015260640161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e649190612683565b7f000000000000000000000000000000000000000000000000000000000000000014610ec65760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f48919061269c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610fbb5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161083e565b80600554106110035760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161083e565b816004541461104b57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15b5050565b6006546001600160a01b0316331461106657600080fd5b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156110f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111c91906125f4565b6111385760405162461bcd60e51b815260040161083e90612616565b806111555760405162461bcd60e51b815260040161083e90612645565b600082815260026020526040902054156111a75760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161083e565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526111ed90611a2c565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a35050565b6040851061127c5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161083e565b60008484848460405160200161129594939291906126db565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156113155760008888838181106112d7576112d761271d565b905060200201359050828111156112fc5782600052806020526040600020925061130c565b8060005282602052604060002092505b506001016112bb565b5080600054146113585760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161083e565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156113cd5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161083e565b6000838152600360205260408082206001851b84179055516001600160a01b038916906113fd9089908990612733565b6000604051808303816000865af19150503d806000811461143a576040519150601f19603f3d011682016040523d82523d6000602084013e61143f565b606091505b50509050806114905760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161083e565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6114ec6104a536839003830183612584565b600083815260026020526040902054146115185760405162461bcd60e51b815260040161083e90612645565b600261152a60c0830160a08401612743565b600281111561153b5761153b6125c4565b1461157c5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b604482015260640161083e565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561160e57600080fd5b505af1158015611622573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061166760e0840160c085016125a7565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af11580156116d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f891906125f4565b61104b5760405162461bcd60e51b815260040161083e90612616565b61171d81611a2c565b600083815260026020526040902054146117495760405162461bcd60e51b815260040161083e90612645565b60018160a001516002811115611761576117616125c4565b1461179e5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b604482015260640161083e565b60008281526002602052604081205560c08101516001600160a01b0316156118d457604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561184157600080fd5b505af1158015611855573d6000803e3d6000fd5b50505050602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116b5565b602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116b5565b6006546001600160a01b0316331461196657600080fd5b61196f81611a2c565b6000838152600260205260409020541461199b5760405162461bcd60e51b815260040161083e90612645565b63ffffffff4281166060830152431660808201526119b881611a2c565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101611042565b6000611a267f0000000000000000000000000000000000000000000000000000000000000000836126b9565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611a6198909796910161275e565b604051602081830303815290604052805190602001209050919050565b6006546001600160a01b03163314611a9557600080fd5b6006546001600160a01b03163314611aef5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f720000000000000000604482015260640161083e565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b6457611b6461266d565b04031115611ba75760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161083e565b611bb081611a2c565b60008381526002602052604090205414611bdc5760405162461bcd60e51b815260040161083e90612645565b60c08101516001600160a01b031615611c2e5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161083e565b600154821115611c7657600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611c8681611a2c565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cef57611cef61266d565b040311611d305760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161083e565b611d3981611a2c565b60008381526002602052604090205414611d655760405162461bcd60e51b815260040161083e90612645565b60008160a001516002811115611d7d57611d7d6125c4565b14611dbc5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161083e565b60c08101516001600160a01b03161561104b5760208101516001600160a01b0316611e6e576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116b5565b60c0810180516000909152611e8282611a2c565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015611f1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f3f91906125f4565b610d415760405162461bcd60e51b815260040161083e90612616565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611fae57611fae61266d565b040311611fef5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161083e565b611ff881611a2c565b600083815260026020526040902054146120245760405162461bcd60e51b815260040161083e90612645565b60008160a00151600281111561203c5761203c6125c4565b1461207b5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161083e565b60208101516001600160a01b03161561104b5760c08101516001600160a01b031661212d57600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116b5565b6020810180516000909152611e8282611a2c565b6000816060015163ffffffff1660000361215d57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561219957506003919050565b60006005836060015163ffffffff164203816121b7576121b761266d565b608085015163ffffffff16919004019050437f0000000000000000000000000000000000000000000000000000000000000000818303116121fb5760019250612200565b600092505b50505b919050565b612212828261104f565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152612259838261194f565b63ffffffff4281166060830152431660808201526122778382611b11565b600160a0820152610d418382611714565b6001600160a01b038116811461229d57600080fd5b50565b803561220381612288565b803563ffffffff8116811461220357600080fd5b80356003811061220357600080fd5b600060e082840312156122e057600080fd5b60405160e0810181811067ffffffffffffffff8211171561231157634e487b7160e01b600052604160045260246000fd5b60405282358152905080612327602084016122a0565b6020820152612338604084016122ab565b6040820152612349606084016122ab565b606082015261235a608084016122ab565b608082015261236b60a084016122bf565b60a082015261237c60c084016122a0565b60c08201525092915050565b600080610100838503121561239c57600080fd5b823591506123ad84602085016122ce565b90509250929050565b600080600061012084860312156123cc57600080fd5b83359250602084013591506123e485604086016122ce565b90509250925092565b6000602082840312156123ff57600080fd5b5035919050565b6000806040838503121561241957600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461220357600080fd5b60008083601f84011261245257600080fd5b50813567ffffffffffffffff81111561246a57600080fd5b60208301915083602082850101111561248257600080fd5b9250929050565b600080600080600080608087890312156124a257600080fd5b863567ffffffffffffffff808211156124ba57600080fd5b818901915089601f8301126124ce57600080fd5b8135818111156124dd57600080fd5b8a60208260051b85010111156124f257600080fd5b6020830198508097505061250860208a01612428565b955061251660408a016122a0565b9450606089013591508082111561252c57600080fd5b5061253989828a01612440565b979a9699509497509295939492505050565b60008082840361010081121561256057600080fd5b8335925060e0601f198201121561257657600080fd5b506020830190509250929050565b600060e0828403121561259657600080fd5b6125a083836122ce565b9392505050565b6000602082840312156125b957600080fd5b81356125a081612288565b634e487b7160e01b600052602160045260246000fd5b60208101600483106125ee576125ee6125c4565b91905290565b60006020828403121561260657600080fd5b815180151581146125a057600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561269557600080fd5b5051919050565b6000602082840312156126ae57600080fd5b81516125a081612288565b6000826126d657634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561275557600080fd5b6125a0826122bf565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106127b6576127b66125c4565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212205c1c17d4aaa68df59bee711a4c79352292853d491afe014364ffe5d6b86fb99a64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106102045760003560e01c80637ffc2a6e11610118578063b5b7a184116100a0578063d5e6a9df1161006f578063d5e6a9df146106c2578063da2b7bc4146106f6578063df19e6ff14610716578063e813a75514610743578063eedcf2a91461075957600080fd5b8063b5b7a18414610606578063b633b9441461063a578063c2114a161461065a578063d0e30db01461068e57600080fd5b80638d96fdea116100e75780638d96fdea14610534578063930f28af146105685780639588eca214610588578063aa22a1c61461059e578063b044397e146105d257600080fd5b80637ffc2a6e146104aa578063836e344b146104c05780638a619a71146104f45780638ad3a8f71461051457600080fd5b806331ddf7431161019b57806344df8e701161016a57806344df8e70146103f65780634788cb381461042a57806349b4299e1461044a5780634a439cfe1461046a578063541adcca1461048a57600080fd5b806331ddf743146103355780633ce43cfd146103555780633fc8cef31461037557806343b066d5146103a957600080fd5b80632639c060116101d75780632639c060146102b257806327ee6bdd146102df5780632c192519146102f557806331d144571461031557600080fd5b806301139b68146102095780630f0adca51461021e5780631062b39a1461023e578063222ae7861461028f575b600080fd5b61021c610217366004612388565b61076c565b005b34801561022a57600080fd5b5061021c6102393660046123b6565b610996565b34801561024a57600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561029b57600080fd5b506102a4610d46565b604051908152602001610286565b3480156102be57600080fd5b506102a46102cd3660046123ed565b60026020526000908152604090205481565b3480156102eb57600080fd5b506102a460015481565b34801561030157600080fd5b5061021c610310366004612406565b610d77565b34801561032157600080fd5b5061021c610330366004612406565b61104f565b34801561034157600080fd5b5061021c610350366004612489565b61123a565b34801561036157600080fd5b5061021c61037036600461254b565b6114da565b34801561038157600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b3480156103b557600080fd5b506103e66103c43660046123ed565b600881901c600090815260036020526040902054600160ff9092161c81161490565b6040519015158152602001610286565b34801561040257600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561043657600080fd5b5061021c610445366004612388565b611714565b34801561045657600080fd5b5061021c610465366004612388565b61194f565b34801561047657600080fd5b506102a46104853660046123ed565b6119fa565b34801561049657600080fd5b506102a46104a5366004612584565b611a2c565b3480156104b657600080fd5b506102a460055481565b3480156104cc57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561050057600080fd5b5061021c61050f3660046125a7565b611a7e565b34801561052057600080fd5b50600654610272906001600160a01b031681565b34801561054057600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561057457600080fd5b5061021c610583366004612388565b611b11565b34801561059457600080fd5b506102a460005481565b3480156105aa57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b3480156105de57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561061257600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561064657600080fd5b5061021c610655366004612388565b611c9c565b34801561066657600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561069a57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b3480156106ce57600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b34801561070257600080fd5b5061021c610711366004612388565b611f5b565b34801561072257600080fd5b50610736610731366004612584565b612141565b60405161028691906125da565b34801561074f57600080fd5b506102a460045481565b61021c610767366004612406565b612208565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156107fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082291906125f4565b6108475760405162461bcd60e51b815260040161083e90612616565b60405180910390fd5b61085081611a2c565b6000838152600260205260409020541461087c5760405162461bcd60e51b815260040161083e90612645565b60c08101516001600160a01b0316156108d75760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161083e565b60008160a0015160028111156108ef576108ef6125c4565b1461093c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e000000000000000000604482015260640161083e565b3360c082015261094b81611a2c565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816109e9576109e961266d565b04031115610a2c5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161083e565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610aaf5760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b606482015260840161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b319190612683565b7f000000000000000000000000000000000000000000000000000000000000000014610b935760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c15919061269c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610c885760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161083e565b60015483118015610c9857508115155b15610cdb57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610ce481611a2c565b60008481526002602052604090205403610d41578051829003610d0d57600160a0820152610d28565b60c08101516001600160a01b031615610d2857600260a08201525b610d3181611a2c565b6000848152600260205260409020555b505050565b6000610d727f0000000000000000000000000000000000000000000000000000000000000000426126b9565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610de25760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b604482015260640161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e649190612683565b7f000000000000000000000000000000000000000000000000000000000000000014610ec65760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f48919061269c565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610fbb5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161083e565b80600554106110035760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161083e565b816004541461104b57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa707906020015b60405180910390a15b5050565b6006546001600160a01b0316331461106657600080fd5b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156110f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111c91906125f4565b6111385760405162461bcd60e51b815260040161083e90612616565b806111555760405162461bcd60e51b815260040161083e90612645565b600082815260026020526040902054156111a75760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161083e565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526111ed90611a2c565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a35050565b6040851061127c5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161083e565b60008484848460405160200161129594939291906126db565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156113155760008888838181106112d7576112d761271d565b905060200201359050828111156112fc5782600052806020526040600020925061130c565b8060005282602052604060002092505b506001016112bb565b5080600054146113585760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161083e565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156113cd5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161083e565b6000838152600360205260408082206001851b84179055516001600160a01b038916906113fd9089908990612733565b6000604051808303816000865af19150503d806000811461143a576040519150601f19603f3d011682016040523d82523d6000602084013e61143f565b606091505b50509050806114905760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161083e565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6114ec6104a536839003830183612584565b600083815260026020526040902054146115185760405162461bcd60e51b815260040161083e90612645565b600261152a60c0830160a08401612743565b600281111561153b5761153b6125c4565b1461157c5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b604482015260640161083e565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561160e57600080fd5b505af1158015611622573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061166760e0840160c085016125a7565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af11580156116d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116f891906125f4565b61104b5760405162461bcd60e51b815260040161083e90612616565b61171d81611a2c565b600083815260026020526040902054146117495760405162461bcd60e51b815260040161083e90612645565b60018160a001516002811115611761576117616125c4565b1461179e5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b604482015260640161083e565b60008281526002602052604081205560c08101516001600160a01b0316156118d457604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561184157600080fd5b505af1158015611855573d6000803e3d6000fd5b50505050602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116b5565b602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116b5565b6006546001600160a01b0316331461196657600080fd5b61196f81611a2c565b6000838152600260205260409020541461199b5760405162461bcd60e51b815260040161083e90612645565b63ffffffff4281166060830152431660808201526119b881611a2c565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101611042565b6000611a267f0000000000000000000000000000000000000000000000000000000000000000836126b9565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611a6198909796910161275e565b604051602081830303815290604052805190602001209050919050565b6006546001600160a01b03163314611a9557600080fd5b6006546001600160a01b03163314611aef5760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f720000000000000000604482015260640161083e565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b6457611b6461266d565b04031115611ba75760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161083e565b611bb081611a2c565b60008381526002602052604090205414611bdc5760405162461bcd60e51b815260040161083e90612645565b60c08101516001600160a01b031615611c2e5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161083e565b600154821115611c7657600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611c8681611a2c565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cef57611cef61266d565b040311611d305760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161083e565b611d3981611a2c565b60008381526002602052604090205414611d655760405162461bcd60e51b815260040161083e90612645565b60008160a001516002811115611d7d57611d7d6125c4565b14611dbc5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161083e565b60c08101516001600160a01b03161561104b5760208101516001600160a01b0316611e6e576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116b5565b60c0810180516000909152611e8282611a2c565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015611f1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f3f91906125f4565b610d415760405162461bcd60e51b815260040161083e90612616565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611fae57611fae61266d565b040311611fef5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161083e565b611ff881611a2c565b600083815260026020526040902054146120245760405162461bcd60e51b815260040161083e90612645565b60008160a00151600281111561203c5761203c6125c4565b1461207b5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161083e565b60208101516001600160a01b03161561104b5760c08101516001600160a01b031661212d57600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116b5565b6020810180516000909152611e8282611a2c565b6000816060015163ffffffff1660000361215d57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561219957506003919050565b60006005836060015163ffffffff164203816121b7576121b761266d565b608085015163ffffffff16919004019050437f0000000000000000000000000000000000000000000000000000000000000000818303116121fb5760019250612200565b600092505b50505b919050565b612212828261104f565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152612259838261194f565b63ffffffff4281166060830152431660808201526122778382611b11565b600160a0820152610d418382611714565b6001600160a01b038116811461229d57600080fd5b50565b803561220381612288565b803563ffffffff8116811461220357600080fd5b80356003811061220357600080fd5b600060e082840312156122e057600080fd5b60405160e0810181811067ffffffffffffffff8211171561231157634e487b7160e01b600052604160045260246000fd5b60405282358152905080612327602084016122a0565b6020820152612338604084016122ab565b6040820152612349606084016122ab565b606082015261235a608084016122ab565b608082015261236b60a084016122bf565b60a082015261237c60c084016122a0565b60c08201525092915050565b600080610100838503121561239c57600080fd5b823591506123ad84602085016122ce565b90509250929050565b600080600061012084860312156123cc57600080fd5b83359250602084013591506123e485604086016122ce565b90509250925092565b6000602082840312156123ff57600080fd5b5035919050565b6000806040838503121561241957600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461220357600080fd5b60008083601f84011261245257600080fd5b50813567ffffffffffffffff81111561246a57600080fd5b60208301915083602082850101111561248257600080fd5b9250929050565b600080600080600080608087890312156124a257600080fd5b863567ffffffffffffffff808211156124ba57600080fd5b818901915089601f8301126124ce57600080fd5b8135818111156124dd57600080fd5b8a60208260051b85010111156124f257600080fd5b6020830198508097505061250860208a01612428565b955061251660408a016122a0565b9450606089013591508082111561252c57600080fd5b5061253989828a01612440565b979a9699509497509295939492505050565b60008082840361010081121561256057600080fd5b8335925060e0601f198201121561257657600080fd5b506020830190509250929050565b600060e0828403121561259657600080fd5b6125a083836122ce565b9392505050565b6000602082840312156125b957600080fd5b81356125a081612288565b634e487b7160e01b600052602160045260246000fd5b60208101600483106125ee576125ee6125c4565b91905290565b60006020828403121561260657600080fd5b815180151581146125a057600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561269557600080fd5b5051919050565b6000602082840312156126ae57600080fd5b81516125a081612288565b6000826126d657634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561275557600080fd5b6125a0826122bf565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106127b6576127b66125c4565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212205c1c17d4aaa68df59bee711a4c79352292853d491afe014364ffe5d6b86fb99a64736f6c63430008120033", + "numDeployments": 9, + "solcInputHash": "18d8b299616ba6ea1bb506a660a35de5", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IWETH\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositPlusReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_msgId\",\"type\":\"uint256\"}],\"name\":\"isMsgRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRelayed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_weth\":\"The address of the WETH contract on Gnosis.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"isMsgRelayed(uint256)\":{\"details\":\"Get the msg relayed status.\",\"params\":{\"_msgId\":\"The msgId to check.\"},\"returns\":{\"isRelayed\":\"True if the msg was relayed.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by receiving a message from the AMB.\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":\"VeaOutboxArbToGnosisDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/tokens/gnosis/IWETH.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n IWETH public immutable weth; // The address of the WETH contract on Gnosis.\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 public immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 public immutable depositPlusReward; // 2 * deposit - burn\\n\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 indexed _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 indexed _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n weth = _weth;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerDelayLimit by receiving a message from the AMB.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n // If _newSequencerDelayLimit > timeout * epochPeriod, then the bridge will shutdown.\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external virtual {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n unchecked {\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch has not yet passed.\\\");\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.challenger, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) {\\n status = CensorshipTestStatus.NotStarted;\\n } else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod) {\\n status = CensorshipTestStatus.InProgress;\\n } else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the msg relayed status.\\n /// @param _msgId The msgId to check.\\n /// @return isRelayed True if the msg was relayed.\\n function isMsgRelayed(uint256 _msgId) external view returns (bool isRelayed) {\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1));\\n }\\n}\\n\",\"keccak256\":\"0x8a5031b4acc020c109c8bca88e621aa8b7a480c8c1d6b00f28fd9574ce42be9e\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToGnosis/VeaOutboxArbToGnosis.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Chiado.\\n/// Note: This contract is deployed on Chiado.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public override onlyByDevnetOperator {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth\\n )\\n VeaOutboxArbToGnosis(\\n _deposit,\\n _epochPeriod,\\n _minChallengePeriod,\\n _timeoutEpochs,\\n _amb,\\n _routerArbToGnosis,\\n _sequencerDelayLimit,\\n _maxMissingBlocks,\\n _routerChainId,\\n _weth\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xf0586aed26d7bd8cc6b397f996d6d7220abb2f8676670749d81d7f6133ad8a27\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/tokens/gnosis/IWETH.sol\":{\"content\":\"// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5daaf60d11ee2075260d0f3adfb22b1c536db983/contracts/token/ERC20/BurnableToken.sol\\n// implementation: https://gnosisscan.io/address/0xf8d1677c8a0c961938bf2f9adc3f3cfda759a9d9#code\\n// proxy: https://gnosisscan.io/token/0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1#readProxyContract\\n\\n/**\\n * @title Burnable Token\\n * @dev Token that can be irreversibly burned (destroyed).\\n */\\ninterface IWETH {\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n event Burn(address indexed burner, uint256 value);\\n\\n /**\\n * @dev Burns a specific amount of tokens.\\n * @param _value The amount of token to be burned.\\n */\\n function burn(uint256 _value) external;\\n\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Transfer tokens from one address to another\\n * @param _from address The address which you want to send tokens from\\n * @param _to address The address which you want to transfer to\\n * @param _value uint256 the amount of tokens to be transferred\\n */\\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd7cb8c8585a387464c451c2ff81ad3f9f02e291fe0dad802ff84646ff18d1eb2\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101e06040523480156200001257600080fd5b5060405162002be938038062002be983398101604081905262000035916200012f565b60e08a90526101608990526101a08790526101808890526001600160a01b0380871660805280861660a05260048590556101c0849052610140839052811660c052898989898989898989896200008d60028b620001e0565b610100819052620000a08b600262000203565b620000ac919062000223565b6101205261016051600190620000c39042620001e0565b620000cf919062000223565b6001819055505050505050505050505033600660006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050505050505050505062000239565b6001600160a01b03811681146200012c57600080fd5b50565b6000806000806000806000806000806101408b8d0312156200015057600080fd5b8a51995060208b0151985060408b0151975060608b0151965060808b0151620001798162000116565b60a08c01519096506200018c8162000116565b8095505060c08b0151935060e08b015192506101008b015191506101208b0151620001b78162000116565b809150509295989b9194979a5092959850565b634e487b7160e01b600052601160045260246000fd5b600082620001fe57634e487b7160e01b600052601260045260246000fd5b500490565b80820281158282048414176200021d576200021d620001ca565b92915050565b818103818111156200021d576200021d620001ca565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c051612803620003e6600039600081816105b001526121bc0152600081816105e40152818161098e01528181611b0401528181611c8f0152611f4e01526000818161066c0152612150015260008181610618015281816109b201528181610d43015281816119f201528181611b2801528181611cb30152611f7201526000818161054601528181610b290152610e5c0152600081816104d20152818161168201526118720152600081816104080152818161159101526117c40152600081816106a00152818161078701528181611076015281816118ed01528181611e0801528181611e9d01526120c7015260008181610387015281816107ad0152818161109c015281816115b701528181611623015281816117ea015281816118980152818161191301528181611e2e01528181611ec301526120ed0152600081816106d401528181610c160152610f4901526000818161025001528181610a2d01528181610aa701528181610b8b01528181610d7801528181610dda0152610ebe01526128036000f3fe6080604052600436106102045760003560e01c80637ffc2a6e11610118578063b5b7a184116100a0578063d5e6a9df1161006f578063d5e6a9df146106c2578063da2b7bc4146106f6578063df19e6ff14610716578063e813a75514610743578063eedcf2a91461075957600080fd5b8063b5b7a18414610606578063b633b9441461063a578063c2114a161461065a578063d0e30db01461068e57600080fd5b80638d96fdea116100e75780638d96fdea14610534578063930f28af146105685780639588eca214610588578063aa22a1c61461059e578063b044397e146105d257600080fd5b80637ffc2a6e146104aa578063836e344b146104c05780638a619a71146104f45780638ad3a8f71461051457600080fd5b806331ddf7431161019b57806344df8e701161016a57806344df8e70146103f65780634788cb381461042a57806349b4299e1461044a5780634a439cfe1461046a578063541adcca1461048a57600080fd5b806331ddf743146103355780633ce43cfd146103555780633fc8cef31461037557806343b066d5146103a957600080fd5b80632639c060116101d75780632639c060146102b257806327ee6bdd146102df5780632c192519146102f557806331d144571461031557600080fd5b806301139b68146102095780630f0adca51461021e5780631062b39a1461023e578063222ae7861461028f575b600080fd5b61021c610217366004612379565b61076c565b005b34801561022a57600080fd5b5061021c6102393660046123a7565b61098c565b34801561024a57600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561029b57600080fd5b506102a4610d3c565b604051908152602001610286565b3480156102be57600080fd5b506102a46102cd3660046123de565b60026020526000908152604090205481565b3480156102eb57600080fd5b506102a460015481565b34801561030157600080fd5b5061021c6103103660046123f7565b610d6d565b34801561032157600080fd5b5061021c6103303660046123f7565b611044565b34801561034157600080fd5b5061021c61035036600461247a565b61122f565b34801561036157600080fd5b5061021c61037036600461253c565b6114cf565b34801561038157600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b3480156103b557600080fd5b506103e66103c43660046123de565b600881901c600090815260036020526040902054600160ff9092161c81161490565b6040519015158152602001610286565b34801561040257600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561043657600080fd5b5061021c610445366004612379565b611709565b34801561045657600080fd5b5061021c610465366004612379565b611944565b34801561047657600080fd5b506102a46104853660046123de565b6119eb565b34801561049657600080fd5b506102a46104a5366004612575565b611a1d565b3480156104b657600080fd5b506102a460055481565b3480156104cc57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561050057600080fd5b5061021c61050f366004612598565b611a6f565b34801561052057600080fd5b50600654610272906001600160a01b031681565b34801561054057600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561057457600080fd5b5061021c610583366004612379565b611b02565b34801561059457600080fd5b506102a460005481565b3480156105aa57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b3480156105de57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561061257600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561064657600080fd5b5061021c610655366004612379565b611c8d565b34801561066657600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561069a57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b3480156106ce57600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b34801561070257600080fd5b5061021c610711366004612379565b611f4c565b34801561072257600080fd5b50610736610731366004612575565b612132565b60405161028691906125cb565b34801561074f57600080fd5b506102a460045481565b61021c6107673660046123f7565b6121f9565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156107fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082291906125e5565b6108475760405162461bcd60e51b815260040161083e90612607565b60405180910390fd5b61085081611a1d565b6000838152600260205260409020541461087c5760405162461bcd60e51b815260040161083e90612636565b60c08101516001600160a01b0316156108d75760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161083e565b60008160a0015160028111156108ef576108ef6125b5565b1461093c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e000000000000000000604482015260640161083e565b3360c082015261094b81611a1d565b600083815260026020526040808220929092559051339184917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d79190a35050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816109df576109df61265e565b04031115610a225760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161083e565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610aa55760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b606482015260840161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b279190612674565b7f000000000000000000000000000000000000000000000000000000000000000014610b895760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610be7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0b919061268d565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610c7e5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161083e565b60015483118015610c8e57508115155b15610cd157600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610cda81611a1d565b60008481526002602052604090205403610d37578051829003610d0357600160a0820152610d1e565b60c08101516001600160a01b031615610d1e57600260a08201525b610d2781611a1d565b6000848152600260205260409020555b505050565b6000610d687f0000000000000000000000000000000000000000000000000000000000000000426126aa565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610dd85760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b604482015260640161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5a9190612674565b7f000000000000000000000000000000000000000000000000000000000000000014610ebc5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3e919061268d565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610fb15760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161083e565b8060055410610ff95760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161083e565b816004541461104057600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b5050565b6006546001600160a01b0316331461105b57600080fd5b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156110ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111191906125e5565b61112d5760405162461bcd60e51b815260040161083e90612607565b8061114a5760405162461bcd60e51b815260040161083e90612636565b6000828152600260205260409020541561119c5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161083e565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526111e290611a1d565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a35050565b604085106112715760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161083e565b60008484848460405160200161128a94939291906126cc565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561130a5760008888838181106112cc576112cc61270e565b905060200201359050828111156112f157826000528060205260406000209250611301565b8060005282602052604060002092505b506001016112b0565b50806000541461134d5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161083e565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156113c25760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161083e565b6000838152600360205260408082206001851b84179055516001600160a01b038916906113f29089908990612724565b6000604051808303816000865af19150503d806000811461142f576040519150601f19603f3d011682016040523d82523d6000602084013e611434565b606091505b50509050806114855760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161083e565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6114e16104a536839003830183612575565b6000838152600260205260409020541461150d5760405162461bcd60e51b815260040161083e90612636565b600261151f60c0830160a08401612734565b6002811115611530576115306125b5565b146115715760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b604482015260640161083e565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561160357600080fd5b505af1158015611617573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061165c60e0840160c08501612598565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af11580156116c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ed91906125e5565b6110405760405162461bcd60e51b815260040161083e90612607565b61171281611a1d565b6000838152600260205260409020541461173e5760405162461bcd60e51b815260040161083e90612636565b60018160a001516002811115611756576117566125b5565b146117935760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b604482015260640161083e565b60008281526002602052604081205560c08101516001600160a01b0316156118c957604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561183657600080fd5b505af115801561184a573d6000803e3d6000fd5b50505050602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116aa565b602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116aa565b6006546001600160a01b0316331461195b57600080fd5b61196481611a1d565b600083815260026020526040902054146119905760405162461bcd60e51b815260040161083e90612636565b63ffffffff4281166060830152431660808201526119ad81611a1d565b60008381526002602052604080822092909255905183917f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691a25050565b6000611a177f0000000000000000000000000000000000000000000000000000000000000000836126aa565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611a5298909796910161274f565b604051602081830303815290604052805190602001209050919050565b6006546001600160a01b03163314611a8657600080fd5b6006546001600160a01b03163314611ae05760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f720000000000000000604482015260640161083e565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b5557611b5561265e565b04031115611b985760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161083e565b611ba181611a1d565b60008381526002602052604090205414611bcd5760405162461bcd60e51b815260040161083e90612636565b60c08101516001600160a01b031615611c1f5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161083e565b600154821115611c6757600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611c7781611a1d565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ce057611ce061265e565b040311611d215760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161083e565b611d2a81611a1d565b60008381526002602052604090205414611d565760405162461bcd60e51b815260040161083e90612636565b60008160a001516002811115611d6e57611d6e6125b5565b14611dad5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161083e565b60c08101516001600160a01b0316156110405760208101516001600160a01b0316611e5f576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116aa565b60c0810180516000909152611e7382611a1d565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015611f0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f3091906125e5565b610d375760405162461bcd60e51b815260040161083e90612607565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611f9f57611f9f61265e565b040311611fe05760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161083e565b611fe981611a1d565b600083815260026020526040902054146120155760405162461bcd60e51b815260040161083e90612636565b60008160a00151600281111561202d5761202d6125b5565b1461206c5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161083e565b60208101516001600160a01b0316156110405760c08101516001600160a01b031661211e57600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116aa565b6020810180516000909152611e7382611a1d565b6000816060015163ffffffff1660000361214e57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561218a57506003919050565b60006005836060015163ffffffff164203816121a8576121a861265e565b608085015163ffffffff16919004019050437f0000000000000000000000000000000000000000000000000000000000000000818303116121ec57600192506121f1565b600092505b50505b919050565b6122038282611044565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261224a8382611944565b63ffffffff4281166060830152431660808201526122688382611b02565b600160a0820152610d378382611709565b6001600160a01b038116811461228e57600080fd5b50565b80356121f481612279565b803563ffffffff811681146121f457600080fd5b8035600381106121f457600080fd5b600060e082840312156122d157600080fd5b60405160e0810181811067ffffffffffffffff8211171561230257634e487b7160e01b600052604160045260246000fd5b6040528235815290508061231860208401612291565b60208201526123296040840161229c565b604082015261233a6060840161229c565b606082015261234b6080840161229c565b608082015261235c60a084016122b0565b60a082015261236d60c08401612291565b60c08201525092915050565b600080610100838503121561238d57600080fd5b8235915061239e84602085016122bf565b90509250929050565b600080600061012084860312156123bd57600080fd5b83359250602084013591506123d585604086016122bf565b90509250925092565b6000602082840312156123f057600080fd5b5035919050565b6000806040838503121561240a57600080fd5b50508035926020909101359150565b803567ffffffffffffffff811681146121f457600080fd5b60008083601f84011261244357600080fd5b50813567ffffffffffffffff81111561245b57600080fd5b60208301915083602082850101111561247357600080fd5b9250929050565b6000806000806000806080878903121561249357600080fd5b863567ffffffffffffffff808211156124ab57600080fd5b818901915089601f8301126124bf57600080fd5b8135818111156124ce57600080fd5b8a60208260051b85010111156124e357600080fd5b602083019850809750506124f960208a01612419565b955061250760408a01612291565b9450606089013591508082111561251d57600080fd5b5061252a89828a01612431565b979a9699509497509295939492505050565b60008082840361010081121561255157600080fd5b8335925060e0601f198201121561256757600080fd5b506020830190509250929050565b600060e0828403121561258757600080fd5b61259183836122bf565b9392505050565b6000602082840312156125aa57600080fd5b813561259181612279565b634e487b7160e01b600052602160045260246000fd5b60208101600483106125df576125df6125b5565b91905290565b6000602082840312156125f757600080fd5b8151801515811461259157600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561268657600080fd5b5051919050565b60006020828403121561269f57600080fd5b815161259181612279565b6000826126c757634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561274657600080fd5b612591826122b0565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106127a7576127a76125b5565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220a17fd5b938da98973ab10a609859f20d895af40a35b84686cce62850b5d773e864736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106102045760003560e01c80637ffc2a6e11610118578063b5b7a184116100a0578063d5e6a9df1161006f578063d5e6a9df146106c2578063da2b7bc4146106f6578063df19e6ff14610716578063e813a75514610743578063eedcf2a91461075957600080fd5b8063b5b7a18414610606578063b633b9441461063a578063c2114a161461065a578063d0e30db01461068e57600080fd5b80638d96fdea116100e75780638d96fdea14610534578063930f28af146105685780639588eca214610588578063aa22a1c61461059e578063b044397e146105d257600080fd5b80637ffc2a6e146104aa578063836e344b146104c05780638a619a71146104f45780638ad3a8f71461051457600080fd5b806331ddf7431161019b57806344df8e701161016a57806344df8e70146103f65780634788cb381461042a57806349b4299e1461044a5780634a439cfe1461046a578063541adcca1461048a57600080fd5b806331ddf743146103355780633ce43cfd146103555780633fc8cef31461037557806343b066d5146103a957600080fd5b80632639c060116101d75780632639c060146102b257806327ee6bdd146102df5780632c192519146102f557806331d144571461031557600080fd5b806301139b68146102095780630f0adca51461021e5780631062b39a1461023e578063222ae7861461028f575b600080fd5b61021c610217366004612379565b61076c565b005b34801561022a57600080fd5b5061021c6102393660046123a7565b61098c565b34801561024a57600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561029b57600080fd5b506102a4610d3c565b604051908152602001610286565b3480156102be57600080fd5b506102a46102cd3660046123de565b60026020526000908152604090205481565b3480156102eb57600080fd5b506102a460015481565b34801561030157600080fd5b5061021c6103103660046123f7565b610d6d565b34801561032157600080fd5b5061021c6103303660046123f7565b611044565b34801561034157600080fd5b5061021c61035036600461247a565b61122f565b34801561036157600080fd5b5061021c61037036600461253c565b6114cf565b34801561038157600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b3480156103b557600080fd5b506103e66103c43660046123de565b600881901c600090815260036020526040902054600160ff9092161c81161490565b6040519015158152602001610286565b34801561040257600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561043657600080fd5b5061021c610445366004612379565b611709565b34801561045657600080fd5b5061021c610465366004612379565b611944565b34801561047657600080fd5b506102a46104853660046123de565b6119eb565b34801561049657600080fd5b506102a46104a5366004612575565b611a1d565b3480156104b657600080fd5b506102a460055481565b3480156104cc57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561050057600080fd5b5061021c61050f366004612598565b611a6f565b34801561052057600080fd5b50600654610272906001600160a01b031681565b34801561054057600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561057457600080fd5b5061021c610583366004612379565b611b02565b34801561059457600080fd5b506102a460005481565b3480156105aa57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b3480156105de57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561061257600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561064657600080fd5b5061021c610655366004612379565b611c8d565b34801561066657600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561069a57600080fd5b506102a47f000000000000000000000000000000000000000000000000000000000000000081565b3480156106ce57600080fd5b506102727f000000000000000000000000000000000000000000000000000000000000000081565b34801561070257600080fd5b5061021c610711366004612379565b611f4c565b34801561072257600080fd5b50610736610731366004612575565b612132565b60405161028691906125cb565b34801561074f57600080fd5b506102a460045481565b61021c6107673660046123f7565b6121f9565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156107fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082291906125e5565b6108475760405162461bcd60e51b815260040161083e90612607565b60405180910390fd5b61085081611a1d565b6000838152600260205260409020541461087c5760405162461bcd60e51b815260040161083e90612636565b60c08101516001600160a01b0316156108d75760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e00000000000000604482015260640161083e565b60008160a0015160028111156108ef576108ef6125b5565b1461093c5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e000000000000000000604482015260640161083e565b3360c082015261094b81611a1d565b600083815260026020526040808220929092559051339184917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d79190a35050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816109df576109df61265e565b04031115610a225760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161083e565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610aa55760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b606482015260840161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b279190612674565b7f000000000000000000000000000000000000000000000000000000000000000014610b895760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610be7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0b919061268d565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610c7e5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161083e565b60015483118015610c8e57508115155b15610cd157600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610cda81611a1d565b60008481526002602052604090205403610d37578051829003610d0357600160a0820152610d1e565b60c08101516001600160a01b031615610d1e57600260a08201525b610d2781611a1d565b6000848152600260205260409020555b505050565b6000610d687f0000000000000000000000000000000000000000000000000000000000000000426126aa565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610dd85760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b604482015260640161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5a9190612674565b7f000000000000000000000000000000000000000000000000000000000000000014610ebc5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b604482015260640161083e565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3e919061268d565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610fb15760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b604482015260640161083e565b8060055410610ff95760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b604482015260640161083e565b816004541461104057600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b5050565b6006546001600160a01b0316331461105b57600080fd5b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156110ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111191906125e5565b61112d5760405162461bcd60e51b815260040161083e90612607565b8061114a5760405162461bcd60e51b815260040161083e90612636565b6000828152600260205260409020541561119c5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b604482015260640161083e565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526111e290611a1d565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a35050565b604085106112715760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b604482015260640161083e565b60008484848460405160200161128a94939291906126cc565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561130a5760008888838181106112cc576112cc61270e565b905060200201359050828111156112f157826000528060205260406000209250611301565b8060005282602052604060002092505b506001016112b0565b50806000541461134d5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b604482015260640161083e565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156113c25760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c61796564000000000000000000604482015260640161083e565b6000838152600360205260408082206001851b84179055516001600160a01b038916906113f29089908990612724565b6000604051808303816000865af19150503d806000811461142f576040519150601f19603f3d011682016040523d82523d6000602084013e611434565b606091505b50509050806114855760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e7472616374000000000000000000604482015260640161083e565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6114e16104a536839003830183612575565b6000838152600260205260409020541461150d5760405162461bcd60e51b815260040161083e90612636565b600261151f60c0830160a08401612734565b6002811115611530576115306125b5565b146115715760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b604482015260640161083e565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561160357600080fd5b505af1158015611617573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061165c60e0840160c08501612598565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af11580156116c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ed91906125e5565b6110405760405162461bcd60e51b815260040161083e90612607565b61171281611a1d565b6000838152600260205260409020541461173e5760405162461bcd60e51b815260040161083e90612636565b60018160a001516002811115611756576117566125b5565b146117935760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b604482015260640161083e565b60008281526002602052604081205560c08101516001600160a01b0316156118c957604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561183657600080fd5b505af115801561184a573d6000803e3d6000fd5b50505050602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116aa565b602081015160405163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116aa565b6006546001600160a01b0316331461195b57600080fd5b61196481611a1d565b600083815260026020526040902054146119905760405162461bcd60e51b815260040161083e90612636565b63ffffffff4281166060830152431660808201526119ad81611a1d565b60008381526002602052604080822092909255905183917f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691a25050565b6000611a177f0000000000000000000000000000000000000000000000000000000000000000836126aa565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611a5298909796910161274f565b604051602081830303815290604052805190602001209050919050565b6006546001600160a01b03163314611a8657600080fd5b6006546001600160a01b03163314611ae05760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f720000000000000000604482015260640161083e565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611b5557611b5561265e565b04031115611b985760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b604482015260640161083e565b611ba181611a1d565b60008381526002602052604090205414611bcd5760405162461bcd60e51b815260040161083e90612636565b60c08101516001600160a01b031615611c1f5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b604482015260640161083e565b600154821115611c6757600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611c7781611a1d565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ce057611ce061265e565b040311611d215760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161083e565b611d2a81611a1d565b60008381526002602052604090205414611d565760405162461bcd60e51b815260040161083e90612636565b60008160a001516002811115611d6e57611d6e6125b5565b14611dad5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161083e565b60c08101516001600160a01b0316156110405760208101516001600160a01b0316611e5f576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116aa565b60c0810180516000909152611e7382611a1d565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015611f0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f3091906125e5565b610d375760405162461bcd60e51b815260040161083e90612607565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611f9f57611f9f61265e565b040311611fe05760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b604482015260640161083e565b611fe981611a1d565b600083815260026020526040902054146120155760405162461bcd60e51b815260040161083e90612636565b60008160a00151600281111561202d5761202d6125b5565b1461206c5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b604482015260640161083e565b60208101516001600160a01b0316156110405760c08101516001600160a01b031661211e57600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116aa565b6020810180516000909152611e7382611a1d565b6000816060015163ffffffff1660000361214e57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561218a57506003919050565b60006005836060015163ffffffff164203816121a8576121a861265e565b608085015163ffffffff16919004019050437f0000000000000000000000000000000000000000000000000000000000000000818303116121ec57600192506121f1565b600092505b50505b919050565b6122038282611044565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261224a8382611944565b63ffffffff4281166060830152431660808201526122688382611b02565b600160a0820152610d378382611709565b6001600160a01b038116811461228e57600080fd5b50565b80356121f481612279565b803563ffffffff811681146121f457600080fd5b8035600381106121f457600080fd5b600060e082840312156122d157600080fd5b60405160e0810181811067ffffffffffffffff8211171561230257634e487b7160e01b600052604160045260246000fd5b6040528235815290508061231860208401612291565b60208201526123296040840161229c565b604082015261233a6060840161229c565b606082015261234b6080840161229c565b608082015261235c60a084016122b0565b60a082015261236d60c08401612291565b60c08201525092915050565b600080610100838503121561238d57600080fd5b8235915061239e84602085016122bf565b90509250929050565b600080600061012084860312156123bd57600080fd5b83359250602084013591506123d585604086016122bf565b90509250925092565b6000602082840312156123f057600080fd5b5035919050565b6000806040838503121561240a57600080fd5b50508035926020909101359150565b803567ffffffffffffffff811681146121f457600080fd5b60008083601f84011261244357600080fd5b50813567ffffffffffffffff81111561245b57600080fd5b60208301915083602082850101111561247357600080fd5b9250929050565b6000806000806000806080878903121561249357600080fd5b863567ffffffffffffffff808211156124ab57600080fd5b818901915089601f8301126124bf57600080fd5b8135818111156124ce57600080fd5b8a60208260051b85010111156124e357600080fd5b602083019850809750506124f960208a01612419565b955061250760408a01612291565b9450606089013591508082111561251d57600080fd5b5061252a89828a01612431565b979a9699509497509295939492505050565b60008082840361010081121561255157600080fd5b8335925060e0601f198201121561256757600080fd5b506020830190509250929050565b600060e0828403121561258757600080fd5b61259183836122bf565b9392505050565b6000602082840312156125aa57600080fd5b813561259181612279565b634e487b7160e01b600052602160045260246000fd5b60208101600483106125df576125df6125b5565b91905290565b6000602082840312156125f757600080fd5b8151801515811461259157600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b60006020828403121561268657600080fd5b5051919050565b60006020828403121561269f57600080fd5b815161259181612279565b6000826126c757634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561274657600080fd5b612591826122b0565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106127a7576127a76125b5565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220a17fd5b938da98973ab10a609859f20d895af40a35b84686cce62850b5d773e864736f6c63430008120033", "devdoc": { "details": "Vea Outbox From ArbitrumGoerli to Chiado. Note: This contract is deployed on Chiado. Note: This contract is permissioned for developer testing (devnet).", "events": { @@ -1324,7 +1324,7 @@ "storageLayout": { "storage": [ { - "astId": 2314, + "astId": 1495, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "stateRoot", "offset": 0, @@ -1332,7 +1332,7 @@ "type": "t_bytes32" }, { - "astId": 2316, + "astId": 1497, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "latestVerifiedEpoch", "offset": 0, @@ -1340,7 +1340,7 @@ "type": "t_uint256" }, { - "astId": 2320, + "astId": 1501, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "claimHashes", "offset": 0, @@ -1348,7 +1348,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2324, + "astId": 1505, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "relayed", "offset": 0, @@ -1356,7 +1356,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2326, + "astId": 1507, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "sequencerDelayLimit", "offset": 0, @@ -1364,7 +1364,7 @@ "type": "t_uint256" }, { - "astId": 2328, + "astId": 1509, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "timestampDelayUpdated", "offset": 0, @@ -1372,7 +1372,7 @@ "type": "t_uint256" }, { - "astId": 4242, + "astId": 3476, "contract": "src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol:VeaOutboxArbToGnosisDevnet", "label": "devnetOperator", "offset": 0, diff --git a/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json b/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json index 2e40f62d..60325c17 100644 --- a/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json +++ b/contracts/deployments/chiado/VeaOutboxArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0xE8ea62d3a4F06301016b9C23Ace108F3D8027839", + "address": "0xB28943800115d0D3F938434F623715E5fE0433F2", "abi": [ { "inputs": [ @@ -61,7 +61,7 @@ "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "_epoch", "type": "uint256" @@ -118,7 +118,7 @@ "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "_epoch", "type": "uint256" @@ -1040,19 +1040,19 @@ "type": "function" } ], - "transactionHash": "0xf91c6b9bcd26cc0d87be197612c0d9dedffab791bd8e12d2976a70ae23fe4d02", + "transactionHash": "0x1086071ffe2130f3ff71279f27ab74e7b97bfdee2abe5201ee0051233e89ceef", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xE8ea62d3a4F06301016b9C23Ace108F3D8027839", - "transactionIndex": 0, - "gasUsed": "2352599", + "contractAddress": "0xB28943800115d0D3F938434F623715E5fE0433F2", + "transactionIndex": 1, + "gasUsed": "2348042", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xb074e1e290b276712d0f39edc34fcbdd28c15ca9af183070a6ab1c7b24b6e237", - "transactionHash": "0xf91c6b9bcd26cc0d87be197612c0d9dedffab791bd8e12d2976a70ae23fe4d02", + "blockHash": "0x53a48f358e8f6d77b4b5a196bd742f336c338f712c27c17041e8006028514ad8", + "transactionHash": "0x1086071ffe2130f3ff71279f27ab74e7b97bfdee2abe5201ee0051233e89ceef", "logs": [], - "blockNumber": 4730167, - "cumulativeGasUsed": "2352599", + "blockNumber": 5310979, + "cumulativeGasUsed": "2384074", "status": 1, "byzantium": true }, @@ -1062,17 +1062,17 @@ 10800, 1000000, "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0x1224E83DF410b43A65ed3e375a6442813B1aea14", + "0xD75dB719B04842174cDB7b1d8C6f60957ab6A25E", 86400, 1000000, 5, "0x8d74e5e4DA11629537C4575cB0f33b4F0Dfa42EB" ], - "numDeployments": 6, - "solcInputHash": "74af439f219888d42665a3312cefc0fc", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IWETH\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositPlusReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_msgId\",\"type\":\"uint256\"}],\"name\":\"isMsgRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRelayed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_weth\":\"The address of the WETH contract on Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"isMsgRelayed(uint256)\":{\"details\":\"Get the msg relayed status.\",\"params\":{\"_msgId\":\"The msgId to check.\"},\"returns\":{\"isRelayed\":\"True if the msg was relayed.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by receiving a message from the AMB.\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":\"VeaOutboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/tokens/gnosis/IWETH.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n IWETH public immutable weth; // The address of the WETH contract on Gnosis.\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 public immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 public immutable depositPlusReward; // 2 * deposit - burn\\n\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n weth = _weth;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerDelayLimit by receiving a message from the AMB.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n // If _newSequencerDelayLimit > timeout * epochPeriod, then the bridge will shutdown.\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external virtual {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n unchecked {\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch has not yet passed.\\\");\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.challenger, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) {\\n status = CensorshipTestStatus.NotStarted;\\n } else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod) {\\n status = CensorshipTestStatus.InProgress;\\n } else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the msg relayed status.\\n /// @param _msgId The msgId to check.\\n /// @return isRelayed True if the msg was relayed.\\n function isMsgRelayed(uint256 _msgId) external view returns(bool isRelayed) {\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1));\\n }\\n}\\n\",\"keccak256\":\"0xa3ed4eae38d473838a56aea19aacc8302e93c17cab7e82af74315c462d44132a\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/tokens/gnosis/IWETH.sol\":{\"content\":\"// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5daaf60d11ee2075260d0f3adfb22b1c536db983/contracts/token/ERC20/BurnableToken.sol\\n// implementation: https://gnosisscan.io/address/0xf8d1677c8a0c961938bf2f9adc3f3cfda759a9d9#code\\n// proxy: https://gnosisscan.io/token/0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1#readProxyContract\\n\\n/**\\n * @title Burnable Token\\n * @dev Token that can be irreversibly burned (destroyed).\\n */\\ninterface IWETH {\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n event Burn(address indexed burner, uint256 value);\\n\\n /**\\n * @dev Burns a specific amount of tokens.\\n * @param _value The amount of token to be burned.\\n */\\n function burn(uint256 _value) external;\\n\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Transfer tokens from one address to another\\n * @param _from address The address which you want to send tokens from\\n * @param _to address The address which you want to transfer to\\n * @param _value uint256 the amount of tokens to be transferred\\n */\\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd7cb8c8585a387464c451c2ff81ad3f9f02e291fe0dad802ff84646ff18d1eb2\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101e06040523480156200001257600080fd5b5060405162002c8438038062002c848339810160408190526200003591620000f2565b60e08a90526101608990526101a08790526101808890526001600160a01b0380871660805285811660a05260048590556101c0849052610140839052811660c0526200008360028b620001a3565b610100819052620000968b6002620001c6565b620000a29190620001e6565b6101205261016051600190620000b99042620001a3565b620000c59190620001e6565b60015550620001fc98505050505050505050565b6001600160a01b0381168114620000ef57600080fd5b50565b6000806000806000806000806000806101408b8d0312156200011357600080fd5b8a51995060208b0151985060408b0151975060608b0151965060808b01516200013c81620000d9565b60a08c01519096506200014f81620000d9565b8095505060c08b0151935060e08b015192506101008b015191506101208b01516200017a81620000d9565b809150509295989b9194979a5092959850565b634e487b7160e01b600052601160045260246000fd5b600082620001c157634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001e057620001e06200018d565b92915050565b81810381811115620001e057620001e06200018d565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516128d4620003b06000396000818161054f01526122d10152600081816105830152818161092401528181611bb001528181611da4015261206301526000818161060b01526122650152600081816105b70152818161094801528181610cd9015281816110b00152818161197801528181611b3101528181611bd401528181611dc801526120870152600081816104e501528181610abf0152610df20152600081816104b101526116820152600081816103e70152818161159101526117e501526000818161063f0152818161071301528181610ff50152818161191501528181611f1d01528181611fb201526121dc015260008181610366015281816107390152818161101b015281816115b7015281816116230152818161180b01528181611877015281816118ba01528181611f4301528181611fd8015261220201526000818161067301528181610bac0152610edf01526000818161022f015281816109c301528181610a3d01528181610b2101528181610d0e01528181610d700152610e5401526128d46000f3fe6080604052600436106101e35760003560e01c8063541adcca11610102578063b5b7a18411610095578063d5e6a9df11610064578063d5e6a9df14610661578063da2b7bc414610695578063df19e6ff146106b5578063e813a755146106e257600080fd5b8063b5b7a184146105a5578063b633b944146105d9578063c2114a16146105f9578063d0e30db01461062d57600080fd5b8063930f28af116100d1578063930f28af146105075780639588eca214610527578063aa22a1c61461053d578063b044397e1461057157600080fd5b8063541adcca146104695780637ffc2a6e14610489578063836e344b1461049f5780638d96fdea146104d357600080fd5b806331ddf7431161017a57806344df8e701161014957806344df8e70146103d55780634788cb381461040957806349b4299e146104295780634a439cfe1461044957600080fd5b806331ddf743146103145780633ce43cfd146103345780633fc8cef31461035457806343b066d51461038857600080fd5b80632639c060116101b65780632639c0601461029157806327ee6bdd146102be5780632c192519146102d457806331d14457146102f457600080fd5b806301139b68146101e85780630f0adca5146101fd5780631062b39a1461021d578063222ae7861461026e575b600080fd5b6101fb6101f636600461240e565b6106f8565b005b34801561020957600080fd5b506101fb61021836600461243c565b610922565b34801561022957600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561027a57600080fd5b50610283610cd2565b604051908152602001610265565b34801561029d57600080fd5b506102836102ac366004612473565b60026020526000908152604090205481565b3480156102ca57600080fd5b5061028360015481565b3480156102e057600080fd5b506101fb6102ef36600461248c565b610d03565b34801561030057600080fd5b506101fb61030f36600461248c565b610fda565b34801561032057600080fd5b506101fb61032f36600461250f565b61122f565b34801561034057600080fd5b506101fb61034f3660046125d1565b6114cf565b34801561036057600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b34801561039457600080fd5b506103c56103a3366004612473565b600881901c600090815260036020526040902054600160ff9092161c81161490565b6040519015158152602001610265565b3480156103e157600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561041557600080fd5b506101fb6104243660046125d1565b611709565b34801561043557600080fd5b506101fb61044436600461240e565b611941565b34801561045557600080fd5b50610283610464366004612473565b611b2a565b34801561047557600080fd5b5061028361048436600461260a565b611b5c565b34801561049557600080fd5b5061028360055481565b3480156104ab57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156104df57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561051357600080fd5b506101fb61052236600461240e565b611bae565b34801561053357600080fd5b5061028360005481565b34801561054957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561057d57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105b157600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e557600080fd5b506101fb6105f436600461240e565b611da2565b34801561060557600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561063957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561066d57600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b3480156106a157600080fd5b506101fb6106b036600461240e565b612061565b3480156106c157600080fd5b506106d56106d036600461260a565b612247565b6040516102659190612643565b3480156106ee57600080fd5b5061028360045481565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561078a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ae919061265d565b6107d35760405162461bcd60e51b81526004016107ca9061267f565b60405180910390fd5b6107dc81611b5c565b600083815260026020526040902054146108085760405162461bcd60e51b81526004016107ca906126ae565b60c08101516001600160a01b0316156108635760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016107ca565b60008160a00151600281111561087b5761087b61262d565b146108c85760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016107ca565b3360c08201526108d781611b5c565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610975576109756126d6565b040311156109b85760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107ca565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a3b5760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abd91906126ec565b7f000000000000000000000000000000000000000000000000000000000000000014610b1f5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba19190612705565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610c145760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016107ca565b60015483118015610c2457508115155b15610c6757600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610c7081611b5c565b60008481526002602052604090205403610ccd578051829003610c9957600160a0820152610cb4565b60c08101516001600160a01b031615610cb457600260a08201525b610cbd81611b5c565b6000848152600260205260409020555b505050565b6000610cfe7f000000000000000000000000000000000000000000000000000000000000000042612738565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d6e5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b60448201526064016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df091906126ec565b7f000000000000000000000000000000000000000000000000000000000000000014610e525760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610eb0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed49190612705565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610f475760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016107ca565b8060055410610f8f5760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016107ca565b8160045414610fd657600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b5050565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561106c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611090919061265d565b6110ac5760405162461bcd60e51b81526004016107ca9061267f565b60017f000000000000000000000000000000000000000000000000000000000000000042816110dd576110dd6126d6565b0403821461112d5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e0000000000000060448201526064016107ca565b8061114a5760405162461bcd60e51b81526004016107ca906126ae565b6000828152600260205260409020541561119c5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016107ca565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526111e290611b5c565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a35050565b604085106112715760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016107ca565b60008484848460405160200161128a949392919061275a565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561130a5760008888838181106112cc576112cc61279c565b905060200201359050828111156112f157826000528060205260406000209250611301565b8060005282602052604060002092505b506001016112b0565b50806000541461134d5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016107ca565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156113c25760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016107ca565b6000838152600360205260408082206001851b84179055516001600160a01b038916906113f290899089906127b2565b6000604051808303816000865af19150503d806000811461142f576040519150601f19603f3d011682016040523d82523d6000602084013e611434565b606091505b50509050806114855760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016107ca565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6114e16104843683900383018361260a565b6000838152600260205260409020541461150d5760405162461bcd60e51b81526004016107ca906126ae565b600261151f60c0830160a084016127c2565b60028111156115305761153061262d565b146115715760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016107ca565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561160357600080fd5b505af1158015611617573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061165c60e0840160c085016127dd565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af11580156116c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ed919061265d565b610fd65760405162461bcd60e51b81526004016107ca9061267f565b61171b6104843683900383018361260a565b600083815260026020526040902054146117475760405162461bcd60e51b81526004016107ca906126ae565b600161175960c0830160a084016127c2565b600281111561176a5761176a61262d565b146117a75760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016107ca565b60008281526002602052604081208190556117c860e0830160c084016127dd565b6001600160a01b0316146118b057604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561185757600080fd5b505af115801561186b573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061165c60408401602085016127dd565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb6118ef60408401602085016127dd565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044016116aa565b61194a81611b5c565b600083815260026020526040902054146119765760405162461bcd60e51b81526004016107ca906126ae565b7f00000000000000000000000000000000000000000000000000000000000000006004546119a491906127fa565b60408201516119b99063ffffffff164261280d565b1015611a1c5760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b60648201526084016107ca565b6000611a2782612247565b90506002816003811115611a3d57611a3d61262d565b1480611a5a57506000816003811115611a5857611a5861262d565b145b611ac35760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b60648201526084016107ca565b63ffffffff428116606084015243166080830152611ae082611b5c565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b6000611b567f000000000000000000000000000000000000000000000000000000000000000083612738565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611b91989097969101612820565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c0157611c016126d6565b04031115611c445760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107ca565b611c4d81611b5c565b60008381526002602052604090205414611c795760405162461bcd60e51b81526004016107ca906126ae565b60c08101516001600160a01b031615611ccb5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016107ca565b6001611cd682612247565b6003811115611ce757611ce761262d565b14611d345760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e000000000060448201526064016107ca565b600154821115611d7c57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611d8c81611b5c565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611df557611df56126d6565b040311611e365760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107ca565b611e3f81611b5c565b60008381526002602052604090205414611e6b5760405162461bcd60e51b81526004016107ca906126ae565b60008160a001516002811115611e8357611e8361262d565b14611ec25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107ca565b60c08101516001600160a01b031615610fd65760208101516001600160a01b0316611f74576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116aa565b60c0810180516000909152611f8882611b5c565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015612021573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612045919061265d565b610ccd5760405162461bcd60e51b81526004016107ca9061267f565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816120b4576120b46126d6565b0403116120f55760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107ca565b6120fe81611b5c565b6000838152600260205260409020541461212a5760405162461bcd60e51b81526004016107ca906126ae565b60008160a0015160028111156121425761214261262d565b146121815760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107ca565b60208101516001600160a01b031615610fd65760c08101516001600160a01b031661223357600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116aa565b6020810180516000909152611f8882611b5c565b6000816060015163ffffffff1660000361226357506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561229f57506003919050565b60006005836060015163ffffffff164203816122bd576122bd6126d6565b608085015163ffffffff16919004019050437f0000000000000000000000000000000000000000000000000000000000000000818303116123015760019250612306565b600092505b50505b919050565b6001600160a01b038116811461232357600080fd5b50565b80356123098161230e565b803563ffffffff8116811461230957600080fd5b80356003811061230957600080fd5b600060e0828403121561236657600080fd5b60405160e0810181811067ffffffffffffffff8211171561239757634e487b7160e01b600052604160045260246000fd5b604052823581529050806123ad60208401612326565b60208201526123be60408401612331565b60408201526123cf60608401612331565b60608201526123e060808401612331565b60808201526123f160a08401612345565b60a082015261240260c08401612326565b60c08201525092915050565b600080610100838503121561242257600080fd5b823591506124338460208501612354565b90509250929050565b6000806000610120848603121561245257600080fd5b833592506020840135915061246a8560408601612354565b90509250925092565b60006020828403121561248557600080fd5b5035919050565b6000806040838503121561249f57600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461230957600080fd5b60008083601f8401126124d857600080fd5b50813567ffffffffffffffff8111156124f057600080fd5b60208301915083602082850101111561250857600080fd5b9250929050565b6000806000806000806080878903121561252857600080fd5b863567ffffffffffffffff8082111561254057600080fd5b818901915089601f83011261255457600080fd5b81358181111561256357600080fd5b8a60208260051b850101111561257857600080fd5b6020830198508097505061258e60208a016124ae565b955061259c60408a01612326565b945060608901359150808211156125b257600080fd5b506125bf89828a016124c6565b979a9699509497509295939492505050565b6000808284036101008112156125e657600080fd5b8335925060e0601f19820112156125fc57600080fd5b506020830190509250929050565b600060e0828403121561261c57600080fd5b6126268383612354565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106126575761265761262d565b91905290565b60006020828403121561266f57600080fd5b8151801515811461262657600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156126fe57600080fd5b5051919050565b60006020828403121561271757600080fd5b81516126268161230e565b634e487b7160e01b600052601160045260246000fd5b60008261275557634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156127d457600080fd5b61262682612345565b6000602082840312156127ef57600080fd5b81356126268161230e565b80820180821115611b5657611b56612722565b81810381811115611b5657611b56612722565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106128785761287861262d565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122031052008c53960a426b4b775a73365b0a279ac9190f49c5d62d2741344743b2764736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101e35760003560e01c8063541adcca11610102578063b5b7a18411610095578063d5e6a9df11610064578063d5e6a9df14610661578063da2b7bc414610695578063df19e6ff146106b5578063e813a755146106e257600080fd5b8063b5b7a184146105a5578063b633b944146105d9578063c2114a16146105f9578063d0e30db01461062d57600080fd5b8063930f28af116100d1578063930f28af146105075780639588eca214610527578063aa22a1c61461053d578063b044397e1461057157600080fd5b8063541adcca146104695780637ffc2a6e14610489578063836e344b1461049f5780638d96fdea146104d357600080fd5b806331ddf7431161017a57806344df8e701161014957806344df8e70146103d55780634788cb381461040957806349b4299e146104295780634a439cfe1461044957600080fd5b806331ddf743146103145780633ce43cfd146103345780633fc8cef31461035457806343b066d51461038857600080fd5b80632639c060116101b65780632639c0601461029157806327ee6bdd146102be5780632c192519146102d457806331d14457146102f457600080fd5b806301139b68146101e85780630f0adca5146101fd5780631062b39a1461021d578063222ae7861461026e575b600080fd5b6101fb6101f636600461240e565b6106f8565b005b34801561020957600080fd5b506101fb61021836600461243c565b610922565b34801561022957600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561027a57600080fd5b50610283610cd2565b604051908152602001610265565b34801561029d57600080fd5b506102836102ac366004612473565b60026020526000908152604090205481565b3480156102ca57600080fd5b5061028360015481565b3480156102e057600080fd5b506101fb6102ef36600461248c565b610d03565b34801561030057600080fd5b506101fb61030f36600461248c565b610fda565b34801561032057600080fd5b506101fb61032f36600461250f565b61122f565b34801561034057600080fd5b506101fb61034f3660046125d1565b6114cf565b34801561036057600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b34801561039457600080fd5b506103c56103a3366004612473565b600881901c600090815260036020526040902054600160ff9092161c81161490565b6040519015158152602001610265565b3480156103e157600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561041557600080fd5b506101fb6104243660046125d1565b611709565b34801561043557600080fd5b506101fb61044436600461240e565b611941565b34801561045557600080fd5b50610283610464366004612473565b611b2a565b34801561047557600080fd5b5061028361048436600461260a565b611b5c565b34801561049557600080fd5b5061028360055481565b3480156104ab57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156104df57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561051357600080fd5b506101fb61052236600461240e565b611bae565b34801561053357600080fd5b5061028360005481565b34801561054957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561057d57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105b157600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e557600080fd5b506101fb6105f436600461240e565b611da2565b34801561060557600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561063957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561066d57600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b3480156106a157600080fd5b506101fb6106b036600461240e565b612061565b3480156106c157600080fd5b506106d56106d036600461260a565b612247565b6040516102659190612643565b3480156106ee57600080fd5b5061028360045481565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561078a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ae919061265d565b6107d35760405162461bcd60e51b81526004016107ca9061267f565b60405180910390fd5b6107dc81611b5c565b600083815260026020526040902054146108085760405162461bcd60e51b81526004016107ca906126ae565b60c08101516001600160a01b0316156108635760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016107ca565b60008160a00151600281111561087b5761087b61262d565b146108c85760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016107ca565b3360c08201526108d781611b5c565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610975576109756126d6565b040311156109b85760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107ca565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a3b5760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abd91906126ec565b7f000000000000000000000000000000000000000000000000000000000000000014610b1f5760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba19190612705565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610c145760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016107ca565b60015483118015610c2457508115155b15610c6757600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610c7081611b5c565b60008481526002602052604090205403610ccd578051829003610c9957600160a0820152610cb4565b60c08101516001600160a01b031615610cb457600260a08201525b610cbd81611b5c565b6000848152600260205260409020555b505050565b6000610cfe7f000000000000000000000000000000000000000000000000000000000000000042612738565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d6e5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b60448201526064016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df091906126ec565b7f000000000000000000000000000000000000000000000000000000000000000014610e525760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610eb0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed49190612705565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610f475760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016107ca565b8060055410610f8f5760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016107ca565b8160045414610fd657600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b5050565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561106c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611090919061265d565b6110ac5760405162461bcd60e51b81526004016107ca9061267f565b60017f000000000000000000000000000000000000000000000000000000000000000042816110dd576110dd6126d6565b0403821461112d5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e0000000000000060448201526064016107ca565b8061114a5760405162461bcd60e51b81526004016107ca906126ae565b6000828152600260205260409020541561119c5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016107ca565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526111e290611b5c565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a35050565b604085106112715760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016107ca565b60008484848460405160200161128a949392919061275a565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561130a5760008888838181106112cc576112cc61279c565b905060200201359050828111156112f157826000528060205260406000209250611301565b8060005282602052604060002092505b506001016112b0565b50806000541461134d5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016107ca565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156113c25760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016107ca565b6000838152600360205260408082206001851b84179055516001600160a01b038916906113f290899089906127b2565b6000604051808303816000865af19150503d806000811461142f576040519150601f19603f3d011682016040523d82523d6000602084013e611434565b606091505b50509050806114855760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016107ca565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6114e16104843683900383018361260a565b6000838152600260205260409020541461150d5760405162461bcd60e51b81526004016107ca906126ae565b600261151f60c0830160a084016127c2565b60028111156115305761153061262d565b146115715760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016107ca565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561160357600080fd5b505af1158015611617573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061165c60e0840160c085016127dd565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af11580156116c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ed919061265d565b610fd65760405162461bcd60e51b81526004016107ca9061267f565b61171b6104843683900383018361260a565b600083815260026020526040902054146117475760405162461bcd60e51b81526004016107ca906126ae565b600161175960c0830160a084016127c2565b600281111561176a5761176a61262d565b146117a75760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016107ca565b60008281526002602052604081208190556117c860e0830160c084016127dd565b6001600160a01b0316146118b057604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561185757600080fd5b505af115801561186b573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061165c60408401602085016127dd565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb6118ef60408401602085016127dd565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044016116aa565b61194a81611b5c565b600083815260026020526040902054146119765760405162461bcd60e51b81526004016107ca906126ae565b7f00000000000000000000000000000000000000000000000000000000000000006004546119a491906127fa565b60408201516119b99063ffffffff164261280d565b1015611a1c5760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b60648201526084016107ca565b6000611a2782612247565b90506002816003811115611a3d57611a3d61262d565b1480611a5a57506000816003811115611a5857611a5861262d565b145b611ac35760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b60648201526084016107ca565b63ffffffff428116606084015243166080830152611ae082611b5c565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b6000611b567f000000000000000000000000000000000000000000000000000000000000000083612738565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611b91989097969101612820565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611c0157611c016126d6565b04031115611c445760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107ca565b611c4d81611b5c565b60008381526002602052604090205414611c795760405162461bcd60e51b81526004016107ca906126ae565b60c08101516001600160a01b031615611ccb5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016107ca565b6001611cd682612247565b6003811115611ce757611ce761262d565b14611d345760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e000000000060448201526064016107ca565b600154821115611d7c57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611d8c81611b5c565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611df557611df56126d6565b040311611e365760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107ca565b611e3f81611b5c565b60008381526002602052604090205414611e6b5760405162461bcd60e51b81526004016107ca906126ae565b60008160a001516002811115611e8357611e8361262d565b14611ec25760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107ca565b60c08101516001600160a01b031615610fd65760208101516001600160a01b0316611f74576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116aa565b60c0810180516000909152611f8882611b5c565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af1158015612021573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612045919061265d565b610ccd5760405162461bcd60e51b81526004016107ca9061267f565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816120b4576120b46126d6565b0403116120f55760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107ca565b6120fe81611b5c565b6000838152600260205260409020541461212a5760405162461bcd60e51b81526004016107ca906126ae565b60008160a0015160028111156121425761214261262d565b146121815760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107ca565b60208101516001600160a01b031615610fd65760c08101516001600160a01b031661223357600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116aa565b6020810180516000909152611f8882611b5c565b6000816060015163ffffffff1660000361226357506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561229f57506003919050565b60006005836060015163ffffffff164203816122bd576122bd6126d6565b608085015163ffffffff16919004019050437f0000000000000000000000000000000000000000000000000000000000000000818303116123015760019250612306565b600092505b50505b919050565b6001600160a01b038116811461232357600080fd5b50565b80356123098161230e565b803563ffffffff8116811461230957600080fd5b80356003811061230957600080fd5b600060e0828403121561236657600080fd5b60405160e0810181811067ffffffffffffffff8211171561239757634e487b7160e01b600052604160045260246000fd5b604052823581529050806123ad60208401612326565b60208201526123be60408401612331565b60408201526123cf60608401612331565b60608201526123e060808401612331565b60808201526123f160a08401612345565b60a082015261240260c08401612326565b60c08201525092915050565b600080610100838503121561242257600080fd5b823591506124338460208501612354565b90509250929050565b6000806000610120848603121561245257600080fd5b833592506020840135915061246a8560408601612354565b90509250925092565b60006020828403121561248557600080fd5b5035919050565b6000806040838503121561249f57600080fd5b50508035926020909101359150565b803567ffffffffffffffff8116811461230957600080fd5b60008083601f8401126124d857600080fd5b50813567ffffffffffffffff8111156124f057600080fd5b60208301915083602082850101111561250857600080fd5b9250929050565b6000806000806000806080878903121561252857600080fd5b863567ffffffffffffffff8082111561254057600080fd5b818901915089601f83011261255457600080fd5b81358181111561256357600080fd5b8a60208260051b850101111561257857600080fd5b6020830198508097505061258e60208a016124ae565b955061259c60408a01612326565b945060608901359150808211156125b257600080fd5b506125bf89828a016124c6565b979a9699509497509295939492505050565b6000808284036101008112156125e657600080fd5b8335925060e0601f19820112156125fc57600080fd5b506020830190509250929050565b600060e0828403121561261c57600080fd5b6126268383612354565b9392505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106126575761265761262d565b91905290565b60006020828403121561266f57600080fd5b8151801515811461262657600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156126fe57600080fd5b5051919050565b60006020828403121561271757600080fd5b81516126268161230e565b634e487b7160e01b600052601160045260246000fd5b60008261275557634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156127d457600080fd5b61262682612345565b6000602082840312156127ef57600080fd5b81356126268161230e565b80820180821115611b5657611b56612722565b81810381811115611b5657611b56612722565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106128785761287861262d565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122031052008c53960a426b4b775a73365b0a279ac9190f49c5d62d2741344743b2764736f6c63430008120033", + "numDeployments": 11, + "solcInputHash": "18d8b299616ba6ea1bb506a660a35de5", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_routerArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_routerChainId\",\"type\":\"uint256\"},{\"internalType\":\"contract IWETH\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdateReceived\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToGnosis.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositPlusReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_msgId\",\"type\":\"uint256\"}],\"name\":\"isMsgRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRelayed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"routerChainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timestampDelayUpdated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"contract IWETH\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitUpdateReceived(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_amb\":\"The address of the AMB contract on Gnosis.\",\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_routerArbToGnosis\":\"The address of the router on Ethereum that routes from Arbitrum to Gnosis.\",\"_routerChainId\":\"The chain id of the routerArbToGnosis.\",\"_sequencerDelayLimit\":\"The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_weth\":\"The address of the WETH contract on Gnosis.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"isMsgRelayed(uint256)\":{\"details\":\"Get the msg relayed status.\",\"params\":{\"_msgId\":\"The msgId to check.\"},\"returns\":{\"isRelayed\":\"True if the msg was relayed.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Gnosis to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit(uint256,uint256)\":{\"details\":\"Set the sequencerDelayLimit by receiving a message from the AMB.\",\"params\":{\"_newSequencerDelayLimit\":\"The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\",\"_timestamp\":\"The timestamp of the message.\"}},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to AMB.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":\"VeaOutboxArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/tokens/gnosis/IWETH.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Gnosis.\\n/// Note: This contract is deployed on Gnosis.\\ncontract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IAMB public immutable amb; // The address of the AMB contract on Gnosis.\\n address public immutable routerArbToGnosis; // The address of the router from Arbitrum to Gnosis on ethereum.\\n\\n IWETH public immutable weth; // The address of the WETH contract on Gnosis.\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 public immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 public immutable depositPlusReward; // 2 * deposit - burn\\n\\n uint256 internal constant SLOT_TIME = 5; // Gnosis 5 second slot time\\n\\n uint256 public immutable routerChainId; // Router chain id for authentication of messages from the AMB.\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update.\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 indexed _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 indexed _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdateReceived(uint256 _newSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToGnosis contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _amb The address of the AMB contract on Gnosis.\\n /// @param _routerArbToGnosis The address of the router on Ethereum that routes from Arbitrum to Gnosis.\\n /// @param _sequencerDelayLimit The maximum delay in seconds that the Arbitrum sequencer can backdate transactions.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n /// @param _routerChainId The chain id of the routerArbToGnosis.\\n /// @param _weth The address of the WETH contract on Gnosis.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n IAMB _amb,\\n address _routerArbToGnosis,\\n uint256 _sequencerDelayLimit,\\n uint256 _maxMissingBlocks,\\n uint256 _routerChainId,\\n IWETH _weth\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToGnosis contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n timeoutEpochs = _timeoutEpochs;\\n minChallengePeriod = _minChallengePeriod;\\n amb = _amb;\\n routerArbToGnosis = _routerArbToGnosis;\\n // This value is on another chain, so we can't read it, we trust the deployer to set a correct value.\\n sequencerDelayLimit = _sequencerDelayLimit; // MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox\\n maxMissingBlocks = _maxMissingBlocks;\\n routerChainId = _routerChainId;\\n weth = _weth;\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Set the sequencerDelayLimit by receiving a message from the AMB.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external {\\n require(msg.sender == address(amb), \\\"Not from bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n require(timestampDelayUpdated < _timestamp, \\\"Message is outdated.\\\");\\n\\n if (sequencerDelayLimit != _newSequencerDelayLimit) {\\n // If _newSequencerDelayLimit > timeout * epochPeriod, then the bridge will shutdown.\\n sequencerDelayLimit = _newSequencerDelayLimit;\\n timestampDelayUpdated = _timestamp;\\n emit sequencerDelayLimitUpdateReceived(_newSequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external virtual {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n unchecked {\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch has not yet passed.\\\");\\n }\\n\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(weth.transferFrom(msg.sender, address(this), deposit), \\\"Failed WETH transfer.\\\");\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to AMB.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(routerChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(routerArbToGnosis == amb.messageSender(), \\\"Not from router.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Gnosis to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.claimer, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n weth.burn(burn); // no return value to check\\n require(weth.transfer(_claim.challenger, depositPlusReward), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(claimer, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n require(weth.transfer(_claim.challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n require(weth.transfer(challenger, deposit), \\\"Failed WETH transfer.\\\"); // should revert on errors, but we check return value anyways\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) {\\n status = CensorshipTestStatus.NotStarted;\\n } else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod) {\\n status = CensorshipTestStatus.InProgress;\\n } else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the msg relayed status.\\n /// @param _msgId The msgId to check.\\n /// @return isRelayed True if the msg was relayed.\\n function isMsgRelayed(uint256 _msgId) external view returns (bool isRelayed) {\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1));\\n }\\n}\\n\",\"keccak256\":\"0x8a5031b4acc020c109c8bca88e621aa8b7a480c8c1d6b00f28fd9574ce42be9e\",\"license\":\"MIT\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/tokens/gnosis/IWETH.sol\":{\"content\":\"// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5daaf60d11ee2075260d0f3adfb22b1c536db983/contracts/token/ERC20/BurnableToken.sol\\n// implementation: https://gnosisscan.io/address/0xf8d1677c8a0c961938bf2f9adc3f3cfda759a9d9#code\\n// proxy: https://gnosisscan.io/token/0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1#readProxyContract\\n\\n/**\\n * @title Burnable Token\\n * @dev Token that can be irreversibly burned (destroyed).\\n */\\ninterface IWETH {\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n event Burn(address indexed burner, uint256 value);\\n\\n /**\\n * @dev Burns a specific amount of tokens.\\n * @param _value The amount of token to be burned.\\n */\\n function burn(uint256 _value) external;\\n\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Transfer tokens from one address to another\\n * @param _from address The address which you want to send tokens from\\n * @param _to address The address which you want to transfer to\\n * @param _value uint256 the amount of tokens to be transferred\\n */\\n function transferFrom(address _from, address _to, uint256 _value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xd7cb8c8585a387464c451c2ff81ad3f9f02e291fe0dad802ff84646ff18d1eb2\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101e06040523480156200001257600080fd5b5060405162002c6f38038062002c6f8339810160408190526200003591620000f2565b60e08a90526101608990526101a08790526101808890526001600160a01b0380871660805285811660a05260048590556101c0849052610140839052811660c0526200008360028b620001a3565b610100819052620000968b6002620001c6565b620000a29190620001e6565b6101205261016051600190620000b99042620001a3565b620000c59190620001e6565b60015550620001fc98505050505050505050565b6001600160a01b0381168114620000ef57600080fd5b50565b6000806000806000806000806000806101408b8d0312156200011357600080fd5b8a51995060208b0151985060408b0151975060608b0151965060808b01516200013c81620000d9565b60a08c01519096506200014f81620000d9565b8095505060c08b0151935060e08b015192506101008b015191506101208b01516200017a81620000d9565b809150509295989b9194979a5092959850565b634e487b7160e01b600052601160045260246000fd5b600082620001c157634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620001e057620001e06200018d565b92915050565b81810381811115620001e057620001e06200018d565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516128bf620003b06000396000818161054f01526122bc0152600081816105830152818161091a01528181611b9b01528181611d8f015261204e01526000818161060b01526122500152600081816105b70152818161093e01528181610ccf015281816110a60152818161196e01528181611b1c01528181611bbf01528181611db301526120720152600081816104e501528181610ab50152610de80152600081816104b101526116780152600081816103e70152818161158701526117db01526000818161063f0152818161071301528181610feb0152818161190b01528181611f0801528181611f9d01526121c70152600081816103660152818161073901528181611011015281816115ad01528181611619015281816118010152818161186d015281816118b001528181611f2e01528181611fc301526121ed01526000818161067301528181610ba20152610ed501526000818161022f015281816109b901528181610a3301528181610b1701528181610d0401528181610d660152610e4a01526128bf6000f3fe6080604052600436106101e35760003560e01c8063541adcca11610102578063b5b7a18411610095578063d5e6a9df11610064578063d5e6a9df14610661578063da2b7bc414610695578063df19e6ff146106b5578063e813a755146106e257600080fd5b8063b5b7a184146105a5578063b633b944146105d9578063c2114a16146105f9578063d0e30db01461062d57600080fd5b8063930f28af116100d1578063930f28af146105075780639588eca214610527578063aa22a1c61461053d578063b044397e1461057157600080fd5b8063541adcca146104695780637ffc2a6e14610489578063836e344b1461049f5780638d96fdea146104d357600080fd5b806331ddf7431161017a57806344df8e701161014957806344df8e70146103d55780634788cb381461040957806349b4299e146104295780634a439cfe1461044957600080fd5b806331ddf743146103145780633ce43cfd146103345780633fc8cef31461035457806343b066d51461038857600080fd5b80632639c060116101b65780632639c0601461029157806327ee6bdd146102be5780632c192519146102d457806331d14457146102f457600080fd5b806301139b68146101e85780630f0adca5146101fd5780631062b39a1461021d578063222ae7861461026e575b600080fd5b6101fb6101f63660046123f9565b6106f8565b005b34801561020957600080fd5b506101fb610218366004612427565b610918565b34801561022957600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561027a57600080fd5b50610283610cc8565b604051908152602001610265565b34801561029d57600080fd5b506102836102ac36600461245e565b60026020526000908152604090205481565b3480156102ca57600080fd5b5061028360015481565b3480156102e057600080fd5b506101fb6102ef366004612477565b610cf9565b34801561030057600080fd5b506101fb61030f366004612477565b610fd0565b34801561032057600080fd5b506101fb61032f3660046124fa565b611225565b34801561034057600080fd5b506101fb61034f3660046125bc565b6114c5565b34801561036057600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b34801561039457600080fd5b506103c56103a336600461245e565b600881901c600090815260036020526040902054600160ff9092161c81161490565b6040519015158152602001610265565b3480156103e157600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561041557600080fd5b506101fb6104243660046125bc565b6116ff565b34801561043557600080fd5b506101fb6104443660046123f9565b611937565b34801561045557600080fd5b5061028361046436600461245e565b611b15565b34801561047557600080fd5b506102836104843660046125f5565b611b47565b34801561049557600080fd5b5061028360055481565b3480156104ab57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156104df57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561051357600080fd5b506101fb6105223660046123f9565b611b99565b34801561053357600080fd5b5061028360005481565b34801561054957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561057d57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105b157600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e557600080fd5b506101fb6105f43660046123f9565b611d8d565b34801561060557600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561063957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561066d57600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b3480156106a157600080fd5b506101fb6106b03660046123f9565b61204c565b3480156106c157600080fd5b506106d56106d03660046125f5565b612232565b604051610265919061262e565b3480156106ee57600080fd5b5061028360045481565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561078a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ae9190612648565b6107d35760405162461bcd60e51b81526004016107ca9061266a565b60405180910390fd5b6107dc81611b47565b600083815260026020526040902054146108085760405162461bcd60e51b81526004016107ca90612699565b60c08101516001600160a01b0316156108635760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016107ca565b60008160a00151600281111561087b5761087b612618565b146108c85760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016107ca565b3360c08201526108d781611b47565b600083815260026020526040808220929092559051339184917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d79190a35050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161096b5761096b6126c1565b040311156109ae5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107ca565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a315760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab391906126d7565b7f000000000000000000000000000000000000000000000000000000000000000014610b155760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9791906126f0565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610c0a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016107ca565b60015483118015610c1a57508115155b15610c5d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610c6681611b47565b60008481526002602052604090205403610cc3578051829003610c8f57600160a0820152610caa565b60c08101516001600160a01b031615610caa57600260a08201525b610cb381611b47565b6000848152600260205260409020555b505050565b6000610cf47f000000000000000000000000000000000000000000000000000000000000000042612723565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d645760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b60448201526064016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de691906126d7565b7f000000000000000000000000000000000000000000000000000000000000000014610e485760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ea6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eca91906126f0565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610f3d5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016107ca565b8060055410610f855760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016107ca565b8160045414610fcc57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b5050565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611062573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110869190612648565b6110a25760405162461bcd60e51b81526004016107ca9061266a565b60017f000000000000000000000000000000000000000000000000000000000000000042816110d3576110d36126c1565b040382146111235760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e0000000000000060448201526064016107ca565b806111405760405162461bcd60e51b81526004016107ca90612699565b600082815260026020526040902054156111925760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016107ca565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526111d890611b47565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a35050565b604085106112675760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016107ca565b6000848484846040516020016112809493929190612745565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156113005760008888838181106112c2576112c2612787565b905060200201359050828111156112e7578260005280602052604060002092506112f7565b8060005282602052604060002092505b506001016112a6565b5080600054146113435760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016107ca565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156113b85760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016107ca565b6000838152600360205260408082206001851b84179055516001600160a01b038916906113e8908990899061279d565b6000604051808303816000865af19150503d8060008114611425576040519150601f19603f3d011682016040523d82523d6000602084013e61142a565b606091505b505090508061147b5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016107ca565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6114d7610484368390038301836125f5565b600083815260026020526040902054146115035760405162461bcd60e51b81526004016107ca90612699565b600261151560c0830160a084016127ad565b600281111561152657611526612618565b146115675760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016107ca565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b1580156115f957600080fd5b505af115801561160d573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061165260e0840160c085016127c8565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af11580156116bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e39190612648565b610fcc5760405162461bcd60e51b81526004016107ca9061266a565b611711610484368390038301836125f5565b6000838152600260205260409020541461173d5760405162461bcd60e51b81526004016107ca90612699565b600161174f60c0830160a084016127ad565b600281111561176057611760612618565b1461179d5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016107ca565b60008281526002602052604081208190556117be60e0830160c084016127c8565b6001600160a01b0316146118a657604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561184d57600080fd5b505af1158015611861573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061165260408401602085016127c8565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb6118e560408401602085016127c8565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044016116a0565b61194081611b47565b6000838152600260205260409020541461196c5760405162461bcd60e51b81526004016107ca90612699565b7f000000000000000000000000000000000000000000000000000000000000000060045461199a91906127e5565b60408201516119af9063ffffffff16426127f8565b1015611a125760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b60648201526084016107ca565b6000611a1d82612232565b90506002816003811115611a3357611a33612618565b1480611a5057506000816003811115611a4e57611a4e612618565b145b611ab95760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b60648201526084016107ca565b63ffffffff428116606084015243166080830152611ad682611b47565b60008481526002602052604080822092909255905184917f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691a2505050565b6000611b417f000000000000000000000000000000000000000000000000000000000000000083612723565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611b7c98909796910161280b565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bec57611bec6126c1565b04031115611c2f5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107ca565b611c3881611b47565b60008381526002602052604090205414611c645760405162461bcd60e51b81526004016107ca90612699565b60c08101516001600160a01b031615611cb65760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016107ca565b6001611cc182612232565b6003811115611cd257611cd2612618565b14611d1f5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e000000000060448201526064016107ca565b600154821115611d6757600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611d7781611b47565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611de057611de06126c1565b040311611e215760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107ca565b611e2a81611b47565b60008381526002602052604090205414611e565760405162461bcd60e51b81526004016107ca90612699565b60008160a001516002811115611e6e57611e6e612618565b14611ead5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107ca565b60c08101516001600160a01b031615610fcc5760208101516001600160a01b0316611f5f576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116a0565b60c0810180516000909152611f7382611b47565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af115801561200c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120309190612648565b610cc35760405162461bcd60e51b81526004016107ca9061266a565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161209f5761209f6126c1565b0403116120e05760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107ca565b6120e981611b47565b600083815260026020526040902054146121155760405162461bcd60e51b81526004016107ca90612699565b60008160a00151600281111561212d5761212d612618565b1461216c5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107ca565b60208101516001600160a01b031615610fcc5760c08101516001600160a01b031661221e57600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116a0565b6020810180516000909152611f7382611b47565b6000816060015163ffffffff1660000361224e57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561228a57506003919050565b60006005836060015163ffffffff164203816122a8576122a86126c1565b608085015163ffffffff16919004019050437f0000000000000000000000000000000000000000000000000000000000000000818303116122ec57600192506122f1565b600092505b50505b919050565b6001600160a01b038116811461230e57600080fd5b50565b80356122f4816122f9565b803563ffffffff811681146122f457600080fd5b8035600381106122f457600080fd5b600060e0828403121561235157600080fd5b60405160e0810181811067ffffffffffffffff8211171561238257634e487b7160e01b600052604160045260246000fd5b6040528235815290508061239860208401612311565b60208201526123a96040840161231c565b60408201526123ba6060840161231c565b60608201526123cb6080840161231c565b60808201526123dc60a08401612330565b60a08201526123ed60c08401612311565b60c08201525092915050565b600080610100838503121561240d57600080fd5b8235915061241e846020850161233f565b90509250929050565b6000806000610120848603121561243d57600080fd5b8335925060208401359150612455856040860161233f565b90509250925092565b60006020828403121561247057600080fd5b5035919050565b6000806040838503121561248a57600080fd5b50508035926020909101359150565b803567ffffffffffffffff811681146122f457600080fd5b60008083601f8401126124c357600080fd5b50813567ffffffffffffffff8111156124db57600080fd5b6020830191508360208285010111156124f357600080fd5b9250929050565b6000806000806000806080878903121561251357600080fd5b863567ffffffffffffffff8082111561252b57600080fd5b818901915089601f83011261253f57600080fd5b81358181111561254e57600080fd5b8a60208260051b850101111561256357600080fd5b6020830198508097505061257960208a01612499565b955061258760408a01612311565b9450606089013591508082111561259d57600080fd5b506125aa89828a016124b1565b979a9699509497509295939492505050565b6000808284036101008112156125d157600080fd5b8335925060e0601f19820112156125e757600080fd5b506020830190509250929050565b600060e0828403121561260757600080fd5b612611838361233f565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061264257612642612618565b91905290565b60006020828403121561265a57600080fd5b8151801515811461261157600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156126e957600080fd5b5051919050565b60006020828403121561270257600080fd5b8151612611816122f9565b634e487b7160e01b600052601160045260246000fd5b60008261274057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156127bf57600080fd5b61261182612330565b6000602082840312156127da57600080fd5b8135612611816122f9565b80820180821115611b4157611b4161270d565b81810381811115611b4157611b4161270d565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061286357612863612618565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122022ba0f495a78693991ca05bc8ebc668367b0e3eb446f48492e25094b4b4fa39d64736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101e35760003560e01c8063541adcca11610102578063b5b7a18411610095578063d5e6a9df11610064578063d5e6a9df14610661578063da2b7bc414610695578063df19e6ff146106b5578063e813a755146106e257600080fd5b8063b5b7a184146105a5578063b633b944146105d9578063c2114a16146105f9578063d0e30db01461062d57600080fd5b8063930f28af116100d1578063930f28af146105075780639588eca214610527578063aa22a1c61461053d578063b044397e1461057157600080fd5b8063541adcca146104695780637ffc2a6e14610489578063836e344b1461049f5780638d96fdea146104d357600080fd5b806331ddf7431161017a57806344df8e701161014957806344df8e70146103d55780634788cb381461040957806349b4299e146104295780634a439cfe1461044957600080fd5b806331ddf743146103145780633ce43cfd146103345780633fc8cef31461035457806343b066d51461038857600080fd5b80632639c060116101b65780632639c0601461029157806327ee6bdd146102be5780632c192519146102d457806331d14457146102f457600080fd5b806301139b68146101e85780630f0adca5146101fd5780631062b39a1461021d578063222ae7861461026e575b600080fd5b6101fb6101f63660046123f9565b6106f8565b005b34801561020957600080fd5b506101fb610218366004612427565b610918565b34801561022957600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561027a57600080fd5b50610283610cc8565b604051908152602001610265565b34801561029d57600080fd5b506102836102ac36600461245e565b60026020526000908152604090205481565b3480156102ca57600080fd5b5061028360015481565b3480156102e057600080fd5b506101fb6102ef366004612477565b610cf9565b34801561030057600080fd5b506101fb61030f366004612477565b610fd0565b34801561032057600080fd5b506101fb61032f3660046124fa565b611225565b34801561034057600080fd5b506101fb61034f3660046125bc565b6114c5565b34801561036057600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b34801561039457600080fd5b506103c56103a336600461245e565b600881901c600090815260036020526040902054600160ff9092161c81161490565b6040519015158152602001610265565b3480156103e157600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561041557600080fd5b506101fb6104243660046125bc565b6116ff565b34801561043557600080fd5b506101fb6104443660046123f9565b611937565b34801561045557600080fd5b5061028361046436600461245e565b611b15565b34801561047557600080fd5b506102836104843660046125f5565b611b47565b34801561049557600080fd5b5061028360055481565b3480156104ab57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156104df57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561051357600080fd5b506101fb6105223660046123f9565b611b99565b34801561053357600080fd5b5061028360005481565b34801561054957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561057d57600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105b157600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e557600080fd5b506101fb6105f43660046123f9565b611d8d565b34801561060557600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561063957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561066d57600080fd5b506102517f000000000000000000000000000000000000000000000000000000000000000081565b3480156106a157600080fd5b506101fb6106b03660046123f9565b61204c565b3480156106c157600080fd5b506106d56106d03660046125f5565b612232565b604051610265919061262e565b3480156106ee57600080fd5b5061028360045481565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af115801561078a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ae9190612648565b6107d35760405162461bcd60e51b81526004016107ca9061266a565b60405180910390fd5b6107dc81611b47565b600083815260026020526040902054146108085760405162461bcd60e51b81526004016107ca90612699565b60c08101516001600160a01b0316156108635760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016107ca565b60008160a00151600281111561087b5761087b612618565b146108c85760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016107ca565b3360c08201526108d781611b47565b600083815260026020526040808220929092559051339184917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d79190a35050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161096b5761096b6126c1565b040311156109ae5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107ca565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a315760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a8f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab391906126d7565b7f000000000000000000000000000000000000000000000000000000000000000014610b155760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9791906126f0565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610c0a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016107ca565b60015483118015610c1a57508115155b15610c5d57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610c6681611b47565b60008481526002602052604090205403610cc3578051829003610c8f57600160a0820152610caa565b60c08101516001600160a01b031615610caa57600260a08201525b610cb381611b47565b6000848152600260205260409020555b505050565b6000610cf47f000000000000000000000000000000000000000000000000000000000000000042612723565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610d645760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b60448201526064016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dc2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de691906126d7565b7f000000000000000000000000000000000000000000000000000000000000000014610e485760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016107ca565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ea6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eca91906126f0565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610f3d5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b6903937baba32b91760811b60448201526064016107ca565b8060055410610f855760405162461bcd60e51b815260206004820152601460248201527326b2b9b9b0b3b29034b99037baba3230ba32b21760611b60448201526064016107ca565b8160045414610fcc57600482905560058190556040518281527f684f6fb71cbcb798156dcca2a95dbd142fa1f8957637833b1897ab89e05aa7079060200160405180910390a15b5050565b6040516323b872dd60e01b81523360048201523060248201527f000000000000000000000000000000000000000000000000000000000000000060448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611062573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110869190612648565b6110a25760405162461bcd60e51b81526004016107ca9061266a565b60017f000000000000000000000000000000000000000000000000000000000000000042816110d3576110d36126c1565b040382146111235760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e0000000000000060448201526064016107ca565b806111405760405162461bcd60e51b81526004016107ca90612699565b600082815260026020526040902054156111925760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016107ca565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526111d890611b47565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a35050565b604085106112675760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016107ca565b6000848484846040516020016112809493929190612745565b604051602081830303815290604052805190602001209050806000526020600020905060005b868110156113005760008888838181106112c2576112c2612787565b905060200201359050828111156112e7578260005280602052604060002092506112f7565b8060005282602052604060002092505b506001016112a6565b5080600054146113435760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016107ca565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156113b85760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016107ca565b6000838152600360205260408082206001851b84179055516001600160a01b038916906113e8908990899061279d565b6000604051808303816000865af19150503d8060008114611425576040519150601f19603f3d011682016040523d82523d6000602084013e61142a565b606091505b505090508061147b5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016107ca565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b6114d7610484368390038301836125f5565b600083815260026020526040902054146115035760405162461bcd60e51b81526004016107ca90612699565b600261151560c0830160a084016127ad565b600281111561152657611526612618565b146115675760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016107ca565b6000828152600260205260408082209190915551630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b1580156115f957600080fd5b505af115801561160d573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061165260e0840160c085016127c8565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b6020604051808303816000875af11580156116bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e39190612648565b610fcc5760405162461bcd60e51b81526004016107ca9061266a565b611711610484368390038301836125f5565b6000838152600260205260409020541461173d5760405162461bcd60e51b81526004016107ca90612699565b600161174f60c0830160a084016127ad565b600281111561176057611760612618565b1461179d5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016107ca565b60008281526002602052604081208190556117be60e0830160c084016127c8565b6001600160a01b0316146118a657604051630852cd8d60e31b81527f000000000000000000000000000000000000000000000000000000000000000060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342966c6890602401600060405180830381600087803b15801561184d57600080fd5b505af1158015611861573d6000803e3d6000fd5b50506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915063a9059cbb905061165260408401602085016127c8565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb6118e560408401602085016127c8565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044016116a0565b61194081611b47565b6000838152600260205260409020541461196c5760405162461bcd60e51b81526004016107ca90612699565b7f000000000000000000000000000000000000000000000000000000000000000060045461199a91906127e5565b60408201516119af9063ffffffff16426127f8565b1015611a125760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b60648201526084016107ca565b6000611a1d82612232565b90506002816003811115611a3357611a33612618565b1480611a5057506000816003811115611a4e57611a4e612618565b145b611ab95760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b60648201526084016107ca565b63ffffffff428116606084015243166080830152611ad682611b47565b60008481526002602052604080822092909255905184917f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691a2505050565b6000611b417f000000000000000000000000000000000000000000000000000000000000000083612723565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611b7c98909796910161280b565b604051602081830303815290604052805190602001209050919050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bec57611bec6126c1565b04031115611c2f5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107ca565b611c3881611b47565b60008381526002602052604090205414611c645760405162461bcd60e51b81526004016107ca90612699565b60c08101516001600160a01b031615611cb65760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016107ca565b6001611cc182612232565b6003811115611cd257611cd2612618565b14611d1f5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e000000000060448201526064016107ca565b600154821115611d6757600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611d7781611b47565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611de057611de06126c1565b040311611e215760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107ca565b611e2a81611b47565b60008381526002602052604090205414611e565760405162461bcd60e51b81526004016107ca90612699565b60008160a001516002811115611e6e57611e6e612618565b14611ead5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107ca565b60c08101516001600160a01b031615610fcc5760208101516001600160a01b0316611f5f576000828152600260205260408082209190915560c0820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116a0565b60c0810180516000909152611f7382611b47565b506000839052600260205260405163a9059cbb60e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000060248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303816000875af115801561200c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120309190612648565b610cc35760405162461bcd60e51b81526004016107ca9061266a565b7f00000000000000000000000000000000000000000000000000000000000000006001547f0000000000000000000000000000000000000000000000000000000000000000428161209f5761209f6126c1565b0403116120e05760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107ca565b6120e981611b47565b600083815260026020526040902054146121155760405162461bcd60e51b81526004016107ca90612699565b60008160a00151600281111561212d5761212d612618565b1461216c5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107ca565b60208101516001600160a01b031615610fcc5760c08101516001600160a01b031661221e57600082815260026020908152604080832092909255820151905163a9059cbb60e01b81526001600160a01b0391821660048201527f000000000000000000000000000000000000000000000000000000000000000060248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016116a0565b6020810180516000909152611f7382611b47565b6000816060015163ffffffff1660000361224e57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561228a57506003919050565b60006005836060015163ffffffff164203816122a8576122a86126c1565b608085015163ffffffff16919004019050437f0000000000000000000000000000000000000000000000000000000000000000818303116122ec57600192506122f1565b600092505b50505b919050565b6001600160a01b038116811461230e57600080fd5b50565b80356122f4816122f9565b803563ffffffff811681146122f457600080fd5b8035600381106122f457600080fd5b600060e0828403121561235157600080fd5b60405160e0810181811067ffffffffffffffff8211171561238257634e487b7160e01b600052604160045260246000fd5b6040528235815290508061239860208401612311565b60208201526123a96040840161231c565b60408201526123ba6060840161231c565b60608201526123cb6080840161231c565b60808201526123dc60a08401612330565b60a08201526123ed60c08401612311565b60c08201525092915050565b600080610100838503121561240d57600080fd5b8235915061241e846020850161233f565b90509250929050565b6000806000610120848603121561243d57600080fd5b8335925060208401359150612455856040860161233f565b90509250925092565b60006020828403121561247057600080fd5b5035919050565b6000806040838503121561248a57600080fd5b50508035926020909101359150565b803567ffffffffffffffff811681146122f457600080fd5b60008083601f8401126124c357600080fd5b50813567ffffffffffffffff8111156124db57600080fd5b6020830191508360208285010111156124f357600080fd5b9250929050565b6000806000806000806080878903121561251357600080fd5b863567ffffffffffffffff8082111561252b57600080fd5b818901915089601f83011261253f57600080fd5b81358181111561254e57600080fd5b8a60208260051b850101111561256357600080fd5b6020830198508097505061257960208a01612499565b955061258760408a01612311565b9450606089013591508082111561259d57600080fd5b506125aa89828a016124b1565b979a9699509497509295939492505050565b6000808284036101008112156125d157600080fd5b8335925060e0601f19820112156125e757600080fd5b506020830190509250929050565b600060e0828403121561260757600080fd5b612611838361233f565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061264257612642612618565b91905290565b60006020828403121561265a57600080fd5b8151801515811461261157600080fd5b6020808252601590820152742330b4b632b2102ba2aa24103a3930b739b332b91760591b604082015260600190565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601260045260246000fd5b6000602082840312156126e957600080fd5b5051919050565b60006020828403121561270257600080fd5b8151612611816122f9565b634e487b7160e01b600052601160045260246000fd5b60008261274057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156127bf57600080fd5b61261182612330565b6000602082840312156127da57600080fd5b8135612611816122f9565b80820180821115611b4157611b4161270d565b81810381811115611b4157611b4161270d565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061286357612863612618565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122022ba0f495a78693991ca05bc8ebc668367b0e3eb446f48492e25094b4b4fa39d64736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Arbitrum to Gnosis. Note: This contract is deployed on Gnosis.", "events": { @@ -1267,7 +1267,7 @@ "storageLayout": { "storage": [ { - "astId": 2314, + "astId": 1495, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "stateRoot", "offset": 0, @@ -1275,7 +1275,7 @@ "type": "t_bytes32" }, { - "astId": 2316, + "astId": 1497, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "latestVerifiedEpoch", "offset": 0, @@ -1283,7 +1283,7 @@ "type": "t_uint256" }, { - "astId": 2320, + "astId": 1501, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "claimHashes", "offset": 0, @@ -1291,7 +1291,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2324, + "astId": 1505, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "relayed", "offset": 0, @@ -1299,7 +1299,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 2326, + "astId": 1507, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "sequencerDelayLimit", "offset": 0, @@ -1307,7 +1307,7 @@ "type": "t_uint256" }, { - "astId": 2328, + "astId": 1509, "contract": "src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol:VeaOutboxArbToGnosis", "label": "timestampDelayUpdated", "offset": 0, diff --git a/contracts/deployments/goerli/RouterArbToGnosisDevnet.json b/contracts/deployments/goerli/RouterArbToGnosisDevnet.json index 01665acd..d83932a5 100644 --- a/contracts/deployments/goerli/RouterArbToGnosisDevnet.json +++ b/contracts/deployments/goerli/RouterArbToGnosisDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xEC337Fb9977848D0784dC4F01A69c237691755E0", + "address": "0x6164EA58a1f5359D2E54ea8eB9e5971B7C8dB0f1", "abi": [ { "inputs": [ @@ -248,29 +248,29 @@ "type": "function" } ], - "transactionHash": "0xf3dc0f0de5d2ad3b85c0209b141d677a20436d708404e580c54cc845e5bd78b4", + "transactionHash": "0x2ed8eaef653ae04c762d19ac691e8b70bf768cdc9f945d606b20dc64d3c6d8c0", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xEC337Fb9977848D0784dC4F01A69c237691755E0", - "transactionIndex": 17, - "gasUsed": "866953", + "contractAddress": "0x6164EA58a1f5359D2E54ea8eB9e5971B7C8dB0f1", + "transactionIndex": 57, + "gasUsed": "866941", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x9892be0de819a192509238d2d1cfac6e77f5d218847a3394f769add3a07f367d", - "transactionHash": "0xf3dc0f0de5d2ad3b85c0209b141d677a20436d708404e580c54cc845e5bd78b4", + "blockHash": "0xc3b2c08e2e233274be1c5646494ffe622c03cb0554db08e8adb5259bd7a16723", + "transactionHash": "0x2ed8eaef653ae04c762d19ac691e8b70bf768cdc9f945d606b20dc64d3c6d8c0", "logs": [], - "blockNumber": 9265259, - "cumulativeGasUsed": "2557043", + "blockNumber": 9292613, + "cumulativeGasUsed": "17269640", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0x8179EBCA5D2EA4152ac61A5BCA7a1dc68f8BbF54", - "0xb0263478A46d885D715B01fbac745500B9576634" + "0xf38b8739635d2F4cb38Bd453453AB9d41fD16300", + "0x9481b3A49ac67d03D9022E6200eFD81850BADDB4" ], - "numDeployments": 8, + "numDeployments": 9, "solcInputHash": "916b5e2210e8e15d34b48798389f67fe", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_gasLimit\":\"The true batch gas limit for the epoch.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToGnosis {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Send the sequencer delay limit.\\n function sendSequencerDelayLimit() internal {\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _gasLimit The true batch gas limit for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, uint256 _gasLimit, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n\\n uint256 maxGasPerTx = amb.maxGasPerTx();\\n uint256 gasLimitCapped = _gasLimit > maxGasPerTx ? maxGasPerTx : _gasLimit;\\n\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, gasLimitCapped);\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xfc827e3a369ec32a1a85f9058905e56f6c43c41889b027070da878dccbfb873e\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, uint256 _gasLimit, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x084735de7ee128aa169f11f18a4a7de6656309e941b8df502e66b24a4bf93d0f\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x6101006040523480156200001257600080fd5b506040516200102c3803806200102c833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610da06200028c6000396000818161010e015281816108b20152610a04015260008181610135015261064c01526000818160cf015281816107fe0152818161088301526109db015260008181610177015281816102c1015281816103e7015281816105ea01526106760152610da06000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063b1126dad1461015f578063e78cea9214610172578063e813a7551461019957600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100c861016d366004610b05565b6105df565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100b7565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b4f565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610baf565b50925050508181036103df5760008290556103aa61097a565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610baf565b509250505060005481111561051a5760008190556104e461097a565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b8b565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b8b565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008484836040516024016107b593929190610c3a565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263e5789d039260048083019391928290030181865afa158015610846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086a9190610cec565b9050600081851161087b578461087d565b815b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663dc8601b37f000000000000000000000000000000000000000000000000000000000000000086856040518463ffffffff1660e01b81526004016108f193929190610d05565b6020604051808303816000875af1158015610910573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109349190610cec565b9050877f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161096891815260200190565b60405180910390a25050505050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a719190610cec565b6040518463ffffffff1660e01b8152600401610a8f93929190610d05565b6020604051808303816000875af1158015610aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad29190610cec565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b600080600080848603610140811215610b1d57600080fd5b85359450602086013593506040860135925060e0605f1982011215610b4157600080fd5b509295919450926060019150565b80820180821115610b7057634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b9d57600080fd5b8151610ba881610b76565b9392505050565b60008060008060808587031215610bc557600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bf081610b76565b919050565b803563ffffffff81168114610bf057600080fd5b803560038110610bf057600080fd5b60038110610c3657634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c5e81610b76565b6001600160a01b03166060830152610c7860408401610bf5565b63ffffffff808216608085015280610c9260608701610bf5565b1660a085015280610ca560808701610bf5565b1660c08501525050610cb960a08401610c09565b610cc660e0840182610c18565b50610cd360c08401610be5565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cfe57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610d4157868101830151858201608001528201610d25565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea26469706673582212208afa84787b7d0d1b68f4557074fa129ad3f8bb5052cd83db225e4c8688730a8064736f6c63430008120033", diff --git a/contracts/deployments/goerli/RouterArbToGnosisTestnet.json b/contracts/deployments/goerli/RouterArbToGnosisTestnet.json index a347b417..e61e2ab8 100644 --- a/contracts/deployments/goerli/RouterArbToGnosisTestnet.json +++ b/contracts/deployments/goerli/RouterArbToGnosisTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x1224E83DF410b43A65ed3e375a6442813B1aea14", + "address": "0xD75dB719B04842174cDB7b1d8C6f60957ab6A25E", "abi": [ { "inputs": [ @@ -248,29 +248,29 @@ "type": "function" } ], - "transactionHash": "0xb70b293d78c953bddfa524ee0593540c345212e86f2beedb433f4182d5b6588b", + "transactionHash": "0xbd3c0fe72296d7e8c73c46af54ae416cc7481cd1d9057510d028fdd62a22433b", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x1224E83DF410b43A65ed3e375a6442813B1aea14", - "transactionIndex": 93, + "contractAddress": "0xD75dB719B04842174cDB7b1d8C6f60957ab6A25E", + "transactionIndex": 17, "gasUsed": "866965", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa88e3b97f6674908e52a0373fdc6db5d9cfec481ef414cba4a8268e91c0b78ea", - "transactionHash": "0xb70b293d78c953bddfa524ee0593540c345212e86f2beedb433f4182d5b6588b", + "blockHash": "0xe0e66a7a275c50f3e18292c009b212054f8ead164b4782b7a22980ddcfba963b", + "transactionHash": "0xbd3c0fe72296d7e8c73c46af54ae416cc7481cd1d9057510d028fdd62a22433b", "logs": [], - "blockNumber": 9265279, - "cumulativeGasUsed": "15406110", + "blockNumber": 9455310, + "cumulativeGasUsed": "3311440", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x87A19d769D875964E9Cd41dDBfc397B2543764E6", - "0xdc201e4Ab6a25A17C1731D8bB7E56f89D0B86486", - "0xE8ea62d3a4F06301016b9C23Ace108F3D8027839" + "0x4B4217FF81bdD7F163401147F67f770f55Cc2616", + "0xB28943800115d0D3F938434F623715E5fE0433F2" ], - "numDeployments": 6, + "numDeployments": 11, "solcInputHash": "916b5e2210e8e15d34b48798389f67fe", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketID\",\"type\":\"bytes32\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updatesequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToGnosis\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Arbitrum to Gnosis Chain. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,bytes32)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(bytes32)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\",\"params\":{\"_ticketID\":\"The ticketID from the AMB of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_gasLimit\":\"The true batch gas limit for the epoch.\",\"_stateroot\":\"The true batch merkle root for the epoch.\"}},\"updatesequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":\"RouterArbToGnosis\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToGnosis/RouterArbToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToGnosis.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\n\\n/// @dev Router from Arbitrum to Gnosis Chain.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterArbToGnosis is IRouterToGnosis {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxArbToGnosis; // The address of the veaInbox on Arbitrum.\\n address public immutable veaOutboxArbToGnosis; // The address of the veaOutbox on Gnosis Chain.\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, bytes32 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer limit value\\n /// @param _ticketID The ticketID from the AMB of the cross-chain message.\\n event sequencerDelayLimitSent(bytes32 _ticketID);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n constructor(IBridge _bridge, IAMB _amb, address _veaInboxArbToGnosis, address _veaOutboxArbToGnosis) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxArbToGnosis = _veaInboxArbToGnosis;\\n veaOutboxArbToGnosis = _veaOutboxArbToGnosis;\\n (, , sequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updatesequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newsequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newsequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(newsequencerDelayLimit);\\n } else if (newsequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newsequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newsequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n sendSequencerDelayLimit();\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Send the sequencer delay limit.\\n function sendSequencerDelayLimit() internal {\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n // Note: using maxGasPerTx here means the relaying txn on Gnosis will need to pass that (large) amount of gas, though almost all will be unused and refunded. This is preferred over hardcoding a gas limit.\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, amb.maxGasPerTx());\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true batch merkle root for the epoch.\\n /// @param _gasLimit The true batch gas limit for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateroot, uint256 _gasLimit, Claim calldata _claim) external {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // note: we use the bridge address as a source of truth for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToGnosis, \\\"veaInbox only.\\\");\\n\\n // Ethereum -> Gnosis message passing with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, _stateroot, _claim));\\n\\n uint256 maxGasPerTx = amb.maxGasPerTx();\\n uint256 gasLimitCapped = _gasLimit > maxGasPerTx ? maxGasPerTx : _gasLimit;\\n\\n bytes32 ticketID = amb.requireToPassMessage(veaOutboxArbToGnosis, data, gasLimitCapped);\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xfc827e3a369ec32a1a85f9058905e56f6c43c41889b027070da878dccbfb873e\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToGnosis.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Router which routes messages to Gnosis through the AMB.\\n/// @dev eg. L2 on Ethereum -> Ethereum (L1) -> Gnosis (L1), the IRouterToL1 will be deployed on Ethereum (L1) routing messages to Gnosis (L1).\\ninterface IRouterToGnosis {\\n /// @dev Routes state root snapshots through intermediary chains to the final destination L1 chain.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _gasLimit The gas limit for the AMB message.\\n /// @param _claim The claim associated with the epoch.\\n function route(uint256 _epoch, bytes32 _stateRoot, uint256 _gasLimit, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x084735de7ee128aa169f11f18a4a7de6656309e941b8df502e66b24a4bf93d0f\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x6101006040523480156200001257600080fd5b506040516200102c3803806200102c833981016040819052620000359162000147565b6001600160a01b03808516608081905284821660a05283821660c05290821660e0526040805163ee35f32760e01b8152905163ee35f327916004808201926020929091908290030181865afa15801562000093573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b99190620001af565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015620000f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011d9190620001d6565b50600055506200020d945050505050565b6001600160a01b03811681146200014457600080fd5b50565b600080600080608085870312156200015e57600080fd5b84516200016b816200012e565b60208601519094506200017e816200012e565b604086015190935062000191816200012e565b6060860151909250620001a4816200012e565b939692955090935050565b600060208284031215620001c257600080fd5b8151620001cf816200012e565b9392505050565b60008060008060808587031215620001ed57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610da06200028c6000396000818161010e015281816108b20152610a04015260008181610135015261064c01526000818160cf015281816107fe0152818161088301526109db015260008181610177015281816102c1015281816103e7015281816105ea01526106760152610da06000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638c5f173f116100665780638c5f173f1461013057806390784ae814610157578063b1126dad1461015f578063e78cea9214610172578063e813a7551461019957600080fd5b8063051d1970146100985780630c63fa84146100c05780631062b39a146100ca5780632fa70aa714610109575b600080fd5b6001546002546100a6919082565b604080519283526020830191909152015b60405180910390f35b6100c86101b0565b005b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6100c86103e3565b6100c861016d366004610b05565b6105df565b6100f17f000000000000000000000000000000000000000000000000000000000000000081565b6101a260005481565b6040519081526020016100b7565b60025460000361021c5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b60005460025461022c9190610b4f565b42116102955760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610213565b6001805460009182905560028290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa15801561030c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103309190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561036d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103919190610baf565b50925050508181036103df5760008290556103aa61097a565b6040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610443573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104679190610b8b565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c89190610baf565b509250505060005481111561051a5760008190556104e461097a565b6040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6000548110156105dc576002541561058e5760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610213565b604080518082018252828152426020918201819052600184905560025590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064a5760405162461bcd60e51b815260206004820152601060248201526f2737ba10333937b690313934b233b29760811b6044820152606401610213565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190610b8b565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190610b8b565b6001600160a01b03161461079e5760405162461bcd60e51b815260206004820152600e60248201526d3b32b0a4b73137bc1037b7363c9760911b6044820152606401610213565b60008484836040516024016107b593929190610c3a565b60408051601f19818403018152918152602080830180516001600160e01b0316630f0adca560e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263e5789d039260048083019391928290030181865afa158015610846573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086a9190610cec565b9050600081851161087b578461087d565b815b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663dc8601b37f000000000000000000000000000000000000000000000000000000000000000086856040518463ffffffff1660e01b81526004016108f193929190610d05565b6020604051808303816000875af1158015610910573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109349190610cec565b9050877f888a9bef5168f83425ebe9503cb6d29081cf58d52c60126f8a85a22c9d9935548260405161096891815260200190565b60405180910390a25050505050505050565b60008054604051602481019190915242604482015260640160408051601f19818403018152918152602080830180516001600160e01b0316632c19251960e01b179052815163e5789d0360e01b815291519293506000926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263dc8601b3927f0000000000000000000000000000000000000000000000000000000000000000928792869263e5789d03926004808401938290030181865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a719190610cec565b6040518463ffffffff1660e01b8152600401610a8f93929190610d05565b6020604051808303816000875af1158015610aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad29190610cec565b90507fb38aa59aca3a7ad85f6c314d96b54cae25fc75a92e95994a90c63ae93c63d687816040516103d691815260200190565b600080600080848603610140811215610b1d57600080fd5b85359450602086013593506040860135925060e0605f1982011215610b4157600080fd5b509295919450926060019150565b80820180821115610b7057634e487b7160e01b600052601160045260246000fd5b92915050565b6001600160a01b03811681146105dc57600080fd5b600060208284031215610b9d57600080fd5b8151610ba881610b76565b9392505050565b60008060008060808587031215610bc557600080fd5b505082516020840151604085015160609095015191969095509092509050565b8035610bf081610b76565b919050565b803563ffffffff81168114610bf057600080fd5b803560038110610bf057600080fd5b60038110610c3657634e487b7160e01b600052602160045260246000fd5b9052565b838152602080820184905282356040830152610120820190830135610c5e81610b76565b6001600160a01b03166060830152610c7860408401610bf5565b63ffffffff808216608085015280610c9260608701610bf5565b1660a085015280610ca560808701610bf5565b1660c08501525050610cb960a08401610c09565b610cc660e0840182610c18565b50610cd360c08401610be5565b6001600160a01b03811661010084015250949350505050565b600060208284031215610cfe57600080fd5b5051919050565b60018060a01b038416815260006020606081840152845180606085015260005b81811015610d4157868101830151858201608001528201610d25565b506000608082860101526080601f19601f8301168501019250505082604083015294935050505056fea26469706673582212208afa84787b7d0d1b68f4557074fa129ad3f8bb5052cd83db225e4c8688730a8064736f6c63430008120033", diff --git a/contracts/deployments/goerli/RouterGnosisToArbDevnet.json b/contracts/deployments/goerli/RouterGnosisToArbDevnet.json index cc73926e..d54e0d7b 100644 --- a/contracts/deployments/goerli/RouterGnosisToArbDevnet.json +++ b/contracts/deployments/goerli/RouterGnosisToArbDevnet.json @@ -1,5 +1,5 @@ { - "address": "0xb7d2C76641B21718cC8A0b595be438c863A6e031", + "address": "0xcC196cC90bD30109E39400817e6ef63A1b744659", "abi": [ { "inputs": [ @@ -420,43 +420,43 @@ "type": "function" } ], - "transactionHash": "0x3b7414b467d1f4468bb9ddbcf718da14a8df64378b7eb62c2b5727ecbb8ddb7e", + "transactionHash": "0xb2d0313b87602f6f39a3789a0deebc293fa500492f9e5aa4ee59a188ab829254", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0xb7d2C76641B21718cC8A0b595be438c863A6e031", - "transactionIndex": 30, + "contractAddress": "0xcC196cC90bD30109E39400817e6ef63A1b744659", + "transactionIndex": 29, "gasUsed": "1392477", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x7378f507297a43de45553f059cadf3604f2420d4c45c648e8d5b4346f029e3a3", - "transactionHash": "0x3b7414b467d1f4468bb9ddbcf718da14a8df64378b7eb62c2b5727ecbb8ddb7e", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000100000000200000000000000000000000000000001000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x5e9d0f1606125fec63439c7794e0d465e7e3033759c8c15f6c7cccdb1c5e53e8", + "transactionHash": "0xb2d0313b87602f6f39a3789a0deebc293fa500492f9e5aa4ee59a188ab829254", "logs": [ { - "transactionIndex": 30, - "blockNumber": 9265262, - "transactionHash": "0x3b7414b467d1f4468bb9ddbcf718da14a8df64378b7eb62c2b5727ecbb8ddb7e", - "address": "0xb7d2C76641B21718cC8A0b595be438c863A6e031", + "transactionIndex": 29, + "blockNumber": 9292617, + "transactionHash": "0xb2d0313b87602f6f39a3789a0deebc293fa500492f9e5aa4ee59a188ab829254", + "address": "0xcC196cC90bD30109E39400817e6ef63A1b744659", "topics": [ "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 41, - "blockHash": "0x7378f507297a43de45553f059cadf3604f2420d4c45c648e8d5b4346f029e3a3" + "logIndex": 58, + "blockHash": "0x5e9d0f1606125fec63439c7794e0d465e7e3033759c8c15f6c7cccdb1c5e53e8" } ], - "blockNumber": 9265262, - "cumulativeGasUsed": "4995955", + "blockNumber": 9292617, + "cumulativeGasUsed": "4107286", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0x9F4407785DFf95c08Bf9a0d9d4A5a164C48eC5CB", - "0x8Da07C6D68F17d7BbC8B42D59Bc9EEE90e9dD621", + "0xc0804E4FcEEfD958050356A429DAaaA71aA39385", + "0xE14fA0B3910CB0853E811375B9a6fcEEE32db521", 5 ], - "numDeployments": 9, + "numDeployments": 10, "solcInputHash": "916b5e2210e8e15d34b48798389f67fe", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_inboxChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"L2GasBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerFutureLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Gnosis Chain to Arbitrum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,uint256)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer delay limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(uint256)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value\",\"params\":{\"_ticketID\":\"The ticketID from the delayed inbox of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer delay limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}},\"sequencerFutureLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer future limit has been made.\",\"params\":{\"_requestedSequencerFutureLimit\":\"The new sequencer limit requested.\"}},\"sequencerFutureLimitSent(uint256)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value\",\"params\":{\"_ticketID\":\"The ticketID from the delayed inbox of the cross-chain message.\"}},\"sequencerFutureLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer future limit updated.\",\"params\":{\"_newSequencerFutureLimit\":\"The new sequencer future limit.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_inboxChainId\":\"The chain ID of the inbox chain.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"executeSequencerFutureLimitDecreaseRequest()\":{\"details\":\"execute sequencerFutureLimitDecreaseRequest\"},\"route(uint256,bytes32,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to.\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee.\",\"_stateroot\":\"The true state root for the epoch.\"}},\"sendSequencerDelayLimit(uint256,uint256,address,uint256,uint256)\":{\"details\":\"Send the sequencer delay limit through the delayed inbox.\"},\"sendSequencerFutureLimit(uint256,uint256,address,uint256,uint256)\":{\"details\":\"Send the sequencer future limit through the delayed inbox.\"},\"updateSequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"},\"updateSequencerFutureLimit()\":{\"details\":\"Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,uint256,uint256,address,uint256,uint256)\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/RouterGnosisToArb.sol\":\"RouterGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IInbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IInbox.sol\\n// proxy: https://etherscan.io/address/0x4Dbd4fc535Ac27206064B68FfCf827b0A60BAB3f\\n// implementation: https://etherscan.io/address/0x5aed5f8a1e3607476f1f81c3d8fe126deb0afe94\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface IInbox {\\n function bridge() external view returns (IBridge);\\n\\n /**\\n * @notice Put a message in the L2 inbox that can be reexecuted for some fixed amount of time if it reverts\\n * @dev all msg.value will deposited to callValueRefundAddress on L2\\n * @dev Gas limit and maxFeePerGas should not be set to 1 as that is used to trigger the RetryableData error\\n * @param to destination L2 contract address\\n * @param l2CallValue call value for retryable L2 message\\n * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n * @param excessFeeRefundAddress gasLimit x maxFeePerGas - execution cost gets credited here on L2 balance\\n * @param callValueRefundAddress l2Callvalue gets credited here on L2 if retryable txn times out or gets cancelled\\n * @param gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n * @param maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n * @param data ABI encoded data of L2 message\\n * @return unique message number of the retryable transaction\\n */\\n function createRetryableTicket(\\n address to,\\n uint256 l2CallValue,\\n uint256 maxSubmissionCost,\\n address excessFeeRefundAddress,\\n address callValueRefundAddress,\\n uint256 gasLimit,\\n uint256 maxFeePerGas,\\n bytes calldata data\\n ) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x2497d8bd48681de9d2b9929152afbc3ad5508923cce0eb4e863bf576955ddec2\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/RouterGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerFutureUpdatable.sol\\\";\\n\\n/// @dev Router from Gnosis Chain to Arbitrum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterGnosisToArb is IRouterToArb {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxGnosisToArb; // The address of the veaInbox on Gnosis.\\n address public immutable veaOutboxGnosisToArb; // The address of the veaOutbox on Arbitrum.\\n uint256 internal immutable inboxChainId; // The chain ID of the inbox chain.\\n\\n mapping(address => uint256) public L2GasBalance;\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n SequencerLimitDecreaseRequest public sequencerFutureLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, uint256 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value\\n /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message.\\n event sequencerDelayLimitSent(uint256 _ticketID);\\n\\n /// @dev This event indicates the sequencer delay limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer delay limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value\\n /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message.\\n event sequencerFutureLimitSent(uint256 _ticketID);\\n\\n /// @dev This event indicates the sequencer future limit updated.\\n /// @param _newSequencerFutureLimit The new sequencer future limit.\\n event sequencerFutureLimitUpdated(uint256 _newSequencerFutureLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer future limit has been made.\\n /// @param _requestedSequencerFutureLimit The new sequencer limit requested.\\n event sequencerFutureLimitDecreaseRequested(uint256 _requestedSequencerFutureLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n /// @param _inboxChainId The chain ID of the inbox chain.\\n constructor(\\n IBridge _bridge,\\n IAMB _amb,\\n address _veaInboxArbToGnosis,\\n address _veaOutboxArbToGnosis,\\n uint256 _inboxChainId\\n ) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxGnosisToArb = _veaInboxArbToGnosis;\\n veaOutboxGnosisToArb = _veaOutboxArbToGnosis;\\n inboxChainId = _inboxChainId;\\n\\n updateSequencerDelayLimit();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerFutureLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , , uint256 newSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerFutureLimit > sequencerFutureLimit) {\\n // For sequencerFutureLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerFutureLimit = newSequencerFutureLimit;\\n emit sequencerFutureLimitUpdated(newSequencerFutureLimit);\\n } else if (newSequencerFutureLimit < sequencerFutureLimit) {\\n require(\\n sequencerFutureLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerFutureLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerFutureLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerFutureLimitDecreaseRequested(newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerFutureLimitDecreaseRequest\\n function executeSequencerFutureLimitDecreaseRequest() external {\\n require(sequencerFutureLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerFutureLimitDecreaseRequest.timestamp + sequencerFutureLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerFutureLimit = sequencerFutureLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerFutureLimitDecreaseRequest;\\n\\n (, , , uint256 currentSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerFutureLimit == requestedSequencerFutureLimit) {\\n sequencerFutureLimit = requestedSequencerFutureLimit;\\n emit sequencerFutureLimitUpdated(requestedSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Send the sequencer future limit through the delayed inbox.\\n function sendSequencerFutureLimit(\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external {\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n\\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(\\n ISequencerFutureUpdatable.updateSequencerFutureLimit,\\n (sequencerFutureLimit, block.timestamp)\\n );\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit sequencerFutureLimitSent(ticketID);\\n }\\n\\n /// @dev Send the sequencer delay limit through the delayed inbox.\\n function sendSequencerDelayLimit(\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external {\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n\\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function deposit() external payable {\\n L2GasBalance[msg.sender] += msg.value;\\n }\\n\\n function withdraw(uint256 _amount) external {\\n require(L2GasBalance[msg.sender] > _amount, \\\"Insufficient balance.\\\");\\n L2GasBalance[msg.sender] -= _amount;\\n payable(msg.sender).send(_amount); // User is responsible for accepting ETH.\\n }\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee.\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to.\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(inboxChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(veaInboxGnosisToArb == amb.messageSender(), \\\"Vea Inbox only.\\\");\\n\\n // Ethereum -> Arbitrum message passing with retryable tickets in the delayed inbox, the canonical Ethereum -> Arbitrum bridge.\\n // https://developer.arbitrum.io/arbos/l1-to-l2-messaging#submission\\n\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n\\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL2.resolveDisputedClaim, (_epoch, _stateroot));\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xaab3a5d9b5a52671af6336f05306c66627bfe25dbf0dd51fc88882c14da15a3d\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerFutureUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerFutureUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerFutureUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerFutureLimit The futureSeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0x5c8b8ffaec923126ec1699d9c1483329b5a660837803aefc4aa95d9f091ef21f\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x6101206040523480156200001257600080fd5b5060405162001aeb38038062001aeb833981016040819052620000359162000268565b6001600160a01b0380861660805284811660a05283811660c052821660e052610100819052620000646200006f565b50505050506200033a565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d89190620002dc565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000116573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200013c919062000303565b5092505050600154811115620001875760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6001548110156200024f5760045415620002015760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6001600160a01b03811681146200024f57600080fd5b600080600080600060a086880312156200028157600080fd5b85516200028e8162000252565b6020870151909550620002a18162000252565b6040870151909450620002b48162000252565b6060870151909350620002c78162000252565b80925050608086015190509295509295909350565b600060208284031215620002ef57600080fd5b8151620002fc8162000252565b9392505050565b600080600080608085870312156200031a57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e0516101005161170a620003e1600039600061085501526000818161021101528181610aed0152818161105401526112700152600081816102d7015261094201526000818161019001528181610759015281816107d301526108b701526000818161035301528181610410015281816105a401528181610a6f01528181610bc801528181610d7301528181610fd601526111f2015261170a6000f3fe6080604052600436106101095760003560e01c806365b0183511610095578063b6d7aeff11610064578063b6d7aeff146102f9578063c4977c8b14610319578063d0e30db014610339578063e78cea9214610341578063e813a7551461037557600080fd5b806365b018351461026857806377a43648146102955780637e260880146102aa5780639e75a705146102c557600080fd5b80631ff47dc0116100dc5780631ff47dc0146101ca5780632e1a7d4d146101df5780634738b97f146101ff578063507b5ad3146102335780635f43a47f1461025357600080fd5b8063051d19701461010e5780630c63fa84146101435780630e56752e1461015a5780631062b39a1461017e575b600080fd5b34801561011a57600080fd5b50600354600454610129919082565b604080519283526020830191909152015b60405180910390f35b34801561014f57600080fd5b5061015861038b565b005b34801561016657600080fd5b5061017060025481565b60405190815260200161013a565b34801561018a57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013a565b3480156101d657600080fd5b50610158610528565b3480156101eb57600080fd5b506101586101fa366004611357565b6106b5565b34801561020b57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561023f57600080fd5b5061015861024e366004611385565b61074e565b34801561025f57600080fd5b50610158610bc4565b34801561027457600080fd5b506101706102833660046113e4565b60006020819052908152604090205481565b3480156102a157600080fd5b50610158610d6f565b3480156102b657600080fd5b50600554600654610129919082565b3480156102d157600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561030557600080fd5b50610158610314366004611408565b610f0c565b34801561032557600080fd5b50610158610334366004611408565b611128565b610158611331565b34801561034d57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561038157600080fd5b5061017060015481565b6004546000036103b65760405162461bcd60e51b81526004016103ad90611451565b60405180910390fd5b6001546004546103c691906114b3565b42116103e45760405162461bcd60e51b81526004016103ad906114cc565b6003805460009182905560048281556040805163ee35f32760e01b815290519293926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263ee35f327928082019260209290918290030181865afa158015610459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047d919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de919061153b565b50925050508181036105245760018290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60065460000361054a5760405162461bcd60e51b81526004016103ad90611451565b60025460065461055a91906114b3565b42116105785760405162461bcd60e51b81526004016103ad906114cc565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156105ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610613919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610674919061153b565b93505050508181036105245760028290556040518281527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b2719060200161051b565b33600090815260208190526040902054811061070b5760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b60448201526064016103ad565b336000908152602081905260408120805483929061072a908490611571565b9091555050604051339082156108fc029083906000818181858888f1505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107d15760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190611584565b7f0000000000000000000000000000000000000000000000000000000000000000146108b55760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610913573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610937919061151e565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146109a95760405162461bcd60e51b815260206004820152600f60248201526e2b32b09024b73137bc1037b7363c9760891b60448201526064016103ad565b60006109b5828461159d565b6109bf90866114b3565b33600090815260208190526040902054909150818110156109f25760405162461bcd60e51b81526004016103ad906115b4565b6109fc8282611571565b33600090815260208190526040808220929092559051602481018b9052604481018a905260640160408051601f198184030181529181526020820180516001600160e01b0316631195d6f560e31b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af1158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b8152600401610b389897969594939291906115eb565b60206040518083038185885af1158015610b56573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b7b9190611584565b90508a7fcafd272887d09c9615b3354aa56a477e3ba7b4095d0b6201235c2bfabe2294c582604051610baf91815260200190565b60405180910390a25050505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c48919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca9919061153b565b5092505050600154811115610cf45760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a150565b600154811015610d6c5760045415610d1e5760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df3919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610e30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e54919061153b565b9350505050600254811115610e985760028190556040518181527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b27190602001610ce9565b600254811015610d6c5760065415610ec25760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600584905560065590518281527f326636d2e3d2c0d42c0fb6fd9f30ab0fcde3dff35e63db28f8abc38d566057f49101610ce9565b6000610f18828461159d565b610f2290866114b3565b3360009081526020819052604090205490915081811015610f555760405162461bcd60e51b81526004016103ad906115b4565b610f5f8282611571565b3360009081526020819052604080822092909255600254915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b031663710cc9a760e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561101f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611043919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b815260040161109f9897969594939291906115eb565b60206040518083038185885af11580156110bd573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110e29190611584565b90507f0bb0de69fc6722b8061f8161f450a46b49fd536c11535aab912024d630d505cf8160405161111591815260200190565b60405180910390a1505050505050505050565b6000611134828461159d565b61113e90866114b3565b33600090815260208190526040902054909150818110156111715760405162461bcd60e51b81526004016103ad906115b4565b61117b8282611571565b3360009081526020819052604080822092909255600154915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b0316632c19251960e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561123b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125f919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b81526004016112bb9897969594939291906115eb565b60206040518083038185885af11580156112d9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112fe9190611584565b90507fe68d5d0ca95adf855ddd4733abf1d205e40aaef86e1c7795f4002791d5e28a388160405161111591815260200190565b33600090815260208190526040812080543492906113509084906114b3565b9091555050565b60006020828403121561136957600080fd5b5035919050565b6001600160a01b0381168114610d6c57600080fd5b600080600080600080600060e0888a0312156113a057600080fd5b8735965060208801359550604088013594506060880135935060808801356113c781611370565b9699959850939692959460a0840135945060c09093013592915050565b6000602082840312156113f657600080fd5b813561140181611370565b9392505050565b600080600080600060a0868803121561142057600080fd5b8535945060208601359350604086013561143981611370565b94979396509394606081013594506080013592915050565b6020808252602c908201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560408201526b30b9b2903932b8bab2b9ba1760a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156114c6576114c661149d565b92915050565b60208082526032908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152711034b99039ba34b636103832b73234b7339760711b606082015260800190565b60006020828403121561153057600080fd5b815161140181611370565b6000806000806080858703121561155157600080fd5b505082516020840151604085015160609095015191969095509092509050565b818103818111156114c6576114c661149d565b60006020828403121561159657600080fd5b5051919050565b80820281158282048414176114c6576114c661149d565b6020808252601c908201527f496e73756666696369656e74204c32206761732062616c616e63652e00000000604082015260600190565b600061010060018060a01b03808c16845260208b818601528a6040860152818a16606086015281891660808601528760a08601528660c08601528260e0860152855191508183860152600092505b8183101561165857858301810151858401610120015291820191611639565b506101209150600082828601015281601f19601f830116850101925050509998505050505050505050565b60208082526031908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152701030b63932b0b23c903832b73234b7339760791b60608201526080019056fea2646970667358221220535f232bc393000c0245713b2c0e8c68054ae9cbf7af42338a97ed188b8ad73164736f6c63430008120033", diff --git a/contracts/deployments/goerli/RouterGnosisToArbTestnet.json b/contracts/deployments/goerli/RouterGnosisToArbTestnet.json index bbf283fc..a0bbfc0a 100644 --- a/contracts/deployments/goerli/RouterGnosisToArbTestnet.json +++ b/contracts/deployments/goerli/RouterGnosisToArbTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x84de475fed07406aA3B05248f1a7b0Fca11DA012", + "address": "0x6bC3C7Bcd2C6C2d8BFEAA3642c425cAE25F7fe17", "abi": [ { "inputs": [ @@ -420,43 +420,43 @@ "type": "function" } ], - "transactionHash": "0xcdf232bdbba982e1d7394afee9d20eb7c28910fc4805f36eabdda985d5c01d42", + "transactionHash": "0xa4ec4e717f5a88492ce2c2cc350a12f40313c2d4788bf70514ba8aababe9b098", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x84de475fed07406aA3B05248f1a7b0Fca11DA012", - "transactionIndex": 36, - "gasUsed": "1392477", - "logsBloom": "0x00000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200800000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x366e42b0ce390c1cc23490bd427e0bee5bfa116f54d1e015f1fd0fb29ed721a2", - "transactionHash": "0xcdf232bdbba982e1d7394afee9d20eb7c28910fc4805f36eabdda985d5c01d42", + "contractAddress": "0x6bC3C7Bcd2C6C2d8BFEAA3642c425cAE25F7fe17", + "transactionIndex": 44, + "gasUsed": "1392465", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000800000000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x48dcf31aff3945a5c74634b80e275b9f217f87287212c3f1cdefa119193221ac", + "transactionHash": "0xa4ec4e717f5a88492ce2c2cc350a12f40313c2d4788bf70514ba8aababe9b098", "logs": [ { - "transactionIndex": 36, - "blockNumber": 9265281, - "transactionHash": "0xcdf232bdbba982e1d7394afee9d20eb7c28910fc4805f36eabdda985d5c01d42", - "address": "0x84de475fed07406aA3B05248f1a7b0Fca11DA012", + "transactionIndex": 44, + "blockNumber": 9292607, + "transactionHash": "0xa4ec4e717f5a88492ce2c2cc350a12f40313c2d4788bf70514ba8aababe9b098", + "address": "0x6bC3C7Bcd2C6C2d8BFEAA3642c425cAE25F7fe17", "topics": [ "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 54, - "blockHash": "0x366e42b0ce390c1cc23490bd427e0bee5bfa116f54d1e015f1fd0fb29ed721a2" + "logIndex": 89, + "blockHash": "0x48dcf31aff3945a5c74634b80e275b9f217f87287212c3f1cdefa119193221ac" } ], - "blockNumber": 9265281, - "cumulativeGasUsed": "4697361", + "blockNumber": 9292607, + "cumulativeGasUsed": "5842010", "status": 1, "byzantium": true }, "args": [ "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", - "0x8Bf88E6474d93bD2Dc0d76CB3BE8809c6BB84148", - "0x62581B897330CA4044C4db79Ebe96ca230569492", + "0xC21c20a719fAc23c54c336FA0E16a0CFdC4baA00", + "0x18AB70ea8dBc7072D1C1C90bA0bC1547d92198CF", 5 ], - "numDeployments": 7, + "numDeployments": 8, "solcInputHash": "916b5e2210e8e15d34b48798389f67fe", "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"contract IAMB\",\"name\":\"_amb\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToGnosis\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_inboxChainId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"Routed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_ticketID\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerFutureLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerFutureLimitUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"L2GasBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"amb\",\"outputs\":[{\"internalType\":\"contract IAMB\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerFutureLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"route\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_inboxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxSubmissionCost\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_excessFeeRefundAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxFeePerGas\",\"type\":\"uint256\"}],\"name\":\"sendSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerFutureLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedSequencerLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerFutureLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxGnosisToArb\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Router from Gnosis Chain to Arbitrum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Routed(uint256,uint256)\":{\"details\":\"Event emitted when a message is relayed to another Safe Bridge.\",\"params\":{\"_epoch\":\"The epoch of the batch requested to send.\",\"_ticketID\":\"The unique identifier provided by the underlying canonical bridge.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer delay limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer limit requested.\"}},\"sequencerDelayLimitSent(uint256)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value\",\"params\":{\"_ticketID\":\"The ticketID from the delayed inbox of the cross-chain message.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer delay limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}},\"sequencerFutureLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer future limit has been made.\",\"params\":{\"_requestedSequencerFutureLimit\":\"The new sequencer limit requested.\"}},\"sequencerFutureLimitSent(uint256)\":{\"details\":\"This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value\",\"params\":{\"_ticketID\":\"The ticketID from the delayed inbox of the cross-chain message.\"}},\"sequencerFutureLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer future limit updated.\",\"params\":{\"_newSequencerFutureLimit\":\"The new sequencer future limit.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_amb\":\"The address of the AMB contract on Ethereum.\",\"_bridge\":\"The address of the arbitrum bridge contract on Ethereum.\",\"_inboxChainId\":\"The chain ID of the inbox chain.\",\"_veaInboxArbToGnosis\":\"The vea inbox on Arbitrum.\",\"_veaOutboxArbToGnosis\":\"The vea outbox on Gnosis Chain.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"executeSequencerFutureLimitDecreaseRequest()\":{\"details\":\"execute sequencerFutureLimitDecreaseRequest\"},\"route(uint256,bytes32,uint256,uint256,address,uint256,uint256)\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_epoch\":\"The epoch to verify.\",\"_excessFeeRefundAddress\":\"Address to refund any excess fee to.\",\"_gasLimit\":\"Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\",\"_inboxIndex\":\"The index of the inbox in the Arbitrum bridge contract.\",\"_maxFeePerGas\":\"price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\",\"_maxSubmissionCost\":\"Max gas deducted from user's L2 balance to cover base submission fee.\",\"_stateroot\":\"The true state root for the epoch.\"}},\"sendSequencerDelayLimit(uint256,uint256,address,uint256,uint256)\":{\"details\":\"Send the sequencer delay limit through the delayed inbox.\"},\"sendSequencerFutureLimit(uint256,uint256,address,uint256,uint256)\":{\"details\":\"Send the sequencer future limit through the delayed inbox.\"},\"updateSequencerDelayLimit()\":{\"details\":\"Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\"},\"updateSequencerFutureLimit()\":{\"details\":\"Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"route(uint256,bytes32,uint256,uint256,address,uint256,uint256)\":{\"notice\":\"Note: Access restricted to arbitrum canonical bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gnosisToArbitrum/RouterGnosisToArb.sol\":\"RouterGnosisToArb\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IInbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IInbox.sol\\n// proxy: https://etherscan.io/address/0x4Dbd4fc535Ac27206064B68FfCf827b0A60BAB3f\\n// implementation: https://etherscan.io/address/0x5aed5f8a1e3607476f1f81c3d8fe126deb0afe94\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface IInbox {\\n function bridge() external view returns (IBridge);\\n\\n /**\\n * @notice Put a message in the L2 inbox that can be reexecuted for some fixed amount of time if it reverts\\n * @dev all msg.value will deposited to callValueRefundAddress on L2\\n * @dev Gas limit and maxFeePerGas should not be set to 1 as that is used to trigger the RetryableData error\\n * @param to destination L2 contract address\\n * @param l2CallValue call value for retryable L2 message\\n * @param maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n * @param excessFeeRefundAddress gasLimit x maxFeePerGas - execution cost gets credited here on L2 balance\\n * @param callValueRefundAddress l2Callvalue gets credited here on L2 if retryable txn times out or gets cancelled\\n * @param gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n * @param maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n * @param data ABI encoded data of L2 message\\n * @return unique message number of the retryable transaction\\n */\\n function createRetryableTicket(\\n address to,\\n uint256 l2CallValue,\\n uint256 maxSubmissionCost,\\n address excessFeeRefundAddress,\\n address callValueRefundAddress,\\n uint256 gasLimit,\\n uint256 maxFeePerGas,\\n bytes calldata data\\n ) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x2497d8bd48681de9d2b9929152afbc3ad5508923cce0eb4e863bf576955ddec2\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/canonical/gnosis-chain/IAMB.sol\":{\"content\":\"// https://docs.gnosischain.com/bridges/tokenbridge/amb-bridge#gnosis\\n// https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IAMB {\\n function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32);\\n\\n function maxGasPerTx() external view returns (uint256);\\n\\n function messageSender() external view returns (address);\\n\\n function messageSourceChainId() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x529d45e46ca0c046c32b296b35ae8073c4a999ef37510545ec44d26e78deca0d\"},\"src/gnosisToArbitrum/RouterGnosisToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere, @jaybuidl]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/gnosis-chain/IAMB.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IInbox.sol\\\";\\nimport \\\"../interfaces/routers/IRouterToArb.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL2.sol\\\";\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerDelayUpdatable.sol\\\";\\nimport \\\"../interfaces/updaters/ISequencerFutureUpdatable.sol\\\";\\n\\n/// @dev Router from Gnosis Chain to Arbitrum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract RouterGnosisToArb is IRouterToArb {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n IAMB public immutable amb; // The address of the AMB contract on Ethereum.\\n address public immutable veaInboxGnosisToArb; // The address of the veaInbox on Gnosis.\\n address public immutable veaOutboxGnosisToArb; // The address of the veaOutbox on Arbitrum.\\n uint256 internal immutable inboxChainId; // The chain ID of the inbox chain.\\n\\n mapping(address => uint256) public L2GasBalance;\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n uint256 public sequencerFutureLimit; // This is MaxTimeVariation.futureSeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can futuredate L2 txns relative to the L1 clock.\\n SequencerLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n SequencerLimitDecreaseRequest public sequencerFutureLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerLimitDecreaseRequest {\\n uint256 requestedSequencerLimit;\\n uint256 timestamp;\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Event emitted when a message is relayed to another Safe Bridge.\\n /// @param _epoch The epoch of the batch requested to send.\\n /// @param _ticketID The unique identifier provided by the underlying canonical bridge.\\n event Routed(uint256 indexed _epoch, uint256 _ticketID);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer delay limit value\\n /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message.\\n event sequencerDelayLimitSent(uint256 _ticketID);\\n\\n /// @dev This event indicates the sequencer delay limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer delay limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n /// @dev This event indicates a cross-chain message was sent to inform the veaOutbox of the sequencer future limit value\\n /// @param _ticketID The ticketID from the delayed inbox of the cross-chain message.\\n event sequencerFutureLimitSent(uint256 _ticketID);\\n\\n /// @dev This event indicates the sequencer future limit updated.\\n /// @param _newSequencerFutureLimit The new sequencer future limit.\\n event sequencerFutureLimitUpdated(uint256 _newSequencerFutureLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer future limit has been made.\\n /// @param _requestedSequencerFutureLimit The new sequencer limit requested.\\n event sequencerFutureLimitDecreaseRequested(uint256 _requestedSequencerFutureLimit);\\n\\n /// @dev Constructor.\\n /// @param _bridge The address of the arbitrum bridge contract on Ethereum.\\n /// @param _amb The address of the AMB contract on Ethereum.\\n /// @param _veaInboxArbToGnosis The vea inbox on Arbitrum.\\n /// @param _veaOutboxArbToGnosis The vea outbox on Gnosis Chain.\\n /// @param _inboxChainId The chain ID of the inbox chain.\\n constructor(\\n IBridge _bridge,\\n IAMB _amb,\\n address _veaInboxArbToGnosis,\\n address _veaOutboxArbToGnosis,\\n uint256 _inboxChainId\\n ) {\\n bridge = _bridge;\\n amb = _amb;\\n veaInboxGnosisToArb = _veaInboxArbToGnosis;\\n veaOutboxGnosisToArb = _veaOutboxArbToGnosis;\\n inboxChainId = _inboxChainId;\\n\\n updateSequencerDelayLimit();\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Update the sequencerDelayLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev Update the sequencerFutureLimit. If decreasing, a delayed request is created for later execution.\\n function updateSequencerFutureLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , , uint256 newSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerFutureLimit > sequencerFutureLimit) {\\n // For sequencerFutureLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerFutureLimit = newSequencerFutureLimit;\\n emit sequencerFutureLimitUpdated(newSequencerFutureLimit);\\n } else if (newSequencerFutureLimit < sequencerFutureLimit) {\\n require(\\n sequencerFutureLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerFutureLimitDecreaseRequest = SequencerLimitDecreaseRequest({\\n requestedSequencerLimit: newSequencerFutureLimit,\\n timestamp: block.timestamp\\n });\\n emit sequencerFutureLimitDecreaseRequested(newSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerDelayLimit == requestedSequencerDelayLimit) {\\n sequencerDelayLimit = requestedSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerFutureLimitDecreaseRequest\\n function executeSequencerFutureLimitDecreaseRequest() external {\\n require(sequencerFutureLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerFutureLimitDecreaseRequest.timestamp + sequencerFutureLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedSequencerFutureLimit = sequencerFutureLimitDecreaseRequest.requestedSequencerLimit;\\n delete sequencerFutureLimitDecreaseRequest;\\n\\n (, , , uint256 currentSequencerFutureLimit) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentSequencerFutureLimit == requestedSequencerFutureLimit) {\\n sequencerFutureLimit = requestedSequencerFutureLimit;\\n emit sequencerFutureLimitUpdated(requestedSequencerFutureLimit);\\n }\\n }\\n\\n /// @dev Send the sequencer future limit through the delayed inbox.\\n function sendSequencerFutureLimit(\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external {\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n\\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(\\n ISequencerFutureUpdatable.updateSequencerFutureLimit,\\n (sequencerFutureLimit, block.timestamp)\\n );\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit sequencerFutureLimitSent(ticketID);\\n }\\n\\n /// @dev Send the sequencer delay limit through the delayed inbox.\\n function sendSequencerDelayLimit(\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external {\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n\\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(\\n ISequencerDelayUpdatable.updateSequencerDelayLimit,\\n (sequencerDelayLimit, block.timestamp)\\n );\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit sequencerDelayLimitSent(ticketID);\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n function deposit() external payable {\\n L2GasBalance[msg.sender] += msg.value;\\n }\\n\\n function withdraw(uint256 _amount) external {\\n require(L2GasBalance[msg.sender] > _amount, \\\"Insufficient balance.\\\");\\n L2GasBalance[msg.sender] -= _amount;\\n payable(msg.sender).send(_amount); // User is responsible for accepting ETH.\\n }\\n\\n /// Note: Access restricted to arbitrum canonical bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee.\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to.\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error).\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external {\\n // Ethereum -> Gnosis message authentication with the AMB, the canonical Ethereum <-> Gnosis bridge.\\n // https://docs.tokenbridge.net/amb-bridge/development-of-a-cross-chain-application/how-to-develop-xchain-apps-by-amb#receive-a-method-call-from-the-amb-bridge\\n\\n require(msg.sender == address(amb), \\\"Not from native Gnosis AMB bridge.\\\");\\n require(bytes32(inboxChainId) == amb.messageSourceChainId(), \\\"Invalid chain id.\\\");\\n require(veaInboxGnosisToArb == amb.messageSender(), \\\"Vea Inbox only.\\\");\\n\\n // Ethereum -> Arbitrum message passing with retryable tickets in the delayed inbox, the canonical Ethereum -> Arbitrum bridge.\\n // https://developer.arbitrum.io/arbos/l1-to-l2-messaging#submission\\n\\n uint256 msgValue = _maxSubmissionCost + _gasLimit * _maxFeePerGas;\\n uint256 gasBalance = L2GasBalance[msg.sender];\\n\\n require(gasBalance >= msgValue, \\\"Insufficient L2 gas balance.\\\");\\n\\n L2GasBalance[msg.sender] = gasBalance - msgValue;\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL2.resolveDisputedClaim, (_epoch, _stateroot));\\n\\n uint256 ticketID = IInbox(bridge.allowedDelayedInboxList(_inboxIndex)).createRetryableTicket{value: msgValue}(\\n veaOutboxGnosisToArb,\\n 0, // no callvalue\\n _maxSubmissionCost,\\n _excessFeeRefundAddress,\\n address(0), // no callvalue to refund, no one can cancel the ticket\\n _gasLimit,\\n _maxFeePerGas,\\n data\\n );\\n\\n emit Routed(_epoch, ticketID);\\n }\\n}\\n\",\"keccak256\":\"0xaab3a5d9b5a52671af6336f05306c66627bfe25dbf0dd51fc88882c14da15a3d\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata.\\ninterface IVeaOutboxOnL2 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the inbox sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot) external;\\n}\\n\",\"keccak256\":\"0x22ece6282ad246dcc086d100644a479be0cee8307d4b5c1440110241002ca013\",\"license\":\"MIT\"},\"src/interfaces/routers/IRouterToArb.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost.\\n/// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2).\\ninterface IRouterToArb {\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical sending-chain bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateroot The true state root for the epoch.\\n /// @param _inboxIndex The index of the inbox in the Arbitrum bridge contract.\\n /// @param _maxSubmissionCost Max gas deducted from user's L2 balance to cover base submission fee\\n /// @param _excessFeeRefundAddress Address to refund any excess fee to\\n /// @param _gasLimit Max gas deducted from user's L2 balance to cover L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n /// @param _maxFeePerGas price bid for L2 execution. Should not be set to 1 (magic value used to trigger the RetryableData error)\\n function route(\\n uint256 _epoch,\\n bytes32 _stateroot,\\n uint256 _inboxIndex,\\n uint256 _maxSubmissionCost,\\n address _excessFeeRefundAddress,\\n uint256 _gasLimit,\\n uint256 _maxFeePerGas\\n ) external;\\n}\\n\",\"keccak256\":\"0xc265211871b748c9191df4fd6419d57abf030314ee5ef7aa89f14a863521f174\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerDelayUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerDelayUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerDelayLimit The delaySeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerDelayLimit(uint256 _newSequencerDelayLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0xa99728056c1360f321ddac49c565ed0d4f2094569aaca3a2523df9f833e83925\",\"license\":\"MIT\"},\"src/interfaces/updaters/ISequencerFutureUpdatable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\n/// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call.\\n/// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerFutureUpdatable contract which receives updates from the router on Ethereum.\\ninterface ISequencerFutureUpdatable {\\n /// @dev Updates the sequencer limit.\\n /// Note: Access restricted to ensure the argument is passed from the Sequencer contract.\\n /// @param _newSequencerFutureLimit The futureSeconds from the MaxTimeVariation struct in the Arbitrum Sequencer contract.\\n /// @param _timestamp The timestamp of the message.\\n function updateSequencerFutureLimit(uint256 _newSequencerFutureLimit, uint256 _timestamp) external;\\n}\\n\",\"keccak256\":\"0x5c8b8ffaec923126ec1699d9c1483329b5a660837803aefc4aa95d9f091ef21f\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x6101206040523480156200001257600080fd5b5060405162001aeb38038062001aeb833981016040819052620000359162000268565b6001600160a01b0380861660805284811660a05283811660c052821660e052610100819052620000646200006f565b50505050506200033a565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d89190620002dc565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000116573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200013c919062000303565b5092505050600154811115620001875760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b6001548110156200024f5760045415620002015760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6001600160a01b03811681146200024f57600080fd5b600080600080600060a086880312156200028157600080fd5b85516200028e8162000252565b6020870151909550620002a18162000252565b6040870151909450620002b48162000252565b6060870151909350620002c78162000252565b80925050608086015190509295509295909350565b600060208284031215620002ef57600080fd5b8151620002fc8162000252565b9392505050565b600080600080608085870312156200031a57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e0516101005161170a620003e1600039600061085501526000818161021101528181610aed0152818161105401526112700152600081816102d7015261094201526000818161019001528181610759015281816107d301526108b701526000818161035301528181610410015281816105a401528181610a6f01528181610bc801528181610d7301528181610fd601526111f2015261170a6000f3fe6080604052600436106101095760003560e01c806365b0183511610095578063b6d7aeff11610064578063b6d7aeff146102f9578063c4977c8b14610319578063d0e30db014610339578063e78cea9214610341578063e813a7551461037557600080fd5b806365b018351461026857806377a43648146102955780637e260880146102aa5780639e75a705146102c557600080fd5b80631ff47dc0116100dc5780631ff47dc0146101ca5780632e1a7d4d146101df5780634738b97f146101ff578063507b5ad3146102335780635f43a47f1461025357600080fd5b8063051d19701461010e5780630c63fa84146101435780630e56752e1461015a5780631062b39a1461017e575b600080fd5b34801561011a57600080fd5b50600354600454610129919082565b604080519283526020830191909152015b60405180910390f35b34801561014f57600080fd5b5061015861038b565b005b34801561016657600080fd5b5061017060025481565b60405190815260200161013a565b34801561018a57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013a565b3480156101d657600080fd5b50610158610528565b3480156101eb57600080fd5b506101586101fa366004611357565b6106b5565b34801561020b57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561023f57600080fd5b5061015861024e366004611385565b61074e565b34801561025f57600080fd5b50610158610bc4565b34801561027457600080fd5b506101706102833660046113e4565b60006020819052908152604090205481565b3480156102a157600080fd5b50610158610d6f565b3480156102b657600080fd5b50600554600654610129919082565b3480156102d157600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561030557600080fd5b50610158610314366004611408565b610f0c565b34801561032557600080fd5b50610158610334366004611408565b611128565b610158611331565b34801561034d57600080fd5b506101b27f000000000000000000000000000000000000000000000000000000000000000081565b34801561038157600080fd5b5061017060015481565b6004546000036103b65760405162461bcd60e51b81526004016103ad90611451565b60405180910390fd5b6001546004546103c691906114b3565b42116103e45760405162461bcd60e51b81526004016103ad906114cc565b6003805460009182905560048281556040805163ee35f32760e01b815290519293926001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169263ee35f327928082019260209290918290030181865afa158015610459573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047d919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa1580156104ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104de919061153b565b50925050508181036105245760018290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15b5050565b60065460000361054a5760405162461bcd60e51b81526004016103ad90611451565b60025460065461055a91906114b3565b42116105785760405162461bcd60e51b81526004016103ad906114cc565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156105ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610613919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610650573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610674919061153b565b93505050508181036105245760028290556040518281527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b2719060200161051b565b33600090815260208190526040902054811061070b5760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b60448201526064016103ad565b336000908152602081905260408120805483929061072a908490611571565b9091555050604051339082156108fc029083906000818181858888f1505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107d15760405162461bcd60e51b815260206004820152602260248201527f4e6f742066726f6d206e617469766520476e6f73697320414d42206272696467604482015261329760f11b60648201526084016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316639e307dff6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190611584565b7f0000000000000000000000000000000000000000000000000000000000000000146108b55760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21031b430b4b71034b21760791b60448201526064016103ad565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d67bdd256040518163ffffffff1660e01b8152600401602060405180830381865afa158015610913573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610937919061151e565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146109a95760405162461bcd60e51b815260206004820152600f60248201526e2b32b09024b73137bc1037b7363c9760891b60448201526064016103ad565b60006109b5828461159d565b6109bf90866114b3565b33600090815260208190526040902054909150818110156109f25760405162461bcd60e51b81526004016103ad906115b4565b6109fc8282611571565b33600090815260208190526040808220929092559051602481018b9052604481018a905260640160408051601f198184030181529181526020820180516001600160e01b0316631195d6f560e31b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af1158015610ab8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adc919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b8152600401610b389897969594939291906115eb565b60206040518083038185885af1158015610b56573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b7b9190611584565b90508a7fcafd272887d09c9615b3354aa56a477e3ba7b4095d0b6201235c2bfabe2294c582604051610baf91815260200190565b60405180910390a25050505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c48919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca9919061153b565b5092505050600154811115610cf45760018190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a150565b600154811015610d6c5760045415610d1e5760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600384905560045590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df3919061151e565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610e30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e54919061153b565b9350505050600254811115610e985760028190556040518181527fa36c22774e909c9fbb1635e8fb6d13dfb82e0bfd536fc98e7e5697c62b04b27190602001610ce9565b600254811015610d6c5760065415610ec25760405162461bcd60e51b81526004016103ad90611683565b604080518082018252828152426020918201819052600584905560065590518281527f326636d2e3d2c0d42c0fb6fd9f30ab0fcde3dff35e63db28f8abc38d566057f49101610ce9565b6000610f18828461159d565b610f2290866114b3565b3360009081526020819052604090205490915081811015610f555760405162461bcd60e51b81526004016103ad906115b4565b610f5f8282611571565b3360009081526020819052604080822092909255600254915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b031663710cc9a760e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561101f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611043919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b815260040161109f9897969594939291906115eb565b60206040518083038185885af11580156110bd573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110e29190611584565b90507f0bb0de69fc6722b8061f8161f450a46b49fd536c11535aab912024d630d505cf8160405161111591815260200190565b60405180910390a1505050505050505050565b6000611134828461159d565b61113e90866114b3565b33600090815260208190526040902054909150818110156111715760405162461bcd60e51b81526004016103ad906115b4565b61117b8282611571565b3360009081526020819052604080822092909255600154915160248101929092524260448301529060640160408051601f198184030181529181526020820180516001600160e01b0316632c19251960e01b1790525163e76f5c8d60e01b8152600481018a90529091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e76f5c8d906024016020604051808303816000875af115801561123b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125f919061151e565b6001600160a01b031663679b6ded857f000000000000000000000000000000000000000000000000000000000000000060008c8c60008d8d8b6040518a63ffffffff1660e01b81526004016112bb9897969594939291906115eb565b60206040518083038185885af11580156112d9573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112fe9190611584565b90507fe68d5d0ca95adf855ddd4733abf1d205e40aaef86e1c7795f4002791d5e28a388160405161111591815260200190565b33600090815260208190526040812080543492906113509084906114b3565b9091555050565b60006020828403121561136957600080fd5b5035919050565b6001600160a01b0381168114610d6c57600080fd5b600080600080600080600060e0888a0312156113a057600080fd5b8735965060208801359550604088013594506060880135935060808801356113c781611370565b9699959850939692959460a0840135945060c09093013592915050565b6000602082840312156113f657600080fd5b813561140181611370565b9392505050565b600080600080600060a0868803121561142057600080fd5b8535945060208601359350604086013561143981611370565b94979396509394606081013594506080013592915050565b6020808252602c908201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560408201526b30b9b2903932b8bab2b9ba1760a11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156114c6576114c661149d565b92915050565b60208082526032908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152711034b99039ba34b636103832b73234b7339760711b606082015260800190565b60006020828403121561153057600080fd5b815161140181611370565b6000806000806080858703121561155157600080fd5b505082516020840151604085015160609095015191969095509092509050565b818103818111156114c6576114c661149d565b60006020828403121561159657600080fd5b5051919050565b80820281158282048414176114c6576114c661149d565b6020808252601c908201527f496e73756666696369656e74204c32206761732062616c616e63652e00000000604082015260600190565b600061010060018060a01b03808c16845260208b818601528a6040860152818a16606086015281891660808601528760a08601528660c08601528260e0860152855191508183860152600092505b8183101561165857858301810151858401610120015291820191611639565b506101209150600082828601015281601f19601f830116850101925050509998505050505050505050565b60208082526031908201527f53657175656e636572206c696d697420646563726561736520726571756573746040820152701030b63932b0b23c903832b73234b7339760791b60608201526080019056fea2646970667358221220535f232bc393000c0245713b2c0e8c68054ae9cbf7af42338a97ed188b8ad73164736f6c63430008120033", diff --git a/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json b/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json index fdaf6a9e..adb9d4ac 100644 --- a/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json +++ b/contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json @@ -1,5 +1,5 @@ { - "address": "0x3D9356FF595C2151513DFc520380d5A178224564", + "address": "0xDa528e9BE20a8A22437D28Ed6C63bb6d00Ad0032", "abi": [ { "inputs": [ @@ -46,7 +46,7 @@ "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "_epoch", "type": "uint256" @@ -103,7 +103,7 @@ "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "_epoch", "type": "uint256" @@ -1070,32 +1070,32 @@ "type": "function" } ], - "transactionHash": "0xda473ec704995cbb838a357f2a6395fb79af9800e6f8cf242ea4046b0831f967", + "transactionHash": "0xed794df9ccdcf3bfc873b1daf6db9012094fa9fb02e7ee97c236b3814214b270", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x3D9356FF595C2151513DFc520380d5A178224564", - "transactionIndex": 42, - "gasUsed": "2264719", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000400000000000000020000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xdf56b18926fadf4031d724671a23bd4ae21adb50a2bd9ad1c188e3b96562ce57", - "transactionHash": "0xda473ec704995cbb838a357f2a6395fb79af9800e6f8cf242ea4046b0831f967", + "contractAddress": "0xDa528e9BE20a8A22437D28Ed6C63bb6d00Ad0032", + "transactionIndex": 38, + "gasUsed": "2261472", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000", + "blockHash": "0x8c514b7afe662f250e353d237ddaa50ee12519e405dc2550a6dbb47aa7de8dc8", + "transactionHash": "0xed794df9ccdcf3bfc873b1daf6db9012094fa9fb02e7ee97c236b3814214b270", "logs": [ { - "transactionIndex": 42, - "blockNumber": 9265255, - "transactionHash": "0xda473ec704995cbb838a357f2a6395fb79af9800e6f8cf242ea4046b0831f967", - "address": "0x3D9356FF595C2151513DFc520380d5A178224564", + "transactionIndex": 38, + "blockNumber": 9292611, + "transactionHash": "0xed794df9ccdcf3bfc873b1daf6db9012094fa9fb02e7ee97c236b3814214b270", + "address": "0xDa528e9BE20a8A22437D28Ed6C63bb6d00Ad0032", "topics": [ "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 98, - "blockHash": "0xdf56b18926fadf4031d724671a23bd4ae21adb50a2bd9ad1c188e3b96562ce57" + "logIndex": 96, + "blockHash": "0x8c514b7afe662f250e353d237ddaa50ee12519e405dc2550a6dbb47aa7de8dc8" } ], - "blockNumber": 9265255, - "cumulativeGasUsed": "11028244", + "blockNumber": 9292611, + "cumulativeGasUsed": "6406457", "status": 1, "byzantium": true }, @@ -1104,15 +1104,15 @@ 1800, 0, 10000000000000, - "0x935feC4B0bc8f48884f7315153839859832f385b", + "0xE99C6177CD8731DE6F108443CcAf7449074f6aED", "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", 10000000000000 ], - "numDeployments": 8, - "solcInputHash": "74af439f219888d42665a3312cefc0fc", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEthDevnet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositPlusReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_msgId\",\"type\":\"uint256\"}],\"name\":\"isMsgRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRelayed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer delay limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEthDevnet\":\"The address of the inbox contract on Arbitrum.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"isMsgRelayed(uint256)\":{\"details\":\"Get the msg relayed status.\",\"params\":{\"_msgId\":\"The msgId to check.\"},\"returns\":{\"isRelayed\":\"True if the msg was relayed.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":\"VeaOutboxArbToEthDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 public immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 public immutable depositPlusReward; // 2 * deposit - burn\\n\\n address public constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer delay limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updateSequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n unchecked {\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch has not yet passed.\\\");\\n }\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) {\\n status = CensorshipTestStatus.NotStarted;\\n } else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod) {\\n status = CensorshipTestStatus.InProgress;\\n } else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the msg relayed status.\\n /// @param _msgId The msgId to check.\\n /// @return isRelayed True if the msg was relayed.\\n function isMsgRelayed(uint256 _msgId) external view returns(bool isRelayed) {\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1));\\n }\\n}\\n\",\"keccak256\":\"0x9deaca1e49d658f2ec56564a57987e7a711cfb16c43e3f0fb518007b01b21fdf\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToEth/VeaOutboxArbToEth.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Goerli.\\n/// Note: This contract is deployed on Goerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEthDevnet The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEthDevnet,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n )\\n VeaOutboxArbToEth(\\n _deposit,\\n _epochPeriod,\\n _minChallengePeriod,\\n _timeoutEpochs,\\n _veaInboxArbToEthDevnet,\\n _bridge,\\n _maxMissingBlocks\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xf0e67794da490cd402c9297bc81bae6035da306d2a1b6ca89af9fd8947a55fab\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002b7638038062002b768339810160408190526200003591620002ee565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190528686868686868662000076620000ee565b620000836002886200036c565b60e0819052620000958860026200038f565b620000a19190620003af565b6101005261012051600190620000b890426200036c565b620000c49190620003af565b6001555050600780546001600160a01b0319163317905550620004219a5050505050505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000131573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001579190620003c5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000195573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001bb9190620003ea565b5092505050600454811115620002065760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ce5760065415620002805760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002e957600080fd5b919050565b600080600080600080600060e0888a0312156200030a57600080fd5b875196506020880151955060408801519450606088015193506200033160808901620002d1565b92506200034160a08901620002d1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200038a57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620003a957620003a962000356565b92915050565b81810381811115620003a957620003a962000356565b600060208284031215620003d857600080fd5b620003e382620002d1565b9392505050565b600080600080608085870312156200040157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610100516101205161014051610160516101805161260b6200056b6000396000818161055f0152611fbf01526000818161059301528181610b94015281816119e701528181611b720152611d7e01526000818161061b0152611f530152600081816105c701528181610bb801528181610ec1015281816116e101528181611a0b01528181611b960152611da20152600081816104b50152818161146e01526115a70152600081816103a00152818161141b015261155f01526000818161064f01528181610770015281816108f60152818161092301528181610f04015281816110720152818161109f015281816115f701528181611cdc01528181611d430152611ee90152600081816104690152610ca20152600081816106d001528181610a7901528181610c3301528181610ccc0152611762015261260b6000f3fe6080604052600436106102045760003560e01c806369cd250d11610118578063b633b944116100a0578063df19e6ff1161006f578063df19e6ff14610691578063e78cea92146106be578063e813a755146106f2578063eedcf2a914610708578063fccc28131461071b57600080fd5b8063b633b944146105e9578063c2114a1614610609578063d0e30db01461063d578063da2b7bc41461067157600080fd5b8063930f28af116100e7578063930f28af146105175780639588eca214610537578063aa22a1c61461054d578063b044397e14610581578063b5b7a184146105b557600080fd5b806369cd250d14610457578063836e344b146104a35780638a619a71146104d75780638ad3a8f7146104f757600080fd5b806331ddf7431161019b5780634788cb381161016a5780634788cb38146103c257806349b4299e146103e25780634a439cfe14610402578063541adcca146104225780635f43a47f1461044257600080fd5b806331ddf743146103015780633ce43cfd1461032157806343b066d51461034157806344df8e701461038e57600080fd5b8063222ae786116101d7578063222ae786146102885780632639c060146102ab57806327ee6bdd146102d857806331d14457146102ee57600080fd5b806301139b6814610209578063051d19701461021e5780630c63fa84146102535780630f0adca514610268575b600080fd5b61021c610217366004612179565b610730565b005b34801561022a57600080fd5b50600554600654610239919082565b604080519283526020830191909152015b60405180910390f35b34801561025f57600080fd5b5061021c61096d565b34801561027457600080fd5b5061021c6102833660046121a7565b610b92565b34801561029457600080fd5b5061029d610eba565b60405190815260200161024a565b3480156102b757600080fd5b5061029d6102c63660046121de565b60026020526000908152604090205481565b3480156102e457600080fd5b5061029d60015481565b61021c6102fc3660046121f7565b610eeb565b34801561030d57600080fd5b5061021c61031c36600461227a565b6110c4565b34801561032d57600080fd5b5061021c61033c36600461233c565b611364565b34801561034d57600080fd5b5061037e61035c3660046121de565b600881901c600090815260036020526040902054600160ff9092161c81161490565b604051901515815260200161024a565b34801561039a57600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103ce57600080fd5b5061021c6103dd366004612179565b6114ab565b3480156103ee57600080fd5b5061021c6103fd366004612179565b61162f565b34801561040e57600080fd5b5061029d61041d3660046121de565b6116da565b34801561042e57600080fd5b5061029d61043d366004612375565b61170c565b34801561044e57600080fd5b5061021c61175e565b34801561046357600080fd5b5061048b7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161024a565b3480156104af57600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104e357600080fd5b5061021c6104f2366004612398565b611952565b34801561050357600080fd5b5060075461048b906001600160a01b031681565b34801561052357600080fd5b5061021c610532366004612179565b6119e5565b34801561054357600080fd5b5061029d60005481565b34801561055957600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561058d57600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c157600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f557600080fd5b5061021c610604366004612179565b611b70565b34801561061557600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561064957600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561067d57600080fd5b5061021c61068c366004612179565b611d7c565b34801561069d57600080fd5b506106b16106ac366004612375565b611f35565b60405161024a91906123cb565b3480156106ca57600080fd5b5061048b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156106fe57600080fd5b5061029d60045481565b61021c6107163660046121f7565b611ffc565b34801561072757600080fd5b5061048b600081565b6107398161170c565b6000838152600260205260409020541461076e5760405162461bcd60e51b8152600401610765906123e5565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107de5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610765565b60c08101516001600160a01b0316156108395760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610765565b60008160a001516002811115610851576108516123b5565b1461089e5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610765565b3360c08201526108ad8161170c565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156109695760006109487f000000000000000000000000000000000000000000000000000000000000000034612423565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036109d45760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610765565b6004546006546109e49190612436565b4211610a4d5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610765565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610ac4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae89190612449565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610b25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b499190612466565b50925050508181036109695760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610be557610be561249c565b04031115610c285760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610765565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610ca05760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610765565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4c9190612449565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dad9190612449565b6001600160a01b031614610dfc5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610765565b60015483118015610e0c57508115155b15610e4f57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610e588161170c565b60008481526002602052604090205403610eb5578051829003610e8157600160a0820152610e9c565b60c08101516001600160a01b031615610e9c57600260a08201525b610ea58161170c565b6000848152600260205260409020555b505050565b6000610ee67f0000000000000000000000000000000000000000000000000000000000000000426124b2565b905090565b6007546001600160a01b03163314610f0257600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610f725760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610765565b80610f8f5760405162461bcd60e51b8152600401610765906123e5565b60008281526002602052604090205415610fe15760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610765565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526110279061170c565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a37f00000000000000000000000000000000000000000000000000000000000000003411156109695760006109487f000000000000000000000000000000000000000000000000000000000000000034612423565b604085106111065760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610765565b60008484848460405160200161111f94939291906124d4565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561119f57600088888381811061116157611161612516565b9050602002013590508281111561118657826000528060205260406000209250611196565b8060005282602052604060002092505b50600101611145565b5080600054146111e25760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610765565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112575760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610765565b6000838152600360205260408082206001851b84179055516001600160a01b03891690611287908990899061252c565b6000604051808303816000865af19150503d80600081146112c4576040519150601f19603f3d011682016040523d82523d6000602084013e6112c9565b606091505b505090508061131a5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610765565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61137661043d36839003830183612375565b600083815260026020526040902054146113a25760405162461bcd60e51b8152600401610765906123e5565b60026113b460c0830160a0840161253c565b60028111156113c5576113c56123b5565b146114065760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610765565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061146093505060e0840191505060c08301612398565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114b48161170c565b600083815260026020526040902054146114e05760405162461bcd60e51b8152600401610765906123e5565b60018160a0015160028111156114f8576114f86123b5565b146115355760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610765565b60008281526002602052604081205560c08101516001600160a01b0316156115e1576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461164657600080fd5b61164f8161170c565b6000838152600260205260409020541461167b5760405162461bcd60e51b8152600401610765906123e5565b63ffffffff4281166060830152431660808201526116988161170c565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610b86565b60006117067f0000000000000000000000000000000000000000000000000000000000000000836124b2565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611741989097969101612557565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e29190612449565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561181f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118439190612466565b509250505060045481111561188d5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b60045481101561194f57600654156119015760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610765565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6007546001600160a01b0316331461196957600080fd5b6007546001600160a01b031633146119c35760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610765565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a3857611a3861249c565b04031115611a7b5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610765565b611a848161170c565b60008381526002602052604090205414611ab05760405162461bcd60e51b8152600401610765906123e5565b60c08101516001600160a01b031615611b025760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610765565b600154821115611b4a57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b5a8161170c565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bc357611bc361249c565b040311611c045760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610765565b611c0d8161170c565b60008381526002602052604090205414611c395760405162461bcd60e51b8152600401610765906123e5565b60008160a001516002811115611c5157611c516123b5565b14611c905760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610765565b60c08101516001600160a01b0316156109695760208101516001600160a01b0316611d145760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611d288261170c565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611dcf57611dcf61249c565b040311611e105760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610765565b611e198161170c565b60008381526002602052604090205414611e455760405162461bcd60e51b8152600401610765906123e5565b60008160a001516002811115611e5d57611e5d6123b5565b14611e9c5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610765565b60208101516001600160a01b0316156109695760c08101516001600160a01b0316611f215760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611d288261170c565b6000816060015163ffffffff16600003611f5157506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f8d57506003919050565b6000600c836060015163ffffffff16420381611fab57611fab61249c565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611fef5760019250611ff4565b600092505b50505b919050565b6120068282610eeb565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261204d838261162f565b63ffffffff42811660608301524316608082015261206b83826119e5565b600160a0820152610eb583826114ab565b6001600160a01b038116811461194f57600080fd5b8035611ff78161207c565b803563ffffffff81168114611ff757600080fd5b803560038110611ff757600080fd5b600060e082840312156120d157600080fd5b60405160e0810181811067ffffffffffffffff8211171561210257634e487b7160e01b600052604160045260246000fd5b6040528235815290508061211860208401612091565b60208201526121296040840161209c565b604082015261213a6060840161209c565b606082015261214b6080840161209c565b608082015261215c60a084016120b0565b60a082015261216d60c08401612091565b60c08201525092915050565b600080610100838503121561218d57600080fd5b8235915061219e84602085016120bf565b90509250929050565b600080600061012084860312156121bd57600080fd5b83359250602084013591506121d585604086016120bf565b90509250925092565b6000602082840312156121f057600080fd5b5035919050565b6000806040838503121561220a57600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ff757600080fd5b60008083601f84011261224357600080fd5b50813567ffffffffffffffff81111561225b57600080fd5b60208301915083602082850101111561227357600080fd5b9250929050565b6000806000806000806080878903121561229357600080fd5b863567ffffffffffffffff808211156122ab57600080fd5b818901915089601f8301126122bf57600080fd5b8135818111156122ce57600080fd5b8a60208260051b85010111156122e357600080fd5b602083019850809750506122f960208a01612219565b955061230760408a01612091565b9450606089013591508082111561231d57600080fd5b5061232a89828a01612231565b979a9699509497509295939492505050565b60008082840361010081121561235157600080fd5b8335925060e0601f198201121561236757600080fd5b506020830190509250929050565b600060e0828403121561238757600080fd5b61239183836120bf565b9392505050565b6000602082840312156123aa57600080fd5b81356123918161207c565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123df576123df6123b5565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156117065761170661240d565b808201808211156117065761170661240d565b60006020828403121561245b57600080fd5b81516123918161207c565b6000806000806080858703121561247c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b6000826124cf57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561254e57600080fd5b612391826120b0565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106125af576125af6123b5565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220c4b955f1fbcb64c303e3df8d95b173141d12289c7037bc602bdfdae9a4b9532b64736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106102045760003560e01c806369cd250d11610118578063b633b944116100a0578063df19e6ff1161006f578063df19e6ff14610691578063e78cea92146106be578063e813a755146106f2578063eedcf2a914610708578063fccc28131461071b57600080fd5b8063b633b944146105e9578063c2114a1614610609578063d0e30db01461063d578063da2b7bc41461067157600080fd5b8063930f28af116100e7578063930f28af146105175780639588eca214610537578063aa22a1c61461054d578063b044397e14610581578063b5b7a184146105b557600080fd5b806369cd250d14610457578063836e344b146104a35780638a619a71146104d75780638ad3a8f7146104f757600080fd5b806331ddf7431161019b5780634788cb381161016a5780634788cb38146103c257806349b4299e146103e25780634a439cfe14610402578063541adcca146104225780635f43a47f1461044257600080fd5b806331ddf743146103015780633ce43cfd1461032157806343b066d51461034157806344df8e701461038e57600080fd5b8063222ae786116101d7578063222ae786146102885780632639c060146102ab57806327ee6bdd146102d857806331d14457146102ee57600080fd5b806301139b6814610209578063051d19701461021e5780630c63fa84146102535780630f0adca514610268575b600080fd5b61021c610217366004612179565b610730565b005b34801561022a57600080fd5b50600554600654610239919082565b604080519283526020830191909152015b60405180910390f35b34801561025f57600080fd5b5061021c61096d565b34801561027457600080fd5b5061021c6102833660046121a7565b610b92565b34801561029457600080fd5b5061029d610eba565b60405190815260200161024a565b3480156102b757600080fd5b5061029d6102c63660046121de565b60026020526000908152604090205481565b3480156102e457600080fd5b5061029d60015481565b61021c6102fc3660046121f7565b610eeb565b34801561030d57600080fd5b5061021c61031c36600461227a565b6110c4565b34801561032d57600080fd5b5061021c61033c36600461233c565b611364565b34801561034d57600080fd5b5061037e61035c3660046121de565b600881901c600090815260036020526040902054600160ff9092161c81161490565b604051901515815260200161024a565b34801561039a57600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103ce57600080fd5b5061021c6103dd366004612179565b6114ab565b3480156103ee57600080fd5b5061021c6103fd366004612179565b61162f565b34801561040e57600080fd5b5061029d61041d3660046121de565b6116da565b34801561042e57600080fd5b5061029d61043d366004612375565b61170c565b34801561044e57600080fd5b5061021c61175e565b34801561046357600080fd5b5061048b7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161024a565b3480156104af57600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104e357600080fd5b5061021c6104f2366004612398565b611952565b34801561050357600080fd5b5060075461048b906001600160a01b031681565b34801561052357600080fd5b5061021c610532366004612179565b6119e5565b34801561054357600080fd5b5061029d60005481565b34801561055957600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561058d57600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c157600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f557600080fd5b5061021c610604366004612179565b611b70565b34801561061557600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561064957600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561067d57600080fd5b5061021c61068c366004612179565b611d7c565b34801561069d57600080fd5b506106b16106ac366004612375565b611f35565b60405161024a91906123cb565b3480156106ca57600080fd5b5061048b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156106fe57600080fd5b5061029d60045481565b61021c6107163660046121f7565b611ffc565b34801561072757600080fd5b5061048b600081565b6107398161170c565b6000838152600260205260409020541461076e5760405162461bcd60e51b8152600401610765906123e5565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107de5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610765565b60c08101516001600160a01b0316156108395760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610765565b60008160a001516002811115610851576108516123b5565b1461089e5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610765565b3360c08201526108ad8161170c565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156109695760006109487f000000000000000000000000000000000000000000000000000000000000000034612423565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036109d45760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610765565b6004546006546109e49190612436565b4211610a4d5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610765565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610ac4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae89190612449565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610b25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b499190612466565b50925050508181036109695760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b906020015b60405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610be557610be561249c565b04031115610c285760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610765565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610ca05760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610765565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4c9190612449565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dad9190612449565b6001600160a01b031614610dfc5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610765565b60015483118015610e0c57508115155b15610e4f57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610e588161170c565b60008481526002602052604090205403610eb5578051829003610e8157600160a0820152610e9c565b60c08101516001600160a01b031615610e9c57600260a08201525b610ea58161170c565b6000848152600260205260409020555b505050565b6000610ee67f0000000000000000000000000000000000000000000000000000000000000000426124b2565b905090565b6007546001600160a01b03163314610f0257600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610f725760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610765565b80610f8f5760405162461bcd60e51b8152600401610765906123e5565b60008281526002602052604090205415610fe15760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610765565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526110279061170c565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a37f00000000000000000000000000000000000000000000000000000000000000003411156109695760006109487f000000000000000000000000000000000000000000000000000000000000000034612423565b604085106111065760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610765565b60008484848460405160200161111f94939291906124d4565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561119f57600088888381811061116157611161612516565b9050602002013590508281111561118657826000528060205260406000209250611196565b8060005282602052604060002092505b50600101611145565b5080600054146111e25760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610765565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112575760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610765565b6000838152600360205260408082206001851b84179055516001600160a01b03891690611287908990899061252c565b6000604051808303816000865af19150503d80600081146112c4576040519150601f19603f3d011682016040523d82523d6000602084013e6112c9565b606091505b505090508061131a5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610765565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61137661043d36839003830183612375565b600083815260026020526040902054146113a25760405162461bcd60e51b8152600401610765906123e5565b60026113b460c0830160a0840161253c565b60028111156113c5576113c56123b5565b146114065760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610765565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061146093505060e0840191505060c08301612398565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114b48161170c565b600083815260026020526040902054146114e05760405162461bcd60e51b8152600401610765906123e5565b60018160a0015160028111156114f8576114f86123b5565b146115355760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610765565b60008281526002602052604081205560c08101516001600160a01b0316156115e1576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461164657600080fd5b61164f8161170c565b6000838152600260205260409020541461167b5760405162461bcd60e51b8152600401610765906123e5565b63ffffffff4281166060830152431660808201526116988161170c565b60008381526002602090815260409182902092909255518381527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e169101610b86565b60006117067f0000000000000000000000000000000000000000000000000000000000000000836124b2565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611741989097969101612557565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e29190612449565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561181f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118439190612466565b509250505060045481111561188d5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b60045481101561194f57600654156119015760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610765565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6007546001600160a01b0316331461196957600080fd5b6007546001600160a01b031633146119c35760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610765565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a3857611a3861249c565b04031115611a7b5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610765565b611a848161170c565b60008381526002602052604090205414611ab05760405162461bcd60e51b8152600401610765906123e5565b60c08101516001600160a01b031615611b025760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610765565b600154821115611b4a57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b5a8161170c565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bc357611bc361249c565b040311611c045760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610765565b611c0d8161170c565b60008381526002602052604090205414611c395760405162461bcd60e51b8152600401610765906123e5565b60008160a001516002811115611c5157611c516123b5565b14611c905760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610765565b60c08101516001600160a01b0316156109695760208101516001600160a01b0316611d145760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611d288261170c565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611dcf57611dcf61249c565b040311611e105760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610765565b611e198161170c565b60008381526002602052604090205414611e455760405162461bcd60e51b8152600401610765906123e5565b60008160a001516002811115611e5d57611e5d6123b5565b14611e9c5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610765565b60208101516001600160a01b0316156109695760c08101516001600160a01b0316611f215760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611d288261170c565b6000816060015163ffffffff16600003611f5157506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f8d57506003919050565b6000600c836060015163ffffffff16420381611fab57611fab61249c565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611fef5760019250611ff4565b600092505b50505b919050565b6120068282610eeb565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261204d838261162f565b63ffffffff42811660608301524316608082015261206b83826119e5565b600160a0820152610eb583826114ab565b6001600160a01b038116811461194f57600080fd5b8035611ff78161207c565b803563ffffffff81168114611ff757600080fd5b803560038110611ff757600080fd5b600060e082840312156120d157600080fd5b60405160e0810181811067ffffffffffffffff8211171561210257634e487b7160e01b600052604160045260246000fd5b6040528235815290508061211860208401612091565b60208201526121296040840161209c565b604082015261213a6060840161209c565b606082015261214b6080840161209c565b608082015261215c60a084016120b0565b60a082015261216d60c08401612091565b60c08201525092915050565b600080610100838503121561218d57600080fd5b8235915061219e84602085016120bf565b90509250929050565b600080600061012084860312156121bd57600080fd5b83359250602084013591506121d585604086016120bf565b90509250925092565b6000602082840312156121f057600080fd5b5035919050565b6000806040838503121561220a57600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611ff757600080fd5b60008083601f84011261224357600080fd5b50813567ffffffffffffffff81111561225b57600080fd5b60208301915083602082850101111561227357600080fd5b9250929050565b6000806000806000806080878903121561229357600080fd5b863567ffffffffffffffff808211156122ab57600080fd5b818901915089601f8301126122bf57600080fd5b8135818111156122ce57600080fd5b8a60208260051b85010111156122e357600080fd5b602083019850809750506122f960208a01612219565b955061230760408a01612091565b9450606089013591508082111561231d57600080fd5b5061232a89828a01612231565b979a9699509497509295939492505050565b60008082840361010081121561235157600080fd5b8335925060e0601f198201121561236757600080fd5b506020830190509250929050565b600060e0828403121561238757600080fd5b61239183836120bf565b9392505050565b6000602082840312156123aa57600080fd5b81356123918161207c565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123df576123df6123b5565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156117065761170661240d565b808201808211156117065761170661240d565b60006020828403121561245b57600080fd5b81516123918161207c565b6000806000806080858703121561247c57600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b6000826124cf57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561254e57600080fd5b612391826120b0565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106125af576125af6123b5565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220c4b955f1fbcb64c303e3df8d95b173141d12289c7037bc602bdfdae9a4b9532b64736f6c63430008120033", + "numDeployments": 9, + "solcInputHash": "18d8b299616ba6ea1bb506a660a35de5", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEthDevnet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositPlusReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_msgId\",\"type\":\"uint256\"}],\"name\":\"isMsgRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRelayed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer delay limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEthDevnet\":\"The address of the inbox contract on Arbitrum.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"isMsgRelayed(uint256)\":{\"details\":\"Get the msg relayed status.\",\"params\":{\"_msgId\":\"The msgId to check.\"},\"returns\":{\"isRelayed\":\"True if the msg was relayed.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":\"VeaOutboxArbToEthDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 public immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 public immutable depositPlusReward; // 2 * deposit - burn\\n\\n address public constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 indexed _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 indexed _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer delay limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updateSequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n unchecked {\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch has not yet passed.\\\");\\n }\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) {\\n status = CensorshipTestStatus.NotStarted;\\n } else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod) {\\n status = CensorshipTestStatus.InProgress;\\n } else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the msg relayed status.\\n /// @param _msgId The msgId to check.\\n /// @return isRelayed True if the msg was relayed.\\n function isMsgRelayed(uint256 _msgId) external view returns (bool isRelayed) {\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1));\\n }\\n}\\n\",\"keccak256\":\"0xc7d71171aed6d49d618a773255c175d07a58f2aebeec09547d8c572bdcd9160e\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToEth/VeaOutboxArbToEth.sol\\\";\\n\\n/// @dev Vea Outbox From ArbitrumGoerli to Goerli.\\n/// Note: This contract is deployed on Goerli.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEthDevnet The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEthDevnet,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n )\\n VeaOutboxArbToEth(\\n _deposit,\\n _epochPeriod,\\n _minChallengePeriod,\\n _timeoutEpochs,\\n _veaInboxArbToEthDevnet,\\n _bridge,\\n _maxMissingBlocks\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xf0e67794da490cd402c9297bc81bae6035da306d2a1b6ca89af9fd8947a55fab\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002b6738038062002b678339810160408190526200003591620002ee565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190528686868686868662000076620000ee565b620000836002886200036c565b60e0819052620000958860026200038f565b620000a19190620003af565b6101005261012051600190620000b890426200036c565b620000c49190620003af565b6001555050600780546001600160a01b0319163317905550620004219a5050505050505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000131573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001579190620003c5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000195573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001bb9190620003ea565b5092505050600454811115620002065760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ce5760065415620002805760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002e957600080fd5b919050565b600080600080600080600060e0888a0312156200030a57600080fd5b875196506020880151955060408801519450606088015193506200033160808901620002d1565b92506200034160a08901620002d1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200038a57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620003a957620003a962000356565b92915050565b81810381811115620003a957620003a962000356565b600060208284031215620003d857600080fd5b620003e382620002d1565b9392505050565b600080600080608085870312156200040157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e05161010051610120516101405161016051610180516125fc6200056b6000396000818161055f0152611fb001526000818161059301528181610b89015281816119d801528181611b630152611d6f01526000818161061b0152611f440152600081816105c701528181610bad01528181610eb6015281816116d2015281816119fc01528181611b870152611d930152600081816104b501528181611463015261159c0152600081816103a001528181611410015261155401526000818161064f01528181610770015281816108ec0152818161091901528181610ef90152818161106701528181611094015281816115ec01528181611ccd01528181611d340152611eda0152600081816104690152610c970152600081816106d001528181610a6f01528181610c2801528181610cc1015261175301526125fc6000f3fe6080604052600436106102045760003560e01c806369cd250d11610118578063b633b944116100a0578063df19e6ff1161006f578063df19e6ff14610691578063e78cea92146106be578063e813a755146106f2578063eedcf2a914610708578063fccc28131461071b57600080fd5b8063b633b944146105e9578063c2114a1614610609578063d0e30db01461063d578063da2b7bc41461067157600080fd5b8063930f28af116100e7578063930f28af146105175780639588eca214610537578063aa22a1c61461054d578063b044397e14610581578063b5b7a184146105b557600080fd5b806369cd250d14610457578063836e344b146104a35780638a619a71146104d75780638ad3a8f7146104f757600080fd5b806331ddf7431161019b5780634788cb381161016a5780634788cb38146103c257806349b4299e146103e25780634a439cfe14610402578063541adcca146104225780635f43a47f1461044257600080fd5b806331ddf743146103015780633ce43cfd1461032157806343b066d51461034157806344df8e701461038e57600080fd5b8063222ae786116101d7578063222ae786146102885780632639c060146102ab57806327ee6bdd146102d857806331d14457146102ee57600080fd5b806301139b6814610209578063051d19701461021e5780630c63fa84146102535780630f0adca514610268575b600080fd5b61021c61021736600461216a565b610730565b005b34801561022a57600080fd5b50600554600654610239919082565b604080519283526020830191909152015b60405180910390f35b34801561025f57600080fd5b5061021c610963565b34801561027457600080fd5b5061021c610283366004612198565b610b87565b34801561029457600080fd5b5061029d610eaf565b60405190815260200161024a565b3480156102b757600080fd5b5061029d6102c63660046121cf565b60026020526000908152604090205481565b3480156102e457600080fd5b5061029d60015481565b61021c6102fc3660046121e8565b610ee0565b34801561030d57600080fd5b5061021c61031c36600461226b565b6110b9565b34801561032d57600080fd5b5061021c61033c36600461232d565b611359565b34801561034d57600080fd5b5061037e61035c3660046121cf565b600881901c600090815260036020526040902054600160ff9092161c81161490565b604051901515815260200161024a565b34801561039a57600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103ce57600080fd5b5061021c6103dd36600461216a565b6114a0565b3480156103ee57600080fd5b5061021c6103fd36600461216a565b611624565b34801561040e57600080fd5b5061029d61041d3660046121cf565b6116cb565b34801561042e57600080fd5b5061029d61043d366004612366565b6116fd565b34801561044e57600080fd5b5061021c61174f565b34801561046357600080fd5b5061048b7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161024a565b3480156104af57600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104e357600080fd5b5061021c6104f2366004612389565b611943565b34801561050357600080fd5b5060075461048b906001600160a01b031681565b34801561052357600080fd5b5061021c61053236600461216a565b6119d6565b34801561054357600080fd5b5061029d60005481565b34801561055957600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561058d57600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c157600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f557600080fd5b5061021c61060436600461216a565b611b61565b34801561061557600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561064957600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561067d57600080fd5b5061021c61068c36600461216a565b611d6d565b34801561069d57600080fd5b506106b16106ac366004612366565b611f26565b60405161024a91906123bc565b3480156106ca57600080fd5b5061048b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156106fe57600080fd5b5061029d60045481565b61021c6107163660046121e8565b611fed565b34801561072757600080fd5b5061048b600081565b610739816116fd565b6000838152600260205260409020541461076e5760405162461bcd60e51b8152600401610765906123d6565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107de5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610765565b60c08101516001600160a01b0316156108395760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610765565b60008160a001516002811115610851576108516123a6565b1461089e5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610765565b3360c08201526108ad816116fd565b600083815260026020526040808220929092559051339184917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d79190a37f000000000000000000000000000000000000000000000000000000000000000034111561095f57600061093e7f000000000000000000000000000000000000000000000000000000000000000034612414565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036109ca5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610765565b6004546006546109da9190612427565b4211610a435760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610765565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610aba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ade919061243a565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610b1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3f9190612457565b509250505081810361095f5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610bda57610bda61248d565b04031115610c1d5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610765565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c955760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610765565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d41919061243a565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da2919061243a565b6001600160a01b031614610df15760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610765565b60015483118015610e0157508115155b15610e4457600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610e4d816116fd565b60008481526002602052604090205403610eaa578051829003610e7657600160a0820152610e91565b60c08101516001600160a01b031615610e9157600260a08201525b610e9a816116fd565b6000848152600260205260409020555b505050565b6000610edb7f0000000000000000000000000000000000000000000000000000000000000000426124a3565b905090565b6007546001600160a01b03163314610ef757600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610f675760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610765565b80610f845760405162461bcd60e51b8152600401610765906123d6565b60008281526002602052604090205415610fd65760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610765565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261101c906116fd565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a37f000000000000000000000000000000000000000000000000000000000000000034111561095f57600061093e7f000000000000000000000000000000000000000000000000000000000000000034612414565b604085106110fb5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610765565b60008484848460405160200161111494939291906124c5565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561119457600088888381811061115657611156612507565b9050602002013590508281111561117b5782600052806020526040600020925061118b565b8060005282602052604060002092505b5060010161113a565b5080600054146111d75760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610765565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561124c5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610765565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061127c908990899061251d565b6000604051808303816000865af19150503d80600081146112b9576040519150601f19603f3d011682016040523d82523d6000602084013e6112be565b606091505b505090508061130f5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610765565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61136b61043d36839003830183612366565b600083815260026020526040902054146113975760405162461bcd60e51b8152600401610765906123d6565b60026113a960c0830160a0840161252d565b60028111156113ba576113ba6123a6565b146113fb5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610765565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061145593505060e0840191505060c08301612389565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114a9816116fd565b600083815260026020526040902054146114d55760405162461bcd60e51b8152600401610765906123d6565b60018160a0015160028111156114ed576114ed6123a6565b1461152a5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610765565b60008281526002602052604081205560c08101516001600160a01b0316156115d6576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461163b57600080fd5b611644816116fd565b600083815260026020526040902054146116705760405162461bcd60e51b8152600401610765906123d6565b63ffffffff42811660608301524316608082015261168d816116fd565b60008381526002602052604080822092909255905183917f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691a25050565b60006116f77f0000000000000000000000000000000000000000000000000000000000000000836124a3565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611732989097969101612548565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117d3919061243a565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611810573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118349190612457565b509250505060045481111561187e5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b60045481101561194057600654156118f25760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610765565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6007546001600160a01b0316331461195a57600080fd5b6007546001600160a01b031633146119b45760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610765565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a2957611a2961248d565b04031115611a6c5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610765565b611a75816116fd565b60008381526002602052604090205414611aa15760405162461bcd60e51b8152600401610765906123d6565b60c08101516001600160a01b031615611af35760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610765565b600154821115611b3b57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b4b816116fd565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bb457611bb461248d565b040311611bf55760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610765565b611bfe816116fd565b60008381526002602052604090205414611c2a5760405162461bcd60e51b8152600401610765906123d6565b60008160a001516002811115611c4257611c426123a6565b14611c815760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610765565b60c08101516001600160a01b03161561095f5760208101516001600160a01b0316611d055760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611d19826116fd565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611dc057611dc061248d565b040311611e015760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610765565b611e0a816116fd565b60008381526002602052604090205414611e365760405162461bcd60e51b8152600401610765906123d6565b60008160a001516002811115611e4e57611e4e6123a6565b14611e8d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610765565b60208101516001600160a01b03161561095f5760c08101516001600160a01b0316611f125760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611d19826116fd565b6000816060015163ffffffff16600003611f4257506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f7e57506003919050565b6000600c836060015163ffffffff16420381611f9c57611f9c61248d565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611fe05760019250611fe5565b600092505b50505b919050565b611ff78282610ee0565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261203e8382611624565b63ffffffff42811660608301524316608082015261205c83826119d6565b600160a0820152610eaa83826114a0565b6001600160a01b038116811461194057600080fd5b8035611fe88161206d565b803563ffffffff81168114611fe857600080fd5b803560038110611fe857600080fd5b600060e082840312156120c257600080fd5b60405160e0810181811067ffffffffffffffff821117156120f357634e487b7160e01b600052604160045260246000fd5b6040528235815290508061210960208401612082565b602082015261211a6040840161208d565b604082015261212b6060840161208d565b606082015261213c6080840161208d565b608082015261214d60a084016120a1565b60a082015261215e60c08401612082565b60c08201525092915050565b600080610100838503121561217e57600080fd5b8235915061218f84602085016120b0565b90509250929050565b600080600061012084860312156121ae57600080fd5b83359250602084013591506121c685604086016120b0565b90509250925092565b6000602082840312156121e157600080fd5b5035919050565b600080604083850312156121fb57600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611fe857600080fd5b60008083601f84011261223457600080fd5b50813567ffffffffffffffff81111561224c57600080fd5b60208301915083602082850101111561226457600080fd5b9250929050565b6000806000806000806080878903121561228457600080fd5b863567ffffffffffffffff8082111561229c57600080fd5b818901915089601f8301126122b057600080fd5b8135818111156122bf57600080fd5b8a60208260051b85010111156122d457600080fd5b602083019850809750506122ea60208a0161220a565b95506122f860408a01612082565b9450606089013591508082111561230e57600080fd5b5061231b89828a01612222565b979a9699509497509295939492505050565b60008082840361010081121561234257600080fd5b8335925060e0601f198201121561235857600080fd5b506020830190509250929050565b600060e0828403121561237857600080fd5b61238283836120b0565b9392505050565b60006020828403121561239b57600080fd5b81356123828161206d565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123d0576123d06123a6565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156116f7576116f76123fe565b808201808211156116f7576116f76123fe565b60006020828403121561244c57600080fd5b81516123828161206d565b6000806000806080858703121561246d57600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b6000826124c057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561253f57600080fd5b612382826120a1565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106125a0576125a06123a6565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122028e21acdf47d7c4cf4caa64e7dc2058fc876bbdc996a898ef2eba57ae53815a864736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106102045760003560e01c806369cd250d11610118578063b633b944116100a0578063df19e6ff1161006f578063df19e6ff14610691578063e78cea92146106be578063e813a755146106f2578063eedcf2a914610708578063fccc28131461071b57600080fd5b8063b633b944146105e9578063c2114a1614610609578063d0e30db01461063d578063da2b7bc41461067157600080fd5b8063930f28af116100e7578063930f28af146105175780639588eca214610537578063aa22a1c61461054d578063b044397e14610581578063b5b7a184146105b557600080fd5b806369cd250d14610457578063836e344b146104a35780638a619a71146104d75780638ad3a8f7146104f757600080fd5b806331ddf7431161019b5780634788cb381161016a5780634788cb38146103c257806349b4299e146103e25780634a439cfe14610402578063541adcca146104225780635f43a47f1461044257600080fd5b806331ddf743146103015780633ce43cfd1461032157806343b066d51461034157806344df8e701461038e57600080fd5b8063222ae786116101d7578063222ae786146102885780632639c060146102ab57806327ee6bdd146102d857806331d14457146102ee57600080fd5b806301139b6814610209578063051d19701461021e5780630c63fa84146102535780630f0adca514610268575b600080fd5b61021c61021736600461216a565b610730565b005b34801561022a57600080fd5b50600554600654610239919082565b604080519283526020830191909152015b60405180910390f35b34801561025f57600080fd5b5061021c610963565b34801561027457600080fd5b5061021c610283366004612198565b610b87565b34801561029457600080fd5b5061029d610eaf565b60405190815260200161024a565b3480156102b757600080fd5b5061029d6102c63660046121cf565b60026020526000908152604090205481565b3480156102e457600080fd5b5061029d60015481565b61021c6102fc3660046121e8565b610ee0565b34801561030d57600080fd5b5061021c61031c36600461226b565b6110b9565b34801561032d57600080fd5b5061021c61033c36600461232d565b611359565b34801561034d57600080fd5b5061037e61035c3660046121cf565b600881901c600090815260036020526040902054600160ff9092161c81161490565b604051901515815260200161024a565b34801561039a57600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103ce57600080fd5b5061021c6103dd36600461216a565b6114a0565b3480156103ee57600080fd5b5061021c6103fd36600461216a565b611624565b34801561040e57600080fd5b5061029d61041d3660046121cf565b6116cb565b34801561042e57600080fd5b5061029d61043d366004612366565b6116fd565b34801561044e57600080fd5b5061021c61174f565b34801561046357600080fd5b5061048b7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161024a565b3480156104af57600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104e357600080fd5b5061021c6104f2366004612389565b611943565b34801561050357600080fd5b5060075461048b906001600160a01b031681565b34801561052357600080fd5b5061021c61053236600461216a565b6119d6565b34801561054357600080fd5b5061029d60005481565b34801561055957600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561058d57600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105c157600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105f557600080fd5b5061021c61060436600461216a565b611b61565b34801561061557600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561064957600080fd5b5061029d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561067d57600080fd5b5061021c61068c36600461216a565b611d6d565b34801561069d57600080fd5b506106b16106ac366004612366565b611f26565b60405161024a91906123bc565b3480156106ca57600080fd5b5061048b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156106fe57600080fd5b5061029d60045481565b61021c6107163660046121e8565b611fed565b34801561072757600080fd5b5061048b600081565b610739816116fd565b6000838152600260205260409020541461076e5760405162461bcd60e51b8152600401610765906123d6565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000003410156107de5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e006044820152606401610765565b60c08101516001600160a01b0316156108395760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e000000000000006044820152606401610765565b60008160a001516002811115610851576108516123a6565b1461089e5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e0000000000000000006044820152606401610765565b3360c08201526108ad816116fd565b600083815260026020526040808220929092559051339184917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d79190a37f000000000000000000000000000000000000000000000000000000000000000034111561095f57600061093e7f000000000000000000000000000000000000000000000000000000000000000034612414565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036109ca5760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b6064820152608401610765565b6004546006546109da9190612427565b4211610a435760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b6064820152608401610765565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610aba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ade919061243a565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610b1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3f9190612457565b509250505081810361095f5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610bda57610bda61248d565b04031115610c1d5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610765565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c955760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e6044820152606401610765565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d41919061243a565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da2919061243a565b6001600160a01b031614610df15760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b6044820152606401610765565b60015483118015610e0157508115155b15610e4457600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610e4d816116fd565b60008481526002602052604090205403610eaa578051829003610e7657600160a0820152610e91565b60c08101516001600160a01b031615610e9157600260a08201525b610e9a816116fd565b6000848152600260205260409020555b505050565b6000610edb7f0000000000000000000000000000000000000000000000000000000000000000426124a3565b905090565b6007546001600160a01b03163314610ef757600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610f675760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e00000000006044820152606401610765565b80610f845760405162461bcd60e51b8152600401610765906123d6565b60008281526002602052604090205415610fd65760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b6044820152606401610765565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261101c906116fd565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a37f000000000000000000000000000000000000000000000000000000000000000034111561095f57600061093e7f000000000000000000000000000000000000000000000000000000000000000034612414565b604085106110fb5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b6044820152606401610765565b60008484848460405160200161111494939291906124c5565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561119457600088888381811061115657611156612507565b9050602002013590508281111561117b5782600052806020526040600020925061118b565b8060005282602052604060002092505b5060010161113a565b5080600054146111d75760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610765565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561124c5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c617965640000000000000000006044820152606401610765565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061127c908990899061251d565b6000604051808303816000865af19150503d80600081146112b9576040519150601f19603f3d011682016040523d82523d6000602084013e6112be565b606091505b505090508061130f5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e74726163740000000000000000006044820152606401610765565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61136b61043d36839003830183612366565b600083815260026020526040902054146113975760405162461bcd60e51b8152600401610765906123d6565b60026113a960c0830160a0840161252d565b60028111156113ba576113ba6123a6565b146113fb5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b6044820152606401610765565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061145593505060e0840191505060c08301612389565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114a9816116fd565b600083815260026020526040902054146114d55760405162461bcd60e51b8152600401610765906123d6565b60018160a0015160028111156114ed576114ed6123a6565b1461152a5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b6044820152606401610765565b60008281526002602052604081205560c08101516001600160a01b0316156115d6576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461163b57600080fd5b611644816116fd565b600083815260026020526040902054146116705760405162461bcd60e51b8152600401610765906123d6565b63ffffffff42811660608301524316608082015261168d816116fd565b60008381526002602052604080822092909255905183917f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691a25050565b60006116f77f0000000000000000000000000000000000000000000000000000000000000000836124a3565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611732989097969101612548565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117d3919061243a565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611810573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118349190612457565b509250505060045481111561187e5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b60045481101561194057600654156118f25760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b6064820152608401610765565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b6007546001600160a01b0316331461195a57600080fd5b6007546001600160a01b031633146119b45760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f7200000000000000006044820152606401610765565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611a2957611a2961248d565b04031115611a6c5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b6044820152606401610765565b611a75816116fd565b60008381526002602052604090205414611aa15760405162461bcd60e51b8152600401610765906123d6565b60c08101516001600160a01b031615611af35760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b6044820152606401610765565b600154821115611b3b57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611b4b816116fd565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bb457611bb461248d565b040311611bf55760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610765565b611bfe816116fd565b60008381526002602052604090205414611c2a5760405162461bcd60e51b8152600401610765906123d6565b60008160a001516002811115611c4257611c426123a6565b14611c815760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610765565b60c08101516001600160a01b03161561095f5760208101516001600160a01b0316611d055760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611d19826116fd565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611dc057611dc061248d565b040311611e015760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b6044820152606401610765565b611e0a816116fd565b60008381526002602052604090205414611e365760405162461bcd60e51b8152600401610765906123d6565b60008160a001516002811115611e4e57611e4e6123a6565b14611e8d5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b6044820152606401610765565b60208101516001600160a01b03161561095f5760c08101516001600160a01b0316611f125760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611d19826116fd565b6000816060015163ffffffff16600003611f4257506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611f7e57506003919050565b6000600c836060015163ffffffff16420381611f9c57611f9c61248d565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611fe05760019250611fe5565b600092505b50505b919050565b611ff78282610ee0565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261203e8382611624565b63ffffffff42811660608301524316608082015261205c83826119d6565b600160a0820152610eaa83826114a0565b6001600160a01b038116811461194057600080fd5b8035611fe88161206d565b803563ffffffff81168114611fe857600080fd5b803560038110611fe857600080fd5b600060e082840312156120c257600080fd5b60405160e0810181811067ffffffffffffffff821117156120f357634e487b7160e01b600052604160045260246000fd5b6040528235815290508061210960208401612082565b602082015261211a6040840161208d565b604082015261212b6060840161208d565b606082015261213c6080840161208d565b608082015261214d60a084016120a1565b60a082015261215e60c08401612082565b60c08201525092915050565b600080610100838503121561217e57600080fd5b8235915061218f84602085016120b0565b90509250929050565b600080600061012084860312156121ae57600080fd5b83359250602084013591506121c685604086016120b0565b90509250925092565b6000602082840312156121e157600080fd5b5035919050565b600080604083850312156121fb57600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611fe857600080fd5b60008083601f84011261223457600080fd5b50813567ffffffffffffffff81111561224c57600080fd5b60208301915083602082850101111561226457600080fd5b9250929050565b6000806000806000806080878903121561228457600080fd5b863567ffffffffffffffff8082111561229c57600080fd5b818901915089601f8301126122b057600080fd5b8135818111156122bf57600080fd5b8a60208260051b85010111156122d457600080fd5b602083019850809750506122ea60208a0161220a565b95506122f860408a01612082565b9450606089013591508082111561230e57600080fd5b5061231b89828a01612222565b979a9699509497509295939492505050565b60008082840361010081121561234257600080fd5b8335925060e0601f198201121561235857600080fd5b506020830190509250929050565b600060e0828403121561237857600080fd5b61238283836120b0565b9392505050565b60006020828403121561239b57600080fd5b81356123828161206d565b634e487b7160e01b600052602160045260246000fd5b60208101600483106123d0576123d06123a6565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b818103818111156116f7576116f76123fe565b808201808211156116f7576116f76123fe565b60006020828403121561244c57600080fd5b81516123828161206d565b6000806000806080858703121561246d57600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b6000826124c057634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561253f57600080fd5b612382826120a1565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106125a0576125a06123a6565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122028e21acdf47d7c4cf4caa64e7dc2058fc876bbdc996a898ef2eba57ae53815a864736f6c63430008120033", "devdoc": { "details": "Vea Outbox From ArbitrumGoerli to Goerli. Note: This contract is deployed on Goerli. Note: This contract is permissioned for developer testing (devnet).", "events": { @@ -1321,7 +1321,7 @@ "storageLayout": { "storage": [ { - "astId": 446, + "astId": 38, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "stateRoot", "offset": 0, @@ -1329,7 +1329,7 @@ "type": "t_bytes32" }, { - "astId": 448, + "astId": 40, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "latestVerifiedEpoch", "offset": 0, @@ -1337,7 +1337,7 @@ "type": "t_uint256" }, { - "astId": 452, + "astId": 44, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "claimHashes", "offset": 0, @@ -1345,7 +1345,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 456, + "astId": 48, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "relayed", "offset": 0, @@ -1353,7 +1353,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 458, + "astId": 50, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "sequencerDelayLimit", "offset": 0, @@ -1361,15 +1361,15 @@ "type": "t_uint256" }, { - "astId": 461, + "astId": 53, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "5", - "type": "t_struct(SequencerDelayLimitDecreaseRequest)466_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)58_storage" }, { - "astId": 3775, + "astId": 3009, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "devnetOperator", "offset": 0, @@ -1395,12 +1395,12 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_struct(SequencerDelayLimitDecreaseRequest)466_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)58_storage": { "encoding": "inplace", "label": "struct VeaOutboxArbToEth.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 463, + "astId": 55, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "requestedsequencerDelayLimit", "offset": 0, @@ -1408,7 +1408,7 @@ "type": "t_uint256" }, { - "astId": 465, + "astId": 57, "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", "label": "timestamp", "offset": 0, diff --git a/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json b/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json index 2ea7dcb3..06432f91 100644 --- a/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json +++ b/contracts/deployments/goerli/VeaOutboxArbToEthTestnet.json @@ -1,5 +1,5 @@ { - "address": "0x4738A566706eDd30Fe175e20eDDd21c5c7bD79Ea", + "address": "0xDF216C98773DA7998EE49AE8106BFe9724cf2944", "abi": [ { "inputs": [ @@ -46,7 +46,7 @@ "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "_epoch", "type": "uint256" @@ -103,7 +103,7 @@ "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "_epoch", "type": "uint256" @@ -1026,32 +1026,32 @@ "type": "function" } ], - "transactionHash": "0x2ef9aacf6ffb63f19d6abe870c39d41db1a9140d2d369e667479144f70e4a427", + "transactionHash": "0x8676e946b66fa71870e2436236af601c1e8ed96871243492114dfabf611acfd6", "receipt": { "to": null, "from": "0x407DDEC61d69b212498B140a26da70AE1C879f5a", - "contractAddress": "0x4738A566706eDd30Fe175e20eDDd21c5c7bD79Ea", - "transactionIndex": 31, - "gasUsed": "2268143", - "logsBloom": "0x00000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000010400000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x16ce36d77e126d8c8b4bdb9e48a255ae7947be6ed0ec6d11d78ea70acc26fd27", - "transactionHash": "0x2ef9aacf6ffb63f19d6abe870c39d41db1a9140d2d369e667479144f70e4a427", + "contractAddress": "0xDF216C98773DA7998EE49AE8106BFe9724cf2944", + "transactionIndex": 8, + "gasUsed": "2263588", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000200", + "blockHash": "0xaf3aecb60fd3891f967207a1bec72a75a2a67a314971bc39cd434b6976e27a44", + "transactionHash": "0x8676e946b66fa71870e2436236af601c1e8ed96871243492114dfabf611acfd6", "logs": [ { - "transactionIndex": 31, - "blockNumber": 9265276, - "transactionHash": "0x2ef9aacf6ffb63f19d6abe870c39d41db1a9140d2d369e667479144f70e4a427", - "address": "0x4738A566706eDd30Fe175e20eDDd21c5c7bD79Ea", + "transactionIndex": 8, + "blockNumber": 9292600, + "transactionHash": "0x8676e946b66fa71870e2436236af601c1e8ed96871243492114dfabf611acfd6", + "address": "0xDF216C98773DA7998EE49AE8106BFe9724cf2944", "topics": [ "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" ], "data": "0x0000000000000000000000000000000000000000000000000000000000015180", - "logIndex": 70, - "blockHash": "0x16ce36d77e126d8c8b4bdb9e48a255ae7947be6ed0ec6d11d78ea70acc26fd27" + "logIndex": 19, + "blockHash": "0xaf3aecb60fd3891f967207a1bec72a75a2a67a314971bc39cd434b6976e27a44" } ], - "blockNumber": 9265276, - "cumulativeGasUsed": "5796774", + "blockNumber": 9292600, + "cumulativeGasUsed": "3075639", "status": 1, "byzantium": true }, @@ -1060,15 +1060,15 @@ 7200, 10800, 1000000, - "0x0c45C5A1925085fF0672C1052f0b79D5e3ac2A78", + "0x95100f56d040fD48AA52dcDD05A9Fc477d55bd2E", "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", 1000000 ], - "numDeployments": 6, - "solcInputHash": "74af439f219888d42665a3312cefc0fc", - "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositPlusReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_msgId\",\"type\":\"uint256\"}],\"name\":\"isMsgRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRelayed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer delay limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEth\":\"The address of the inbox contract on Arbitrum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"isMsgRelayed(uint256)\":{\"details\":\"Get the msg relayed status.\",\"params\":{\"_msgId\":\"The msgId to check.\"},\"returns\":{\"isRelayed\":\"True if the msg was relayed.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":\"VeaOutboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 public immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 public immutable depositPlusReward; // 2 * deposit - burn\\n\\n address public constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer delay limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updateSequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n unchecked {\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch has not yet passed.\\\");\\n }\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) {\\n status = CensorshipTestStatus.NotStarted;\\n } else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod) {\\n status = CensorshipTestStatus.InProgress;\\n } else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the msg relayed status.\\n /// @param _msgId The msgId to check.\\n /// @return isRelayed True if the msg was relayed.\\n function isMsgRelayed(uint256 _msgId) external view returns(bool isRelayed) {\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1));\\n }\\n}\\n\",\"keccak256\":\"0x9deaca1e49d658f2ec56564a57987e7a711cfb16c43e3f0fb518007b01b21fdf\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002bd738038062002bd78339810160408190526200003591620002ce565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190526200006f620000ce565b6200007c6002886200034c565b60e08190526200008e8860026200036f565b6200009a91906200038f565b6101005261012051600190620000b190426200034c565b620000bd91906200038f565b600155506200040195505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000111573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001379190620003a5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200019b9190620003ca565b5092505050600454811115620001e65760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ae5760065415620002605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002c957600080fd5b919050565b600080600080600080600060e0888a031215620002ea57600080fd5b875196506020880151955060408801519450606088015193506200031160808901620002b1565b92506200032160a08901620002b1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200036a57634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000389576200038962000336565b92915050565b8181038181111562000389576200038962000336565b600060208284031215620003b857600080fd5b620003c382620002b1565b9392505050565b60008060008060808587031215620003e157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610100516101205161014051610160516101805161268562000552600039600081816104fe01526120b901526000818161053201528181610b1f01528181611a7801528181611c6c0152611e780152600081816105ba015261204d01526000818161056601528181610b4301528181610e4c01528181610eea0152818161164c0152818161180501528181611a9c01528181611c900152611e9c015260008181610494015261146301526000818161037f0152818161141001526115750152600081816105ee015281816106fc01528181610882015281816108af01528181610e780152818161106701528181611094015281816115d801528181611dd601528181611e3d0152611fe30152600081816104480152610c2d01526000818161066f01528181610a0501528181610bbe01528181610c57015261188601526126856000f3fe6080604052600436106101e35760003560e01c80635f43a47f11610102578063b633b94411610095578063df19e6ff11610064578063df19e6ff14610630578063e78cea921461065d578063e813a75514610691578063fccc2813146106a757600080fd5b8063b633b94414610588578063c2114a16146105a8578063d0e30db0146105dc578063da2b7bc41461061057600080fd5b80639588eca2116100d15780639588eca2146104d6578063aa22a1c6146104ec578063b044397e14610520578063b5b7a1841461055457600080fd5b80635f43a47f1461042157806369cd250d14610436578063836e344b14610482578063930f28af146104b657600080fd5b806331ddf7431161017a5780634788cb38116101495780634788cb38146103a157806349b4299e146103c15780634a439cfe146103e1578063541adcca1461040157600080fd5b806331ddf743146102e05780633ce43cfd1461030057806343b066d51461032057806344df8e701461036d57600080fd5b8063222ae786116101b6578063222ae786146102675780632639c0601461028a57806327ee6bdd146102b757806331d14457146102cd57600080fd5b806301139b68146101e8578063051d1970146101fd5780630c63fa84146102325780630f0adca514610247575b600080fd5b6101fb6101f63660046121f3565b6106bc565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb6108f9565b34801561025357600080fd5b506101fb610262366004612221565b610b1d565b34801561027357600080fd5b5061027c610e45565b604051908152602001610229565b34801561029657600080fd5b5061027c6102a5366004612258565b60026020526000908152604090205481565b3480156102c357600080fd5b5061027c60015481565b6101fb6102db366004612271565b610e76565b3480156102ec57600080fd5b506101fb6102fb3660046122f4565b6110b9565b34801561030c57600080fd5b506101fb61031b3660046123b6565b611359565b34801561032c57600080fd5b5061035d61033b366004612258565b600881901c600090815260036020526040902054600160ff9092161c81161490565b6040519015158152602001610229565b34801561037957600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103ad57600080fd5b506101fb6103bc3660046123b6565b6114a0565b3480156103cd57600080fd5b506101fb6103dc3660046121f3565b611615565b3480156103ed57600080fd5b5061027c6103fc366004612258565b6117fe565b34801561040d57600080fd5b5061027c61041c3660046123ef565b611830565b34801561042d57600080fd5b506101fb611882565b34801561044257600080fd5b5061046a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b34801561048e57600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c257600080fd5b506101fb6104d13660046121f3565b611a76565b3480156104e257600080fd5b5061027c60005481565b3480156104f857600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561052c57600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561056057600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561059457600080fd5b506101fb6105a33660046121f3565b611c6a565b3480156105b457600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e857600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561061c57600080fd5b506101fb61062b3660046121f3565b611e76565b34801561063c57600080fd5b5061065061064b3660046123ef565b61202f565b6040516102299190612428565b34801561066957600080fd5b5061046a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561069d57600080fd5b5061027c60045481565b3480156106b357600080fd5b5061046a600081565b6106c581611830565b600083815260026020526040902054146106fa5760405162461bcd60e51b81526004016106f190612442565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561076a5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106f1565b60c08101516001600160a01b0316156107c55760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106f1565b60008160a0015160028111156107dd576107dd612412565b1461082a5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106f1565b3360c082015261083981611830565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108f55760006108d47f000000000000000000000000000000000000000000000000000000000000000034612480565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036109605760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106f1565b6004546006546109709190612493565b42116109d95760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106f1565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610a50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7491906124a6565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad591906124c3565b50925050508181036108f55760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610b7057610b706124f9565b04031115610bb35760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106f1565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c2b5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106f1565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd791906124a6565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3891906124a6565b6001600160a01b031614610d875760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106f1565b60015483118015610d9757508115155b15610dda57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610de381611830565b60008481526002602052604090205403610e40578051829003610e0c57600160a0820152610e27565b60c08101516001600160a01b031615610e2757600260a08201525b610e3081611830565b6000848152600260205260409020555b505050565b6000610e717f00000000000000000000000000000000000000000000000000000000000000004261250f565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610ee65760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106f1565b60017f00000000000000000000000000000000000000000000000000000000000000004281610f1757610f176124f9565b04038214610f675760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e0000000000000060448201526064016106f1565b80610f845760405162461bcd60e51b81526004016106f190612442565b60008281526002602052604090205415610fd65760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106f1565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261101c90611830565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a37f00000000000000000000000000000000000000000000000000000000000000003411156108f55760006108d47f000000000000000000000000000000000000000000000000000000000000000034612480565b604085106110fb5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106f1565b6000848484846040516020016111149493929190612531565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561119457600088888381811061115657611156612573565b9050602002013590508281111561117b5782600052806020526040600020925061118b565b8060005282602052604060002092505b5060010161113a565b5080600054146111d75760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106f1565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561124c5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106f1565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061127c9089908990612589565b6000604051808303816000865af19150503d80600081146112b9576040519150601f19603f3d011682016040523d82523d6000602084013e6112be565b606091505b505090508061130f5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106f1565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61136b61041c368390038301836123ef565b600083815260026020526040902054146113975760405162461bcd60e51b81526004016106f190612442565b60026113a960c0830160a08401612599565b60028111156113ba576113ba612412565b146113fb5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106f1565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061145593505060e0840191505060c083016125b4565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114b261041c368390038301836123ef565b600083815260026020526040902054146114de5760405162461bcd60e51b81526004016106f190612442565b60016114f060c0830160a08401612599565b600281111561150157611501612412565b1461153e5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106f1565b600082815260026020526040812081905561155f60e0830160c084016125b4565b6001600160a01b0316146115ba576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061145593505060408401915050602083016125b4565b6115ca60408201602083016125b4565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61161e81611830565b6000838152600260205260409020541461164a5760405162461bcd60e51b81526004016106f190612442565b7f00000000000000000000000000000000000000000000000000000000000000006004546116789190612493565b604082015161168d9063ffffffff1642612480565b10156116f05760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b60648201526084016106f1565b60006116fb8261202f565b9050600281600381111561171157611711612412565b148061172e5750600081600381111561172c5761172c612412565b145b6117975760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b60648201526084016106f1565b63ffffffff4281166060840152431660808301526117b482611830565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b600061182a7f00000000000000000000000000000000000000000000000000000000000000008361250f565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986118659890979691016125d1565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061190691906124a6565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611943573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061196791906124c3565b50925050506004548111156119b15760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015611a735760065415611a255760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106f1565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ac957611ac96124f9565b04031115611b0c5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106f1565b611b1581611830565b60008381526002602052604090205414611b415760405162461bcd60e51b81526004016106f190612442565b60c08101516001600160a01b031615611b935760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106f1565b6001611b9e8261202f565b6003811115611baf57611baf612412565b14611bfc5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e000000000060448201526064016106f1565b600154821115611c4457600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611c5481611830565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cbd57611cbd6124f9565b040311611cfe5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106f1565b611d0781611830565b60008381526002602052604090205414611d335760405162461bcd60e51b81526004016106f190612442565b60008160a001516002811115611d4b57611d4b612412565b14611d8a5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106f1565b60c08101516001600160a01b0316156108f55760208101516001600160a01b0316611e0e5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611e2282611830565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ec957611ec96124f9565b040311611f0a5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106f1565b611f1381611830565b60008381526002602052604090205414611f3f5760405162461bcd60e51b81526004016106f190612442565b60008160a001516002811115611f5757611f57612412565b14611f965760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106f1565b60208101516001600160a01b0316156108f55760c08101516001600160a01b031661201b5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611e2282611830565b6000816060015163ffffffff1660000361204b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561208757506003919050565b6000600c836060015163ffffffff164203816120a5576120a56124f9565b608085015163ffffffff16919004019050437f0000000000000000000000000000000000000000000000000000000000000000818303116120e957600192506120ee565b600092505b50505b919050565b6001600160a01b0381168114611a7357600080fd5b80356120f1816120f6565b803563ffffffff811681146120f157600080fd5b8035600381106120f157600080fd5b600060e0828403121561214b57600080fd5b60405160e0810181811067ffffffffffffffff8211171561217c57634e487b7160e01b600052604160045260246000fd5b604052823581529050806121926020840161210b565b60208201526121a360408401612116565b60408201526121b460608401612116565b60608201526121c560808401612116565b60808201526121d660a0840161212a565b60a08201526121e760c0840161210b565b60c08201525092915050565b600080610100838503121561220757600080fd5b823591506122188460208501612139565b90509250929050565b6000806000610120848603121561223757600080fd5b833592506020840135915061224f8560408601612139565b90509250925092565b60006020828403121561226a57600080fd5b5035919050565b6000806040838503121561228457600080fd5b50508035926020909101359150565b803567ffffffffffffffff811681146120f157600080fd5b60008083601f8401126122bd57600080fd5b50813567ffffffffffffffff8111156122d557600080fd5b6020830191508360208285010111156122ed57600080fd5b9250929050565b6000806000806000806080878903121561230d57600080fd5b863567ffffffffffffffff8082111561232557600080fd5b818901915089601f83011261233957600080fd5b81358181111561234857600080fd5b8a60208260051b850101111561235d57600080fd5b6020830198508097505061237360208a01612293565b955061238160408a0161210b565b9450606089013591508082111561239757600080fd5b506123a489828a016122ab565b979a9699509497509295939492505050565b6000808284036101008112156123cb57600080fd5b8335925060e0601f19820112156123e157600080fd5b506020830190509250929050565b600060e0828403121561240157600080fd5b61240b8383612139565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061243c5761243c612412565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561182a5761182a61246a565b8082018082111561182a5761182a61246a565b6000602082840312156124b857600080fd5b815161240b816120f6565b600080600080608085870312156124d957600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b60008261252c57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156125ab57600080fd5b61240b8261212a565b6000602082840312156125c657600080fd5b813561240b816120f6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061262957612629612412565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212207e5789ac88e28911cf415f7ea8bbc367a0cf6c54c0da6785c4b6e9afb3a5141764736f6c63430008120033", - "deployedBytecode": "0x6080604052600436106101e35760003560e01c80635f43a47f11610102578063b633b94411610095578063df19e6ff11610064578063df19e6ff14610630578063e78cea921461065d578063e813a75514610691578063fccc2813146106a757600080fd5b8063b633b94414610588578063c2114a16146105a8578063d0e30db0146105dc578063da2b7bc41461061057600080fd5b80639588eca2116100d15780639588eca2146104d6578063aa22a1c6146104ec578063b044397e14610520578063b5b7a1841461055457600080fd5b80635f43a47f1461042157806369cd250d14610436578063836e344b14610482578063930f28af146104b657600080fd5b806331ddf7431161017a5780634788cb38116101495780634788cb38146103a157806349b4299e146103c15780634a439cfe146103e1578063541adcca1461040157600080fd5b806331ddf743146102e05780633ce43cfd1461030057806343b066d51461032057806344df8e701461036d57600080fd5b8063222ae786116101b6578063222ae786146102675780632639c0601461028a57806327ee6bdd146102b757806331d14457146102cd57600080fd5b806301139b68146101e8578063051d1970146101fd5780630c63fa84146102325780630f0adca514610247575b600080fd5b6101fb6101f63660046121f3565b6106bc565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb6108f9565b34801561025357600080fd5b506101fb610262366004612221565b610b1d565b34801561027357600080fd5b5061027c610e45565b604051908152602001610229565b34801561029657600080fd5b5061027c6102a5366004612258565b60026020526000908152604090205481565b3480156102c357600080fd5b5061027c60015481565b6101fb6102db366004612271565b610e76565b3480156102ec57600080fd5b506101fb6102fb3660046122f4565b6110b9565b34801561030c57600080fd5b506101fb61031b3660046123b6565b611359565b34801561032c57600080fd5b5061035d61033b366004612258565b600881901c600090815260036020526040902054600160ff9092161c81161490565b6040519015158152602001610229565b34801561037957600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103ad57600080fd5b506101fb6103bc3660046123b6565b6114a0565b3480156103cd57600080fd5b506101fb6103dc3660046121f3565b611615565b3480156103ed57600080fd5b5061027c6103fc366004612258565b6117fe565b34801561040d57600080fd5b5061027c61041c3660046123ef565b611830565b34801561042d57600080fd5b506101fb611882565b34801561044257600080fd5b5061046a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b34801561048e57600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c257600080fd5b506101fb6104d13660046121f3565b611a76565b3480156104e257600080fd5b5061027c60005481565b3480156104f857600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561052c57600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561056057600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561059457600080fd5b506101fb6105a33660046121f3565b611c6a565b3480156105b457600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e857600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561061c57600080fd5b506101fb61062b3660046121f3565b611e76565b34801561063c57600080fd5b5061065061064b3660046123ef565b61202f565b6040516102299190612428565b34801561066957600080fd5b5061046a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561069d57600080fd5b5061027c60045481565b3480156106b357600080fd5b5061046a600081565b6106c581611830565b600083815260026020526040902054146106fa5760405162461bcd60e51b81526004016106f190612442565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561076a5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106f1565b60c08101516001600160a01b0316156107c55760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106f1565b60008160a0015160028111156107dd576107dd612412565b1461082a5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106f1565b3360c082015261083981611830565b600083815260026020908152604091829020929092555183815233917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d7910160405180910390a27f00000000000000000000000000000000000000000000000000000000000000003411156108f55760006108d47f000000000000000000000000000000000000000000000000000000000000000034612480565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036109605760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106f1565b6004546006546109709190612493565b42116109d95760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106f1565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610a50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7491906124a6565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad591906124c3565b50925050508181036108f55760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610b7057610b706124f9565b04031115610bb35760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106f1565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c2b5760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106f1565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd791906124a6565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3891906124a6565b6001600160a01b031614610d875760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106f1565b60015483118015610d9757508115155b15610dda57600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610de381611830565b60008481526002602052604090205403610e40578051829003610e0c57600160a0820152610e27565b60c08101516001600160a01b031615610e2757600260a08201525b610e3081611830565b6000848152600260205260409020555b505050565b6000610e717f00000000000000000000000000000000000000000000000000000000000000004261250f565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610ee65760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106f1565b60017f00000000000000000000000000000000000000000000000000000000000000004281610f1757610f176124f9565b04038214610f675760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e0000000000000060448201526064016106f1565b80610f845760405162461bcd60e51b81526004016106f190612442565b60008281526002602052604090205415610fd65760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106f1565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c082015261101c90611830565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a37f00000000000000000000000000000000000000000000000000000000000000003411156108f55760006108d47f000000000000000000000000000000000000000000000000000000000000000034612480565b604085106110fb5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106f1565b6000848484846040516020016111149493929190612531565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561119457600088888381811061115657611156612573565b9050602002013590508281111561117b5782600052806020526040600020925061118b565b8060005282602052604060002092505b5060010161113a565b5080600054146111d75760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106f1565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561124c5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106f1565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061127c9089908990612589565b6000604051808303816000865af19150503d80600081146112b9576040519150601f19603f3d011682016040523d82523d6000602084013e6112be565b606091505b505090508061130f5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106f1565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61136b61041c368390038301836123ef565b600083815260026020526040902054146113975760405162461bcd60e51b81526004016106f190612442565b60026113a960c0830160a08401612599565b60028111156113ba576113ba612412565b146113fb5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106f1565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061145593505060e0840191505060c083016125b4565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114b261041c368390038301836123ef565b600083815260026020526040902054146114de5760405162461bcd60e51b81526004016106f190612442565b60016114f060c0830160a08401612599565b600281111561150157611501612412565b1461153e5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106f1565b600082815260026020526040812081905561155f60e0830160c084016125b4565b6001600160a01b0316146115ba576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061145593505060408401915050602083016125b4565b6115ca60408201602083016125b4565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b61161e81611830565b6000838152600260205260409020541461164a5760405162461bcd60e51b81526004016106f190612442565b7f00000000000000000000000000000000000000000000000000000000000000006004546116789190612493565b604082015161168d9063ffffffff1642612480565b10156116f05760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b60648201526084016106f1565b60006116fb8261202f565b9050600281600381111561171157611711612412565b148061172e5750600081600381111561172c5761172c612412565b145b6117975760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b60648201526084016106f1565b63ffffffff4281166060840152431660808301526117b482611830565b60008481526002602090815260409182902092909255518481527f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e16910160405180910390a1505050565b600061182a7f00000000000000000000000000000000000000000000000000000000000000008361250f565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986118659890979691016125d1565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061190691906124a6565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611943573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061196791906124c3565b50925050506004548111156119b15760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015611a735760065415611a255760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106f1565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ac957611ac96124f9565b04031115611b0c5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106f1565b611b1581611830565b60008381526002602052604090205414611b415760405162461bcd60e51b81526004016106f190612442565b60c08101516001600160a01b031615611b935760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106f1565b6001611b9e8261202f565b6003811115611baf57611baf612412565b14611bfc5760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e000000000060448201526064016106f1565b600154821115611c4457600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611c5481611830565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611cbd57611cbd6124f9565b040311611cfe5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106f1565b611d0781611830565b60008381526002602052604090205414611d335760405162461bcd60e51b81526004016106f190612442565b60008160a001516002811115611d4b57611d4b612412565b14611d8a5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106f1565b60c08101516001600160a01b0316156108f55760208101516001600160a01b0316611e0e5760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611e2282611830565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ec957611ec96124f9565b040311611f0a5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106f1565b611f1381611830565b60008381526002602052604090205414611f3f5760405162461bcd60e51b81526004016106f190612442565b60008160a001516002811115611f5757611f57612412565b14611f965760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106f1565b60208101516001600160a01b0316156108f55760c08101516001600160a01b031661201b5760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611e2282611830565b6000816060015163ffffffff1660000361204b57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561208757506003919050565b6000600c836060015163ffffffff164203816120a5576120a56124f9565b608085015163ffffffff16919004019050437f0000000000000000000000000000000000000000000000000000000000000000818303116120e957600192506120ee565b600092505b50505b919050565b6001600160a01b0381168114611a7357600080fd5b80356120f1816120f6565b803563ffffffff811681146120f157600080fd5b8035600381106120f157600080fd5b600060e0828403121561214b57600080fd5b60405160e0810181811067ffffffffffffffff8211171561217c57634e487b7160e01b600052604160045260246000fd5b604052823581529050806121926020840161210b565b60208201526121a360408401612116565b60408201526121b460608401612116565b60608201526121c560808401612116565b60808201526121d660a0840161212a565b60a08201526121e760c0840161210b565b60c08201525092915050565b600080610100838503121561220757600080fd5b823591506122188460208501612139565b90509250929050565b6000806000610120848603121561223757600080fd5b833592506020840135915061224f8560408601612139565b90509250925092565b60006020828403121561226a57600080fd5b5035919050565b6000806040838503121561228457600080fd5b50508035926020909101359150565b803567ffffffffffffffff811681146120f157600080fd5b60008083601f8401126122bd57600080fd5b50813567ffffffffffffffff8111156122d557600080fd5b6020830191508360208285010111156122ed57600080fd5b9250929050565b6000806000806000806080878903121561230d57600080fd5b863567ffffffffffffffff8082111561232557600080fd5b818901915089601f83011261233957600080fd5b81358181111561234857600080fd5b8a60208260051b850101111561235d57600080fd5b6020830198508097505061237360208a01612293565b955061238160408a0161210b565b9450606089013591508082111561239757600080fd5b506123a489828a016122ab565b979a9699509497509295939492505050565b6000808284036101008112156123cb57600080fd5b8335925060e0601f19820112156123e157600080fd5b506020830190509250929050565b600060e0828403121561240157600080fd5b61240b8383612139565b9392505050565b634e487b7160e01b600052602160045260246000fd5b602081016004831061243c5761243c612412565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561182a5761182a61246a565b8082018082111561182a5761182a61246a565b6000602082840312156124b857600080fd5b815161240b816120f6565b600080600080608085870312156124d957600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b60008261252c57634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b6000602082840312156125ab57600080fd5b61240b8261212a565b6000602082840312156125c657600080fd5b813561240b816120f6565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c850152506003851061262957612629612412565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea26469706673582212207e5789ac88e28911cf415f7ea8bbc367a0cf6c54c0da6785c4b6e9afb3a5141764736f6c63430008120033", + "numDeployments": 7, + "solcInputHash": "18d8b299616ba6ea1bb506a660a35de5", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositPlusReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_msgId\",\"type\":\"uint256\"}],\"name\":\"isMsgRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRelayed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer delay limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEth\":\"The address of the inbox contract on Arbitrum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"isMsgRelayed(uint256)\":{\"details\":\"Get the msg relayed status.\",\"params\":{\"_msgId\":\"The msgId to check.\"},\"returns\":{\"isRelayed\":\"True if the msg was relayed.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":\"VeaOutboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 public immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 public immutable depositPlusReward; // 2 * deposit - burn\\n\\n address public constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 indexed _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 indexed _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer delay limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updateSequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n unchecked {\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Epoch has not yet passed.\\\");\\n }\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = msg.sender;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, msg.sender);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) {\\n status = CensorshipTestStatus.NotStarted;\\n } else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod) {\\n status = CensorshipTestStatus.InProgress;\\n } else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the msg relayed status.\\n /// @param _msgId The msgId to check.\\n /// @return isRelayed True if the msg was relayed.\\n function isMsgRelayed(uint256 _msgId) external view returns (bool isRelayed) {\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1));\\n }\\n}\\n\",\"keccak256\":\"0xc7d71171aed6d49d618a773255c175d07a58f2aebeec09547d8c572bdcd9160e\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002bc238038062002bc28339810160408190526200003591620002ce565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190526200006f620000ce565b6200007c6002886200034c565b60e08190526200008e8860026200036f565b6200009a91906200038f565b6101005261012051600190620000b190426200034c565b620000bd91906200038f565b600155506200040195505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000111573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001379190620003a5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200019b9190620003ca565b5092505050600454811115620001e65760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ae5760065415620002605760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002c957600080fd5b919050565b600080600080600080600060e0888a031215620002ea57600080fd5b875196506020880151955060408801519450606088015193506200031160808901620002b1565b92506200032160a08901620002b1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200036a57634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141762000389576200038962000336565b92915050565b8181038181111562000389576200038962000336565b600060208284031215620003b857600080fd5b620003c382620002b1565b9392505050565b60008060008060808587031215620003e157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610100516101205161014051610160516101805161267062000552600039600081816104fe01526120a401526000818161053201528181610b1501528181611a6301528181611c570152611e630152600081816105ba015261203801526000818161056601528181610b3901528181610e4201528181610ee001528181611642015281816117f001528181611a8701528181611c7b0152611e87015260008181610494015261145901526000818161037f01528181611406015261156b0152600081816105ee015281816106fc01528181610878015281816108a501528181610e6e0152818161105d0152818161108a015281816115ce01528181611dc101528181611e280152611fce0152600081816104480152610c2301526000818161066f015281816109fb01528181610bb401528181610c4d015261187101526126706000f3fe6080604052600436106101e35760003560e01c80635f43a47f11610102578063b633b94411610095578063df19e6ff11610064578063df19e6ff14610630578063e78cea921461065d578063e813a75514610691578063fccc2813146106a757600080fd5b8063b633b94414610588578063c2114a16146105a8578063d0e30db0146105dc578063da2b7bc41461061057600080fd5b80639588eca2116100d15780639588eca2146104d6578063aa22a1c6146104ec578063b044397e14610520578063b5b7a1841461055457600080fd5b80635f43a47f1461042157806369cd250d14610436578063836e344b14610482578063930f28af146104b657600080fd5b806331ddf7431161017a5780634788cb38116101495780634788cb38146103a157806349b4299e146103c15780634a439cfe146103e1578063541adcca1461040157600080fd5b806331ddf743146102e05780633ce43cfd1461030057806343b066d51461032057806344df8e701461036d57600080fd5b8063222ae786116101b6578063222ae786146102675780632639c0601461028a57806327ee6bdd146102b757806331d14457146102cd57600080fd5b806301139b68146101e8578063051d1970146101fd5780630c63fa84146102325780630f0adca514610247575b600080fd5b6101fb6101f63660046121de565b6106bc565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb6108ef565b34801561025357600080fd5b506101fb61026236600461220c565b610b13565b34801561027357600080fd5b5061027c610e3b565b604051908152602001610229565b34801561029657600080fd5b5061027c6102a5366004612243565b60026020526000908152604090205481565b3480156102c357600080fd5b5061027c60015481565b6101fb6102db36600461225c565b610e6c565b3480156102ec57600080fd5b506101fb6102fb3660046122df565b6110af565b34801561030c57600080fd5b506101fb61031b3660046123a1565b61134f565b34801561032c57600080fd5b5061035d61033b366004612243565b600881901c600090815260036020526040902054600160ff9092161c81161490565b6040519015158152602001610229565b34801561037957600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103ad57600080fd5b506101fb6103bc3660046123a1565b611496565b3480156103cd57600080fd5b506101fb6103dc3660046121de565b61160b565b3480156103ed57600080fd5b5061027c6103fc366004612243565b6117e9565b34801561040d57600080fd5b5061027c61041c3660046123da565b61181b565b34801561042d57600080fd5b506101fb61186d565b34801561044257600080fd5b5061046a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b34801561048e57600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c257600080fd5b506101fb6104d13660046121de565b611a61565b3480156104e257600080fd5b5061027c60005481565b3480156104f857600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561052c57600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561056057600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561059457600080fd5b506101fb6105a33660046121de565b611c55565b3480156105b457600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e857600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561061c57600080fd5b506101fb61062b3660046121de565b611e61565b34801561063c57600080fd5b5061065061064b3660046123da565b61201a565b6040516102299190612413565b34801561066957600080fd5b5061046a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561069d57600080fd5b5061027c60045481565b3480156106b357600080fd5b5061046a600081565b6106c58161181b565b600083815260026020526040902054146106fa5760405162461bcd60e51b81526004016106f19061242d565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561076a5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106f1565b60c08101516001600160a01b0316156107c55760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106f1565b60008160a0015160028111156107dd576107dd6123fd565b1461082a5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106f1565b3360c08201526108398161181b565b600083815260026020526040808220929092559051339184917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d79190a37f00000000000000000000000000000000000000000000000000000000000000003411156108eb5760006108ca7f00000000000000000000000000000000000000000000000000000000000000003461246b565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036109565760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106f1565b600454600654610966919061247e565b42116109cf5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106f1565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612491565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb91906124ae565b50925050508181036108eb5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610b6657610b666124e4565b04031115610ba95760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106f1565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c215760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106f1565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ca9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ccd9190612491565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2e9190612491565b6001600160a01b031614610d7d5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106f1565b60015483118015610d8d57508115155b15610dd057600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610dd98161181b565b60008481526002602052604090205403610e36578051829003610e0257600160a0820152610e1d565b60c08101516001600160a01b031615610e1d57600260a08201525b610e268161181b565b6000848152600260205260409020555b505050565b6000610e677f0000000000000000000000000000000000000000000000000000000000000000426124fa565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610edc5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106f1565b60017f00000000000000000000000000000000000000000000000000000000000000004281610f0d57610f0d6124e4565b04038214610f5d5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e0000000000000060448201526064016106f1565b80610f7a5760405162461bcd60e51b81526004016106f19061242d565b60008281526002602052604090205415610fcc5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106f1565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526110129061181b565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a37f00000000000000000000000000000000000000000000000000000000000000003411156108eb5760006108ca7f00000000000000000000000000000000000000000000000000000000000000003461246b565b604085106110f15760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106f1565b60008484848460405160200161110a949392919061251c565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561118a57600088888381811061114c5761114c61255e565b9050602002013590508281111561117157826000528060205260406000209250611181565b8060005282602052604060002092505b50600101611130565b5080600054146111cd5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106f1565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112425760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106f1565b6000838152600360205260408082206001851b84179055516001600160a01b038916906112729089908990612574565b6000604051808303816000865af19150503d80600081146112af576040519150601f19603f3d011682016040523d82523d6000602084013e6112b4565b606091505b50509050806113055760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106f1565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61136161041c368390038301836123da565b6000838152600260205260409020541461138d5760405162461bcd60e51b81526004016106f19061242d565b600261139f60c0830160a08401612584565b60028111156113b0576113b06123fd565b146113f15760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106f1565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061144b93505060e0840191505060c0830161259f565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114a861041c368390038301836123da565b600083815260026020526040902054146114d45760405162461bcd60e51b81526004016106f19061242d565b60016114e660c0830160a08401612584565b60028111156114f7576114f76123fd565b146115345760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106f1565b600082815260026020526040812081905561155560e0830160c0840161259f565b6001600160a01b0316146115b0576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061144b935050604084019150506020830161259f565b6115c0604082016020830161259f565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6116148161181b565b600083815260026020526040902054146116405760405162461bcd60e51b81526004016106f19061242d565b7f000000000000000000000000000000000000000000000000000000000000000060045461166e919061247e565b60408201516116839063ffffffff164261246b565b10156116e65760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b60648201526084016106f1565b60006116f18261201a565b90506002816003811115611707576117076123fd565b148061172457506000816003811115611722576117226123fd565b145b61178d5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b60648201526084016106f1565b63ffffffff4281166060840152431660808301526117aa8261181b565b60008481526002602052604080822092909255905184917f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691a2505050565b60006118157f0000000000000000000000000000000000000000000000000000000000000000836124fa565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986118509890979691016125bc565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f19190612491565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561192e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061195291906124ae565b509250505060045481111561199c5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015611a5e5760065415611a105760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106f1565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ab457611ab46124e4565b04031115611af75760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106f1565b611b008161181b565b60008381526002602052604090205414611b2c5760405162461bcd60e51b81526004016106f19061242d565b60c08101516001600160a01b031615611b7e5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106f1565b6001611b898261201a565b6003811115611b9a57611b9a6123fd565b14611be75760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e000000000060448201526064016106f1565b600154821115611c2f57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611c3f8161181b565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ca857611ca86124e4565b040311611ce95760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106f1565b611cf28161181b565b60008381526002602052604090205414611d1e5760405162461bcd60e51b81526004016106f19061242d565b60008160a001516002811115611d3657611d366123fd565b14611d755760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106f1565b60c08101516001600160a01b0316156108eb5760208101516001600160a01b0316611df95760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611e0d8261181b565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611eb457611eb46124e4565b040311611ef55760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106f1565b611efe8161181b565b60008381526002602052604090205414611f2a5760405162461bcd60e51b81526004016106f19061242d565b60008160a001516002811115611f4257611f426123fd565b14611f815760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106f1565b60208101516001600160a01b0316156108eb5760c08101516001600160a01b03166120065760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611e0d8261181b565b6000816060015163ffffffff1660000361203657506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561207257506003919050565b6000600c836060015163ffffffff16420381612090576120906124e4565b608085015163ffffffff16919004019050437f0000000000000000000000000000000000000000000000000000000000000000818303116120d457600192506120d9565b600092505b50505b919050565b6001600160a01b0381168114611a5e57600080fd5b80356120dc816120e1565b803563ffffffff811681146120dc57600080fd5b8035600381106120dc57600080fd5b600060e0828403121561213657600080fd5b60405160e0810181811067ffffffffffffffff8211171561216757634e487b7160e01b600052604160045260246000fd5b6040528235815290508061217d602084016120f6565b602082015261218e60408401612101565b604082015261219f60608401612101565b60608201526121b060808401612101565b60808201526121c160a08401612115565b60a08201526121d260c084016120f6565b60c08201525092915050565b60008061010083850312156121f257600080fd5b823591506122038460208501612124565b90509250929050565b6000806000610120848603121561222257600080fd5b833592506020840135915061223a8560408601612124565b90509250925092565b60006020828403121561225557600080fd5b5035919050565b6000806040838503121561226f57600080fd5b50508035926020909101359150565b803567ffffffffffffffff811681146120dc57600080fd5b60008083601f8401126122a857600080fd5b50813567ffffffffffffffff8111156122c057600080fd5b6020830191508360208285010111156122d857600080fd5b9250929050565b600080600080600080608087890312156122f857600080fd5b863567ffffffffffffffff8082111561231057600080fd5b818901915089601f83011261232457600080fd5b81358181111561233357600080fd5b8a60208260051b850101111561234857600080fd5b6020830198508097505061235e60208a0161227e565b955061236c60408a016120f6565b9450606089013591508082111561238257600080fd5b5061238f89828a01612296565b979a9699509497509295939492505050565b6000808284036101008112156123b657600080fd5b8335925060e0601f19820112156123cc57600080fd5b506020830190509250929050565b600060e082840312156123ec57600080fd5b6123f68383612124565b9392505050565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612427576124276123fd565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561181557611815612455565b8082018082111561181557611815612455565b6000602082840312156124a357600080fd5b81516123f6816120e1565b600080600080608085870312156124c457600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b60008261251757634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561259657600080fd5b6123f682612115565b6000602082840312156125b157600080fd5b81356123f6816120e1565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c8501525060038510612614576126146123fd565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220dbfe448b81eee6c31734ff7a39bac526c212873f335d013b9f9596c515ba071764736f6c63430008120033", + "deployedBytecode": "0x6080604052600436106101e35760003560e01c80635f43a47f11610102578063b633b94411610095578063df19e6ff11610064578063df19e6ff14610630578063e78cea921461065d578063e813a75514610691578063fccc2813146106a757600080fd5b8063b633b94414610588578063c2114a16146105a8578063d0e30db0146105dc578063da2b7bc41461061057600080fd5b80639588eca2116100d15780639588eca2146104d6578063aa22a1c6146104ec578063b044397e14610520578063b5b7a1841461055457600080fd5b80635f43a47f1461042157806369cd250d14610436578063836e344b14610482578063930f28af146104b657600080fd5b806331ddf7431161017a5780634788cb38116101495780634788cb38146103a157806349b4299e146103c15780634a439cfe146103e1578063541adcca1461040157600080fd5b806331ddf743146102e05780633ce43cfd1461030057806343b066d51461032057806344df8e701461036d57600080fd5b8063222ae786116101b6578063222ae786146102675780632639c0601461028a57806327ee6bdd146102b757806331d14457146102cd57600080fd5b806301139b68146101e8578063051d1970146101fd5780630c63fa84146102325780630f0adca514610247575b600080fd5b6101fb6101f63660046121de565b6106bc565b005b34801561020957600080fd5b50600554600654610218919082565b604080519283526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101fb6108ef565b34801561025357600080fd5b506101fb61026236600461220c565b610b13565b34801561027357600080fd5b5061027c610e3b565b604051908152602001610229565b34801561029657600080fd5b5061027c6102a5366004612243565b60026020526000908152604090205481565b3480156102c357600080fd5b5061027c60015481565b6101fb6102db36600461225c565b610e6c565b3480156102ec57600080fd5b506101fb6102fb3660046122df565b6110af565b34801561030c57600080fd5b506101fb61031b3660046123a1565b61134f565b34801561032c57600080fd5b5061035d61033b366004612243565b600881901c600090815260036020526040902054600160ff9092161c81161490565b6040519015158152602001610229565b34801561037957600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103ad57600080fd5b506101fb6103bc3660046123a1565b611496565b3480156103cd57600080fd5b506101fb6103dc3660046121de565b61160b565b3480156103ed57600080fd5b5061027c6103fc366004612243565b6117e9565b34801561040d57600080fd5b5061027c61041c3660046123da565b61181b565b34801561042d57600080fd5b506101fb61186d565b34801561044257600080fd5b5061046a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b34801561048e57600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c257600080fd5b506101fb6104d13660046121de565b611a61565b3480156104e257600080fd5b5061027c60005481565b3480156104f857600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561052c57600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561056057600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561059457600080fd5b506101fb6105a33660046121de565b611c55565b3480156105b457600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e857600080fd5b5061027c7f000000000000000000000000000000000000000000000000000000000000000081565b34801561061c57600080fd5b506101fb61062b3660046121de565b611e61565b34801561063c57600080fd5b5061065061064b3660046123da565b61201a565b6040516102299190612413565b34801561066957600080fd5b5061046a7f000000000000000000000000000000000000000000000000000000000000000081565b34801561069d57600080fd5b5061027c60045481565b3480156106b357600080fd5b5061046a600081565b6106c58161181b565b600083815260026020526040902054146106fa5760405162461bcd60e51b81526004016106f19061242d565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000034101561076a5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016106f1565b60c08101516001600160a01b0316156107c55760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016106f1565b60008160a0015160028111156107dd576107dd6123fd565b1461082a5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016106f1565b3360c08201526108398161181b565b600083815260026020526040808220929092559051339184917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d79190a37f00000000000000000000000000000000000000000000000000000000000000003411156108eb5760006108ca7f00000000000000000000000000000000000000000000000000000000000000003461246b565b604051909150339082156108fc029083906000818181858888f15050505050505b5050565b6006546000036109565760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084016106f1565b600454600654610966919061247e565b42116109cf5760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016106f1565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612491565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb91906124ae565b50925050508181036108eb5760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281610b6657610b666124e4565b04031115610ba95760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106f1565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c215760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016106f1565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ca9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ccd9190612491565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2e9190612491565b6001600160a01b031614610d7d5760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016106f1565b60015483118015610d8d57508115155b15610dd057600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610dd98161181b565b60008481526002602052604090205403610e36578051829003610e0257600160a0820152610e1d565b60c08101516001600160a01b031615610e1d57600260a08201525b610e268161181b565b6000848152600260205260409020555b505050565b6000610e677f0000000000000000000000000000000000000000000000000000000000000000426124fa565b905090565b7f0000000000000000000000000000000000000000000000000000000000000000341015610edc5760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016106f1565b60017f00000000000000000000000000000000000000000000000000000000000000004281610f0d57610f0d6124e4565b04038214610f5d5760405162461bcd60e51b815260206004820152601960248201527f45706f636820686173206e6f7420796574207061737365642e0000000000000060448201526064016106f1565b80610f7a5760405162461bcd60e51b81526004016106f19061242d565b60008281526002602052604090205415610fcc5760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016106f1565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c08201526110129061181b565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a37f00000000000000000000000000000000000000000000000000000000000000003411156108eb5760006108ca7f00000000000000000000000000000000000000000000000000000000000000003461246b565b604085106110f15760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016106f1565b60008484848460405160200161110a949392919061251c565b604051602081830303815290604052805190602001209050806000526020600020905060005b8681101561118a57600088888381811061114c5761114c61255e565b9050602002013590508281111561117157826000528060205260406000209250611181565b8060005282602052604060002092505b50600101611130565b5080600054146111cd5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016106f1565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c600116156112425760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016106f1565b6000838152600360205260408082206001851b84179055516001600160a01b038916906112729089908990612574565b6000604051808303816000865af19150503d80600081146112af576040519150601f19603f3d011682016040523d82523d6000602084013e6112b4565b606091505b50509050806113055760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016106f1565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61136161041c368390038301836123da565b6000838152600260205260409020541461138d5760405162461bcd60e51b81526004016106f19061242d565b600261139f60c0830160a08401612584565b60028111156113b0576113b06123fd565b146113f15760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016106f1565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061144b93505060e0840191505060c0830161259f565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6114a861041c368390038301836123da565b600083815260026020526040902054146114d45760405162461bcd60e51b81526004016106f19061242d565b60016114e660c0830160a08401612584565b60028111156114f7576114f76123fd565b146115345760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016106f1565b600082815260026020526040812081905561155560e0830160c0840161259f565b6001600160a01b0316146115b0576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061144b935050604084019150506020830161259f565b6115c0604082016020830161259f565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6116148161181b565b600083815260026020526040902054146116405760405162461bcd60e51b81526004016106f19061242d565b7f000000000000000000000000000000000000000000000000000000000000000060045461166e919061247e565b60408201516116839063ffffffff164261246b565b10156116e65760405162461bcd60e51b815260206004820152602c60248201527f436c61696d206d75737420776169742061746c65617374206d61784c3253746160448201526b3a32a9bcb731a232b630bc9760a11b60648201526084016106f1565b60006116f18261201a565b90506002816003811115611707576117076123fd565b148061172457506000816003811115611722576117226123fd565b145b61178d5760405162461bcd60e51b815260206004820152603460248201527f436c61696d20766572696669636174696f6e20696e2070726f6772657373206f604482015273391030b63932b0b23c9031b7b6b83632ba32b21760611b60648201526084016106f1565b63ffffffff4281166060840152431660808301526117aa8261181b565b60008481526002602052604080822092909255905184917f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691a2505050565b60006118157f0000000000000000000000000000000000000000000000000000000000000000836124fa565b92915050565b80516020808301516040808501516060860151608087015160a088015160c089015194516000986118509890979691016125bc565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f19190612491565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561192e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061195291906124ae565b509250505060045481111561199c5760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015611a5e5760065415611a105760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016106f1565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ab457611ab46124e4565b04031115611af75760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016106f1565b611b008161181b565b60008381526002602052604090205414611b2c5760405162461bcd60e51b81526004016106f19061242d565b60c08101516001600160a01b031615611b7e5760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016106f1565b6001611b898261201a565b6003811115611b9a57611b9a6123fd565b14611be75760405162461bcd60e51b815260206004820152601b60248201527f43656e736f72736869702074657374206e6f74207061737365642e000000000060448201526064016106f1565b600154821115611c2f57600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a0820152611c3f8161181b565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611ca857611ca86124e4565b040311611ce95760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106f1565b611cf28161181b565b60008381526002602052604090205414611d1e5760405162461bcd60e51b81526004016106f19061242d565b60008160a001516002811115611d3657611d366123fd565b14611d755760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106f1565b60c08101516001600160a01b0316156108eb5760208101516001600160a01b0316611df95760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611e0d8261181b565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611eb457611eb46124e4565b040311611ef55760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016106f1565b611efe8161181b565b60008381526002602052604090205414611f2a5760405162461bcd60e51b81526004016106f19061242d565b60008160a001516002811115611f4257611f426123fd565b14611f815760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016106f1565b60208101516001600160a01b0316156108eb5760c08101516001600160a01b03166120065760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611e0d8261181b565b6000816060015163ffffffff1660000361203657506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff164203101561207257506003919050565b6000600c836060015163ffffffff16420381612090576120906124e4565b608085015163ffffffff16919004019050437f0000000000000000000000000000000000000000000000000000000000000000818303116120d457600192506120d9565b600092505b50505b919050565b6001600160a01b0381168114611a5e57600080fd5b80356120dc816120e1565b803563ffffffff811681146120dc57600080fd5b8035600381106120dc57600080fd5b600060e0828403121561213657600080fd5b60405160e0810181811067ffffffffffffffff8211171561216757634e487b7160e01b600052604160045260246000fd5b6040528235815290508061217d602084016120f6565b602082015261218e60408401612101565b604082015261219f60608401612101565b60608201526121b060808401612101565b60808201526121c160a08401612115565b60a08201526121d260c084016120f6565b60c08201525092915050565b60008061010083850312156121f257600080fd5b823591506122038460208501612124565b90509250929050565b6000806000610120848603121561222257600080fd5b833592506020840135915061223a8560408601612124565b90509250925092565b60006020828403121561225557600080fd5b5035919050565b6000806040838503121561226f57600080fd5b50508035926020909101359150565b803567ffffffffffffffff811681146120dc57600080fd5b60008083601f8401126122a857600080fd5b50813567ffffffffffffffff8111156122c057600080fd5b6020830191508360208285010111156122d857600080fd5b9250929050565b600080600080600080608087890312156122f857600080fd5b863567ffffffffffffffff8082111561231057600080fd5b818901915089601f83011261232457600080fd5b81358181111561233357600080fd5b8a60208260051b850101111561234857600080fd5b6020830198508097505061235e60208a0161227e565b955061236c60408a016120f6565b9450606089013591508082111561238257600080fd5b5061238f89828a01612296565b979a9699509497509295939492505050565b6000808284036101008112156123b657600080fd5b8335925060e0601f19820112156123cc57600080fd5b506020830190509250929050565b600060e082840312156123ec57600080fd5b6123f68383612124565b9392505050565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612427576124276123fd565b91905290565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111561181557611815612455565b8082018082111561181557611815612455565b6000602082840312156124a357600080fd5b81516123f6816120e1565b600080600080608085870312156124c457600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b60008261251757634e487b7160e01b600052601260045260246000fd5b500490565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561259657600080fd5b6123f682612115565b6000602082840312156125b157600080fd5b81356123f6816120e1565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c8501525060038510612614576126146123fd565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea2646970667358221220dbfe448b81eee6c31734ff7a39bac526c212873f335d013b9f9596c515ba071764736f6c63430008120033", "devdoc": { "details": "Vea Outbox From Arbitrum to Ethereum. Note: This contract is deployed on Ethereum.", "events": { @@ -1264,7 +1264,7 @@ "storageLayout": { "storage": [ { - "astId": 446, + "astId": 38, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "stateRoot", "offset": 0, @@ -1272,7 +1272,7 @@ "type": "t_bytes32" }, { - "astId": 448, + "astId": 40, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "latestVerifiedEpoch", "offset": 0, @@ -1280,7 +1280,7 @@ "type": "t_uint256" }, { - "astId": 452, + "astId": 44, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "claimHashes", "offset": 0, @@ -1288,7 +1288,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 456, + "astId": 48, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "relayed", "offset": 0, @@ -1296,7 +1296,7 @@ "type": "t_mapping(t_uint256,t_bytes32)" }, { - "astId": 458, + "astId": 50, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "sequencerDelayLimit", "offset": 0, @@ -1304,12 +1304,12 @@ "type": "t_uint256" }, { - "astId": 461, + "astId": 53, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "sequencerDelayLimitDecreaseRequest", "offset": 0, "slot": "5", - "type": "t_struct(SequencerDelayLimitDecreaseRequest)466_storage" + "type": "t_struct(SequencerDelayLimitDecreaseRequest)58_storage" } ], "types": { @@ -1325,12 +1325,12 @@ "numberOfBytes": "32", "value": "t_bytes32" }, - "t_struct(SequencerDelayLimitDecreaseRequest)466_storage": { + "t_struct(SequencerDelayLimitDecreaseRequest)58_storage": { "encoding": "inplace", "label": "struct VeaOutboxArbToEth.SequencerDelayLimitDecreaseRequest", "members": [ { - "astId": 463, + "astId": 55, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "requestedsequencerDelayLimit", "offset": 0, @@ -1338,7 +1338,7 @@ "type": "t_uint256" }, { - "astId": 465, + "astId": 57, "contract": "src/arbitrumToEth/VeaOutboxArbToEth.sol:VeaOutboxArbToEth", "label": "timestamp", "offset": 0, From bc96dc3901ac3fc196007dbeeb8501dbb9bc840c Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Thu, 12 Oct 2023 17:37:26 -0700 Subject: [PATCH 20/58] fix: typo and allow proxy challenges --- .../src/arbitrumToEth/VeaOutboxArbToEth.sol | 29 +++++++++++++++---- .../arbitrumToGnosis/VeaOutboxArbToGnosis.sol | 8 ++--- .../gnosisToArbitrum/VeaOutboxGnosisToArb.sol | 9 +++--- 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol index ea0d45d3..a434f21f 100644 --- a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol +++ b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol @@ -70,7 +70,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox. /// @param _epoch The epoch associated with the challenged claim. /// @param _challenger The address of the challenger. - event Challenged(uint256 _epoch, address indexed _challenger); + event Challenged(uint256 indexed _epoch, address indexed _challenger); /// @dev This event indicates that a message has been relayed. /// @param _msgId The msgId of the message that was relayed. @@ -78,7 +78,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer. /// @param _epoch The epoch that started verification. - event VerificationStarted(uint256 _epoch); + event VerificationStarted(uint256 indexed _epoch); /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed. /// @param _epoch The epoch that was verified. @@ -204,7 +204,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual { require(msg.value >= deposit, "Insufficient claim deposit."); unchecked { - require(_epoch == block.timestamp / epochPeriod - 1, "Epoch has not yet passed."); + require(_epoch == block.timestamp / epochPeriod - 1, "Invalid epoch."); } require(_stateRoot != bytes32(0), "Invalid claim."); require(claimHashes[_epoch] == bytes32(0), "Claim already made."); @@ -234,15 +234,32 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { /// @param _epoch The epoch of the claim to challenge. /// @param _claim The claim associated with the epoch. function challenge(uint256 _epoch, Claim memory _claim) external payable { + _challenge(_epoch, _claim, msg.sender); + } + + /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'. + /// @dev Allows proxy contracts to batch challenges. + /// @param _epoch The epoch of the claim to challenge. + /// @param _claim The claim associated with the epoch. + /// @param _withdrawalAddress The address to withdraw the deposit + reward to. + function challenge(uint256 _epoch, Claim memory _claim, address _withdrawalAddress) external payable { + _challenge(_epoch, _claim, _withdrawalAddress); + } + + /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'. + /// @param _epoch The epoch of the claim to challenge. + /// @param _claim The claim associated with the epoch. + /// @param _withdrawAddress The address to withdraw the deposit + reward to. + function _challenge(uint256 _epoch, Claim memory _claim, address _withdrawAddress) internal { require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); require(msg.value >= deposit, "Insufficient challenge deposit."); require(_claim.challenger == address(0), "Claim already challenged."); require(_claim.honest == Party.None, "Claim already verified."); - _claim.challenger = msg.sender; + _claim.challenger = _withdrawAddress; claimHashes[_epoch] = hashClaim(_claim); - emit Challenged(_epoch, msg.sender); + emit Challenged(_epoch, _withdrawAddress); // Refund overpayment. if (msg.value > deposit) { @@ -458,7 +475,7 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { } else { address challenger = _claim.challenger; _claim.challenger = address(0); - claimHashes[_epoch] = hashClaim(_claim); + claimHashes[_epoch] == hashClaim(_claim); payable(challenger).send(deposit); // User is responsible for accepting ETH. } } diff --git a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol index 4b053d90..78b815fa 100644 --- a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol @@ -66,7 +66,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox. /// @param _epoch The epoch associated with the challenged claim. /// @param _challenger The address of the challenger. - event Challenged(uint256 _epoch, address indexed _challenger); + event Challenged(uint256 indexed _epoch, address indexed _challenger); /// @dev This event indicates that a message has been relayed. /// @param _msgId The msgId of the message that was relayed. @@ -74,7 +74,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer. /// @param _epoch The epoch that started verification. - event VerificationStarted(uint256 _epoch); + event VerificationStarted(uint256 indexed _epoch); /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed. /// @param _epoch The epoch that was verified. @@ -202,7 +202,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'. /// @param _epoch The epoch of the claim to challenge. /// @param _claim The claim associated with the epoch. - function challenge(uint256 _epoch, Claim memory _claim) external payable { + function challenge(uint256 _epoch, Claim memory _claim) external { require(weth.transferFrom(msg.sender, address(this), deposit), "Failed WETH transfer."); require(claimHashes[_epoch] == hashClaim(_claim), "Invalid claim."); require(_claim.challenger == address(0), "Claim already challenged."); @@ -419,7 +419,7 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { } else { address challenger = _claim.challenger; _claim.challenger = address(0); - claimHashes[_epoch] = hashClaim(_claim); + claimHashes[_epoch] == hashClaim(_claim); require(weth.transfer(challenger, deposit), "Failed WETH transfer."); // should revert on errors, but we check return value anyways } } diff --git a/contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol b/contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol index b8fb1a0d..28558cbc 100644 --- a/contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol +++ b/contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol @@ -68,7 +68,7 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox. /// @param _epoch The epoch associated with the challenged claim. /// @param _challenger The address of the challenger. - event Challenged(uint256 _epoch, address indexed _challenger); + event Challenged(uint256 indexed _epoch, address indexed _challenger); /// @dev This event indicates that a message has been relayed. /// @param _msgId The msgId of the message that was relayed. @@ -76,7 +76,7 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed. /// @param _epoch The epoch that was verified. - event Verified(uint256 _epoch); + event Verified(uint256 indexed _epoch); /// @dev This event indicates the sequencer delay limit updated. /// @param _newSequencerDelayLimit The new max sequencer past timestamping power. @@ -213,9 +213,10 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'. /// @param _epoch The epoch of the claim to challenge. - function challenge(uint256 _epoch) external payable virtual { + /// @param _disputedStateRoot The claimed state root to challenge, included to ensure txn reverts if claim is removed due to a block reorg. + function challenge(uint256 _epoch, bytes32 _disputedStateRoot) external payable virtual { require(challengers[_epoch] == address(0), "Claim already challenged."); - require(claims[_epoch].claimer != address(0), "No claim for epoch."); + require(claims[_epoch].stateRoot == _disputedStateRoot, "No claim for epoch."); require(msg.value >= deposit, "Insufficient challenge deposit."); challengers[_epoch] = msg.sender; From 5c107afbe04f4598c507ec3397a69f28293b82da Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Thu, 12 Oct 2023 17:37:43 -0700 Subject: [PATCH 21/58] chore: update weth interface --- .../src/interfaces/tokens/gnosis/IWETH.sol | 40 ++++++++++++++++--- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/contracts/src/interfaces/tokens/gnosis/IWETH.sol b/contracts/src/interfaces/tokens/gnosis/IWETH.sol index 2b36ac85..8f83c976 100644 --- a/contracts/src/interfaces/tokens/gnosis/IWETH.sol +++ b/contracts/src/interfaces/tokens/gnosis/IWETH.sol @@ -1,22 +1,24 @@ -// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5daaf60d11ee2075260d0f3adfb22b1c536db983/contracts/token/ERC20/BurnableToken.sol +// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/5daaf60d11ee2075260d0f3adfb22b1c536db983/contracts/token/ERC20/StandardBurnableToken.sol // implementation: https://gnosisscan.io/address/0xf8d1677c8a0c961938bf2f9adc3f3cfda759a9d9#code // proxy: https://gnosisscan.io/token/0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1#readProxyContract /** - * @title Burnable Token + * @title Standard Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ interface IWETH { - event Transfer(address indexed from, address indexed to, uint256 value); - event Burn(address indexed burner, uint256 value); - /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) external; - function transfer(address to, uint256 value) external returns (bool); + /** + * @dev Gets the balance of the specified address. + * @param _owner The address to query the the balance of. + * @return An uint256 representing the amount owned by the passed address. + */ + function balanceOf(address _owner) external view returns (uint256); /** * @dev Transfer tokens from one address to another @@ -25,4 +27,30 @@ interface IWETH { * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) external returns (bool); + + /** + * @dev Transfer token for a specified address + * @param _to The address to transfer to. + * @param _value The amount to be transferred. + */ + function transfer(address _to, uint256 _value) external returns (bool); + + /** + * @dev Function to check the amount of tokens that an owner allowed to a spender. + * @param _owner address The address which owns the funds. + * @param _spender address The address which will spend the funds. + * @return A uint256 specifying the amount of tokens still available for the spender. + */ + function allowance(address _owner, address _spender) external view returns (uint256); + + /** + * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. + * Beware that changing an allowance with this method brings the risk that someone may use both the old + * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this + * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: + * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 + * @param _spender The address which will spend the funds. + * @param _value The amount of tokens to be spent. + */ + function approve(address _spender, uint256 _value) external returns (bool); } From c5abc81cf656a06dc3ed06a8bbcd82230a9321c6 Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Thu, 12 Oct 2023 17:38:48 -0700 Subject: [PATCH 22/58] feat: watcher utility functions --- .../src/utils/L1/veaOutboxMultiChallenge.sol | 30 ++++++++++++++++ .../utils/L1/veaOutboxMultiChallengeWETH.sol | 35 +++++++++++++++++++ contracts/src/utils/veaInboxTouch.sol | 26 ++++++++++++++ 3 files changed, 91 insertions(+) create mode 100644 contracts/src/utils/L1/veaOutboxMultiChallenge.sol create mode 100644 contracts/src/utils/L1/veaOutboxMultiChallengeWETH.sol create mode 100644 contracts/src/utils/veaInboxTouch.sol diff --git a/contracts/src/utils/L1/veaOutboxMultiChallenge.sol b/contracts/src/utils/L1/veaOutboxMultiChallenge.sol new file mode 100644 index 00000000..4069a594 --- /dev/null +++ b/contracts/src/utils/L1/veaOutboxMultiChallenge.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: MIT + +/// @custom:authors: [@shotaronowhere] +/// @custom:reviewers: [] +/// @custom:auditors: [] +/// @custom:bounties: [] +/// @custom:deployments: [] + +pragma solidity 0.8.18; + +/// @dev Vea Inbox Calldata Optimization. +/// No function selector required, only fallback function. +contract veaOutboxMultiChallenge { + address public immutable veaOutboxOnL1; + uint256 public immutable deposit; + + constructor(address _veaOutboxOnL1, uint256 _deposit) { + veaOutboxOnL1 = _veaOutboxOnL1; + deposit = _deposit; + } + + function multiChallenge(bytes[] calldata datas) external payable { + for (uint256 i = 0; i < datas.length; i++) { + veaOutboxOnL1.call{value: deposit}(datas[i]); + } + + uint256 balance = address(this).balance; + if (balance > 0) payable(msg.sender).send(balance - 1); // msg.sender responsible to accept eth + } +} diff --git a/contracts/src/utils/L1/veaOutboxMultiChallengeWETH.sol b/contracts/src/utils/L1/veaOutboxMultiChallengeWETH.sol new file mode 100644 index 00000000..83058c82 --- /dev/null +++ b/contracts/src/utils/L1/veaOutboxMultiChallengeWETH.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT + +/// @custom:authors: [@shotaronowhere] +/// @custom:reviewers: [] +/// @custom:auditors: [] +/// @custom:bounties: [] +/// @custom:deployments: [] + +pragma solidity 0.8.18; + +import "../../interfaces/tokens/gnosis/IWETH.sol"; + +/// @dev Vea Inbox Calldata Optimization. +/// No function selector required, only fallback function. +contract veaOutboxMultiChallengeWETH { + address public immutable veaOutboxOnL1; + IWETH public immutable weth; + uint256 public immutable deposit; + + constructor(address _veaOutboxOnL1, address _weth, uint256 _deposit) { + veaOutboxOnL1 = _veaOutboxOnL1; + weth = IWETH(_weth); + require(weth.approve(_veaOutboxOnL1, type(uint256).max), "Failed WETH approve."); + deposit = _deposit; + } + + function multiChallenge(bytes[] calldata datas) external payable { + require(weth.transferFrom(msg.sender, address(this), deposit), "Failed WETH transfer."); + for (uint256 i; i < datas.length; i++) { + veaOutboxOnL1.call(datas[i]); + } + uint256 balance = weth.balanceOf(address(this)); + if (balance > 0) weth.transfer(msg.sender, balance - 1); + } +} diff --git a/contracts/src/utils/veaInboxTouch.sol b/contracts/src/utils/veaInboxTouch.sol new file mode 100644 index 00000000..1e82f848 --- /dev/null +++ b/contracts/src/utils/veaInboxTouch.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: MIT + +/// @custom:authors: [@shotaronowhere] +/// @custom:reviewers: [] +/// @custom:auditors: [] +/// @custom:bounties: [] +/// @custom:deployments: [] + +pragma solidity 0.8.18; + +import "../interfaces/inboxes/IVeaInbox.sol"; + +/// @dev Vea Inbox Calldata Optimization. +/// No function selector required, only fallback function. +contract veaInboxTouch { + IVeaInbox public immutable veaInbox; + + constructor(IVeaInbox _veaInbox) { + veaInbox = _veaInbox; + } + + function touch(uint256 random) external payable { + veaInbox.sendMessage(0x0000000000000000000000000000000000000000, 0x00000000, abi.encode(random)); + veaInbox.saveSnapshot(); + } +} From 1d6c378ba97b1a85a5227c6bacd106753470e538 Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Thu, 12 Oct 2023 17:39:32 -0700 Subject: [PATCH 23/58] feat: watcher --- contracts/README.md | 32 +- contracts/hardhat.config.ts | 2 +- validator-cli/package.json | 1 + validator-cli/src/ArbToEth/watcher.ts | 183 +++-- validator-cli/src/ArbToEth/watcherArbToEth.ts | 584 +++++++++++++++ .../src/ArbToEth/watcherArbToGnosis.ts | 688 ++++++++++++++++++ validator-cli/src/utils/ethers.ts | 27 +- yarn.lock | 10 + 8 files changed, 1454 insertions(+), 73 deletions(-) create mode 100644 validator-cli/src/ArbToEth/watcherArbToEth.ts create mode 100644 validator-cli/src/ArbToEth/watcherArbToGnosis.ts diff --git a/contracts/README.md b/contracts/README.md index d8c528e9..2870e910 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -10,28 +10,28 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments #### Goerli -- [RouterArbToGnosisDevnet](https://goerli.etherscan.io/address/0xEC337Fb9977848D0784dC4F01A69c237691755E0) -- [RouterArbToGnosisTestnet](https://goerli.etherscan.io/address/0x1224E83DF410b43A65ed3e375a6442813B1aea14) -- [RouterGnosisToArbDevnet](https://goerli.etherscan.io/address/0xb7d2C76641B21718cC8A0b595be438c863A6e031) -- [RouterGnosisToArbTestnet](https://goerli.etherscan.io/address/0x84de475fed07406aA3B05248f1a7b0Fca11DA012) -- [VeaOutboxArbToEthDevnet](https://goerli.etherscan.io/address/0x3D9356FF595C2151513DFc520380d5A178224564) -- [VeaOutboxArbToEthTestnet](https://goerli.etherscan.io/address/0x4738A566706eDd30Fe175e20eDDd21c5c7bD79Ea) +- [RouterArbToGnosisDevnet](https://goerli.etherscan.io/address/0x6164EA58a1f5359D2E54ea8eB9e5971B7C8dB0f1) +- [RouterArbToGnosisTestnet](https://goerli.etherscan.io/address/0x5Df4452965cd2ff87f205AE5b10b5d0F65223116) +- [RouterGnosisToArbDevnet](https://goerli.etherscan.io/address/0xcC196cC90bD30109E39400817e6ef63A1b744659) +- [RouterGnosisToArbTestnet](https://goerli.etherscan.io/address/0x6bC3C7Bcd2C6C2d8BFEAA3642c425cAE25F7fe17) +- [VeaOutboxArbToEthDevnet](https://goerli.etherscan.io/address/0xDa528e9BE20a8A22437D28Ed6C63bb6d00Ad0032) +- [VeaOutboxArbToEthTestnet](https://goerli.etherscan.io/address/0xDF216C98773DA7998EE49AE8106BFe9724cf2944) #### Arbitrum Goerli -- [VeaInboxArbToEthDevnet](https://goerli.arbiscan.io/address/0x935feC4B0bc8f48884f7315153839859832f385b) -- [VeaInboxArbToEthTestnet](https://goerli.arbiscan.io/address/0x0c45C5A1925085fF0672C1052f0b79D5e3ac2A78) -- [VeaInboxArbToGnosisDevnet](https://goerli.arbiscan.io/address/0x8179EBCA5D2EA4152ac61A5BCA7a1dc68f8BbF54) -- [VeaInboxArbToGnosisTestnet](https://goerli.arbiscan.io/address/0xdc201e4Ab6a25A17C1731D8bB7E56f89D0B86486) -- [VeaOutboxGnosisToArbDevnet](https://goerli.arbiscan.io/address/0x8Da07C6D68F17d7BbC8B42D59Bc9EEE90e9dD621) -- [VeaOutboxGnosisToArbTestnet](https://goerli.arbiscan.io/address/0x62581B897330CA4044C4db79Ebe96ca230569492) +- [VeaInboxArbToEthDevnet](https://goerli.arbiscan.io/address/0xE99C6177CD8731DE6F108443CcAf7449074f6aED) +- [VeaInboxArbToEthTestnet](https://goerli.arbiscan.io/address/0x95100f56d040fD48AA52dcDD05A9Fc477d55bd2E) +- [VeaInboxArbToGnosisDevnet](https://goerli.arbiscan.io/address/0xf38b8739635d2F4cb38Bd453453AB9d41fD16300) +- [VeaInboxArbToGnosisTestnet](https://goerli.arbiscan.io/address/0x1418a26Ca3A73a0EA3aBf943E8B524bEFD7C96cD) +- [VeaOutboxGnosisToArbDevnet](https://goerli.arbiscan.io/address/0xE14fA0B3910CB0853E811375B9a6fcEEE32db521) +- [VeaOutboxGnosisToArbTestnet](https://goerli.arbiscan.io/address/0x18AB70ea8dBc7072D1C1C90bA0bC1547d92198CF) #### Chiado -- [VeaInboxGnosisToArbDevnet](https://blockscout.com/gnosis/chiado/address/0x9F4407785DFf95c08Bf9a0d9d4A5a164C48eC5CB) -- [VeaInboxGnosisToArbTestnet](https://blockscout.com/gnosis/chiado/address/0x8Bf88E6474d93bD2Dc0d76CB3BE8809c6BB84148) -- [VeaOutboxArbToGnosisDevnet](https://blockscout.com/gnosis/chiado/address/0xb0263478A46d885D715B01fbac745500B9576634) -- [VeaOutboxArbToGnosisTestnet](https://blockscout.com/gnosis/chiado/address/0xE8ea62d3a4F06301016b9C23Ace108F3D8027839) +- [VeaInboxGnosisToArbDevnet](https://blockscout.com/gnosis/chiado/address/0xc0804E4FcEEfD958050356A429DAaaA71aA39385) +- [VeaInboxGnosisToArbTestnet](https://blockscout.com/gnosis/chiado/address/0xC21c20a719fAc23c54c336FA0E16a0CFdC4baA00) +- [VeaOutboxArbToGnosisDevnet](https://blockscout.com/gnosis/chiado/address/0x9481b3A49ac67d03D9022E6200eFD81850BADDB4) +- [VeaOutboxArbToGnosisTestnet](https://blockscout.com/gnosis/chiado/address/0x931FA807020231bCE1340Be8E1e5054207BbAFEd) ## Getting Started diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index 0ceedb6c..57daa65d 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -104,7 +104,7 @@ const config: HardhatUserConfig = { }, verify: { etherscan: { - apiUrl: "https://blockscout.com/gnosis/chiado", + apiUrl: "https://gnosis-chiado.blockscout.com", }, }, }, diff --git a/validator-cli/package.json b/validator-cli/package.json index f6c18f62..1bcf1eb9 100644 --- a/validator-cli/package.json +++ b/validator-cli/package.json @@ -16,6 +16,7 @@ }, "dependencies": { "@arbitrum/sdk": "^3.1.2", + "@flashbots/ethers-provider-bundle": "^0.6.2", "@kleros/vea-contracts": "workspace:^", "@typechain/ethers-v5": "^10.2.0", "dotenv": "^16.0.3", diff --git a/validator-cli/src/ArbToEth/watcher.ts b/validator-cli/src/ArbToEth/watcher.ts index d25c0403..f2229d72 100644 --- a/validator-cli/src/ArbToEth/watcher.ts +++ b/validator-cli/src/ArbToEth/watcher.ts @@ -1,70 +1,149 @@ -import { getVeaOutboxArbToEthProvider, getVeaInboxArbToEth } from "../utils/ethers"; -import { JsonRpcProvider } from "@ethersproject/providers"; +import { + VeaOutboxArbToEth__factory, + VeaInboxArbToEth__factory, + VeaInboxTouch__factory, +} from "@kleros/vea-contracts/typechain-types"; +import { WebSocketProvider, JsonRpcProvider } from "@ethersproject/providers"; +import { Wallet } from "@ethersproject/wallet"; +import { FlashbotsBundleProvider } from "@flashbots/ethers-provider-bundle"; +import { BigNumber } from "ethers"; +import { TransactionRequest } from "@ethersproject/abstract-provider"; require("dotenv").config(); const watch = async () => { - const l1provider = new JsonRpcProvider(process.env.RPC_VEAOUTBOX); + // connect to RPCs + const providerEth = new WebSocketProvider(process.env.RPC_ETH_WSS); + const providerArb = new JsonRpcProvider(process.env.RPC_ARB); + const signerArb = new Wallet(process.env.PRIVATE_KEY, providerArb); + const signerEth = new Wallet(process.env.PRIVATE_KEY, providerEth); + // `authSigner` is an Ethereum private key that does NOT store funds and is NOT your bot's primary key. + // This is an identifying key for signing payloads to establish reputation and whitelisting + // In production, this should be used across multiple bundles to build relationship. In this example, we generate a new wallet each time + const authSigner = new Wallet(process.env.FLASHBOTS_RELAY_SIGNING_KEY); - const veaOutbox = getVeaOutboxArbToEthProvider(process.env.VEAOUTBOX_ADDRESS, process.env.PRIVATE_KEY, l1provider); + // Flashbots provider requires passing in a standard provider + const flashbotsProvider = await FlashbotsBundleProvider.create( + providerEth, // a normal ethers.js provider, to perform gas estimiations and nonce lookups + authSigner, // ethers.js signer wallet, only for signing request payloads, not transactions + "https://relay-goerli.flashbots.net/", + "goerli" + ); - const veaInbox = getVeaInboxArbToEth(process.env.VEAINBOX_ADDRESS, process.env.PRIVATE_KEY, process.env.RPC_VEAINBOX); - - const deposit = await veaOutbox.deposit(); + const veaInbox = VeaInboxArbToEth__factory.connect(process.env.VEAINBOX_ARB_TO_ETH_ADDRESS, signerArb); + const veaOutbox = VeaOutboxArbToEth__factory.connect(process.env.VEAOUTBOX_ARB_TO_ETH_ADDRESS, signerEth); + const veaInboxTouch = VeaInboxTouch__factory.connect(process.env.VEAINBOX_ARB_TO_ETH_TOUCH_ADDRESS, signerArb); const epochPeriod = (await veaOutbox.epochPeriod()).toNumber(); - const claimDelay = (await veaOutbox.claimDelay()).toNumber(); - const challengePeriod = (await veaOutbox.challengePeriod()).toNumber(); + const deposit = await veaOutbox.deposit(); + const snapshotsFinalized = new Map(); - const currentBlockNumber = await l1provider.getBlockNumber(); - const challengableTimeStart = Math.floor(Date.now() / 1000) - challengePeriod; - const challengableBlockStart = currentBlockNumber - Math.ceil((challengePeriod * 2) / 12); + let epochSnapshotFinalized: number = 0; - const logs = await l1provider.getLogs({ - address: process.env.VEAOUTBOX_ADDRESS, - topics: veaOutbox.filters.Claimed(null, null).topics, - fromBlock: challengableBlockStart, - }); + //const gasEstimate = await retryOperation(() => veaOutbox.estimateGas["challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))"](epoch, claim, { value: deposit }), 1000, 10) as BigNumber; + const gasEstimate = 35000; // save time by hardcoding the gas estimate + + // deposit / 2 is the profit for challengers + // the initial challenge txn is roughly 1/3 of the cost of completing the challenge process. + const maxFeePerGasProfitable = deposit.div(gasEstimate * 3 * 2); + + veaOutbox.on(veaOutbox.filters["Claimed(address,uint256,bytes32)"](), async (claimer, epoch, stateRoot, event) => { + console.log("Claimed", claimer, epoch, stateRoot); + const block = event.getBlock(); - for (let i = 0; i < logs.length; i++) { - const log = logs[i]; - const claimedTimestamp = (await l1provider.getBlock(log.blockNumber)).timestamp; - console.log({ - stateRoot: log.data, - claimer: "0x" + log.topics[1].substring(26), - timestamp: claimedTimestamp, - blocknumber: log.blockNumber, - honest: "0", + var claim = { + stateRoot: stateRoot, + claimer: claimer, + timestampClaimed: (await block).timestamp, + timestampVerification: 0, + blocknumberVerification: 0, + honest: 0, challenger: "0x0000000000000000000000000000000000000000", - }); - if (claimedTimestamp < challengableTimeStart) { - continue; - } else { - const claimedStateRoot = log.data; - const claimedEpoch = Math.floor((claimedTimestamp - claimDelay) / epochPeriod); - const inboxStateRoot = await veaInbox.snapshots(claimedEpoch); - if (claimedStateRoot !== inboxStateRoot) { - console.log(`Challenging claim ${claimedStateRoot} at epoch ${claimedEpoch}.`); - const unchallengedClaim = { - stateRoot: claimedStateRoot, - claimer: "0x" + log.topics[1].substring(26), - timestamp: claimedTimestamp, - blocknumber: log.blockNumber, - honest: "0", - challenger: "0x0000000000000000000000000000000000000000", + }; + + if (epoch.toNumber() > epochSnapshotFinalized) { + // Math.random() is not cryptographically secure, but it's good enough for this purpose. + // can't set the seed, but multiplying by an unpredictable number (timestamp in ms) should be good enough. + const txnTouch = veaInboxTouch.touch(Math.floor(Math.random() * Date.now())); + + (await txnTouch).wait(); + + const snapshot = await veaInbox.snapshots(epoch); + + if (snapshot !== stateRoot) { + const data = veaOutbox.interface.encodeFunctionData( + "challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))", + [epoch, claim] + ); + + const tx: TransactionRequest = { + from: signerEth.address, + to: veaOutbox.address, + data: data, + value: deposit, + maxFeePerGas: maxFeePerGasProfitable, + maxPriorityFeePerGas: BigNumber.from(66666666667), // 66.7 gwei + gasLimit: BigNumber.from(35000), }; - const unchallengedClaimHash = await veaOutbox.hashClaim(unchallengedClaim); - const claimHash = await veaOutbox.claimHashes(claimedEpoch); - console.log(unchallengedClaim); - console.log(unchallengedClaimHash); - console.log(claimHash); - console.log(claimedEpoch); - if (unchallengedClaimHash == claimHash) { - const txn = await veaOutbox.challenge(claimedEpoch, unchallengedClaim, { value: deposit }); - console.log(`Challenge Txn: ${txn.hash}`); - } + const privateTx = { + transaction: tx, + signer: signerEth, + }; + const res = await flashbotsProvider.sendPrivateTransaction(privateTx); + console.log(res); } + } else if (snapshotsFinalized.get(epoch.toNumber()) !== stateRoot) { + const txnChallenge = veaOutbox["challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))"]( + epoch, + claim, + { + value: deposit, + gasLimit: gasEstimate, + maxFeePerGas: maxFeePerGasProfitable, + maxPriorityFeePerGas: BigNumber.from(66666666667), // 66.7 gwei + } + ); + console.log("Challenge txn", txnChallenge); + const txnReceiptChallenge = (await txnChallenge).wait(); + console.log("Challenge", txnReceiptChallenge); } + }); + + epochSnapshotFinalized = Math.floor((await providerArb.getBlock("latest")).timestamp / epochPeriod) - 2; + + while (1) { + const blockLatestL2 = await providerArb.getBlock("latest"); + const timeL2 = blockLatestL2.timestamp; + const epochSnapshotFinalizedOld = epochSnapshotFinalized; + epochSnapshotFinalized = Math.floor(timeL2 / epochPeriod) - 1; + for (let epoch = epochSnapshotFinalizedOld + 1; epoch <= epochSnapshotFinalized; epoch++) { + const snapshot = await veaInbox.snapshots(epoch); + snapshotsFinalized.set(epoch, snapshot); + console.log("Snapshot finalized", epoch, snapshot); + } + await wait(3000); } }; +const wait = (ms) => new Promise((r) => setTimeout(r, ms)); + +const retryOperation = (operation, delay, retries) => + new Promise((resolve, reject) => { + return operation() + .then(resolve) + .catch((reason) => { + if (retries > 0) { + // log retry + console.log("retrying", retries); + return wait(delay) + .then(retryOperation.bind(null, operation, delay, retries - 1)) + .then(resolve) + .catch(reject); + } + return reject(reason); + }); + }); + +(async () => { + await watch(); +})(); export default watch; diff --git a/validator-cli/src/ArbToEth/watcherArbToEth.ts b/validator-cli/src/ArbToEth/watcherArbToEth.ts new file mode 100644 index 00000000..8468bc6e --- /dev/null +++ b/validator-cli/src/ArbToEth/watcherArbToEth.ts @@ -0,0 +1,584 @@ +import { getVeaOutboxArbToEthProvider, getVeaInboxArbToEthProvider } from "../utils/ethers"; +import { JsonRpcProvider } from "@ethersproject/providers"; +import { getL2Network } from "@arbitrum/sdk"; +import { NODE_INTERFACE_ADDRESS } from "@arbitrum/sdk/dist/lib/dataEntities/constants"; +import { NodeInterface__factory } from "@arbitrum/sdk/dist/lib/abi/factories/NodeInterface__factory"; +import { SequencerInbox__factory } from "@arbitrum/sdk/dist/lib/abi/factories/SequencerInbox__factory"; +import { BigNumber, ContractTransaction } from "ethers"; +import { Block, Log, TransactionReceipt } from "@ethersproject/abstract-provider"; +import { SequencerInbox } from "@arbitrum/sdk/dist/lib/abi/SequencerInbox"; + +require("dotenv").config(); + +// https://github.com/prysmaticlabs/prysm/blob/493905ee9e33a64293b66823e69704f012b39627/config/params/mainnet_config.go#L103 +const slotsPerEpochEth = 32; +const secondsPerSlotEth = 12; + +const watch = async () => { + // connect to RPCs + const providerEth = new JsonRpcProvider(process.env.RPC_ETH); + const providerArb = new JsonRpcProvider(process.env.RPC_ARB); + + // use typechain generated contract factories for vea outbox and inbox + const veaOutbox = getVeaOutboxArbToEthProvider( + process.env.VEAOUTBOX_ARB_TO_ETH_ADDRESS, + process.env.PRIVATE_KEY, + providerEth + ); + const veaInbox = getVeaInboxArbToEthProvider( + process.env.VEAINBOX_ARB_TO_ETH_ADDRESS, + process.env.PRIVATE_KEY, + providerEth + ); + + // get Arb sequencer params + const l2Network = await getL2Network(providerArb); + const sequencer = SequencerInbox__factory.connect(l2Network.ethBridge.sequencerInbox, providerEth); + const maxDelaySeconds = ( + (await retryOperation(() => sequencer.maxTimeVariation(), 1000, 10))[1] as BigNumber + ).toNumber(); + + // get vea outbox params + const deposit = (await retryOperation(() => veaOutbox.deposit(), 1000, 10)) as BigNumber; + const epochPeriod = ((await retryOperation(() => veaOutbox.epochPeriod(), 1000, 10)) as BigNumber).toNumber(); + const sequencerDelayLimit = ( + (await retryOperation(() => veaOutbox.sequencerDelayLimit(), 1000, 10)) as BigNumber + ).toNumber(); + + // * + // calculate epoch range to check claims on Eth + // * + + // Finalized Eth block provides an 'anchor point' for the vea epochs in the outbox that are claimable + const blockFinalizedEth: Block = (await retryOperation(() => providerEth.getBlock("finalized"), 1000, 10)) as Block; + + const coldStartBacklog = 7 * 24 * 60 * 60; // when starting the watcher, specify an extra backlog to check + + // When Sequencer is malicious, even when L1 is finalized, L2 state might be unknown for up to sequencerDelayLimit + epochPeriod. + const L2SyncPeriod = sequencerDelayLimit + epochPeriod; + // When we start the watcher, we need to go back far enough to check for claims which may have been pending L2 state finalization. + const veaEpochOutboxWacthLowerBound = + Math.floor((blockFinalizedEth.timestamp - L2SyncPeriod - coldStartBacklog) / epochPeriod) - 2; + + // ETH / Gnosis POS assumes synchronized clocks + // using local time as a proxy for true "latest" L1 time + const timeLocal = Math.floor(Date.now() / 1000); + + let veaEpochOutboxClaimableNow = Math.floor(timeLocal / epochPeriod) - 1; + + // only past epochs are claimable, hence shift by one here + const veaEpochOutboxRange = veaEpochOutboxClaimableNow - veaEpochOutboxWacthLowerBound + 1; + const veaEpochOutboxCheckClaimsRangeArray: number[] = new Array(veaEpochOutboxRange) + .fill(veaEpochOutboxWacthLowerBound) + .map((el, i) => el + i); + const challengeTxnHashes = new Map(); + + console.log( + "cold start: checking past claim history from epoch " + + veaEpochOutboxCheckClaimsRangeArray[0] + + " to the current claimable epoch " + + veaEpochOutboxCheckClaimsRangeArray[veaEpochOutboxCheckClaimsRangeArray.length - 1] + ); + + while (true) { + // returns the most recent finalized arbBlock found on Ethereum and info about finality issues on Eth. + // if L1 is experiencing finalization problems, returns the latest arbBlock found in the latest L1 block + const [blockArbFoundOnL1, blockFinalizedEth, finalityIssueFlagEth] = await getBlocksAndCheckFinality( + providerEth, + providerArb, + sequencer, + maxDelaySeconds + ); + + if (!blockArbFoundOnL1) { + console.error("Critical Error: Arbitrum block is not found on L1."); + return; + } + + // claims can be made for the previous epoch, hence + // if an epoch is 2 or more epochs behind the L1 finalized epoch, no further claims can be made, we call this 'veaEpochOutboxFinalized' + const veaEpochOutboxClaimableFinalized = Math.floor(blockFinalizedEth.timestamp / epochPeriod) - 2; + + const timeLocal = Math.floor(Date.now() / 1000); + const timeEth = finalityIssueFlagEth ? timeLocal : blockFinalizedEth.timestamp; + + // if the sequencer is offline for maxDelaySeconds, the l2 timestamp in the next block is clamp to the current L1 timestamp - maxDelaySeconds + const l2Time = Math.max(blockArbFoundOnL1.timestamp, blockFinalizedEth.timestamp - maxDelaySeconds); + + // the latest epoch that is finalized from the L2 POV + // this depends on the L2 clock + const veaEpochInboxFinalized = Math.floor(l2Time / epochPeriod) - 1; + + const veaEpochOutboxClaimableNowOld = veaEpochOutboxClaimableNow; + veaEpochOutboxClaimableNow = Math.floor(timeEth / epochPeriod) - 1; + const veaEpochsOutboxClaimableNew: number[] = new Array(veaEpochOutboxClaimableNow - veaEpochOutboxClaimableNowOld) + .fill(veaEpochOutboxClaimableNowOld + 1) + .map((el, i) => el + i); + + veaEpochOutboxCheckClaimsRangeArray.concat(veaEpochsOutboxClaimableNew); + + if (veaEpochOutboxCheckClaimsRangeArray.length == 0) { + console.log("no claims to check"); + const timeToNextEpoch = epochPeriod - (Math.floor(Date.now() / 1000) % epochPeriod); + console.log("waiting till next epoch in " + timeToNextEpoch + " seconds. . ."); + await wait(timeToNextEpoch); + } + + for (let index = 0; index < veaEpochOutboxCheckClaimsRangeArray.length; index++) { + const veaEpochOutboxCheck = veaEpochOutboxCheckClaimsRangeArray[index]; + console.log("checking claim for epoch " + veaEpochOutboxCheck); + // if L1 experiences finality failure, we use the latest block + const blockTagEth = timeEth ? "latest" : "finalized"; + const claimHash = (await retryOperation( + () => veaOutbox.claimHashes(veaEpochOutboxCheck, { blockTag: blockTagEth }), + 1000, + 10 + )) as string; + + // no claim + if (claimHash == "0x0000000000000000000000000000000000000000000000000000000000000000") { + // if epoch is not claimable anymore, remove from array + if (veaEpochOutboxCheck <= veaEpochOutboxClaimableFinalized) { + console.log( + "no claim for epoch " + + veaEpochOutboxCheck + + " and the vea epoch in the outbox is finalized (can no longer be claimed)." + ); + veaEpochOutboxCheckClaimsRangeArray.splice(index, 1); + index--; + continue; + } else { + console.log( + "no claim for epoch " + + veaEpochOutboxCheck + + " and the vea epoch in the outbox is not finalized (can still be claimed)." + ); + } + } else { + // claim exists + + console.log("claim exists for epoch " + veaEpochOutboxCheck); + + let blockNumberOutboxLowerBound: number; + + // to query event perpformantly, we limit the block range with the heuristic that. delta blocknumber <= delta timestamp / secondsPerSlot + if (veaEpochOutboxCheck <= veaEpochOutboxClaimableFinalized) { + blockNumberOutboxLowerBound = + blockFinalizedEth.number - + Math.ceil(((veaEpochOutboxClaimableFinalized - veaEpochOutboxCheck + 2) * epochPeriod) / secondsPerSlotEth); + } else { + blockNumberOutboxLowerBound = blockFinalizedEth.number - Math.ceil(epochPeriod / secondsPerSlotEth); + } + + // get claim data + const logClaimed: Log = ( + await retryOperation( + () => + providerEth.getLogs({ + address: process.env.VEAOUTBOX_ARB_TO_ETH_ADDRESS, + topics: veaOutbox.filters.Claimed(null, [veaEpochOutboxCheck], null).topics, + fromBlock: blockNumberOutboxLowerBound, + toBlock: blockTagEth, + }), + 1000, + 10 + ) + )[0] as Log; + + // check the snapshot on the inbox on Arbitrum + // only check the state from L1 POV, don't trust the sequencer feed. + // arbBlock is a recent (finalized or latest if there are finality problems) block found posted on L1 + const claimSnapshot = (await retryOperation( + () => veaInbox.snapshots(veaEpochOutboxCheck, { blockTag: blockArbFoundOnL1.number }), + 1000, + 10 + )) as string; + + // claim differs from snapshot + if (logClaimed.data != claimSnapshot) { + console.log("claimed merkle root mismatch for epoch " + veaEpochOutboxCheck); + + // if Eth is finalizing but sequencer is malfunctioning, we can wait until the snapshot is considered finalized (L2 time is in the next epoch) + if (!finalityIssueFlagEth && veaEpochInboxFinalized < veaEpochOutboxCheck) { + // note as long as L1 does not have finalization probelms, sequencer could still be malfunctioning + console.log("L2 snapshot is not yet finalized, waiting for finalization to determine challengable status"); + } else { + console.log("claim " + veaEpochOutboxCheck + " is challengable"); + + const timestampClaimed = ( + (await retryOperation(() => providerEth.getBlock(logClaimed.blockNumber), 1000, 10)) as Block + ).timestamp; + + var claim = { + stateRoot: logClaimed.data, + claimer: "0x" + logClaimed.topics[1].substring(26), + timestampClaimed: timestampClaimed, + timestampVerification: 0, + blocknumberVerification: 0, + honest: 0, + challenger: "0x0000000000000000000000000000000000000000", + }; + + const claimHashCalculated = (await retryOperation( + () => veaOutbox.hashClaim(claim, { blockTag: blockTagEth }), + 1000, + 10 + )) as string; + if (claimHashCalculated != claimHash) { + // either claim is already challenged + // or claim is in verification or verified + + /* + + we want to reconstruct the struct below from events, since only the hash is stored onchain + + struct Claim { + bytes32 stateRoot; + address claimer; + uint32 timestampClaimed; + uint32 timestampVerification; + uint32 blocknumberVerification; + Party honest; + address challenger; + } + + */ + const logChallenges = (await retryOperation( + () => + providerEth.getLogs({ + address: process.env.VEAOUTBOX_ARB_TO_ETH_ADDRESS, + topics: veaOutbox.filters.Challenged(veaEpochOutboxCheck, null).topics, + fromBlock: blockNumberOutboxLowerBound, + toBlock: blockTagEth, + }), + 1000, + 10 + )) as Log[]; + + // if already challenged, no action needed + + // if not challenged, keep checking all claim struct variables + if (logChallenges.length == 0) { + const logVerficiationStarted = (await retryOperation( + () => + providerEth.getLogs({ + address: process.env.VEAOUTBOX_ARB_TO_ETH_ADDRESS, + topics: veaOutbox.filters.VerificationStarted(veaEpochOutboxCheck).topics, + fromBlock: blockNumberOutboxLowerBound, + toBlock: blockTagEth, + }), + 1000, + 10 + )) as Log[]; + + if (logVerficiationStarted.length > 1) { + const timestampVerification = ( + (await retryOperation( + () => providerEth.getBlock(logVerficiationStarted[logVerficiationStarted.length - 1].blockNumber), + 1000, + 10 + )) as Block + ).timestamp; + + claim.timestampVerification = timestampVerification; + claim.blocknumberVerification = logVerficiationStarted[logVerficiationStarted.length - 1].blockNumber; + + const claimHashCalculated = (await retryOperation( + () => veaOutbox.hashClaim(claim), + 1000, + 10 + )) as string; + if (claimHashCalculated != claimHash) { + claim.honest = 1; + const claimHashCalculated = (await retryOperation( + () => veaOutbox.hashClaim(claim), + 1000, + 10 + )) as string; + if (claimHashCalculated != claimHash) { + console.error( + "Invalid claim hash calculated for epoch " + + veaEpochOutboxCheck + + " claim " + + claimHashCalculated + + " expected " + + claimHash + ); + continue; + } + } + } + } else { + console.log("claim " + veaEpochOutboxCheck + " is already challenged"); + if (logChallenges[0].blockNumber < blockFinalizedEth.number) { + veaEpochOutboxCheckClaimsRangeArray.splice(index, 1); + index--; + // the challenge is finalized, no further action needed + console.log("challenge is finalized"); + continue; + } + continue; + } + } + + if (challengeTxnHashes[index] != "") { + const txnReceipt = (await retryOperation( + () => providerEth.getTransactionReceipt(challengeTxnHashes[index]), + 10, + 1000 + )) as TransactionReceipt; + if (!txnReceipt) { + console.log("challenge txn " + challengeTxnHashes[index] + " not mined yet"); + continue; + } + const blockNumber = txnReceipt.blockNumber; + const challengeBlock = (await retryOperation(() => providerEth.getBlock(blockNumber), 1000, 10)) as Block; + if (challengeBlock.number < blockFinalizedEth.number) { + veaEpochOutboxCheckClaimsRangeArray.splice(index, 1); + index--; + // the challenge is finalized, no further action needed + console.log("challenge is finalized"); + continue; + } + } + + const gasEstimate = (await retryOperation( + () => + veaOutbox.estimateGas["challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))"]( + veaEpochOutboxCheck, + claim, + { value: deposit } + ), + 1000, + 10 + )) as BigNumber; + + // deposit / 2 is the profit for challengers + // the initial challenge txn is roughly 1/3 of the cost of completing the challenge process. + const maxFeePerGasProfitable = deposit.div(gasEstimate.mul(3 * 2)); + + // priority fee must be higher than MEV to be competitive + // https://boost-relay.flashbots.net/?order_by=-value + // eg there's never been > 100 eth in MEV in a block + // so 100 eth / 15000000 gas per block = 6667 gwei per gas is competitive + // Set this more modestly if you want to be more conservative + const maxPriorityFeePerGasMEV = BigNumber.from("6667000000000"); // 6667 gwei + + const txnChallenge = (await retryOperation( + () => + veaOutbox["challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))"]( + veaEpochOutboxCheck, + claim, + { + maxFeePerGas: maxFeePerGasProfitable, + maxPriorityFeePerGas: maxPriorityFeePerGasMEV, + value: deposit, + } + ), + 1000, + 10 + )) as ContractTransaction; + + txnChallenge.nonce; + console.log("challenging claim for epoch " + veaEpochOutboxCheck + " with txn hash " + txnChallenge.hash); + } + } else { + console.log("claim hash matches snapshot for epoch " + veaEpochOutboxCheck); + if ( + veaEpochOutboxCheck <= veaEpochOutboxClaimableFinalized && + veaEpochOutboxCheck >= veaEpochInboxFinalized + ) { + veaEpochOutboxCheckClaimsRangeArray.splice(index, 1); + index--; + continue; + } + } + } + } + + // 3 second delay for potential block and attestation propogation + console.log("waiting 3 seconds for potential block and attestation propogation. . ."); + await wait(1000 * 3); + } +}; + +const wait = (ms) => new Promise((r) => setTimeout(r, ms)); + +const retryOperation = (operation, delay, retries) => + new Promise((resolve, reject) => { + return operation() + .then(resolve) + .catch((reason) => { + if (retries > 0) { + // log retry + console.log("retrying", retries); + return wait(delay) + .then(retryOperation.bind(null, operation, delay, retries - 1)) + .then(resolve) + .catch(reject); + } + return reject(reason); + }); + }); + +const getBlocksAndCheckFinality = async ( + EthProvider: JsonRpcProvider, + ArbProvider: JsonRpcProvider, + sequencer: SequencerInbox, + maxDelaySeconds: number +): Promise<[Block, Block, Boolean] | undefined> => { + const blockFinalizedArb = (await retryOperation(() => ArbProvider.getBlock("finalized"), 1000, 10)) as Block; + const blockFinalizedEth = (await retryOperation(() => EthProvider.getBlock("finalized"), 1000, 10)) as Block; + + const finalityBuffer = 300; // 5 minutes, allows for network delays + const maxFinalityTimeSecondsEth = (slotsPerEpochEth * 3 - 1) * secondsPerSlotEth; // finalization after 2 justified epochs + + let finalityIssueFlagArb = false; + let finalityIssueFlagEth = false; + + // check latest arb block to see if there are any sequencer issues + let blockLatestArb = (await retryOperation(() => ArbProvider.getBlock("latest"), 1000, 10)) as Block; + + // to performantly query the sequencerInbox's SequencerBatchDelivered event on Eth, we limit the block range + // we use the heuristic that. delta blocknumber <= delta timestamp / secondsPerSlot + // Arb: -----------x <-- Finalized + // || + // \/ + // Eth: -------------------------x <-- Finalized + // /\ + // ||<----------------> <-- Math.floor((timeDiffBlockFinalizedArbL1 + maxDelaySeconds) / secondsPerSlotEth) + // fromBlockEth + + const timeDiffBlockFinalizedArbL1 = blockFinalizedEth.timestamp - blockFinalizedArb.timestamp; + const fromBlockEthFinalized = + blockFinalizedEth.number - Math.floor((timeDiffBlockFinalizedArbL1 + maxDelaySeconds) / secondsPerSlotEth); + + let blockFinalizedArbToL1Block = await ArbBlockToL1Block( + ArbProvider, + sequencer, + blockFinalizedArb, + fromBlockEthFinalized, + false + ); + + if (!blockFinalizedArbToL1Block) { + console.error("Arbitrum finalized block is not found on L1."); + finalityIssueFlagArb = true; + } else if (Math.abs(blockFinalizedArbToL1Block[0].timestamp - blockFinalizedArb.timestamp) > 1800) { + // The L2 timestamp is drifted from the L1 timestamp in which the L2 block is posted. + console.error("Finalized L2 block time is more than 30 min drifted from L1 clock."); + } + + // blockLatestArbToL1Block[0] is the L1 block, blockLatestArbToL1Block[1] is the L2 block (fallsback on latest L2 block if L2 block is not found on L1) + let blockLatestArbToL1Block = await ArbBlockToL1Block( + ArbProvider, + sequencer, + blockLatestArb, + fromBlockEthFinalized, + true + ); + + if (finalityIssueFlagArb && !blockLatestArbToL1Block) { + console.error("Arbitrum latest block is not found on L1."); + // this means some issue in the arbitrum node implementation (very bad) + return undefined; + } + + // is blockLatestArb is not found on L1, ArbBlockToL1Block fallsback on the latest L2 block found on L1 + if (blockLatestArbToL1Block[1] != blockLatestArb.number) { + blockLatestArb = (await retryOperation(() => ArbProvider.getBlock(blockLatestArbToL1Block[1]), 1000, 10)) as Block; + } + + // ETH POS assumes synchronized clocks + // using local time as a proxy for true "latest" L1 time + const localTimeSeconds = Math.floor(Date.now() / 1000); + + // The sequencer is completely offline + // Not necessarily a problem, but we should know about it + if (localTimeSeconds - blockLatestArbToL1Block[0].timestamp > 1800) { + console.error("Arbitrum sequencer is offline (from L1 'latest' POV) for atleast 30 minutes."); + } + + // The L2 timestamp is drifted from the L1 timestamp in which the L2 block is posted. + // Not necessarily a problem, but we should know about it + if (Math.abs(blockLatestArbToL1Block[0].timestamp - blockLatestArb.timestamp) > 1800) { + console.error("Latest L2 block time is more than 30 min drifted from L1 clock."); + console.error("L2 block time: " + blockLatestArb.timestamp); + console.error("L1 block time: " + blockLatestArbToL1Block[0].timestamp); + console.error("L2 block number: " + blockLatestArb.number); + } + + // Note: Using last finalized block as a proxy for the latest finalized epoch + // Using a BeaconChain RPC would be more accurate + if (localTimeSeconds - blockFinalizedEth.timestamp > maxFinalityTimeSecondsEth + finalityBuffer) { + console.error("Ethereum mainnet is not finalizing"); + finalityIssueFlagEth = true; + } + + if (blockFinalizedEth.number < blockFinalizedArbToL1Block[0].number) { + console.error( + "Arbitrum 'finalized' block is posted in an L1 block which is not finalized. Arbitrum node is out of sync with L1 node. It's recommended to use the same L1 RPC as the L1 node used by the Arbitrum node." + ); + finalityIssueFlagArb = true; + } + + // if L1 is experiencing finalization problems, we use the latest L2 block + // we could + const blockArbitrum = finalityIssueFlagArb || finalityIssueFlagEth ? blockLatestArb : blockFinalizedArb; + + return [blockArbitrum, blockFinalizedEth, finalityIssueFlagEth]; +}; + +const ArbBlockToL1Block = async ( + L2Provider: JsonRpcProvider, + sequencer: SequencerInbox, + L2Block: Block, + fromBlockEth: number, + fallbackLatest: boolean +): Promise<[Block, number] | undefined> => { + const nodeInterface = NodeInterface__factory.connect(NODE_INTERFACE_ADDRESS, L2Provider); + + let latestL2batchOnEth: number; + let latestL2BlockNumberOnEth: number; + let result = (await nodeInterface.functions + .findBatchContainingBlock(L2Block.number, { blockTag: "latest" }) + .catch((e) => { + // if L2 block is ahead of latest L2 batch on L1, we get an error + // catch the error and parse it to get the latest L2 batch on L1 + + // https://github.com/OffchainLabs/nitro/blob/af87ba29bc34c27bd4d85b3066a1cc3a759bab66/nodeInterface/NodeInterface.go#L544 + const errMsg = JSON.parse(JSON.parse(JSON.stringify(e)).error.body).error.message; + console.error(errMsg); + if (fallbackLatest) { + latestL2batchOnEth = parseInt(errMsg.split(" published in batch ")[1]); + latestL2BlockNumberOnEth = parseInt(errMsg.split(" is after latest on-chain block ")[1]); + } + })) as [BigNumber] & { batch: BigNumber }; + + if (!result && !fallbackLatest) return undefined; + + const batch = result?.batch?.toNumber() ?? latestL2batchOnEth; + const L2BlockNumberFallback = latestL2BlockNumberOnEth ?? L2Block.number; + /** + * We use the batch number to query the L1 sequencerInbox's SequencerBatchDelivered event + * then, we get its emitted transaction hash. + */ + const queryBatch = sequencer.filters.SequencerBatchDelivered(batch); + + const emittedEvent = (await retryOperation( + () => sequencer.queryFilter(queryBatch, fromBlockEth, "latest"), + 1000, + 10 + )) as any; + if (emittedEvent.length == 0) { + return undefined; + } + + const L1Block = (await retryOperation(() => emittedEvent[0].getBlock(), 1000, 10)) as Block; + return [L1Block, L2BlockNumberFallback]; +}; + +(async () => { + await watch(); +})(); +export default watch; diff --git a/validator-cli/src/ArbToEth/watcherArbToGnosis.ts b/validator-cli/src/ArbToEth/watcherArbToGnosis.ts new file mode 100644 index 00000000..2f254d5d --- /dev/null +++ b/validator-cli/src/ArbToEth/watcherArbToGnosis.ts @@ -0,0 +1,688 @@ +import { + getVeaOutboxArbToGnosisProvider, + getVeaInboxArbToGnosisProvider, + getWETHProvider, + getWalletRPC, +} from "../utils/ethers"; +import { JsonRpcProvider } from "@ethersproject/providers"; +import { getL2Network } from "@arbitrum/sdk"; +import { NODE_INTERFACE_ADDRESS } from "@arbitrum/sdk/dist/lib/dataEntities/constants"; +import { NodeInterface__factory } from "@arbitrum/sdk/dist/lib/abi/factories/NodeInterface__factory"; +import { SequencerInbox__factory } from "@arbitrum/sdk/dist/lib/abi/factories/SequencerInbox__factory"; +import { BigNumber, ContractTransaction, constants } from "ethers"; +import { Block, Log, TransactionReceipt, BlockWithTransactions } from "@ethersproject/abstract-provider"; +import { SequencerInbox } from "@arbitrum/sdk/dist/lib/abi/SequencerInbox"; + +require("dotenv").config(); + +interface ChallengeTxn { + timeSent: string; + timeRamp: number; +} + +// https://github.com/prysmaticlabs/prysm/blob/493905ee9e33a64293b66823e69704f012b39627/config/params/mainnet_config.go#L103 +const slotsPerEpochEth = 32; +const secondsPerSlotEth = 12; +// https://github.com/gnosischain/prysm-launch/blob/4163b9fddd57bcc07293d9a6d0723baec1fb0675/config/config.yml#L72 +const slotsPerEpochGnosis = 16; +const secondsPerSlotGnosis = 5; + +const veaOutboxAddress = process.env.VEAOUTBOX_ARB_TO_GNOSIS_ADDRESS; +const veaInboxAddress = process.env.VEAINBOX_ARB_TO_GNOSIS_ADDRESS; + +const watch = async () => { + // connect to RPCs + const providerEth = new JsonRpcProvider(process.env.RPC_ETH); + const providerGnosis = new JsonRpcProvider(process.env.RPC_GNOSIS); + const providerArb = new JsonRpcProvider(process.env.RPC_ARB); + + const watcherAddress = getWalletRPC(process.env.PRIVATE_KEY, providerGnosis).address; + + // use typechain generated contract factories for vea outbox and inbox + const veaOutbox = getVeaOutboxArbToGnosisProvider(veaOutboxAddress, process.env.PRIVATE_KEY, providerGnosis); + const veaInbox = getVeaInboxArbToGnosisProvider(veaInboxAddress, process.env.PRIVATE_KEY, providerArb); + + const wethAddress = (await retryOperation(() => veaOutbox.weth(), 1000, 10)) as string; + const weth = getWETHProvider(wethAddress, process.env.PRIVATE_KEY, providerGnosis); + const balance = (await retryOperation(() => weth.balanceOf(watcherAddress), 1000, 10)) as BigNumber; + const allowance = (await retryOperation( + () => weth.allowance(watcherAddress, veaOutboxAddress), + 1000, + 10 + )) as BigNumber; + + // get Arb sequencer params + const l2Network = await getL2Network(providerArb); + const sequencer = SequencerInbox__factory.connect(l2Network.ethBridge.sequencerInbox, providerEth); + const maxDelaySeconds = ( + (await retryOperation(() => sequencer.maxTimeVariation(), 1000, 10))[1] as BigNumber + ).toNumber(); + + // get vea outbox params + const deposit = (await retryOperation(() => veaOutbox.deposit(), 1000, 10)) as BigNumber; + const epochPeriod = ((await retryOperation(() => veaOutbox.epochPeriod(), 1000, 10)) as BigNumber).toNumber(); + const sequencerDelayLimit = ( + (await retryOperation(() => veaOutbox.sequencerDelayLimit(), 1000, 10)) as BigNumber + ).toNumber(); + + const inactive = balance.lt(deposit); + if (inactive) { + console.error( + "insufficient weth balance to run an active watcher. Try bridging eth to gnosis with https://omni.gnosischain.com/bridge" + ); + console.log("running watcher in passive mode (no challenges)"); + } + + if (allowance.lt(constants.MaxUint256.div(2))) { + console.log("setting infinite weth approval to vea outbox to prepare to challenge. . ."); + const approvalTxn = (await retryOperation( + () => weth.approve(veaOutboxAddress, constants.MaxUint256), + 1000, + 10 + )) as ContractTransaction; + await approvalTxn.wait(); + console.log("weth approval txn hash: " + approvalTxn.hash); + } + + // * + // calculate epoch range to check claims on Gnosis + // * + + // Finalized Gnosis block provides an 'anchor point' for the vea epochs in the outbox that are claimable + const blockFinalizedGnosis: Block = (await retryOperation( + () => providerGnosis.getBlock("finalized"), + 1000, + 10 + )) as Block; + + const coldStartBacklog = 7 * 24 * 60 * 60; // when starting the watcher, specify an extra backlog to check + + // When Sequencer is malicious, even when L1 is finalized, L2 state might be unknown for up to sequencerDelayLimit + epochPeriod. + const L2SyncPeriod = sequencerDelayLimit + epochPeriod; + // When we start the watcher, we need to go back far enough to check for claims which may have been pending L2 state finalization. + const veaEpochOutboxWacthLowerBound = + Math.floor((blockFinalizedGnosis.timestamp - L2SyncPeriod - coldStartBacklog) / epochPeriod) - 2; + + // ETH / Gnosis POS assumes synchronized clocks + // using local time as a proxy for true "latest" L1 time + const timeLocal = Math.floor(Date.now() / 1000); + + let veaEpochOutboxClaimableNow = Math.floor(timeLocal / epochPeriod) - 1; + + // only past epochs are claimable, hence shift by one here + const veaEpochOutboxRange = veaEpochOutboxClaimableNow - veaEpochOutboxWacthLowerBound + 1; + const veaEpochOutboxCheckClaimsRangeArray: number[] = new Array(veaEpochOutboxRange) + .fill(veaEpochOutboxWacthLowerBound) + .map((el, i) => el + i); + // epoch => (minChallengePeriodDeadline, maxPriorityFeePerGas, maxFeePerGas) + const challengeTxnHashes = new Map(); + + console.log( + "cold start: checking past claim history from epoch " + + veaEpochOutboxCheckClaimsRangeArray[0] + + " to the current claimable epoch " + + veaEpochOutboxCheckClaimsRangeArray[veaEpochOutboxCheckClaimsRangeArray.length - 1] + ); + + while (true) { + // returns the most recent finalized arbBlock found on Ethereum and info about finality issues on Eth and Gnosis + // if L1 is experiencing finalization problems, returns the latest arbBlock found in the latest L1 block + const [blockArbFoundOnL1, blockFinalizedEth, finalityIssueFlagEth, blockFinalizedGnosis, finalityIssueFlagGnosis] = + await getBlocksAndCheckFinality(providerEth, providerGnosis, providerArb, sequencer, maxDelaySeconds); + + if (!blockArbFoundOnL1) { + console.error("Critical Error: Arbitrum block is not found on L1."); + return; + } + + // claims can be made for the previous epoch, hence + // if an epoch is 2 or more epochs behind the L1 finalized epoch, no further claims can be made, we call this 'veaEpochOutboxFinalized' + const veaEpochOutboxClaimableFinalized = Math.floor(blockFinalizedGnosis.timestamp / epochPeriod) - 2; + + const timeLocal = Math.floor(Date.now() / 1000); + const timeGnosis = finalityIssueFlagGnosis ? timeLocal : blockFinalizedGnosis.timestamp; + + // if the sequencer is offline for maxDelaySeconds, the l2 timestamp in the next block is clamp to the current L1 timestamp - maxDelaySeconds + const l2Time = Math.max(blockArbFoundOnL1.timestamp, blockFinalizedEth.timestamp - maxDelaySeconds); + + // the latest epoch that is finalized from the L2 POV + // this depends on the L2 clock + const veaEpochInboxFinalized = Math.floor(l2Time / epochPeriod) - 1; + + const veaEpochOutboxClaimableNowOld = veaEpochOutboxClaimableNow; + veaEpochOutboxClaimableNow = Math.floor(timeGnosis / epochPeriod) - 1; + const veaEpochsOutboxClaimableNew: number[] = new Array(veaEpochOutboxClaimableNow - veaEpochOutboxClaimableNowOld) + .fill(veaEpochOutboxClaimableNowOld + 1) + .map((el, i) => el + i); + + veaEpochOutboxCheckClaimsRangeArray.concat(veaEpochsOutboxClaimableNew); + + if (veaEpochOutboxCheckClaimsRangeArray.length == 0) { + console.log("no claims to check"); + const timeToNextEpoch = epochPeriod - (Math.floor(Date.now() / 1000) % epochPeriod); + console.log("waiting till next epoch in " + timeToNextEpoch + " seconds. . ."); + await wait(timeToNextEpoch); + } + + for (let index = 0; index < veaEpochOutboxCheckClaimsRangeArray.length; index++) { + const veaEpochOutboxCheck = veaEpochOutboxCheckClaimsRangeArray[index]; + console.log("checking claim for epoch " + veaEpochOutboxCheck); + // if L1 experiences finality failure, we use the latest block + const blockTagGnosis = finalityIssueFlagGnosis ? "latest" : "finalized"; + const claimHash = (await retryOperation( + () => veaOutbox.claimHashes(veaEpochOutboxCheck, { blockTag: blockTagGnosis }), + 1000, + 10 + )) as string; + + // no claim + if (claimHash == "0x0000000000000000000000000000000000000000000000000000000000000000") { + // if epoch is not claimable anymore, remove from array + if (veaEpochOutboxCheck <= veaEpochOutboxClaimableFinalized) { + console.log( + "no claim for epoch " + + veaEpochOutboxCheck + + " and the vea epoch in the outbox is finalized (can no longer be claimed)." + ); + veaEpochOutboxCheckClaimsRangeArray.splice(index, 1); + index--; + continue; + } else { + console.log( + "no claim for epoch " + + veaEpochOutboxCheck + + " and the vea epoch in the outbox is not finalized (can still be claimed)." + ); + } + } else { + // claim exists + + console.log("claim exists for epoch " + veaEpochOutboxCheck); + + let blockNumberOutboxLowerBound: number; + // to query event perpformantly, we limit the block range with the heuristic that. delta blocknumber <= delta timestamp / secondsPerSlot + if (veaEpochOutboxCheck <= veaEpochOutboxClaimableFinalized) { + blockNumberOutboxLowerBound = + blockFinalizedGnosis.number - + Math.ceil( + ((veaEpochOutboxClaimableFinalized - veaEpochOutboxCheck + 2) * epochPeriod) / secondsPerSlotGnosis + ); + } else { + blockNumberOutboxLowerBound = blockFinalizedGnosis.number - Math.ceil(epochPeriod / secondsPerSlotGnosis); + } + + // get claim data + const logClaimed: Log = ( + await retryOperation( + () => + providerGnosis.getLogs({ + address: veaOutboxAddress, + topics: veaOutbox.filters.Claimed(null, [veaEpochOutboxCheck], null).topics, + fromBlock: blockNumberOutboxLowerBound, + toBlock: blockTagGnosis, + }), + 1000, + 10 + ) + )[0] as Log; + + // check the snapshot on the inbox on Arbitrum + // only check the state from L1 POV, don't trust the sequencer feed. + // arbBlock is a recent (finalized or latest if there are finality problems) block found posted on L1 + const claimSnapshot = (await retryOperation( + () => veaInbox.snapshots(veaEpochOutboxCheck, { blockTag: blockArbFoundOnL1.number }), + 1000, + 10 + )) as string; + + // claim differs from snapshot + if (logClaimed.data != claimSnapshot) { + console.log("claimed merkle root mismatch for epoch " + veaEpochOutboxCheck); + + // if Eth is finalizing but sequencer is malfunctioning, we can wait until the snapshot is considered finalized (L2 time is in the next epoch) + if (!finalityIssueFlagEth && veaEpochInboxFinalized < veaEpochOutboxCheck) { + // note as long as L1 does not have finalization probelms, sequencer could still be malfunctioning + console.log("L2 snapshot is not yet finalized, waiting for finalization to determine challengable status"); + } else { + console.log("claim " + veaEpochOutboxCheck + " is challengable"); + + const timestampClaimed = ( + (await retryOperation(() => providerGnosis.getBlock(logClaimed.blockNumber), 1000, 10)) as Block + ).timestamp; + + var claim = { + stateRoot: logClaimed.data, + claimer: "0x" + logClaimed.topics[1].substring(26), + timestampClaimed: timestampClaimed, + timestampVerification: 0, + blocknumberVerification: 0, + honest: 0, + challenger: constants.AddressZero, + }; + + const claimHashCalculated = (await retryOperation( + () => veaOutbox.hashClaim(claim, { blockTag: blockTagGnosis }), + 1000, + 10 + )) as string; + if (claimHashCalculated != claimHash) { + // either claim is already challenged + // or claim is in verification or verified + + const logChallenges = (await retryOperation( + () => + providerGnosis.getLogs({ + address: veaOutboxAddress, + topics: veaOutbox.filters.Challenged(veaEpochOutboxCheck, null).topics, + fromBlock: blockNumberOutboxLowerBound, + toBlock: "latest", + }), + 1000, + 10 + )) as Log[]; + + // if already challenged, no action needed + + // if not challenged, keep checking all claim struct variables + if (logChallenges.length == 0) { + // verification is possible + if (claim.timestampClaimed > timeLocal - sequencerDelayLimit - epochPeriod) { + const logVerficiationStarted = (await retryOperation( + () => + providerGnosis.getLogs({ + address: veaOutboxAddress, + topics: veaOutbox.filters.VerificationStarted(veaEpochOutboxCheck).topics, + fromBlock: blockNumberOutboxLowerBound, + toBlock: "latest", + }), + 1000, + 10 + )) as Log[]; + + if (logVerficiationStarted.length > 1) { + let blockNumberVerificationMax = 0; + for (const log of logVerficiationStarted) { + if (log.blockNumber > blockNumberVerificationMax) { + blockNumberVerificationMax = log.blockNumber; + } + } + const timestampVerification = ( + (await retryOperation( + () => providerGnosis.getBlock(blockNumberVerificationMax), + 1000, + 10 + )) as Block + ).timestamp; + + claim.timestampVerification = timestampVerification; + claim.blocknumberVerification = + logVerficiationStarted[logVerficiationStarted.length - 1].blockNumber; + + const claimHashCalculated = (await retryOperation( + () => veaOutbox.hashClaim(claim, { blockTag: "latest" }), + 1000, + 10 + )) as string; + if (claimHashCalculated != claimHash) { + claim.honest = 1; + const claimHashCalculated = (await retryOperation( + () => veaOutbox.hashClaim(claim, { blockTag: "latest" }), + 1000, + 10 + )) as string; + if (claimHashCalculated != claimHash) { + console.error( + "Invalid claim hash calculated for epoch " + + veaEpochOutboxCheck + + " claim " + + claimHashCalculated + + " expected " + + claimHash + ); + continue; + } + } + } + } + } else { + console.log("claim " + veaEpochOutboxCheck + " is already challenged"); + if (logChallenges[0].blockNumber < blockFinalizedGnosis.number) { + veaEpochOutboxCheckClaimsRangeArray.splice(index, 1); + index--; + // the challenge is finalized, no further action needed + console.log("challenge is finalized"); + continue; + } else { + console.log( + "challenge is not finalized yet, waiting for finalization to remove epoch from watch list." + ); + } + continue; + } + + if (challengeTxnHashes.has(index)) { + const txnReceipt = (await retryOperation( + () => providerGnosis.getTransactionReceipt(challengeTxnHashes.get(index)), + 10, + 1000 + )) as TransactionReceipt; + if (!txnReceipt) { + console.log("challenge txn " + challengeTxnHashes.get(index) + " not mined yet"); + continue; + } + const blockNumber = txnReceipt.blockNumber; + const challengeBlock = (await retryOperation( + () => providerGnosis.getBlock(blockNumber), + 1000, + 10 + )) as Block; + if (challengeBlock.number < blockFinalizedGnosis.number) { + veaEpochOutboxCheckClaimsRangeArray.splice(index, 1); + challengeTxnHashes.get(index); + index--; + // the challenge is finalized, no further action needed + console.log("challenge is finalized"); + continue; + } + } else { + let gasEstimate: BigNumber; + try { + gasEstimate = (await retryOperation( + () => veaOutbox.estimateGas.challenge(veaEpochOutboxCheck, claim), + 1000, + 10 + )) as BigNumber; + } catch (e) { + console.log(e); + console.log("Challenge failed to estimate gas, skipping."); + const logChallenges = (await retryOperation( + () => + providerGnosis.getLogs({ + address: veaOutboxAddress, + topics: veaOutbox.filters.Challenged(veaEpochOutboxCheck, null).topics, + fromBlock: blockNumberOutboxLowerBound, + toBlock: blockTagGnosis, + }), + 1000, + 10 + )) as Log[]; + + // if already challenged, no action needed + + // if not challenged, keep checking all claim struct variables + if (logChallenges.length == 0) { + } + } + // deposit / 2 is the profit for challengers + // the initial challenge txn is roughly 1/3 of the cost of completing the challenge process. + const maxFeePerGasProfitable = deposit.div(gasEstimate.mul(3 * 2)); + + // there's practically very little MEV on gnosis + // priority fee should just be a small amount to get the txn included in a block + + let maxPriorityFeePerGas = BigNumber.from("3000000000"); // 3 gwei + + // if claim is in min challenge period, we can use a higher priority fee + // this ensures the txn is always competitive during the censorship test (min challenge period) + if (claim.timestampClaimed < timeLocal - sequencerDelayLimit - epochPeriod) { + try { + const blockPendingGnosis = (await retryOperation( + () => providerGnosis.getBlockWithTransactions("pending"), + 1000, + 10 + )) as BlockWithTransactions; + // can't access actual gas used from pending block, consider all txns equal weight + let maxPriorityFeePerGasAvg = BigNumber.from("0"); + for (const txn of blockPendingGnosis.transactions) { + maxPriorityFeePerGasAvg = maxPriorityFeePerGasAvg.add(txn.maxPriorityFeePerGas); + } + maxPriorityFeePerGasAvg = maxPriorityFeePerGasAvg.div(blockPendingGnosis.transactions.length); + if (maxPriorityFeePerGas.lt(maxPriorityFeePerGasAvg)) { + maxPriorityFeePerGas = maxPriorityFeePerGasAvg; + } + } catch (e) {} + + // there's almost no MEV on gnosis + // will update this default value if there is more MEV on gnosis in the future + if (maxPriorityFeePerGas.lt(BigNumber.from("100000000000"))) { + maxPriorityFeePerGas = BigNumber.from("100000000000"); // 100 gwei + } + + if (maxPriorityFeePerGas.gt(maxFeePerGasProfitable)) { + maxPriorityFeePerGas = maxFeePerGasProfitable; + } + } + + if (!inactive) { + const txnChallenge = (await retryOperation( + () => + veaOutbox.challenge(veaEpochOutboxCheck, claim, { + maxFeePerGas: maxFeePerGasProfitable, + maxPriorityFeePerGas: maxPriorityFeePerGas, + }), + 1000, + 10 + )) as ContractTransaction; + + challengeTxnHashes.set(index, txnChallenge.hash); + console.log( + "challenging claim for epoch " + veaEpochOutboxCheck + " with txn hash " + txnChallenge.hash + ); + } + } + } + } + } else { + console.log("claim hash matches snapshot for epoch " + veaEpochOutboxCheck); + if ( + veaEpochOutboxCheck <= veaEpochOutboxClaimableFinalized && + veaEpochOutboxCheck >= veaEpochInboxFinalized + ) { + veaEpochOutboxCheckClaimsRangeArray.splice(index, 1); + index--; + continue; + } + } + } + } + + // 3 second delay for potential block and attestation propogation + console.log("waiting 3 seconds for potential block and attestation propogation. . ."); + await wait(1000 * 3); + } +}; + +const wait = (ms) => new Promise((r) => setTimeout(r, ms)); + +const retryOperation = (operation, delay, retries) => + new Promise((resolve, reject) => { + return operation() + .then(resolve) + .catch((reason) => { + if (retries > 0) { + // log retry + console.log("retrying", retries); + console.log(reason); + return wait(delay) + .then(retryOperation.bind(null, operation, delay, retries - 1)) + .then(resolve) + .catch(reject); + } + return reject(reason); + }); + }); + +const getBlocksAndCheckFinality = async ( + EthProvider: JsonRpcProvider, + GnosisProvider: JsonRpcProvider, + ArbProvider: JsonRpcProvider, + sequencer: SequencerInbox, + maxDelaySeconds: number +): Promise<[Block, Block, Boolean, Block, Boolean] | undefined> => { + const blockFinalizedArb = (await retryOperation(() => ArbProvider.getBlock("finalized"), 1000, 10)) as Block; + const blockFinalizedEth = (await retryOperation(() => EthProvider.getBlock("finalized"), 1000, 10)) as Block; + const blockFinalizedGnosis = (await retryOperation(() => GnosisProvider.getBlock("finalized"), 1000, 10)) as Block; + + const finalityBuffer = 300; // 5 minutes, allows for network delays + const maxFinalityTimeSecondsEth = (slotsPerEpochEth * 3 - 1) * secondsPerSlotEth; // finalization after 2 justified epochs + const maxFinalityTimeSecondsGnosis = (slotsPerEpochGnosis * 3 - 1) * secondsPerSlotGnosis; // finalization after 2 justified epochs + + let finalityIssueFlagArb = false; + let finalityIssueFlagEth = false; + let finalityIssueFlagGnosis = false; + + // check latest arb block to see if there are any sequencer issues + let blockLatestArb = (await retryOperation(() => ArbProvider.getBlock("latest"), 1000, 10)) as Block; + + // to performantly query the sequencerInbox's SequencerBatchDelivered event on Eth, we limit the block range + // we use the heuristic that. delta blocknumber <= delta timestamp / secondsPerSlot + // Arb: -----------x <-- Finalized + // || + // \/ + // Eth: -------------------------x <-- Finalized + // /\ + // ||<----------------> <-- Math.floor((timeDiffBlockFinalizedArbL1 + maxDelaySeconds) / secondsPerSlotEth) + // fromBlockEth + + const timeDiffBlockFinalizedArbL1 = blockFinalizedEth.timestamp - blockFinalizedArb.timestamp; + const fromBlockEthFinalized = + blockFinalizedEth.number - Math.floor((timeDiffBlockFinalizedArbL1 + maxDelaySeconds) / secondsPerSlotEth); + + let blockFinalizedArbToL1Block = await ArbBlockToL1Block( + ArbProvider, + sequencer, + blockFinalizedArb, + fromBlockEthFinalized, + false + ); + + if (!blockFinalizedArbToL1Block) { + console.error("Arbitrum finalized block is not found on L1."); + finalityIssueFlagArb = true; + } else if (Math.abs(blockFinalizedArbToL1Block[0].timestamp - blockFinalizedArb.timestamp) > 1800) { + // The L2 timestamp is drifted from the L1 timestamp in which the L2 block is posted. + console.error("Finalized L2 block time is more than 30 min drifted from L1 clock."); + } + + // blockLatestArbToL1Block[0] is the L1 block, blockLatestArbToL1Block[1] is the L2 block (fallsback on latest L2 block if L2 block is not found on L1) + let blockLatestArbToL1Block = await ArbBlockToL1Block( + ArbProvider, + sequencer, + blockLatestArb, + fromBlockEthFinalized, + true + ); + + if (finalityIssueFlagArb && !blockLatestArbToL1Block) { + console.error("Arbitrum latest block is not found on L1."); + // this means some issue in the arbitrum node implementation (very bad) + return undefined; + } + + // is blockLatestArb is not found on L1, ArbBlockToL1Block fallsback on the latest L2 block found on L1 + if (blockLatestArbToL1Block[1] != blockLatestArb.number) { + blockLatestArb = (await retryOperation(() => ArbProvider.getBlock(blockLatestArbToL1Block[1]), 1000, 10)) as Block; + } + + // ETH POS assumes synchronized clocks + // using local time as a proxy for true "latest" L1 time + const localTimeSeconds = Math.floor(Date.now() / 1000); + + // The sequencer is completely offline + // Not necessarily a problem, but we should know about it + if (localTimeSeconds - blockLatestArbToL1Block[0].timestamp > 1800) { + console.error("Arbitrum sequencer is offline (from L1 'latest' POV) for atleast 30 minutes."); + } + + // The L2 timestamp is drifted from the L1 timestamp in which the L2 block is posted. + // Not necessarily a problem, but we should know about it + if (Math.abs(blockLatestArbToL1Block[0].timestamp - blockLatestArb.timestamp) > 1800) { + console.error("Latest L2 block time is more than 30 min drifted from L1 clock."); + console.error("L2 block time: " + blockLatestArb.timestamp); + console.error("L1 block time: " + blockLatestArbToL1Block[0].timestamp); + console.error("L2 block number: " + blockLatestArb.number); + } + + // Note: Using last finalized block as a proxy for the latest finalized epoch + // Using a BeaconChain RPC would be more accurate + if (localTimeSeconds - blockFinalizedEth.timestamp > maxFinalityTimeSecondsEth + finalityBuffer) { + console.error("Ethereum mainnet is not finalizing"); + finalityIssueFlagEth = true; + } + + // Note: Using last finalized block as a proxy for the latest finalized epoch + // Using a BeaconChain RPC would be more accurate + if (localTimeSeconds - blockFinalizedGnosis.timestamp > maxFinalityTimeSecondsGnosis + finalityBuffer) { + console.error("Gnosis is not finalizing"); + finalityIssueFlagGnosis = true; + } + + if (blockFinalizedEth.number < blockFinalizedArbToL1Block[0].number) { + console.error( + "Arbitrum 'finalized' block is posted in an L1 block which is not finalized. Arbitrum node is out of sync with L1 node. It's recommended to use the same L1 RPC as the L1 node used by the Arbitrum node." + ); + finalityIssueFlagArb = true; + } + + // if L1 is experiencing finalization problems, we use the latest L2 block + const blockArbitrum = finalityIssueFlagArb || finalityIssueFlagEth ? blockLatestArb : blockFinalizedArb; + + return [blockArbitrum, blockFinalizedEth, finalityIssueFlagEth, blockFinalizedGnosis, finalityIssueFlagGnosis]; +}; + +const ArbBlockToL1Block = async ( + L2Provider: JsonRpcProvider, + sequencer: SequencerInbox, + L2Block: Block, + fromBlockEth: number, + fallbackLatest: boolean +): Promise<[Block, number] | undefined> => { + const nodeInterface = NodeInterface__factory.connect(NODE_INTERFACE_ADDRESS, L2Provider); + + let latestL2batchOnEth: number; + let latestL2BlockNumberOnEth: number; + let result = (await nodeInterface.functions + .findBatchContainingBlock(L2Block.number, { blockTag: "latest" }) + .catch((e) => { + // if L2 block is ahead of latest L2 batch on L1, we get an error + // catch the error and parse it to get the latest L2 batch on L1 + + // https://github.com/OffchainLabs/nitro/blob/af87ba29bc34c27bd4d85b3066a1cc3a759bab66/nodeInterface/NodeInterface.go#L544 + const errMsg = JSON.parse(JSON.parse(JSON.stringify(e)).error.body).error.message; + + if (fallbackLatest) { + latestL2batchOnEth = parseInt(errMsg.split(" published in batch ")[1]); + latestL2BlockNumberOnEth = parseInt(errMsg.split(" is after latest on-chain block ")[1]); + if (Number.isNaN(latestL2batchOnEth)) { + console.error(errMsg); + } + } + })) as [BigNumber] & { batch: BigNumber }; + + if (!result && !fallbackLatest) return undefined; + + const batch = result?.batch?.toNumber() ?? latestL2batchOnEth; + const L2BlockNumberFallback = latestL2BlockNumberOnEth ?? L2Block.number; + /** + * We use the batch number to query the L1 sequencerInbox's SequencerBatchDelivered event + * then, we get its emitted transaction hash. + */ + const queryBatch = sequencer.filters.SequencerBatchDelivered(batch); + + const emittedEvent = (await retryOperation( + () => sequencer.queryFilter(queryBatch, fromBlockEth, "latest"), + 1000, + 10 + )) as any; + if (emittedEvent.length == 0) { + return undefined; + } + + const L1Block = (await retryOperation(() => emittedEvent[0].getBlock(), 1000, 10)) as Block; + return [L1Block, L2BlockNumberFallback]; +}; + +(async () => { + await watch(); +})(); +export default watch; diff --git a/validator-cli/src/utils/ethers.ts b/validator-cli/src/utils/ethers.ts index 4edae0e3..983d08de 100644 --- a/validator-cli/src/utils/ethers.ts +++ b/validator-cli/src/utils/ethers.ts @@ -2,9 +2,13 @@ import { Wallet } from "@ethersproject/wallet"; import { JsonRpcProvider } from "@ethersproject/providers"; import { VeaOutboxArbToEth__factory, + VeaOutboxArbToGnosis__factory, VeaOutboxArbToEthDevnet__factory, VeaOutboxArbToGnosisDevnet__factory, + VeaOutboxMultiChallenge__factory, VeaInboxArbToEth__factory, + VeaInboxArbToGnosis__factory, + IWETH__factory, } from "@kleros/vea-contracts/typechain-types"; function getWallet(privateKey: string, web3ProviderURL: string) { @@ -27,6 +31,22 @@ function getVeaOutboxArbToEthProvider(veaOutboxAddress: string, privateKey: stri return VeaOutboxArbToEth__factory.connect(veaOutboxAddress, getWalletRPC(privateKey, rpc)); } +function getVeaOutboxMultiChallengeProvider(veaOutboxAddress: string, privateKey: string, rpc: JsonRpcProvider) { + return VeaOutboxMultiChallenge__factory.connect(veaOutboxAddress, getWalletRPC(privateKey, rpc)); +} + +function getVeaOutboxArbToGnosisProvider(veaOutboxAddress: string, privateKey: string, rpc: JsonRpcProvider) { + return VeaOutboxArbToGnosis__factory.connect(veaOutboxAddress, getWalletRPC(privateKey, rpc)); +} + +function getVeaInboxArbToGnosisProvider(veaInboxAddress: string, privateKey: string, rpc: JsonRpcProvider) { + return VeaInboxArbToGnosis__factory.connect(veaInboxAddress, getWalletRPC(privateKey, rpc)); +} + +function getWETHProvider(WETH: string, privateKey: string, rpc: JsonRpcProvider) { + return IWETH__factory.connect(WETH, getWalletRPC(privateKey, rpc)); +} + function getVeaOutboxArbToEth(veaOutboxAddress: string, privateKey: string, web3ProviderURL: string) { return VeaOutboxArbToEth__factory.connect(veaOutboxAddress, getWallet(privateKey, web3ProviderURL)); } @@ -39,10 +59,6 @@ function getVeaOutboxArbToEthDevnet(veaOutboxAddress: string, privateKey: string return VeaOutboxArbToEthDevnet__factory.connect(veaOutboxAddress, getWallet(privateKey, web3ProviderURL)); } -function getVeaOutboxArbToGnosisProvider(veaOutboxAddress: string, privateKey: string, rpc: JsonRpcProvider) { - return VeaOutboxArbToGnosisDevnet__factory.connect(veaOutboxAddress, getWalletRPC(privateKey, rpc)); -} - function getVeaOutboxArbToGnosis(veaOutboxAddress: string, privateKey: string, web3ProviderURL: string) { return VeaOutboxArbToGnosisDevnet__factory.connect(veaOutboxAddress, getWallet(privateKey, web3ProviderURL)); } @@ -54,4 +70,7 @@ export { getVeaInboxArbToEth, getVeaInboxArbToEthProvider, getVeaOutboxArbToEthProvider, + getVeaOutboxArbToGnosisProvider, + getVeaInboxArbToGnosisProvider, + getWETHProvider, }; diff --git a/yarn.lock b/yarn.lock index b335a064..d4bef073 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1536,6 +1536,15 @@ __metadata: languageName: node linkType: hard +"@flashbots/ethers-provider-bundle@npm:^0.6.2": + version: 0.6.2 + resolution: "@flashbots/ethers-provider-bundle@npm:0.6.2" + peerDependencies: + ethers: 5.7.2 + checksum: 90a991c55b02b242f28e36a131d20e7def404a1c7edbd8696fed258c91a047f8d07ea7f787f87d8e3b5a83e53e3f64c353931b2707b6e230ca48c0164329dfcb + languageName: node + linkType: hard + "@float-capital/float-subgraph-uncrashable@npm:^0.0.0-alpha.4": version: 0.0.0-internal-testing.5 resolution: "@float-capital/float-subgraph-uncrashable@npm:0.0.0-internal-testing.5" @@ -3428,6 +3437,7 @@ __metadata: resolution: "@kleros/vea-validator-cli@workspace:validator-cli" dependencies: "@arbitrum/sdk": ^3.1.2 + "@flashbots/ethers-provider-bundle": ^0.6.2 "@kleros/vea-contracts": "workspace:^" "@typechain/ethers-v5": ^10.2.0 dotenv: ^16.0.3 From ff5db2c3b08f337012a0d6792d0078f4292271fe Mon Sep 17 00:00:00 2001 From: shotaronowhere Date: Thu, 19 Oct 2023 21:32:14 -0700 Subject: [PATCH 24/58] chore: relayer subgraph refactor --- relayer-subgraph-inbox/src/vea-inbox-arb-to-eth.ts | 9 ++++----- relayer-subgraph-inbox/subgraph.yaml | 6 +++--- validator-cli/src/ArbToEth/watcherArbToEth.ts | 12 ++++++------ 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/relayer-subgraph-inbox/src/vea-inbox-arb-to-eth.ts b/relayer-subgraph-inbox/src/vea-inbox-arb-to-eth.ts index fdfc2f3d..c2076a03 100644 --- a/relayer-subgraph-inbox/src/vea-inbox-arb-to-eth.ts +++ b/relayer-subgraph-inbox/src/vea-inbox-arb-to-eth.ts @@ -4,7 +4,6 @@ import { SnapshotSent as SnapshotSentEvent, } from "../generated/VeaInbox/VeaInbox"; import { - Hearbeat, MessageSent, SnapshotSaved, SnapshotSent, @@ -29,7 +28,7 @@ export function handleMessageSent(event: MessageSentEvent): void { let entity = new MessageSent( event.transaction.hash.concatI32(event.logIndex.toI32()) ); - let msgData = event.params.nodeData; + let msgData = event.params._nodeData; let _nonce = new ByteArray(8); for (let i = 0; i < 8; i++) _nonce[i] = msgData[i]; @@ -125,7 +124,7 @@ export function handleSnapshotSaved(event: SnapshotSavedEvent): void { let contract = VeaInbox.bind(event.address); entity.epoch = event.block.timestamp.div(contract.epochPeriod()); entity.stateRoot = contract.snapshots(entity.epoch); - entity.count = event.params.count; + entity.count = event.params._count; entity.blockNumber = event.block.number; entity.blockTimestamp = event.block.timestamp; entity.transactionHash = event.transaction.hash; @@ -221,8 +220,8 @@ export function handleSnapshotSent(event: SnapshotSentEvent): void { let entity = new SnapshotSent( event.transaction.hash.concatI32(event.logIndex.toI32()) ); - entity.epochSent = event.params.epochSent; - entity.ticketId = event.params.ticketId; + entity.epochSent = event.params._epochSent; + entity.ticketId = event.params._ticketId; entity.blockNumber = event.block.number; entity.blockTimestamp = event.block.timestamp; diff --git a/relayer-subgraph-inbox/subgraph.yaml b/relayer-subgraph-inbox/subgraph.yaml index c6fd8fd9..2eccab08 100644 --- a/relayer-subgraph-inbox/subgraph.yaml +++ b/relayer-subgraph-inbox/subgraph.yaml @@ -6,7 +6,7 @@ dataSources: name: VeaInbox network: arbitrum-goerli source: - address: "0x3b894FE680deB990b4Fb7E7D0000C32Af06687C3" + address: "0xA3FefC6FeE3fc66B9d9a8BEE794736ab71a74c55" abi: VeaInbox startBlock: 16978653 mapping: @@ -19,11 +19,11 @@ dataSources: - StaterootSent abis: - name: VeaInbox - file: ../contracts/deployments/arbitrumGoerli/VeaInboxArbGoerliToGoerli.json + file: ../contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json eventHandlers: - event: MessageSent(bytes) handler: handleMessageSent - - event: SnapshotSaved(uint256) + - event: SnapshotSaved(bytes32,uint256,uint64) handler: handleSnapshotSaved - event: SnapshotSent(indexed uint256,bytes32) handler: handleSnapshotSent diff --git a/validator-cli/src/ArbToEth/watcherArbToEth.ts b/validator-cli/src/ArbToEth/watcherArbToEth.ts index 8468bc6e..2cba6e2f 100644 --- a/validator-cli/src/ArbToEth/watcherArbToEth.ts +++ b/validator-cli/src/ArbToEth/watcherArbToEth.ts @@ -57,7 +57,7 @@ const watch = async () => { // When Sequencer is malicious, even when L1 is finalized, L2 state might be unknown for up to sequencerDelayLimit + epochPeriod. const L2SyncPeriod = sequencerDelayLimit + epochPeriod; // When we start the watcher, we need to go back far enough to check for claims which may have been pending L2 state finalization. - const veaEpochOutboxWacthLowerBound = + const veaEpochOutboxWatchLowerBound = Math.floor((blockFinalizedEth.timestamp - L2SyncPeriod - coldStartBacklog) / epochPeriod) - 2; // ETH / Gnosis POS assumes synchronized clocks @@ -67,9 +67,9 @@ const watch = async () => { let veaEpochOutboxClaimableNow = Math.floor(timeLocal / epochPeriod) - 1; // only past epochs are claimable, hence shift by one here - const veaEpochOutboxRange = veaEpochOutboxClaimableNow - veaEpochOutboxWacthLowerBound + 1; + const veaEpochOutboxRange = veaEpochOutboxClaimableNow - veaEpochOutboxWatchLowerBound + 1; const veaEpochOutboxCheckClaimsRangeArray: number[] = new Array(veaEpochOutboxRange) - .fill(veaEpochOutboxWacthLowerBound) + .fill(veaEpochOutboxWatchLowerBound) .map((el, i) => el + i); const challengeTxnHashes = new Map(); @@ -121,14 +121,14 @@ const watch = async () => { console.log("no claims to check"); const timeToNextEpoch = epochPeriod - (Math.floor(Date.now() / 1000) % epochPeriod); console.log("waiting till next epoch in " + timeToNextEpoch + " seconds. . ."); - await wait(timeToNextEpoch); + continue; } for (let index = 0; index < veaEpochOutboxCheckClaimsRangeArray.length; index++) { const veaEpochOutboxCheck = veaEpochOutboxCheckClaimsRangeArray[index]; console.log("checking claim for epoch " + veaEpochOutboxCheck); // if L1 experiences finality failure, we use the latest block - const blockTagEth = timeEth ? "latest" : "finalized"; + const blockTagEth = finalityIssueFlagEth ? "latest" : "finalized"; const claimHash = (await retryOperation( () => veaOutbox.claimHashes(veaEpochOutboxCheck, { blockTag: blockTagEth }), 1000, @@ -161,7 +161,7 @@ const watch = async () => { let blockNumberOutboxLowerBound: number; - // to query event perpformantly, we limit the block range with the heuristic that. delta blocknumber <= delta timestamp / secondsPerSlot + // to query event performantly, we limit the block range with the heuristic that. delta blocknumber <= delta timestamp / secondsPerSlot if (veaEpochOutboxCheck <= veaEpochOutboxClaimableFinalized) { blockNumberOutboxLowerBound = blockFinalizedEth.number - From 636003e6d6a1abe40c9f12d7eb774c01f20217bf Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Mon, 12 Feb 2024 09:42:35 +0530 Subject: [PATCH 25/58] fix: concat-stream source changed to npm --- yarn.lock | 35 ++++++----------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) diff --git a/yarn.lock b/yarn.lock index d4bef073..b0d8ed73 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3427,6 +3427,7 @@ __metadata: dependencies: "@graphprotocol/graph-cli": ^0.44.0 "@graphprotocol/graph-ts": ^0.29.3 + concat-stream: ^2.0.0 gluegun: ^5.1.2 matchstick-as: 0.5.2 languageName: unknown @@ -5490,15 +5491,6 @@ __metadata: languageName: node linkType: hard -"@types/concat-stream@npm:^1.6.0": - version: 1.6.1 - resolution: "@types/concat-stream@npm:1.6.1" - dependencies: - "@types/node": "*" - checksum: 7d211e74331affd3578b5469244f5cef84a93775f38332adb3ef12413559a23862bc682c6873d0a404b01c9d5d5f7d3ae091fe835b435b633eb420e3055b3e56 - languageName: node - linkType: hard - "@types/connect@npm:^3.4.33": version: 3.4.35 resolution: "@types/connect@npm:3.4.35" @@ -8484,25 +8476,15 @@ __metadata: languageName: node linkType: hard -"concat-stream@github:hugomrdias/concat-stream#feat/smaller": +"concat-stream@npm:^2.0.0": version: 2.0.0 - resolution: "concat-stream@https://github.com/hugomrdias/concat-stream.git#commit=057bc7b5d6d8df26c8cf00a3f151b6721a0a8034" - dependencies: - inherits: ^2.0.3 - readable-stream: ^3.0.2 - checksum: 1cef636e7061f310088706b34fe774e3960dff60a5039158b5e5c84795f6dd8a3411659324280405b8c5f1d7e8e3d4f68fa48e55963ed14953a44fef66423329 - languageName: node - linkType: hard - -"concat-stream@npm:^1.6.0, concat-stream@npm:^1.6.2, concat-stream@npm:~1.6.2": - version: 1.6.2 - resolution: "concat-stream@npm:1.6.2" + resolution: "concat-stream@npm:2.0.0" dependencies: buffer-from: ^1.0.0 inherits: ^2.0.3 - readable-stream: ^2.2.2 + readable-stream: ^3.0.2 typedarray: ^0.0.6 - checksum: 1ef77032cb4459dcd5187bd710d6fc962b067b64ec6a505810de3d2b8cc0605638551b42f8ec91edf6fcd26141b32ef19ad749239b58fae3aba99187adc32285 + checksum: d7f75d48f0ecd356c1545d87e22f57b488172811b1181d96021c7c4b14ab8855f5313280263dca44bb06e5222f274d047da3e290a38841ef87b59719bde967c7 languageName: node linkType: hard @@ -9566,7 +9548,6 @@ __metadata: version: 2.5.8 resolution: "dockerode@npm:2.5.8" dependencies: - concat-stream: ~1.6.2 docker-modem: ^1.0.8 tar-fs: ~1.16.3 checksum: 01381da98f98a3236b735fb2bb2a66f521da39200a2a11b83777cee3b104b32966ba7dfeb93f3fa8ab85b5e639265842d66f576e7db9562b1049564c2af6ec84 @@ -12750,7 +12731,6 @@ __metadata: resolution: "http-basic@npm:8.1.3" dependencies: caseless: ^0.12.0 - concat-stream: ^1.6.2 http-response-object: ^3.0.1 parse-cache-control: ^1.0.1 checksum: 7df5dc4d4b6eb8cc3beaa77f8e5c3074288ec3835abd83c85e5bb66d8a95a0ef97664d862caf5e225698cb795f78f9a5abd0d39404e5356ccd3e5e10c87936a5 @@ -13188,7 +13168,6 @@ __metadata: bs58: ^4.0.1 buffer: ^5.4.2 cids: ~0.7.1 - concat-stream: "github:hugomrdias/concat-stream#feat/smaller" debug: ^4.1.0 detect-node: ^2.0.4 end-of-stream: ^1.4.1 @@ -18198,7 +18177,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:^2.2.2, readable-stream@npm:^2.3.0, readable-stream@npm:^2.3.5, readable-stream@npm:~2.3.6": +"readable-stream@npm:^2.3.0, readable-stream@npm:^2.3.5, readable-stream@npm:~2.3.6": version: 2.3.8 resolution: "readable-stream@npm:2.3.8" dependencies: @@ -20360,12 +20339,10 @@ __metadata: version: 6.0.2 resolution: "then-request@npm:6.0.2" dependencies: - "@types/concat-stream": ^1.6.0 "@types/form-data": 0.0.33 "@types/node": ^8.0.0 "@types/qs": ^6.2.31 caseless: ~0.12.0 - concat-stream: ^1.6.0 form-data: ^2.2.0 http-basic: ^8.1.1 http-response-object: ^3.0.1 From de0e767392185dc2cc23665d596f71b209a677cb Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Fri, 16 Feb 2024 12:06:46 +0530 Subject: [PATCH 26/58] fix: update hardhat node command to allow connection from all interface --- contracts/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/package.json b/contracts/package.json index 65f1a053..b737a791 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -36,7 +36,7 @@ "check": "hardhat check", "test": "TS_NODE_TRANSPILE_ONLY=1 hardhat test", "start": "hardhat node --tags nothing", - "start-local": "hardhat node --tags ArbToEthOutbox,ArbToEthInbox", + "start-local": "hardhat node --tags ArbToEthOutbox,ArbToEthInbox --hostname 0.0.0.0", "deploy": "hardhat deploy", "deploy:mainnet": "yarn deploy:ArbToEth && yarn deploy:ArbToGnosis && yarn deploy:GnosisToArb", "deploy:testnet": "yarn deploy:ArbToEthTestnet && yarn deploy:ArbToGnosisTestnet && yarn deploy:GnosisToArbTestnet", From fe7fb00e8392e3e41df40a8f9a355b6e305e1fa8 Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Sun, 25 Feb 2024 11:09:05 +0530 Subject: [PATCH 27/58] fix: update veascan outbox subgraph name --- veascan-subgraph-outbox/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/veascan-subgraph-outbox/package.json b/veascan-subgraph-outbox/package.json index 62f79c27..42628e2e 100644 --- a/veascan-subgraph-outbox/package.json +++ b/veascan-subgraph-outbox/package.json @@ -20,7 +20,7 @@ "deploy:chiado": "yarn build:chiado && goldsky subgraph deploy kleros-veascan-outbox-chiado/latest", "create-local": "graph create --node http://localhost:8020/ kleros/veascan-outbox", "remove-local": "graph remove --node http://localhost:8020/ kleros/veascan-outbox", - "deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 kleros/veascan-subgraph-outbox" + "deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 kleros/veascan-outbox" }, "dependencies": { "@graphprotocol/graph-ts": "^0.29.3" From 8885c1e71a171338c3f172a86cb2faefcf7c829b Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Mon, 26 Feb 2024 16:15:42 +0530 Subject: [PATCH 28/58] fix: update hardhat voutbox to devnet --- contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts b/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts index 8d47359d..92afda45 100644 --- a/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts @@ -94,9 +94,8 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const veaOutbox = await deploy("VeaOutbox", { from: deployer, - contract: "VeaOutboxMockArbToEth", + contract: "VeaOutboxArbToEthDevnet", args: [ - arbSysAddress, deposit, epochPeriod, minChallengePeriod, From 62e52778f0ced6161f600cf14fc3b5187871f629 Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Mon, 26 Feb 2024 17:19:16 +0530 Subject: [PATCH 29/58] chore: redice epoch period for hardhat network --- contracts/deploy/01-outbox/01-arb-goerli-to-chiado-outbox.ts | 4 ++-- contracts/deploy/01-outbox/01-arb-goerli-to-goerli-outbox.ts | 4 ++-- contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts | 4 ++-- contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts | 4 ++-- contracts/deploy/01-outbox/01-chiado-to-arb-goerli-outbox.ts | 4 ++-- contracts/deploy/01-outbox/01-gnosis-to-arb-outbox.ts | 4 ++-- contracts/deploy/02-inbox/02-arb-goerli-to-chiado-inbox.ts | 2 +- contracts/deploy/02-inbox/02-arb-goerli-to-goerli-inbox.ts | 2 +- contracts/deploy/02-inbox/02-arb-to-eth-inbox.ts | 2 +- contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts | 2 +- contracts/deploy/02-inbox/02-chiado-to-arb-goerli-inbox.ts | 2 +- contracts/deploy/02-inbox/02-gnosis-to-arb-inbox.ts | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/contracts/deploy/01-outbox/01-arb-goerli-to-chiado-outbox.ts b/contracts/deploy/01-outbox/01-arb-goerli-to-chiado-outbox.ts index 0b333135..ecb58623 100644 --- a/contracts/deploy/01-outbox/01-arb-goerli-to-chiado-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-goerli-to-chiado-outbox.ts @@ -23,8 +23,8 @@ const paramsByChainId = { }, HARDHAT: { deposit: parseEther("1"), - epochPeriod: 1800, // 30 min - minChallengePeriod: 600, // 15 min + epochPeriod: 600, // 10 min + minChallengePeriod: 600, // 10 min numEpochTimeout: 24, // 6 hours amb: ethers.constants.AddressZero, sequencerLimit: 0, diff --git a/contracts/deploy/01-outbox/01-arb-goerli-to-goerli-outbox.ts b/contracts/deploy/01-outbox/01-arb-goerli-to-goerli-outbox.ts index b1e308d1..ae1cc279 100644 --- a/contracts/deploy/01-outbox/01-arb-goerli-to-goerli-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-goerli-to-goerli-outbox.ts @@ -22,8 +22,8 @@ const paramsByChainId = { HARDHAT: { deposit: parseEther("10"), // 120 eth budget for timeout // Average happy path wait time is 45 mins, assume no censorship - epochPeriod: 1800, // 30 min - minChallengePeriod: 1800, // 30 min (assume no sequencer backdating) + epochPeriod: 600, // 10 min + minChallengePeriod: 600, // 10 min (assume no sequencer backdating) numEpochTimeout: 10000000000000, // 6 hours maxMissingBlocks: 10000000000000, arbitrumBridge: ethers.constants.AddressZero, diff --git a/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts b/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts index 92afda45..f309b342 100644 --- a/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts @@ -31,8 +31,8 @@ const paramsByChainId = { }, HARDHAT: { deposit: parseEther("10"), - epochPeriod: 1800, // 30 min - minChallengePeriod: 1800, // 30 min + epochPeriod: 600, // 10 min + minChallengePeriod: 600, // 10 min numEpochTimeout: 10000000000000, // never maxMissingBlocks: 10, arbitrumBridge: ethers.constants.AddressZero, diff --git a/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts b/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts index 29084355..e6499664 100644 --- a/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts @@ -38,8 +38,8 @@ const paramsByChainId = { HARDHAT: { deposit: parseEther("5"), // 120 xDAI budget for timeout // Average happy path wait time is 22.5 mins, assume no censorship - epochPeriod: 600, // 15 min - challengePeriod: 600, // 15 min (assume no sequencer backdating) + epochPeriod: 600, // 10 min + challengePeriod: 600, // 10 min (assume no sequencer backdating) numEpochTimeout: 24, // 6 hours claimDelay: 2, amb: ethers.constants.AddressZero, diff --git a/contracts/deploy/01-outbox/01-chiado-to-arb-goerli-outbox.ts b/contracts/deploy/01-outbox/01-chiado-to-arb-goerli-outbox.ts index 329ec2e8..16e2ec45 100644 --- a/contracts/deploy/01-outbox/01-chiado-to-arb-goerli-outbox.ts +++ b/contracts/deploy/01-outbox/01-chiado-to-arb-goerli-outbox.ts @@ -22,8 +22,8 @@ const paramsByChainId = { }, HARDHAT: { deposit: parseEther("1"), - epochPeriod: 1800, // 30 min - challengePeriod: 600, // 15 min + epochPeriod: 600, // 10 min + challengePeriod: 600, // 10 min numEpochTimeout: 24, // 6 hours amb: ethers.constants.AddressZero, sequencerDelayLimit: 86400, diff --git a/contracts/deploy/01-outbox/01-gnosis-to-arb-outbox.ts b/contracts/deploy/01-outbox/01-gnosis-to-arb-outbox.ts index f2e849f4..b5eeb8b1 100644 --- a/contracts/deploy/01-outbox/01-gnosis-to-arb-outbox.ts +++ b/contracts/deploy/01-outbox/01-gnosis-to-arb-outbox.ts @@ -29,8 +29,8 @@ const paramsByChainId = { }, HARDHAT: { deposit: parseEther("2"), - epochPeriod: 1800, // 30 min - challengePeriod: 1800, // 30 min + epochPeriod: 600, // 10 min + challengePeriod: 600, // 10 min numEpochTimeout: 10000000, // never sequencerDelayLimit: 86400, sequencerFutureLimit: 3600, diff --git a/contracts/deploy/02-inbox/02-arb-goerli-to-chiado-inbox.ts b/contracts/deploy/02-inbox/02-arb-goerli-to-chiado-inbox.ts index 5283738e..70f80216 100644 --- a/contracts/deploy/02-inbox/02-arb-goerli-to-chiado-inbox.ts +++ b/contracts/deploy/02-inbox/02-arb-goerli-to-chiado-inbox.ts @@ -11,7 +11,7 @@ const paramsByChainId = { epochPeriod: 1800, // 1 hour }, HARDHAT: { - epochPeriod: 1800, // 30 minutes + epochPeriod: 600, // 10 minutes }, }; diff --git a/contracts/deploy/02-inbox/02-arb-goerli-to-goerli-inbox.ts b/contracts/deploy/02-inbox/02-arb-goerli-to-goerli-inbox.ts index 60983b4a..c2c1206f 100644 --- a/contracts/deploy/02-inbox/02-arb-goerli-to-goerli-inbox.ts +++ b/contracts/deploy/02-inbox/02-arb-goerli-to-goerli-inbox.ts @@ -11,7 +11,7 @@ const paramsByChainId = { epochPeriod: 1800, // 1 hour }, HARDHAT: { - epochPeriod: 1800, // 30 minutes + epochPeriod: 600, // 10 minutes }, }; diff --git a/contracts/deploy/02-inbox/02-arb-to-eth-inbox.ts b/contracts/deploy/02-inbox/02-arb-to-eth-inbox.ts index c156e718..e0dac936 100644 --- a/contracts/deploy/02-inbox/02-arb-to-eth-inbox.ts +++ b/contracts/deploy/02-inbox/02-arb-to-eth-inbox.ts @@ -16,7 +16,7 @@ const paramsByChainId = { companion: (hre: HardhatRuntimeEnvironment) => hre.companionNetworks.goerli, }, HARDHAT: { - epochPeriod: 1800, // 30 minutes + epochPeriod: 600, // 10 minutes }, }; diff --git a/contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts b/contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts index 685db93a..bee0f63f 100644 --- a/contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts +++ b/contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts @@ -15,7 +15,7 @@ const paramsByChainId = { epochPeriod: 3600, // 1 hours }, HARDHAT: { - epochPeriod: 1800, // 30 minutes + epochPeriod: 600, // 10 minutes }, }; diff --git a/contracts/deploy/02-inbox/02-chiado-to-arb-goerli-inbox.ts b/contracts/deploy/02-inbox/02-chiado-to-arb-goerli-inbox.ts index 5e0ba1be..899c0f74 100644 --- a/contracts/deploy/02-inbox/02-chiado-to-arb-goerli-inbox.ts +++ b/contracts/deploy/02-inbox/02-chiado-to-arb-goerli-inbox.ts @@ -14,7 +14,7 @@ const paramsByChainId = { }, HARDHAT: { amb: ethers.constants.AddressZero, - epochPeriod: 1800, // 30 minutes + epochPeriod: 600, // 10 minutes }, }; diff --git a/contracts/deploy/02-inbox/02-gnosis-to-arb-inbox.ts b/contracts/deploy/02-inbox/02-gnosis-to-arb-inbox.ts index 31d2e42c..742d785b 100644 --- a/contracts/deploy/02-inbox/02-gnosis-to-arb-inbox.ts +++ b/contracts/deploy/02-inbox/02-gnosis-to-arb-inbox.ts @@ -18,7 +18,7 @@ const paramsByChainId = { amb: "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", }, HARDHAT: { - epochPeriod: 7200, // 2 hours + epochPeriod: 600, // 10 minutes }, }; From 35460b1407f2b34322013b0edea22c38d2e7b804 Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Mon, 26 Feb 2024 17:36:31 +0530 Subject: [PATCH 30/58] fix: abi decode for last saved count in validator bot --- validator-cli/src/utils/devnet.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/validator-cli/src/utils/devnet.ts b/validator-cli/src/utils/devnet.ts index 1de49277..bcff6169 100644 --- a/validator-cli/src/utils/devnet.ts +++ b/validator-cli/src/utils/devnet.ts @@ -1,4 +1,4 @@ -import { BigNumber } from "ethers"; +import { BigNumber, utils } from "ethers"; import { getVeaInboxArbToEthProvider, getVeaOutboxArbToEthDevnetProvider } from "../utils/ethers"; import { VeaInboxArbToEth, VeaOutboxArbToEthDevnet } from "@kleros/vea-contracts/typechain-types"; import { JsonRpcProvider } from "@ethersproject/providers"; @@ -35,7 +35,10 @@ async function initialize( fromBlock: searchBlock, }); - let lastSavedCount = logs.length > 0 ? BigNumber.from(logs[logs.length - 1].data) : BigNumber.from(0); + let lastSavedCount = + logs.length > 0 + ? utils.defaultAbiCoder.decode(["bytes32", "uint256", "uint64"], logs[logs.length - 1].data)[2] + : BigNumber.from(0); return [veaInbox, epochPeriod, lastSavedCount, veaOutbox, deposit]; } From a2d3715450cf60fcc4bdf7c727045e7092e55e87 Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Mon, 26 Feb 2024 17:50:06 +0530 Subject: [PATCH 31/58] fix: relayer bot bug fixes --- relayer-cli/src/devnetRelayExample.ts | 9 +++++---- relayer-cli/src/utils/proof.ts | 4 +++- relayer-cli/src/utils/relay.ts | 4 +++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/relayer-cli/src/devnetRelayExample.ts b/relayer-cli/src/devnetRelayExample.ts index 140aaa37..2d605b3d 100644 --- a/relayer-cli/src/devnetRelayExample.ts +++ b/relayer-cli/src/devnetRelayExample.ts @@ -3,7 +3,7 @@ import * as fs from "fs"; require("dotenv").config(); let chain_ids = [5, 10200]; -const epochPeriod = 1800; // 30 min +const epochPeriod = 600; // 30 min ["SIGINT", "SIGTERM", "SIGQUIT", "EXIT", "MODULE_NOT_FOUND"].forEach((signal) => process.on(signal, async () => { console.log("exit"); @@ -26,10 +26,10 @@ const epochPeriod = 1800; // 30 min ? "0xe6aC8CfF97199A67b8121a3Ce3aC98772f90B94b" : "0x177AfBF3cda970024Efa901516735aF9c3B894a4"; nonce = await relayAllFrom(chain_id, nonce, senderGateway); - await updateStateFile(chain_id, Math.floor(Date.now() / 1000), nonce); + if (nonce != null) await updateStateFile(chain_id, Math.floor(Date.now() / 1000), nonce); } const currentTS = Math.floor(Date.now() / 1000); - const delayAmount = (epochPeriod - (currentTS % epochPeriod)) * 1000 + 300 * 1000; + const delayAmount = (epochPeriod - (currentTS % epochPeriod)) * 1000 + 100 * 1000; console.log("waiting for the next epoch. . .", Math.floor(delayAmount / 1000), "seconds"); await delay(delayAmount); } @@ -47,7 +47,8 @@ async function initialize(chain_id: number): Promise { fs.writeFileSync(lock_file_name, process.pid.toString(), { encoding: "utf8" }); const state_file_name = "./state/" + chain_id + ".json"; - if (!fs.existsSync(state_file_name)) { + const state_file_name_fs_check = "./src/state/" + chain_id + ".json"; + if (!fs.existsSync(state_file_name_fs_check)) { // No state file so initialize starting now const tsnow = Math.floor(Date.now() / 1000); await updateStateFile(chain_id, tsnow, 0); diff --git a/relayer-cli/src/utils/proof.ts b/relayer-cli/src/utils/proof.ts index 2dcd12fa..03323bf5 100644 --- a/relayer-cli/src/utils/proof.ts +++ b/relayer-cli/src/utils/proof.ts @@ -26,6 +26,8 @@ const getMessageDataToRelay = async (chainid: number, nonce: number) => { const getProofAtCount = async (chainid: number, nonce: number, count: number): Promise => { const proofIndices = getProofIndices(nonce, count); + if (proofIndices.length == 0) return []; + let query = "{"; for (let i = 0; i < proofIndices.length; i++) { query += `layer${i}: nodes(first: 1, where: {id: "${proofIndices[i]}"}) { @@ -58,7 +60,7 @@ const getProofIndices = (nonce: number, count: number) => { const treeDepth = Math.ceil(Math.log2(count)); - for (let i = 0; i < treeDepth; i++) { + for (let i = 0; i <= treeDepth; i++) { if (i == 0 && (nonce ^ 1) < count) proof.push((nonce ^ 1).toString()); // sibling else { const low = ((nonce >> i) ^ 1) << i; diff --git a/relayer-cli/src/utils/relay.ts b/relayer-cli/src/utils/relay.ts index c6f6d76b..9d8811d2 100644 --- a/relayer-cli/src/utils/relay.ts +++ b/relayer-cli/src/utils/relay.ts @@ -39,7 +39,7 @@ const getCount = async (veaOutbox: VeaOutboxArbToEth, chainid: number): Promise< }` ); - if (result["snapshotSaveds"].length == 0) throw new Error("No snapshot found"); + if (result["snapshotSaveds"].length == 0) return 0; return Number(result["snapshotSaveds"][0].count); }; @@ -99,6 +99,8 @@ const relayAllFrom = async (chainid: number, nonce: number, msgSender: string): const veaOutbox = getVeaOutboxArbToEth(VEAOUTBOX_ADDRESS, process.env.PRIVATE_KEY, RPC_VEAOUTBOX); const count = await getCount(veaOutbox, chainid); + if (!count) return null; + let txns = []; const nonces = await getNonceFrom(chainid, nonce, msgSender); From 8984ea29de07edb6a7b4df4c7750d580d6554a22 Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Thu, 29 Feb 2024 11:12:51 +0530 Subject: [PATCH 32/58] feat: migrate contracts from goerli to sepolia --- contracts/README.md | 30 +- ....ts => 01-arb-sepolia-to-chiado-outbox.ts} | 8 +- ...ts => 01-arb-sepolia-to-sepolia-outbox.ts} | 10 +- .../deploy/01-outbox/01-arb-to-eth-outbox.ts | 10 +- .../01-outbox/01-arb-to-gnosis-outbox.ts | 4 +- ....ts => 01-chiado-to-arb-sepolia-outbox.ts} | 12 +- .../01-outbox/01-gnosis-to-arb-outbox.ts | 8 +- ...x.ts => 02-arb-sepolia-to-chiado-inbox.ts} | 10 +- ....ts => 02-arb-sepolia-to-sepolia-inbox.ts} | 12 +- .../deploy/02-inbox/02-arb-to-eth-inbox.ts | 8 +- .../deploy/02-inbox/02-arb-to-gnosis-inbox.ts | 8 +- ...x.ts => 02-chiado-to-arb-sepolia-inbox.ts} | 6 +- .../deploy/02-inbox/02-gnosis-to-arb-inbox.ts | 4 +- ....ts => 03-arb-sepolia-to-chiado-router.ts} | 12 +- .../03-routers/03-arb-to-gnosis-router.ts | 10 +- ....ts => 03-chiado-to-arb-sepolia-router.ts} | 12 +- .../03-routers/03-gnosis-to-arb-router.ts | 10 +- .../deployments/arbitrumSepolia/.chainId | 1 + .../VeaInboxArbToEthDevnet.json | 443 +++++ contracts/deployments/sepolia/.chainId | 1 + .../sepolia/VeaOutboxArbToEthDevnet.json | 1496 +++++++++++++++++ contracts/hardhat.config.ts | 24 +- contracts/package.json | 20 +- .../scripts/generateDeploymentArtifact.sh | 8 +- .../scripts/generateDeploymentsMarkdown.sh | 8 +- .../arbitrumToEth/VeaOutboxArbToEthDevnet.sol | 4 +- 26 files changed, 2056 insertions(+), 123 deletions(-) rename contracts/deploy/01-outbox/{01-arb-goerli-to-chiado-outbox.ts => 01-arb-sepolia-to-chiado-outbox.ts} (96%) rename contracts/deploy/01-outbox/{01-arb-goerli-to-goerli-outbox.ts => 01-arb-sepolia-to-sepolia-outbox.ts} (95%) rename contracts/deploy/01-outbox/{01-chiado-to-arb-goerli-outbox.ts => 01-chiado-to-arb-sepolia-outbox.ts} (95%) rename contracts/deploy/02-inbox/{02-arb-goerli-to-chiado-inbox.ts => 02-arb-sepolia-to-chiado-inbox.ts} (87%) rename contracts/deploy/02-inbox/{02-arb-goerli-to-goerli-inbox.ts => 02-arb-sepolia-to-sepolia-inbox.ts} (89%) rename contracts/deploy/02-inbox/{02-chiado-to-arb-goerli-inbox.ts => 02-chiado-to-arb-sepolia-inbox.ts} (88%) rename contracts/deploy/03-routers/{03-arb-goerli-to-chiado-router.ts => 03-arb-sepolia-to-chiado-router.ts} (88%) rename contracts/deploy/03-routers/{03-chiado-to-arb-goerli-router.ts => 03-chiado-to-arb-sepolia-router.ts} (88%) create mode 100644 contracts/deployments/arbitrumSepolia/.chainId create mode 100644 contracts/deployments/arbitrumSepolia/VeaInboxArbToEthDevnet.json create mode 100644 contracts/deployments/sepolia/.chainId create mode 100644 contracts/deployments/sepolia/VeaOutboxArbToEthDevnet.json diff --git a/contracts/README.md b/contracts/README.md index 2870e910..7f09cc70 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -8,23 +8,13 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments ### Current version -#### Goerli +#### Sepolia -- [RouterArbToGnosisDevnet](https://goerli.etherscan.io/address/0x6164EA58a1f5359D2E54ea8eB9e5971B7C8dB0f1) -- [RouterArbToGnosisTestnet](https://goerli.etherscan.io/address/0x5Df4452965cd2ff87f205AE5b10b5d0F65223116) -- [RouterGnosisToArbDevnet](https://goerli.etherscan.io/address/0xcC196cC90bD30109E39400817e6ef63A1b744659) -- [RouterGnosisToArbTestnet](https://goerli.etherscan.io/address/0x6bC3C7Bcd2C6C2d8BFEAA3642c425cAE25F7fe17) -- [VeaOutboxArbToEthDevnet](https://goerli.etherscan.io/address/0xDa528e9BE20a8A22437D28Ed6C63bb6d00Ad0032) -- [VeaOutboxArbToEthTestnet](https://goerli.etherscan.io/address/0xDF216C98773DA7998EE49AE8106BFe9724cf2944) +- [VeaOutboxArbToEthDevnet](https://sepolia.etherscan.io/address/0x5AD255400913515C8DA7E82E6b8A109fA5c46135) -#### Arbitrum Goerli +#### Arbitrum Sepolia -- [VeaInboxArbToEthDevnet](https://goerli.arbiscan.io/address/0xE99C6177CD8731DE6F108443CcAf7449074f6aED) -- [VeaInboxArbToEthTestnet](https://goerli.arbiscan.io/address/0x95100f56d040fD48AA52dcDD05A9Fc477d55bd2E) -- [VeaInboxArbToGnosisDevnet](https://goerli.arbiscan.io/address/0xf38b8739635d2F4cb38Bd453453AB9d41fD16300) -- [VeaInboxArbToGnosisTestnet](https://goerli.arbiscan.io/address/0x1418a26Ca3A73a0EA3aBf943E8B524bEFD7C96cD) -- [VeaOutboxGnosisToArbDevnet](https://goerli.arbiscan.io/address/0xE14fA0B3910CB0853E811375B9a6fcEEE32db521) -- [VeaOutboxGnosisToArbTestnet](https://goerli.arbiscan.io/address/0x18AB70ea8dBc7072D1C1C90bA0bC1547d92198CF) +- [VeaInboxArbToEthDevnet](https://sepolia.arbiscan.io/address/0x77e95F54032f467eC45c48C6affc203f93858783) #### Chiado @@ -97,13 +87,13 @@ yarn start-local ##### Testnets ```bash -# ArbitrumGoerli -> Goerli +# arbitrumSepolia -> Goerli yarn deploy --network goerli --tags ArbGoerliToGoerliOutbox -yarn deploy --network arbitrumGoerli --tags ArbGoerliToGoerliInbox +yarn deploy --network arbitrumSepolia --tags ArbGoerliToGoerliInbox -# ArbitrumGoerli -> Chiado +# arbitrumSepolia -> Chiado yarn deploy --network chiado --tags ArbGoerliToChiadoOutbox -yarn deploy --network arbitrumGoerli --tags ArbGoerliToChiadoInbox +yarn deploy --network arbitrumSepolia --tags ArbGoerliToChiadoInbox ``` ##### Mainnets @@ -133,8 +123,8 @@ This must be done for each network separately. ```bash # explorer -yarn etherscan-verify --network +yarn etherscan-verify --network # sourcify -yarn sourcify --network +yarn sourcify --network ``` diff --git a/contracts/deploy/01-outbox/01-arb-goerli-to-chiado-outbox.ts b/contracts/deploy/01-outbox/01-arb-sepolia-to-chiado-outbox.ts similarity index 96% rename from contracts/deploy/01-outbox/01-arb-goerli-to-chiado-outbox.ts rename to contracts/deploy/01-outbox/01-arb-sepolia-to-chiado-outbox.ts index ecb58623..23e754b6 100644 --- a/contracts/deploy/01-outbox/01-arb-goerli-to-chiado-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-sepolia-to-chiado-outbox.ts @@ -18,7 +18,7 @@ const paramsByChainId = { amb: "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", sequencerLimit: 86400, maxMissingBlocks: 10000000000000, - routerChainId: 5, + routerChainId: 11155111, WETH: "0x8d74e5e4DA11629537C4575cB0f33b4F0Dfa42EB", }, HARDHAT: { @@ -45,12 +45,12 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { console.log("deploying to chainId %s with deployer %s", chainId, deployer); const senderNetworks = { - GNOSIS_CHIADO: config.networks.arbitrumGoerli, + GNOSIS_CHIADO: config.networks.arbitrumSepolia, HARDHAT: config.networks.localhost, }; const routerNetworks = { - GNOSIS_CHIADO: config.networks.goerli, + GNOSIS_CHIADO: config.networks.sepolia, HARDHAT: config.networks.localhost, }; @@ -140,7 +140,7 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { } }; -deployOutbox.tags = ["ArbGoerliToChiadoOutbox"]; +deployOutbox.tags = ["ArbSepoliaToChiadoOutbox"]; deployOutbox.skip = async ({ getChainId }) => { const chainId = Number(await getChainId()); console.log(chainId); diff --git a/contracts/deploy/01-outbox/01-arb-goerli-to-goerli-outbox.ts b/contracts/deploy/01-outbox/01-arb-sepolia-to-sepolia-outbox.ts similarity index 95% rename from contracts/deploy/01-outbox/01-arb-goerli-to-goerli-outbox.ts rename to contracts/deploy/01-outbox/01-arb-sepolia-to-sepolia-outbox.ts index ae1cc279..224fec03 100644 --- a/contracts/deploy/01-outbox/01-arb-goerli-to-goerli-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-sepolia-to-sepolia-outbox.ts @@ -5,19 +5,19 @@ import getContractAddress from "../../deploy-helpers/getContractAddress"; import { ethers } from "hardhat"; enum ReceiverChains { - ETHEREUM_GOERLI = 5, + ETHEREUM_SEPOLIA = 11155111, HARDHAT = 31337, } const paramsByChainId = { - ETHEREUM_GOERLI: { + ETHEREUM_SEPOLIA: { deposit: parseEther("0.001"), // Average happy path wait time is 1 hour (30 min, 90 min), happy path only epochPeriod: 1800, // 30 min minChallengePeriod: 0, // 0 min numEpochTimeout: 10000000000000, // never maxMissingBlocks: 10000000000000, - arbitrumBridge: "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", // https://developer.arbitrum.io/useful-addresses + arbitrumBridge: "0x38f918D0E9F1b721EDaA41302E399fa1B79333a9", // https://developer.arbitrum.io/useful-addresses }, HARDHAT: { deposit: parseEther("10"), // 120 eth budget for timeout @@ -41,7 +41,7 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { console.log("deploying to chainId %s with deployer %s", chainId, deployer); const senderNetworks = { - ETHEREUM_GOERLI: config.networks.arbitrumGoerli, + ETHEREUM_SEPOLIA: config.networks.arbitrumSepolia, HARDHAT: config.networks.localhost, }; @@ -128,7 +128,7 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { } }; -deployOutbox.tags = ["ArbGoerliToGoerliOutbox"]; +deployOutbox.tags = ["ArbSepoliaToSepoliaOutbox"]; deployOutbox.skip = async ({ getChainId }) => { const chainId = Number(await getChainId()); console.log(chainId); diff --git a/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts b/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts index f309b342..54be4a29 100644 --- a/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts @@ -6,7 +6,7 @@ import { ethers } from "hardhat"; enum ReceiverChains { ETHEREUM_MAINNET = 1, - ETHEREUM_GOERLI = 5, + ETHEREUM_Sepolia = 11155111, HARDHAT = 31337, } @@ -20,14 +20,14 @@ const paramsByChainId = { maxMissingBlocks: 49, // 49 in 900 slots, assumes 10% non-censoring validators arbitrumBridge: "0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a", // https://developer.arbitrum.io/useful-addresses, }, - ETHEREUM_GOERLI: { + ETHEREUM_SEPOLIA: { deposit: parseEther("1"), // ~100 ETH budget to start, enough for 8 days of challenges // bridging speed is 29 - 31 hours. epochPeriod: 7200, // 2 hours minChallengePeriod: 10800, // 3 hours numEpochTimeout: 1000000, // never - maxMissingBlocks: 1000000, // any, goerli network performance is poor, so can't use the censorship test well - arbitrumBridge: "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", // https://developer.arbitrum.io/useful-addresses + maxMissingBlocks: 1000000, // any, sepolia network performance is poor, so can't use the censorship test well + arbitrumBridge: "0x38f918D0E9F1b721EDaA41302E399fa1B79333a9", // https://developer.arbitrum.io/useful-addresses }, HARDHAT: { deposit: parseEther("10"), @@ -51,7 +51,7 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const senderNetworks = { ETHEREUM_MAINNET: config.networks.arbitrum, - ETHEREUM_GOERLI: config.networks.arbitrumGoerli, + ETHEREUM_SEPOLIA: config.networks.arbitrumSepolia, HARDHAT: config.networks.localhost, }; diff --git a/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts b/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts index e6499664..462ae688 100644 --- a/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-to-gnosis-outbox.ts @@ -30,7 +30,7 @@ const paramsByChainId = { minChallengePeriod: 10800, // 3 hours numEpochTimeout: 1000000, // never maxMissingBlocks: 1000000, // any - routerChainId: 5, + routerChainId: 11155111, amb: "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", WETH: "0x8d74e5e4DA11629537C4575cB0f33b4F0Dfa42EB", sequencerLimit: 86400, // 24 hours @@ -62,7 +62,7 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const routerNetworks = { GNOSIS_MAINNET: config.networks.mainnet, - GNOSIS_CHIADO: config.networks.goerli, + GNOSIS_CHIADO: config.networks.sepolia, HARDHAT: config.networks.localhost, }; diff --git a/contracts/deploy/01-outbox/01-chiado-to-arb-goerli-outbox.ts b/contracts/deploy/01-outbox/01-chiado-to-arb-sepolia-outbox.ts similarity index 95% rename from contracts/deploy/01-outbox/01-chiado-to-arb-goerli-outbox.ts rename to contracts/deploy/01-outbox/01-chiado-to-arb-sepolia-outbox.ts index 16e2ec45..2b1fcfc0 100644 --- a/contracts/deploy/01-outbox/01-chiado-to-arb-goerli-outbox.ts +++ b/contracts/deploy/01-outbox/01-chiado-to-arb-sepolia-outbox.ts @@ -5,12 +5,12 @@ import getContractAddress from "../../deploy-helpers/getContractAddress"; import { ethers } from "hardhat"; enum ReceiverChains { - ARBITRUM_GOERLI = 421613, + ARBITRUM_SEPOLIA = 421614, HARDHAT = 31337, } const paramsByChainId = { - ARBITRUM_GOERLI: { + ARBITRUM_SEPOLIA: { deposit: parseEther("0.1"), epochPeriod: 1800, // 30 min challengePeriod: 0, // 30 min @@ -18,7 +18,7 @@ const paramsByChainId = { sequencerDelayLimit: 86400, sequencerFutureLimit: 3600, maxMissingBlocks: 10000000000000, - routerChainId: 5, + routerChainId: 11155111, }, HARDHAT: { deposit: parseEther("1"), @@ -44,12 +44,12 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { console.log("deploying to chainId %s with deployer %s", chainId, deployer); const senderNetworks = { - ARBITRUM_GOERLI: config.networks.chiado, + ARBITRUM_SEPOLIA: config.networks.chiado, HARDHAT: config.networks.localhost, }; const routerNetworks = { - ARBITRUM_GOERLI: config.networks.goerli, + ARBITRUM_SEPOLIA: config.networks.sepolia, HARDHAT: config.networks.localhost, }; @@ -131,7 +131,7 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { } }; -deployOutbox.tags = ["ChiadoToArbGoerliOutbox"]; +deployOutbox.tags = ["ChiadoToArbSepoliaOutbox"]; deployOutbox.skip = async ({ getChainId }) => { const chainId = Number(await getChainId()); console.log(chainId); diff --git a/contracts/deploy/01-outbox/01-gnosis-to-arb-outbox.ts b/contracts/deploy/01-outbox/01-gnosis-to-arb-outbox.ts index b5eeb8b1..9ee37288 100644 --- a/contracts/deploy/01-outbox/01-gnosis-to-arb-outbox.ts +++ b/contracts/deploy/01-outbox/01-gnosis-to-arb-outbox.ts @@ -5,7 +5,7 @@ import getContractAddress from "../../deploy-helpers/getContractAddress"; import { ethers } from "hardhat"; enum ReceiverChains { - ARBITRUM_GOERLI = 421613, + ARBITRUM_SEPOLIA = 421614, ARBITRUM = 42161, HARDHAT = 31337, } @@ -19,7 +19,7 @@ const paramsByChainId = { sequencerDelayLimit: 86400, sequencerFutureLimit: 3600, }, - ARBITRUM_GOERLI: { + ARBITRUM_SEPOLIA: { deposit: parseEther("4"), epochPeriod: 7200, // 2 hours challengePeriod: 86400, // 24 hours @@ -49,13 +49,13 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const senderNetworks = { ARBITRUM: config.networks.gnosischain, - ARBITRUM_GOERLI: config.networks.chiado, + ARBITRUM_SEPOLIA: config.networks.chiado, HARDHAT: config.networks.localhost, }; const routerNetworks = { ARBITRUM: config.networks.mainnet, - ARBITRUM_GOERLI: config.networks.goerli, + ARBITRUM_SEPOLIA: config.networks.sepolia, HARDHAT: config.networks.localhost, }; diff --git a/contracts/deploy/02-inbox/02-arb-goerli-to-chiado-inbox.ts b/contracts/deploy/02-inbox/02-arb-sepolia-to-chiado-inbox.ts similarity index 87% rename from contracts/deploy/02-inbox/02-arb-goerli-to-chiado-inbox.ts rename to contracts/deploy/02-inbox/02-arb-sepolia-to-chiado-inbox.ts index 70f80216..57b10ad9 100644 --- a/contracts/deploy/02-inbox/02-arb-goerli-to-chiado-inbox.ts +++ b/contracts/deploy/02-inbox/02-arb-sepolia-to-chiado-inbox.ts @@ -2,12 +2,12 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; enum SenderChains { - ARBITRUM_GOERLI = 421613, + ARBITRUM_SEPOLIA = 421614, HARDHAT = 31337, } const paramsByChainId = { - ARBITRUM_GOERLI: { + ARBITRUM_SEPOLIA: { epochPeriod: 1800, // 1 hour }, HARDHAT: { @@ -18,7 +18,7 @@ const paramsByChainId = { // TODO: use deterministic deployments const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployments, getNamedAccounts, getChainId } = hre; - const { deploy, execute } = deployments; + const { deploy } = deployments; const chainId = Number(await getChainId()); const deployer = (await getNamedAccounts()).deployer; @@ -40,11 +40,11 @@ const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { console.log("VeaInboxArbToGnosisDevnet deployed to: %s", inbox.address); }; -deployInbox.tags = ["ArbGoerliToChiadoInbox"]; +deployInbox.tags = ["ArbSepoliaToChiadoInbox"]; deployInbox.skip = async ({ getChainId }) => { const chainId = Number(await getChainId()); console.log(chainId); - return !(chainId === 421613 || chainId === 31337); + return !(chainId === 421614 || chainId === 31337); }; deployInbox.runAtTheEnd = true; diff --git a/contracts/deploy/02-inbox/02-arb-goerli-to-goerli-inbox.ts b/contracts/deploy/02-inbox/02-arb-sepolia-to-sepolia-inbox.ts similarity index 89% rename from contracts/deploy/02-inbox/02-arb-goerli-to-goerli-inbox.ts rename to contracts/deploy/02-inbox/02-arb-sepolia-to-sepolia-inbox.ts index c2c1206f..9c891b51 100644 --- a/contracts/deploy/02-inbox/02-arb-goerli-to-goerli-inbox.ts +++ b/contracts/deploy/02-inbox/02-arb-sepolia-to-sepolia-inbox.ts @@ -2,12 +2,12 @@ import { HardhatRuntimeEnvironment } from "hardhat/types"; import { DeployFunction } from "hardhat-deploy/types"; enum SenderChains { - ARBITRUM_GOERLI = 421613, + ARBITRUM_SEPOLIA = 421614, HARDHAT = 31337, } const paramsByChainId = { - ARBITRUM_GOERLI: { + ARBITRUM_SEPOLIA: { epochPeriod: 1800, // 1 hour }, HARDHAT: { @@ -18,7 +18,7 @@ const paramsByChainId = { // TODO: use deterministic deployments const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployments, getNamedAccounts, getChainId } = hre; - const { deploy, execute } = deployments; + const { deploy } = deployments; const chainId = Number(await getChainId()); // fallback to hardhat node signers on local network @@ -65,7 +65,7 @@ const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { // ---------------------------------------------------------------------------------------------- const liveDeployer = async () => { - const veaOutbox = await hre.companionNetworks.goerli.deployments.get("VeaOutboxArbToEthDevnet"); + const veaOutbox = await hre.companionNetworks.sepolia.deployments.get("VeaOutboxArbToEthDevnet"); await deploy("VeaInboxArbToEthDevnet", { from: deployer, @@ -83,11 +83,11 @@ const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { } }; -deployInbox.tags = ["ArbGoerliToGoerliInbox"]; +deployInbox.tags = ["ArbSepoliaToSepoliaInbox"]; deployInbox.skip = async ({ getChainId }) => { const chainId = Number(await getChainId()); console.log(chainId); - return !(chainId === 421613 || chainId === 31337); + return !(chainId === 421614 || chainId === 31337); }; deployInbox.runAtTheEnd = true; diff --git a/contracts/deploy/02-inbox/02-arb-to-eth-inbox.ts b/contracts/deploy/02-inbox/02-arb-to-eth-inbox.ts index e0dac936..08b9f044 100644 --- a/contracts/deploy/02-inbox/02-arb-to-eth-inbox.ts +++ b/contracts/deploy/02-inbox/02-arb-to-eth-inbox.ts @@ -3,7 +3,7 @@ import { DeployFunction } from "hardhat-deploy/types"; enum SenderChains { ARBITRUM = 42161, - ARBITRUM_GOERLI = 421613, + ARBITRUM_SEPOLIA = 421614, HARDHAT = 31337, } const paramsByChainId = { @@ -11,9 +11,9 @@ const paramsByChainId = { epochPeriod: 7200, // 2 hours companion: (hre: HardhatRuntimeEnvironment) => hre.companionNetworks.mainnet, }, - ARBITRUM_GOERLI: { + ARBITRUM_SEPOLIA: { epochPeriod: 7200, // 2 hours - companion: (hre: HardhatRuntimeEnvironment) => hre.companionNetworks.goerli, + companion: (hre: HardhatRuntimeEnvironment) => hre.companionNetworks.sepolia, }, HARDHAT: { epochPeriod: 600, // 10 minutes @@ -22,7 +22,7 @@ const paramsByChainId = { const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployments, getNamedAccounts, getChainId } = hre; - const { deploy, execute } = deployments; + const { deploy } = deployments; const chainId = Number(await getChainId()); // fallback to hardhat node signers on local network diff --git a/contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts b/contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts index bee0f63f..7bf86668 100644 --- a/contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts +++ b/contracts/deploy/02-inbox/02-arb-to-gnosis-inbox.ts @@ -4,14 +4,14 @@ import getContractAddress from "../../deploy-helpers/getContractAddress"; enum SenderChains { ARBITRUM = 42161, - ARBITRUM_GOERLI = 421613, + ARBITRUM_SEPOLIA = 421614, HARDHAT = 31337, } const paramsByChainId = { ARBITRUM: { epochPeriod: 3600, // 1 hours }, - ARBITRUM_GOERLI: { + ARBITRUM_SEPOLIA: { epochPeriod: 3600, // 1 hours }, HARDHAT: { @@ -22,7 +22,7 @@ const paramsByChainId = { // TODO: use deterministic deployments const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { ethers, deployments, getNamedAccounts, getChainId, config } = hre; - const { deploy, execute } = deployments; + const { deploy } = deployments; const chainId = Number(await getChainId()); const { providers } = ethers; @@ -33,7 +33,7 @@ const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const routerNetworks = { ARBITRUM: config.networks.mainnet, - ARBITRUM_GOERLI: config.networks.goerli, + ARBITRUM_SEPOLIA: config.networks.sepolia, HARDHAT: config.networks.localhost, }; diff --git a/contracts/deploy/02-inbox/02-chiado-to-arb-goerli-inbox.ts b/contracts/deploy/02-inbox/02-chiado-to-arb-sepolia-inbox.ts similarity index 88% rename from contracts/deploy/02-inbox/02-chiado-to-arb-goerli-inbox.ts rename to contracts/deploy/02-inbox/02-chiado-to-arb-sepolia-inbox.ts index 899c0f74..141e7a31 100644 --- a/contracts/deploy/02-inbox/02-chiado-to-arb-goerli-inbox.ts +++ b/contracts/deploy/02-inbox/02-chiado-to-arb-sepolia-inbox.ts @@ -21,7 +21,7 @@ const paramsByChainId = { // TODO: use deterministic deployments const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployments, getNamedAccounts, getChainId } = hre; - const { deploy, execute } = deployments; + const { deploy } = deployments; const chainId = Number(await getChainId()); const deployer = (await getNamedAccounts()).deployer; @@ -31,7 +31,7 @@ const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { // ---------------------------------------------------------------------------------------------- - const veaOutboxArb = await hre.companionNetworks.arbitrumGoerli.deployments.get("VeaOutboxGnosisToArbDevnet"); + const veaOutboxArb = await hre.companionNetworks.arbitrumSepolia.deployments.get("VeaOutboxGnosisToArbDevnet"); const gasOptions = { maxFeePerGas: ethers.utils.parseUnits("1", "gwei"), @@ -49,7 +49,7 @@ const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { console.log("VeaInboxGnosisToArbDevnet deployed to: %s", inbox.address); }; -deployInbox.tags = ["ChiadoToArbGoerliInbox"]; +deployInbox.tags = ["ChiadoToArbSepoliaInbox"]; deployInbox.skip = async ({ getChainId }) => { const chainId = Number(await getChainId()); console.log(chainId); diff --git a/contracts/deploy/02-inbox/02-gnosis-to-arb-inbox.ts b/contracts/deploy/02-inbox/02-gnosis-to-arb-inbox.ts index 742d785b..f9d13042 100644 --- a/contracts/deploy/02-inbox/02-gnosis-to-arb-inbox.ts +++ b/contracts/deploy/02-inbox/02-gnosis-to-arb-inbox.ts @@ -25,7 +25,7 @@ const paramsByChainId = { // TODO: use deterministic deployments const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployments, getNamedAccounts, getChainId } = hre; - const { deploy, execute } = deployments; + const { deploy } = deployments; const chainId = Number(await getChainId()); const deployer = (await getNamedAccounts()).deployer; @@ -35,7 +35,7 @@ const deployInbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { // ---------------------------------------------------------------------------------------------- - const veaOutboxArb = await hre.companionNetworks.arbitrumGoerli.deployments.get( + const veaOutboxArb = await hre.companionNetworks.arbitrumSepolia.deployments.get( "VeaOutboxGnosisToArb" + (chainId === 100 ? "" : "Testnet") ); diff --git a/contracts/deploy/03-routers/03-arb-goerli-to-chiado-router.ts b/contracts/deploy/03-routers/03-arb-sepolia-to-chiado-router.ts similarity index 88% rename from contracts/deploy/03-routers/03-arb-goerli-to-chiado-router.ts rename to contracts/deploy/03-routers/03-arb-sepolia-to-chiado-router.ts index d4978d65..b9ec0e7a 100644 --- a/contracts/deploy/03-routers/03-arb-goerli-to-chiado-router.ts +++ b/contracts/deploy/03-routers/03-arb-sepolia-to-chiado-router.ts @@ -3,13 +3,13 @@ import { DeployFunction } from "hardhat-deploy/types"; import { ethers } from "hardhat"; enum RouterChains { - ETHEREUM_GOERLI = 5, + ETHEREUM_SEPOLIA = 11155111, HARDHAT = 31337, } const paramsByChainId = { - ETHEREUM_GOERLI: { - arbitrumBridge: "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", // https://developer.arbitrum.io/useful-addresses + ETHEREUM_SEPOLIA: { + arbitrumBridge: "0x38f918D0E9F1b721EDaA41302E399fa1B79333a9", // https://developer.arbitrum.io/useful-addresses amb: "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", }, HARDHAT: { @@ -21,7 +21,7 @@ const paramsByChainId = { // TODO: use deterministic deployments const deployRouter: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployments, getNamedAccounts, getChainId } = hre; - const { deploy, execute } = deployments; + const { deploy } = deployments; const chainId = Number(await getChainId()); // fallback to hardhat node signers on local network @@ -45,7 +45,7 @@ const deployRouter: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { // ---------------------------------------------------------------------------------------------- const liveDeployer = async () => { const veaOutbox = await hre.companionNetworks.chiado.deployments.get("VeaOutboxArbToGnosisDevnet"); - const veaInbox = await hre.companionNetworks.arbitrumGoerli.deployments.get("VeaInboxArbToGnosisDevnet"); + const veaInbox = await hre.companionNetworks.arbitrumSepolia.deployments.get("VeaInboxArbToGnosisDevnet"); const router = await deploy("RouterArbToGnosisDevnet", { from: deployer, @@ -65,7 +65,7 @@ const deployRouter: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { } }; -deployRouter.tags = ["ArbGoerliToChiadoRouter"]; +deployRouter.tags = ["ArbSepoliaToChiadoRouter"]; deployRouter.skip = async ({ getChainId }) => { const chainId = Number(await getChainId()); console.log(chainId); diff --git a/contracts/deploy/03-routers/03-arb-to-gnosis-router.ts b/contracts/deploy/03-routers/03-arb-to-gnosis-router.ts index bda10b14..1937d186 100644 --- a/contracts/deploy/03-routers/03-arb-to-gnosis-router.ts +++ b/contracts/deploy/03-routers/03-arb-to-gnosis-router.ts @@ -4,7 +4,7 @@ import { ethers } from "hardhat"; enum RouterChains { ETHEREUM_MAINNET = 1, - ETHEREUM_GOERLI = 5, + ETHEREUM_SEPOLIA = 11155111, HARDHAT = 31337, } @@ -13,8 +13,8 @@ const paramsByChainId = { arbitrumBridge: "0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a", // https://developer.arbitrum.io/useful-addresses amb: "0x4C36d2919e407f0Cc2Ee3c993ccF8ac26d9CE64e", }, - ETHEREUM_GOERLI: { - arbitrumBridge: "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", // https://developer.arbitrum.io/useful-addresses + ETHEREUM_SEPOLIA: { + arbitrumBridge: "0x38f918D0E9F1b721EDaA41302E399fa1B79333a9", // https://developer.arbitrum.io/useful-addresses amb: "0x87A19d769D875964E9Cd41dDBfc397B2543764E6", }, HARDHAT: { @@ -26,7 +26,7 @@ const paramsByChainId = { // TODO: use deterministic deployments const deployRouter: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployments, getNamedAccounts, getChainId } = hre; - const { deploy, execute } = deployments; + const { deploy } = deployments; const chainId = Number(await getChainId()); // fallback to hardhat node signers on local network @@ -50,7 +50,7 @@ const deployRouter: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { // ---------------------------------------------------------------------------------------------- const liveDeployer = async () => { const outboxNetwork = chainId === 1 ? hre.companionNetworks.gnosischain : hre.companionNetworks.chiado; - const inboxNetwork = chainId === 1 ? hre.companionNetworks.arbitrum : hre.companionNetworks.arbitrumGoerli; + const inboxNetwork = chainId === 1 ? hre.companionNetworks.arbitrum : hre.companionNetworks.arbitrumSepolia; const veaOutbox = await outboxNetwork.deployments.get("VeaOutboxArbToGnosis" + (chainId === 1 ? "" : "Testnet")); const veaInbox = await inboxNetwork.deployments.get("VeaInboxArbToGnosis" + (chainId === 1 ? "" : "Testnet")); diff --git a/contracts/deploy/03-routers/03-chiado-to-arb-goerli-router.ts b/contracts/deploy/03-routers/03-chiado-to-arb-sepolia-router.ts similarity index 88% rename from contracts/deploy/03-routers/03-chiado-to-arb-goerli-router.ts rename to contracts/deploy/03-routers/03-chiado-to-arb-sepolia-router.ts index 6241f310..c792cdde 100644 --- a/contracts/deploy/03-routers/03-chiado-to-arb-goerli-router.ts +++ b/contracts/deploy/03-routers/03-chiado-to-arb-sepolia-router.ts @@ -3,13 +3,13 @@ import { DeployFunction } from "hardhat-deploy/types"; import { ethers } from "hardhat"; enum RouterChains { - ETHEREUM_GOERLI = 5, + ETHEREUM_SEPOLIA = 11155111, HARDHAT = 31337, } const paramsByChainId = { - ETHEREUM_GOERLI: { - arbitrumBridge: "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", // https://developer.arbitrum.io/useful-addresses + ETHEREUM_SEPOLIA: { + arbitrumBridge: "0x38f918D0E9F1b721EDaA41302E399fa1B79333a9", // https://developer.arbitrum.io/useful-addresses amb: "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", }, HARDHAT: { @@ -21,7 +21,7 @@ const paramsByChainId = { // TODO: use deterministic deployments const deployRouter: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployments, getNamedAccounts, getChainId } = hre; - const { deploy, execute } = deployments; + const { deploy } = deployments; const chainId = Number(await getChainId()); // fallback to hardhat node signers on local network @@ -44,7 +44,7 @@ const deployRouter: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { // ---------------------------------------------------------------------------------------------- const liveDeployer = async () => { - const veaOutbox = await hre.companionNetworks.arbitrumGoerli.deployments.get("VeaOutboxGnosisToArbDevnet"); + const veaOutbox = await hre.companionNetworks.arbitrumSepolia.deployments.get("VeaOutboxGnosisToArbDevnet"); const veaInbox = await hre.companionNetworks.chiado.deployments.get("VeaInboxGnosisToArbDevnet"); const router = await deploy("RouterGnosisToArbDevnet", { @@ -65,7 +65,7 @@ const deployRouter: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { } }; -deployRouter.tags = ["ChiadoToArbGoerliRouter"]; +deployRouter.tags = ["ChiadoToArbSepoliaRouter"]; deployRouter.skip = async ({ getChainId }) => { const chainId = Number(await getChainId()); console.log(chainId); diff --git a/contracts/deploy/03-routers/03-gnosis-to-arb-router.ts b/contracts/deploy/03-routers/03-gnosis-to-arb-router.ts index 503a4483..3ada1e8c 100644 --- a/contracts/deploy/03-routers/03-gnosis-to-arb-router.ts +++ b/contracts/deploy/03-routers/03-gnosis-to-arb-router.ts @@ -4,7 +4,7 @@ import { ethers } from "hardhat"; enum RouterChains { ETHEREUM_MAINNET = 1, - ETHEREUM_GOERLI = 5, + ETHEREUM_SEPOLIA = 11155111, HARDHAT = 31337, } @@ -13,8 +13,8 @@ const paramsByChainId = { arbitrumBridge: "0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a", // https://developer.arbitrum.io/useful-addresses amb: "0x4C36d2919e407f0Cc2Ee3c993ccF8ac26d9CE64e", }, - ETHEREUM_GOERLI: { - arbitrumBridge: "0xaf4159A80B6Cc41ED517DB1c453d1Ef5C2e4dB72", // https://developer.arbitrum.io/useful-addresses + ETHEREUM_SEPOLIA: { + arbitrumBridge: "0x38f918D0E9F1b721EDaA41302E399fa1B79333a9", // https://developer.arbitrum.io/useful-addresses amb: "0x99Ca51a3534785ED619f46A79C7Ad65Fa8d85e7a", }, HARDHAT: { @@ -26,7 +26,7 @@ const paramsByChainId = { // TODO: use deterministic deployments const deployRouter: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployments, getNamedAccounts, getChainId } = hre; - const { deploy, execute } = deployments; + const { deploy } = deployments; const chainId = Number(await getChainId()); // fallback to hardhat node signers on local network @@ -49,7 +49,7 @@ const deployRouter: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { // ---------------------------------------------------------------------------------------------- const liveDeployer = async () => { - const outboxNetwork = chainId === 1 ? hre.companionNetworks.arbitrum : hre.companionNetworks.arbitrumGoerli; + const outboxNetwork = chainId === 1 ? hre.companionNetworks.arbitrum : hre.companionNetworks.arbitrumSepolia; const inboxNetwork = chainId === 1 ? hre.companionNetworks.gnosischain : hre.companionNetworks.chiado; const veaOutbox = await outboxNetwork.deployments.get("VeaOutboxGnosisToArb" + (chainId === 1 ? "" : "Testnet")); const veaInbox = await inboxNetwork.deployments.get("VeaInboxGnosisToArb" + (chainId === 1 ? "" : "Testnet")); diff --git a/contracts/deployments/arbitrumSepolia/.chainId b/contracts/deployments/arbitrumSepolia/.chainId new file mode 100644 index 00000000..71ba4d63 --- /dev/null +++ b/contracts/deployments/arbitrumSepolia/.chainId @@ -0,0 +1 @@ +421614 \ No newline at end of file diff --git a/contracts/deployments/arbitrumSepolia/VeaInboxArbToEthDevnet.json b/contracts/deployments/arbitrumSepolia/VeaInboxArbToEthDevnet.json new file mode 100644 index 00000000..bbe1c3b7 --- /dev/null +++ b/contracts/deployments/arbitrumSepolia/VeaInboxArbToEthDevnet.json @@ -0,0 +1,443 @@ +{ + "address": "0x77e95F54032f467eC45c48C6affc203f93858783", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epochPeriod", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_veaOutboxArbToEth", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "_nodeData", + "type": "bytes" + } + ], + "name": "MessageSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "_snapshot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_count", + "type": "uint64" + } + ], + "name": "SnapshotSaved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_epochSent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_ticketId", + "type": "bytes32" + } + ], + "name": "SnapshotSent", + "type": "event" + }, + { + "inputs": [], + "name": "count", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "epochAt", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochFinalized", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochNow", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "saveSnapshot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "_fnSelector", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "sendMessage", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "sendSnapshot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "snapshots", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "veaOutboxArbToEth", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x21357eab5e1d940f2909ca59ba77760fb61677fa3bd97f5831eef0209f2799f4", + "receipt": { + "to": null, + "from": "0x7D81bD51FF105985725C2Eff263b0E46e6499577", + "contractAddress": "0x77e95F54032f467eC45c48C6affc203f93858783", + "transactionIndex": 1, + "gasUsed": "683221", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x074190afa073de2e9bc304dc3e7115d8d9eda8a257bd8dd4a0a7851a7f6e3d74", + "transactionHash": "0x21357eab5e1d940f2909ca59ba77760fb61677fa3bd97f5831eef0209f2799f4", + "logs": [], + "blockNumber": 18210847, + "cumulativeGasUsed": "683221", + "status": 1, + "byzantium": true + }, + "args": [ + 1800, + "0x5AD255400913515C8DA7E82E6b8A109fA5c46135" + ], + "numDeployments": 2, + "solcInputHash": "995f432004e58df27d898b941aa741c9", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaOutboxArbToEth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_nodeData\",\"type\":\"bytes\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_snapshot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_count\",\"type\":\"uint64\"}],\"name\":\"SnapshotSaved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epochSent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_ticketId\",\"type\":\"bytes32\"}],\"name\":\"SnapshotSent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"count\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochFinalized\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saveSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes4\",\"name\":\"_fnSelector\",\"type\":\"bytes4\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"sendSnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"snapshots\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaOutboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.\",\"events\":{\"MessageSent(bytes)\":{\"details\":\"Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\",\"params\":{\"_nodeData\":\"The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\"}},\"SnapshotSaved(bytes32,uint256,uint64)\":{\"params\":{\"_count\":\"The count of messages in the merkle tree.\",\"_epoch\":\"The epoch of the snapshot.\",\"_snapshot\":\"The snapshot of the merkle tree state root.\"}},\"SnapshotSent(uint256,bytes32)\":{\"details\":\"The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\",\"params\":{\"_epochSent\":\"The epoch of the snapshot.\",\"_ticketId\":\"The ticketId of the L2->L1 message.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\",\"params\":{\"_epochPeriod\":\"The duration in seconds between epochs.\",\"_veaOutboxArbToEth\":\"The veaOutbox on ethereum.\"}},\"epochAt(uint256)\":{\"details\":\"Get the epoch from the inbox's point of view using timestamp.\",\"params\":{\"_timestamp\":\"The timestamp to calculate the epoch from.\"},\"returns\":{\"epoch\":\"The calculated epoch.\"}},\"epochFinalized()\":{\"details\":\"Get the most recent epoch for which snapshots are finalized.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\",\"returns\":{\"epoch\":\"The epoch associated with the current inbox block.timestamp\"}},\"saveSnapshot()\":{\"details\":\"Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state.\"},\"sendMessage(address,bytes4,bytes)\":{\"details\":\"Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.\",\"params\":{\"_data\":\"The message calldata, abi.encode(param1, param2, ...)\",\"_fnSelector\":\"The function selector of the receiving contract.\",\"_to\":\"The address of the contract on the receiving chain which receives the calldata.\"},\"returns\":{\"_0\":\"msgId The zero based index of the message in the inbox.\"}},\"sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the state root snapshot using Arbitrum's canonical bridge.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the snapshot requested to send.\"}}},\"version\":1},\"userdoc\":{\"events\":{\"SnapshotSaved(bytes32,uint256,uint64)\":{\"notice\":\"The bridgers can watch this event to claim the stateRoot on the veaOutbox.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":\"VeaInboxArbToEth\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaInboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/IArbSys.sol\\\";\\nimport \\\"../interfaces/inboxes/IVeaInbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Inbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Arbitrum.\\ncontract VeaInboxArbToEth is IVeaInbox {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n // Arbitrum precompile ArbSys for L2->L1 messaging: https://developer.arbitrum.io/arbos/precompiles#arbsys\\n IArbSys internal constant ARB_SYS = IArbSys(address(100));\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n address public immutable veaOutboxArbToEth; // The vea outbox on ethereum.\\n\\n mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot\\n\\n // Inbox represents minimum data availability to maintain incremental merkle tree.\\n // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state.\\n\\n bytes32[64] internal inbox; // stores minimal set of complete subtree roots of the merkle tree to increment.\\n uint64 public count; // count of messages in the merkle tree\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.\\n /// @param _nodeData The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message).\\n event MessageSent(bytes _nodeData);\\n\\n /// The bridgers can watch this event to claim the stateRoot on the veaOutbox.\\n /// @param _snapshot The snapshot of the merkle tree state root.\\n /// @param _epoch The epoch of the snapshot.\\n /// @param _count The count of messages in the merkle tree.\\n event SnapshotSaved(bytes32 _snapshot, uint256 _epoch, uint64 _count);\\n\\n /// @dev The event is emitted when a snapshot is sent through the canonical arbitrum bridge.\\n /// @param _epochSent The epoch of the snapshot.\\n /// @param _ticketId The ticketId of the L2->L1 message.\\n event SnapshotSent(uint256 indexed _epochSent, bytes32 _ticketId);\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _epochPeriod The duration in seconds between epochs.\\n /// @param _veaOutboxArbToEth The veaOutbox on ethereum.\\n constructor(uint256 _epochPeriod, address _veaOutboxArbToEth) {\\n epochPeriod = _epochPeriod;\\n veaOutboxArbToEth = _veaOutboxArbToEth;\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Sends an arbitrary message to Ethereum.\\n /// `O(log(count))` where count is the number of messages already sent.\\n /// Amortized cost is constant.\\n /// Note: See docs for details how inbox manages merkle tree state.\\n /// @param _to The address of the contract on the receiving chain which receives the calldata.\\n /// @param _fnSelector The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(param1, param2, ...)\\n /// @return msgId The zero based index of the message in the inbox.\\n function sendMessage(address _to, bytes4 _fnSelector, bytes memory _data) external override returns (uint64) {\\n uint64 oldCount = count;\\n\\n // Given arbitrum's speed limit of 7 million gas / second, it would take atleast 8 million years of full blocks to overflow.\\n // It *should* be impossible to overflow, but we check to be safe when appending to the tree.\\n require(oldCount < type(uint64).max, \\\"Inbox is full.\\\");\\n\\n bytes memory nodeData = abi.encodePacked(\\n oldCount,\\n _to,\\n // _data is abi.encode(param1, param2, ...), we need to encode it again to get the correct leaf data\\n abi.encodePacked( // equivalent to abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n _fnSelector,\\n bytes32(uint256(uint160(msg.sender))), // big endian padded encoding of msg.sender, simulating abi.encodeWithSelector\\n _data\\n )\\n );\\n\\n // single hashed leaf\\n bytes32 newInboxNode = keccak256(nodeData);\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n // efficient hash using EVM scratch space\\n mstore(0x00, newInboxNode)\\n newInboxNode := keccak256(0x00, 0x20)\\n }\\n\\n // increment merkle tree calculating minimal number of hashes\\n unchecked {\\n uint256 height;\\n\\n // x = oldCount + 1; acts as a bit mask to determine if a hash is needed\\n // note: x is always non-zero, and x is bit shifted to the right each loop\\n // hence this loop will always terminate in a maximum of log_2(oldCount + 1) iterations\\n for (uint64 x = oldCount + 1; x & 1 == 0; x = x >> 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n newInboxNode = sortConcatAndHash(inbox[height], newInboxNode);\\n height++;\\n }\\n\\n inbox[height] = newInboxNode;\\n\\n // finally increment count\\n count = oldCount + 1;\\n }\\n\\n emit MessageSent(nodeData);\\n\\n // old count is the zero indexed leaf position in the tree, acts as a msgId\\n // gateways should index these msgIds to later relay proofs\\n return oldCount;\\n }\\n\\n /// @dev Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch.\\n /// `O(log(count))` where count number of messages in the inbox.\\n /// Note: See merkle tree docs for details how inbox manages state.\\n function saveSnapshot() external {\\n uint256 epoch;\\n bytes32 stateRoot;\\n\\n unchecked {\\n epoch = block.timestamp / epochPeriod;\\n\\n // calculate the current root of the incremental merkle tree encoded in the inbox\\n\\n uint256 height;\\n\\n // x acts as a bit mask to determine if the hash stored in the inbox contributes to the root\\n uint256 x;\\n\\n // x is bit shifted to the right each loop, hence this loop will always terminate in a maximum of log_2(count) iterations\\n for (x = uint256(count); x > 0; x = x >> 1) {\\n if ((x & 1) == 1) {\\n // first hash is special case\\n // inbox stores the root of complete subtrees\\n // eg if count = 4 = 0b100, then the first complete subtree is inbox[2]\\n // inbox = [H(3), H(1,2), H(1,4)], we read inbox[2] directly\\n\\n stateRoot = inbox[height];\\n break;\\n }\\n height++;\\n }\\n\\n // after the first hash, we can calculate the root incrementally\\n for (x = x >> 1; x > 0; x = x >> 1) {\\n height++;\\n if ((x & 1) == 1) {\\n // sort sibling hashes as a convention for efficient proof validation\\n stateRoot = sortConcatAndHash(inbox[height], stateRoot);\\n }\\n }\\n }\\n\\n snapshots[epoch] = stateRoot;\\n\\n emit SnapshotSaved(stateRoot, epoch, count);\\n }\\n\\n /// @dev Helper function to calculate merkle tree interior nodes by sorting and concatenating and hashing a pair of children nodes, left and right.\\n /// Note: EVM scratch space is used to efficiently calculate hashes.\\n /// @param _left The left hash.\\n /// @param _right The right hash.\\n /// @return parent The parent hash.\\n function sortConcatAndHash(bytes32 _left, bytes32 _right) internal pure returns (bytes32 parent) {\\n // sort sibling hashes as a convention for efficient proof validation\\n if (_left < _right) {\\n // efficient hash using EVM scratch space\\n assembly {\\n mstore(0x00, _left)\\n mstore(0x20, _right)\\n parent := keccak256(0x00, 0x40)\\n }\\n } else {\\n assembly {\\n mstore(0x00, _right)\\n mstore(0x20, _left)\\n parent := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n /// @dev Sends the state root snapshot using Arbitrum's canonical bridge.\\n /// @param _epoch The epoch of the snapshot requested to send.\\n /// @param _claim The claim associated with the epoch.\\n function sendSnapshot(uint256 _epoch, Claim memory _claim) external virtual {\\n unchecked {\\n require(_epoch < block.timestamp / epochPeriod, \\\"Can only send past epoch snapshot.\\\");\\n }\\n\\n bytes memory data = abi.encodeCall(IVeaOutboxOnL1.resolveDisputedClaim, (_epoch, snapshots[_epoch], _claim));\\n\\n // Arbitrum -> Ethereum message with native bridge\\n // docs: https://developer.arbitrum.io/for-devs/cross-chain-messsaging#arbitrum-to-ethereum-messaging\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/arbitrum/GreeterL2.sol#L25\\n bytes32 ticketID = bytes32(ARB_SYS.sendTxToL1(veaOutboxArbToEth, data));\\n\\n emit SnapshotSent(_epoch, ticketID);\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the most recent epoch for which snapshots are finalized.\\n /// @return epoch The epoch associated with the current inbox block.timestamp\\n function epochFinalized() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n /// @dev Get the epoch from the inbox's point of view using timestamp.\\n /// @param _timestamp The timestamp to calculate the epoch from.\\n /// @return epoch The calculated epoch.\\n function epochAt(uint256 _timestamp) external view returns (uint256 epoch) {\\n epoch = _timestamp / epochPeriod;\\n }\\n}\\n\",\"keccak256\":\"0x33b5ac67822e209e961ff08283894a63a21504b4f72513d0252b0549e2fa8823\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IArbSys.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://developer.arbitrum.io/arbos/precompiles#arbsys\\n// https://github.com/OffchainLabs/nitro-contracts/blob/39ea5a163afc637e2706d9be29cf7a289c300d00/src/precompiles/ArbSys.sol\\n// https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\n///@title System level functionality\\n///@notice For use by contracts to interact with core L2-specific functionality.\\n///Precompiled contract that exists in every Arbitrum chain at address(100), 0x0000000000000000000000000000000000000064.\\ninterface IArbSys {\\n /// @notice Send a transaction to L1\\n /// @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data\\n /// to a contract address without any code (as enforced by the Bridge contract).\\n /// @param destination recipient address on L1\\n /// @param data (optional) calldata for L1 contract call\\n /// @return a unique identifier for this L2-to-L1 transaction.\\n function sendTxToL1(address destination, bytes calldata data) external payable returns (uint256);\\n}\\n\",\"keccak256\":\"0x3fa882c5e22ffbecade5c5977083de1bedb8e75599c38ec22816e654173c8d6b\",\"license\":\"BUSL-1.1\"},\"src/interfaces/inboxes/IVeaInbox.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\ninterface IVeaInbox {\\n /// @dev Sends an arbitrary message to receiving chain.\\n /// Note: Calls authenticated by receiving gateway checking the sender argument.\\n /// @param _to The cross-domain contract address which receives the calldata.\\n /// @param _fnSelection The function selector of the receiving contract.\\n /// @param _data The message calldata, abi.encode(...)\\n /// @return msgId The index of the message in the inbox, as a message Id, needed to relay the message.\\n function sendMessage(address _to, bytes4 _fnSelection, bytes memory _data) external returns (uint64 msgId);\\n\\n /// @dev Snapshots can be saved a maximum of once per epoch.\\n /// Saves snapshot of state root.\\n /// `O(log(count))` where count number of messages in the inbox.\\n function saveSnapshot() external;\\n}\\n\",\"keccak256\":\"0x053799bf55019a7f1db4cd889ce83cbe7319e832eec0234b1d4020a2aa0026f9\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c060405234801561001057600080fd5b50604051610c34380380610c3483398101604081905261002f91610046565b6080919091526001600160a01b031660a052610083565b6000806040838503121561005957600080fd5b825160208401519092506001600160a01b038116811461007857600080fd5b809150509250929050565b60805160a051610b626100d26000396000818161012801526105e1015260008181610167015281816101c3015281816101f60152818161022c0152818161025c01526104ee0152610b626000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80635f85896c116100665780635f85896c14610110578063744b49bf14610123578063b5b7a18414610162578063c705e41214610189578063d6565a2d1461019c57600080fd5b806306661abd146100a3578063222ae786146100d55780633ac3b6b6146100eb5780634a439cfe146100f35780635192053514610106575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101bc565b6040519081526020016100cc565b6100dd6101ed565b6100dd6101013660046106bd565b610225565b61010e610257565b005b6100b761011e366004610762565b61037b565b61014a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010e61019736600461083b565b6104ec565b6100dd6101aa3660046106bd565b60006020819052908152604090205481565b60006101e87f000000000000000000000000000000000000000000000000000000000000000042610903565b905090565b6000600161021b7f000000000000000000000000000000000000000000000000000000000000000042610903565b6101e89190610925565b60006102517f000000000000000000000000000000000000000000000000000000000000000083610903565b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000004281610289576102896108ed565b604154919004925060009067ffffffffffffffff165b80156102d857806001166001036102cc57600182604081106102c3576102c3610946565b015492506102d8565b6001918201911c61029f565b60011c5b801561031a5760019182019181811690036103125761030f6001836040811061030757610307610946565b01548461068c565b92505b60011c6102dc565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103d25760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103ee90889033908990602001610980565b60408051601f198184030181529082905261040d9392916020016109b6565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610471576104596001836040811061030757610307610946565b92506001918201911c677fffffffffffffff16610438565b50816001826040811061048657610486610946565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104d9908490610a31565b60405180910390a1509095945050505050565b7f0000000000000000000000000000000000000000000000000000000000000000428161051b5761051b6108ed565b0482106105755760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084016103c9565b6000828152602081905260408082205490516105979185918590602401610a4b565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a9061060b907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ae7565b6020604051808303816000875af115801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e9190610b13565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6000818310156106aa57826000528160205260406000209050610251565b5060009081526020919091526040902090565b6000602082840312156106cf57600080fd5b5035919050565b80356001600160a01b03811681146106ed57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff8111828210171561072b5761072b6106f2565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561075a5761075a6106f2565b604052919050565b60008060006060848603121561077757600080fd5b610780846106d6565b92506020848101356001600160e01b03198116811461079e57600080fd5b9250604085013567ffffffffffffffff808211156107bb57600080fd5b818701915087601f8301126107cf57600080fd5b8135818111156107e1576107e16106f2565b6107f3601f8201601f19168501610731565b9150808252888482850101111561080957600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106ed57600080fd5b60008082840361010081121561085057600080fd5b8335925060e0601f198201121561086657600080fd5b5061086f610708565b60208401358152610882604085016106d6565b602082015261089360608501610827565b60408201526108a460808501610827565b60608201526108b560a08501610827565b608082015260c0840135600381106108cc57600080fd5b60a08201526108dd60e085016106d6565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261092057634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561025157634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561097757818101518382015260200161095f565b50506000910152565b63ffffffff60e01b84168152826004820152600082516109a781602485016020870161095c565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109f681601c85016020870161095c565b91909101601c01949350505050565b60008151808452610a1d81602086016020860161095c565b601f01601f19169290920160200192915050565b602081526000610a446020830184610a05565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610ac557634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610b0b90830184610a05565b949350505050565b600060208284031215610b2557600080fd5b505191905056fea2646970667358221220fcebfa85c5b6f37a90499aad0c9ea8735daf80b5be5a5b008c1bd00021e79e2564736f6c63430008120033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80635f85896c116100665780635f85896c14610110578063744b49bf14610123578063b5b7a18414610162578063c705e41214610189578063d6565a2d1461019c57600080fd5b806306661abd146100a3578063222ae786146100d55780633ac3b6b6146100eb5780634a439cfe146100f35780635192053514610106575b600080fd5b6041546100b79067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b6100dd6101bc565b6040519081526020016100cc565b6100dd6101ed565b6100dd6101013660046106bd565b610225565b61010e610257565b005b6100b761011e366004610762565b61037b565b61014a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100cc565b6100dd7f000000000000000000000000000000000000000000000000000000000000000081565b61010e61019736600461083b565b6104ec565b6100dd6101aa3660046106bd565b60006020819052908152604090205481565b60006101e87f000000000000000000000000000000000000000000000000000000000000000042610903565b905090565b6000600161021b7f000000000000000000000000000000000000000000000000000000000000000042610903565b6101e89190610925565b60006102517f000000000000000000000000000000000000000000000000000000000000000083610903565b92915050565b6000807f00000000000000000000000000000000000000000000000000000000000000004281610289576102896108ed565b604154919004925060009067ffffffffffffffff165b80156102d857806001166001036102cc57600182604081106102c3576102c3610946565b015492506102d8565b6001918201911c61029f565b60011c5b801561031a5760019182019181811690036103125761030f6001836040811061030757610307610946565b01548461068c565b92505b60011c6102dc565b505060008281526020818152604091829020839055604154825184815291820185905267ffffffffffffffff168183015290517f592424eb1d6135501bd20833f15fd127c29d08eed4f03872f6f75182126b1e489181900360600190a15050565b60415460009067ffffffffffffffff9081169081106103d25760405162461bcd60e51b815260206004820152600e60248201526d24b73137bc1034b990333ab6361760911b60448201526064015b60405180910390fd5b604051600090829087906103ee90889033908990602001610980565b60408051601f198184030181529082905261040d9392916020016109b6565b60408051601f1981840301815291905280516020808301919091206000908152908120919250600184015b60018116600003610471576104596001836040811061030757610307610946565b92506001918201911c677fffffffffffffff16610438565b50816001826040811061048657610486610946565b0155506041805467ffffffffffffffff19166001850167ffffffffffffffff161790556040517f8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036906104d9908490610a31565b60405180910390a1509095945050505050565b7f0000000000000000000000000000000000000000000000000000000000000000428161051b5761051b6108ed565b0482106105755760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c792073656e6420706173742065706f636820736e617073686f6044820152613a1760f11b60648201526084016103c9565b6000828152602081905260408082205490516105979185918590602401610a4b565b60408051601f198184030181529181526020820180516001600160e01b0316630f0adca560e01b179052516349460b4d60e11b815290915060009060649063928c169a9061060b907f0000000000000000000000000000000000000000000000000000000000000000908690600401610ae7565b6020604051808303816000875af115801561062a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064e9190610b13565b60405181815290915084907f6fdd49f435101fc7b6ebdec7c8972932a926d18f6cb78a8891dfe950743b6b829060200160405180910390a250505050565b6000818310156106aa57826000528160205260406000209050610251565b5060009081526020919091526040902090565b6000602082840312156106cf57600080fd5b5035919050565b80356001600160a01b03811681146106ed57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff8111828210171561072b5761072b6106f2565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561075a5761075a6106f2565b604052919050565b60008060006060848603121561077757600080fd5b610780846106d6565b92506020848101356001600160e01b03198116811461079e57600080fd5b9250604085013567ffffffffffffffff808211156107bb57600080fd5b818701915087601f8301126107cf57600080fd5b8135818111156107e1576107e16106f2565b6107f3601f8201601f19168501610731565b9150808252888482850101111561080957600080fd5b80848401858401376000848284010152508093505050509250925092565b803563ffffffff811681146106ed57600080fd5b60008082840361010081121561085057600080fd5b8335925060e0601f198201121561086657600080fd5b5061086f610708565b60208401358152610882604085016106d6565b602082015261089360608501610827565b60408201526108a460808501610827565b60608201526108b560a08501610827565b608082015260c0840135600381106108cc57600080fd5b60a08201526108dd60e085016106d6565b60c0820152809150509250929050565b634e487b7160e01b600052601260045260246000fd5b60008261092057634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561025157634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60005b8381101561097757818101518382015260200161095f565b50506000910152565b63ffffffff60e01b84168152826004820152600082516109a781602485016020870161095c565b91909101602401949350505050565b67ffffffffffffffff60c01b8460c01b1681526bffffffffffffffffffffffff198360601b166008820152600082516109f681601c85016020870161095c565b91909101601c01949350505050565b60008151808452610a1d81602086016020860161095c565b601f01601f19169290920160200192915050565b602081526000610a446020830184610a05565b9392505050565b6000610120820190508482528360208301528251604083015260018060a01b036020840151166060830152604083015163ffffffff80821660808501528060608601511660a08501528060808601511660c0850152505060a083015160038110610ac557634e487b7160e01b600052602160045260246000fd5b60e083015260c092909201516001600160a01b03166101009091015292915050565b6001600160a01b0383168152604060208201819052600090610b0b90830184610a05565b949350505050565b600060208284031215610b2557600080fd5b505191905056fea2646970667358221220fcebfa85c5b6f37a90499aad0c9ea8735daf80b5be5a5b008c1bd00021e79e2564736f6c63430008120033", + "devdoc": { + "details": "Vea Inbox From Arbitrum to Ethereum. Note: This contract is deployed on Arbitrum.", + "events": { + "MessageSent(bytes)": { + "details": "Relayers watch for these events to construct merkle proofs to execute transactions on Ethereum.", + "params": { + "_nodeData": "The data to create leaves in the merkle tree. abi.encodePacked(msgId, to, message), outbox relays to.call(message)." + } + }, + "SnapshotSaved(bytes32,uint256,uint64)": { + "params": { + "_count": "The count of messages in the merkle tree.", + "_epoch": "The epoch of the snapshot.", + "_snapshot": "The snapshot of the merkle tree state root." + } + }, + "SnapshotSent(uint256,bytes32)": { + "details": "The event is emitted when a snapshot is sent through the canonical arbitrum bridge.", + "params": { + "_epochSent": "The epoch of the snapshot.", + "_ticketId": "The ticketId of the L2->L1 message." + } + } + }, + "kind": "dev", + "methods": { + "constructor": { + "details": "Constructor. Note: epochPeriod must match the VeaOutboxArbToEth contract deployment on Ethereum, since it's on a different chain, we can't read it and trust the deployer to set a correct value", + "params": { + "_epochPeriod": "The duration in seconds between epochs.", + "_veaOutboxArbToEth": "The veaOutbox on ethereum." + } + }, + "epochAt(uint256)": { + "details": "Get the epoch from the inbox's point of view using timestamp.", + "params": { + "_timestamp": "The timestamp to calculate the epoch from." + }, + "returns": { + "epoch": "The calculated epoch." + } + }, + "epochFinalized()": { + "details": "Get the most recent epoch for which snapshots are finalized.", + "returns": { + "epoch": "The epoch associated with the current inbox block.timestamp" + } + }, + "epochNow()": { + "details": "Get the current epoch from the inbox's point of view using the Arbitrum L2 clock.", + "returns": { + "epoch": "The epoch associated with the current inbox block.timestamp" + } + }, + "saveSnapshot()": { + "details": "Saves snapshot of state root. Snapshots can be saved a maximum of once per epoch. `O(log(count))` where count number of messages in the inbox. Note: See merkle tree docs for details how inbox manages state." + }, + "sendMessage(address,bytes4,bytes)": { + "details": "Sends an arbitrary message to Ethereum. `O(log(count))` where count is the number of messages already sent. Amortized cost is constant. Note: See docs for details how inbox manages merkle tree state.", + "params": { + "_data": "The message calldata, abi.encode(param1, param2, ...)", + "_fnSelector": "The function selector of the receiving contract.", + "_to": "The address of the contract on the receiving chain which receives the calldata." + }, + "returns": { + "_0": "msgId The zero based index of the message in the inbox." + } + }, + "sendSnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Sends the state root snapshot using Arbitrum's canonical bridge.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch of the snapshot requested to send." + } + } + }, + "version": 1 + }, + "userdoc": { + "events": { + "SnapshotSaved(bytes32,uint256,uint64)": { + "notice": "The bridgers can watch this event to claim the stateRoot on the veaOutbox." + } + }, + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 24, + "contract": "src/arbitrumToEth/VeaInboxArbToEth.sol:VeaInboxArbToEth", + "label": "snapshots", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_uint256,t_bytes32)" + }, + { + "astId": 28, + "contract": "src/arbitrumToEth/VeaInboxArbToEth.sol:VeaInboxArbToEth", + "label": "inbox", + "offset": 0, + "slot": "1", + "type": "t_array(t_bytes32)64_storage" + }, + { + "astId": 30, + "contract": "src/arbitrumToEth/VeaInboxArbToEth.sol:VeaInboxArbToEth", + "label": "count", + "offset": 0, + "slot": "65", + "type": "t_uint64" + } + ], + "types": { + "t_array(t_bytes32)64_storage": { + "base": "t_bytes32", + "encoding": "inplace", + "label": "bytes32[64]", + "numberOfBytes": "2048" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + } +} diff --git a/contracts/deployments/sepolia/.chainId b/contracts/deployments/sepolia/.chainId new file mode 100644 index 00000000..bd8d1cd4 --- /dev/null +++ b/contracts/deployments/sepolia/.chainId @@ -0,0 +1 @@ +11155111 \ No newline at end of file diff --git a/contracts/deployments/sepolia/VeaOutboxArbToEthDevnet.json b/contracts/deployments/sepolia/VeaOutboxArbToEthDevnet.json new file mode 100644 index 00000000..bde7532d --- /dev/null +++ b/contracts/deployments/sepolia/VeaOutboxArbToEthDevnet.json @@ -0,0 +1,1496 @@ +{ + "address": "0x5AD255400913515C8DA7E82E6b8A109fA5c46135", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_deposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_epochPeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_minChallengePeriod", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_timeoutEpochs", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_veaInboxArbToEthDevnet", + "type": "address" + }, + { + "internalType": "address", + "name": "_bridge", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxMissingBlocks", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "_challenger", + "type": "address" + } + ], + "name": "Challenged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_claimer", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_stateRoot", + "type": "bytes32" + } + ], + "name": "Claimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "_msgId", + "type": "uint64" + } + ], + "name": "MessageRelayed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "VerificationStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + } + ], + "name": "Verified", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_requestedSequencerDelayLimit", + "type": "uint256" + } + ], + "name": "sequencerDelayLimitDecreaseRequested", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_newSequencerDelayLimit", + "type": "uint256" + } + ], + "name": "sequencerDelayLimitUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "BURN_ADDRESS", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "bridge", + "outputs": [ + { + "internalType": "contract IBridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "burn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "censorshipTestStatus", + "outputs": [ + { + "internalType": "enum VeaOutboxArbToEth.CensorshipTestStatus", + "name": "status", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "challenge", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + }, + { + "internalType": "address", + "name": "_withdrawalAddress", + "type": "address" + } + ], + "name": "challenge", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_devnetOperator", + "type": "address" + } + ], + "name": "changeDevnetOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_stateRoot", + "type": "bytes32" + } + ], + "name": "claim", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "claimHashes", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "depositPlusReward", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_stateroot", + "type": "bytes32" + } + ], + "name": "devnetAdvanceState", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "devnetOperator", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "epochAt", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochNow", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "executeSequencerDelayLimitDecreaseRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "hashClaim", + "outputs": [ + { + "internalType": "bytes32", + "name": "hashedClaim", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_msgId", + "type": "uint256" + } + ], + "name": "isMsgRelayed", + "outputs": [ + { + "internalType": "bool", + "name": "isRelayed", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "latestVerifiedEpoch", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxMissingBlocks", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minChallengePeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_stateRoot", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "resolveDisputedClaim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "_proof", + "type": "bytes32[]" + }, + { + "internalType": "uint64", + "name": "_msgId", + "type": "uint64" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_message", + "type": "bytes" + } + ], + "name": "sendMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerDelayLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sequencerDelayLimitDecreaseRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "requestedsequencerDelayLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "startVerification", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stateRoot", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "timeoutEpochs", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "updateSequencerDelayLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "veaInboxArbToEth", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "verifySnapshot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "withdrawChallengeDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "withdrawChallengerEscapeHatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "withdrawClaimDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "withdrawClaimerEscapeHatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xe42ef9632243f7805fb7ddb1162f1cb179c7a7175fd6315c2af37896d955cffc", + "receipt": { + "to": null, + "from": "0x7D81bD51FF105985725C2Eff263b0E46e6499577", + "contractAddress": "0x5AD255400913515C8DA7E82E6b8A109fA5c46135", + "transactionIndex": 65, + "gasUsed": "2318236", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000400200000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xb34e05214b16e58181451411592d1ea888afb0bced2b2f794a2c6d07dae181e5", + "transactionHash": "0xe42ef9632243f7805fb7ddb1162f1cb179c7a7175fd6315c2af37896d955cffc", + "logs": [ + { + "transactionIndex": 65, + "blockNumber": 5379614, + "transactionHash": "0xe42ef9632243f7805fb7ddb1162f1cb179c7a7175fd6315c2af37896d955cffc", + "address": "0x5AD255400913515C8DA7E82E6b8A109fA5c46135", + "topics": [ + "0x611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000015180", + "logIndex": 101, + "blockHash": "0xb34e05214b16e58181451411592d1ea888afb0bced2b2f794a2c6d07dae181e5" + } + ], + "blockNumber": 5379614, + "cumulativeGasUsed": "9295404", + "status": 1, + "byzantium": true + }, + "args": [ + "1000000000000000", + 1800, + 0, + 10000000000000, + "0x77e95F54032f467eC45c48C6affc203f93858783", + "0x38f918D0E9F1b721EDaA41302E399fa1B79333a9", + 10000000000000 + ], + "numDeployments": 2, + "solcInputHash": "7b45a9f9dbde1d7a0346ad3f0c7f7efe", + "metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_epochPeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minChallengePeriod\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_timeoutEpochs\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_veaInboxArbToEthDevnet\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_bridge\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxMissingBlocks\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_challenger\",\"type\":\"address\"}],\"name\":\"Challenged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_claimer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"}],\"name\":\"MessageRelayed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"VerificationStarted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"Verified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_requestedSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitDecreaseRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newSequencerDelayLimit\",\"type\":\"uint256\"}],\"name\":\"sequencerDelayLimitUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"BURN_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"contract IBridge\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"burn\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"censorshipTestStatus\",\"outputs\":[{\"internalType\":\"enum VeaOutboxArbToEth.CensorshipTestStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"_withdrawalAddress\",\"type\":\"address\"}],\"name\":\"challenge\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_devnetOperator\",\"type\":\"address\"}],\"name\":\"changeDevnetOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimHashes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositPlusReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateroot\",\"type\":\"bytes32\"}],\"name\":\"devnetAdvanceState\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"devnetOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"epochAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochNow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"executeSequencerDelayLimitDecreaseRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"hashClaim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashedClaim\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_msgId\",\"type\":\"uint256\"}],\"name\":\"isMsgRelayed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isRelayed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestVerifiedEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMissingBlocks\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minChallengePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_stateRoot\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"resolveDisputedClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"_msgId\",\"type\":\"uint64\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerDelayLimitDecreaseRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestedsequencerDelayLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"startVerification\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"timeoutEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"updateSequencerDelayLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"veaInboxArbToEth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"verifySnapshot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawChallengerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_epoch\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"claimer\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"timestampClaimed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"timestampVerification\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blocknumberVerification\",\"type\":\"uint32\"},{\"internalType\":\"enum Party\",\"name\":\"honest\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"challenger\",\"type\":\"address\"}],\"internalType\":\"struct Claim\",\"name\":\"_claim\",\"type\":\"tuple\"}],\"name\":\"withdrawClaimerEscapeHatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Vea Outbox From arbitrumSepolia to Sepolia. Note: This contract is deployed on Sepolia. Note: This contract is permissioned for developer testing (devnet).\",\"events\":{\"Challenged(uint256,address)\":{\"details\":\"This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\",\"params\":{\"_challenger\":\"The address of the challenger.\",\"_epoch\":\"The epoch associated with the challenged claim.\"}},\"Claimed(address,uint256,bytes32)\":{\"details\":\"Watchers check this event to challenge fraud.\",\"params\":{\"_claimer\":\"The address of the claimer.\",\"_epoch\":\"The epoch associated with the claim.\",\"_stateRoot\":\"The state root of the claim.\"}},\"MessageRelayed(uint64)\":{\"details\":\"This event indicates that a message has been relayed.\",\"params\":{\"_msgId\":\"The msgId of the message that was relayed.\"}},\"VerificationStarted(uint256)\":{\"details\":\"This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\",\"params\":{\"_epoch\":\"The epoch that started verification.\"}},\"Verified(uint256)\":{\"details\":\"This events indicates that verification has succeeded. The messages are ready to be relayed.\",\"params\":{\"_epoch\":\"The epoch that was verified.\"}},\"sequencerDelayLimitDecreaseRequested(uint256)\":{\"details\":\"This event indicates that a request to decrease the sequencer limit has been made.\",\"params\":{\"_requestedSequencerDelayLimit\":\"The new sequencer delay limit requested.\"}},\"sequencerDelayLimitUpdated(uint256)\":{\"details\":\"This event indicates the sequencer limit updated.\",\"params\":{\"_newSequencerDelayLimit\":\"The new sequencer delay limit.\"}}},\"kind\":\"dev\",\"methods\":{\"censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Gets the status of the censorship test for claim.\",\"params\":{\"_claim\":\"The claim to test.\"},\"returns\":{\"status\":\"True if the claim passed the censorship test.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address),address)\":{\"details\":\"Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.Allows proxy contracts to batch challenges.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\",\"_withdrawalAddress\":\"The address to withdraw the deposit + reward to.\"}},\"changeDevnetOperator(address)\":{\"details\":\"Changes the devnet operator.\",\"params\":{\"_devnetOperator\":\"The new testnet operator.\"}},\"claim(uint256,bytes32)\":{\"details\":\"Submit a claim about the _stateRoot at _epoch and submit a deposit.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateRoot\":\"The state root to claim.\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"_deposit\":\"The deposit amount to submit a claim in wei.\",\"_epochPeriod\":\"The duration of each epoch.\",\"_maxMissingBlocks\":\"The maximum number of blocks that can be missing in a challenge period.\",\"_minChallengePeriod\":\"The minimum time window to challenge a claim.\",\"_timeoutEpochs\":\"The epochs before the bridge is considered shutdown.\",\"_veaInboxArbToEthDevnet\":\"The address of the inbox contract on Arbitrum.\"}},\"devnetAdvanceState(uint256,bytes32)\":{\"details\":\"Testnet operator utility function to claim, validate and withdraw.\",\"params\":{\"_epoch\":\"The epoch for which the claim is made.\",\"_stateroot\":\"The state root to claim.\"}},\"epochAt(uint256)\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"epochNow()\":{\"details\":\"Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\",\"returns\":{\"epoch\":\"The hash of the claim.\"}},\"executeSequencerDelayLimitDecreaseRequest()\":{\"details\":\"execute sequencerDelayLimitDecreaseRequest\"},\"hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Hashes the claim.\",\"params\":{\"_claim\":\"The claim to hash.\"},\"returns\":{\"hashedClaim\":\"The hash of the claim.\"}},\"isMsgRelayed(uint256)\":{\"details\":\"Get the msg relayed status.\",\"params\":{\"_msgId\":\"The msgId to check.\"},\"returns\":{\"isRelayed\":\"True if the msg was relayed.\"}},\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves any challenge of the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch to verify.\",\"_stateRoot\":\"The true state root for the epoch.\"}},\"sendMessage(bytes32[],uint64,address,bytes)\":{\"details\":\"Verifies and relays the message. UNTRUSTED.\",\"params\":{\"_message\":\"The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\",\"_msgId\":\"The zero based index of the message in the inbox.\",\"_proof\":\"The merkle proof to prove the message inclusion in the inbox state root.\",\"_to\":\"The address of the contract on Ethereum to call.\"}},\"startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Start verification for claim for 'epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the claim to challenge.\"}},\"updateSequencerDelayLimit()\":{\"details\":\"Request to decrease the sequencerDelayLimit.\"},\"verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Resolves the optimistic claim for '_epoch'.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch of the optimistic claim.\"}},\"withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the challenge deposit to withraw.\"}},\"withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}},\"withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"details\":\"When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\",\"params\":{\"_claim\":\"The claim associated with the epoch.\",\"_epoch\":\"The epoch associated with the claim deposit to withraw.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))\":{\"notice\":\"Note: Access restricted to arbitrum bridge.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":\"VeaOutboxArbToEthDevnet\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/arbitrumToEth/VeaOutboxArbToEth.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../canonical/arbitrum/ISequencerInbox.sol\\\";\\nimport \\\"../canonical/arbitrum/IBridge.sol\\\";\\nimport \\\"../canonical/arbitrum/IOutbox.sol\\\";\\nimport \\\"../interfaces/outboxes/IVeaOutboxOnL1.sol\\\";\\n\\n/// @dev Vea Outbox From Arbitrum to Ethereum.\\n/// Note: This contract is deployed on Ethereum.\\ncontract VeaOutboxArbToEth is IVeaOutboxOnL1 {\\n // ************************************* //\\n // * Storage * //\\n // ************************************* //\\n\\n IBridge public immutable bridge; // The address of the Arbitrum bridge contract.\\n address public immutable veaInboxArbToEth; // The address of the vea inbox on arbitrum.\\n\\n uint256 public immutable deposit; // The deposit in wei required to submit a claim or challenge\\n uint256 public immutable burn; // The amount of wei to burn. deposit / 2\\n uint256 public immutable depositPlusReward; // 2 * deposit - burn\\n\\n address public constant BURN_ADDRESS = address(0); // Address to send burned eth\\n uint256 internal constant SLOT_TIME = 12; // Ethereum 12 second slot time\\n\\n uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots.\\n uint256 public immutable minChallengePeriod; // Minimum time window to challenge a claim, even with a malicious sequencer.\\n\\n uint256 public immutable timeoutEpochs; // The number of epochs without forward progress before the bridge is considered shutdown.\\n uint256 public immutable maxMissingBlocks; // The maximum number of blocks that can be missing in a challenge period.\\n\\n bytes32 public stateRoot; // merkle root of the outbox state\\n uint256 public latestVerifiedEpoch; // The latest epoch that has been verified.\\n\\n mapping(uint256 => bytes32) public claimHashes; // epoch => claim\\n mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message\\n\\n uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock.\\n SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here.\\n\\n struct SequencerDelayLimitDecreaseRequest {\\n uint256 requestedsequencerDelayLimit;\\n uint256 timestamp;\\n }\\n\\n enum CensorshipTestStatus {\\n Failed,\\n Passed,\\n NotStarted,\\n InProgress\\n }\\n\\n // ************************************* //\\n // * Events * //\\n // ************************************* //\\n\\n /// @dev Watchers check this event to challenge fraud.\\n /// @param _claimer The address of the claimer.\\n /// @param _epoch The epoch associated with the claim.\\n /// @param _stateRoot The state root of the claim.\\n event Claimed(address indexed _claimer, uint256 indexed _epoch, bytes32 _stateRoot);\\n\\n /// @dev This event indicates that `sendSnapshot(epoch)` should be called in the inbox.\\n /// @param _epoch The epoch associated with the challenged claim.\\n /// @param _challenger The address of the challenger.\\n event Challenged(uint256 indexed _epoch, address indexed _challenger);\\n\\n /// @dev This event indicates that a message has been relayed.\\n /// @param _msgId The msgId of the message that was relayed.\\n event MessageRelayed(uint64 _msgId);\\n\\n /// @dev This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.\\n /// @param _epoch The epoch that started verification.\\n event VerificationStarted(uint256 indexed _epoch);\\n\\n /// @dev This events indicates that verification has succeeded. The messages are ready to be relayed.\\n /// @param _epoch The epoch that was verified.\\n event Verified(uint256 _epoch);\\n\\n /// @dev This event indicates the sequencer limit updated.\\n /// @param _newSequencerDelayLimit The new sequencer delay limit.\\n event sequencerDelayLimitUpdated(uint256 _newSequencerDelayLimit);\\n\\n /// @dev This event indicates that a request to decrease the sequencer limit has been made.\\n /// @param _requestedSequencerDelayLimit The new sequencer delay limit requested.\\n event sequencerDelayLimitDecreaseRequested(uint256 _requestedSequencerDelayLimit);\\n\\n // ************************************* //\\n // * Function Modifiers * //\\n // ************************************* //\\n\\n modifier OnlyBridgeRunning() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch <= timeoutEpochs, \\\"Bridge Shutdown.\\\");\\n }\\n _;\\n }\\n\\n modifier OnlyBridgeShutdown() {\\n unchecked {\\n require(block.timestamp / epochPeriod - latestVerifiedEpoch > timeoutEpochs, \\\"Bridge Running.\\\");\\n }\\n _;\\n }\\n\\n /// @dev Constructor.\\n /// Note: epochPeriod must match the VeaInboxArbToEth contract deployment on Arbitrum, since it's on a different chain, we can't read it and trust the deployer to set a correct value\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEth The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEth,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n ) {\\n deposit = _deposit;\\n // epochPeriod must match the VeaInboxArbToEth contract deployment epochPeriod value.\\n epochPeriod = _epochPeriod;\\n minChallengePeriod = _minChallengePeriod;\\n timeoutEpochs = _timeoutEpochs;\\n veaInboxArbToEth = _veaInboxArbToEth;\\n bridge = IBridge(_bridge);\\n maxMissingBlocks = _maxMissingBlocks;\\n\\n updateSequencerDelayLimit();\\n\\n // claimant and challenger are not sybil resistant\\n // must burn half deposit to prevent zero cost griefing\\n burn = _deposit / 2;\\n depositPlusReward = 2 * _deposit - burn;\\n\\n latestVerifiedEpoch = block.timestamp / epochPeriod - 1;\\n }\\n\\n // ************************************* //\\n // * Parameter Updates * //\\n // ************************************* //\\n\\n /// @dev Request to decrease the sequencerDelayLimit.\\n function updateSequencerDelayLimit() public {\\n // the maximum asynchronous lag between the L2 and L1 clocks\\n (, , uint256 newSequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n if (newSequencerDelayLimit > sequencerDelayLimit) {\\n // For sequencerDelayLimit / epochPeriod > timeoutEpochs, claims cannot be verified by the timeout period and the bridge will shutdown.\\n sequencerDelayLimit = newSequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(newSequencerDelayLimit);\\n } else if (newSequencerDelayLimit < sequencerDelayLimit) {\\n require(\\n sequencerDelayLimitDecreaseRequest.timestamp == 0,\\n \\\"Sequencer limit decrease request already pending.\\\"\\n );\\n\\n sequencerDelayLimitDecreaseRequest = SequencerDelayLimitDecreaseRequest({\\n requestedsequencerDelayLimit: newSequencerDelayLimit,\\n timestamp: block.timestamp\\n });\\n\\n emit sequencerDelayLimitDecreaseRequested(newSequencerDelayLimit);\\n }\\n }\\n\\n /// @dev execute sequencerDelayLimitDecreaseRequest\\n function executeSequencerDelayLimitDecreaseRequest() external {\\n require(sequencerDelayLimitDecreaseRequest.timestamp != 0, \\\"No pending sequencer limit decrease request.\\\");\\n require(\\n block.timestamp > sequencerDelayLimitDecreaseRequest.timestamp + sequencerDelayLimit,\\n \\\"Sequencer limit decrease request is still pending.\\\"\\n );\\n\\n uint256 requestedsequencerDelayLimit = sequencerDelayLimitDecreaseRequest.requestedsequencerDelayLimit;\\n delete sequencerDelayLimitDecreaseRequest;\\n\\n (, , uint256 currentsequencerDelayLimit, ) = ISequencerInbox(bridge.sequencerInbox()).maxTimeVariation();\\n\\n // check the request is still consistent with the arbiturm bridge\\n if (currentsequencerDelayLimit == requestedsequencerDelayLimit) {\\n sequencerDelayLimit = requestedsequencerDelayLimit;\\n emit sequencerDelayLimitUpdated(requestedsequencerDelayLimit);\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) external payable virtual {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n unchecked {\\n require(_epoch == block.timestamp / epochPeriod - 1, \\\"Invalid epoch.\\\");\\n }\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function challenge(uint256 _epoch, Claim memory _claim) external payable {\\n _challenge(_epoch, _claim, msg.sender);\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @dev Allows proxy contracts to batch challenges.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _withdrawalAddress The address to withdraw the deposit + reward to.\\n function challenge(uint256 _epoch, Claim memory _claim, address _withdrawalAddress) external payable {\\n _challenge(_epoch, _claim, _withdrawalAddress);\\n }\\n\\n /// @dev Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _withdrawAddress The address to withdraw the deposit + reward to.\\n function _challenge(uint256 _epoch, Claim memory _claim, address _withdrawAddress) internal {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(msg.value >= deposit, \\\"Insufficient challenge deposit.\\\");\\n require(_claim.challenger == address(0), \\\"Claim already challenged.\\\");\\n require(_claim.honest == Party.None, \\\"Claim already verified.\\\");\\n\\n _claim.challenger = _withdrawAddress;\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit Challenged(_epoch, _withdrawAddress);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n // sequencerDelayLimit + epochPeriod is the worst case time to sync the L2 state compared to L1 clock.\\n // using checked arithmetic incase arbitrum governance sets sequencerDelayLimit to a large value\\n require(\\n block.timestamp - uint256(_claim.timestampClaimed) >= sequencerDelayLimit + epochPeriod,\\n \\\"Claim must wait atleast maxL2StateSyncDelay.\\\"\\n );\\n\\n CensorshipTestStatus _censorshipTestStatus = censorshipTestStatus(_claim);\\n require(\\n _censorshipTestStatus == CensorshipTestStatus.NotStarted ||\\n _censorshipTestStatus == CensorshipTestStatus.Failed,\\n \\\"Claim verification in progress or already completed.\\\"\\n );\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) external virtual OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n require(censorshipTestStatus(_claim) == CensorshipTestStatus.Passed, \\\"Censorship test not passed.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// Note: Access restricted to arbitrum bridge.\\n /// @dev Resolves any challenge of the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(\\n uint256 _epoch,\\n bytes32 _stateRoot,\\n Claim memory _claim\\n ) external virtual OnlyBridgeRunning {\\n // Arbitrum -> Ethereum message sender authentication\\n // docs: https://developer.arbitrum.io/arbos/l2-to-l1-messaging/\\n // example: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfef6a68ee18dbd2e1f5a099061a3b8a0e404485/contracts/crosschain/arbitrum/LibArbitrumL1.sol#L34\\n // example: https://github.com/OffchainLabs/arbitrum-tutorials/blob/2c1b7d2db8f36efa496e35b561864c0f94123a5f/packages/greeter/contracts/ethereum/GreeterL1.sol#L50\\n // note: we call the bridge for the activeOutbox address\\n\\n require(msg.sender == address(bridge), \\\"Not from native arbitrum bridge.\\\");\\n require(IOutbox(bridge.activeOutbox()).l2ToL1Sender() == veaInboxArbToEth, \\\"veaInboxArbToEth only.\\\");\\n\\n if (_epoch > latestVerifiedEpoch && _stateRoot != bytes32(0)) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n if (claimHashes[_epoch] == hashClaim(_claim)) {\\n if (_claim.stateRoot == _stateRoot) {\\n _claim.honest = Party.Claimer;\\n } else if (_claim.challenger != address(0)) {\\n _claim.honest = Party.Challenger;\\n }\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n }\\n\\n /// @dev Verifies and relays the message. UNTRUSTED.\\n /// @param _proof The merkle proof to prove the message inclusion in the inbox state root.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address of the contract on Ethereum to call.\\n /// @param _message The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external {\\n require(_proof.length < 64, \\\"Proof too long.\\\");\\n\\n bytes32 nodeHash = keccak256(abi.encodePacked(_msgId, _to, _message));\\n\\n // double hashed leaf\\n // avoids second order preimage attacks\\n // https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/\\n assembly {\\n mstore(0x00, nodeHash)\\n nodeHash := keccak256(0x00, 0x20)\\n }\\n\\n unchecked {\\n for (uint256 i = 0; i < _proof.length; i++) {\\n bytes32 proofElement = _proof[i];\\n // sort sibling hashes as a convention for efficient proof validation\\n if (proofElement > nodeHash)\\n assembly {\\n mstore(0x00, nodeHash)\\n mstore(0x20, proofElement)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n else\\n assembly {\\n mstore(0x00, proofElement)\\n mstore(0x20, nodeHash)\\n nodeHash := keccak256(0x00, 0x40)\\n }\\n }\\n }\\n\\n require(stateRoot == nodeHash, \\\"Invalid proof.\\\");\\n\\n // msgId is the zero-based index of the message in the inbox.\\n // msgId is also used as an index in the relayed bitmap to prevent replay.\\n // Note: a bitmap is used instead of a simple boolean mapping to save 15k gas per message.\\n\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n require(((replay >> offset) & bytes32(uint256(1))) == bytes32(0), \\\"Message already relayed\\\");\\n relayed[relayIndex] = replay | bytes32(1 << offset);\\n\\n // UNTRUSTED.\\n (bool success, ) = _to.call(_message);\\n require(success, \\\"Failed to call contract\\\");\\n\\n emit MessageRelayed(_msgId);\\n }\\n\\n /// @dev Sends the deposit back to the Claimer if successful. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimDeposit(uint256 _epoch, Claim calldata _claim) external virtual {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.\\n /// @param _epoch The epoch associated with the challenge deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengeDeposit(uint256 _epoch, Claim calldata _claim) external {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Challenger, \\\"Challenge failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n payable(BURN_ADDRESS).send(burn); // half burnt\\n payable(_claim.challenger).send(depositPlusReward); // User is responsible for accepting ETH.\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawClaimerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.claimer != address(0)) {\\n if (_claim.challenger == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address claimer = _claim.claimer;\\n _claim.claimer = address(0);\\n claimHashes[_epoch] = hashClaim(_claim);\\n payable(claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n /// @dev When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n /// @param _claim The claim associated with the epoch.\\n function withdrawChallengerEscapeHatch(uint256 _epoch, Claim memory _claim) external OnlyBridgeShutdown {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.None, \\\"Claim resolved.\\\");\\n\\n if (_claim.challenger != address(0)) {\\n if (_claim.claimer == address(0)) {\\n delete claimHashes[_epoch];\\n payable(_claim.challenger).send(deposit); // User is responsible for accepting ETH.\\n } else {\\n address challenger = _claim.challenger;\\n _claim.challenger = address(0);\\n claimHashes[_epoch] == hashClaim(_claim);\\n payable(challenger).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Pure / Views * //\\n // ************************************* //\\n\\n /// @dev Hashes the claim.\\n /// @param _claim The claim to hash.\\n /// @return hashedClaim The hash of the claim.\\n function hashClaim(Claim memory _claim) public pure returns (bytes32 hashedClaim) {\\n return\\n hashedClaim = keccak256(\\n abi.encodePacked(\\n _claim.stateRoot,\\n _claim.claimer,\\n _claim.timestampClaimed,\\n _claim.timestampVerification,\\n _claim.blocknumberVerification,\\n _claim.honest,\\n _claim.challenger\\n )\\n );\\n }\\n\\n /// @dev Gets the status of the censorship test for claim.\\n /// @param _claim The claim to test.\\n /// @return status True if the claim passed the censorship test.\\n function censorshipTestStatus(Claim memory _claim) public view returns (CensorshipTestStatus status) {\\n unchecked {\\n if (uint256(_claim.timestampVerification) == 0) {\\n status = CensorshipTestStatus.NotStarted;\\n } else if (block.timestamp - uint256(_claim.timestampVerification) < minChallengePeriod) {\\n status = CensorshipTestStatus.InProgress;\\n } else {\\n uint256 expectedBlocks = uint256(_claim.blocknumberVerification) +\\n (block.timestamp - uint256(_claim.timestampVerification)) /\\n SLOT_TIME;\\n uint256 actualBlocks = block.number;\\n if (expectedBlocks - actualBlocks <= maxMissingBlocks) {\\n status = CensorshipTestStatus.Passed;\\n } else {\\n status = CensorshipTestStatus.Failed;\\n }\\n }\\n }\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochNow() external view returns (uint256 epoch) {\\n epoch = block.timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the current epoch from the outbox's point of view using the Ethereum L1 clock.\\n /// @return epoch The hash of the claim.\\n function epochAt(uint256 timestamp) external view returns (uint256 epoch) {\\n epoch = timestamp / epochPeriod;\\n }\\n\\n /// @dev Get the msg relayed status.\\n /// @param _msgId The msgId to check.\\n /// @return isRelayed True if the msg was relayed.\\n function isMsgRelayed(uint256 _msgId) external view returns (bool isRelayed) {\\n uint256 relayIndex = _msgId >> 8;\\n uint256 offset;\\n\\n unchecked {\\n offset = _msgId % 256;\\n }\\n\\n bytes32 replay = relayed[relayIndex];\\n\\n isRelayed = (replay >> offset) & bytes32(uint256(1)) == bytes32(uint256(1));\\n }\\n}\\n\",\"keccak256\":\"0xc75046b084bbbc164ce0ff84a7a6091d6cd31aef9329f31f3137b1206f214f69\",\"license\":\"MIT\"},\"src/canonical/arbitrum/IBridge.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x8315177aB297bA92A06054cE80a67Ed4DBd7ed3a\\n// implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IBridge {\\n function activeOutbox() external view returns (address);\\n\\n function sequencerInbox() external view returns (address);\\n\\n function allowedDelayedInboxList(uint256) external returns (address);\\n}\\n\",\"keccak256\":\"0x4ae55bd0aaa3633ba027e3b9dccfe64dbca2c44219e53831b7308a4aebb6c83d\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/IOutbox.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/IBridge.sol\\n// proxy: https://etherscan.io/address/0x0B9857ae2D4A3DBe74ffE1d7DF045bb7F96E4840#code\\n// implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\ninterface IOutbox {\\n /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account\\n /// When the return value is zero, that means this is a system message\\n /// @dev the l2ToL1Sender behaves as the tx.origin, the msg.sender should be validated to protect against reentrancies\\n function l2ToL1Sender() external view returns (address);\\n}\\n\",\"keccak256\":\"0x951eb1a9a67bbd56579cafa1424660d02565aa908a5b4397face5ac6559ce91c\",\"license\":\"BUSL-1.1\"},\"src/canonical/arbitrum/ISequencerInbox.sol\":{\"content\":\"// Copyright 2021-2022, Offchain Labs, Inc.\\n// For license information, see https://github.com/nitro/blob/master/LICENSE\\n// SPDX-License-Identifier: BUSL-1.1\\n// https://github.com/OffchainLabs/nitro-contracts/blob/08ac127e966fa87a4d5ba3d23cd3132b57701132/src/bridge/ISequencerInbox.sol\\n// proxy: https://etherscan.io/address/0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6#code\\n// implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code\\n// interface is pruned for relevant function stubs\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"./IBridge.sol\\\";\\n\\ninterface ISequencerInbox {\\n struct MaxTimeVariation {\\n uint256 delayBlocks;\\n uint256 futureBlocks;\\n uint256 delaySeconds;\\n uint256 futureSeconds;\\n }\\n\\n function maxTimeVariation() external view returns (uint256, uint256, uint256, uint256);\\n}\\n\",\"keccak256\":\"0xe8db6941df1f303771990646eae52e8d5bfe46326457dc9d19588dd443281b39\",\"license\":\"BUSL-1.1\"},\"src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../../arbitrumToEth/VeaOutboxArbToEth.sol\\\";\\n\\n/// @dev Vea Outbox From arbitrumSepolia to Sepolia.\\n/// Note: This contract is deployed on Sepolia.\\n/// Note: This contract is permissioned for developer testing (devnet).\\ncontract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth {\\n address public devnetOperator; // permissioned devnet operator\\n\\n /// @dev Requires that the sender is the devnet operator.\\n modifier onlyByDevnetOperator() {\\n require(devnetOperator == msg.sender);\\n _;\\n }\\n\\n /// @dev Changes the devnet operator.\\n /// @param _devnetOperator The new testnet operator.\\n function changeDevnetOperator(address _devnetOperator) external onlyByDevnetOperator {\\n require(msg.sender == devnetOperator, \\\"Invalid Testnet Operator\\\");\\n devnetOperator = _devnetOperator;\\n }\\n\\n /// @dev Submit a claim about the _stateRoot at _epoch and submit a deposit.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateRoot The state root to claim.\\n function claim(uint256 _epoch, bytes32 _stateRoot) public payable override onlyByDevnetOperator {\\n require(msg.value >= deposit, \\\"Insufficient claim deposit.\\\");\\n require(_stateRoot != bytes32(0), \\\"Invalid claim.\\\");\\n require(claimHashes[_epoch] == bytes32(0), \\\"Claim already made.\\\");\\n\\n claimHashes[_epoch] = hashClaim(\\n Claim({\\n stateRoot: _stateRoot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n })\\n );\\n\\n emit Claimed(msg.sender, _epoch, _stateRoot);\\n\\n // Refund overpayment.\\n if (msg.value > deposit) {\\n uint256 refund = msg.value - deposit;\\n payable(msg.sender).send(refund); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Start verification for claim for 'epoch'.\\n /// @param _epoch The epoch of the claim to challenge.\\n /// @param _claim The claim associated with the epoch.\\n function startVerification(uint256 _epoch, Claim memory _claim) public override onlyByDevnetOperator {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n\\n _claim.timestampVerification = uint32(block.timestamp);\\n _claim.blocknumberVerification = uint32(block.number);\\n\\n claimHashes[_epoch] = hashClaim(_claim);\\n\\n emit VerificationStarted(_epoch);\\n }\\n\\n /// @dev Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.\\n /// @param _claim The claim associated with the epoch.\\n /// @param _epoch The epoch associated with the claim deposit to withraw.\\n function withdrawClaimDeposit(uint256 _epoch, Claim memory _claim) public override {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.honest == Party.Claimer, \\\"Claim failed.\\\");\\n\\n delete claimHashes[_epoch];\\n\\n if (_claim.challenger != address(0)) {\\n payable(BURN_ADDRESS).send(burn);\\n payable(_claim.claimer).send(depositPlusReward); // User is responsible for accepting ETH.\\n } else {\\n payable(_claim.claimer).send(deposit); // User is responsible for accepting ETH.\\n }\\n }\\n\\n /// @dev Resolves the optimistic claim for '_epoch'.\\n /// @param _epoch The epoch of the optimistic claim.\\n /// @param _claim The claim associated with the epoch.\\n function verifySnapshot(uint256 _epoch, Claim memory _claim) public override OnlyBridgeRunning {\\n require(claimHashes[_epoch] == hashClaim(_claim), \\\"Invalid claim.\\\");\\n require(_claim.challenger == address(0), \\\"Claim is challenged.\\\");\\n\\n if (_epoch > latestVerifiedEpoch) {\\n latestVerifiedEpoch = _epoch;\\n stateRoot = _claim.stateRoot;\\n emit Verified(_epoch);\\n }\\n\\n _claim.honest = Party.Claimer;\\n claimHashes[_epoch] = hashClaim(_claim);\\n }\\n\\n /// @dev Testnet operator utility function to claim, validate and withdraw.\\n /// @param _epoch The epoch for which the claim is made.\\n /// @param _stateroot The state root to claim.\\n function devnetAdvanceState(uint256 _epoch, bytes32 _stateroot) external payable {\\n claim(_epoch, _stateroot);\\n Claim memory claim = Claim({\\n stateRoot: _stateroot,\\n claimer: msg.sender,\\n timestampClaimed: uint32(block.timestamp),\\n timestampVerification: uint32(0),\\n blocknumberVerification: uint32(0),\\n honest: Party.None,\\n challenger: address(0)\\n });\\n claim.timestampClaimed = uint32(block.timestamp);\\n startVerification(_epoch, claim);\\n claim.timestampVerification = uint32(block.timestamp);\\n claim.blocknumberVerification = uint32(block.number);\\n verifySnapshot(_epoch, claim);\\n claim.honest = Party.Claimer;\\n withdrawClaimDeposit(_epoch, claim);\\n }\\n\\n /// @dev Constructor.\\n /// @param _deposit The deposit amount to submit a claim in wei.\\n /// @param _epochPeriod The duration of each epoch.\\n /// @param _minChallengePeriod The minimum time window to challenge a claim.\\n /// @param _timeoutEpochs The epochs before the bridge is considered shutdown.\\n /// @param _veaInboxArbToEthDevnet The address of the inbox contract on Arbitrum.\\n /// @param _maxMissingBlocks The maximum number of blocks that can be missing in a challenge period.\\n constructor(\\n uint256 _deposit,\\n uint256 _epochPeriod,\\n uint256 _minChallengePeriod,\\n uint256 _timeoutEpochs,\\n address _veaInboxArbToEthDevnet,\\n address _bridge,\\n uint256 _maxMissingBlocks\\n )\\n VeaOutboxArbToEth(\\n _deposit,\\n _epochPeriod,\\n _minChallengePeriod,\\n _timeoutEpochs,\\n _veaInboxArbToEthDevnet,\\n _bridge,\\n _maxMissingBlocks\\n )\\n {\\n devnetOperator = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xe20fb148f8d18f49e64dbd5df03cecf95d25a74b39d7051848ca24368152e940\",\"license\":\"MIT\"},\"src/interfaces/outboxes/IVeaOutboxOnL1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nimport \\\"../types/VeaClaim.sol\\\";\\n\\n/// @dev Interface of the Vea Outbox on L1 chains like Ethereum, Gnosis, Polygon POS where storage is expensive.\\ninterface IVeaOutboxOnL1 {\\n /// @dev Verifies and relays the message.\\n /// Note: Gateways expect first argument of message call to be the arbitrum message sender, used for authentication.\\n /// @param _proof The merkle proof to prove the message.\\n /// @param _msgId The zero based index of the message in the inbox.\\n /// @param _to The address to send the message to.\\n /// @param _message The message to relay.\\n function sendMessage(bytes32[] calldata _proof, uint64 _msgId, address _to, bytes calldata _message) external;\\n\\n /// @dev Resolves any challenge of the optimistic claim for 'epoch' using the canonical bridge.\\n /// Note: Access restricted to canonical bridge.\\n /// @param _epoch The epoch to verify.\\n /// @param _stateRoot The true state root for the epoch.\\n /// @param _claim The claim associated with the epoch.\\n function resolveDisputedClaim(uint256 _epoch, bytes32 _stateRoot, Claim memory _claim) external;\\n}\\n\",\"keccak256\":\"0x52f714405dbb6f5953f7e59bf7139742837c2f055fc090971421d931a5289b51\",\"license\":\"MIT\"},\"src/interfaces/types/VeaClaim.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n/// @custom:authors: [@jaybuidl, @shotaronowhere]\\n/// @custom:reviewers: []\\n/// @custom:auditors: []\\n/// @custom:bounties: []\\n/// @custom:deployments: []\\n\\npragma solidity 0.8.18;\\n\\nenum Party {\\n None,\\n Claimer,\\n Challenger\\n}\\n\\nstruct Claim {\\n bytes32 stateRoot;\\n address claimer;\\n uint32 timestampClaimed;\\n uint32 timestampVerification;\\n uint32 blocknumberVerification;\\n Party honest;\\n address challenger;\\n}\\n\",\"keccak256\":\"0x1b25222d0ebdb4beed6cd844ea1f262c89e4c002e7520972e6b79083eeed6418\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101a06040523480156200001257600080fd5b5060405162002c7638038062002c768339810160408190526200003591620002ee565b60c08790526101208690526101408590526101608490526001600160a01b0380841660a05282166080526101808190528686868686868662000076620000ee565b620000836002886200036c565b60e0819052620000958860026200038f565b620000a19190620003af565b6101005261012051600190620000b890426200036c565b620000c49190620003af565b6001555050600780546001600160a01b0319163317905550620004219a5050505050505050505050565b60006080516001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000131573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001579190620003c5565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801562000195573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001bb9190620003ea565b5092505050600454811115620002065760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b600454811015620002ce5760065415620002805760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b606482015260840160405180910390fd5b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b80516001600160a01b0381168114620002e957600080fd5b919050565b600080600080600080600060e0888a0312156200030a57600080fd5b875196506020880151955060408801519450606088015193506200033160808901620002d1565b92506200034160a08901620002d1565b915060c0880151905092959891949750929550565b634e487b7160e01b600052601160045260246000fd5b6000826200038a57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417620003a957620003a962000356565b92915050565b81810381811115620003a957620003a962000356565b600060208284031215620003d857600080fd5b620003e382620002d1565b9392505050565b600080600080608085870312156200040157600080fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e0516101005161012051610140516101605161018051612704620005726000396000818161057d0152611e390152600081816105b10152818161098801528181611806015281816119910152611b9d0152600081816106390152611dcd0152600081816105e5015281816109ac01528181610cb5015281816114f50152818161182a015281816119b50152611bc10152600081816104c00152818161128601526113bf0152600081816103ab01528181611233015261137701526000818161066d01528181610cf801528181610e6601528181610e930152818161140f01528181611afb01528181611b6201528181611d0801528181611d7601528181611f2d015281816120bb01526120e80152600081816104740152610a960152600081816106ee0152818161086e01528181610a2701528181610ac0015261157601526127046000f3fe60806040526004361061020f5760003560e01c8063836e344b11610118578063b633b944116100a0578063df19e6ff1161006f578063df19e6ff146106af578063e78cea92146106dc578063e813a75514610710578063eedcf2a914610726578063fccc28131461073957600080fd5b8063b633b94414610607578063c2114a1614610627578063d0e30db01461065b578063da2b7bc41461068f57600080fd5b8063930f28af116100e7578063930f28af146105355780639588eca214610555578063aa22a1c61461056b578063b044397e1461059f578063b5b7a184146105d357600080fd5b8063836e344b146104ae5780638830dfbd146104e25780638a619a71146104f55780638ad3a8f71461051557600080fd5b80633ce43cfd1161019b57806349b4299e1161016a57806349b4299e146103ed5780634a439cfe1461040d578063541adcca1461042d5780635f43a47f1461044d57806369cd250d1461046257600080fd5b80633ce43cfd1461032c57806343b066d51461034c57806344df8e70146103995780634788cb38146103cd57600080fd5b8063222ae786116101e2578063222ae786146102935780632639c060146102b657806327ee6bdd146102e357806331d14457146102f957806331ddf7431461030c57600080fd5b806301139b6814610214578063051d1970146102295780630c63fa841461025e5780630f0adca514610273575b600080fd5b61022761022236600461222f565b61074e565b005b34801561023557600080fd5b50600554600654610244919082565b604080519283526020830191909152015b60405180910390f35b34801561026a57600080fd5b5061022761075d565b34801561027f57600080fd5b5061022761028e36600461225d565b610986565b34801561029f57600080fd5b506102a8610cae565b604051908152602001610255565b3480156102c257600080fd5b506102a86102d1366004612294565b60026020526000908152604090205481565b3480156102ef57600080fd5b506102a860015481565b6102276103073660046122ad565b610cdf565b34801561031857600080fd5b50610227610327366004612330565b610edc565b34801561033857600080fd5b506102276103473660046123f2565b61117c565b34801561035857600080fd5b50610389610367366004612294565b600881901c600090815260036020526040902054600160ff9092161c81161490565b6040519015158152602001610255565b3480156103a557600080fd5b506102a87f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d957600080fd5b506102276103e836600461222f565b6112c3565b3480156103f957600080fd5b5061022761040836600461222f565b611447565b34801561041957600080fd5b506102a8610428366004612294565b6114ee565b34801561043957600080fd5b506102a861044836600461242b565b611520565b34801561045957600080fd5b50610227611572565b34801561046e57600080fd5b506104967f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610255565b3480156104ba57600080fd5b506102a87f000000000000000000000000000000000000000000000000000000000000000081565b6102276104f036600461244e565b611766565b34801561050157600080fd5b50610227610510366004612491565b611771565b34801561052157600080fd5b50600754610496906001600160a01b031681565b34801561054157600080fd5b5061022761055036600461222f565b611804565b34801561056157600080fd5b506102a860005481565b34801561057757600080fd5b506102a87f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ab57600080fd5b506102a87f000000000000000000000000000000000000000000000000000000000000000081565b3480156105df57600080fd5b506102a87f000000000000000000000000000000000000000000000000000000000000000081565b34801561061357600080fd5b5061022761062236600461222f565b61198f565b34801561063357600080fd5b506102a87f000000000000000000000000000000000000000000000000000000000000000081565b34801561066757600080fd5b506102a87f000000000000000000000000000000000000000000000000000000000000000081565b34801561069b57600080fd5b506102276106aa36600461222f565b611b9b565b3480156106bb57600080fd5b506106cf6106ca36600461242b565b611daf565b60405161025591906124c4565b3480156106e857600080fd5b506104967f000000000000000000000000000000000000000000000000000000000000000081565b34801561071c57600080fd5b506102a860045481565b6102276107343660046122ad565b611e76565b34801561074557600080fd5b50610496600081565b610759828233611ef6565b5050565b6006546000036107c95760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b6004546006546107d991906124f4565b42116108425760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016107c0565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156108b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108dd9190612507565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561091a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093e9190612524565b50925050508181036107595760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816109d9576109d961255a565b04031115610a1c5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107c0565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a945760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016107c0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b409190612507565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba19190612507565b6001600160a01b031614610bf05760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016107c0565b60015483118015610c0057508115155b15610c4357600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610c4c81611520565b60008481526002602052604090205403610ca9578051829003610c7557600160a0820152610c90565b60c08101516001600160a01b031615610c9057600260a08201525b610c9981611520565b6000848152600260205260409020555b505050565b6000610cda7f000000000000000000000000000000000000000000000000000000000000000042612570565b905090565b6007546001600160a01b03163314610cf657600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610d665760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016107c0565b80610d835760405162461bcd60e51b81526004016107c090612592565b60008281526002602052604090205415610dd55760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016107c0565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610e1b90611520565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a37f0000000000000000000000000000000000000000000000000000000000000000341115610759576000610eb87f0000000000000000000000000000000000000000000000000000000000000000346125ba565b604051909150339082156108fc029083906000818181858888f15050505050505050565b60408510610f1e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016107c0565b600084848484604051602001610f3794939291906125cd565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610fb7576000888883818110610f7957610f7961260f565b90506020020135905082811115610f9e57826000528060205260406000209250610fae565b8060005282602052604060002092505b50600101610f5d565b508060005414610ffa5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016107c0565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561106f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016107c0565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061109f9089908990612625565b6000604051808303816000865af19150503d80600081146110dc576040519150601f19603f3d011682016040523d82523d6000602084013e6110e1565b606091505b50509050806111325760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016107c0565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61118e6104483683900383018361242b565b600083815260026020526040902054146111ba5760405162461bcd60e51b81526004016107c090612592565b60026111cc60c0830160a08401612635565b60028111156111dd576111dd6124ae565b1461121e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016107c0565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061127893505060e0840191505060c08301612491565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6112cc81611520565b600083815260026020526040902054146112f85760405162461bcd60e51b81526004016107c090612592565b60018160a001516002811115611310576113106124ae565b1461134d5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016107c0565b60008281526002602052604081205560c08101516001600160a01b0316156113f9576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461145e57600080fd5b61146781611520565b600083815260026020526040902054146114935760405162461bcd60e51b81526004016107c090612592565b63ffffffff4281166060830152431660808201526114b081611520565b60008381526002602052604080822092909255905183917f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691a25050565b600061151a7f000000000000000000000000000000000000000000000000000000000000000083612570565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611555989097969101612650565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f69190612507565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611633573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116579190612524565b50925050506004548111156116a15760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b60045481101561176357600654156117155760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016107c0565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b610ca9838383611ef6565b6007546001600160a01b0316331461178857600080fd5b6007546001600160a01b031633146117e25760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016107c0565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816118575761185761255a565b0403111561189a5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107c0565b6118a381611520565b600083815260026020526040902054146118cf5760405162461bcd60e51b81526004016107c090612592565b60c08101516001600160a01b0316156119215760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016107c0565b60015482111561196957600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261197981611520565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119e2576119e261255a565b040311611a235760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107c0565b611a2c81611520565b60008381526002602052604090205414611a585760405162461bcd60e51b81526004016107c090612592565b60008160a001516002811115611a7057611a706124ae565b14611aaf5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107c0565b60c08101516001600160a01b0316156107595760208101516001600160a01b0316611b335760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b4782611520565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bee57611bee61255a565b040311611c2f5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107c0565b611c3881611520565b60008381526002602052604090205414611c645760405162461bcd60e51b81526004016107c090612592565b60008160a001516002811115611c7c57611c7c6124ae565b14611cbb5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107c0565b60208101516001600160a01b0316156107595760c08101516001600160a01b0316611d405760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611d5482611520565b6000848152600260205260408082209290925590516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b6000816060015163ffffffff16600003611dcb57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e0757506003919050565b6000600c836060015163ffffffff16420381611e2557611e2561255a565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611e695760019250611e6e565b600092505b50505b919050565b611e808282610cdf565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611ec78382611447565b63ffffffff428116606083015243166080820152611ee58382611804565b600160a0820152610ca983826112c3565b611eff82611520565b60008481526002602052604090205414611f2b5760405162461bcd60e51b81526004016107c090612592565b7f0000000000000000000000000000000000000000000000000000000000000000341015611f9b5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016107c0565b60c08201516001600160a01b031615611ff65760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016107c0565b60008260a00151600281111561200e5761200e6124ae565b1461205b5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016107c0565b6001600160a01b03811660c083015261207382611520565b6000848152600260205260408082209290925590516001600160a01b0383169185917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d79190a37f0000000000000000000000000000000000000000000000000000000000000000341115610ca957600061210d7f0000000000000000000000000000000000000000000000000000000000000000346125ba565b604051909150339082156108fc029083906000818181858888f1505050505050505050565b6001600160a01b038116811461176357600080fd5b8035611e7181612132565b803563ffffffff81168114611e7157600080fd5b803560038110611e7157600080fd5b600060e0828403121561218757600080fd5b60405160e0810181811067ffffffffffffffff821117156121b857634e487b7160e01b600052604160045260246000fd5b604052823581529050806121ce60208401612147565b60208201526121df60408401612152565b60408201526121f060608401612152565b606082015261220160808401612152565b608082015261221260a08401612166565b60a082015261222360c08401612147565b60c08201525092915050565b600080610100838503121561224357600080fd5b823591506122548460208501612175565b90509250929050565b6000806000610120848603121561227357600080fd5b833592506020840135915061228b8560408601612175565b90509250925092565b6000602082840312156122a657600080fd5b5035919050565b600080604083850312156122c057600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611e7157600080fd5b60008083601f8401126122f957600080fd5b50813567ffffffffffffffff81111561231157600080fd5b60208301915083602082850101111561232957600080fd5b9250929050565b6000806000806000806080878903121561234957600080fd5b863567ffffffffffffffff8082111561236157600080fd5b818901915089601f83011261237557600080fd5b81358181111561238457600080fd5b8a60208260051b850101111561239957600080fd5b602083019850809750506123af60208a016122cf565b95506123bd60408a01612147565b945060608901359150808211156123d357600080fd5b506123e089828a016122e7565b979a9699509497509295939492505050565b60008082840361010081121561240757600080fd5b8335925060e0601f198201121561241d57600080fd5b506020830190509250929050565b600060e0828403121561243d57600080fd5b6124478383612175565b9392505050565b6000806000610120848603121561246457600080fd5b833592506124758560208601612175565b915061010084013561248681612132565b809150509250925092565b6000602082840312156124a357600080fd5b813561244781612132565b634e487b7160e01b600052602160045260246000fd5b60208101600483106124d8576124d86124ae565b91905290565b634e487b7160e01b600052601160045260246000fd5b8082018082111561151a5761151a6124de565b60006020828403121561251957600080fd5b815161244781612132565b6000806000806080858703121561253a57600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b60008261258d57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b8181038181111561151a5761151a6124de565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561264757600080fd5b61244782612166565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106126a8576126a86124ae565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122037ead742b791048bba506490278dcde993ac7e6269dc2e35fffc17e30104970664736f6c63430008120033", + "deployedBytecode": "0x60806040526004361061020f5760003560e01c8063836e344b11610118578063b633b944116100a0578063df19e6ff1161006f578063df19e6ff146106af578063e78cea92146106dc578063e813a75514610710578063eedcf2a914610726578063fccc28131461073957600080fd5b8063b633b94414610607578063c2114a1614610627578063d0e30db01461065b578063da2b7bc41461068f57600080fd5b8063930f28af116100e7578063930f28af146105355780639588eca214610555578063aa22a1c61461056b578063b044397e1461059f578063b5b7a184146105d357600080fd5b8063836e344b146104ae5780638830dfbd146104e25780638a619a71146104f55780638ad3a8f71461051557600080fd5b80633ce43cfd1161019b57806349b4299e1161016a57806349b4299e146103ed5780634a439cfe1461040d578063541adcca1461042d5780635f43a47f1461044d57806369cd250d1461046257600080fd5b80633ce43cfd1461032c57806343b066d51461034c57806344df8e70146103995780634788cb38146103cd57600080fd5b8063222ae786116101e2578063222ae786146102935780632639c060146102b657806327ee6bdd146102e357806331d14457146102f957806331ddf7431461030c57600080fd5b806301139b6814610214578063051d1970146102295780630c63fa841461025e5780630f0adca514610273575b600080fd5b61022761022236600461222f565b61074e565b005b34801561023557600080fd5b50600554600654610244919082565b604080519283526020830191909152015b60405180910390f35b34801561026a57600080fd5b5061022761075d565b34801561027f57600080fd5b5061022761028e36600461225d565b610986565b34801561029f57600080fd5b506102a8610cae565b604051908152602001610255565b3480156102c257600080fd5b506102a86102d1366004612294565b60026020526000908152604090205481565b3480156102ef57600080fd5b506102a860015481565b6102276103073660046122ad565b610cdf565b34801561031857600080fd5b50610227610327366004612330565b610edc565b34801561033857600080fd5b506102276103473660046123f2565b61117c565b34801561035857600080fd5b50610389610367366004612294565b600881901c600090815260036020526040902054600160ff9092161c81161490565b6040519015158152602001610255565b3480156103a557600080fd5b506102a87f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d957600080fd5b506102276103e836600461222f565b6112c3565b3480156103f957600080fd5b5061022761040836600461222f565b611447565b34801561041957600080fd5b506102a8610428366004612294565b6114ee565b34801561043957600080fd5b506102a861044836600461242b565b611520565b34801561045957600080fd5b50610227611572565b34801561046e57600080fd5b506104967f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610255565b3480156104ba57600080fd5b506102a87f000000000000000000000000000000000000000000000000000000000000000081565b6102276104f036600461244e565b611766565b34801561050157600080fd5b50610227610510366004612491565b611771565b34801561052157600080fd5b50600754610496906001600160a01b031681565b34801561054157600080fd5b5061022761055036600461222f565b611804565b34801561056157600080fd5b506102a860005481565b34801561057757600080fd5b506102a87f000000000000000000000000000000000000000000000000000000000000000081565b3480156105ab57600080fd5b506102a87f000000000000000000000000000000000000000000000000000000000000000081565b3480156105df57600080fd5b506102a87f000000000000000000000000000000000000000000000000000000000000000081565b34801561061357600080fd5b5061022761062236600461222f565b61198f565b34801561063357600080fd5b506102a87f000000000000000000000000000000000000000000000000000000000000000081565b34801561066757600080fd5b506102a87f000000000000000000000000000000000000000000000000000000000000000081565b34801561069b57600080fd5b506102276106aa36600461222f565b611b9b565b3480156106bb57600080fd5b506106cf6106ca36600461242b565b611daf565b60405161025591906124c4565b3480156106e857600080fd5b506104967f000000000000000000000000000000000000000000000000000000000000000081565b34801561071c57600080fd5b506102a860045481565b6102276107343660046122ad565b611e76565b34801561074557600080fd5b50610496600081565b610759828233611ef6565b5050565b6006546000036107c95760405162461bcd60e51b815260206004820152602c60248201527f4e6f2070656e64696e672073657175656e636572206c696d697420646563726560448201526b30b9b2903932b8bab2b9ba1760a11b60648201526084015b60405180910390fd5b6004546006546107d991906124f4565b42116108425760405162461bcd60e51b815260206004820152603260248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152711034b99039ba34b636103832b73234b7339760711b60648201526084016107c0565b6005805460009182905560068290556040805163ee35f32760e01b815290519192916001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163ee35f3279160048083019260209291908290030181865afa1580156108b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108dd9190612507565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa15801561091a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093e9190612524565b50925050508181036107595760048290556040518281527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a15050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816109d9576109d961255a565b04031115610a1c5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107c0565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a945760405162461bcd60e51b815260206004820181905260248201527f4e6f742066726f6d206e617469766520617262697472756d206272696467652e60448201526064016107c0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ab5d89436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b409190612507565b6001600160a01b03166380648b026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba19190612507565b6001600160a01b031614610bf05760405162461bcd60e51b81526020600482015260166024820152753b32b0a4b73137bc20b9312a37a2ba341037b7363c9760511b60448201526064016107c0565b60015483118015610c0057508115155b15610c4357600183905560008290556040518381527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b610c4c81611520565b60008481526002602052604090205403610ca9578051829003610c7557600160a0820152610c90565b60c08101516001600160a01b031615610c9057600260a08201525b610c9981611520565b6000848152600260205260409020555b505050565b6000610cda7f000000000000000000000000000000000000000000000000000000000000000042612570565b905090565b6007546001600160a01b03163314610cf657600080fd5b7f0000000000000000000000000000000000000000000000000000000000000000341015610d665760405162461bcd60e51b815260206004820152601b60248201527f496e73756666696369656e7420636c61696d206465706f7369742e000000000060448201526064016107c0565b80610d835760405162461bcd60e51b81526004016107c090612592565b60008281526002602052604090205415610dd55760405162461bcd60e51b815260206004820152601360248201527221b630b4b69030b63932b0b23c9036b0b2329760691b60448201526064016107c0565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152610e1b90611520565b6000838152600260209081526040918290209290925551828152839133917fd95107f4584744c6c893a04c43058aadd1ce8aac8ca5d64140eaf277de6c1d57910160405180910390a37f0000000000000000000000000000000000000000000000000000000000000000341115610759576000610eb87f0000000000000000000000000000000000000000000000000000000000000000346125ba565b604051909150339082156108fc029083906000818181858888f15050505050505050565b60408510610f1e5760405162461bcd60e51b815260206004820152600f60248201526e283937b7b3103a37b7903637b7339760891b60448201526064016107c0565b600084848484604051602001610f3794939291906125cd565b604051602081830303815290604052805190602001209050806000526020600020905060005b86811015610fb7576000888883818110610f7957610f7961260f565b90506020020135905082811115610f9e57826000528060205260406000209250610fae565b8060005282602052604060002092505b50600101610f5d565b508060005414610ffa5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b60448201526064016107c0565b600885901c66ffffffffffffff1660008181526003602052604090205460ff87169080821c6001161561106f5760405162461bcd60e51b815260206004820152601760248201527f4d65737361676520616c72656164792072656c6179656400000000000000000060448201526064016107c0565b6000838152600360205260408082206001851b84179055516001600160a01b0389169061109f9089908990612625565b6000604051808303816000865af19150503d80600081146110dc576040519150601f19603f3d011682016040523d82523d6000602084013e6110e1565b606091505b50509050806111325760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2063616c6c20636f6e747261637400000000000000000060448201526064016107c0565b60405167ffffffffffffffff8a1681527f54303fab361bc52c2f1f56ace7351189582264f74ce47a6e7c3f478d64c429439060200160405180910390a15050505050505050505050565b61118e6104483683900383018361242b565b600083815260026020526040902054146111ba5760405162461bcd60e51b81526004016107c090612592565b60026111cc60c0830160a08401612635565b60028111156111dd576111dd6124ae565b1461121e5760405162461bcd60e51b815260206004820152601160248201527021b430b63632b733b2903330b4b632b21760791b60448201526064016107c0565b600082815260026020526040808220829055517f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f15061127893505060e0840191505060c08301612491565b6001600160a01b03166108fc7f00000000000000000000000000000000000000000000000000000000000000009081150290604051600060405180830381858888f150505050505050565b6112cc81611520565b600083815260026020526040902054146112f85760405162461bcd60e51b81526004016107c090612592565b60018160a001516002811115611310576113106124ae565b1461134d5760405162461bcd60e51b815260206004820152600d60248201526c21b630b4b6903330b4b632b21760991b60448201526064016107c0565b60008281526002602052604081205560c08101516001600160a01b0316156113f9576040516000907f000000000000000000000000000000000000000000000000000000000000000080156108fc029183818181858288f150505060208301516040516001600160a01b0390911692507f000000000000000000000000000000000000000000000000000000000000000080156108fc029250906000818181858888f150505050505050565b60208101516040516001600160a01b03909116907f000000000000000000000000000000000000000000000000000000000000000080156108fc02916000818181858888f150505050505050565b6007546001600160a01b0316331461145e57600080fd5b61146781611520565b600083815260026020526040902054146114935760405162461bcd60e51b81526004016107c090612592565b63ffffffff4281166060830152431660808201526114b081611520565b60008381526002602052604080822092909255905183917f37b700b61b9b4710dddb0c3316b2be7ef6088ed4b1d7bfe0fb98be8f9a163e1691a25050565b600061151a7f000000000000000000000000000000000000000000000000000000000000000083612570565b92915050565b80516020808301516040808501516060860151608087015160a088015160c08901519451600098611555989097969101612650565b604051602081830303815290604052805190602001209050919050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee35f3276040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f69190612507565b6001600160a01b031663ebea461d6040518163ffffffff1660e01b8152600401608060405180830381865afa158015611633573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116579190612524565b50925050506004548111156116a15760048190556040518181527f611c2e4a78552f908fb0eb2cc503efc1f947cde8574277ab3b0f10fdd510258b9060200160405180910390a150565b60045481101561176357600654156117155760405162461bcd60e51b815260206004820152603160248201527f53657175656e636572206c696d697420646563726561736520726571756573746044820152701030b63932b0b23c903832b73234b7339760791b60648201526084016107c0565b604080518082018252828152426020918201819052600584905560065590518281527fa552b382e128c9d0732f01f09502c18999aec5dce0ed78c5af0ea2274ce9bd7d910160405180910390a15b50565b610ca9838383611ef6565b6007546001600160a01b0316331461178857600080fd5b6007546001600160a01b031633146117e25760405162461bcd60e51b815260206004820152601860248201527f496e76616c696420546573746e6574204f70657261746f72000000000000000060448201526064016107c0565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816118575761185761255a565b0403111561189a5760405162461bcd60e51b815260206004820152601060248201526f213934b233b29029b43aba3237bbb71760811b60448201526064016107c0565b6118a381611520565b600083815260026020526040902054146118cf5760405162461bcd60e51b81526004016107c090612592565b60c08101516001600160a01b0316156119215760405162461bcd60e51b815260206004820152601460248201527321b630b4b69034b99031b430b63632b733b2b21760611b60448201526064016107c0565b60015482111561196957600182905580516000556040518281527ff786e7f77ede00a02a5464f8f0555798f42ba99a4a920ef2778db8d75e4656f79060200160405180910390a15b600160a082015261197981611520565b6000928352600260205260409092209190915550565b7f00000000000000000000000000000000000000000000000000000000000000006001547f000000000000000000000000000000000000000000000000000000000000000042816119e2576119e261255a565b040311611a235760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107c0565b611a2c81611520565b60008381526002602052604090205414611a585760405162461bcd60e51b81526004016107c090612592565b60008160a001516002811115611a7057611a706124ae565b14611aaf5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107c0565b60c08101516001600160a01b0316156107595760208101516001600160a01b0316611b335760008281526002602052604080822082905560c083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b60c0810180516000909152611b4782611520565b50600083815260026020526040516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001547f00000000000000000000000000000000000000000000000000000000000000004281611bee57611bee61255a565b040311611c2f5760405162461bcd60e51b815260206004820152600f60248201526e213934b233b290293ab73734b7339760891b60448201526064016107c0565b611c3881611520565b60008381526002602052604090205414611c645760405162461bcd60e51b81526004016107c090612592565b60008160a001516002811115611c7c57611c7c6124ae565b14611cbb5760405162461bcd60e51b815260206004820152600f60248201526e21b630b4b6903932b9b7b63b32b21760891b60448201526064016107c0565b60208101516001600160a01b0316156107595760c08101516001600160a01b0316611d405760008281526002602090815260408083208390559083015190516001600160a01b03909116917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f150505050505050565b6020810180516000909152611d5482611520565b6000848152600260205260408082209290925590516001600160a01b038316917f000000000000000000000000000000000000000000000000000000000000000080156108fc02929091818181858888f15050505050505050565b6000816060015163ffffffff16600003611dcb57506002919050565b7f0000000000000000000000000000000000000000000000000000000000000000826060015163ffffffff1642031015611e0757506003919050565b6000600c836060015163ffffffff16420381611e2557611e2561255a565b608085015163ffffffff16919004019050437f000000000000000000000000000000000000000000000000000000000000000081830311611e695760019250611e6e565b600092505b50505b919050565b611e808282610cdf565b6040805160e0810182528281523360208201524263ffffffff16918101919091526000606082018190526080820181905260a0820181905260c0820152611ec78382611447565b63ffffffff428116606083015243166080820152611ee58382611804565b600160a0820152610ca983826112c3565b611eff82611520565b60008481526002602052604090205414611f2b5760405162461bcd60e51b81526004016107c090612592565b7f0000000000000000000000000000000000000000000000000000000000000000341015611f9b5760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e74206368616c6c656e6765206465706f7369742e0060448201526064016107c0565b60c08201516001600160a01b031615611ff65760405162461bcd60e51b815260206004820152601960248201527f436c61696d20616c7265616479206368616c6c656e6765642e0000000000000060448201526064016107c0565b60008260a00151600281111561200e5761200e6124ae565b1461205b5760405162461bcd60e51b815260206004820152601760248201527f436c61696d20616c72656164792076657269666965642e00000000000000000060448201526064016107c0565b6001600160a01b03811660c083015261207382611520565b6000848152600260205260408082209290925590516001600160a01b0383169185917fcfe09ca25f55d949baba5e280f5750c9ba4b9048fca5532f916067d433afe4d79190a37f0000000000000000000000000000000000000000000000000000000000000000341115610ca957600061210d7f0000000000000000000000000000000000000000000000000000000000000000346125ba565b604051909150339082156108fc029083906000818181858888f1505050505050505050565b6001600160a01b038116811461176357600080fd5b8035611e7181612132565b803563ffffffff81168114611e7157600080fd5b803560038110611e7157600080fd5b600060e0828403121561218757600080fd5b60405160e0810181811067ffffffffffffffff821117156121b857634e487b7160e01b600052604160045260246000fd5b604052823581529050806121ce60208401612147565b60208201526121df60408401612152565b60408201526121f060608401612152565b606082015261220160808401612152565b608082015261221260a08401612166565b60a082015261222360c08401612147565b60c08201525092915050565b600080610100838503121561224357600080fd5b823591506122548460208501612175565b90509250929050565b6000806000610120848603121561227357600080fd5b833592506020840135915061228b8560408601612175565b90509250925092565b6000602082840312156122a657600080fd5b5035919050565b600080604083850312156122c057600080fd5b50508035926020909101359150565b803567ffffffffffffffff81168114611e7157600080fd5b60008083601f8401126122f957600080fd5b50813567ffffffffffffffff81111561231157600080fd5b60208301915083602082850101111561232957600080fd5b9250929050565b6000806000806000806080878903121561234957600080fd5b863567ffffffffffffffff8082111561236157600080fd5b818901915089601f83011261237557600080fd5b81358181111561238457600080fd5b8a60208260051b850101111561239957600080fd5b602083019850809750506123af60208a016122cf565b95506123bd60408a01612147565b945060608901359150808211156123d357600080fd5b506123e089828a016122e7565b979a9699509497509295939492505050565b60008082840361010081121561240757600080fd5b8335925060e0601f198201121561241d57600080fd5b506020830190509250929050565b600060e0828403121561243d57600080fd5b6124478383612175565b9392505050565b6000806000610120848603121561246457600080fd5b833592506124758560208601612175565b915061010084013561248681612132565b809150509250925092565b6000602082840312156124a357600080fd5b813561244781612132565b634e487b7160e01b600052602160045260246000fd5b60208101600483106124d8576124d86124ae565b91905290565b634e487b7160e01b600052601160045260246000fd5b8082018082111561151a5761151a6124de565b60006020828403121561251957600080fd5b815161244781612132565b6000806000806080858703121561253a57600080fd5b505082516020840151604085015160609095015191969095509092509050565b634e487b7160e01b600052601260045260246000fd5b60008261258d57634e487b7160e01b600052601260045260246000fd5b500490565b6020808252600e908201526d24b73b30b634b21031b630b4b69760911b604082015260600190565b8181038181111561151a5761151a6124de565b60c085901b6001600160c01b0319168152606084901b6bffffffffffffffffffffffff191660088201528183601c83013760009101601c019081529392505050565b634e487b7160e01b600052603260045260246000fd5b8183823760009101908152919050565b60006020828403121561264757600080fd5b61244782612166565b87815260006bffffffffffffffffffffffff19808960601b16602084015263ffffffff60e01b808960e01b166034850152808860e01b166038850152808760e01b16603c85015250600385106126a8576126a86124ae565b60f89490941b60408301525060609190911b90911660418201526055019594505050505056fea264697066735822122037ead742b791048bba506490278dcde993ac7e6269dc2e35fffc17e30104970664736f6c63430008120033", + "devdoc": { + "details": "Vea Outbox From arbitrumSepolia to Sepolia. Note: This contract is deployed on Sepolia. Note: This contract is permissioned for developer testing (devnet).", + "events": { + "Challenged(uint256,address)": { + "details": "This event indicates that `sendSnapshot(epoch)` should be called in the inbox.", + "params": { + "_challenger": "The address of the challenger.", + "_epoch": "The epoch associated with the challenged claim." + } + }, + "Claimed(address,uint256,bytes32)": { + "details": "Watchers check this event to challenge fraud.", + "params": { + "_claimer": "The address of the claimer.", + "_epoch": "The epoch associated with the claim.", + "_stateRoot": "The state root of the claim." + } + }, + "MessageRelayed(uint64)": { + "details": "This event indicates that a message has been relayed.", + "params": { + "_msgId": "The msgId of the message that was relayed." + } + }, + "VerificationStarted(uint256)": { + "details": "This event indicates that the censorship test started and all challengers are ready even in the worst case scenario of a malicious sequencer.", + "params": { + "_epoch": "The epoch that started verification." + } + }, + "Verified(uint256)": { + "details": "This events indicates that verification has succeeded. The messages are ready to be relayed.", + "params": { + "_epoch": "The epoch that was verified." + } + }, + "sequencerDelayLimitDecreaseRequested(uint256)": { + "details": "This event indicates that a request to decrease the sequencer limit has been made.", + "params": { + "_requestedSequencerDelayLimit": "The new sequencer delay limit requested." + } + }, + "sequencerDelayLimitUpdated(uint256)": { + "details": "This event indicates the sequencer limit updated.", + "params": { + "_newSequencerDelayLimit": "The new sequencer delay limit." + } + } + }, + "kind": "dev", + "methods": { + "censorshipTestStatus((bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Gets the status of the censorship test for claim.", + "params": { + "_claim": "The claim to test." + }, + "returns": { + "status": "True if the claim passed the censorship test." + } + }, + "challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch of the claim to challenge." + } + }, + "challenge(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address),address)": { + "details": "Submit a challenge for the claim of the inbox state root snapshot taken at 'epoch'.Allows proxy contracts to batch challenges.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch of the claim to challenge.", + "_withdrawalAddress": "The address to withdraw the deposit + reward to." + } + }, + "changeDevnetOperator(address)": { + "details": "Changes the devnet operator.", + "params": { + "_devnetOperator": "The new testnet operator." + } + }, + "claim(uint256,bytes32)": { + "details": "Submit a claim about the _stateRoot at _epoch and submit a deposit.", + "params": { + "_epoch": "The epoch for which the claim is made.", + "_stateRoot": "The state root to claim." + } + }, + "constructor": { + "details": "Constructor.", + "params": { + "_deposit": "The deposit amount to submit a claim in wei.", + "_epochPeriod": "The duration of each epoch.", + "_maxMissingBlocks": "The maximum number of blocks that can be missing in a challenge period.", + "_minChallengePeriod": "The minimum time window to challenge a claim.", + "_timeoutEpochs": "The epochs before the bridge is considered shutdown.", + "_veaInboxArbToEthDevnet": "The address of the inbox contract on Arbitrum." + } + }, + "devnetAdvanceState(uint256,bytes32)": { + "details": "Testnet operator utility function to claim, validate and withdraw.", + "params": { + "_epoch": "The epoch for which the claim is made.", + "_stateroot": "The state root to claim." + } + }, + "epochAt(uint256)": { + "details": "Get the current epoch from the outbox's point of view using the Ethereum L1 clock.", + "returns": { + "epoch": "The hash of the claim." + } + }, + "epochNow()": { + "details": "Get the current epoch from the outbox's point of view using the Ethereum L1 clock.", + "returns": { + "epoch": "The hash of the claim." + } + }, + "executeSequencerDelayLimitDecreaseRequest()": { + "details": "execute sequencerDelayLimitDecreaseRequest" + }, + "hashClaim((bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Hashes the claim.", + "params": { + "_claim": "The claim to hash." + }, + "returns": { + "hashedClaim": "The hash of the claim." + } + }, + "isMsgRelayed(uint256)": { + "details": "Get the msg relayed status.", + "params": { + "_msgId": "The msgId to check." + }, + "returns": { + "isRelayed": "True if the msg was relayed." + } + }, + "resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Resolves any challenge of the optimistic claim for '_epoch'.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch to verify.", + "_stateRoot": "The true state root for the epoch." + } + }, + "sendMessage(bytes32[],uint64,address,bytes)": { + "details": "Verifies and relays the message. UNTRUSTED.", + "params": { + "_message": "The message encoded in the vea inbox as abi.encodeWithSelector(fnSelector, msg.sender, param1, param2, ...)", + "_msgId": "The zero based index of the message in the inbox.", + "_proof": "The merkle proof to prove the message inclusion in the inbox state root.", + "_to": "The address of the contract on Ethereum to call." + } + }, + "startVerification(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Start verification for claim for 'epoch'.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch of the claim to challenge." + } + }, + "updateSequencerDelayLimit()": { + "details": "Request to decrease the sequencerDelayLimit." + }, + "verifySnapshot(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Resolves the optimistic claim for '_epoch'.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch of the optimistic claim." + } + }, + "withdrawChallengeDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Sends the deposit back to the Challenger if successful. Includes a portion of the Bridger's deposit.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch associated with the challenge deposit to withraw." + } + }, + "withdrawChallengerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "When bridge is shutdown, no claim disputes can be resolved. This allows the challenger to withdraw their deposit.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch associated with the claim deposit to withraw." + } + }, + "withdrawClaimDeposit(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "Sends the deposit back to the Bridger if their claim is not successfully challenged. Includes a portion of the Challenger's deposit if unsuccessfully challenged.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch associated with the claim deposit to withraw." + } + }, + "withdrawClaimerEscapeHatch(uint256,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "details": "When bridge is shutdown, no claim disputes can be resolved. This allows the claimer to withdraw their deposit.", + "params": { + "_claim": "The claim associated with the epoch.", + "_epoch": "The epoch associated with the claim deposit to withraw." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "resolveDisputedClaim(uint256,bytes32,(bytes32,address,uint32,uint32,uint32,uint8,address))": { + "notice": "Note: Access restricted to arbitrum bridge." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 38, + "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", + "label": "stateRoot", + "offset": 0, + "slot": "0", + "type": "t_bytes32" + }, + { + "astId": 40, + "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", + "label": "latestVerifiedEpoch", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 44, + "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", + "label": "claimHashes", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_bytes32)" + }, + { + "astId": 48, + "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", + "label": "relayed", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint256,t_bytes32)" + }, + { + "astId": 50, + "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", + "label": "sequencerDelayLimit", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 53, + "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", + "label": "sequencerDelayLimitDecreaseRequest", + "offset": 0, + "slot": "5", + "type": "t_struct(SequencerDelayLimitDecreaseRequest)58_storage" + }, + { + "astId": 3030, + "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", + "label": "devnetOperator", + "offset": 0, + "slot": "7", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_struct(SequencerDelayLimitDecreaseRequest)58_storage": { + "encoding": "inplace", + "label": "struct VeaOutboxArbToEth.SequencerDelayLimitDecreaseRequest", + "members": [ + { + "astId": 55, + "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", + "label": "requestedsequencerDelayLimit", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 57, + "contract": "src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol:VeaOutboxArbToEthDevnet", + "label": "timestamp", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index 57daa65d..1551cbb6 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -1,6 +1,6 @@ import * as dotenv from "dotenv"; -import { HardhatUserConfig, task } from "hardhat/config"; +import { HardhatUserConfig } from "hardhat/config"; import "@nomiclabs/hardhat-ethers"; import "@typechain/hardhat"; import "hardhat-deploy-tenderly"; @@ -57,19 +57,20 @@ const config: HardhatUserConfig = { }, // INBOX --------------------------------------------------------------------------------------- - arbitrumGoerli: { - chainId: 421613, - url: "https://goerli-rollup.arbitrum.io/rpc", + arbitrumSepolia: { + chainId: 421614, + url: "https://sepolia-rollup.arbitrum.io/rpc", accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], live: true, saveDeployments: true, tags: ["staging", "inbox", "layer2"], companionNetworks: { - goerli: "goerli", + sepolia: "sepolia", chiado: "chiado", }, verify: { etherscan: { + apiUrl: "https://api-sepolia.arbiscan.io/api", apiKey: process.env.ARBISCAN_API_KEY, }, }, @@ -87,6 +88,7 @@ const config: HardhatUserConfig = { }, verify: { etherscan: { + apiUrl: "https://api.arbiscan.io/api", apiKey: process.env.ARBISCAN_API_KEY, }, }, @@ -100,7 +102,7 @@ const config: HardhatUserConfig = { saveDeployments: true, tags: ["staging", "outbox", "layer1"], companionNetworks: { - arbitrumGoerli: "arbitrumGoerli", + arbitrumSepolia: "arbitrumSepolia", }, verify: { etherscan: { @@ -116,7 +118,7 @@ const config: HardhatUserConfig = { saveDeployments: true, tags: ["staging", "outbox", "layer1"], companionNetworks: { - arbitrumGoerli: "arbitrum", + arbitrumSepolia: "arbitrumSepolia", }, verify: { etherscan: { @@ -124,15 +126,15 @@ const config: HardhatUserConfig = { }, }, }, - goerli: { - chainId: 5, - url: `https://goerli.infura.io/v3/${process.env.INFURA_API_KEY}`, + sepolia: { + chainId: 11155111, + url: `https://sepolia.infura.io/v3/${process.env.INFURA_API_KEY}`, accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], live: true, saveDeployments: true, tags: ["staging", "outbox", "layer1"], companionNetworks: { - arbitrumGoerli: "arbitrumGoerli", + arbitrumSepolia: "arbitrumSepolia", chiado: "chiado", }, }, diff --git a/contracts/package.json b/contracts/package.json index b737a791..928f34e4 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -43,21 +43,21 @@ "deploy:devnet": "yarn deploy:ArbToEthDevnet && yarn deploy:ArbToGnosisDevnet && yarn deploy:GnosisToArbDevnet", "deploy:ArbToEth": "hardhat deploy --network mainnet --tags ArbToEthOutbox && hardhat deploy --network arbitrum --tags ArbToEthInbox", "deploy:ArbToGnosis": "hardhat deploy --network gnosis --tags ArbToGnosisOutbox && hardhat deploy --network arbitrum --tags ArbToGnosisInbox && hardhat deploy --network mainnet --tags ArbToGnosisRouter", - "deploy:GnosisToArb": "hardhat deploy --network arbitrum --tags GnosisToArbOutbox && hardhat deploy --network chiado --tags GnosisToArbInbox && hardhat deploy --network goerli --tags GnosisToArbRouter", - "deploy:ArbToEthTestnet": "hardhat deploy --network goerli --tags ArbToEthOutbox && hardhat deploy --network arbitrumGoerli --tags ArbToEthInbox", - "deploy:ArbToGnosisTestnet": "hardhat deploy --network chiado --tags ArbToGnosisOutbox && hardhat deploy --network arbitrumGoerli --tags ArbToGnosisInbox && hardhat deploy --network goerli --tags ArbToGnosisRouter", - "deploy:GnosisToArbTestnet": "hardhat deploy --network arbitrumGoerli --tags GnosisToArbOutbox && hardhat deploy --network chiado --tags GnosisToArbInbox && hardhat deploy --network goerli --tags GnosisToArbRouter", - "deploy:ArbToEthDevnet": "hardhat deploy --network goerli --tags ArbGoerliToGoerliOutbox && hardhat deploy --network arbitrumGoerli --tags ArbGoerliToGoerliInbox", - "deploy:ArbToGnosisDevnet": "hardhat deploy --network chiado --tags ArbGoerliToChiadoOutbox && hardhat deploy --network arbitrumGoerli --tags ArbGoerliToChiadoInbox && hardhat deploy --network goerli --tags ArbGoerliToChiadoRouter", - "deploy:GnosisToArbDevnet": "hardhat deploy --network arbitrumGoerli --tags ChiadoToArbGoerliOutbox && hardhat deploy --network chiado --tags ChiadoToArbGoerliInbox && hardhat deploy --network goerli --tags ChiadoToArbGoerliRouter", + "deploy:GnosisToArb": "hardhat deploy --network arbitrum --tags GnosisToArbOutbox && hardhat deploy --network chiado --tags GnosisToArbInbox && hardhat deploy --network sepolia --tags GnosisToArbRouter", + "deploy:ArbToEthTestnet": "hardhat deploy --network sepolia --tags ArbToEthOutbox && hardhat deploy --network arbitrumSepolia --tags ArbToEthInbox", + "deploy:ArbToGnosisTestnet": "hardhat deploy --network chiado --tags ArbToGnosisOutbox && hardhat deploy --network arbitrumSepolia --tags ArbToGnosisInbox && hardhat deploy --network sepolia --tags ArbToGnosisRouter", + "deploy:GnosisToArbTestnet": "hardhat deploy --network arbitrumSepolia --tags GnosisToArbOutbox && hardhat deploy --network chiado --tags GnosisToArbInbox && hardhat deploy --network sepolia --tags GnosisToArbRouter", + "deploy:ArbToEthDevnet": "hardhat deploy --network sepolia --tags ArbSepoliaToSepoliaOutbox && hardhat deploy --network arbitrumSepolia --tags ArbSepoliaToSepoliaInbox", + "deploy:ArbToGnosisDevnet": "hardhat deploy --network chiado --tags ArbSepoliaToChiadoOutbox && hardhat deploy --network arbitrumSepolia --tags ArbSepoliaToChiadoInbox && hardhat deploy --network sepolia --tags ArbSepoliaToChiadoRouter", + "deploy:GnosisToArbDevnet": "hardhat deploy --network arbitrumSepolia --tags ChiadoToArbSepoliaOutbox && hardhat deploy --network chiado --tags ChiadoToArbSepoliaInbox && hardhat deploy --network sepolia --tags ChiadoToArbSepoliaRouter", "deploy-local": "hardhat deploy --tags ArbToEthOutbox,ArbToEthInbox --network localhost", - "etherscan-verify:testnet": "yarn etherscan-verify:chiado && yarn etherscan-verify:goerli && yarn etherscan-verify:arbitrumGoerli", + "etherscan-verify:testnet": "yarn etherscan-verify:chiado && yarn etherscan-verify:sepolia && yarn etherscan-verify:arbitrumSepolia", "etherscan-verify:gnosis": "hardhat etherscan-verify --network gnosischain", "etherscan-verify:chiado": "hardhat etherscan-verify --network chiado", "etherscan-verify:ethereum": "hardhat etherscan-verify --network ethereum", - "etherscan-verify:goerli": "hardhat etherscan-verify --network goerli", + "etherscan-verify:sepolia": "hardhat etherscan-verify --network sepolia", "etherscan-verify:arbitrum": "hardhat etherscan-verify --network arbitrum", - "etherscan-verify:arbitrumGoerli": "hardhat etherscan-verify --network arbitrumGoerli", + "etherscan-verify:arbitrumSepolia": "hardhat etherscan-verify --network arbitrumSepolia", "sourcify": "hardhat sourcify --write-failing-metadata", "size": "hardhat size-contracts --no-compile", "watch": "hardhat watch", diff --git a/contracts/scripts/generateDeploymentArtifact.sh b/contracts/scripts/generateDeploymentArtifact.sh index f68852b0..d04e4e35 100755 --- a/contracts/scripts/generateDeploymentArtifact.sh +++ b/contracts/scripts/generateDeploymentArtifact.sh @@ -32,16 +32,16 @@ arbitrum) url="https://api.arbiscan.io" apiKey="$ARBISCAN_API_KEY" ;; -arbitrumGoerli) - url="https://api-goerli.arbiscan.io" +arbitrumSepolia) + url="https://api-sepolia.arbiscan.io" apiKey="$ARBISCAN_API_KEY" ;; mainnet) url="https://api.etherscan.io" apiKey="$ETHERSCAN_API_KEY" ;; -goerli) - url="https://api-goerli.etherscan.io" +sepolia) + url="https://api-sepolia.etherscan.io" apiKey="$ETHERSCAN_API_KEY" ;; *) diff --git a/contracts/scripts/generateDeploymentsMarkdown.sh b/contracts/scripts/generateDeploymentsMarkdown.sh index 28b87245..3744279d 100755 --- a/contracts/scripts/generateDeploymentsMarkdown.sh +++ b/contracts/scripts/generateDeploymentsMarkdown.sh @@ -12,13 +12,13 @@ function generate() { #deploymentDir #explorerUrl done } -echo "#### Goerli" +echo "#### Sepolia" echo -generate "$SCRIPT_DIR/../deployments/goerli" "https://goerli.etherscan.io/address/" +generate "$SCRIPT_DIR/../deployments/sepolia" "https://sepolia.etherscan.io/address/" echo -echo "#### Arbitrum Goerli" +echo "#### Arbitrum Sepolia" echo -generate "$SCRIPT_DIR/../deployments/arbitrumGoerli" "https://goerli.arbiscan.io/address/" +generate "$SCRIPT_DIR/../deployments/arbitrumSepolia" "https://sepolia.arbiscan.io/address/" echo echo "#### Chiado" echo diff --git a/contracts/src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol b/contracts/src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol index cf6a323c..81c9521c 100644 --- a/contracts/src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol +++ b/contracts/src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol @@ -10,8 +10,8 @@ pragma solidity 0.8.18; import "../../arbitrumToEth/VeaOutboxArbToEth.sol"; -/// @dev Vea Outbox From ArbitrumGoerli to Goerli. -/// Note: This contract is deployed on Goerli. +/// @dev Vea Outbox From arbitrumSepolia to Sepolia. +/// Note: This contract is deployed on Sepolia. /// Note: This contract is permissioned for developer testing (devnet). contract VeaOutboxArbToEthDevnet is VeaOutboxArbToEth { address public devnetOperator; // permissioned devnet operator From 08ea17147fa23f0a79f4b45e9fe1ce113a764903 Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Sun, 3 Mar 2024 18:58:42 +0530 Subject: [PATCH 33/58] fix: update arbiscan api url --- contracts/hardhat.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index 1551cbb6..0fc4a2f7 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -70,7 +70,7 @@ const config: HardhatUserConfig = { }, verify: { etherscan: { - apiUrl: "https://api-sepolia.arbiscan.io/api", + apiUrl: "https://api-sepolia.arbiscan.io", apiKey: process.env.ARBISCAN_API_KEY, }, }, From 67eefdfd462dc808f29f33fa3ce063386d6b695a Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Thu, 7 Mar 2024 11:52:54 +0530 Subject: [PATCH 34/58] feat: migrate relayer subgraph from goerli to sepolia devnet --- .../build/VeaInbox/VeaInbox.wasm | Bin 44649 -> 44201 bytes .../VeaInboxArbToEthDevnet.json | 269 +++++++++++++++ relayer-subgraph-inbox/build/subgraph.yaml | 14 +- .../generated/VeaInbox/VeaInbox.ts | 209 ++++++------ relayer-subgraph-inbox/generated/schema.ts | 307 ++++++++++++------ relayer-subgraph-inbox/networks.json | 6 +- relayer-subgraph-inbox/package.json | 3 +- relayer-subgraph-inbox/subgraph.yaml | 8 +- 8 files changed, 609 insertions(+), 207 deletions(-) create mode 100644 relayer-subgraph-inbox/build/contracts/deployments/arbitrumSepolia/VeaInboxArbToEthDevnet.json diff --git a/relayer-subgraph-inbox/build/VeaInbox/VeaInbox.wasm b/relayer-subgraph-inbox/build/VeaInbox/VeaInbox.wasm index b2035441441087b820c55c280c3f112bf80f884f..9dfa8a2ed1823ed003d192d228b8ed7bc78fc737 100644 GIT binary patch delta 7138 zcma)B3wTt=b)I|oA+0V#R|q}O^X^L4bERELtM_wogU!=mLY#z`g%BVkR)AK<_>om( zk}8hk$R6C%dSlBCNl3c3)hca?t;7omEI@#4gNy{srPL%MywC9M*fZI7OKAezc@dd!RyQnwfvV z_H)_C`!o^CE0NJn=jBtEn(vnKhn~z=r6u;Ty-{TExCd7QCPTgvTniJU|6VITNc*bwxQ7v%_A1~(9#iFw?#nMwuy7~&UEd3=!4Hl+J8Dgxk z&OcoOUGZjCi8Daw19rAZQn0l|lk#OV!6M%8Qgh+>L6@3HQe#NFYF8z_&r_|Kyy@1B zR&yYSPrLb)n~oqq$S32}T&0%rSp^e1&l;FKQW|F8O#GozK3uwhAM&ORkEn6R6^?(_ z6`sH43M*vEFMWlZd5(Cr#OW`gV-0@R_WHR1$WxR~Nx}v5o>+v8ME5-Hp(y!RDI5oq zxtV;zs8jQCpORW&m-x*}jXcO_D>X^?Kqa55q!X9 z9?kDi7a97Zd9J$1E-4z)5t57!_rQBa6Co{;kAvW$ zCH%Va$vZe+L!6>$G6j`PK}FfBHYnG`U|G79C@z&brF7BP zxJ+zsj1sBkm5vMt#ayZurOI}b5q~D~ro;ymaK=p4G<2|hT>2c!6@0ta+-z#*P{^ZK z#LB7YO+J3~3VQ%D9C9o}6f=d+IFQIE6L}`j)6Z{3G{}A}N~qOY)^Q?D;*E+dc{)j4 zs>rquBx5ETGwCUOFjcdv4pmak5JMzx+RQV>M5W6g4v+Cvy4mOC+rmSyNHBRmLXKt_ z5faESBBVcq_hl@Ic@i@qhXVwPB}y=x;RtgRJU3x zzFF;vL)oSa91J0aQ+Sg2xGveB4>1f$$N1ILNDqpS2@rbvjh|+G?6h7z7vx<^*sDEf zz^1#^3b!JvOi-5L06St%x12=lRc|ip7)2cdvTV8Zs3R6cMww%=7W=iw?XjHMnW0`)M&d5Um7Y`EDmcZvYY0Fne{_PSi&3- zO!I~lB_4ucvwmI^?pJK6%}y$&-G)mumX|U+SSc%^zZ@ zEf&0^7K*ytp5w<&`ej)VTX~8dFEs*#F3GCfZ+X!k%~ie_HPFJ%xFpS@MOT@kHComz zG-2Y?XDPxYK0U(tz*&ZyHG(SL*z8ZHQp>HxEE&5cMNL3H73m8`)z#w(!UoRi!eD8> zoWf-_4vJK_A;}OFb(pce1xmr&Up>d0|7XO8s>PW)XCx^?=k%l) z7k{ctS&$STjE0k93WS~%lcUIxQJ6FL9#b;C8L2h>=P8`1*qD$N#*sgx`1eOHh~a|N z6bC|VuU$M|pX;Yr4Yi)5YWX-`1Fo%1+v{LKipFqgO8Q_f_@(eFg+7(oxoDO3+y2z8 zc1Whn){lmmh4r$Y41NW{>#-YY#bA}g`e&@MhOKc}RkI_C^y3McD+!t&A+nl-EQu5a zGc4@6K>jk)&y0d#q@S7B;{2a#vGIC*`ce^$M5>)>$WAF%@Isonybn*GJojcQuZcf4 zq)WvjwXsMliM*DQTkLnH#L9de#+dZrrL{U!&qXHAH|C-G{svermNn(2Rm0o_h}6H+ z81?j`9y%9HR8ZIEqjrP~>LoZ6;mjvM7zOnb3hJfXV`t2W0fqNmCSS}wR6kw9hE6p# zOG6(w|IX}p;cJ{5trV>c&4yNv=0U4Kt3<0pt46Cut3$Hu2riUCmI_!%P35?mm- zNH9iliQqE9X@WNi-Xge4P#>pM^F|OM8eJneNAMoO>vPomMEx7VB*A|W{HGXLk>bw) z^sQ)JF_XOXhVIRTUG<=7EJo_#Y z-=g^^3G^fM6D0`#hTyLWen1fP6TU?7F9hEwI7#qN1V15omVn&!Ga|lC@b?5y5&Q$e z3j{wU_*;Sy!BK)|2+k1v9lQ+FC3szmt5EQjALMC*QG&As=LyCLE)ZNK zxI}Q7;EI^J`}0c!6D)_JiYTc%D9TswJ~nj!%A01PZqBidB`DGs#;+%chRvI7!KM1> zf&_CGp>2dPFNC#00UyRX zOdd^DHqrVz(Z4NCv~8`j1=AEMfU~5D?``e3jiu{8xSlSW*WcluHAcM|N@^B1Ekz5( z0`R$ivC&UP!5ta8r6)5){FidYtLx)!Q^w3phTt2@ZNW@MdK4-$#bX;fZNV&qJ4^g_ zLutwsM!2e(EX784$!KndKMM>s-g{Jv31lmBx*0c_Jv6a#k=Zs}q=&$0k@(Gh8*Krn z?voQv_@v1;WsGK=;+Zej+&NsV%N;GAzdj%Q&<$_!31jU>@qBpf!j*KeE?S+%YCYq< zB{)r0>u`x7r)1u~&5&Ts-oUH_7E^FY*lEo6y5PyoTdFK0cP>HO zgdo_9*2xY5@jBzeN_EjEOXr33FAy?@WhdCKmnz951^*Ld_rf)lJ?-p4AOdO@ObDpn zGVzUVTWwQidKAr+iC=F!x~9*gTXD=YA2&VAAOxRLoN4)#8P9`O(!zL|2P9))hK2!0wsq zdEb2j8e7;(cz*|^JcNL#(RohPh`UKwphG&{CrYYIUoJ(G9~lwc?eQmu$0j zMoiX=13SuX!}UfM)QcB)tX2aJ`shT1vVqK9C7xUB5;d(^wplFn;f5MTYwKgSz9#*? zjx~v2wC*mL#R#tN4YBzgXk+{JL&Ez3%+u|j2#H5`?u_X>g<%lI_LTT==d^p%zk!+?zAw#yR}95F29mZ^4-;o;snW3w7lzwynWI&^M6< z)o7pO%h$`Y7kkQB1?(zdwMd&C>@a59z+aAe%0-d}+inzqSfG~P2x7b!YDqEgI|oJ_ z>exA_TyWzS#43|}y$j$RPa?V0YW@NfqGT#oyY-4x^W zcCAD%@W4fEf}tla3U~Xin7%O#Vd$|jG0^^<^5IKik?7|P)p9>+=v0_-=91X|K#mf) zjD0XPc$tauRe7su=!6&1Cz`OE%8fhEXd38f#_3P)vE!g=OdnL$Am(J5*BS9?Bk zMW}lVla7otB}UV^@Sb4(I3|{emW~Ac6&qwMB{Y4g;z7;_GzUKYLmj@-&tguNZAg$e zm|~?3W(W#kplcii5g!o~>2ndh5r#<+Hj5z=1%%J&V=C74!9?GiLhe{4PrNDCb=D-#Lmv|{jt+B^7GQPXRd|c6r7s`UZwU7=`YP6L*))p@-SEJ*r}y0> z-@GO^?91{Wz=_@tFZ?({j6{g55#j?7wulMPJWFE@+USGv)prbwj$9ARIvOF4gSh1; zMra};%1_4$ylZS8K|i-b3lrgmo9K1ZkGvNqMk2)32yx_nL&(u^e>~hzp*QwU7{r9% z>}}cCCLKv_VhN(tyG>dxp6bpKFL&n2rb3Vz;-39hTSw>a5;U_jG9!9At(M(wK1-9> zaL6e>@+QdEHQ}9UVqIsfkoOl!T|*`N`^;!{zPXx1;T#tKHYxQeJk4=D^8_pOBa5#DiNz5DwSLioh6=qs6ck# z2@#nflSR;Hi_)c+R>CD^*6f|_50*7yIY&(T7Kz@jMV3vKp7L5OR+&M0#A}DMqzdux zhfAeO5&v+JT;&v#hnI=_9!`*}i^61_1;2^aG>iBrD#ewDW8~UKBC{gDjnyrUxVFpJ gy#xN$e;2D4?njd4hP&sKAATf7Y8-m{k$1}e50A_OZ~y=R delta 7173 zcma)Bdstk@b)S287g#Q^SBRGY!QDmT{f6cJ8ac6LS(0Tv`qhzSv_dNh8-W6gEcc7G z#E}wW69;FMhT1qGjhf&VJEW+sTH|E(#uAe78#~0MU)+?q#3inis4aH-JNMpYk?cRR zeDj-g=A1ca&Y3fF@3POmE&qB(?)N`+b>~z5jUrRptW~&~WMh&f%d!MyKqfI}wOScI z7HLdKFIvh*Utx-0;!Fu2&G@ktbI{Yiug$yO>*?I<_4ruU3S(fCx2wx@z`M=c?qikW zuq{5JD%Ox}Yxf-PI@saUMb%@^*pwBeH4&b+wvHB$&&z6U&CTuJhglT*!>#QsC%n12 zyPc>ydvkM3M_Ze>#mDN!bb=PsXb+bdmlR2hytvOj7MA#^LtM||jx?sRY?)b`_-GPe zND>{{De`QJ=*u37olkktEi=u^-(!cl?Bnw(Vna@$jP5UTvZ*_jQ!K3&k7a&t?9Cj9 zRHhlGc-UQJEf3asHMgmZDH_YMMEpo`nhN2h(34N@{*cT4X$~l04cvC8)z6vDU?ftS zT}4*TLbS|`njV}WlTLp&=}g_Cqsk72kLK{HoX@aq(Jkw<%3-)RxWIL6tCA8lZ6&3J z95VgJEv8+TY&ptha$V zLL#agv>@Lf2i_Cn1H^y5K}%qUeowTz+QmMPrS-(~g?O>Ma@8GcoigIgbTWQCNs}qC zz9fxN-;=}_6PE>u89a%H)3);dLL)hvtXdUuG4mVt1saLxQ$=EDR@Y{#8{ShIbT?H> zlfNeMD5EIU485}WY{{(}pRi>bZdvk6$GDYeiSUAaziu*c+l1eRCah69B*{;1DN0F? zvYOmplgwI_tWC7lI60c6u7y1baZCJotr2futtRPl*Yd@h+v2_vakJ_NT<&dNNmSdv5 zK0(S5hfDIMHR31rns}+C!sT?)flAiGRh!dd94-sxRN{d`1e~pgjm4KvNgUTKGQ7#! zWNG4X$s_KJmXpz2eEjq)>_OOY$&k8_m^p5YOX4&;h0V&_SwqU3ctI^VHU?|85PGfvUtgzxI0u0 z7u-fQOuCI~2)OyU`?hL$Rt_G6G6aP?LO%uyUvR@!UdU^n?lqIV#+Y7*D#+{a#kf0Z zYsl&8D#Ph`mEm->ijP#?=JcjyI)#^IPT{dYwW#?niO*Jv%!-_tLM@C>)gl+VMC`86 zq?O`WMXnSlo~y`Ja3|0W6$kUk)#@_Z2(`#5VOGz1W(d`6IU8j=RL7_4IODl|s9trd z#kfBmYKdAZ3M*Z~iW)l4D57_mXs%53uZ11sHo0&S^-o(r2|~Y50v8z{zew(aS0+uI zF>9GGke;5*Fq|z^jD@ai7xYn2dMIRDzpj@micv+O*vi&PUvfoj;eNHu6{AI;_=+={ zGbgh&Y0>MXKSKpDoF$yx80f8o6_oUd%kkB9OmnOYuTya^bK+VlNefC6d)0rH@liB75(`&Rp20IAF4q?N>Cu47 z;t=?oN5g#YSjr&C-%|W~q`SQ%ZGYT~O84oa%&SDgZqIENPN1ZoRM+ zRD#=Sr5Y9fx>SG2ZJ6oS6{d!}=t|_cYL||erf-I@p{iG_G>MzBMTNzq8nj6iI zR)JQDR)toLR)bcHR*!~fC=W2eIf4rW^eTCYhzWvg1lI{}5KIxgLU57b4T3ib-Xdu9 z1I`k4o?x2bWrAN2Tv?*tCF_&)^yNANMhCj<)wzbE)#fF zw*)^X_zA&36Ff)oBEdfpj1zp9z=?L&Pt>;v{)XTr!3zYZ2m%Cy1m_99Loh&aiQrj+ zX9!**I7jf01V13SOz?ezA%ednc%EQ{;ClqalEbg?pAvb7;AaF*w7(7#qeOh0;GYOy zCKw|)P4M>wKO(q5@I!(t1ph*Ck>D!91i>W14T5U~*9oR1D)(22d{ubXZ;zXNm#x8d zs4B@iD9V>N42`|K{v)e+{6MmOa-|~WGd{gi1Riij7))=Rc>jUyh&V;6WBg27cb;3CHBDtMH*y$I6?I7Du}*CUw97g zj7ZeIP9zFt>)PUZgS(liB(G+S#i11|0DPv*em0!(!6eMV3s27LP%L+%l+Hzi{Lgwm@P)`Z&W9< zb#6Laag(J&v0|rFq<&$=9fLW#i{Tu_L4pW09}?G%#PM-MHj$&OAXy~Zex$XHb&+%i z(mKSKBMyI|vSl#Wu#+2F>P}cNMkg?;VK!NpFw+>F%T*MzYemavc+*%k#(VQZHg+Sc zdHT|a^F-a2M*BQCc)gj29A_u3W3B7}yPLIR(S>*n=j*~V`C`LPcf&k5WbbBv$XpJ- znHK1y0|iPf?PU~NQvv{=o&=bH80B`RK)keb^~M=Pd2X3{y zB&>>$6dDE##rUSR_8D;4qq#!y{-z!F@gkj@C=%;8@30RR>#H9w7C+ovV4nep{hKQm zGn;wiNQu7cGbN#|XlEUWyM?x5(vVJsd4piWD z@3t?38$@YW;_RN>I9R2-8LkSs=}-Bzn@Oml8m6m4(H}(QUF;z81Q~YaW|e5$y~93P zt(%{&7FTvZd2qhQ$YD*${A}u{%@5WZ$*m2U-;6ETN82-Q$R?J_X!CU03}o1%xmvNY zImO;rr*i{!;&8LmJ`N5gFi|I-Zmw4Q>U9qz=*Cf?_2QS!FWBcBjN{NCp59YtA8FL% zIMXQJ+;fl87hpO&5MUzLvqPCDz7Ju7@AW*YES?3A-R;HK{g}N6BInP6M~ZHq6UX)@ zME0FG!~^HWclYj#TqJe`+80Dr%QIyo7s2LZ9q5-XMb-7`#LSqAa~H)sEv`HJE*bL% z(8p7~#Gq*?!VX|Jt6=5G7wKRj6X=&NKKPoU@j4{yl32H|JaX`|VQToY=-HPVIcc)f zmqn^KEq0Muif)1_E#zpIDA<)EzUKXWG=?7IdLvNmu{>^YDY zIZiC{F>y`2aA1Gr$aS#D!I|qK?clRzGdB$7IrK|8Xv%^?e3qZqzA4k{l=$G_n#gft z5#!{PNNvr!XVH}Q;y>W=7EGlpaZ9$*G|&11^f7tnZ zuZSmGbN#1YWlE%`YvJ(+`2`Hbg3v$91+x%Dn^!YSf*4khzlO1(GR?s|{2<0;D=du= zK_*m0L1c{qqp%FUKec-ZjevDA;89(-_brdmY4v zbc1Se+Zu;TDYm}kR!@SI(DZ0A*{cztPA;MRza?ileiUsy_d;<2{Yy+z%=*0!Sd?n8UMokgv_4o_LBc9*FaCDiW3 zcxSAx*Xb+LfB4~@ot{TrBD>ouXH=Ssj<833-mW!4`*HYz=4^MB?Q*yGES^D>0T=d}7d@}1v0 znjmV9C~`q24TZONw6}N*lQC-R@*MFNiN}wW$i);$n)skSQG9qLRxY_iXFuuG!dnmA z-R>)`FrCFpW!Q&$+m4Fz@|xfR?D_&Q{Lq7mOYx>Byr zGf9UHzogYPiTiphgyWG&xwe7G^x)5Cb#cKYcKN#ZB9r=0X7%FmBZ+dudibnyv>*hJ Uujxo@r?1=7);RX+BX5=dKb2WCg#Z8m diff --git a/relayer-subgraph-inbox/build/contracts/deployments/arbitrumSepolia/VeaInboxArbToEthDevnet.json b/relayer-subgraph-inbox/build/contracts/deployments/arbitrumSepolia/VeaInboxArbToEthDevnet.json new file mode 100644 index 00000000..9fb574af --- /dev/null +++ b/relayer-subgraph-inbox/build/contracts/deployments/arbitrumSepolia/VeaInboxArbToEthDevnet.json @@ -0,0 +1,269 @@ +[ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epochPeriod", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_veaOutboxArbToEth", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "_nodeData", + "type": "bytes" + } + ], + "name": "MessageSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "_snapshot", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_count", + "type": "uint64" + } + ], + "name": "SnapshotSaved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "_epochSent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_ticketId", + "type": "bytes32" + } + ], + "name": "SnapshotSent", + "type": "event" + }, + { + "inputs": [], + "name": "count", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_timestamp", + "type": "uint256" + } + ], + "name": "epochAt", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochFinalized", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochNow", + "outputs": [ + { + "internalType": "uint256", + "name": "epoch", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "epochPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "saveSnapshot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "bytes4", + "name": "_fnSelector", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "sendMessage", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_epoch", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "claimer", + "type": "address" + }, + { + "internalType": "uint32", + "name": "timestampClaimed", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "timestampVerification", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "blocknumberVerification", + "type": "uint32" + }, + { + "internalType": "enum Party", + "name": "honest", + "type": "uint8" + }, + { + "internalType": "address", + "name": "challenger", + "type": "address" + } + ], + "internalType": "struct Claim", + "name": "_claim", + "type": "tuple" + } + ], + "name": "sendSnapshot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "snapshots", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "veaOutboxArbToEth", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/relayer-subgraph-inbox/build/subgraph.yaml b/relayer-subgraph-inbox/build/subgraph.yaml index 8ff1a0da..c698c76d 100644 --- a/relayer-subgraph-inbox/build/subgraph.yaml +++ b/relayer-subgraph-inbox/build/subgraph.yaml @@ -4,11 +4,11 @@ schema: dataSources: - kind: ethereum name: VeaInbox - network: arbitrum-goerli + network: arbitrum-sepolia source: - address: "0xD2d4174A971b2AE58F23F7d4F5e4DE9d97bDda31" + address: "0x77e95F54032f467eC45c48C6affc203f93858783" abi: VeaInbox - startBlock: 16137740 + startBlock: 18210847 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -19,14 +19,12 @@ dataSources: - StaterootSent abis: - name: VeaInbox - file: contracts/deployments/arbitrumGoerli/VeaInbox.json + file: contracts/deployments/arbitrumSepolia/VeaInboxArbToEthDevnet.json eventHandlers: - - event: Hearbeat(bytes32) - handler: handleHearbeat - event: MessageSent(bytes) handler: handleMessageSent - - event: SnapshotSaved(bytes32) + - event: SnapshotSaved(bytes32,uint256,uint64) handler: handleSnapshotSaved - - event: SnapshotSent(uint256,bytes32) + - event: SnapshotSent(indexed uint256,bytes32) handler: handleSnapshotSent file: VeaInbox/VeaInbox.wasm diff --git a/relayer-subgraph-inbox/generated/VeaInbox/VeaInbox.ts b/relayer-subgraph-inbox/generated/VeaInbox/VeaInbox.ts index b718139f..ceef9b1e 100644 --- a/relayer-subgraph-inbox/generated/VeaInbox/VeaInbox.ts +++ b/relayer-subgraph-inbox/generated/VeaInbox/VeaInbox.ts @@ -10,24 +10,6 @@ import { BigInt, } from "@graphprotocol/graph-ts"; -export class Hearbeat extends ethereum.Event { - get params(): Hearbeat__Params { - return new Hearbeat__Params(this); - } -} - -export class Hearbeat__Params { - _event: Hearbeat; - - constructor(event: Hearbeat) { - this._event = event; - } - - get ticketId(): Bytes { - return this._event.parameters[0].value.toBytes(); - } -} - export class MessageSent extends ethereum.Event { get params(): MessageSent__Params { return new MessageSent__Params(this); @@ -41,7 +23,7 @@ export class MessageSent__Params { this._event = event; } - get nodeData(): Bytes { + get _nodeData(): Bytes { return this._event.parameters[0].value.toBytes(); } } @@ -59,9 +41,17 @@ export class SnapshotSaved__Params { this._event = event; } - get stateRoot(): Bytes { + get _snapshot(): Bytes { return this._event.parameters[0].value.toBytes(); } + + get _epoch(): BigInt { + return this._event.parameters[1].value.toBigInt(); + } + + get _count(): BigInt { + return this._event.parameters[2].value.toBigInt(); + } } export class SnapshotSent extends ethereum.Event { @@ -77,11 +67,11 @@ export class SnapshotSent__Params { this._event = event; } - get epochSent(): BigInt { + get _epochSent(): BigInt { return this._event.parameters[0].value.toBigInt(); } - get ticketId(): Bytes { + get _ticketId(): Bytes { return this._event.parameters[1].value.toBytes(); } } @@ -91,29 +81,33 @@ export class VeaInbox extends ethereum.SmartContract { return new VeaInbox("VeaInbox", address); } - ARB_SYS(): Address { - let result = super.call("ARB_SYS", "ARB_SYS():(address)", []); + count(): BigInt { + let result = super.call("count", "count():(uint64)", []); - return result[0].toAddress(); + return result[0].toBigInt(); } - try_ARB_SYS(): ethereum.CallResult
{ - let result = super.tryCall("ARB_SYS", "ARB_SYS():(address)", []); + try_count(): ethereum.CallResult { + let result = super.tryCall("count", "count():(uint64)", []); if (result.reverted) { return new ethereum.CallResult(); } let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); + return ethereum.CallResult.fromValue(value[0].toBigInt()); } - count(): BigInt { - let result = super.call("count", "count():(uint256)", []); + epochAt(_timestamp: BigInt): BigInt { + let result = super.call("epochAt", "epochAt(uint256):(uint256)", [ + ethereum.Value.fromUnsignedBigInt(_timestamp), + ]); return result[0].toBigInt(); } - try_count(): ethereum.CallResult { - let result = super.tryCall("count", "count():(uint256)", []); + try_epochAt(_timestamp: BigInt): ethereum.CallResult { + let result = super.tryCall("epochAt", "epochAt(uint256):(uint256)", [ + ethereum.Value.fromUnsignedBigInt(_timestamp), + ]); if (result.reverted) { return new ethereum.CallResult(); } @@ -121,14 +115,18 @@ export class VeaInbox extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } - epochPeriod(): BigInt { - let result = super.call("epochPeriod", "epochPeriod():(uint256)", []); + epochFinalized(): BigInt { + let result = super.call("epochFinalized", "epochFinalized():(uint256)", []); return result[0].toBigInt(); } - try_epochPeriod(): ethereum.CallResult { - let result = super.tryCall("epochPeriod", "epochPeriod():(uint256)", []); + try_epochFinalized(): ethereum.CallResult { + let result = super.tryCall( + "epochFinalized", + "epochFinalized():(uint256)", + [] + ); if (result.reverted) { return new ethereum.CallResult(); } @@ -136,33 +134,44 @@ export class VeaInbox extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBigInt()); } - inbox(param0: BigInt): Bytes { - let result = super.call("inbox", "inbox(uint256):(bytes32)", [ - ethereum.Value.fromUnsignedBigInt(param0), - ]); + epochNow(): BigInt { + let result = super.call("epochNow", "epochNow():(uint256)", []); - return result[0].toBytes(); + return result[0].toBigInt(); } - try_inbox(param0: BigInt): ethereum.CallResult { - let result = super.tryCall("inbox", "inbox(uint256):(bytes32)", [ - ethereum.Value.fromUnsignedBigInt(param0), - ]); + try_epochNow(): ethereum.CallResult { + let result = super.tryCall("epochNow", "epochNow():(uint256)", []); if (result.reverted) { return new ethereum.CallResult(); } let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); + return ethereum.CallResult.fromValue(value[0].toBigInt()); } - sendMessage(to: Address, fnSelector: Bytes, data: Bytes): BigInt { + epochPeriod(): BigInt { + let result = super.call("epochPeriod", "epochPeriod():(uint256)", []); + + return result[0].toBigInt(); + } + + try_epochPeriod(): ethereum.CallResult { + let result = super.tryCall("epochPeriod", "epochPeriod():(uint256)", []); + if (result.reverted) { + return new ethereum.CallResult(); + } + let value = result.value; + return ethereum.CallResult.fromValue(value[0].toBigInt()); + } + + sendMessage(_to: Address, _fnSelector: Bytes, _data: Bytes): BigInt { let result = super.call( "sendMessage", "sendMessage(address,bytes4,bytes):(uint64)", [ - ethereum.Value.fromAddress(to), - ethereum.Value.fromFixedBytes(fnSelector), - ethereum.Value.fromBytes(data), + ethereum.Value.fromAddress(_to), + ethereum.Value.fromFixedBytes(_fnSelector), + ethereum.Value.fromBytes(_data), ] ); @@ -170,17 +179,17 @@ export class VeaInbox extends ethereum.SmartContract { } try_sendMessage( - to: Address, - fnSelector: Bytes, - data: Bytes + _to: Address, + _fnSelector: Bytes, + _data: Bytes ): ethereum.CallResult { let result = super.tryCall( "sendMessage", "sendMessage(address,bytes4,bytes):(uint64)", [ - ethereum.Value.fromAddress(to), - ethereum.Value.fromFixedBytes(fnSelector), - ethereum.Value.fromBytes(data), + ethereum.Value.fromAddress(_to), + ethereum.Value.fromFixedBytes(_fnSelector), + ethereum.Value.fromBytes(_data), ] ); if (result.reverted) { @@ -209,14 +218,22 @@ export class VeaInbox extends ethereum.SmartContract { return ethereum.CallResult.fromValue(value[0].toBytes()); } - veaOutbox(): Address { - let result = super.call("veaOutbox", "veaOutbox():(address)", []); + veaOutboxArbToEth(): Address { + let result = super.call( + "veaOutboxArbToEth", + "veaOutboxArbToEth():(address)", + [] + ); return result[0].toAddress(); } - try_veaOutbox(): ethereum.CallResult
{ - let result = super.tryCall("veaOutbox", "veaOutbox():(address)", []); + try_veaOutboxArbToEth(): ethereum.CallResult
{ + let result = super.tryCall( + "veaOutboxArbToEth", + "veaOutboxArbToEth():(address)", + [] + ); if (result.reverted) { return new ethereum.CallResult(); } @@ -246,7 +263,7 @@ export class ConstructorCall__Inputs { return this._call.inputValues[0].value.toBigInt(); } - get _veaOutbox(): Address { + get _veaOutboxArbToEth(): Address { return this._call.inputValues[1].value.toAddress(); } } @@ -285,32 +302,6 @@ export class SaveSnapshotCall__Outputs { } } -export class SendHeartbeatCall extends ethereum.Call { - get inputs(): SendHeartbeatCall__Inputs { - return new SendHeartbeatCall__Inputs(this); - } - - get outputs(): SendHeartbeatCall__Outputs { - return new SendHeartbeatCall__Outputs(this); - } -} - -export class SendHeartbeatCall__Inputs { - _call: SendHeartbeatCall; - - constructor(call: SendHeartbeatCall) { - this._call = call; - } -} - -export class SendHeartbeatCall__Outputs { - _call: SendHeartbeatCall; - - constructor(call: SendHeartbeatCall) { - this._call = call; - } -} - export class SendMessageCall extends ethereum.Call { get inputs(): SendMessageCall__Inputs { return new SendMessageCall__Inputs(this); @@ -328,15 +319,15 @@ export class SendMessageCall__Inputs { this._call = call; } - get to(): Address { + get _to(): Address { return this._call.inputValues[0].value.toAddress(); } - get fnSelector(): Bytes { + get _fnSelector(): Bytes { return this._call.inputValues[1].value.toBytes(); } - get data(): Bytes { + get _data(): Bytes { return this._call.inputValues[2].value.toBytes(); } } @@ -370,9 +361,15 @@ export class SendSnapshotCall__Inputs { this._call = call; } - get epochSend(): BigInt { + get _epoch(): BigInt { return this._call.inputValues[0].value.toBigInt(); } + + get _claim(): SendSnapshotCall_claimStruct { + return changetype( + this._call.inputValues[1].value.toTuple() + ); + } } export class SendSnapshotCall__Outputs { @@ -382,3 +379,33 @@ export class SendSnapshotCall__Outputs { this._call = call; } } + +export class SendSnapshotCall_claimStruct extends ethereum.Tuple { + get stateRoot(): Bytes { + return this[0].toBytes(); + } + + get claimer(): Address { + return this[1].toAddress(); + } + + get timestampClaimed(): BigInt { + return this[2].toBigInt(); + } + + get timestampVerification(): BigInt { + return this[3].toBigInt(); + } + + get blocknumberVerification(): BigInt { + return this[4].toBigInt(); + } + + get honest(): i32 { + return this[5].toI32(); + } + + get challenger(): Address { + return this[6].toAddress(); + } +} diff --git a/relayer-subgraph-inbox/generated/schema.ts b/relayer-subgraph-inbox/generated/schema.ts index 4391f9ad..11a3d05d 100644 --- a/relayer-subgraph-inbox/generated/schema.ts +++ b/relayer-subgraph-inbox/generated/schema.ts @@ -11,74 +11,6 @@ import { BigDecimal, } from "@graphprotocol/graph-ts"; -export class Hearbeat extends Entity { - constructor(id: Bytes) { - super(); - this.set("id", Value.fromBytes(id)); - } - - save(): void { - let id = this.get("id"); - assert(id != null, "Cannot save Hearbeat entity without an ID"); - if (id) { - assert( - id.kind == ValueKind.BYTES, - `Entities of type Hearbeat must have an ID of type Bytes but the id '${id.displayData()}' is of type ${id.displayKind()}` - ); - store.set("Hearbeat", id.toBytes().toHexString(), this); - } - } - - static load(id: Bytes): Hearbeat | null { - return changetype(store.get("Hearbeat", id.toHexString())); - } - - get id(): Bytes { - let value = this.get("id"); - return value!.toBytes(); - } - - set id(value: Bytes) { - this.set("id", Value.fromBytes(value)); - } - - get ticketId(): Bytes { - let value = this.get("ticketId"); - return value!.toBytes(); - } - - set ticketId(value: Bytes) { - this.set("ticketId", Value.fromBytes(value)); - } - - get blockNumber(): BigInt { - let value = this.get("blockNumber"); - return value!.toBigInt(); - } - - set blockNumber(value: BigInt) { - this.set("blockNumber", Value.fromBigInt(value)); - } - - get blockTimestamp(): BigInt { - let value = this.get("blockTimestamp"); - return value!.toBigInt(); - } - - set blockTimestamp(value: BigInt) { - this.set("blockTimestamp", Value.fromBigInt(value)); - } - - get transactionHash(): Bytes { - let value = this.get("transactionHash"); - return value!.toBytes(); - } - - set transactionHash(value: Bytes) { - this.set("transactionHash", Value.fromBytes(value)); - } -} - export class MessageSent extends Entity { constructor(id: Bytes) { super(); @@ -97,6 +29,12 @@ export class MessageSent extends Entity { } } + static loadInBlock(id: Bytes): MessageSent | null { + return changetype( + store.get_in_block("MessageSent", id.toHexString()) + ); + } + static load(id: Bytes): MessageSent | null { return changetype( store.get("MessageSent", id.toHexString()) @@ -105,7 +43,11 @@ export class MessageSent extends Entity { get id(): Bytes { let value = this.get("id"); - return value!.toBytes(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBytes(); + } } set id(value: Bytes) { @@ -114,7 +56,11 @@ export class MessageSent extends Entity { get nonce(): BigInt { let value = this.get("nonce"); - return value!.toBigInt(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBigInt(); + } } set nonce(value: BigInt) { @@ -123,7 +69,11 @@ export class MessageSent extends Entity { get to(): Bytes { let value = this.get("to"); - return value!.toBytes(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBytes(); + } } set to(value: Bytes) { @@ -132,7 +82,11 @@ export class MessageSent extends Entity { get msgSender(): Bytes { let value = this.get("msgSender"); - return value!.toBytes(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBytes(); + } } set msgSender(value: Bytes) { @@ -141,7 +95,11 @@ export class MessageSent extends Entity { get data(): Bytes { let value = this.get("data"); - return value!.toBytes(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBytes(); + } } set data(value: Bytes) { @@ -150,7 +108,11 @@ export class MessageSent extends Entity { get epoch(): BigInt { let value = this.get("epoch"); - return value!.toBigInt(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBigInt(); + } } set epoch(value: BigInt) { @@ -159,7 +121,11 @@ export class MessageSent extends Entity { get node(): string { let value = this.get("node"); - return value!.toString(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toString(); + } } set node(value: string) { @@ -168,7 +134,11 @@ export class MessageSent extends Entity { get blockNumber(): BigInt { let value = this.get("blockNumber"); - return value!.toBigInt(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBigInt(); + } } set blockNumber(value: BigInt) { @@ -177,7 +147,11 @@ export class MessageSent extends Entity { get blockTimestamp(): BigInt { let value = this.get("blockTimestamp"); - return value!.toBigInt(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBigInt(); + } } set blockTimestamp(value: BigInt) { @@ -186,7 +160,11 @@ export class MessageSent extends Entity { get transactionHash(): Bytes { let value = this.get("transactionHash"); - return value!.toBytes(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBytes(); + } } set transactionHash(value: Bytes) { @@ -212,13 +190,21 @@ export class Node extends Entity { } } + static loadInBlock(id: string): Node | null { + return changetype(store.get_in_block("Node", id)); + } + static load(id: string): Node | null { return changetype(store.get("Node", id)); } get id(): string { let value = this.get("id"); - return value!.toString(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toString(); + } } set id(value: string) { @@ -227,7 +213,11 @@ export class Node extends Entity { get hash(): Bytes { let value = this.get("hash"); - return value!.toBytes(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBytes(); + } } set hash(value: Bytes) { @@ -253,22 +243,35 @@ export class Receiver extends Entity { } } + static loadInBlock(id: Bytes): Receiver | null { + return changetype( + store.get_in_block("Receiver", id.toHexString()) + ); + } + static load(id: Bytes): Receiver | null { return changetype(store.get("Receiver", id.toHexString())); } get id(): Bytes { let value = this.get("id"); - return value!.toBytes(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBytes(); + } } set id(value: Bytes) { this.set("id", Value.fromBytes(value)); } - get messages(): Array { - let value = this.get("messages"); - return value!.toBytesArray(); + get messages(): MessageSentLoader { + return new MessageSentLoader( + "Receiver", + this.get("id")!.toBytes().toHexString(), + "messages" + ); } } @@ -290,22 +293,35 @@ export class Sender extends Entity { } } + static loadInBlock(id: Bytes): Sender | null { + return changetype( + store.get_in_block("Sender", id.toHexString()) + ); + } + static load(id: Bytes): Sender | null { return changetype(store.get("Sender", id.toHexString())); } get id(): Bytes { let value = this.get("id"); - return value!.toBytes(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBytes(); + } } set id(value: Bytes) { this.set("id", Value.fromBytes(value)); } - get messages(): Array { - let value = this.get("messages"); - return value!.toBytesArray(); + get messages(): MessageSentLoader { + return new MessageSentLoader( + "Sender", + this.get("id")!.toBytes().toHexString(), + "messages" + ); } } @@ -327,6 +343,12 @@ export class SnapshotSaved extends Entity { } } + static loadInBlock(id: Bytes): SnapshotSaved | null { + return changetype( + store.get_in_block("SnapshotSaved", id.toHexString()) + ); + } + static load(id: Bytes): SnapshotSaved | null { return changetype( store.get("SnapshotSaved", id.toHexString()) @@ -335,7 +357,11 @@ export class SnapshotSaved extends Entity { get id(): Bytes { let value = this.get("id"); - return value!.toBytes(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBytes(); + } } set id(value: Bytes) { @@ -344,7 +370,11 @@ export class SnapshotSaved extends Entity { get stateRoot(): Bytes { let value = this.get("stateRoot"); - return value!.toBytes(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBytes(); + } } set stateRoot(value: Bytes) { @@ -353,16 +383,37 @@ export class SnapshotSaved extends Entity { get epoch(): BigInt { let value = this.get("epoch"); - return value!.toBigInt(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBigInt(); + } } set epoch(value: BigInt) { this.set("epoch", Value.fromBigInt(value)); } + get count(): BigInt { + let value = this.get("count"); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBigInt(); + } + } + + set count(value: BigInt) { + this.set("count", Value.fromBigInt(value)); + } + get blockNumber(): BigInt { let value = this.get("blockNumber"); - return value!.toBigInt(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBigInt(); + } } set blockNumber(value: BigInt) { @@ -371,7 +422,11 @@ export class SnapshotSaved extends Entity { get blockTimestamp(): BigInt { let value = this.get("blockTimestamp"); - return value!.toBigInt(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBigInt(); + } } set blockTimestamp(value: BigInt) { @@ -380,7 +435,11 @@ export class SnapshotSaved extends Entity { get transactionHash(): Bytes { let value = this.get("transactionHash"); - return value!.toBytes(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBytes(); + } } set transactionHash(value: Bytes) { @@ -406,6 +465,12 @@ export class SnapshotSent extends Entity { } } + static loadInBlock(id: Bytes): SnapshotSent | null { + return changetype( + store.get_in_block("SnapshotSent", id.toHexString()) + ); + } + static load(id: Bytes): SnapshotSent | null { return changetype( store.get("SnapshotSent", id.toHexString()) @@ -414,7 +479,11 @@ export class SnapshotSent extends Entity { get id(): Bytes { let value = this.get("id"); - return value!.toBytes(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBytes(); + } } set id(value: Bytes) { @@ -423,7 +492,11 @@ export class SnapshotSent extends Entity { get epochSent(): BigInt { let value = this.get("epochSent"); - return value!.toBigInt(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBigInt(); + } } set epochSent(value: BigInt) { @@ -432,7 +505,11 @@ export class SnapshotSent extends Entity { get ticketId(): Bytes { let value = this.get("ticketId"); - return value!.toBytes(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBytes(); + } } set ticketId(value: Bytes) { @@ -441,7 +518,11 @@ export class SnapshotSent extends Entity { get blockNumber(): BigInt { let value = this.get("blockNumber"); - return value!.toBigInt(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBigInt(); + } } set blockNumber(value: BigInt) { @@ -450,7 +531,11 @@ export class SnapshotSent extends Entity { get blockTimestamp(): BigInt { let value = this.get("blockTimestamp"); - return value!.toBigInt(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBigInt(); + } } set blockTimestamp(value: BigInt) { @@ -459,10 +544,32 @@ export class SnapshotSent extends Entity { get transactionHash(): Bytes { let value = this.get("transactionHash"); - return value!.toBytes(); + if (!value || value.kind == ValueKind.NULL) { + throw new Error("Cannot return null for a required field."); + } else { + return value.toBytes(); + } } set transactionHash(value: Bytes) { this.set("transactionHash", Value.fromBytes(value)); } } + +export class MessageSentLoader extends Entity { + _entity: string; + _field: string; + _id: string; + + constructor(entity: string, id: string, field: string) { + super(); + this._entity = entity; + this._id = id; + this._field = field; + } + + load(): MessageSent[] { + let value = store.loadRelated(this._entity, this._id, this._field); + return changetype(value); + } +} diff --git a/relayer-subgraph-inbox/networks.json b/relayer-subgraph-inbox/networks.json index 8da4a75d..99fc9692 100644 --- a/relayer-subgraph-inbox/networks.json +++ b/relayer-subgraph-inbox/networks.json @@ -1,8 +1,8 @@ { - "arbitrum-goerli": { + "arbitrum-sepolia": { "VeaInbox": { - "address": "0x3b894FE680deB990b4Fb7E7D0000C32Af06687C3", - "startBlock": 16978653 + "address": "0x77e95F54032f467eC45c48C6affc203f93858783", + "startBlock": 18210847 } } } diff --git a/relayer-subgraph-inbox/package.json b/relayer-subgraph-inbox/package.json index a4e3a45a..baf14a1d 100644 --- a/relayer-subgraph-inbox/package.json +++ b/relayer-subgraph-inbox/package.json @@ -12,7 +12,7 @@ "scripts": { "codegen": "graph codegen", "build": "graph build", - "deploy": "graph deploy --node https://api.thegraph.com/deploy/ shotaronowhere/vea-inbox-arbitrum", + "deploy": "graph deploy --studio vea-inbox-arb-sepolia-devnet", "create-local": "graph create --node http://localhost:8020/ kleros/vea-validator-inbox", "remove-local": "graph remove --node http://localhost:8020/ kleros/vea-validator-inbox", "deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 kleros/vea-validator-inbox", @@ -23,6 +23,7 @@ }, "devDependencies": { "@graphprotocol/graph-cli": "^0.44.0", + "concat-stream": "^2.0.0", "gluegun": "^5.1.2", "matchstick-as": "0.5.2" } diff --git a/relayer-subgraph-inbox/subgraph.yaml b/relayer-subgraph-inbox/subgraph.yaml index 2eccab08..8bcdba74 100644 --- a/relayer-subgraph-inbox/subgraph.yaml +++ b/relayer-subgraph-inbox/subgraph.yaml @@ -4,11 +4,11 @@ schema: dataSources: - kind: ethereum name: VeaInbox - network: arbitrum-goerli + network: arbitrum-sepolia source: - address: "0xA3FefC6FeE3fc66B9d9a8BEE794736ab71a74c55" + address: "0x77e95F54032f467eC45c48C6affc203f93858783" abi: VeaInbox - startBlock: 16978653 + startBlock: 18210847 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -19,7 +19,7 @@ dataSources: - StaterootSent abis: - name: VeaInbox - file: ../contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json + file: ../contracts/deployments/arbitrumSepolia/VeaInboxArbToEthDevnet.json eventHandlers: - event: MessageSent(bytes) handler: handleMessageSent From 848f024d34d76b9346a0ed2009f341a1f08d215f Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Thu, 7 Mar 2024 12:12:35 +0530 Subject: [PATCH 35/58] feat: migrate bots from goerli to sepolia devnet --- relayer-cli/src/devnetRelayExample.ts | 13 ++++----- relayer-cli/src/state/11155111.json | 4 +++ relayer-cli/src/utils/proof.ts | 10 +++---- relayer-cli/src/utils/relay.ts | 28 ++++++++----------- validator-cli/.env.dist | 14 +++++----- validator-cli/ecosystem.config.js | 4 +-- validator-cli/package.json | 2 +- .../happyPath.ts | 16 +++++++---- validator-cli/src/utils/devnet.ts | 8 +++--- 9 files changed, 50 insertions(+), 49 deletions(-) create mode 100644 relayer-cli/src/state/11155111.json rename validator-cli/src/devnet/{arbToGoerli => arbToSepolia}/happyPath.ts (54%) diff --git a/relayer-cli/src/devnetRelayExample.ts b/relayer-cli/src/devnetRelayExample.ts index 2d605b3d..e9d8674b 100644 --- a/relayer-cli/src/devnetRelayExample.ts +++ b/relayer-cli/src/devnetRelayExample.ts @@ -2,7 +2,8 @@ import { relayAllFrom } from "./utils/relay"; import * as fs from "fs"; require("dotenv").config(); -let chain_ids = [5, 10200]; +// let chain_ids = [5, 10200]; +let chain_ids = [11155111]; const epochPeriod = 600; // 30 min ["SIGINT", "SIGTERM", "SIGQUIT", "EXIT", "MODULE_NOT_FOUND"].forEach((signal) => process.on(signal, async () => { @@ -21,11 +22,9 @@ const epochPeriod = 600; // 30 min while (1) { for (const chain_id of chain_ids) { let nonce = await initialize(chain_id); - const senderGateway = - chain_id === 10200 - ? "0xe6aC8CfF97199A67b8121a3Ce3aC98772f90B94b" - : "0x177AfBF3cda970024Efa901516735aF9c3B894a4"; - nonce = await relayAllFrom(chain_id, nonce, senderGateway); + // This is libghtbulb switch address in arbitrum sepolia + const sender = "0x4A9EF2E97B780ea6E8DE3fD8acd4cBA8C061F173"; + nonce = await relayAllFrom(chain_id, nonce, sender); if (nonce != null) await updateStateFile(chain_id, Math.floor(Date.now() / 1000), nonce); } const currentTS = Math.floor(Date.now() / 1000); @@ -36,7 +35,7 @@ const epochPeriod = 600; // 30 min })(); async function initialize(chain_id: number): Promise { - if (chain_id !== 5 && chain_id !== 10200) throw new Error("Invalid chainid"); + if (chain_id !== 11155111) throw new Error("Invalid chainid"); const lock_file_name = "./src/state/" + chain_id + ".pid"; diff --git a/relayer-cli/src/state/11155111.json b/relayer-cli/src/state/11155111.json new file mode 100644 index 00000000..301b45f4 --- /dev/null +++ b/relayer-cli/src/state/11155111.json @@ -0,0 +1,4 @@ +{ + "ts": 1709731904, + "nonce": "2" +} diff --git a/relayer-cli/src/utils/proof.ts b/relayer-cli/src/utils/proof.ts index 03323bf5..49e34fa7 100644 --- a/relayer-cli/src/utils/proof.ts +++ b/relayer-cli/src/utils/proof.ts @@ -5,7 +5,7 @@ const getMessageDataToRelay = async (chainid: number, nonce: number) => { const subgraph = getSubgraph(chainid); const result = await request( - `https://api.thegraph.com/subgraphs/name/shotaronowhere/${subgraph}`, + `https://api.studio.thegraph.com/query/67213/${subgraph}/version/latest`, `{ messageSents(first: 5, where: {nonce: ${nonce}}) { nonce @@ -39,7 +39,7 @@ const getProofAtCount = async (chainid: number, nonce: number, count: number): P try { const subgraph = getSubgraph(chainid); - const result = await request(`https://api.thegraph.com/subgraphs/name/shotaronowhere/${subgraph}`, query); + const result = await request(`https://api.studio.thegraph.com/query/67213/${subgraph}/version/latest`, query); const proof = []; @@ -75,10 +75,8 @@ const getProofIndices = (nonce: number, count: number) => { const getSubgraph = (chainid: number): string => { switch (chainid) { - case 5: - return "vea-inbox-arbgoerli-to-goerli"; - case 10200: - return "vea-inbox-arbgoerli-to-chiado"; + case 11155111: + return "vea-inbox-arb-sepolia-devnet"; default: throw new Error("Invalid chainid"); } diff --git a/relayer-cli/src/utils/relay.ts b/relayer-cli/src/utils/relay.ts index 9d8811d2..0406beee 100644 --- a/relayer-cli/src/utils/relay.ts +++ b/relayer-cli/src/utils/relay.ts @@ -8,22 +8,16 @@ require("dotenv").config(); const Web3 = require("web3"); const _batchedSend = require("web3-batched-send"); -const _contract = require("@kleros/vea-contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json"); +const _contract = require("@kleros/vea-contracts/deployments/sepolia/VeaOutboxArbToEthDevnet.json"); const getParams = (chainid: number): [string, string, string] => { - if (chainid !== 5 && chainid !== 10200) throw new Error("Invalid chainid"); - - return chainid === 5 - ? [ - process.env.TRANSACTION_BATCHER_CONTRACT_ADDRESS_GOERLI, - process.env.VEAOUTBOX_ARBGOERLI_TO_GOERLI_ADDRESS, - process.env.RPC_GOERLI, - ] - : [ - process.env.TRANSACTION_BATCHER_CONTRACT_ADDRESS_CHIADO, - process.env.VEAOUTBOX_ARBGOERLI_TO_CHIADO_ADDRESS, - process.env.RPC_CHIADO, - ]; + if (chainid !== 11155111) throw new Error("Invalid chainid"); + + return [ + process.env.TRANSACTION_BATCHER_CONTRACT_ADDRESS_SEPOLIA, + process.env.VEAOUTBOX_ARBSEPOLIA_TO_SEPOLIA_ADDRESS, + process.env.RPC_SEPOLIA, + ]; }; const getCount = async (veaOutbox: VeaOutboxArbToEth, chainid: number): Promise => { @@ -31,7 +25,7 @@ const getCount = async (veaOutbox: VeaOutboxArbToEth, chainid: number): Promise< const stateRoot = await veaOutbox.stateRoot(); const result = await request( - `https://api.thegraph.com/subgraphs/name/shotaronowhere/${subgraph}`, + `https://api.studio.thegraph.com/query/67213/${subgraph}/version/latest`, `{ snapshotSaveds(first: 1, where: { stateRoot: "${stateRoot}" }) { count @@ -122,10 +116,10 @@ const relayAllFrom = async (chainid: number, nonce: number, msgSender: string): const getNonceFrom = async (chainid: number, nonce: number, msgSender: string) => { try { - const sugbraph = getSubgraph(chainid); + const subgraph = getSubgraph(chainid); const result = await request( - `https://api.thegraph.com/subgraphs/name/shotaronowhere/${sugbraph}`, + `https://api.studio.thegraph.com/query/67213/${subgraph}/version/latest`, `{ messageSents(first: 1000, where: {nonce_gte: ${nonce}, msgSender_: {id: "${msgSender}"}}, orderBy: nonce, orderDirection: asc) { nonce diff --git a/validator-cli/.env.dist b/validator-cli/.env.dist index b009fa7d..d648f585 100644 --- a/validator-cli/.env.dist +++ b/validator-cli/.env.dist @@ -1,13 +1,13 @@ PRIVATE_KEY= RPC_CHIADO=https://rpc.chiadochain.net -RPC_ARB_GOERLI=https://goerli-rollup.arbitrum.io/rpc -RPC_GOERLI= +RPC_ARB_SEPOLIA=https://sepolia-rollup.arbitrum.io/rpc +RPC_SEPOLIA= -VEAINBOX_ARBGOERLI_TO_GOERLI_ADDRESS=0x906dE43dBef27639b1688Ac46532a16dc07Ce410 -VEAINBOX_ARBGOERLI_TO_CHIADO_ADDRESS=0xAb53e341121448Ae259Da8fa17f216Cb0e21199C -VEAOUTBOX_ARBGOERLI_TO_GOERLI_ADDRESS=0x906dE43dBef27639b1688Ac46532a16dc07Ce410 -VEAOUTBOX_ARBGOERLI_TO_CHIADO_ADDRESS=0xAb53e341121448Ae259Da8fa17f216Cb0e21199C +VEAINBOX_ARBSEPOLIA_TO_SEPOLIA_ADDRESS=0x906dE43dBef27639b1688Ac46532a16dc07Ce410 +VEAINBOX_ARBSEPOLIA_TO_CHIADO_ADDRESS=0xAb53e341121448Ae259Da8fa17f216Cb0e21199C +VEAOUTBOX_ARBSEPOLIA_TO_SEPOLIA_ADDRESS=0x906dE43dBef27639b1688Ac46532a16dc07Ce410 +VEAOUTBOX_ARBSEPOLIA_TO_CHIADO_ADDRESS=0xAb53e341121448Ae259Da8fa17f216Cb0e21199C -TRANSACTION_BATCHER_CONTRACT_ADDRESS_GOERLI=0xe7953da7751063d0a41ba727c32c762d3523ade8 +TRANSACTION_BATCHER_CONTRACT_ADDRESS_SEPOLIA=0xe7953da7751063d0a41ba727c32c762d3523ade8 TRANSACTION_BATCHER_CONTRACT_ADDRESS_CHIADO=0xcC0a08D4BCC5f91ee9a1587608f7a2975EA75d73 \ No newline at end of file diff --git a/validator-cli/ecosystem.config.js b/validator-cli/ecosystem.config.js index e374c423..795f27f0 100644 --- a/validator-cli/ecosystem.config.js +++ b/validator-cli/ecosystem.config.js @@ -13,9 +13,9 @@ module.exports = { }, }, { - name: "start-goerli-devnet", + name: "start-sepolia-devnet", script: "yarn", - args: "start-goerli-devnet", + args: "start-sepolia-devnet", interpreter: "/bin/bash", log_date_format: "YYYY-MM-DD HH:mm Z", watch: false, diff --git a/validator-cli/package.json b/validator-cli/package.json index 1bcf1eb9..6d9f01fc 100644 --- a/validator-cli/package.json +++ b/validator-cli/package.json @@ -12,7 +12,7 @@ "scripts": { "start": "npx ts-node ./src/ArbToEth/watcher.ts", "start-chiado-devnet": "npx ts-node ./src/devnet/arbToChiado/happyPath.ts", - "start-goerli-devnet": "npx ts-node ./src/devnet/arbToGoerli/happyPath.ts" + "start-sepolia-devnet": "npx ts-node ./src/devnet/arbToSepolia/happyPath.ts" }, "dependencies": { "@arbitrum/sdk": "^3.1.2", diff --git a/validator-cli/src/devnet/arbToGoerli/happyPath.ts b/validator-cli/src/devnet/arbToSepolia/happyPath.ts similarity index 54% rename from validator-cli/src/devnet/arbToGoerli/happyPath.ts rename to validator-cli/src/devnet/arbToSepolia/happyPath.ts index 9c95ba29..41097faa 100644 --- a/validator-cli/src/devnet/arbToGoerli/happyPath.ts +++ b/validator-cli/src/devnet/arbToSepolia/happyPath.ts @@ -3,14 +3,20 @@ import { happyPath, initialize } from "../../utils/devnet"; require("dotenv").config(); (async () => { - let [veaInboxArbGoerliToGoerli, epochPeriod, lastSavedCount, veaOutboxGoerli, deposit] = await initialize( - process.env.VEAOUTBOX_ARBGOERLI_TO_GOERLI_ADDRESS, - process.env.VEAINBOX_ARBGOERLI_TO_GOERLI_ADDRESS, - process.env.RPC_GOERLI + let [veaInboxArbSepoliaToSepolia, epochPeriod, lastSavedCount, veaOutboxSepolia, deposit] = await initialize( + process.env.VEAOUTBOX_ARBSEPOLIA_TO_SEPOLIA_ADDRESS, + process.env.VEAINBOX_ARBSEPOLIA_TO_SEPOLIA_ADDRESS, + process.env.RPC_SEPOLIA ); while (1) { - lastSavedCount = await happyPath(veaInboxArbGoerliToGoerli, epochPeriod, lastSavedCount, veaOutboxGoerli, deposit); + lastSavedCount = await happyPath( + veaInboxArbSepoliaToSepolia, + epochPeriod, + lastSavedCount, + veaOutboxSepolia, + deposit + ); const currentTS = Math.floor(Date.now() / 1000); const delayAmount = (epochPeriod - (currentTS % epochPeriod)) * 1000 + 30000; console.log("waiting for the next epoch. . .", Math.floor(delayAmount / 1000), "seconds"); diff --git a/validator-cli/src/utils/devnet.ts b/validator-cli/src/utils/devnet.ts index bcff6169..b263605a 100644 --- a/validator-cli/src/utils/devnet.ts +++ b/validator-cli/src/utils/devnet.ts @@ -11,8 +11,8 @@ async function initialize( const outboxProvider = new JsonRpcProvider(outboxRPCUrl); const veaOutbox = getVeaOutboxArbToEthDevnetProvider(veaOutboxAddress, process.env.PRIVATE_KEY, outboxProvider); - const arbGoerliProvider = new JsonRpcProvider(process.env.RPC_ARB_GOERLI); - const veaInbox = getVeaInboxArbToEthProvider(veaInboxAddress, process.env.PRIVATE_KEY, arbGoerliProvider); + const arbSepoliaProvider = new JsonRpcProvider(process.env.RPC_ARB_SEPOLIA); + const veaInbox = getVeaInboxArbToEthProvider(veaInboxAddress, process.env.PRIVATE_KEY, arbSepoliaProvider); const deposit = await veaOutbox.deposit(); const epochPeriod = (await veaOutbox.epochPeriod()).toNumber(); @@ -27,9 +27,9 @@ async function initialize( // only search back 2 weeks // not really correct since l2 blocks are different, but just an estimate - const searchBlock = Math.max(0, (await arbGoerliProvider.getBlockNumber()) - Math.floor(1209600 / 12)); + const searchBlock = Math.max(0, (await arbSepoliaProvider.getBlockNumber()) - Math.floor(1209600 / 12)); - const logs = await arbGoerliProvider.getLogs({ + const logs = await arbSepoliaProvider.getLogs({ address: veaInboxAddress, topics: veaInbox.filters.SnapshotSaved(null).topics, fromBlock: searchBlock, From 9ed3f11a4a891fbc1491c5c23a5a230ed5032c84 Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Thu, 7 Mar 2024 15:02:03 +0530 Subject: [PATCH 36/58] feat: migrate veascan subgraph and ui app from goerli to sepolia devnet --- veascan-subgraph-inbox/package.json | 2 +- veascan-subgraph-inbox/src/VeaInbox.ts | 6 +++--- veascan-subgraph-inbox/subgraph.yaml | 20 ++++++++++---------- veascan-subgraph-outbox/package.json | 1 + veascan-subgraph-outbox/src/VeaOutbox.ts | 13 +++++-------- veascan-subgraph-outbox/subgraph.yaml | 12 ++++++------ veascan-web/codegen.ts | 4 ++-- veascan-web/src/consts/bridges.ts | 8 ++++---- 8 files changed, 32 insertions(+), 34 deletions(-) diff --git a/veascan-subgraph-inbox/package.json b/veascan-subgraph-inbox/package.json index 602f6333..0eb086bd 100644 --- a/veascan-subgraph-inbox/package.json +++ b/veascan-subgraph-inbox/package.json @@ -12,7 +12,7 @@ "scripts": { "codegen": "graph codegen", "build": "graph build", - "deploy": "graph deploy --node https://api.thegraph.com/deploy/ kleros/veascan-inbox-arbitrumgoerli", + "deploy": "graph deploy --studio veascan-inbox-arb-sep-devnet", "create-local": "graph create --node http://localhost:8020/ kleros/veascan-inbox", "remove-local": "graph remove --node http://localhost:8020/ kleros/veascan-inbox", "deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 kleros/veascan-inbox" diff --git a/veascan-subgraph-inbox/src/VeaInbox.ts b/veascan-subgraph-inbox/src/VeaInbox.ts index 8b5e172d..b80ff61b 100644 --- a/veascan-subgraph-inbox/src/VeaInbox.ts +++ b/veascan-subgraph-inbox/src/VeaInbox.ts @@ -17,7 +17,7 @@ export function handleMessageSent(event: MessageSent): void { message.snapshot = snapshot.id; message.txHash = event.transaction.hash; message.timestamp = event.block.timestamp; - const msgData = event.params.nodeData; + const msgData = event.params._nodeData; const _to = new ByteArray(20); for (let i = 0; i < 20; i++) _to[i] = msgData[i + 8]; @@ -98,7 +98,7 @@ export function handleSnapshotSaved(event: SnapshotSaved): void { } export function handleSnapshotSent(event: SnapshotSent): void { - const epochSent = event.params.epochSent; + const epochSent = event.params._epochSent; const fallback = new Fallback( epochSent.plus(event.block.timestamp).toString() ); @@ -107,7 +107,7 @@ export function handleSnapshotSent(event: SnapshotSent): void { fallback.timestamp = event.block.timestamp; fallback.txHash = event.transaction.hash; fallback.executor = event.transaction.from; - fallback.ticketId = event.params.ticketId; + fallback.ticketId = event.params._ticketId; for (let i = ref.currentSnapshotIndex.toI32(); i >= 0; i--) { const snapshotId = BigInt.fromI32(i).toString(); diff --git a/veascan-subgraph-inbox/subgraph.yaml b/veascan-subgraph-inbox/subgraph.yaml index 318c7c89..f4c65127 100644 --- a/veascan-subgraph-inbox/subgraph.yaml +++ b/veascan-subgraph-inbox/subgraph.yaml @@ -3,27 +3,27 @@ schema: file: ./schema.graphql dataSources: - kind: ethereum - name: VeaInboxArbToGnosis - network: arbitrum-goerli + name: VeaInbox + network: arbitrum-sepolia source: - address: "0x3b894FE680deB990b4Fb7E7D0000C32Af06687C3" + address: "0x77e95F54032f467eC45c48C6affc203f93858783" abi: VeaInbox - startBlock: 18151531 + startBlock: 18210847 mapping: kind: ethereum/events - apiVersion: 0.0.6 + apiVersion: 0.0.7 language: wasm/assemblyscript entities: - - Snapshot - - Message - - Refs + - Snapshot + - Message + - Refs abis: - name: VeaInbox - file: ../contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json + file: ../contracts/deployments/arbitrumSepolia/VeaInboxArbToEthDevnet.json eventHandlers: - event: MessageSent(bytes) handler: handleMessageSent - - event: SnapshotSaved(uint256) + - event: SnapshotSaved(bytes32,uint256,uint64) handler: handleSnapshotSaved - event: SnapshotSent(indexed uint256,bytes32) handler: handleSnapshotSent diff --git a/veascan-subgraph-outbox/package.json b/veascan-subgraph-outbox/package.json index 42628e2e..a3225388 100644 --- a/veascan-subgraph-outbox/package.json +++ b/veascan-subgraph-outbox/package.json @@ -14,6 +14,7 @@ "update:chiado": "./scripts/update.sh chiado chiado ArbToGnosisDevnet", "codegen": "graph codegen", "build": "graph build", + "deploy": "graph deploy --studio veascan-outbox-arb-sep-devnet", "build:goerli": "yarn update:goerli && graph build", "build:chiado": "yarn update:chiado && graph build", "deploy:goerli": "yarn build:goerli && yarn graph deploy --node https://api.thegraph.com/deploy/ kleros/veascan-outbox-goerli", diff --git a/veascan-subgraph-outbox/src/VeaOutbox.ts b/veascan-subgraph-outbox/src/VeaOutbox.ts index 02cc6435..7e6ef9cb 100644 --- a/veascan-subgraph-outbox/src/VeaOutbox.ts +++ b/veascan-subgraph-outbox/src/VeaOutbox.ts @@ -18,12 +18,9 @@ export function handleClaimed(event: Claimed): void { const claimIndex = useClaimIndex(); const claim = new Claim(claimIndex.toString()); const outbox = VeaOutbox.bind(event.address); - const claimDelay = outbox.claimDelay(); - const epochPeriod = outbox.epochPeriod(); - const epoch = event.block.timestamp.minus(claimDelay).div(epochPeriod); - claim.epoch = epoch; + claim.epoch = event.params._epoch; claim.txHash = event.transaction.hash; - claim.stateroot = event.params.stateRoot; + claim.stateroot = event.params._stateRoot; claim.timestamp = event.block.timestamp; claim.bridger = event.transaction.from; // same as event.params.claimer claim.challenged = false; @@ -41,7 +38,7 @@ export function handleChallenged(event: Challenged): void { ) { const claim = Claim.load(i.toString()); if (!claim) continue; - if (claim.epoch.equals(event.params.epoch)) { + if (claim.epoch.equals(event.params._epoch)) { outterClaim = claim; break; } @@ -69,7 +66,7 @@ export function handleVerified(event: Verified): void { i.minus(BigInt.fromI32(1)) ) { const claim = Claim.load(i.toString()); - if (claim!.epoch.equals(event.params.epoch)) { + if (claim!.epoch.equals(event.params._epoch)) { const verification = new Verification(claim!.id); verification.claim = claim!.id; verification.timestamp = event.block.timestamp; @@ -82,7 +79,7 @@ export function handleVerified(event: Verified): void { } export function handleMessageRelayed(event: MessageRelayed): void { - const message = new Message(event.params.msgId.toString()); + const message = new Message(event.params._msgId.toString()); message.timestamp = event.block.timestamp; message.txHash = event.transaction.hash; message.relayer = event.transaction.from; diff --git a/veascan-subgraph-outbox/subgraph.yaml b/veascan-subgraph-outbox/subgraph.yaml index 622771c9..a1ddd8a0 100644 --- a/veascan-subgraph-outbox/subgraph.yaml +++ b/veascan-subgraph-outbox/subgraph.yaml @@ -4,11 +4,11 @@ schema: dataSources: - kind: ethereum name: VeaOutbox - network: goerli + network: sepolia source: - address: "0xAA0FA4fB781d8e17F3998291774601e06f2f27be" + address: "0x5AD255400913515C8DA7E82E6b8A109fA5c46135" abi: VeaOutbox - startBlock: 8904168 + startBlock: 5379614 mapping: kind: ethereum/events apiVersion: 0.0.7 @@ -20,11 +20,11 @@ dataSources: - Verified abis: - name: VeaOutbox - file: ../contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json + file: ../contracts/deployments/sepolia/VeaOutboxArbToEthDevnet.json eventHandlers: - - event: Challenged(uint256,indexed address) + - event: Challenged(indexed uint256,indexed address) handler: handleChallenged - - event: Claimed(indexed address,bytes32) + - event: Claimed(indexed address,indexed uint256,bytes32) handler: handleClaimed - event: MessageRelayed(uint64) handler: handleMessageRelayed diff --git a/veascan-web/codegen.ts b/veascan-web/codegen.ts index 88da5459..0a48417a 100644 --- a/veascan-web/codegen.ts +++ b/veascan-web/codegen.ts @@ -3,8 +3,8 @@ import type { CodegenConfig } from "@graphql-codegen/cli"; const config: CodegenConfig = { overwrite: true, schema: [ - "https://api.thegraph.com/subgraphs/name/alcercu/veascantest", - "https://api.thegraph.com/subgraphs/name/alcercu/veascan-outbox-goerli", + "https://api.studio.thegraph.com/query/67213/veascan-inbox-arb-sep-devnet/version/latest", + "https://api.studio.thegraph.com/query/67213/veascan-outbox-arb-sep-devnet/version/latest", ], documents: "src/hooks/queries/*.ts", generates: { diff --git a/veascan-web/src/consts/bridges.ts b/veascan-web/src/consts/bridges.ts index b5ddcce2..d3eb79a6 100644 --- a/veascan-web/src/consts/bridges.ts +++ b/veascan-web/src/consts/bridges.ts @@ -1,5 +1,5 @@ -import VeaInboxArbitrumGoerli from "@kleros/vea-contracts/deployments/arbitrumGoerli/VeaInboxArbToEthDevnet.json"; -import VeaOutboxGoerli from "@kleros/vea-contracts/deployments/goerli/VeaOutboxArbToEthDevnet.json"; +import VeaInboxArbitrumGoerli from "@kleros/vea-contracts/deployments/arbitrumSepolia/VeaInboxArbToEthDevnet.json"; +import VeaOutboxGoerli from "@kleros/vea-contracts/deployments/sepolia/VeaOutboxArbToEthDevnet.json"; import { Chain, arbitrumGoerli, goerli } from "@wagmi/chains"; import Arbitrum from "tsx:svgs/chains/arbitrum.svg"; import Ethereum from "tsx:svgs/chains/ethereum.svg"; @@ -31,9 +31,9 @@ export const bridges: IBridge[] = [ to: goerli.id, inboxAddress: VeaInboxArbitrumGoerli.address as `0x${string}`, inboxEndpoint: - "https://api.thegraph.com/subgraphs/name/alcercu/veascantest", + "https://api.studio.thegraph.com/query/67213/veascan-inbox-arb-sep-devnet/version/latest", outboxAddress: VeaOutboxGoerli.address as `0x${string}`, outboxEndpoint: - "https://api.thegraph.com/subgraphs/name/alcercu/veascan-outbox-goerli", + "https://api.studio.thegraph.com/query/67213/veascan-outbox-arb-sep-devnet/version/latest", }, ]; From 187a50e1bd31d716343e099e47fb12f43a834c0f Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Thu, 7 Mar 2024 15:02:44 +0530 Subject: [PATCH 37/58] chore: update relayer cli state file --- relayer-cli/src/state/11155111.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/relayer-cli/src/state/11155111.json b/relayer-cli/src/state/11155111.json index 301b45f4..26072a08 100644 --- a/relayer-cli/src/state/11155111.json +++ b/relayer-cli/src/state/11155111.json @@ -1,4 +1,4 @@ { - "ts": 1709731904, - "nonce": "2" + "ts": 1709794490, + "nonce": "3" } From 6a48c8bc7c845346914657dfaa51df1966411373 Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Sat, 9 Mar 2024 16:49:50 +0530 Subject: [PATCH 38/58] fix: revert contract to mock --- contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts b/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts index 54be4a29..bc135472 100644 --- a/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts +++ b/contracts/deploy/01-outbox/01-arb-to-eth-outbox.ts @@ -6,7 +6,7 @@ import { ethers } from "hardhat"; enum ReceiverChains { ETHEREUM_MAINNET = 1, - ETHEREUM_Sepolia = 11155111, + ETHEREUM_SEPOLIA = 11155111, HARDHAT = 31337, } @@ -94,8 +94,9 @@ const deployOutbox: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const veaOutbox = await deploy("VeaOutbox", { from: deployer, - contract: "VeaOutboxArbToEthDevnet", + contract: "VeaOutboxMockArbToEth", args: [ + arbSysAddress, deposit, epochPeriod, minChallengePeriod, From fda51709fe4487c6c194b9b240bd7bc95942a4b3 Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Sat, 9 Mar 2024 16:55:24 +0530 Subject: [PATCH 39/58] chore: remove state files of relayer from source code --- relayer-cli/src/state/10200.json | 4 ---- relayer-cli/src/state/11155111.json | 4 ---- relayer-cli/src/state/5.json | 4 ---- 3 files changed, 12 deletions(-) delete mode 100644 relayer-cli/src/state/10200.json delete mode 100644 relayer-cli/src/state/11155111.json delete mode 100644 relayer-cli/src/state/5.json diff --git a/relayer-cli/src/state/10200.json b/relayer-cli/src/state/10200.json deleted file mode 100644 index f55420f7..00000000 --- a/relayer-cli/src/state/10200.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "ts": 1683895122, - "nonce": "6" -} diff --git a/relayer-cli/src/state/11155111.json b/relayer-cli/src/state/11155111.json deleted file mode 100644 index 26072a08..00000000 --- a/relayer-cli/src/state/11155111.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "ts": 1709794490, - "nonce": "3" -} diff --git a/relayer-cli/src/state/5.json b/relayer-cli/src/state/5.json deleted file mode 100644 index b97567ec..00000000 --- a/relayer-cli/src/state/5.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "ts": 1683895113, - "nonce": "6" -} From b7d03c95257f6a1ca5de92de311f1e634795e98b Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Sat, 9 Mar 2024 16:56:12 +0530 Subject: [PATCH 40/58] chore: update readme commands from goerli to sepolia --- contracts/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/contracts/README.md b/contracts/README.md index 7f09cc70..198e5e29 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -87,13 +87,13 @@ yarn start-local ##### Testnets ```bash -# arbitrumSepolia -> Goerli -yarn deploy --network goerli --tags ArbGoerliToGoerliOutbox -yarn deploy --network arbitrumSepolia --tags ArbGoerliToGoerliInbox +# arbitrumSepolia -> Sepolia +yarn deploy --network sepolia --tags ArbSepoliaToSepoliaOutbox +yarn deploy --network arbitrumSepolia --tags ArbSepoliaToSepoliaInbox # arbitrumSepolia -> Chiado -yarn deploy --network chiado --tags ArbGoerliToChiadoOutbox -yarn deploy --network arbitrumSepolia --tags ArbGoerliToChiadoInbox +yarn deploy --network chiado --tags ArbSepoliaToChiadoOutbox +yarn deploy --network arbitrumSepolia --tags ArbSepoliaToChiadoInbox ``` ##### Mainnets @@ -123,8 +123,8 @@ This must be done for each network separately. ```bash # explorer -yarn etherscan-verify --network +yarn etherscan-verify --network # sourcify -yarn sourcify --network +yarn sourcify --network ``` From d4b2e314ff20e793ce793bcd1e28456c752decc7 Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Sat, 9 Mar 2024 16:56:35 +0530 Subject: [PATCH 41/58] fix: update epoch period for devnet --- relayer-cli/src/devnetRelayExample.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relayer-cli/src/devnetRelayExample.ts b/relayer-cli/src/devnetRelayExample.ts index e9d8674b..2ebc1def 100644 --- a/relayer-cli/src/devnetRelayExample.ts +++ b/relayer-cli/src/devnetRelayExample.ts @@ -4,7 +4,7 @@ require("dotenv").config(); // let chain_ids = [5, 10200]; let chain_ids = [11155111]; -const epochPeriod = 600; // 30 min +const epochPeriod = 1800; // 30 min ["SIGINT", "SIGTERM", "SIGQUIT", "EXIT", "MODULE_NOT_FOUND"].forEach((signal) => process.on(signal, async () => { console.log("exit"); From bbd5ae27739270606f6a5167227a7e48a5367c12 Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Sat, 9 Mar 2024 16:58:42 +0530 Subject: [PATCH 42/58] fix: update veascan subgraph commands from goerli to sepolia --- veascan-subgraph-outbox/package.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/veascan-subgraph-outbox/package.json b/veascan-subgraph-outbox/package.json index a3225388..b26dc3e7 100644 --- a/veascan-subgraph-outbox/package.json +++ b/veascan-subgraph-outbox/package.json @@ -14,10 +14,8 @@ "update:chiado": "./scripts/update.sh chiado chiado ArbToGnosisDevnet", "codegen": "graph codegen", "build": "graph build", - "deploy": "graph deploy --studio veascan-outbox-arb-sep-devnet", - "build:goerli": "yarn update:goerli && graph build", + "deploy:sepolia": "yarn build:sepolia && yarn graph deploy --studio veascan-outbox-arb-sep-devnet", "build:chiado": "yarn update:chiado && graph build", - "deploy:goerli": "yarn build:goerli && yarn graph deploy --node https://api.thegraph.com/deploy/ kleros/veascan-outbox-goerli", "deploy:chiado": "yarn build:chiado && goldsky subgraph deploy kleros-veascan-outbox-chiado/latest", "create-local": "graph create --node http://localhost:8020/ kleros/veascan-outbox", "remove-local": "graph remove --node http://localhost:8020/ kleros/veascan-outbox", From 5b345f2b6a88c9251b3e1cc2ef55918ff4c75326 Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Sat, 9 Mar 2024 17:33:46 +0530 Subject: [PATCH 43/58] chore: remove generated files for relayer subgraph --- .../generated/VeaInbox/VeaInbox.ts | 411 ------------- relayer-subgraph-inbox/generated/schema.ts | 575 ------------------ 2 files changed, 986 deletions(-) delete mode 100644 relayer-subgraph-inbox/generated/VeaInbox/VeaInbox.ts delete mode 100644 relayer-subgraph-inbox/generated/schema.ts diff --git a/relayer-subgraph-inbox/generated/VeaInbox/VeaInbox.ts b/relayer-subgraph-inbox/generated/VeaInbox/VeaInbox.ts deleted file mode 100644 index ceef9b1e..00000000 --- a/relayer-subgraph-inbox/generated/VeaInbox/VeaInbox.ts +++ /dev/null @@ -1,411 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - ethereum, - JSONValue, - TypedMap, - Entity, - Bytes, - Address, - BigInt, -} from "@graphprotocol/graph-ts"; - -export class MessageSent extends ethereum.Event { - get params(): MessageSent__Params { - return new MessageSent__Params(this); - } -} - -export class MessageSent__Params { - _event: MessageSent; - - constructor(event: MessageSent) { - this._event = event; - } - - get _nodeData(): Bytes { - return this._event.parameters[0].value.toBytes(); - } -} - -export class SnapshotSaved extends ethereum.Event { - get params(): SnapshotSaved__Params { - return new SnapshotSaved__Params(this); - } -} - -export class SnapshotSaved__Params { - _event: SnapshotSaved; - - constructor(event: SnapshotSaved) { - this._event = event; - } - - get _snapshot(): Bytes { - return this._event.parameters[0].value.toBytes(); - } - - get _epoch(): BigInt { - return this._event.parameters[1].value.toBigInt(); - } - - get _count(): BigInt { - return this._event.parameters[2].value.toBigInt(); - } -} - -export class SnapshotSent extends ethereum.Event { - get params(): SnapshotSent__Params { - return new SnapshotSent__Params(this); - } -} - -export class SnapshotSent__Params { - _event: SnapshotSent; - - constructor(event: SnapshotSent) { - this._event = event; - } - - get _epochSent(): BigInt { - return this._event.parameters[0].value.toBigInt(); - } - - get _ticketId(): Bytes { - return this._event.parameters[1].value.toBytes(); - } -} - -export class VeaInbox extends ethereum.SmartContract { - static bind(address: Address): VeaInbox { - return new VeaInbox("VeaInbox", address); - } - - count(): BigInt { - let result = super.call("count", "count():(uint64)", []); - - return result[0].toBigInt(); - } - - try_count(): ethereum.CallResult { - let result = super.tryCall("count", "count():(uint64)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - epochAt(_timestamp: BigInt): BigInt { - let result = super.call("epochAt", "epochAt(uint256):(uint256)", [ - ethereum.Value.fromUnsignedBigInt(_timestamp), - ]); - - return result[0].toBigInt(); - } - - try_epochAt(_timestamp: BigInt): ethereum.CallResult { - let result = super.tryCall("epochAt", "epochAt(uint256):(uint256)", [ - ethereum.Value.fromUnsignedBigInt(_timestamp), - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - epochFinalized(): BigInt { - let result = super.call("epochFinalized", "epochFinalized():(uint256)", []); - - return result[0].toBigInt(); - } - - try_epochFinalized(): ethereum.CallResult { - let result = super.tryCall( - "epochFinalized", - "epochFinalized():(uint256)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - epochNow(): BigInt { - let result = super.call("epochNow", "epochNow():(uint256)", []); - - return result[0].toBigInt(); - } - - try_epochNow(): ethereum.CallResult { - let result = super.tryCall("epochNow", "epochNow():(uint256)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - epochPeriod(): BigInt { - let result = super.call("epochPeriod", "epochPeriod():(uint256)", []); - - return result[0].toBigInt(); - } - - try_epochPeriod(): ethereum.CallResult { - let result = super.tryCall("epochPeriod", "epochPeriod():(uint256)", []); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - sendMessage(_to: Address, _fnSelector: Bytes, _data: Bytes): BigInt { - let result = super.call( - "sendMessage", - "sendMessage(address,bytes4,bytes):(uint64)", - [ - ethereum.Value.fromAddress(_to), - ethereum.Value.fromFixedBytes(_fnSelector), - ethereum.Value.fromBytes(_data), - ] - ); - - return result[0].toBigInt(); - } - - try_sendMessage( - _to: Address, - _fnSelector: Bytes, - _data: Bytes - ): ethereum.CallResult { - let result = super.tryCall( - "sendMessage", - "sendMessage(address,bytes4,bytes):(uint64)", - [ - ethereum.Value.fromAddress(_to), - ethereum.Value.fromFixedBytes(_fnSelector), - ethereum.Value.fromBytes(_data), - ] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBigInt()); - } - - snapshots(param0: BigInt): Bytes { - let result = super.call("snapshots", "snapshots(uint256):(bytes32)", [ - ethereum.Value.fromUnsignedBigInt(param0), - ]); - - return result[0].toBytes(); - } - - try_snapshots(param0: BigInt): ethereum.CallResult { - let result = super.tryCall("snapshots", "snapshots(uint256):(bytes32)", [ - ethereum.Value.fromUnsignedBigInt(param0), - ]); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toBytes()); - } - - veaOutboxArbToEth(): Address { - let result = super.call( - "veaOutboxArbToEth", - "veaOutboxArbToEth():(address)", - [] - ); - - return result[0].toAddress(); - } - - try_veaOutboxArbToEth(): ethereum.CallResult
{ - let result = super.tryCall( - "veaOutboxArbToEth", - "veaOutboxArbToEth():(address)", - [] - ); - if (result.reverted) { - return new ethereum.CallResult(); - } - let value = result.value; - return ethereum.CallResult.fromValue(value[0].toAddress()); - } -} - -export class ConstructorCall extends ethereum.Call { - get inputs(): ConstructorCall__Inputs { - return new ConstructorCall__Inputs(this); - } - - get outputs(): ConstructorCall__Outputs { - return new ConstructorCall__Outputs(this); - } -} - -export class ConstructorCall__Inputs { - _call: ConstructorCall; - - constructor(call: ConstructorCall) { - this._call = call; - } - - get _epochPeriod(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get _veaOutboxArbToEth(): Address { - return this._call.inputValues[1].value.toAddress(); - } -} - -export class ConstructorCall__Outputs { - _call: ConstructorCall; - - constructor(call: ConstructorCall) { - this._call = call; - } -} - -export class SaveSnapshotCall extends ethereum.Call { - get inputs(): SaveSnapshotCall__Inputs { - return new SaveSnapshotCall__Inputs(this); - } - - get outputs(): SaveSnapshotCall__Outputs { - return new SaveSnapshotCall__Outputs(this); - } -} - -export class SaveSnapshotCall__Inputs { - _call: SaveSnapshotCall; - - constructor(call: SaveSnapshotCall) { - this._call = call; - } -} - -export class SaveSnapshotCall__Outputs { - _call: SaveSnapshotCall; - - constructor(call: SaveSnapshotCall) { - this._call = call; - } -} - -export class SendMessageCall extends ethereum.Call { - get inputs(): SendMessageCall__Inputs { - return new SendMessageCall__Inputs(this); - } - - get outputs(): SendMessageCall__Outputs { - return new SendMessageCall__Outputs(this); - } -} - -export class SendMessageCall__Inputs { - _call: SendMessageCall; - - constructor(call: SendMessageCall) { - this._call = call; - } - - get _to(): Address { - return this._call.inputValues[0].value.toAddress(); - } - - get _fnSelector(): Bytes { - return this._call.inputValues[1].value.toBytes(); - } - - get _data(): Bytes { - return this._call.inputValues[2].value.toBytes(); - } -} - -export class SendMessageCall__Outputs { - _call: SendMessageCall; - - constructor(call: SendMessageCall) { - this._call = call; - } - - get value0(): BigInt { - return this._call.outputValues[0].value.toBigInt(); - } -} - -export class SendSnapshotCall extends ethereum.Call { - get inputs(): SendSnapshotCall__Inputs { - return new SendSnapshotCall__Inputs(this); - } - - get outputs(): SendSnapshotCall__Outputs { - return new SendSnapshotCall__Outputs(this); - } -} - -export class SendSnapshotCall__Inputs { - _call: SendSnapshotCall; - - constructor(call: SendSnapshotCall) { - this._call = call; - } - - get _epoch(): BigInt { - return this._call.inputValues[0].value.toBigInt(); - } - - get _claim(): SendSnapshotCall_claimStruct { - return changetype( - this._call.inputValues[1].value.toTuple() - ); - } -} - -export class SendSnapshotCall__Outputs { - _call: SendSnapshotCall; - - constructor(call: SendSnapshotCall) { - this._call = call; - } -} - -export class SendSnapshotCall_claimStruct extends ethereum.Tuple { - get stateRoot(): Bytes { - return this[0].toBytes(); - } - - get claimer(): Address { - return this[1].toAddress(); - } - - get timestampClaimed(): BigInt { - return this[2].toBigInt(); - } - - get timestampVerification(): BigInt { - return this[3].toBigInt(); - } - - get blocknumberVerification(): BigInt { - return this[4].toBigInt(); - } - - get honest(): i32 { - return this[5].toI32(); - } - - get challenger(): Address { - return this[6].toAddress(); - } -} diff --git a/relayer-subgraph-inbox/generated/schema.ts b/relayer-subgraph-inbox/generated/schema.ts deleted file mode 100644 index 11a3d05d..00000000 --- a/relayer-subgraph-inbox/generated/schema.ts +++ /dev/null @@ -1,575 +0,0 @@ -// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. - -import { - TypedMap, - Entity, - Value, - ValueKind, - store, - Bytes, - BigInt, - BigDecimal, -} from "@graphprotocol/graph-ts"; - -export class MessageSent extends Entity { - constructor(id: Bytes) { - super(); - this.set("id", Value.fromBytes(id)); - } - - save(): void { - let id = this.get("id"); - assert(id != null, "Cannot save MessageSent entity without an ID"); - if (id) { - assert( - id.kind == ValueKind.BYTES, - `Entities of type MessageSent must have an ID of type Bytes but the id '${id.displayData()}' is of type ${id.displayKind()}` - ); - store.set("MessageSent", id.toBytes().toHexString(), this); - } - } - - static loadInBlock(id: Bytes): MessageSent | null { - return changetype( - store.get_in_block("MessageSent", id.toHexString()) - ); - } - - static load(id: Bytes): MessageSent | null { - return changetype( - store.get("MessageSent", id.toHexString()) - ); - } - - get id(): Bytes { - let value = this.get("id"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBytes(); - } - } - - set id(value: Bytes) { - this.set("id", Value.fromBytes(value)); - } - - get nonce(): BigInt { - let value = this.get("nonce"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigInt(); - } - } - - set nonce(value: BigInt) { - this.set("nonce", Value.fromBigInt(value)); - } - - get to(): Bytes { - let value = this.get("to"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBytes(); - } - } - - set to(value: Bytes) { - this.set("to", Value.fromBytes(value)); - } - - get msgSender(): Bytes { - let value = this.get("msgSender"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBytes(); - } - } - - set msgSender(value: Bytes) { - this.set("msgSender", Value.fromBytes(value)); - } - - get data(): Bytes { - let value = this.get("data"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBytes(); - } - } - - set data(value: Bytes) { - this.set("data", Value.fromBytes(value)); - } - - get epoch(): BigInt { - let value = this.get("epoch"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigInt(); - } - } - - set epoch(value: BigInt) { - this.set("epoch", Value.fromBigInt(value)); - } - - get node(): string { - let value = this.get("node"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toString(); - } - } - - set node(value: string) { - this.set("node", Value.fromString(value)); - } - - get blockNumber(): BigInt { - let value = this.get("blockNumber"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigInt(); - } - } - - set blockNumber(value: BigInt) { - this.set("blockNumber", Value.fromBigInt(value)); - } - - get blockTimestamp(): BigInt { - let value = this.get("blockTimestamp"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigInt(); - } - } - - set blockTimestamp(value: BigInt) { - this.set("blockTimestamp", Value.fromBigInt(value)); - } - - get transactionHash(): Bytes { - let value = this.get("transactionHash"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBytes(); - } - } - - set transactionHash(value: Bytes) { - this.set("transactionHash", Value.fromBytes(value)); - } -} - -export class Node extends Entity { - constructor(id: string) { - super(); - this.set("id", Value.fromString(id)); - } - - save(): void { - let id = this.get("id"); - assert(id != null, "Cannot save Node entity without an ID"); - if (id) { - assert( - id.kind == ValueKind.STRING, - `Entities of type Node must have an ID of type String but the id '${id.displayData()}' is of type ${id.displayKind()}` - ); - store.set("Node", id.toString(), this); - } - } - - static loadInBlock(id: string): Node | null { - return changetype(store.get_in_block("Node", id)); - } - - static load(id: string): Node | null { - return changetype(store.get("Node", id)); - } - - get id(): string { - let value = this.get("id"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toString(); - } - } - - set id(value: string) { - this.set("id", Value.fromString(value)); - } - - get hash(): Bytes { - let value = this.get("hash"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBytes(); - } - } - - set hash(value: Bytes) { - this.set("hash", Value.fromBytes(value)); - } -} - -export class Receiver extends Entity { - constructor(id: Bytes) { - super(); - this.set("id", Value.fromBytes(id)); - } - - save(): void { - let id = this.get("id"); - assert(id != null, "Cannot save Receiver entity without an ID"); - if (id) { - assert( - id.kind == ValueKind.BYTES, - `Entities of type Receiver must have an ID of type Bytes but the id '${id.displayData()}' is of type ${id.displayKind()}` - ); - store.set("Receiver", id.toBytes().toHexString(), this); - } - } - - static loadInBlock(id: Bytes): Receiver | null { - return changetype( - store.get_in_block("Receiver", id.toHexString()) - ); - } - - static load(id: Bytes): Receiver | null { - return changetype(store.get("Receiver", id.toHexString())); - } - - get id(): Bytes { - let value = this.get("id"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBytes(); - } - } - - set id(value: Bytes) { - this.set("id", Value.fromBytes(value)); - } - - get messages(): MessageSentLoader { - return new MessageSentLoader( - "Receiver", - this.get("id")!.toBytes().toHexString(), - "messages" - ); - } -} - -export class Sender extends Entity { - constructor(id: Bytes) { - super(); - this.set("id", Value.fromBytes(id)); - } - - save(): void { - let id = this.get("id"); - assert(id != null, "Cannot save Sender entity without an ID"); - if (id) { - assert( - id.kind == ValueKind.BYTES, - `Entities of type Sender must have an ID of type Bytes but the id '${id.displayData()}' is of type ${id.displayKind()}` - ); - store.set("Sender", id.toBytes().toHexString(), this); - } - } - - static loadInBlock(id: Bytes): Sender | null { - return changetype( - store.get_in_block("Sender", id.toHexString()) - ); - } - - static load(id: Bytes): Sender | null { - return changetype(store.get("Sender", id.toHexString())); - } - - get id(): Bytes { - let value = this.get("id"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBytes(); - } - } - - set id(value: Bytes) { - this.set("id", Value.fromBytes(value)); - } - - get messages(): MessageSentLoader { - return new MessageSentLoader( - "Sender", - this.get("id")!.toBytes().toHexString(), - "messages" - ); - } -} - -export class SnapshotSaved extends Entity { - constructor(id: Bytes) { - super(); - this.set("id", Value.fromBytes(id)); - } - - save(): void { - let id = this.get("id"); - assert(id != null, "Cannot save SnapshotSaved entity without an ID"); - if (id) { - assert( - id.kind == ValueKind.BYTES, - `Entities of type SnapshotSaved must have an ID of type Bytes but the id '${id.displayData()}' is of type ${id.displayKind()}` - ); - store.set("SnapshotSaved", id.toBytes().toHexString(), this); - } - } - - static loadInBlock(id: Bytes): SnapshotSaved | null { - return changetype( - store.get_in_block("SnapshotSaved", id.toHexString()) - ); - } - - static load(id: Bytes): SnapshotSaved | null { - return changetype( - store.get("SnapshotSaved", id.toHexString()) - ); - } - - get id(): Bytes { - let value = this.get("id"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBytes(); - } - } - - set id(value: Bytes) { - this.set("id", Value.fromBytes(value)); - } - - get stateRoot(): Bytes { - let value = this.get("stateRoot"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBytes(); - } - } - - set stateRoot(value: Bytes) { - this.set("stateRoot", Value.fromBytes(value)); - } - - get epoch(): BigInt { - let value = this.get("epoch"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigInt(); - } - } - - set epoch(value: BigInt) { - this.set("epoch", Value.fromBigInt(value)); - } - - get count(): BigInt { - let value = this.get("count"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigInt(); - } - } - - set count(value: BigInt) { - this.set("count", Value.fromBigInt(value)); - } - - get blockNumber(): BigInt { - let value = this.get("blockNumber"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigInt(); - } - } - - set blockNumber(value: BigInt) { - this.set("blockNumber", Value.fromBigInt(value)); - } - - get blockTimestamp(): BigInt { - let value = this.get("blockTimestamp"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigInt(); - } - } - - set blockTimestamp(value: BigInt) { - this.set("blockTimestamp", Value.fromBigInt(value)); - } - - get transactionHash(): Bytes { - let value = this.get("transactionHash"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBytes(); - } - } - - set transactionHash(value: Bytes) { - this.set("transactionHash", Value.fromBytes(value)); - } -} - -export class SnapshotSent extends Entity { - constructor(id: Bytes) { - super(); - this.set("id", Value.fromBytes(id)); - } - - save(): void { - let id = this.get("id"); - assert(id != null, "Cannot save SnapshotSent entity without an ID"); - if (id) { - assert( - id.kind == ValueKind.BYTES, - `Entities of type SnapshotSent must have an ID of type Bytes but the id '${id.displayData()}' is of type ${id.displayKind()}` - ); - store.set("SnapshotSent", id.toBytes().toHexString(), this); - } - } - - static loadInBlock(id: Bytes): SnapshotSent | null { - return changetype( - store.get_in_block("SnapshotSent", id.toHexString()) - ); - } - - static load(id: Bytes): SnapshotSent | null { - return changetype( - store.get("SnapshotSent", id.toHexString()) - ); - } - - get id(): Bytes { - let value = this.get("id"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBytes(); - } - } - - set id(value: Bytes) { - this.set("id", Value.fromBytes(value)); - } - - get epochSent(): BigInt { - let value = this.get("epochSent"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigInt(); - } - } - - set epochSent(value: BigInt) { - this.set("epochSent", Value.fromBigInt(value)); - } - - get ticketId(): Bytes { - let value = this.get("ticketId"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBytes(); - } - } - - set ticketId(value: Bytes) { - this.set("ticketId", Value.fromBytes(value)); - } - - get blockNumber(): BigInt { - let value = this.get("blockNumber"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigInt(); - } - } - - set blockNumber(value: BigInt) { - this.set("blockNumber", Value.fromBigInt(value)); - } - - get blockTimestamp(): BigInt { - let value = this.get("blockTimestamp"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBigInt(); - } - } - - set blockTimestamp(value: BigInt) { - this.set("blockTimestamp", Value.fromBigInt(value)); - } - - get transactionHash(): Bytes { - let value = this.get("transactionHash"); - if (!value || value.kind == ValueKind.NULL) { - throw new Error("Cannot return null for a required field."); - } else { - return value.toBytes(); - } - } - - set transactionHash(value: Bytes) { - this.set("transactionHash", Value.fromBytes(value)); - } -} - -export class MessageSentLoader extends Entity { - _entity: string; - _field: string; - _id: string; - - constructor(entity: string, id: string, field: string) { - super(); - this._entity = entity; - this._id = id; - this._field = field; - } - - load(): MessageSent[] { - let value = store.loadRelated(this._entity, this._id, this._field); - return changetype(value); - } -} From a6ddc45ab6d1480199e4ad5dde944df975975a68 Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Sat, 9 Mar 2024 17:40:07 +0530 Subject: [PATCH 44/58] chore: remove build files for relayer subgraph --- .../build/VeaInbox/VeaInbox.wasm | Bin 44201 -> 0 bytes .../deployments/arbitrumGoerli/VeaInbox.json | 222 --------------- .../VeaInboxArbToEthDevnet.json | 269 ------------------ relayer-subgraph-inbox/build/schema.graphql | 46 --- relayer-subgraph-inbox/build/subgraph.yaml | 30 -- 5 files changed, 567 deletions(-) delete mode 100644 relayer-subgraph-inbox/build/VeaInbox/VeaInbox.wasm delete mode 100644 relayer-subgraph-inbox/build/contracts/deployments/arbitrumGoerli/VeaInbox.json delete mode 100644 relayer-subgraph-inbox/build/contracts/deployments/arbitrumSepolia/VeaInboxArbToEthDevnet.json delete mode 100644 relayer-subgraph-inbox/build/schema.graphql delete mode 100644 relayer-subgraph-inbox/build/subgraph.yaml diff --git a/relayer-subgraph-inbox/build/VeaInbox/VeaInbox.wasm b/relayer-subgraph-inbox/build/VeaInbox/VeaInbox.wasm deleted file mode 100644 index 9dfa8a2ed1823ed003d192d228b8ed7bc78fc737..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 44201 zcmeHwe|%Keb?1BYMn9hhhTr0+M*?GPgMJ}|gt6fY7=sOl80`EG9;AmD{g@FmBa9Nq zU>n;w!7)jk#7;;;61Q=8Ntf<+x9*m1iDNs&u@jm)soT<)CT>F#nzE^rx(zA&{hs^Y zyf+favS<3){bQxiJLkUpq;Z=Zn- zLsB~1xXUo^3ZnqIf{=|S_uggRYwim@9kMMawWlnxBb~_^71dqo)E+03O{P;bbHjtq zn*3|Sj^Uh>-IiYO>@|!)wKHkmzs7rM>onp5~71DcQ3jmD`rDT0lAr(jlD_?aB-f=F$y) zPFGi=uVq=AVN^P~T~5Xs8i;s_hOR_^zhQXHM8OP*H*_cWB)gsN&SAr}mbDsYnPHlt zP{;%{0FAI|a2kwon9wjRqtY;|s!`jr@K$b?hr{L|II&Q%{EHR81<5PJ-e+iFG8H1Q z2*Lzq1my%31eF9;1l0sKK@CBKU;@EJf+)cxg2@C^2&NKDBbZJwgP@jRCc!L%*#vV4 z<`T>!xQZY~P)ATtFrQ!n!PNu{39cbnL~t#^bp+QFEGAe&&_K{g&_vKo&_b}3pp{@5 zK^wtxf_8!qf)xZe5UeD)k>DnRRRkwRieDG_tiW#wd`{r=0$&jLO@XHbeoNqs0>3Tr zC4nys{Eooy3Op_FPX&HY;GYS6Md0@Z{y^Y4nWvu!{Heg72|Ocn_16ObM&REHJS*_; z1pZLqj|9FZ@b3lwgTNmPJSXrc0)Hy-X9CX){6~R57x+&CF9`hK0)HX!p9Q`y@RtIA zCGcMaz9H~m1^%1BUkkh_@HYbgUEn2w`$hfk6L`PC2Lv7v_@Kat1U@YApuk52enj9$ z1s)RksKAd2d`#eBfgcz634xy!__)AN3H-Fc&j@@%;FAJBEAVpypA#E+Uf>G?zbWvP zz;6kBQQ%=tIqkCIi}QcioU|*E>h52gZ5ySIoW+znM`81b7<#ICu4=8ZYF$8yA)W~BtNUUP3MIJc}rV# zURfZotySlhdwF*x^YkjbewpVHtPEy)6sv-n9?9w{E<5r5bRy?fwF`2+x;0++op}## zMZ6IThn?wkzcpccP!a)FC(aBOtaDxSor(S-$BGs-+R9}^7fhNKY;;RDoznS}z0pX= z?j%eppt5ccCTdF}lNhk3E(%g%x_eV%a9t{w8P-jG!qcvOld1vcrq{Z4w+^;xsLsqoqe_1RaumEW03 z3}P^R6gPM4EJP-!jm#E>suBazwqM0S_e zHhW}SCHk*5ZMkRdY`V$G^z}Pi61iPgyEmzMlBl2TPQXuW%_aIAt0Oj&?ACsC=XB@m zSt~sElc%vY*^^4-hBA(I!zixS>>5h-t#=aL7|=>jHKk=&7gmg0o#8D`W+0hm2(5X) z(G!=hMWfaQH+go!g0;zvqYZvlFni0;j{am9s9LLo**=G=E-=9OP)caf7x-*got|;9 zqxevNzY<;pHP!@)>r(c)*7FF$VQ?)6ZV7U%y1Ow7x8&BK_N{gLot)zrZVV1b7Zwg@ zljqU>Nff;v%vrYui?$AlXu(o$C~IvF4#8L34LN7P+7eW)b$gwzA!^3vpw&A0TZ0|uRa~3GwqT>68sFi$Y>rK@E_Vj!#vSN8let|Ud++r639M9} zJl<99&g;f>kM(Ykwzz}!*nL^=DR3yP^j@#hnsjy`omHt}>wTWV=d*->^?q-Db$%x| zrMlz;-tctEnshRy3$}Zr^a=(Bk~tWVF1@Repe#+gB;mOZ-A=Q1Z8J5XYKHG z%BzCSVyeq6>?$nWlXx);C*v18g>AR()hmZ?yR&dW`DxarJ)T3* zl=G!`48kqCtnC^h-J#qr_H8A-ut2xfy3p(ShCt?qZmX|w1X6cHcf3E*vkp6YtKYMV zKr4y4vetkXHs~VGl$G+r8845MWTi*WsXKMnU}5KL(gTBuu3Tp_r)98vWV=+>No8S> znUU?>0++LFy{o#Ki?u_8aK4b*o#~vjjwb<_Tq{>7ytPA_gam3sg~HQ8&Yr@#DpVrt z?m|ALluM?y_c8@!!Wu5@JkQhzJ%iMod-)ra*_`#Ekv!;uxMRMj(D>qxV|}=AGF;zs zZ=vjT?&ehguvU|Og@&{-*|RIBOZJ-!3&bi#Yx=ML*ZvryLliu;i1tzlZIu))DJ6sFVZ zNv8DB9yYy&qp%8=5QaS4_F4x`&y^O|SeNS7Bpxvfr;e_G0}w0v$YlzhZkO|qj_6#R zNcW~}52Y>551ECN;=38^(GkPmmK<=hxx~Pr^)a(hBeo?6t;fv5$q%@F(bvPK=hXEm zG4PL@g<7<2Z)duD*!skXDfV2O^~n(oxmHxbf-Qcb-RDkEOd45!GXx-vm;a}AU8%s&fc8$xxAcI=57ZE3tBCX zkD}i`kC4xelag1uOzU;Jet>|(S^GCmrQS8 zIl2bJ0%3VeE@OS!tWI`sPw(8Gg9;iQm54*rbfCtHvhCYb&fP{0@L)1!Tvf4s`%sFh z8>+T%?@IUgBlYJ)6OhcKrd3E*4 zuGR-lvut0?P!}&&wtE7LHl5vOWbey=wpddv>enp87K6mfbRYHO^|+qe_{ZFl^h7SqqGq z88g~KMl59CYKF+g`9dy!fYVg6fs$x%)ULPKeMq5AI3}nv7K)i|p&B4$Mq?K0*+0Ok z^1jgOn7J-uprx_G0E(Fyg);l}tEobpyh8B6%n&Gs+~Sb3@)gVT6)n^V=kqJw{Fu?F ztljmY-g=PXU^prex@UL2bjcRXHkH?c+)G_>uWH=lkgCjAtaV9qU{W!v(Nv9U(QHn> zS#3TwHJ^&QDGoopTh(Idy>*(eI@4MWUSgXu9Y&|I+(I3qN{!GH-)dQaR5?0frHFca9{Z{L~$w*aH&5G7QZ`@%6g+UIeQllCbQwC~;R4f{yutYpW ztQYg^QIsN4dlk4`1ZkL?sG$*cx<>s1r{!8V7D>BMu6I$$s27gTN{wIPWL?*=zhRnT z=vT~)qrExNCL=LpHn}(OhGYJ|MWLuN_taY`@?LKCiot5dZWL7P&a8`BnCS54-Qm>` zWawJR&jfe}#EB{Ft%E)iQF1gD)QnJgA=Wmaz-C{a5wlpk(KKKmCQ-Pr&Z4E<91$(l zR4`>G1+R=c3)ZsE{-bKs+6OWw^i9ENW^)QjQsx%+h=d6v3@>A(8+y)@}?I zjYBFbQy()SEmvJ3K+#F&RZ{#I6QoV`Ght9N7$9`1q8>#I79!9!N6^U&0CIqiz-S6< z(xV7XASn;Iv7qbFsKej5psWJco^&i%P>Qb6^B+=M&4XW zNXlGcm_jr!GIVe`saY7KNNQ4EQYP9|=3-^4c26cRv@$eCrlm7s)9koP*9_}SSCo6#Yu;|ykGKM6vc4FXXK0t1>%-DQ<%or&li)L%+<+W9eRz$E z-B>xG#7rSKye<-Et3Fa=TtV+hCm}94#F?NArtd`~D6gyeSSh&TB12kor9eAbFj!YA zlZ`8rbbDoOEFL46i-mhf@K+E1dO4`x%W*_L{2H3MARio|U+z-?r+*YStM`St9AROW zwb{CboZ}^CMJE!O(P$v2hKm^GW3dNiz_3w@m5?GueRu)k7;{=B=~qD@O*SKk|anDy)JCZzk?mX3WGQtPDoXOO(Y9=c6^| z1#5p5`>pPc*V(a3tfKYc$&H{f=hd+qYL|_tW@PN$s_Jyu!kD!hk+$te+BF=k&E_K_ z?Hc6P_>p$aYC}S9iL|Q`X;(?4%|)@AV!&&x>ektasmX73baKq7Goevr2syp^7I2{) zO$>1X!fT{45~CMGidlV#-i%l|qNEt;a#<7G^i*D z2i;(1OrdlGShWycr>T2JDcn1^Zg=6HK;Z^Y6!V1nP?(9TF1yBqq5$!vK0fnIS z7@LJ;*xrpTfsR&dR8=5$tx=(1?26tn5K!>KRexJlqmEC4R&{75bpQ($rwAl~6~w*~ zvSKB*7mXg{?~NE^ECe56UotUFbx9&p2t^sU)aziCB7y-%r>crQ%8bL@?b&tM0!aw3 z9j0ggx2r%j9&eL!mTOk#O8s)FG;;$gE))u_s7jjh7b z=?vH*tQoB8V)!w6w>0M1IBV>B{cM0b3+9hX+}a_G7r9SG3-O0K@I%6m0S(%yhJx{}BNynx$F=59R_q$`K=uhhS&|4M_X z9YRG6Av()$lsPvrS>b)kgf+kgs8HOdhF+MYPEJ;%o5!0ZU?>^+kqNf-)rckDf{!Cq{ zRVQbv4pkPIEKaVvFg+TpHz-U_Z5bqHLSpLV40XI#;kbgci+PXM+4ek55Y$f2CAAk& zKR^xv3CU13_Qxh-L1Z+-F0R5R6swXt`e^wEnYGspjjK09ZXm7>f5+IYtX`zfRc!8s z*EZDtul+ErYn?oB<7QPZ_4YshvoqFaL>H{^?4LKHF4o{)Sh|^`fMw^P$w5&hF(`V3 z4pMcH8J96uj)i*RTwgO%aOLVytalj%%J)J4y)*XE0faU(B?gKZ@WAH%_RRF^Lw2%@ zBFQ?6UR8Vb-QHj}(vz;qNC!tZnh|^tu2-}{cF}5y)(pEGvWqUVAEiA=_4;z{RAgx= zhn!{3AlS3;lCvi=)-rK8h5Ryf1}i{c^%Z!n$lDQw#l1Hsxwo!NhE@(&mSCuqW`Jou!IKojbY z$C|XoT-%sM(bNiR_31|H;kOI*@DU3F^LEl6)}kUq6#Rq=Y^%d%X z=2P4GVzPt%^Vq@H3pXG>NIY* zF^jrEn3NAUu+H}jDA!v$V#Mr3=hkzjsDpp6GcZv&uVk4VQLdjIGsI&+w8(+F!*y|S z!O&oomb%b@)TFShwonJrbalERzxvdu!;R5}Ty`6y(>R=JG8e6j^0>)}UK1@x=Ic$u zZ*&3FUtMTY=bI?I&>rYybfLWhL8&c00&K*Ho@)+NKiRBKGzY4K+yy=S=tNn0)akLD z)3*wo)3Ol1zl?*t1<{)51Q_}L2$#*TK{`=21HRW_1jMn2oB^Y_oI%Ksi`9O&Vj)X`PylqXjT zvfBPih;e1*<)TG2$%l%^zri&dvEq-%87o%mSP=##v7(DZE~cR|KkQy8WCY51Z7i7)pFfH>liW0UueStV~kNY>8L5B zVqCKr#7@Gu{c z?2X|vqI~SONAw0ST|o~OVtpnn>#LN>c>&r}R}F--B?dRuXkO8)XAB43H8|d>k3gF{ zFWqLR+tS{8IOc!0b4os_;(rdh3i8R9FkxIKu3CXnmRj8 z%~RJ%pk9u(j`H@E6%wURnp#;+u8QSYc2Oyy(eO^AD_vlvaFEhvDjl7HN|j?(Qpab- z%A@tzfGNWUy#5?t$CDqO8s~gU#!Fj;|Ar=f6FU54W(Z^WIA5MG&Jo zeyUY-e5_S-e6&>^X&u4w&%Gc5ECx6RyNjdc(d!Wvoo>a1ltn9}mGvQCs-s;NnlFJS zoLr9T(%P@=#U2GJbCwmMnbAd|Il-!z(XPYo`KpWFr0PkxDxGhz>L^X4O+*{uKg!kN zlZHZNC;c0jLcUA5Z(4OA1oDu-UdXItXY zQ9VqXz?6|ReY#K;pKj2n!`-)Zn)lR4n5dr+i#+%MRv)9zfQN~6ns<^z>|_v0PC&Iz z5P>T>RzLBfP9rw4^Q5tD_J^ZOqvcSCvy7EkD`t!?k4}r?AX`&$8$`o6<)&XLWR}ZM zA*=hJL9b8{$caE14pUut&QM36$6>c?5HMPgvC#vCRIcY1M8_|f zXie+r3qlKwGLF%QP|>C!A=mnSiCL=9QTTmcrfQ+17_(}jqwuQ2M#-t6MJ$HRd1Ww3 z9X|Pj81`vzwcxgmQ##tRUpwVm_IV`4vd^A^nV*u{0n7fLw_+Ur7V3#}EVk8lw6-2Lf$yp)6LYMs8lHi>dF1oMx-u}&?*oLik)t9GZDKfILSU<68)oBc z8pmiou6djClDB5lEu}5XM-84WheVAo+q4dpsYNn&Q=P={Laud(qpfw?O~AtXa7HyY zGvzKb_2toUeFdihu}j|X#bm-l(FJwBJHZK(+W#Wusoe=qmt1!ergOS1zdD$>e9`sb zQINJP{lqsBj!#CgAE7!CqUH$0PhSq#_={;Q;q5I3!V3@d!S#Rn_rGHIN;T;NVZy z#3MX~io_#at|!DJ6M!bhBRJkx(K!4z{+K-;nFKUB9>E8^YDzo;rBqYnk*Pq_;*n`U zv*VHJKy%^|e2S&!#v`>r)8mnuKr`ZzSwOY%2+l{<%y?uD(5!d_y8$&X9+?MpRXlPP zP%Iva0oBDLbwKs;NIlT}cw|1%f_P*B(ADwC)j$j5k%d6l#3R=LEs94L0bLu9Tnltv zJaQe-_3_B{K#Sv%#Xw8q5gZGvhIpg_s4*UC1Zs*$aFnW=G zLGZ7Z#Usmr+TszMC#vP~2%Mj4k4Iojsv{oh09p}`tN^+p9=QQ%WjwMH=*D>DMxa&k z$W1^ejd)}g@YjJkgUe+9l9 z_}_r{0{DOi%h(T#8I>6 zOD1+^_+$d#s#T46n(#E^X~9#4XDOamJj?L3;aQHS9nT6pH{ij+qFROL>m-2P5bO-# zd4d-SzD@8F!OH~SA$XSHdjx+*@Cw07JU8Jv$(QdFyg=}m1mDc3{)(x;AvjC$cLYBq z_z}Tt1bl68tm4zYts` z_zi)S{*0-AC%8ngpOU9wPVw zU;mtdqW%je9%cT=2xJ8K8x&i8lHfB0pCA>6zDe*01kVzj zB6yzQTLdo=yh!kEf|m)tL-1V!Lw_!fZ}u6cJdHSUXD9)asl<2A`At7~WbQ<;@bg1O z?7z(DEPiH4jBgRle+s8uAZ0Fi%2Y?r7z+%<|Mn~awtfHlClJ~ls7$0vBPLYog82m za0u@Wz*+QGWt(%*Ta`V9Eo$&=MM(y2QlP1h>GEf)>M_=WlP;tNz*j%Kv!-yc+MdXIm3Vdt=O{Z;ExkWoZBJrZH6De&GiW(%s1v&M zRG?)Fyi*qHj4nGDXxWK2IrNQDUDTxqZGTjnH<$M#w#fLHZ6mfZjH6-0IEm*ho@kk2 zG~wBTXAsZfGA^((RQ%_eX%?zS@f=4HA2zR~3!ZHl1>GMdLM@=AdSuMBGtL6b(#Z8N9TLY)7w9>-6?j+2 zrV90Erux+1{>+naZGoN+Pt!U)&A!$I-}QKgP=_{33!_FjXc0s1Al?$fpLz+cFt@Kx zvu|XpHauBy-35tK(-X!Lkq}+!UZgqt9l+GeB`BxNJxNd3PIkKQWT^ou(1I^Gp-WFq z_k9a#s58iiy_}nF&t(6T@eF{29xM-(FGrYx2bv+YpP1o0cUo}{k2;1jYSaw-ouse@ z&l=>X@T>JNBYX~l4wo~}uXwY?8Ku{9jNOn-Qc{%CPNW^!Qa8q@j?`+~sr7A#9*)wb zwQ9+7(d!bcpa!^7IfIsv@3~qVUph04Ry=p2v>$zqwiI&WSxeB<(QanyQO>ltlg_*F zynWp%^cue9dNVmo&*UtBSu2>06DWtoPtCILATPJ!DU^5?Bc%4k3T81T5~E+DCyv3I zn4j&p7hLvS4MmyU!k6=z`+aHBfHH-sz)}dH8=ETtK(wL;+5)x!GxS-HUXmI|A z27|Lj#yn7}hNTTYGwL;?UNh=7qh2%WkqT?H$S+s#Ry@n_wBcEfryWm+^h7GGu~dFr z0hi%v!?PSuJDv{VhCPuAYqZMmGQc)G%ki}1=@5>|4SOOL)>tOLZGg-1wBzYOD~^m@ zlOy&DIt!YBO}-3h`o^#Yw@=Ozgmiv z5J%6Ek!y0q-bjhH)RFmiXinHrPtUg>uH)%RwxE3r+P9#63);7!eGA%Cuf{XmOVNHQ+Al@>rD(qt z?U$lGb#gpf(2Dl0Xy1zVt!Uqh_N{17eIAc?EJOQcXuk~Ym!bVKv|ony&;MoL$ZkrA$e2wB(q*vSmVkcK|Y4V!Xk4XeTIAE2&x34$d%V ziIS$YIAU_mp1F77Zx^0!JPw|nc%w#BE2&x34$d%ViIS$YIAU_mp4pne-FO(q?L>;! zK#itWQnRQXoMFxqB~58@#N?Vivo(Ji|1plGCD9tF(bP(67PW&j%vqwODJ_neT(f7k z<}ddK+6rk&v<7N4wUU}e?cfY^mMCdTiz6o2?3u0AiR&c}K6SmlnLc5?cyM}IdPI6J zdK$`~V`slR5fARdiqLEHVO1Ews*pwuyBli)SHdAI?ssEd8a6%%kF!|ft)~}{H{QD3 zVFK4wP3Mip_A>I=fM={Vl_3N73EX>eodbmvOJtoowZxBExgTKMr_SiIb4&bKnbPXV zcu;x~r7Lj~+%Ud)fa|%xe`C)Ly5|Oeg?umi)Vb%7%e?^)NU&eMsB;fC`f>SU&{Ibm zbqv_((|A89BNv>VY8)SD_^K*qt;ape0cRI=`-4q(Go^YRo;x6|KAF+G0b`hN9oOTd zP~_`fPRzKGJe_FL<7)DGx)$Tox#ybf$qcf1v=prcz|WRibcteYFb+2R8;p@%Ec|R_=?S0{P{|ec?}%c288V{Y@ia}J4sZj>b3d+x^pN@#Nw4w! zvY*u}WdeQBi|hSP%(zQN&K$PB3;Fu2=q|hm&m34n-ngOV$(ncGsO3pX@=SuKU0h={ z59;C#dZk$D@BH*BCC{}u_dJy%Kcvjl%DX@(18%p&o37NW@Jjn;6Qf;?hdgli$1_#E zTVr3EBfZ5f|qn! zX7I!V67hKFE_IJP{=yZAhXx~Oi6h)8()Gs7lRGUvZ)1NA_|hK;;0WN*D)IAAtg^ev zMX@KC!SmbTZa05!dlCJ?TOK@V_`!m&#f!1;rhqcJdwpP)lM z?^b*RIPV%S&#F3tiw;QiY2Z;u`$KRht#C)IgSmPYIDa^SHs_hY5?&8D{{h2RC>for zXPR`^+Q@kzrjJVGQ2H1yS76W20O!LG&LLeA4^*Vq8MoFs;QUc)7IbK$Tv|z;pTyyk z26H235IBFFKf2y%S4sEj9ZqHus<+U6o*^~xb`ChuD;Eg5%G=Q^`&EZPg|3kF- zCETGw5x)wY*XHB%MVSk<`J!9#AgU4E3m$&j9B?*z*Dk9+Z#N$7WC0 z&a>r4=reF$hsJ8j<3DOC7Z!%h+|E(gMRQN!Vh|4S6mVXLd=IzP^-k)%Tkj3vydBVM zF^u7H;|5rRI)V#E#2*4DOi188c*d_uT7TY(N5oYo;t_#ABYJcg9ljks^1A*H(V`PC zyFv!eYf+3J0^+B@C%P5i0KSUy<2Got7HMYH5nSFv9XbYFA4AQfIN&>p=PaHmKDche zvjxu}p2KBu7;J#aJ_nrtl)LE~RK!C9_>`L$gG5dv&3FFrvoqv{LJHc7gb6~=0bi|9 zSb>L_8(QKj7l-oi>Hw~lsgB{DKP2)LGA1J-KQWD@;3Ntn43PQ5k)!L^nCDey8+?1> zBJx6^DlE&mtEQX{!XSGDFT&(;Bqn)eJiHJKgjeA#5>*h1{7i=>jd(wV%Wu{x42h$- z&&4K&#&;86V32&I<=u2KUgRBnF2QgB{1Pu{b&_vNrV|f;yz#{3ZCvl_81CYc;hpdj zr;spjMi;=<9!X&JItw7XL%6tS8vEwQa>Va&F+}$Y$_g4?M265mf{T7`@i@I7E%+0{ zCuA=X(6bB-tP>w)ur{gmv{<^0u_9Y86GKMb>uH}+vk7_3eLC%uLBE% z2maDcJm)1|@e&9AN)vh9#ZS5TJg{ziMkmhf3#SqTj(K3#Dr3sM{mC7TJBE_@ugEUbq{Vd*)^C+=hFCZv5oS!B$sW(f6E_8r+~bB%NqHwXYtQ<-D}JO_m+ij zEeR!kvxs%wn8f7TvqtyYv+&|^)XjQVqLr;0v$i{6_tvz=%iNk)zHvMR#*kRS#cCDf zXC9ZXRW2Q~Z!MOQ7qV4#jM=DbS0b5e^loa)CmMKVTlLDZn`-R{2n#nZ`M0{+Q>Aq# z*O<)>?P%P-UH)Hj&Eyfe_{YVO8Im_3|Btv)qlTTy{{9J_<6*%42gkVJA=`*+Zj!m- z`H+7$ml^89v`>7}6e0;;D$pqZa(P_C3R30&{LbH9q+5eL{sDTU*4MFT(N(HFymP4$ z{~~+Hx#_0)+qdI_zNj8}0j-AZ+nwE$bOCOy=y&Bo)HOIf`EsJ_N)HZC*{_HBrlu_a z3|eI6jj9v_nh*7y8WTa&MRaRv`}a`k@lKm5H44Vdxx#<3p1yF5#)0XaF?J_lqjp>- z9-LlYbRmi{KbPLHv}NYI$6y5=yk+&t)4yrfY9aj=CMn<6mDB9EHM*?Z8l#)@CN^~i ze;|4b`H-LN+`JLXKOPs^&AWEYp=sx|Go2Yov3=&3I1_=cVo6|mot!P3|xmdAEZ|dWP5Nm9&SOJ-~QG+(JpC0 zz=LQ>HYRiF#L||lZ+@#JyOY_${=_i<=l;EkR5~?0kRHn3)3i`qqWCD+qI+@Mi0)og z;+nU?y`JqwHx$9-wQslatx(eIFad8eJGu1rb)zcXhFc|q%g*A3qpFOYWr(uNSu$%> zJt39FWd#jQe%YN)Vnb?2dT-;XM6lP!H<{ck7pWlRu6fFY&@Ol3cC%$o*-TgC9w)IR z$@y54$n02>OD{nL#W)!&nM!qUMQEM(RoS-duGnJKZJ5g!ze(M#!CNxhuODx1TnE#! zx}l*l1vTA1knSGpce0IFT84W1(>oH_2598pIkDoVw?{z&Klr;FMn;5kNyW&|bP?rzBIG`({t7It&Z z+Z!JPsr;p+q4h-(5iNFaGL08S35%w_{xp1Zv2@%kPRoiWJ18 zWpT3>xCgeXcuKC6s*9)Oipkzklm-N^sjVpiDVM8Aag&Gj!oAXbLUD$oO%Au{PTW|O zn1qh6Qqj%DQ}gbhm34Je3E1=RY@K{-@$BU0hQ*q#iby#v}H*t$h5UKlt45a+8ay246cT6Dg~LP zEzPAM)7IKj0y4O{erYMl;IO3x(Vo8#Say3+x-7Sk^HU<8bjpR>_?WY;IJ?c$T$33d z%%#`k0BQLhITg z5c_1;7C&}P63Vl#xJ`o0Z@@Rki}w_3G7b)g!C-m_7nX}uZ!TVrYn{RV^za&70-eFl z^_uMZttFjzO>{%?-bZ%8JDrRscuVp2EbdlQyS4cFR^8oD98GRx@oOROZg+A{p5mtB zHAqt|(4gCjJ2df~q67hhxy{AX+d3o;9CMQ!%5EuMYy9PUL(Um^NAYXcy1h;pKFUp} zHV@_S*|l?f@gzqs)mw|#Z8_Xo?mT-xt`o1ZPZpPX$>_q?Y#dC6{eeao`8_m*H|0(Rb496M{$*@1Lc zrH0>MTx6c7Bjfu(aqe6blP~ZHx$VU%ye78>U-=MfcNOO_JZb|2$sA%eA(<$}c;%E% z$n7X@3!*vHoTVq|tEsGxAWVeIwg9xYHrJ%S8AN6lY?Mw?rr?{=L=8-Y9 zlgZQESqd(bSUrDh2*Z{!hJpPJjpu-v7^;)*O|3Pk)tElaoo{qIcgZ)W- zCCj-popaXh(H?fF6o$KY2w&htw7jPjhAV5z-KFq-g{#xvQp~cD-Dke91dc%Ht?5tVYmh3JOLX;llYPHg3O)2ftq06fghU>-O+)xgtpjE$ zRM8{36@RnR?>tx%HlfzJtxitQ|3hXeyhHxL_hGZRLqKiOh%5*3hd@rJ)00ezHXSsJ zJ8&wbi=(F`J|fz-_Yt$WU3wweb*XM)_9JE~+!}*+PCtXMkCu$0)2-+IP)P(T8;kBu z*&dz;kkLm=;zj)Z%EwBgp4*ZG4!%e{F!-2R3TM78Ie6GCg$oXx$8e$kxLMp8h}On! zdp}{8VyW4-w=>;6{K=B|S#PuWcuA%+zpMLHNoFBWPOtZ$E{Uz>iNe!<#w^7FMv$W3 z&Ssw|?f5m-Crh%(-05WaS*I51XU$S<9^F5~p{0DTB+E>|{P>ZRvp097NXt=~yB+-f zkE{ZpFERjdX>G}*(>pis)E@ Gviu*KryVc= diff --git a/relayer-subgraph-inbox/build/contracts/deployments/arbitrumGoerli/VeaInbox.json b/relayer-subgraph-inbox/build/contracts/deployments/arbitrumGoerli/VeaInbox.json deleted file mode 100644 index 2c977152..00000000 --- a/relayer-subgraph-inbox/build/contracts/deployments/arbitrumGoerli/VeaInbox.json +++ /dev/null @@ -1,222 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "uint256", - "name": "_epochPeriod", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_veaOutbox", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "ticketId", - "type": "bytes32" - } - ], - "name": "Hearbeat", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes", - "name": "nodeData", - "type": "bytes" - } - ], - "name": "MessageSent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "stateRoot", - "type": "bytes32" - } - ], - "name": "SnapshotSaved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "epochSent", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ticketId", - "type": "bytes32" - } - ], - "name": "SnapshotSent", - "type": "event" - }, - { - "inputs": [], - "name": "ARB_SYS", - "outputs": [ - { - "internalType": "contract IArbSys", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "count", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "epochPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "inbox", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "saveSnapshot", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "sendHeartbeat", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "bytes4", - "name": "fnSelector", - "type": "bytes4" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "sendMessage", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "epochSend", - "type": "uint256" - } - ], - "name": "sendSnapshot", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "snapshots", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "veaOutbox", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/relayer-subgraph-inbox/build/contracts/deployments/arbitrumSepolia/VeaInboxArbToEthDevnet.json b/relayer-subgraph-inbox/build/contracts/deployments/arbitrumSepolia/VeaInboxArbToEthDevnet.json deleted file mode 100644 index 9fb574af..00000000 --- a/relayer-subgraph-inbox/build/contracts/deployments/arbitrumSepolia/VeaInboxArbToEthDevnet.json +++ /dev/null @@ -1,269 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "uint256", - "name": "_epochPeriod", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_veaOutboxArbToEth", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes", - "name": "_nodeData", - "type": "bytes" - } - ], - "name": "MessageSent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "_snapshot", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_epoch", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "_count", - "type": "uint64" - } - ], - "name": "SnapshotSaved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "_epochSent", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "_ticketId", - "type": "bytes32" - } - ], - "name": "SnapshotSent", - "type": "event" - }, - { - "inputs": [], - "name": "count", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_timestamp", - "type": "uint256" - } - ], - "name": "epochAt", - "outputs": [ - { - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "epochFinalized", - "outputs": [ - { - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "epochNow", - "outputs": [ - { - "internalType": "uint256", - "name": "epoch", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "epochPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "saveSnapshot", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "bytes4", - "name": "_fnSelector", - "type": "bytes4" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "sendMessage", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_epoch", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "bytes32", - "name": "stateRoot", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "claimer", - "type": "address" - }, - { - "internalType": "uint32", - "name": "timestampClaimed", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "timestampVerification", - "type": "uint32" - }, - { - "internalType": "uint32", - "name": "blocknumberVerification", - "type": "uint32" - }, - { - "internalType": "enum Party", - "name": "honest", - "type": "uint8" - }, - { - "internalType": "address", - "name": "challenger", - "type": "address" - } - ], - "internalType": "struct Claim", - "name": "_claim", - "type": "tuple" - } - ], - "name": "sendSnapshot", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "snapshots", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "veaOutboxArbToEth", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/relayer-subgraph-inbox/build/schema.graphql b/relayer-subgraph-inbox/build/schema.graphql deleted file mode 100644 index 17cb2475..00000000 --- a/relayer-subgraph-inbox/build/schema.graphql +++ /dev/null @@ -1,46 +0,0 @@ -type MessageSent @entity(immutable: true) { - id: Bytes! - nonce: BigInt! # uint64 - to: Receiver! # address - msgSender: Sender! # address - data: Bytes! # bytes - epoch: BigInt! # uint64 - node: Node! # bytes32 - blockNumber: BigInt! - blockTimestamp: BigInt! - transactionHash: Bytes! -} - -type Node @entity(immutable: true) { - id: ID! - hash: Bytes! # bytes32 -} - -type Receiver @entity(immutable: true) { - id: Bytes! - messages: [MessageSent!]! @derivedFrom(field: "to") -} - -type Sender @entity(immutable: true) { - id: Bytes! - messages: [MessageSent!]! @derivedFrom(field: "msgSender") -} - -type SnapshotSaved @entity(immutable: true) { - id: Bytes! - stateRoot: Bytes! # bytes32 - epoch: BigInt! # uint64 - count: BigInt! # uint64 - blockNumber: BigInt! - blockTimestamp: BigInt! - transactionHash: Bytes! -} - -type SnapshotSent @entity(immutable: true) { - id: Bytes! - epochSent: BigInt! # uint256 - ticketId: Bytes! # bytes32 - blockNumber: BigInt! - blockTimestamp: BigInt! - transactionHash: Bytes! -} diff --git a/relayer-subgraph-inbox/build/subgraph.yaml b/relayer-subgraph-inbox/build/subgraph.yaml deleted file mode 100644 index c698c76d..00000000 --- a/relayer-subgraph-inbox/build/subgraph.yaml +++ /dev/null @@ -1,30 +0,0 @@ -specVersion: 0.0.5 -schema: - file: schema.graphql -dataSources: - - kind: ethereum - name: VeaInbox - network: arbitrum-sepolia - source: - address: "0x77e95F54032f467eC45c48C6affc203f93858783" - abi: VeaInbox - startBlock: 18210847 - mapping: - kind: ethereum/events - apiVersion: 0.0.7 - language: wasm/assemblyscript - entities: - - MessageSent - - SnapshotSaved - - StaterootSent - abis: - - name: VeaInbox - file: contracts/deployments/arbitrumSepolia/VeaInboxArbToEthDevnet.json - eventHandlers: - - event: MessageSent(bytes) - handler: handleMessageSent - - event: SnapshotSaved(bytes32,uint256,uint64) - handler: handleSnapshotSaved - - event: SnapshotSent(indexed uint256,bytes32) - handler: handleSnapshotSent - file: VeaInbox/VeaInbox.wasm From f90b660d40f4f4c08ee7635be156ea63f271d8ff Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Sat, 9 Mar 2024 18:37:03 +0530 Subject: [PATCH 45/58] feat: read state file location from env vars --- relayer-cli/.env.dist | 4 +++- relayer-cli/src/devnetRelayExample.ts | 9 +++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/relayer-cli/.env.dist b/relayer-cli/.env.dist index 8ab6443d..3795c88c 100644 --- a/relayer-cli/.env.dist +++ b/relayer-cli/.env.dist @@ -9,4 +9,6 @@ VEAOUTBOX_ARBGOERLI_TO_GOERLI_ADDRESS=0x906dE43dBef27639b1688Ac46532a16dc07Ce410 VEAOUTBOX_ARBGOERLI_TO_CHIADO_ADDRESS=0xAb53e341121448Ae259Da8fa17f216Cb0e21199C TRANSACTION_BATCHER_CONTRACT_ADDRESS_GOERLI=0xe7953da7751063d0a41ba727c32c762d3523ade8 -TRANSACTION_BATCHER_CONTRACT_ADDRESS_CHIADO=0xcC0a08D4BCC5f91ee9a1587608f7a2975EA75d73 \ No newline at end of file +TRANSACTION_BATCHER_CONTRACT_ADDRESS_CHIADO=0xcC0a08D4BCC5f91ee9a1587608f7a2975EA75d73 + +STATE_DIR="/home/user/vea/relayer-cli/state" \ No newline at end of file diff --git a/relayer-cli/src/devnetRelayExample.ts b/relayer-cli/src/devnetRelayExample.ts index 2ebc1def..90149d09 100644 --- a/relayer-cli/src/devnetRelayExample.ts +++ b/relayer-cli/src/devnetRelayExample.ts @@ -45,9 +45,10 @@ async function initialize(chain_id: number): Promise { } fs.writeFileSync(lock_file_name, process.pid.toString(), { encoding: "utf8" }); - const state_file_name = "./state/" + chain_id + ".json"; - const state_file_name_fs_check = "./src/state/" + chain_id + ".json"; - if (!fs.existsSync(state_file_name_fs_check)) { + // STATE_DIR is absolute path of the directory where the state files are stored + // STATE_DIR must have trailing slash + const state_file = process.env.STATE_DIR + chain_id + ".json"; + if (!fs.existsSync(state_file)) { // No state file so initialize starting now const tsnow = Math.floor(Date.now() / 1000); await updateStateFile(chain_id, tsnow, 0); @@ -55,7 +56,7 @@ async function initialize(chain_id: number): Promise { // print pwd for debugging console.log(process.cwd()); - var chain_state = require(state_file_name); + var chain_state = require(state_file); let nonce = 0; if ("nonce" in chain_state) { From 57012d0f251b263511d11a58383d130a3976fe5c Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Mon, 11 Mar 2024 14:08:52 +0530 Subject: [PATCH 46/58] fix: use do while loop to run loop atleast once --- relayer-cli/src/utils/proof.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/relayer-cli/src/utils/proof.ts b/relayer-cli/src/utils/proof.ts index 49e34fa7..d7b35a7e 100644 --- a/relayer-cli/src/utils/proof.ts +++ b/relayer-cli/src/utils/proof.ts @@ -60,7 +60,8 @@ const getProofIndices = (nonce: number, count: number) => { const treeDepth = Math.ceil(Math.log2(count)); - for (let i = 0; i <= treeDepth; i++) { + let i = 0; + do { if (i == 0 && (nonce ^ 1) < count) proof.push((nonce ^ 1).toString()); // sibling else { const low = ((nonce >> i) ^ 1) << i; @@ -68,7 +69,8 @@ const getProofIndices = (nonce: number, count: number) => { if (low < count - 1) proof.push(low.toString() + "," + high.toString()); else if (low == count - 1) proof.push(low.toString()); } - } + i++; + } while (i < treeDepth); return proof; }; From b16dd319460205a49a60f73456b7e9774f193979 Mon Sep 17 00:00:00 2001 From: anmol-dhiman Date: Mon, 6 May 2024 15:50:14 +0530 Subject: [PATCH 47/58] chore(contracts): sol version update --- contracts/hardhat.config.ts | 2 +- contracts/src/arbitrumToEth/VeaInboxArbToEth.sol | 4 ++-- contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol | 6 +++--- contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol | 2 +- contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol | 4 ++-- contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol | 6 +++--- contracts/src/canonical/arbitrum/IArbSys.sol | 2 +- contracts/src/canonical/arbitrum/IBridge.sol | 2 +- contracts/src/canonical/arbitrum/IInbox.sol | 2 +- contracts/src/canonical/arbitrum/IOutbox.sol | 2 +- contracts/src/canonical/arbitrum/ISequencerInbox.sol | 2 +- contracts/src/canonical/gnosis-chain/IAMB.sol | 2 +- contracts/src/canonical/polygon/FxBaseChildTunnel.sol | 2 +- contracts/src/canonical/polygon/FxBaseRootTunnel.sol | 4 ++-- contracts/src/canonical/polygon/lib/ExitPayloadReader.sol | 2 +- contracts/src/canonical/polygon/lib/Merkle.sol | 2 +- .../src/canonical/polygon/lib/MerklePatriciaProof.sol | 2 +- contracts/src/canonical/polygon/lib/RLPReader.sol | 2 +- .../src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol | 2 +- .../arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol | 2 +- .../gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol | 2 +- contracts/src/gnosisToArbitrum/RouterGnosisToArb.sol | 2 +- contracts/src/gnosisToArbitrum/VeaInboxGnosisToArb.sol | 4 ++-- contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol | 8 ++++---- contracts/src/interfaces/gateways/IReceiverGateway.sol | 2 +- contracts/src/interfaces/gateways/ISenderGateway.sol | 2 +- contracts/src/interfaces/inboxes/IVeaInbox.sol | 2 +- contracts/src/interfaces/outboxes/IVeaOutboxOnL1.sol | 2 +- contracts/src/interfaces/outboxes/IVeaOutboxOnL2.sol | 2 +- contracts/src/interfaces/routers/IRouterToArb.sol | 2 +- contracts/src/interfaces/routers/IRouterToGnosis.sol | 2 +- contracts/src/interfaces/types/VeaClaim.sol | 2 +- .../src/interfaces/updaters/ISequencerDelayUpdatable.sol | 2 +- .../src/interfaces/updaters/ISequencerFutureUpdatable.sol | 2 +- contracts/src/merkle/MerkleProof.sol | 2 +- contracts/src/merkle/MerkleTree.sol | 2 +- contracts/src/test/ArbitrumToEth/VeaInboxMockArbToEth.sol | 2 +- .../src/test/ArbitrumToEth/VeaOutboxMockArbToEth.sol | 2 +- contracts/src/test/bridge-mocks/arbitrum/ArbSysMock.sol | 2 +- contracts/src/test/bridge-mocks/arbitrum/BridgeMock.sol | 2 +- contracts/src/test/bridge-mocks/arbitrum/InboxMock.sol | 2 +- contracts/src/test/bridge-mocks/arbitrum/OutboxMock.sol | 2 +- .../src/test/bridge-mocks/arbitrum/SequencerInboxMock.sol | 2 +- contracts/src/test/bridge-mocks/gnosis/MockAMB.sol | 2 +- contracts/src/test/gateways/IReceiverGatewayMock.sol | 2 +- contracts/src/test/gateways/ReceiverGatewayMock.sol | 2 +- contracts/src/test/gateways/SenderGatewayMock.sol | 2 +- contracts/src/test/merkle/MerkleProofExposed.sol | 2 +- contracts/src/test/merkle/MerkleTreeExposed.sol | 2 +- contracts/src/utils/L1/veaOutboxMultiChallenge.sol | 2 +- contracts/src/utils/L1/veaOutboxMultiChallengeWETH.sol | 2 +- .../src/utils/optimistic-rollups/veaInboxSaveSnapshot.sol | 2 +- contracts/src/utils/veaInboxTouch.sol | 2 +- 53 files changed, 64 insertions(+), 64 deletions(-) diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index 0fc4a2f7..981d6b47 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -17,7 +17,7 @@ dotenv.config(); const config: HardhatUserConfig = { solidity: { - version: "0.8.18", + version: "0.8.24", settings: { optimizer: { enabled: true, diff --git a/contracts/src/arbitrumToEth/VeaInboxArbToEth.sol b/contracts/src/arbitrumToEth/VeaInboxArbToEth.sol index cd6f6af9..35756e67 100644 --- a/contracts/src/arbitrumToEth/VeaInboxArbToEth.sol +++ b/contracts/src/arbitrumToEth/VeaInboxArbToEth.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../canonical/arbitrum/IArbSys.sol"; import "../interfaces/inboxes/IVeaInbox.sol"; @@ -25,7 +25,7 @@ contract VeaInboxArbToEth is IVeaInbox { uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots. address public immutable veaOutboxArbToEth; // The vea outbox on ethereum. - mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot + mapping(uint256 epoch => bytes32) public snapshots; // epoch => state root snapshot // Inbox represents minimum data availability to maintain incremental merkle tree. // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state. diff --git a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol index a434f21f..5d1ea011 100644 --- a/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol +++ b/contracts/src/arbitrumToEth/VeaOutboxArbToEth.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../canonical/arbitrum/ISequencerInbox.sol"; import "../canonical/arbitrum/IBridge.sol"; @@ -39,8 +39,8 @@ contract VeaOutboxArbToEth is IVeaOutboxOnL1 { bytes32 public stateRoot; // merkle root of the outbox state uint256 public latestVerifiedEpoch; // The latest epoch that has been verified. - mapping(uint256 => bytes32) public claimHashes; // epoch => claim - mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message + mapping(uint256 epoch => bytes32) public claimHashes; // epoch => claim + mapping(uint256 messageId => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock. SequencerDelayLimitDecreaseRequest public sequencerDelayLimitDecreaseRequest; // Decreasing the sequencerDelayLimit requires a delay to avoid griefing by sequencer, so we keep track of the request here. diff --git a/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol b/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol index 588625b5..0f110357 100644 --- a/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/RouterArbToGnosis.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../canonical/gnosis-chain/IAMB.sol"; import "../canonical/arbitrum/IBridge.sol"; diff --git a/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol b/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol index 31abf822..6327223c 100644 --- a/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/VeaInboxArbToGnosis.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../canonical/arbitrum/IArbSys.sol"; import "../interfaces/inboxes/IVeaInbox.sol"; @@ -25,7 +25,7 @@ contract VeaInboxArbToGnosis is IVeaInbox { uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots. address public immutable routerArbToGnosis; // The router on ethereum. - mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot + mapping(uint256 epoch => bytes32) public snapshots; // epoch => state root snapshot // Inbox represents minimum data availability to maintain incremental merkle tree. // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state. diff --git a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol index 78b815fa..e82feaeb 100644 --- a/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol +++ b/contracts/src/arbitrumToGnosis/VeaOutboxArbToGnosis.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../canonical/gnosis-chain/IAMB.sol"; import "../interfaces/outboxes/IVeaOutboxOnL1.sol"; @@ -40,8 +40,8 @@ contract VeaOutboxArbToGnosis is IVeaOutboxOnL1, ISequencerDelayUpdatable { bytes32 public stateRoot; // merkle root of the outbox state uint256 public latestVerifiedEpoch; // The latest epoch that has been verified. - mapping(uint256 => bytes32) public claimHashes; // epoch => claim - mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message + mapping(uint256 epoch => bytes32) public claimHashes; // epoch => claim + mapping(uint256 messageId => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message uint256 public sequencerDelayLimit; // This is MaxTimeVariation.delaySeconds from the arbitrum sequencer inbox, it is the maximum seconds the sequencer can backdate L2 txns relative to the L1 clock. uint256 public timestampDelayUpdated; // The timestamp of the last sequencer delay update. diff --git a/contracts/src/canonical/arbitrum/IArbSys.sol b/contracts/src/canonical/arbitrum/IArbSys.sol index 82b17e69..0c6d8c7c 100644 --- a/contracts/src/canonical/arbitrum/IArbSys.sol +++ b/contracts/src/canonical/arbitrum/IArbSys.sol @@ -4,7 +4,7 @@ // https://arbiscan.io/address/0x0000000000000000000000000000000000000064#code // interface is pruned for relevant function stubs -pragma solidity 0.8.18; +pragma solidity 0.8.24; ///@title System level functionality ///@notice For use by contracts to interact with core L2-specific functionality. diff --git a/contracts/src/canonical/arbitrum/IBridge.sol b/contracts/src/canonical/arbitrum/IBridge.sol index da2a5042..7d3edc88 100644 --- a/contracts/src/canonical/arbitrum/IBridge.sol +++ b/contracts/src/canonical/arbitrum/IBridge.sol @@ -4,7 +4,7 @@ // implementation: https://etherscan.io/address/0x1066cecc8880948fe55e427e94f1ff221d626591#code // interface is pruned for relevant function stubs -pragma solidity 0.8.18; +pragma solidity 0.8.24; interface IBridge { function activeOutbox() external view returns (address); diff --git a/contracts/src/canonical/arbitrum/IInbox.sol b/contracts/src/canonical/arbitrum/IInbox.sol index 5a2b9665..a6d6bc78 100644 --- a/contracts/src/canonical/arbitrum/IInbox.sol +++ b/contracts/src/canonical/arbitrum/IInbox.sol @@ -4,7 +4,7 @@ // implementation: https://etherscan.io/address/0x5aed5f8a1e3607476f1f81c3d8fe126deb0afe94 // interface is pruned for relevant function stubs -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "./IBridge.sol"; diff --git a/contracts/src/canonical/arbitrum/IOutbox.sol b/contracts/src/canonical/arbitrum/IOutbox.sol index 0a48664f..5aa358ac 100644 --- a/contracts/src/canonical/arbitrum/IOutbox.sol +++ b/contracts/src/canonical/arbitrum/IOutbox.sol @@ -4,7 +4,7 @@ // implementation: https://etherscan.io/address/0x0ea7372338a589e7f0b00e463a53aa464ef04e17#code // interface is pruned for relevant function stubs -pragma solidity 0.8.18; +pragma solidity 0.8.24; interface IOutbox { /// @notice When l2ToL1Sender returns a nonzero address, the message was originated by an L2 account diff --git a/contracts/src/canonical/arbitrum/ISequencerInbox.sol b/contracts/src/canonical/arbitrum/ISequencerInbox.sol index 888484b8..7d2d963a 100644 --- a/contracts/src/canonical/arbitrum/ISequencerInbox.sol +++ b/contracts/src/canonical/arbitrum/ISequencerInbox.sol @@ -6,7 +6,7 @@ // implementation: https://etherscan.io/address/0xD03bFe2CE83632F4E618a97299cc91B1335BB2d9#code // interface is pruned for relevant function stubs -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "./IBridge.sol"; diff --git a/contracts/src/canonical/gnosis-chain/IAMB.sol b/contracts/src/canonical/gnosis-chain/IAMB.sol index 3fccf438..b6c326a3 100644 --- a/contracts/src/canonical/gnosis-chain/IAMB.sol +++ b/contracts/src/canonical/gnosis-chain/IAMB.sol @@ -2,7 +2,7 @@ // https://github.com/omni/tokenbridge-contracts/blob/908a48107919d4ab127f9af07d44d47eac91547e/contracts/interfaces/IAMB.sol // interface is pruned for relevant function stubs -pragma solidity 0.8.18; +pragma solidity 0.8.24; interface IAMB { function requireToPassMessage(address _contract, bytes memory _data, uint256 _gas) external returns (bytes32); diff --git a/contracts/src/canonical/polygon/FxBaseChildTunnel.sol b/contracts/src/canonical/polygon/FxBaseChildTunnel.sol index 9cf931e3..7aa023a9 100644 --- a/contracts/src/canonical/polygon/FxBaseChildTunnel.sol +++ b/contracts/src/canonical/polygon/FxBaseChildTunnel.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT // https://github.com/fx-portal/contracts/blob/main/contracts/tunnel/FxBaseChildTunnel.sol -pragma solidity 0.8.18; +pragma solidity 0.8.24; // IFxMessageProcessor represents interface to process message interface IFxMessageProcessor { diff --git a/contracts/src/canonical/polygon/FxBaseRootTunnel.sol b/contracts/src/canonical/polygon/FxBaseRootTunnel.sol index 01be6ecf..db3bc652 100644 --- a/contracts/src/canonical/polygon/FxBaseRootTunnel.sol +++ b/contracts/src/canonical/polygon/FxBaseRootTunnel.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT // https://github.com/fx-portal/contracts/blob/main/contracts/tunnel/FxBaseRootTunnel.sol -pragma solidity 0.8.18; +pragma solidity 0.8.24; import {RLPReader} from "./lib/RLPReader.sol"; import {MerklePatriciaProof} from "./lib/MerklePatriciaProof.sol"; @@ -22,7 +22,7 @@ contract ICheckpointManager { /// @notice mapping of checkpoint header numbers to block details /// @dev These checkpoints are submited by plasma contracts - mapping(uint256 => HeaderBlock) public headerBlocks; + mapping(uint256 headerNumber => HeaderBlock) public headerBlocks; } ///@dev Ethereum-side abstract contract of the bidirectional Polygon/Ethereum bridge diff --git a/contracts/src/canonical/polygon/lib/ExitPayloadReader.sol b/contracts/src/canonical/polygon/lib/ExitPayloadReader.sol index a68b85d1..9e2cb0e2 100644 --- a/contracts/src/canonical/polygon/lib/ExitPayloadReader.sol +++ b/contracts/src/canonical/polygon/lib/ExitPayloadReader.sol @@ -1,4 +1,4 @@ -pragma solidity 0.8.18; +pragma solidity 0.8.24; import {RLPReader} from "./RLPReader.sol"; diff --git a/contracts/src/canonical/polygon/lib/Merkle.sol b/contracts/src/canonical/polygon/lib/Merkle.sol index 1000ae42..c5d116c2 100644 --- a/contracts/src/canonical/polygon/lib/Merkle.sol +++ b/contracts/src/canonical/polygon/lib/Merkle.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; library Merkle { function checkMembership( diff --git a/contracts/src/canonical/polygon/lib/MerklePatriciaProof.sol b/contracts/src/canonical/polygon/lib/MerklePatriciaProof.sol index 91b25d41..2f4982d4 100644 --- a/contracts/src/canonical/polygon/lib/MerklePatriciaProof.sol +++ b/contracts/src/canonical/polygon/lib/MerklePatriciaProof.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.18; +pragma solidity 0.8.24; import {RLPReader} from "./RLPReader.sol"; diff --git a/contracts/src/canonical/polygon/lib/RLPReader.sol b/contracts/src/canonical/polygon/lib/RLPReader.sol index 309057c8..61f447ac 100644 --- a/contracts/src/canonical/polygon/lib/RLPReader.sol +++ b/contracts/src/canonical/polygon/lib/RLPReader.sol @@ -1,6 +1,6 @@ /// @author Hamdi Allam hamdi.allam97@gmail.com /// Please reach out with any questions or concerns -pragma solidity 0.8.18; +pragma solidity 0.8.24; library RLPReader { uint8 constant STRING_SHORT_START = 0x80; diff --git a/contracts/src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol b/contracts/src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol index 81c9521c..8966d50e 100644 --- a/contracts/src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol +++ b/contracts/src/devnets/arbitrumToEth/VeaOutboxArbToEthDevnet.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../../arbitrumToEth/VeaOutboxArbToEth.sol"; diff --git a/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol b/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol index eede28fc..291df355 100644 --- a/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol +++ b/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../../arbitrumToGnosis/VeaOutboxArbToGnosis.sol"; diff --git a/contracts/src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol b/contracts/src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol index dea3a5d4..64bd5d39 100644 --- a/contracts/src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol +++ b/contracts/src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../../gnosisToArbitrum/VeaOutboxGnosisToArb.sol"; diff --git a/contracts/src/gnosisToArbitrum/RouterGnosisToArb.sol b/contracts/src/gnosisToArbitrum/RouterGnosisToArb.sol index e162018c..6fa979db 100644 --- a/contracts/src/gnosisToArbitrum/RouterGnosisToArb.sol +++ b/contracts/src/gnosisToArbitrum/RouterGnosisToArb.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../canonical/gnosis-chain/IAMB.sol"; import "../canonical/arbitrum/IBridge.sol"; diff --git a/contracts/src/gnosisToArbitrum/VeaInboxGnosisToArb.sol b/contracts/src/gnosisToArbitrum/VeaInboxGnosisToArb.sol index 92a78533..fd7bf26f 100644 --- a/contracts/src/gnosisToArbitrum/VeaInboxGnosisToArb.sol +++ b/contracts/src/gnosisToArbitrum/VeaInboxGnosisToArb.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../canonical/gnosis-chain/IAMB.sol"; import "../interfaces/inboxes/IVeaInbox.sol"; @@ -24,7 +24,7 @@ contract VeaInboxGnosisToArb is IVeaInbox { uint256 public immutable epochPeriod; // Epochs mark the period between potential snapshots. address public immutable routerGnosisToArb; // The router on Ethereum. - mapping(uint256 => bytes32) public snapshots; // epoch => state root snapshot + mapping(uint256 epoch => bytes32) public snapshots; // epoch => state root snapshot // Inbox represents minimum data availability to maintain incremental merkle tree. // Supports a max of 2^64 - 1 messages. See merkle tree docs for details how inbox manages state. diff --git a/contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol b/contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol index 28558cbc..c4f55539 100644 --- a/contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol +++ b/contracts/src/gnosisToArbitrum/VeaOutboxGnosisToArb.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../interfaces/outboxes/IVeaOutboxOnL2.sol"; import "../canonical/arbitrum/AddressAliasHelper.sol"; @@ -38,9 +38,9 @@ contract VeaOutboxGnosisToArb is IVeaOutboxOnL2 { bytes32 public stateRoot; // merkle root of the outbox state uint256 public latestVerifiedEpoch; // The latest epoch that has been verified. - mapping(uint256 => Claim) public claims; // epoch => claim - mapping(uint256 => address) public challengers; // epoch => challenger - mapping(uint256 => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message + mapping(uint256 epoch => Claim) public claims; // epoch => claim + mapping(uint256 epoch => address) public challengers; // epoch => challenger + mapping(uint256 messageId => bytes32) internal relayed; // msgId/256 => packed replay bitmap, preferred over a simple boolean mapping to save 15k gas per message enum Party { None, diff --git a/contracts/src/interfaces/gateways/IReceiverGateway.sol b/contracts/src/interfaces/gateways/IReceiverGateway.sol index 8fbb3a6d..4d38fa68 100644 --- a/contracts/src/interfaces/gateways/IReceiverGateway.sol +++ b/contracts/src/interfaces/gateways/IReceiverGateway.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; interface IReceiverGateway { function veaOutbox() external view returns (address); diff --git a/contracts/src/interfaces/gateways/ISenderGateway.sol b/contracts/src/interfaces/gateways/ISenderGateway.sol index 8c923540..d01ac923 100644 --- a/contracts/src/interfaces/gateways/ISenderGateway.sol +++ b/contracts/src/interfaces/gateways/ISenderGateway.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../inboxes/IVeaInbox.sol"; diff --git a/contracts/src/interfaces/inboxes/IVeaInbox.sol b/contracts/src/interfaces/inboxes/IVeaInbox.sol index 4d43a1ed..e4b4abf8 100644 --- a/contracts/src/interfaces/inboxes/IVeaInbox.sol +++ b/contracts/src/interfaces/inboxes/IVeaInbox.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; interface IVeaInbox { /// @dev Sends an arbitrary message to receiving chain. diff --git a/contracts/src/interfaces/outboxes/IVeaOutboxOnL1.sol b/contracts/src/interfaces/outboxes/IVeaOutboxOnL1.sol index 6fae0f5c..e23df7a9 100644 --- a/contracts/src/interfaces/outboxes/IVeaOutboxOnL1.sol +++ b/contracts/src/interfaces/outboxes/IVeaOutboxOnL1.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../types/VeaClaim.sol"; diff --git a/contracts/src/interfaces/outboxes/IVeaOutboxOnL2.sol b/contracts/src/interfaces/outboxes/IVeaOutboxOnL2.sol index e6fd3cc8..b493d1fa 100644 --- a/contracts/src/interfaces/outboxes/IVeaOutboxOnL2.sol +++ b/contracts/src/interfaces/outboxes/IVeaOutboxOnL2.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; /// @dev Interface of the Vea Outbox on Optimistic Rollup L2s like Arbitrum, Optimism, Base, Specular where L2 storage is inexpensive compared to L1 calldata. interface IVeaOutboxOnL2 { diff --git a/contracts/src/interfaces/routers/IRouterToArb.sol b/contracts/src/interfaces/routers/IRouterToArb.sol index 6ece2d59..693770c0 100644 --- a/contracts/src/interfaces/routers/IRouterToArb.sol +++ b/contracts/src/interfaces/routers/IRouterToArb.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; /// @dev Interface of the Vea Router intended to be deployed on an intermediary chain which routes messages to Arbitrum where calldata is the primary cost. /// eg. Gnosis (L1) -> Ethereum (L1) -> Arbitrum (L2), the IRouterToL2 will be deployed on Ethereum (L1) routing messages to Arbitrum (L2). diff --git a/contracts/src/interfaces/routers/IRouterToGnosis.sol b/contracts/src/interfaces/routers/IRouterToGnosis.sol index d795088c..c0858a6c 100644 --- a/contracts/src/interfaces/routers/IRouterToGnosis.sol +++ b/contracts/src/interfaces/routers/IRouterToGnosis.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../types/VeaClaim.sol"; diff --git a/contracts/src/interfaces/types/VeaClaim.sol b/contracts/src/interfaces/types/VeaClaim.sol index 8f9cf5fb..8f6d9d0e 100644 --- a/contracts/src/interfaces/types/VeaClaim.sol +++ b/contracts/src/interfaces/types/VeaClaim.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; enum Party { None, diff --git a/contracts/src/interfaces/updaters/ISequencerDelayUpdatable.sol b/contracts/src/interfaces/updaters/ISequencerDelayUpdatable.sol index 4cae6246..994c334d 100644 --- a/contracts/src/interfaces/updaters/ISequencerDelayUpdatable.sol +++ b/contracts/src/interfaces/updaters/ISequencerDelayUpdatable.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; /// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call. /// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerDelayUpdatable contract which receives updates from the router on Ethereum. diff --git a/contracts/src/interfaces/updaters/ISequencerFutureUpdatable.sol b/contracts/src/interfaces/updaters/ISequencerFutureUpdatable.sol index 2db1699f..ee805313 100644 --- a/contracts/src/interfaces/updaters/ISequencerFutureUpdatable.sol +++ b/contracts/src/interfaces/updaters/ISequencerFutureUpdatable.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; /// @dev Interface of a contract which is updatable, receiving parameter updates from an L1 contract through a cross-chain call. /// @dev eg. Arbitrum (L2) -> Ethereum (L1) -> Gnosis (L1), the veaOutbox on Gnosis will be an ISequencerFutureUpdatable contract which receives updates from the router on Ethereum. diff --git a/contracts/src/merkle/MerkleProof.sol b/contracts/src/merkle/MerkleProof.sol index 8505b2ef..6e1665ab 100644 --- a/contracts/src/merkle/MerkleProof.sol +++ b/contracts/src/merkle/MerkleProof.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; /// @title MerkleProof /// @author Shotaro N. - diff --git a/contracts/src/merkle/MerkleTree.sol b/contracts/src/merkle/MerkleTree.sol index ce74a9c3..b61fc139 100644 --- a/contracts/src/merkle/MerkleTree.sol +++ b/contracts/src/merkle/MerkleTree.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; /// @title MerkleTree /// @author Shotaro N. - diff --git a/contracts/src/test/ArbitrumToEth/VeaInboxMockArbToEth.sol b/contracts/src/test/ArbitrumToEth/VeaInboxMockArbToEth.sol index 6add553b..635d362c 100644 --- a/contracts/src/test/ArbitrumToEth/VeaInboxMockArbToEth.sol +++ b/contracts/src/test/ArbitrumToEth/VeaInboxMockArbToEth.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../../arbitrumToEth/VeaInboxArbToEth.sol"; diff --git a/contracts/src/test/ArbitrumToEth/VeaOutboxMockArbToEth.sol b/contracts/src/test/ArbitrumToEth/VeaOutboxMockArbToEth.sol index 98a67b4d..78af995d 100644 --- a/contracts/src/test/ArbitrumToEth/VeaOutboxMockArbToEth.sol +++ b/contracts/src/test/ArbitrumToEth/VeaOutboxMockArbToEth.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../../arbitrumToEth/VeaOutboxArbToEth.sol"; import "../../canonical/arbitrum/IArbSys.sol"; diff --git a/contracts/src/test/bridge-mocks/arbitrum/ArbSysMock.sol b/contracts/src/test/bridge-mocks/arbitrum/ArbSysMock.sol index 6ccb103e..2a805798 100644 --- a/contracts/src/test/bridge-mocks/arbitrum/ArbSysMock.sol +++ b/contracts/src/test/bridge-mocks/arbitrum/ArbSysMock.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../../../canonical/arbitrum/IArbSys.sol"; diff --git a/contracts/src/test/bridge-mocks/arbitrum/BridgeMock.sol b/contracts/src/test/bridge-mocks/arbitrum/BridgeMock.sol index 8975a046..f4dd232f 100644 --- a/contracts/src/test/bridge-mocks/arbitrum/BridgeMock.sol +++ b/contracts/src/test/bridge-mocks/arbitrum/BridgeMock.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../../../canonical/arbitrum/IBridge.sol"; diff --git a/contracts/src/test/bridge-mocks/arbitrum/InboxMock.sol b/contracts/src/test/bridge-mocks/arbitrum/InboxMock.sol index 2a44093a..e4cc0ecb 100644 --- a/contracts/src/test/bridge-mocks/arbitrum/InboxMock.sol +++ b/contracts/src/test/bridge-mocks/arbitrum/InboxMock.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../../../canonical/arbitrum/IInbox.sol"; diff --git a/contracts/src/test/bridge-mocks/arbitrum/OutboxMock.sol b/contracts/src/test/bridge-mocks/arbitrum/OutboxMock.sol index 004d7b73..8650187a 100644 --- a/contracts/src/test/bridge-mocks/arbitrum/OutboxMock.sol +++ b/contracts/src/test/bridge-mocks/arbitrum/OutboxMock.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../../../canonical/arbitrum/IOutbox.sol"; diff --git a/contracts/src/test/bridge-mocks/arbitrum/SequencerInboxMock.sol b/contracts/src/test/bridge-mocks/arbitrum/SequencerInboxMock.sol index b2dc3e3e..aa898f47 100644 --- a/contracts/src/test/bridge-mocks/arbitrum/SequencerInboxMock.sol +++ b/contracts/src/test/bridge-mocks/arbitrum/SequencerInboxMock.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../../../canonical/arbitrum/ISequencerInbox.sol"; diff --git a/contracts/src/test/bridge-mocks/gnosis/MockAMB.sol b/contracts/src/test/bridge-mocks/gnosis/MockAMB.sol index ad137d76..c80a5030 100644 --- a/contracts/src/test/bridge-mocks/gnosis/MockAMB.sol +++ b/contracts/src/test/bridge-mocks/gnosis/MockAMB.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT // https://github.com/poanetwork/tokenbridge-contracts/blob/master/contracts/mocks/AMBMock.sol -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../../../canonical/gnosis-chain/IAMB.sol"; diff --git a/contracts/src/test/gateways/IReceiverGatewayMock.sol b/contracts/src/test/gateways/IReceiverGatewayMock.sol index 3d9e4934..961c842f 100644 --- a/contracts/src/test/gateways/IReceiverGatewayMock.sol +++ b/contracts/src/test/gateways/IReceiverGatewayMock.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../../interfaces/gateways/IReceiverGateway.sol"; diff --git a/contracts/src/test/gateways/ReceiverGatewayMock.sol b/contracts/src/test/gateways/ReceiverGatewayMock.sol index e808bf53..e8d43ecf 100644 --- a/contracts/src/test/gateways/ReceiverGatewayMock.sol +++ b/contracts/src/test/gateways/ReceiverGatewayMock.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "./IReceiverGatewayMock.sol"; diff --git a/contracts/src/test/gateways/SenderGatewayMock.sol b/contracts/src/test/gateways/SenderGatewayMock.sol index 0a416c09..a37770dc 100644 --- a/contracts/src/test/gateways/SenderGatewayMock.sol +++ b/contracts/src/test/gateways/SenderGatewayMock.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "./IReceiverGatewayMock.sol"; import "../../interfaces/gateways/ISenderGateway.sol"; diff --git a/contracts/src/test/merkle/MerkleProofExposed.sol b/contracts/src/test/merkle/MerkleProofExposed.sol index d37ef078..29405373 100644 --- a/contracts/src/test/merkle/MerkleProofExposed.sol +++ b/contracts/src/test/merkle/MerkleProofExposed.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../../merkle/MerkleProof.sol"; diff --git a/contracts/src/test/merkle/MerkleTreeExposed.sol b/contracts/src/test/merkle/MerkleTreeExposed.sol index 91023746..8cd1c211 100644 --- a/contracts/src/test/merkle/MerkleTreeExposed.sol +++ b/contracts/src/test/merkle/MerkleTreeExposed.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../../merkle/MerkleTree.sol"; diff --git a/contracts/src/utils/L1/veaOutboxMultiChallenge.sol b/contracts/src/utils/L1/veaOutboxMultiChallenge.sol index 4069a594..83e1e16e 100644 --- a/contracts/src/utils/L1/veaOutboxMultiChallenge.sol +++ b/contracts/src/utils/L1/veaOutboxMultiChallenge.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; /// @dev Vea Inbox Calldata Optimization. /// No function selector required, only fallback function. diff --git a/contracts/src/utils/L1/veaOutboxMultiChallengeWETH.sol b/contracts/src/utils/L1/veaOutboxMultiChallengeWETH.sol index 83058c82..43730145 100644 --- a/contracts/src/utils/L1/veaOutboxMultiChallengeWETH.sol +++ b/contracts/src/utils/L1/veaOutboxMultiChallengeWETH.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../../interfaces/tokens/gnosis/IWETH.sol"; diff --git a/contracts/src/utils/optimistic-rollups/veaInboxSaveSnapshot.sol b/contracts/src/utils/optimistic-rollups/veaInboxSaveSnapshot.sol index 4bd941e4..06f4476e 100644 --- a/contracts/src/utils/optimistic-rollups/veaInboxSaveSnapshot.sol +++ b/contracts/src/utils/optimistic-rollups/veaInboxSaveSnapshot.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../../interfaces/inboxes/IVeaInbox.sol"; diff --git a/contracts/src/utils/veaInboxTouch.sol b/contracts/src/utils/veaInboxTouch.sol index 1e82f848..15049e52 100644 --- a/contracts/src/utils/veaInboxTouch.sol +++ b/contracts/src/utils/veaInboxTouch.sol @@ -6,7 +6,7 @@ /// @custom:bounties: [] /// @custom:deployments: [] -pragma solidity 0.8.18; +pragma solidity 0.8.24; import "../interfaces/inboxes/IVeaInbox.sol"; From 3150ee525bdac9c132205655f37c3e3ca3dd3b78 Mon Sep 17 00:00:00 2001 From: anmol-dhiman Date: Mon, 6 May 2024 16:03:33 +0530 Subject: [PATCH 48/58] chore(contract): oz version update --- contracts/package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contracts/package.json b/contracts/package.json index 928f34e4..3aede706 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -102,6 +102,6 @@ "typescript": "^4.9.5" }, "dependencies": { - "@openzeppelin/contracts": "^4.8.3" + "@openzeppelin/contracts": "^5.0.2" } } diff --git a/yarn.lock b/yarn.lock index b0d8ed73..ac34b3f5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3373,7 +3373,7 @@ __metadata: "@nomicfoundation/hardhat-chai-matchers": ^1.0.6 "@nomicfoundation/hardhat-network-helpers": ^1.0.8 "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@0.3.0-beta.13" - "@openzeppelin/contracts": ^4.8.3 + "@openzeppelin/contracts": ^5.0.2 "@typechain/ethers-v5": ^10.2.0 "@typechain/hardhat": ^6.1.5 "@types/chai": ^4.3.5 @@ -4100,10 +4100,10 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/contracts@npm:^4.8.3": - version: 4.8.3 - resolution: "@openzeppelin/contracts@npm:4.8.3" - checksum: aea130d38d46840c5cbe3adbaa9a7ac645e4bd66ad3f3baf2fa78588c408d1a686170b3408c9e2e5e05530fba22ecdc00d7efb6b27852a8b29f91accbc0af255 +"@openzeppelin/contracts@npm:^5.0.2": + version: 5.0.2 + resolution: "@openzeppelin/contracts@npm:5.0.2" + checksum: 0cce6fc284bd1d89e2a447027832a62f1356b44ee31088899453e10349a63a62df2f07da63d76e4c41aad9c86b96b650b2b6fc85439ef276850dda1170a047fd languageName: node linkType: hard From 82fb3f7b7c0d8173987307042c034219bd27fc31 Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Mon, 20 May 2024 19:09:32 +0530 Subject: [PATCH 49/58] chore: replace goerli with sepolia --- .../VeaOutboxArbToGnosisDevnet.sol | 2 +- .../VeaOutboxGnosisToArbDevnet.sol | 4 +- relayer-cli/.env.dist | 12 +- services/graph-node/docker-compose.yml | 9 +- validator-cli/src/ArbToEth/watcher.ts | 4 +- .../src/devnet/arbToChiado/happyPath.ts | 14 +- veascan-subgraph-inbox/README.md | 6 +- veascan-subgraph-inbox/scripts/update.sh | 4 +- veascan-subgraph-outbox/README.md | 10 +- veascan-subgraph-outbox/package.json | 2 +- veascan-subgraph-outbox/scripts/update.sh | 4 +- veascan-web/package.json | 5 +- veascan-web/src/consts/bridges.ts | 18 +- yarn.lock | 179 +++++++++++++++++- 14 files changed, 220 insertions(+), 53 deletions(-) diff --git a/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol b/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol index 291df355..a8af8d85 100644 --- a/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol +++ b/contracts/src/devnets/arbitrumToGnosis/VeaOutboxArbToGnosisDevnet.sol @@ -10,7 +10,7 @@ pragma solidity 0.8.24; import "../../arbitrumToGnosis/VeaOutboxArbToGnosis.sol"; -/// @dev Vea Outbox From ArbitrumGoerli to Chiado. +/// @dev Vea Outbox From ArbitrumSepolia to Chiado. /// Note: This contract is deployed on Chiado. /// Note: This contract is permissioned for developer testing (devnet). contract VeaOutboxArbToGnosisDevnet is VeaOutboxArbToGnosis { diff --git a/contracts/src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol b/contracts/src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol index 64bd5d39..13645953 100644 --- a/contracts/src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol +++ b/contracts/src/devnets/gnosisToArbitrum/VeaOutboxGnosisToArbDevnet.sol @@ -10,8 +10,8 @@ pragma solidity 0.8.24; import "../../gnosisToArbitrum/VeaOutboxGnosisToArb.sol"; -/// @dev Vea Outbox From Chiado to ArbitrumGoerli. -/// Note: This contract is deployed on ArbitrumGoerli. +/// @dev Vea Outbox From Chiado to ArbitrumSepolia. +/// Note: This contract is deployed on ArbitrumSepolia. /// Note: This contract is permissioned for developer testing (devnet). contract VeaOutboxGnosisToArbDevnet is VeaOutboxGnosisToArb { address public devnetOperator; // permissioned devnet operator diff --git a/relayer-cli/.env.dist b/relayer-cli/.env.dist index 3795c88c..b2df5802 100644 --- a/relayer-cli/.env.dist +++ b/relayer-cli/.env.dist @@ -1,14 +1,14 @@ PRIVATE_KEY= RPC_CHIADO=https://rpc.chiadochain.net -RPC_GOERLI= +RPC_SEPOLIA= -VEAINBOX_ARBGOERLI_TO_GOERLI_ADDRESS=0x906dE43dBef27639b1688Ac46532a16dc07Ce410 -VEAINBOX_ARBGOERLI_TO_CHIADO_ADDRESS=0xAb53e341121448Ae259Da8fa17f216Cb0e21199C -VEAOUTBOX_ARBGOERLI_TO_GOERLI_ADDRESS=0x906dE43dBef27639b1688Ac46532a16dc07Ce410 -VEAOUTBOX_ARBGOERLI_TO_CHIADO_ADDRESS=0xAb53e341121448Ae259Da8fa17f216Cb0e21199C +VEAINBOX_ARBSEPOLIA_TO_SEPOLIA_ADDRESS=0x906dE43dBef27639b1688Ac46532a16dc07Ce410 +VEAINBOX_ARBSEPOLIA_TO_CHIADO_ADDRESS=0xAb53e341121448Ae259Da8fa17f216Cb0e21199C +VEAOUTBOX_ARBSEPOLIA_TO_SEPOLIA_ADDRESS=0x906dE43dBef27639b1688Ac46532a16dc07Ce410 +VEAOUTBOX_ARBSEPOLIA_TO_CHIADO_ADDRESS=0xAb53e341121448Ae259Da8fa17f216Cb0e21199C -TRANSACTION_BATCHER_CONTRACT_ADDRESS_GOERLI=0xe7953da7751063d0a41ba727c32c762d3523ade8 +TRANSACTION_BATCHER_CONTRACT_ADDRESS_SEPOLIA=0xe7953da7751063d0a41ba727c32c762d3523ade8 TRANSACTION_BATCHER_CONTRACT_ADDRESS_CHIADO=0xcC0a08D4BCC5f91ee9a1587608f7a2975EA75d73 STATE_DIR="/home/user/vea/relayer-cli/state" \ No newline at end of file diff --git a/services/graph-node/docker-compose.yml b/services/graph-node/docker-compose.yml index 56b590ba..3f7df6ee 100644 --- a/services/graph-node/docker-compose.yml +++ b/services/graph-node/docker-compose.yml @@ -17,8 +17,7 @@ services: postgres_pass: let-me-in postgres_db: graph-node ipfs: "ipfs:5001" - ethereum: "arbitrum-goerli:https://goerli-rollup.arbitrum.io/rpc goerli:https://rpc.ankr.com/eth_goerli" - #ethereum: "arbitrum-goerli:https://goerli-rollup.arbitrum.io/rpc goerli:https://rpc.ankr.com/eth_goerli chiado:https://rpc.chiadochain.net gnosischain:https://rpc.ankr.com/gnosis mainnet:https://rpc.ankr.com/eth" + ethereum: "arbitrum-sepolia:https://sepolia-rollup.arbitrum.io/rpc sepolia:https://rpc.ankr.com/eth_sepolia chiado:https://rpc.chiadochain.net gnosischain:https://rpc.ankr.com/gnosis mainnet:https://rpc.ankr.com/eth" GRAPH_LOG: debug extra_hosts: - "host.docker.internal:host-gateway" @@ -32,11 +31,7 @@ services: image: postgres ports: - "5432:5432" - command: - [ - "postgres", - "-cshared_preload_libraries=pg_stat_statements" - ] + command: ["postgres", "-cshared_preload_libraries=pg_stat_statements"] environment: POSTGRES_USER: graph-node POSTGRES_PASSWORD: let-me-in diff --git a/validator-cli/src/ArbToEth/watcher.ts b/validator-cli/src/ArbToEth/watcher.ts index f2229d72..64d771e2 100644 --- a/validator-cli/src/ArbToEth/watcher.ts +++ b/validator-cli/src/ArbToEth/watcher.ts @@ -26,8 +26,8 @@ const watch = async () => { const flashbotsProvider = await FlashbotsBundleProvider.create( providerEth, // a normal ethers.js provider, to perform gas estimiations and nonce lookups authSigner, // ethers.js signer wallet, only for signing request payloads, not transactions - "https://relay-goerli.flashbots.net/", - "goerli" + "https://relay-sepolia.flashbots.net/", + "sepolia" ); const veaInbox = VeaInboxArbToEth__factory.connect(process.env.VEAINBOX_ARB_TO_ETH_ADDRESS, signerArb); diff --git a/validator-cli/src/devnet/arbToChiado/happyPath.ts b/validator-cli/src/devnet/arbToChiado/happyPath.ts index 37a24971..daf0ed9a 100644 --- a/validator-cli/src/devnet/arbToChiado/happyPath.ts +++ b/validator-cli/src/devnet/arbToChiado/happyPath.ts @@ -3,14 +3,20 @@ import { happyPath, initialize } from "../../utils/devnet"; require("dotenv").config(); (async () => { - let [veaInboxArbGoerliToGoerli, epochPeriod, lastSavedCount, veaOutboxGoerli, deposit] = await initialize( - process.env.VEAOUTBOX_ARBGOERLI_TO_CHIADO_ADDRESS, - process.env.VEAINBOX_ARBGOERLI_TO_CHIADO_ADDRESS, + let [veaInboxArbSepoliaToSepolia, epochPeriod, lastSavedCount, veaOutboxSepolia, deposit] = await initialize( + process.env.VEAOUTBOX_ARBSEPOLIA_TO_CHIADO_ADDRESS, + process.env.VEAINBOX_ARBSEPOLIA_TO_CHIADO_ADDRESS, process.env.RPC_CHIADO ); while (1) { - lastSavedCount = await happyPath(veaInboxArbGoerliToGoerli, epochPeriod, lastSavedCount, veaOutboxGoerli, deposit); + lastSavedCount = await happyPath( + veaInboxArbSepoliaToSepolia, + epochPeriod, + lastSavedCount, + veaOutboxSepolia, + deposit + ); const currentTS = Math.floor(Date.now() / 1000); const delayAmount = (epochPeriod - (currentTS % epochPeriod)) * 1000 + 30000; console.log("waiting for the next epoch. . .", Math.floor(delayAmount / 1000), "seconds"); diff --git a/veascan-subgraph-inbox/README.md b/veascan-subgraph-inbox/README.md index 9a4e6dec..10530edf 100644 --- a/veascan-subgraph-inbox/README.md +++ b/veascan-subgraph-inbox/README.md @@ -2,10 +2,10 @@ ## Deployments -### Arbitrum Goerli (hosted service) +### Arbitrum Sepolia (hosted service) -- [Subgraph explorer](https://thegraph.com/explorer/subgraph/kleros/veascan-inbox-arbitrumgoerli) -- [Subgraph endpoints](https://api.thegraph.com/subgraphs/name/kleros/veascan-inbox-arbitrumgoerli) +- [Subgraph explorer](https://thegraph.com/explorer/subgraph/kleros/veascan-inbox-arbitrumsepolia) +- [Subgraph endpoints](https://api.thegraph.com/subgraphs/name/kleros/veascan-inbox-arbitrumsepolia) ## Build diff --git a/veascan-subgraph-inbox/scripts/update.sh b/veascan-subgraph-inbox/scripts/update.sh index 4aad15c0..53a5fc14 100644 --- a/veascan-subgraph-inbox/scripts/update.sh +++ b/veascan-subgraph-inbox/scripts/update.sh @@ -16,8 +16,8 @@ function update() #file #dataSourceIndex #graphNetwork yq -i ".dataSources[$dataSourceIndex].source.startBlock=$blockNumber" "$SCRIPT_DIR"/../subgraph.yaml } -hardhatNetwork=${1:-arbitrumGoerli} -graphNetwork=${2:-arbitrum\-goerli} +hardhatNetwork=${1:-arbitrumSepolia} +graphNetwork=${2:-arbitrum\-sepolia} i=0 # backup diff --git a/veascan-subgraph-outbox/README.md b/veascan-subgraph-outbox/README.md index 380b4b0d..791afcd1 100644 --- a/veascan-subgraph-outbox/README.md +++ b/veascan-subgraph-outbox/README.md @@ -2,10 +2,10 @@ ## Deployments -### Goerli (hosted service) +### Sepolia (hosted service) -- [Subgraph explorer](https://thegraph.com/explorer/subgraph/kleros/veascan-outbox-goerli) -- [Subgraph endpoints](https://api.thegraph.com/subgraphs/name/kleros/veascan-outbox-goerli) +- [Subgraph explorer](https://thegraph.com/explorer/subgraph/kleros/veascan-outbox-sepolia) +- [Subgraph endpoints](https://api.thegraph.com/subgraphs/name/kleros/veascan-outbox-sepolia) ## Chiado (GoldSky) @@ -26,7 +26,7 @@ $ yarn build This script updates `subgraph.yml` by parsing the deployment artifacts in `../contracts/deployments`. ```bash -yarn update:goerli +yarn update:sepolia yarn update:chiado ``` @@ -44,7 +44,7 @@ $ yarn run graph auth --product hosted-service ### Deployment ```bash -yarn deploy:goerli +yarn deploy:sepolia ``` ## Deployment to Chiado via GoldSky diff --git a/veascan-subgraph-outbox/package.json b/veascan-subgraph-outbox/package.json index b26dc3e7..e7eb275c 100644 --- a/veascan-subgraph-outbox/package.json +++ b/veascan-subgraph-outbox/package.json @@ -10,7 +10,7 @@ "yarn": "3.3.1" }, "scripts": { - "update:goerli": "./scripts/update.sh goerli goerli ArbToEthDevnet", + "update:sepolia": "./scripts/update.sh sepolia sepolia ArbToEthDevnet", "update:chiado": "./scripts/update.sh chiado chiado ArbToGnosisDevnet", "codegen": "graph codegen", "build": "graph build", diff --git a/veascan-subgraph-outbox/scripts/update.sh b/veascan-subgraph-outbox/scripts/update.sh index 35209ac9..97feffbc 100755 --- a/veascan-subgraph-outbox/scripts/update.sh +++ b/veascan-subgraph-outbox/scripts/update.sh @@ -18,8 +18,8 @@ function update() #file #dataSourceIndex #graphNetwork yq -i ".dataSources[$dataSourceIndex].source.startBlock=$blockNumber" "$SCRIPT_DIR"/../subgraph.yaml } -hardhatNetwork=${1:-goerli} -graphNetwork=${2:-goerli} +hardhatNetwork=${1:-sepolia} +graphNetwork=${2:-sepolia} contractFileSuffix=${3:-ArbToEthDevnet} i=0 diff --git a/veascan-web/package.json b/veascan-web/package.json index 145a2425..61feb183 100644 --- a/veascan-web/package.json +++ b/veascan-web/package.json @@ -15,7 +15,7 @@ "license": "MIT", "packageManager": "yarn@3.3.1", "volta": { - "node": "16.19.0", + "node": "16.20.0", "yarn": "3.3.1" }, "alias": { @@ -71,7 +71,8 @@ "@kleros/vea-contracts": "workspace:^", "@sentry/react": "^7.37.2", "@sentry/tracing": "^7.37.2", - "@wagmi/chains": "^0.2.18", + "@wagmi/chains": "^1.8.0", + "@wagmi/core": "^2.10.2", "core-js": "^3.30.1", "ethers": "^5.7.2", "graphql": "^16.6.0", diff --git a/veascan-web/src/consts/bridges.ts b/veascan-web/src/consts/bridges.ts index d3eb79a6..21b2e51f 100644 --- a/veascan-web/src/consts/bridges.ts +++ b/veascan-web/src/consts/bridges.ts @@ -1,6 +1,6 @@ -import VeaInboxArbitrumGoerli from "@kleros/vea-contracts/deployments/arbitrumSepolia/VeaInboxArbToEthDevnet.json"; -import VeaOutboxGoerli from "@kleros/vea-contracts/deployments/sepolia/VeaOutboxArbToEthDevnet.json"; -import { Chain, arbitrumGoerli, goerli } from "@wagmi/chains"; +import VeaInboxArbitrumSepolia from "@kleros/vea-contracts/deployments/arbitrumSepolia/VeaInboxArbToEthDevnet.json"; +import VeaOutboxSepolia from "@kleros/vea-contracts/deployments/sepolia/VeaOutboxArbToEthDevnet.json"; +import { Chain, arbitrumSepolia, sepolia } from "@wagmi/core/chains"; import Arbitrum from "tsx:svgs/chains/arbitrum.svg"; import Ethereum from "tsx:svgs/chains/ethereum.svg"; @@ -9,8 +9,8 @@ export interface IChain extends Chain { } export const supportedChains = [ - { ...arbitrumGoerli, logo: Arbitrum }, - { ...goerli, logo: Ethereum }, + { ...arbitrumSepolia, logo: Arbitrum }, + { ...sepolia, logo: Ethereum }, ]; export const getChain = (id: number): IChain => @@ -27,12 +27,12 @@ interface IBridge { export const bridges: IBridge[] = [ { - from: arbitrumGoerli.id, - to: goerli.id, - inboxAddress: VeaInboxArbitrumGoerli.address as `0x${string}`, + from: arbitrumSepolia.id, + to: sepolia.id, + inboxAddress: VeaInboxArbitrumSepolia.address as `0x${string}`, inboxEndpoint: "https://api.studio.thegraph.com/query/67213/veascan-inbox-arb-sep-devnet/version/latest", - outboxAddress: VeaOutboxGoerli.address as `0x${string}`, + outboxAddress: VeaOutboxSepolia.address as `0x${string}`, outboxEndpoint: "https://api.studio.thegraph.com/query/67213/veascan-outbox-arb-sep-devnet/version/latest", }, diff --git a/yarn.lock b/yarn.lock index ac34b3f5..b6a7d349 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,6 +5,13 @@ __metadata: version: 6 cacheKey: 8 +"@adraffy/ens-normalize@npm:1.10.0": + version: 1.10.0 + resolution: "@adraffy/ens-normalize@npm:1.10.0" + checksum: af0540f963a2632da2bbc37e36ea6593dcfc607b937857133791781e246d47f870d5e3d21fa70d5cfe94e772c284588c81ea3f5b7f4ea8fbb824369444e4dbcb + languageName: node + linkType: hard + "@ampproject/remapping@npm:^2.2.0": version: 2.2.0 resolution: "@ampproject/remapping@npm:2.2.0" @@ -3489,7 +3496,8 @@ __metadata: "@typescript-eslint/eslint-plugin": ^5.59.1 "@typescript-eslint/parser": ^5.59.1 "@typescript-eslint/utils": ^5.59.1 - "@wagmi/chains": ^0.2.18 + "@wagmi/chains": ^1.8.0 + "@wagmi/core": ^2.10.2 core-js: ^3.30.1 eslint: ^8.39.0 eslint-config-prettier: ^8.8.0 @@ -3661,6 +3669,15 @@ __metadata: languageName: node linkType: hard +"@noble/curves@npm:1.2.0, @noble/curves@npm:~1.2.0": + version: 1.2.0 + resolution: "@noble/curves@npm:1.2.0" + dependencies: + "@noble/hashes": 1.3.2 + checksum: bb798d7a66d8e43789e93bc3c2ddff91a1e19fdb79a99b86cd98f1e5eff0ee2024a2672902c2576ef3577b6f282f3b5c778bebd55761ddbb30e36bf275e83dd0 + languageName: node + linkType: hard + "@noble/hashes@npm:1.2.0, @noble/hashes@npm:~1.2.0": version: 1.2.0 resolution: "@noble/hashes@npm:1.2.0" @@ -3668,6 +3685,20 @@ __metadata: languageName: node linkType: hard +"@noble/hashes@npm:1.3.2": + version: 1.3.2 + resolution: "@noble/hashes@npm:1.3.2" + checksum: fe23536b436539d13f90e4b9be843cc63b1b17666a07634a2b1259dded6f490be3d050249e6af98076ea8f2ea0d56f578773c2197f2aa0eeaa5fba5bc18ba474 + languageName: node + linkType: hard + +"@noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.2": + version: 1.3.3 + resolution: "@noble/hashes@npm:1.3.3" + checksum: 8a6496d1c0c64797339bc694ad06cdfaa0f9e56cd0c3f68ae3666cfb153a791a55deb0af9c653c7ed2db64d537aa3e3054629740d2f2338bb1dcb7ab60cd205b + languageName: node + linkType: hard + "@noble/secp256k1@npm:1.7.1, @noble/secp256k1@npm:~1.7.0": version: 1.7.1 resolution: "@noble/secp256k1@npm:1.7.1" @@ -4947,6 +4978,13 @@ __metadata: languageName: node linkType: hard +"@scure/base@npm:~1.1.2": + version: 1.1.6 + resolution: "@scure/base@npm:1.1.6" + checksum: d6deaae91deba99e87939af9e55d80edba302674983f32bba57f942e22b1726a83c62dc50d8f4370a5d5d35a212dda167fb169f4b0d0c297488d8604608fc3d3 + languageName: node + linkType: hard + "@scure/bip32@npm:1.1.5": version: 1.1.5 resolution: "@scure/bip32@npm:1.1.5" @@ -4958,6 +4996,17 @@ __metadata: languageName: node linkType: hard +"@scure/bip32@npm:1.3.2": + version: 1.3.2 + resolution: "@scure/bip32@npm:1.3.2" + dependencies: + "@noble/curves": ~1.2.0 + "@noble/hashes": ~1.3.2 + "@scure/base": ~1.1.2 + checksum: c5ae84fae43490853693b481531132b89e056d45c945fc8b92b9d032577f753dfd79c5a7bbcbf0a7f035951006ff0311b6cf7a389e26c9ec6335e42b20c53157 + languageName: node + linkType: hard + "@scure/bip39@npm:1.1.1": version: 1.1.1 resolution: "@scure/bip39@npm:1.1.1" @@ -4968,6 +5017,16 @@ __metadata: languageName: node linkType: hard +"@scure/bip39@npm:1.2.1": + version: 1.2.1 + resolution: "@scure/bip39@npm:1.2.1" + dependencies: + "@noble/hashes": ~1.3.0 + "@scure/base": ~1.1.0 + checksum: c5bd6f1328fdbeae2dcdd891825b1610225310e5e62a4942714db51066866e4f7bef242c7b06a1b9dcc8043a4a13412cf5c5df76d3b10aa9e36b82e9b6e3eeaa + languageName: node + linkType: hard + "@sentry-internal/tracing@npm:7.50.0": version: 7.50.0 resolution: "@sentry-internal/tracing@npm:7.50.0" @@ -6007,15 +6066,35 @@ __metadata: languageName: node linkType: hard -"@wagmi/chains@npm:^0.2.18": - version: 0.2.18 - resolution: "@wagmi/chains@npm:0.2.18" +"@wagmi/chains@npm:^1.8.0": + version: 1.8.0 + resolution: "@wagmi/chains@npm:1.8.0" + peerDependencies: + typescript: ">=5.0.4" + peerDependenciesMeta: + typescript: + optional: true + checksum: 58747962140d85fa2e2d54369efbfb0e281315bdd858f0f39b13b5a8f10fa0a5fbad8e2ac7d9f9fd2692f6a650c84a8a01abea300716802c2c1e028f6c8a73ae + languageName: node + linkType: hard + +"@wagmi/core@npm:^2.10.2": + version: 2.10.2 + resolution: "@wagmi/core@npm:2.10.2" + dependencies: + eventemitter3: 5.0.1 + mipd: 0.0.5 + zustand: 4.4.1 peerDependencies: - typescript: ">=4.9.4" + "@tanstack/query-core": ">=5.0.0" + typescript: ">=5.0.4" + viem: 2.x peerDependenciesMeta: + "@tanstack/query-core": + optional: true typescript: optional: true - checksum: 3e88d3dc6e1e397fffae61029bcd5b73e260c3a7aedf4ee3f878cea6fd558b688f00860c1afa831243c4bb88e198fd2ec7c23371c053961664fd8fc2929529b2 + checksum: a738aea155f662da2e538c3ba8ee2556eb317abc8a1bcac1e3d3002300dd65a7c7d7fa414419d8a306e0612c47e226368cacb88111b7071cd01366672a3394d0 languageName: node linkType: hard @@ -6306,6 +6385,21 @@ __metadata: languageName: node linkType: hard +"abitype@npm:0.9.8": + version: 0.9.8 + resolution: "abitype@npm:0.9.8" + peerDependencies: + typescript: ">=5.0.4" + zod: ^3 >=3.19.1 + peerDependenciesMeta: + typescript: + optional: true + zod: + optional: true + checksum: d7d887f29d6821e3f7a400de9620511b80ead3f85c5c87308aaec97965d3493e6687ed816e88722b4f512249bd66dee9e69231b49af0e1db8f69400a62c87cf6 + languageName: node + linkType: hard + "abort-controller@npm:^3.0.0": version: 3.0.0 resolution: "abort-controller@npm:3.0.0" @@ -10749,6 +10843,13 @@ __metadata: languageName: node linkType: hard +"eventemitter3@npm:5.0.1": + version: 5.0.1 + resolution: "eventemitter3@npm:5.0.1" + checksum: 543d6c858ab699303c3c32e0f0f47fc64d360bf73c3daf0ac0b5079710e340d6fe9f15487f94e66c629f5f82cd1a8678d692f3dbb6f6fcd1190e1b97fcad36f8 + languageName: node + linkType: hard + "events@npm:^3.2.0": version: 3.3.0 resolution: "events@npm:3.3.0" @@ -13818,6 +13919,15 @@ __metadata: languageName: node linkType: hard +"isows@npm:1.0.3": + version: 1.0.3 + resolution: "isows@npm:1.0.3" + peerDependencies: + ws: "*" + checksum: 9cacd5cf59f67deb51e825580cd445ab1725ecb05a67c704050383fb772856f3cd5e7da8ad08f5a3bd2823680d77d099459d0c6a7037972a74d6429af61af440 + languageName: node + linkType: hard + "isstream@npm:~0.1.2": version: 0.1.2 resolution: "isstream@npm:0.1.2" @@ -15516,6 +15626,20 @@ __metadata: languageName: node linkType: hard +"mipd@npm:0.0.5": + version: 0.0.5 + resolution: "mipd@npm:0.0.5" + dependencies: + viem: ^1.1.4 + peerDependencies: + typescript: ">=5.0.4" + peerDependenciesMeta: + typescript: + optional: true + checksum: 920b3afb3a92daeb66685adb746211ac4268ff805392a2f6e1da2703c43aa5835e5ad7be9d0312582a348d4c764ae3c81ab39362b66607ba0d54032def0038f1 + languageName: node + linkType: hard + "mkdirp-promise@npm:^5.0.1": version: 5.0.1 resolution: "mkdirp-promise@npm:5.0.1" @@ -21133,7 +21257,7 @@ __metadata: languageName: node linkType: hard -"use-sync-external-store@npm:^1.2.0": +"use-sync-external-store@npm:1.2.0, use-sync-external-store@npm:^1.2.0": version: 1.2.0 resolution: "use-sync-external-store@npm:1.2.0" peerDependencies: @@ -21333,6 +21457,27 @@ __metadata: languageName: node linkType: hard +"viem@npm:^1.1.4": + version: 1.21.4 + resolution: "viem@npm:1.21.4" + dependencies: + "@adraffy/ens-normalize": 1.10.0 + "@noble/curves": 1.2.0 + "@noble/hashes": 1.3.2 + "@scure/bip32": 1.3.2 + "@scure/bip39": 1.2.1 + abitype: 0.9.8 + isows: 1.0.3 + ws: 8.13.0 + peerDependencies: + typescript: ">=5.0.4" + peerDependenciesMeta: + typescript: + optional: true + checksum: c351fdea2d53d2d781ac73c964348b3b9fc5dd46f9eb53903e867705fc9e30a893cb9f2c8d7a00acdcdeca27d14eeebf976eed9f948c28c47018dc9211369117 + languageName: node + linkType: hard + "vizion@npm:~2.2.1": version: 2.2.1 resolution: "vizion@npm:2.2.1" @@ -22462,3 +22607,23 @@ __metadata: checksum: f702a3437f48a8d42c4bb35b8dd13671a168aadfc4e23ce723d62959220ccb6bf9c529c60331fe5b91afaa622147c6a37490551474fe3e35c06ac476524b5160 languageName: node linkType: hard + +"zustand@npm:4.4.1": + version: 4.4.1 + resolution: "zustand@npm:4.4.1" + dependencies: + use-sync-external-store: 1.2.0 + peerDependencies: + "@types/react": ">=16.8" + immer: ">=9.0" + react: ">=16.8" + peerDependenciesMeta: + "@types/react": + optional: true + immer: + optional: true + react: + optional: true + checksum: 80acd0fbf633782996642802c8692bbb80ae5c80a8dff4c501b88250acd5ccd468fbc6398bdce198475a25e3839c91385b81da921274f33ffb5c2d08c3eab400 + languageName: node + linkType: hard From 2fbcf9a03baf7ef7d44d1b206795ae6fa489f8e9 Mon Sep 17 00:00:00 2001 From: Divyang Chauhan Date: Mon, 20 May 2024 19:21:55 +0530 Subject: [PATCH 50/58] fix: update subgraph url --- veascan-subgraph-inbox/README.md | 4 ++-- veascan-subgraph-outbox/README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/veascan-subgraph-inbox/README.md b/veascan-subgraph-inbox/README.md index 10530edf..af0a5700 100644 --- a/veascan-subgraph-inbox/README.md +++ b/veascan-subgraph-inbox/README.md @@ -4,8 +4,8 @@ ### Arbitrum Sepolia (hosted service) -- [Subgraph explorer](https://thegraph.com/explorer/subgraph/kleros/veascan-inbox-arbitrumsepolia) -- [Subgraph endpoints](https://api.thegraph.com/subgraphs/name/kleros/veascan-inbox-arbitrumsepolia) +- [Subgraph explorer](https://thegraph.com/studio/subgraph/veascan-inbox-arb-sep-devnet/) +- [Subgraph endpoints](https://api.studio.thegraph.com/query/67213/veascan-inbox-arb-sep-devnet/version/latest) ## Build diff --git a/veascan-subgraph-outbox/README.md b/veascan-subgraph-outbox/README.md index 791afcd1..8d1e242a 100644 --- a/veascan-subgraph-outbox/README.md +++ b/veascan-subgraph-outbox/README.md @@ -4,8 +4,8 @@ ### Sepolia (hosted service) -- [Subgraph explorer](https://thegraph.com/explorer/subgraph/kleros/veascan-outbox-sepolia) -- [Subgraph endpoints](https://api.thegraph.com/subgraphs/name/kleros/veascan-outbox-sepolia) +- [Subgraph explorer](https://thegraph.com/studio/subgraph/veascan-outbox-arb-sep-devnet/) +- [Subgraph endpoints](https://api.studio.thegraph.com/query/67213/veascan-outbox-arb-sep-devnet/version/latest) ## Chiado (GoldSky) From 16b836e463fad685d8c5a86a39796b25dcd525b4 Mon Sep 17 00:00:00 2001 From: jaybuidl Date: Wed, 5 Jun 2024 20:00:59 +0100 Subject: [PATCH 51/58] chore: bumped node, yarn and graphql --- .gitignore | 2 + .../@yarnpkg/plugin-interactive-tools.cjs | 541 - .yarn/plugins/@yarnpkg/plugin-stage.cjs | 14 - .yarn/plugins/@yarnpkg/plugin-version.cjs | 550 - .yarn/releases/yarn-3.3.1.cjs | 823 - .yarnrc.yml | 14 +- contracts/package.json | 11 +- package.json | 6 +- relayer-cli/package.json | 10 +- relayer-subgraph-inbox/.gitignore | 3 + relayer-subgraph-inbox/package.json | 12 +- validator-cli/package.json | 10 +- veascan-subgraph-inbox/.gitignore | 3 + veascan-subgraph-inbox/package.json | 12 +- veascan-subgraph-outbox/.gitignore | 3 + veascan-subgraph-outbox/package.json | 12 +- veascan-web/package.json | 16 +- yarn.lock | 16497 ++++++++-------- 18 files changed, 8288 insertions(+), 10251 deletions(-) delete mode 100644 .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs delete mode 100644 .yarn/plugins/@yarnpkg/plugin-stage.cjs delete mode 100644 .yarn/plugins/@yarnpkg/plugin-version.cjs delete mode 100755 .yarn/releases/yarn-3.3.1.cjs create mode 100644 relayer-subgraph-inbox/.gitignore create mode 100644 veascan-subgraph-inbox/.gitignore create mode 100644 veascan-subgraph-outbox/.gitignore diff --git a/.gitignore b/.gitignore index b3b19025..9e2de5fa 100644 --- a/.gitignore +++ b/.gitignore @@ -204,3 +204,5 @@ veascan-subgraph-inbox/generated/* veascan-subgraph-inbox/build/* validator-subgraph-inbox/generated/* validator-subgraph-inbox/build/* + +cache diff --git a/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs b/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs deleted file mode 100644 index 11f949d9..00000000 --- a/.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs +++ /dev/null @@ -1,541 +0,0 @@ -/* eslint-disable */ -//prettier-ignore -module.exports = { -name: "@yarnpkg/plugin-interactive-tools", -factory: function (require) { -var plugin=(()=>{var jF=Object.create,Ay=Object.defineProperty,zF=Object.defineProperties,HF=Object.getOwnPropertyDescriptor,qF=Object.getOwnPropertyDescriptors,WF=Object.getOwnPropertyNames,__=Object.getOwnPropertySymbols,VF=Object.getPrototypeOf,IE=Object.prototype.hasOwnProperty,O8=Object.prototype.propertyIsEnumerable;var M8=(i,o,a)=>o in i?Ay(i,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[o]=a,Ht=(i,o)=>{for(var a in o||(o={}))IE.call(o,a)&&M8(i,a,o[a]);if(__)for(var a of __(o))O8.call(o,a)&&M8(i,a,o[a]);return i},Zr=(i,o)=>zF(i,qF(o)),GF=i=>Ay(i,"__esModule",{value:!0});var Dl=(i,o)=>{var a={};for(var p in i)IE.call(i,p)&&o.indexOf(p)<0&&(a[p]=i[p]);if(i!=null&&__)for(var p of __(i))o.indexOf(p)<0&&O8.call(i,p)&&(a[p]=i[p]);return a};var tt=(i,o)=>()=>(o||i((o={exports:{}}).exports,o),o.exports),YF=(i,o)=>{for(var a in o)Ay(i,a,{get:o[a],enumerable:!0})},KF=(i,o,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let p of WF(o))!IE.call(i,p)&&p!=="default"&&Ay(i,p,{get:()=>o[p],enumerable:!(a=HF(o,p))||a.enumerable});return i},vu=i=>KF(GF(Ay(i!=null?jF(VF(i)):{},"default",i&&i.__esModule&&"default"in i?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i);var Oy=tt((tH,k8)=>{"use strict";var N8=Object.getOwnPropertySymbols,XF=Object.prototype.hasOwnProperty,QF=Object.prototype.propertyIsEnumerable;function JF(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function ZF(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var p=Object.getOwnPropertyNames(o).map(function(t){return o[t]});if(p.join("")!=="0123456789")return!1;var _={};return"abcdefghijklmnopqrst".split("").forEach(function(t){_[t]=t}),Object.keys(Object.assign({},_)).join("")==="abcdefghijklmnopqrst"}catch(t){return!1}}k8.exports=ZF()?Object.assign:function(i,o){for(var a,p=JF(i),_,t=1;t{"use strict";var bE=Oy(),Zf=typeof Symbol=="function"&&Symbol.for,My=Zf?Symbol.for("react.element"):60103,$F=Zf?Symbol.for("react.portal"):60106,eP=Zf?Symbol.for("react.fragment"):60107,tP=Zf?Symbol.for("react.strict_mode"):60108,nP=Zf?Symbol.for("react.profiler"):60114,rP=Zf?Symbol.for("react.provider"):60109,iP=Zf?Symbol.for("react.context"):60110,uP=Zf?Symbol.for("react.forward_ref"):60112,oP=Zf?Symbol.for("react.suspense"):60113,lP=Zf?Symbol.for("react.memo"):60115,sP=Zf?Symbol.for("react.lazy"):60116,L8=typeof Symbol=="function"&&Symbol.iterator;function ky(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,a=1;aE_.length&&E_.push(i)}function HE(i,o,a,p){var _=typeof i;(_==="undefined"||_==="boolean")&&(i=null);var t=!1;if(i===null)t=!0;else switch(_){case"string":case"number":t=!0;break;case"object":switch(i.$$typeof){case My:case $F:t=!0}}if(t)return a(p,i,o===""?"."+qE(i,0):o),1;if(t=0,o=o===""?".":o+":",Array.isArray(i))for(var k=0;k{"use strict";var hP="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";V8.exports=hP});var YE=tt((iH,Y8)=>{"use strict";var GE=function(){};process.env.NODE_ENV!=="production"&&(K8=G8(),D_={},X8=Function.call.bind(Object.prototype.hasOwnProperty),GE=function(i){var o="Warning: "+i;typeof console!="undefined"&&console.error(o);try{throw new Error(o)}catch(a){}});var K8,D_,X8;function Q8(i,o,a,p,_){if(process.env.NODE_ENV!=="production"){for(var t in i)if(X8(i,t)){var k;try{if(typeof i[t]!="function"){var L=Error((p||"React class")+": "+a+" type `"+t+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[t]+"`.");throw L.name="Invariant Violation",L}k=i[t](o,t,p,a,null,K8)}catch(C){k=C}if(k&&!(k instanceof Error)&&GE((p||"React class")+": type specification of "+a+" `"+t+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof k+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),k instanceof Error&&!(k.message in D_)){D_[k.message]=!0;var O=_?_():"";GE("Failed "+a+" type: "+k.message+(O!=null?O:""))}}}}Q8.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(D_={})};Y8.exports=Q8});var J8=tt(Eu=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";var i=Oy(),o=YE(),a="16.13.1",p=typeof Symbol=="function"&&Symbol.for,_=p?Symbol.for("react.element"):60103,t=p?Symbol.for("react.portal"):60106,k=p?Symbol.for("react.fragment"):60107,L=p?Symbol.for("react.strict_mode"):60108,O=p?Symbol.for("react.profiler"):60114,C=p?Symbol.for("react.provider"):60109,U=p?Symbol.for("react.context"):60110,H=p?Symbol.for("react.concurrent_mode"):60111,W=p?Symbol.for("react.forward_ref"):60112,ne=p?Symbol.for("react.suspense"):60113,m=p?Symbol.for("react.suspense_list"):60120,he=p?Symbol.for("react.memo"):60115,Ee=p?Symbol.for("react.lazy"):60116,ve=p?Symbol.for("react.block"):60121,se=p?Symbol.for("react.fundamental"):60117,De=p?Symbol.for("react.responder"):60118,pe=p?Symbol.for("react.scope"):60119,me=typeof Symbol=="function"&&Symbol.iterator,ie="@@iterator";function Oe(X){if(X===null||typeof X!="object")return null;var we=me&&X[me]||X[ie];return typeof we=="function"?we:null}var je={current:null},qe={suspense:null},yt={current:null},gt=/^(.*)[\\\/]/;function Xe(X,we,Le){var Ne="";if(we){var dt=we.fileName,Yn=dt.replace(gt,"");if(/^index\./.test(Yn)){var Cn=dt.match(gt);if(Cn){var cr=Cn[1];if(cr){var Si=cr.replace(gt,"");Yn=Si+"/"+Yn}}}Ne=" (at "+Yn+":"+we.lineNumber+")"}else Le&&(Ne=" (created by "+Le+")");return` - in `+(X||"Unknown")+Ne}var ut=1;function We(X){return X._status===ut?X._result:null}function Ft(X,we,Le){var Ne=we.displayName||we.name||"";return X.displayName||(Ne!==""?Le+"("+Ne+")":Le)}function Jt(X){if(X==null)return null;if(typeof X.tag=="number"&&ct("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof X=="function")return X.displayName||X.name||null;if(typeof X=="string")return X;switch(X){case k:return"Fragment";case t:return"Portal";case O:return"Profiler";case L:return"StrictMode";case ne:return"Suspense";case m:return"SuspenseList"}if(typeof X=="object")switch(X.$$typeof){case U:return"Context.Consumer";case C:return"Context.Provider";case W:return Ft(X,X.render,"ForwardRef");case he:return Jt(X.type);case ve:return Jt(X.render);case Ee:{var we=X,Le=We(we);if(Le)return Jt(Le);break}}return null}var rt={},Q=null;function fe(X){Q=X}rt.getCurrentStack=null,rt.getStackAddendum=function(){var X="";if(Q){var we=Jt(Q.type),Le=Q._owner;X+=Xe(we,Q._source,Le&&Jt(Le.type))}var Ne=rt.getCurrentStack;return Ne&&(X+=Ne()||""),X};var xe={current:!1},oe={ReactCurrentDispatcher:je,ReactCurrentBatchConfig:qe,ReactCurrentOwner:yt,IsSomeRendererActing:xe,assign:i};i(oe,{ReactDebugCurrentFrame:rt,ReactComponentTreeHook:{}});function ze(X){{for(var we=arguments.length,Le=new Array(we>1?we-1:0),Ne=1;Ne1?we-1:0),Ne=1;Ne0&&typeof Le[Le.length-1]=="string"&&Le[Le.length-1].indexOf(` - in`)===0;if(!Ne){var dt=oe.ReactDebugCurrentFrame,Yn=dt.getStackAddendum();Yn!==""&&(we+="%s",Le=Le.concat([Yn]))}var Cn=Le.map(function(Mu){return""+Mu});Cn.unshift("Warning: "+we),Function.prototype.apply.call(console[X],console,Cn);try{var cr=0,Si="Warning: "+we.replace(/%s/g,function(){return Le[cr++]});throw new Error(Si)}catch(Mu){}}}var nn={};function an(X,we){{var Le=X.constructor,Ne=Le&&(Le.displayName||Le.name)||"ReactClass",dt=Ne+"."+we;if(nn[dt])return;ct("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",we,Ne),nn[dt]=!0}}var Mn={isMounted:function(X){return!1},enqueueForceUpdate:function(X,we,Le){an(X,"forceUpdate")},enqueueReplaceState:function(X,we,Le,Ne){an(X,"replaceState")},enqueueSetState:function(X,we,Le,Ne){an(X,"setState")}},lr={};Object.freeze(lr);function ln(X,we,Le){this.props=X,this.context=we,this.refs=lr,this.updater=Le||Mn}ln.prototype.isReactComponent={},ln.prototype.setState=function(X,we){if(!(typeof X=="object"||typeof X=="function"||X==null))throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,X,we,"setState")},ln.prototype.forceUpdate=function(X){this.updater.enqueueForceUpdate(this,X,"forceUpdate")};{var Vt={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},Er=function(X,we){Object.defineProperty(ln.prototype,X,{get:function(){ze("%s(...) is deprecated in plain JavaScript React classes. %s",we[0],we[1])}})};for(var w in Vt)Vt.hasOwnProperty(w)&&Er(w,Vt[w])}function jt(){}jt.prototype=ln.prototype;function Xn(X,we,Le){this.props=X,this.context=we,this.refs=lr,this.updater=Le||Mn}var vr=Xn.prototype=new jt;vr.constructor=Xn,i(vr,ln.prototype),vr.isPureReactComponent=!0;function jr(){var X={current:null};return Object.seal(X),X}var fr=Object.prototype.hasOwnProperty,zr={key:!0,ref:!0,__self:!0,__source:!0},Xt,wu,d0;d0={};function Ro(X){if(fr.call(X,"ref")){var we=Object.getOwnPropertyDescriptor(X,"ref").get;if(we&&we.isReactWarning)return!1}return X.ref!==void 0}function Qo(X){if(fr.call(X,"key")){var we=Object.getOwnPropertyDescriptor(X,"key").get;if(we&&we.isReactWarning)return!1}return X.key!==void 0}function Fs(X,we){var Le=function(){Xt||(Xt=!0,ct("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",we))};Le.isReactWarning=!0,Object.defineProperty(X,"key",{get:Le,configurable:!0})}function Jo(X,we){var Le=function(){wu||(wu=!0,ct("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",we))};Le.isReactWarning=!0,Object.defineProperty(X,"ref",{get:Le,configurable:!0})}function Zo(X){if(typeof X.ref=="string"&&yt.current&&X.__self&&yt.current.stateNode!==X.__self){var we=Jt(yt.current.type);d0[we]||(ct('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref',Jt(yt.current.type),X.ref),d0[we]=!0)}}var qt=function(X,we,Le,Ne,dt,Yn,Cn){var cr={$$typeof:_,type:X,key:we,ref:Le,props:Cn,_owner:Yn};return cr._store={},Object.defineProperty(cr._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(cr,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ne}),Object.defineProperty(cr,"_source",{configurable:!1,enumerable:!1,writable:!1,value:dt}),Object.freeze&&(Object.freeze(cr.props),Object.freeze(cr)),cr};function xi(X,we,Le){var Ne,dt={},Yn=null,Cn=null,cr=null,Si=null;if(we!=null){Ro(we)&&(Cn=we.ref,Zo(we)),Qo(we)&&(Yn=""+we.key),cr=we.__self===void 0?null:we.__self,Si=we.__source===void 0?null:we.__source;for(Ne in we)fr.call(we,Ne)&&!zr.hasOwnProperty(Ne)&&(dt[Ne]=we[Ne])}var Mu=arguments.length-2;if(Mu===1)dt.children=Le;else if(Mu>1){for(var zu=Array(Mu),Hu=0;Hu1){for(var Su=Array(Hu),Ti=0;Ti is not supported and will be removed in a future major release. Did you mean to render instead?")),Le.Provider},set:function(Cn){Le.Provider=Cn}},_currentValue:{get:function(){return Le._currentValue},set:function(Cn){Le._currentValue=Cn}},_currentValue2:{get:function(){return Le._currentValue2},set:function(Cn){Le._currentValue2=Cn}},_threadCount:{get:function(){return Le._threadCount},set:function(Cn){Le._threadCount=Cn}},Consumer:{get:function(){return Ne||(Ne=!0,ct("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),Le.Consumer}}}),Le.Consumer=Yn}return Le._currentRenderer=null,Le._currentRenderer2=null,Le}function Wt(X){var we={$$typeof:Ee,_ctor:X,_status:-1,_result:null};{var Le,Ne;Object.defineProperties(we,{defaultProps:{configurable:!0,get:function(){return Le},set:function(dt){ct("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),Le=dt,Object.defineProperty(we,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return Ne},set:function(dt){ct("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),Ne=dt,Object.defineProperty(we,"propTypes",{enumerable:!0})}}})}return we}function Au(X){return X!=null&&X.$$typeof===he?ct("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof X!="function"?ct("forwardRef requires a render function but was given %s.",X===null?"null":typeof X):X.length!==0&&X.length!==2&&ct("forwardRef render functions accept exactly two parameters: props and ref. %s",X.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),X!=null&&(X.defaultProps!=null||X.propTypes!=null)&&ct("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:W,render:X}}function eu(X){return typeof X=="string"||typeof X=="function"||X===k||X===H||X===O||X===L||X===ne||X===m||typeof X=="object"&&X!==null&&(X.$$typeof===Ee||X.$$typeof===he||X.$$typeof===C||X.$$typeof===U||X.$$typeof===W||X.$$typeof===se||X.$$typeof===De||X.$$typeof===pe||X.$$typeof===ve)}function X0(X,we){return eu(X)||ct("memo: The first argument must be a component. Instead received: %s",X===null?"null":typeof X),{$$typeof:he,type:X,compare:we===void 0?null:we}}function Yi(){var X=je.current;if(X===null)throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: -1. You might have mismatching versions of React and the renderer (such as React DOM) -2. You might be breaking the Rules of Hooks -3. You might have more than one copy of React in the same app -See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.`);return X}function Xl(X,we){var Le=Yi();if(we!==void 0&&ct("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",we,typeof we=="number"&&Array.isArray(arguments[2])?` - -Did you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://fb.me/rules-of-hooks`:""),X._context!==void 0){var Ne=X._context;Ne.Consumer===X?ct("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):Ne.Provider===X&&ct("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return Le.useContext(X,we)}function Mo(X){var we=Yi();return we.useState(X)}function ai(X,we,Le){var Ne=Yi();return Ne.useReducer(X,we,Le)}function so(X){var we=Yi();return we.useRef(X)}function Ql(X,we){var Le=Yi();return Le.useEffect(X,we)}function ko(X,we){var Le=Yi();return Le.useLayoutEffect(X,we)}function Is(X,we){var Le=Yi();return Le.useCallback(X,we)}function $n(X,we){var Le=Yi();return Le.useMemo(X,we)}function el(X,we,Le){var Ne=Yi();return Ne.useImperativeHandle(X,we,Le)}function ao(X,we){{var Le=Yi();return Le.useDebugValue(X,we)}}var I0;I0=!1;function wl(){if(yt.current){var X=Jt(yt.current.type);if(X)return` - -Check the render method of \``+X+"`."}return""}function No(X){if(X!==void 0){var we=X.fileName.replace(/^.*[\\\/]/,""),Le=X.lineNumber;return` - -Check your code at `+we+":"+Le+"."}return""}function wt(X){return X!=null?No(X.__source):""}var bt={};function Hn(X){var we=wl();if(!we){var Le=typeof X=="string"?X:X.displayName||X.name;Le&&(we=` - -Check the top-level render call using <`+Le+">.")}return we}function qr(X,we){if(!(!X._store||X._store.validated||X.key!=null)){X._store.validated=!0;var Le=Hn(we);if(!bt[Le]){bt[Le]=!0;var Ne="";X&&X._owner&&X._owner!==yt.current&&(Ne=" It was passed a child from "+Jt(X._owner.type)+"."),fe(X),ct('Each child in a list should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.',Le,Ne),fe(null)}}}function Ki(X,we){if(typeof X=="object"){if(Array.isArray(X))for(var Le=0;Le",dt=" Did you accidentally export a JSX literal instead of a component?"):Cn=typeof X,ct("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Cn,dt)}var cr=xi.apply(this,arguments);if(cr==null)return cr;if(Ne)for(var Si=2;Si{"use strict";process.env.NODE_ENV==="production"?KE.exports=W8():KE.exports=J8()});var Z8=tt((zv,Ny)=>{(function(){var i,o="4.17.21",a=200,p="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",_="Expected a function",t="Invalid `variable` option passed into `_.template`",k="__lodash_hash_undefined__",L=500,O="__lodash_placeholder__",C=1,U=2,H=4,W=1,ne=2,m=1,he=2,Ee=4,ve=8,se=16,De=32,pe=64,me=128,ie=256,Oe=512,je=30,qe="...",yt=800,gt=16,Xe=1,ut=2,We=3,Ft=1/0,Jt=9007199254740991,rt=17976931348623157e292,Q=0/0,fe=4294967295,xe=fe-1,oe=fe>>>1,ze=[["ary",me],["bind",m],["bindKey",he],["curry",ve],["curryRight",se],["flip",Oe],["partial",De],["partialRight",pe],["rearg",ie]],ct="[object Arguments]",Rt="[object Array]",nn="[object AsyncFunction]",an="[object Boolean]",Mn="[object Date]",lr="[object DOMException]",ln="[object Error]",Vt="[object Function]",Er="[object GeneratorFunction]",w="[object Map]",jt="[object Number]",Xn="[object Null]",vr="[object Object]",jr="[object Promise]",fr="[object Proxy]",zr="[object RegExp]",Xt="[object Set]",wu="[object String]",d0="[object Symbol]",Ro="[object Undefined]",Qo="[object WeakMap]",Fs="[object WeakSet]",Jo="[object ArrayBuffer]",Zo="[object DataView]",qt="[object Float32Array]",xi="[object Float64Array]",lu="[object Int8Array]",mi="[object Int16Array]",Dr="[object Int32Array]",$o="[object Uint8Array]",G0="[object Uint8ClampedArray]",Uu="[object Uint16Array]",Y0="[object Uint32Array]",Xr=/\b__p \+= '';/g,Ao=/\b(__p \+=) '' \+/g,Oo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,F0=/&(?:amp|lt|gt|quot|#39);/g,su=/[&<>"']/g,ki=RegExp(F0.source),Ps=RegExp(su.source),Kl=/<%-([\s\S]+?)%>/g,P0=/<%([\s\S]+?)%>/g,p0=/<%=([\s\S]+?)%>/g,Hr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ri=/^\w*$/,K0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yi=/[\\^$.*+?()[\]{}|]/g,en=RegExp(yi.source),bn=/^\s+/,Ai=/\s/,gi=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Wt=/\{\n\/\* \[wrapped with (.+)\] \*/,Au=/,? & /,eu=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,X0=/[()=,{}\[\]\/\s]/,Yi=/\\(\\)?/g,Xl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Mo=/\w*$/,ai=/^[-+]0x[0-9a-f]+$/i,so=/^0b[01]+$/i,Ql=/^\[object .+?Constructor\]$/,ko=/^0o[0-7]+$/i,Is=/^(?:0|[1-9]\d*)$/,$n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,el=/($^)/,ao=/['\n\r\u2028\u2029\\]/g,I0="\\ud800-\\udfff",wl="\\u0300-\\u036f",No="\\ufe20-\\ufe2f",wt="\\u20d0-\\u20ff",bt=wl+No+wt,Hn="\\u2700-\\u27bf",qr="a-z\\xdf-\\xf6\\xf8-\\xff",Ki="\\xac\\xb1\\xd7\\xf7",Qr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ou="\\u2000-\\u206f",h0=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ni="A-Z\\xc0-\\xd6\\xd8-\\xde",v0="\\ufe0e\\ufe0f",hs=Ki+Qr+Ou+h0,Tt="['\u2019]",fo="["+I0+"]",tl="["+hs+"]",Jl="["+bt+"]",ju="\\d+",vs="["+Hn+"]",b0="["+qr+"]",X="[^"+I0+hs+ju+Hn+qr+Ni+"]",we="\\ud83c[\\udffb-\\udfff]",Le="(?:"+Jl+"|"+we+")",Ne="[^"+I0+"]",dt="(?:\\ud83c[\\udde6-\\uddff]){2}",Yn="[\\ud800-\\udbff][\\udc00-\\udfff]",Cn="["+Ni+"]",cr="\\u200d",Si="(?:"+b0+"|"+X+")",Mu="(?:"+Cn+"|"+X+")",zu="(?:"+Tt+"(?:d|ll|m|re|s|t|ve))?",Hu="(?:"+Tt+"(?:D|LL|M|RE|S|T|VE))?",Su=Le+"?",Ti="["+v0+"]?",Lo="(?:"+cr+"(?:"+[Ne,dt,Yn].join("|")+")"+Ti+Su+")*",ku="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",co="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",qu=Ti+Su+Lo,Pa="(?:"+[vs,dt,Yn].join("|")+")"+qu,m0="(?:"+[Ne+Jl+"?",Jl,dt,Yn,fo].join("|")+")",ia=RegExp(Tt,"g"),Q0=RegExp(Jl,"g"),ua=RegExp(we+"(?="+we+")|"+m0+qu,"g"),Ia=RegExp([Cn+"?"+b0+"+"+zu+"(?="+[tl,Cn,"$"].join("|")+")",Mu+"+"+Hu+"(?="+[tl,Cn+Si,"$"].join("|")+")",Cn+"?"+Si+"+"+zu,Cn+"+"+Hu,co,ku,ju,Pa].join("|"),"g"),ms=RegExp("["+cr+I0+bt+v0+"]"),S0=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Qn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ac=-1,fi={};fi[qt]=fi[xi]=fi[lu]=fi[mi]=fi[Dr]=fi[$o]=fi[G0]=fi[Uu]=fi[Y0]=!0,fi[ct]=fi[Rt]=fi[Jo]=fi[an]=fi[Zo]=fi[Mn]=fi[ln]=fi[Vt]=fi[w]=fi[jt]=fi[vr]=fi[zr]=fi[Xt]=fi[wu]=fi[Qo]=!1;var $r={};$r[ct]=$r[Rt]=$r[Jo]=$r[Zo]=$r[an]=$r[Mn]=$r[qt]=$r[xi]=$r[lu]=$r[mi]=$r[Dr]=$r[w]=$r[jt]=$r[vr]=$r[zr]=$r[Xt]=$r[wu]=$r[d0]=$r[$o]=$r[G0]=$r[Uu]=$r[Y0]=!0,$r[ln]=$r[Vt]=$r[Qo]=!1;var Zl={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},oa={"&":"&","<":"<",">":">",'"':""","'":"'"},pf={"&":"&","<":"<",">":">",""":'"',"'":"'"},bs={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ba=parseFloat,Bs=parseInt,y0=typeof global=="object"&&global&&global.Object===Object&&global,Us=typeof self=="object"&&self&&self.Object===Object&&self,ji=y0||Us||Function("return this")(),B=typeof zv=="object"&&zv&&!zv.nodeType&&zv,z=B&&typeof Ny=="object"&&Ny&&!Ny.nodeType&&Ny,G=z&&z.exports===B,$=G&&y0.process,Te=function(){try{var Ce=z&&z.require&&z.require("util").types;return Ce||$&&$.binding&&$.binding("util")}catch(et){}}(),ge=Te&&Te.isArrayBuffer,Re=Te&&Te.isDate,Z=Te&&Te.isMap,ke=Te&&Te.isRegExp,Qe=Te&&Te.isSet,ht=Te&&Te.isTypedArray;function ue(Ce,et,Ye){switch(Ye.length){case 0:return Ce.call(et);case 1:return Ce.call(et,Ye[0]);case 2:return Ce.call(et,Ye[0],Ye[1]);case 3:return Ce.call(et,Ye[0],Ye[1],Ye[2])}return Ce.apply(et,Ye)}function He(Ce,et,Ye,Yt){for(var Kt=-1,pr=Ce==null?0:Ce.length;++Kt-1}function rn(Ce,et,Ye){for(var Yt=-1,Kt=Ce==null?0:Ce.length;++Yt-1;);return Ye}function Sl(Ce,et){for(var Ye=Ce.length;Ye--&&Dt(et,Ce[Ye],0)>-1;);return Ye}function vf(Ce,et){for(var Ye=Ce.length,Yt=0;Ye--;)Ce[Ye]===et&&++Yt;return Yt}var Po=Jn(Zl),ys=Jn(oa);function js(Ce){return"\\"+bs[Ce]}function Io(Ce,et){return Ce==null?i:Ce[et]}function bo(Ce){return ms.test(Ce)}function gs(Ce){return S0.test(Ce)}function Qu(Ce){for(var et,Ye=[];!(et=Ce.next()).done;)Ye.push(et.value);return Ye}function Tu(Ce){var et=-1,Ye=Array(Ce.size);return Ce.forEach(function(Yt,Kt){Ye[++et]=[Kt,Yt]}),Ye}function Ei(Ce,et){return function(Ye){return Ce(et(Ye))}}function C0(Ce,et){for(var Ye=-1,Yt=Ce.length,Kt=0,pr=[];++Ye-1}function fa(d,v){var x=this.__data__,P=ts(x,d);return P<0?(++this.size,x.push([d,v])):x[P][1]=v,this}ro.prototype.clear=Ba,ro.prototype.delete=_f,ro.prototype.get=fc,ro.prototype.has=Ds,ro.prototype.set=fa;function U0(d){var v=-1,x=d==null?0:d.length;for(this.clear();++v=v?d:v)),d}function j0(d,v,x,P,q,ee){var de,_e=v&C,Ie=v&U,Et=v&H;if(x&&(de=q?x(d,P,q,ee):x(d)),de!==i)return de;if(!bu(d))return d;var St=tr(d);if(St){if(de=Cs(d),!_e)return iu(d,de)}else{var At=Iu(d),on=At==Vt||At==Er;if(Js(d))return vc(d,_e);if(At==vr||At==ct||on&&!q){if(de=Ie||on?{}:Ec(d),!_e)return Ie?ns(d,ul(de,d)):o0(d,Ef(de,d))}else{if(!$r[At])return q?d:{};de=Dh(d,At,_e)}}ee||(ee=new il);var kn=ee.get(d);if(kn)return kn;ee.set(d,de),Id(d)?d.forEach(function(ar){de.add(j0(ar,v,x,ar,d,ee))}):Ep(d)&&d.forEach(function(ar,ui){de.set(ui,j0(ar,v,x,ui,d,ee))});var rr=Et?Ie?sr:n1:Ie?dn:N0,br=St?i:rr(d);return nt(br||d,function(ar,ui){br&&(ui=ar,ar=d[ui]),Ss(de,ui,j0(ar,v,x,ui,d,ee))}),de}function Df(d){var v=N0(d);return function(x){return qc(x,d,v)}}function qc(d,v,x){var P=x.length;if(d==null)return!P;for(d=xn(d);P--;){var q=x[P],ee=v[q],de=d[q];if(de===i&&!(q in d)||!ee(de))return!1}return!0}function dc(d,v,x){if(typeof d!="function")throw new ti(_);return Qa(function(){d.apply(i,x)},v)}function Al(d,v,x,P){var q=-1,ee=sn,de=!0,_e=d.length,Ie=[],Et=v.length;if(!_e)return Ie;x&&(v=Lt(v,_i(x))),P?(ee=rn,de=!1):v.length>=a&&(ee=nl,de=!1,v=new mo(v));e:for(;++q<_e;){var St=d[q],At=x==null?St:x(St);if(St=P||St!==0?St:0,de&&At===At){for(var on=Et;on--;)if(v[on]===At)continue e;Ie.push(St)}else ee(v,At,P)||Ie.push(St)}return Ie}var Ts=al(R),da=al(F,!0);function ud(d,v){var x=!0;return Ts(d,function(P,q,ee){return x=!!v(P,q,ee),x}),x}function pa(d,v,x){for(var P=-1,q=d.length;++Pq?0:q+x),P=P===i||P>q?q:Mr(P),P<0&&(P+=q),P=x>P?0:wp(P);x0&&x(_e)?v>1?qi(_e,v-1,x,P,q):Dn(q,_e):P||(q[q.length]=_e)}return q}var g=yc(),y=yc(!0);function R(d,v){return d&&g(d,v,N0)}function F(d,v){return d&&y(d,v,N0)}function b(d,v){return It(v,function(x){return xa(d[x])})}function J(d,v){v=Ws(v,d);for(var x=0,P=v.length;d!=null&&xv}function kt(d,v){return d!=null&&li.call(d,v)}function xr(d,v){return d!=null&&v in xn(d)}function i0(d,v,x){return d>=Kn(v,x)&&d=120&&St.length>=120)?new mo(de&&St):i}St=d[0];var At=-1,on=_e[0];e:for(;++At-1;)_e!==d&&O0.call(_e,Ie,1),O0.call(d,Ie,1);return d}function sd(d,v){for(var x=d?v.length:0,P=x-1;x--;){var q=v[x];if(x==P||q!==ee){var ee=q;Eo(q)?O0.call(d,q,1):R2(d,q)}}return d}function ad(d,v){return d+Es(E0()*(v-d+1))}function T2(d,v,x,P){for(var q=-1,ee=ni($u((v-d)/(x||1)),0),de=Ye(ee);ee--;)de[P?ee:++q]=d,d+=x;return de}function Gc(d,v){var x="";if(!d||v<1||v>Jt)return x;do v%2&&(x+=d),v=Es(v/2),v&&(d+=d);while(v);return x}function Ir(d,v){return o1(F2(d,v,s0),d+"")}function fd(d){return za(Nc(d))}function cd(d,v){var x=Nc(d);return wc(x,r0(v,0,x.length))}function Ga(d,v,x,P){if(!bu(d))return d;v=Ws(v,d);for(var q=-1,ee=v.length,de=ee-1,_e=d;_e!=null&&++qq?0:q+v),x=x>q?q:x,x<0&&(x+=q),q=v>x?0:x-v>>>0,v>>>=0;for(var ee=Ye(q);++P>>1,de=d[ee];de!==null&&!bl(de)&&(x?de<=v:de=a){var Et=v?null:rm(d);if(Et)return Z0(Et);de=!1,q=nl,Ie=new mo}else Ie=v?[]:_e;e:for(;++P=P?d:ll(d,v,x)}var Jc=_s||function(d){return ji.clearTimeout(d)};function vc(d,v){if(v)return d.slice();var x=d.length,P=Hi?Hi(x):new d.constructor(x);return d.copy(P),P}function mc(d){var v=new d.constructor(d.byteLength);return new A0(v).set(new A0(d)),v}function pd(d,v){var x=v?mc(d.buffer):d.buffer;return new d.constructor(x,d.byteOffset,d.byteLength)}function yh(d){var v=new d.constructor(d.source,Mo.exec(d));return v.lastIndex=d.lastIndex,v}function Tf(d){return Ar?xn(Ar.call(d)):{}}function Zc(d,v){var x=v?mc(d.buffer):d.buffer;return new d.constructor(x,d.byteOffset,d.length)}function gh(d,v){if(d!==v){var x=d!==i,P=d===null,q=d===d,ee=bl(d),de=v!==i,_e=v===null,Ie=v===v,Et=bl(v);if(!_e&&!Et&&!ee&&d>v||ee&&de&&Ie&&!_e&&!Et||P&&de&&Ie||!x&&Ie||!q)return 1;if(!P&&!ee&&!Et&&d=_e)return Ie;var Et=x[P];return Ie*(Et=="desc"?-1:1)}}return d.index-v.index}function Vs(d,v,x,P){for(var q=-1,ee=d.length,de=x.length,_e=-1,Ie=v.length,Et=ni(ee-de,0),St=Ye(Ie+Et),At=!P;++_e1?x[q-1]:i,de=q>2?x[2]:i;for(ee=d.length>3&&typeof ee=="function"?(q--,ee):i,de&&oo(x[0],x[1],de)&&(ee=q<3?i:ee,q=1),v=xn(v);++P-1?q[ee?v[de]:de]:i}}function e1(d){return fl(function(v){var x=v.length,P=x,q=Vr.prototype.thru;for(d&&v.reverse();P--;){var ee=v[P];if(typeof ee!="function")throw new ti(_);if(q&&!de&&Ho(ee)=="wrapper")var de=new Vr([],!0)}for(P=de?P:x;++P1&&di.reverse(),St&&Ie_e))return!1;var Et=ee.get(d),St=ee.get(v);if(Et&&St)return Et==v&&St==d;var At=-1,on=!0,kn=x&ne?new mo:i;for(ee.set(d,v),ee.set(v,d);++At<_e;){var rr=d[At],br=v[At];if(P)var ar=de?P(br,rr,At,v,d,ee):P(rr,br,At,d,v,ee);if(ar!==i){if(ar)continue;on=!1;break}if(kn){if(!Cr(v,function(ui,di){if(!nl(kn,di)&&(rr===ui||q(rr,ui,x,P,ee)))return kn.push(di)})){on=!1;break}}else if(!(rr===br||q(rr,br,x,P,ee))){on=!1;break}}return ee.delete(d),ee.delete(v),on}function Eh(d,v,x,P,q,ee,de){switch(x){case Zo:if(d.byteLength!=v.byteLength||d.byteOffset!=v.byteOffset)return!1;d=d.buffer,v=v.buffer;case Jo:return!(d.byteLength!=v.byteLength||!ee(new A0(d),new A0(v)));case an:case Mn:case jt:return wo(+d,+v);case ln:return d.name==v.name&&d.message==v.message;case zr:case wu:return d==v+"";case w:var _e=Tu;case Xt:var Ie=P&W;if(_e||(_e=Z0),d.size!=v.size&&!Ie)return!1;var Et=de.get(d);if(Et)return Et==v;P|=ne,de.set(d,v);var St=Of(_e(d),_e(v),P,q,ee,de);return de.delete(d),St;case d0:if(Ar)return Ar.call(d)==Ar.call(v)}return!1}function um(d,v,x,P,q,ee){var de=x&W,_e=n1(d),Ie=_e.length,Et=n1(v),St=Et.length;if(Ie!=St&&!de)return!1;for(var At=Ie;At--;){var on=_e[At];if(!(de?on in v:li.call(v,on)))return!1}var kn=ee.get(d),rr=ee.get(v);if(kn&&rr)return kn==v&&rr==d;var br=!0;ee.set(d,v),ee.set(v,d);for(var ar=de;++At1?"& ":"")+v[P],v=v.join(x>2?", ":" "),d.replace(gi,`{ -/* [wrapped with `+v+`] */ -`)}function is(d){return tr(d)||dl(d)||!!(ho&&d&&d[ho])}function Eo(d,v){var x=typeof d;return v=v==null?Jt:v,!!v&&(x=="number"||x!="symbol"&&Is.test(d))&&d>-1&&d%1==0&&d0){if(++v>=yt)return arguments[0]}else v=0;return d.apply(i,arguments)}}function wc(d,v){var x=-1,P=d.length,q=P-1;for(v=v===i?P:v;++x1?d[v-1]:i;return x=typeof x=="function"?(d.pop(),x):i,Sd(d,x)});function Bh(d){var v=Y(d);return v.__chain__=!0,v}function Uh(d,v){return v(d),d}function y1(d,v){return v(d)}var Z2=fl(function(d){var v=d.length,x=v?d[0]:0,P=this.__wrapped__,q=function(ee){return qa(ee,d)};return v>1||this.__actions__.length||!(P instanceof at)||!Eo(x)?this.thru(q):(P=P.slice(x,+x+(v?1:0)),P.__actions__.push({func:y1,args:[q],thisArg:i}),new Vr(P,this.__chain__).thru(function(ee){return v&&!ee.length&&ee.push(i),ee}))});function jh(){return Bh(this)}function $2(){return new Vr(this.value(),this.__chain__)}function zh(){this.__values__===i&&(this.__values__=lv(this.value()));var d=this.__index__>=this.__values__.length,v=d?i:this.__values__[this.__index__++];return{done:d,value:v}}function dm(){return this}function pm(d){for(var v,x=this;x instanceof ii;){var P=I2(x);P.__index__=0,P.__values__=i,v?q.__wrapped__=P:v=P;var q=P;x=x.__wrapped__}return q.__wrapped__=d,v}function Pf(){var d=this.__wrapped__;if(d instanceof at){var v=d;return this.__actions__.length&&(v=new at(this)),v=v.reverse(),v.__actions__.push({func:y1,args:[V2],thisArg:i}),new Vr(v,this.__chain__)}return this.thru(V2)}function If(){return mh(this.__wrapped__,this.__actions__)}var Td=Ya(function(d,v,x){li.call(d,x)?++d[x]:Gu(d,x,1)});function hm(d,v,x){var P=tr(d)?Mt:ud;return x&&oo(d,v,x)&&(v=i),P(d,Vn(v,3))}function ep(d,v){var x=tr(d)?It:Wc;return x(d,Vn(v,3))}var Cd=kl(j2),tp=kl(s1);function Hh(d,v){return qi(g1(d,v),1)}function np(d,v){return qi(g1(d,v),Ft)}function qh(d,v,x){return x=x===i?1:Mr(x),qi(g1(d,v),x)}function Wh(d,v){var x=tr(d)?nt:Ts;return x(d,Vn(v,3))}function rp(d,v){var x=tr(d)?Ct:da;return x(d,Vn(v,3))}var vm=Ya(function(d,v,x){li.call(d,x)?d[x].push(v):Gu(d,x,[v])});function mm(d,v,x,P){d=pl(d)?d:Nc(d),x=x&&!P?Mr(x):0;var q=d.length;return x<0&&(x=ni(q+x,0)),w1(d)?x<=q&&d.indexOf(v,x)>-1:!!q&&Dt(d,v,x)>-1}var ym=Ir(function(d,v,x){var P=-1,q=typeof v=="function",ee=pl(d)?Ye(d.length):[];return Ts(d,function(de){ee[++P]=q?ue(v,de,x):Ol(de,v,x)}),ee}),Vh=Ya(function(d,v,x){Gu(d,x,v)});function g1(d,v){var x=tr(d)?Lt:w2;return x(d,Vn(v,3))}function gm(d,v,x,P){return d==null?[]:(tr(v)||(v=v==null?[]:[v]),x=P?i:x,tr(x)||(x=x==null?[]:[x]),yo(d,v,x))}var ip=Ya(function(d,v,x){d[x?0:1].push(v)},function(){return[[],[]]});function up(d,v,x){var P=tr(d)?dr:wr,q=arguments.length<3;return P(d,Vn(v,4),x,q,Ts)}function _m(d,v,x){var P=tr(d)?er:wr,q=arguments.length<3;return P(d,Vn(v,4),x,q,da)}function Em(d,v){var x=tr(d)?It:Wc;return x(d,Ad(Vn(v,3)))}function Gh(d){var v=tr(d)?za:fd;return v(d)}function Dm(d,v,x){(x?oo(d,v,x):v===i)?v=1:v=Mr(v);var P=tr(d)?Ha:cd;return P(d,v)}function wm(d){var v=tr(d)?ca:ol;return v(d)}function op(d){if(d==null)return 0;if(pl(d))return w1(d)?tu(d):d.length;var v=Iu(d);return v==w||v==Xt?d.size:Wa(d).length}function lp(d,v,x){var P=tr(d)?Cr:hh;return x&&oo(d,v,x)&&(v=i),P(d,Vn(v,3))}var Ta=Ir(function(d,v){if(d==null)return[];var x=v.length;return x>1&&oo(d,v[0],v[1])?v=[]:x>2&&oo(v[0],v[1],v[2])&&(v=[v[0]]),yo(d,qi(v,1),[])}),_1=aa||function(){return ji.Date.now()};function sp(d,v){if(typeof v!="function")throw new ti(_);return d=Mr(d),function(){if(--d<1)return v.apply(this,arguments)}}function Yh(d,v,x){return v=x?i:v,v=d&&v==null?d.length:v,hn(d,me,i,i,i,i,v)}function xd(d,v){var x;if(typeof v!="function")throw new ti(_);return d=Mr(d),function(){return--d>0&&(x=v.apply(this,arguments)),d<=1&&(v=i),x}}var E1=Ir(function(d,v,x){var P=m;if(x.length){var q=C0(x,yr(E1));P|=De}return hn(d,P,v,x,q)}),Kh=Ir(function(d,v,x){var P=m|he;if(x.length){var q=C0(x,yr(Kh));P|=De}return hn(v,P,d,x,q)});function ap(d,v,x){v=x?i:v;var P=hn(d,ve,i,i,i,i,i,v);return P.placeholder=ap.placeholder,P}function Xh(d,v,x){v=x?i:v;var P=hn(d,se,i,i,i,i,i,v);return P.placeholder=Xh.placeholder,P}function fp(d,v,x){var P,q,ee,de,_e,Ie,Et=0,St=!1,At=!1,on=!0;if(typeof d!="function")throw new ti(_);v=hl(v)||0,bu(x)&&(St=!!x.leading,At="maxWait"in x,ee=At?ni(hl(x.maxWait)||0,v):ee,on="trailing"in x?!!x.trailing:on);function kn(a0){var Os=P,To=q;return P=q=i,Et=a0,de=d.apply(To,Os),de}function rr(a0){return Et=a0,_e=Qa(ui,v),St?kn(a0):de}function br(a0){var Os=a0-Ie,To=a0-Et,Av=v-Os;return At?Kn(Av,ee-To):Av}function ar(a0){var Os=a0-Ie,To=a0-Et;return Ie===i||Os>=v||Os<0||At&&To>=ee}function ui(){var a0=_1();if(ar(a0))return di(a0);_e=Qa(ui,br(a0))}function di(a0){return _e=i,on&&P?kn(a0):(P=q=i,de)}function jl(){_e!==i&&Jc(_e),Et=0,P=Ie=q=_e=i}function Zi(){return _e===i?de:di(_1())}function lo(){var a0=_1(),Os=ar(a0);if(P=arguments,q=this,Ie=a0,Os){if(_e===i)return rr(Ie);if(At)return Jc(_e),_e=Qa(ui,v),kn(Ie)}return _e===i&&(_e=Qa(ui,v)),de}return lo.cancel=jl,lo.flush=Zi,lo}var Qh=Ir(function(d,v){return dc(d,1,v)}),Jh=Ir(function(d,v,x){return dc(d,hl(v)||0,x)});function cp(d){return hn(d,Oe)}function Rd(d,v){if(typeof d!="function"||v!=null&&typeof v!="function")throw new ti(_);var x=function(){var P=arguments,q=v?v.apply(this,P):P[0],ee=x.cache;if(ee.has(q))return ee.get(q);var de=d.apply(this,P);return x.cache=ee.set(q,de)||ee,de};return x.cache=new(Rd.Cache||U0),x}Rd.Cache=U0;function Ad(d){if(typeof d!="function")throw new ti(_);return function(){var v=arguments;switch(v.length){case 0:return!d.call(this);case 1:return!d.call(this,v[0]);case 2:return!d.call(this,v[0],v[1]);case 3:return!d.call(this,v[0],v[1],v[2])}return!d.apply(this,v)}}function H0(d){return xd(2,d)}var Od=M2(function(d,v){v=v.length==1&&tr(v[0])?Lt(v[0],_i(Vn())):Lt(qi(v,1),_i(Vn()));var x=v.length;return Ir(function(P){for(var q=-1,ee=Kn(P.length,x);++q=v}),dl=u0(function(){return arguments}())?u0:function(d){return Yu(d)&&li.call(d,"callee")&&!B0.call(d,"callee")},tr=Ye.isArray,Qs=ge?_i(ge):Ve;function pl(d){return d!=null&&Fd(d.length)&&!xa(d)}function l0(d){return Yu(d)&&pl(d)}function ev(d){return d===!0||d===!1||Yu(d)&&mt(d)==an}var Js=to||Up,mp=Re?_i(Re):Ue;function Rm(d){return Yu(d)&&d.nodeType===1&&!Cc(d)}function tv(d){if(d==null)return!0;if(pl(d)&&(tr(d)||typeof d=="string"||typeof d.splice=="function"||Js(d)||Ra(d)||dl(d)))return!d.length;var v=Iu(d);if(v==w||v==Xt)return!d.size;if(Nf(d))return!Wa(d).length;for(var x in d)if(li.call(d,x))return!1;return!0}function yp(d,v){return lt(d,v)}function Am(d,v,x){x=typeof x=="function"?x:i;var P=x?x(d,v):i;return P===i?lt(d,v,i,x):!!P}function gp(d){if(!Yu(d))return!1;var v=mt(d);return v==ln||v==lr||typeof d.message=="string"&&typeof d.name=="string"&&!Cc(d)}function Tc(d){return typeof d=="number"&&nu(d)}function xa(d){if(!bu(d))return!1;var v=mt(d);return v==Vt||v==Er||v==nn||v==fr}function _p(d){return typeof d=="number"&&d==Mr(d)}function Fd(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=Jt}function bu(d){var v=typeof d;return d!=null&&(v=="object"||v=="function")}function Yu(d){return d!=null&&typeof d=="object"}var Ep=Z?_i(Z):Wn;function Dp(d,v){return d===v||si(d,v,jn(v))}function nv(d,v,x){return x=typeof x=="function"?x:i,si(d,v,jn(v),x)}function Om(d){return rv(d)&&d!=+d}function Mm(d){if(Nl(d))throw new Kt(p);return ur(d)}function km(d){return d===null}function Pd(d){return d==null}function rv(d){return typeof d=="number"||Yu(d)&&mt(d)==jt}function Cc(d){if(!Yu(d)||mt(d)!=vr)return!1;var v=rl(d);if(v===null)return!0;var x=li.call(v,"constructor")&&v.constructor;return typeof x=="function"&&x instanceof x&&Fu.call(x)==sa}var D1=ke?_i(ke):ci;function Nm(d){return _p(d)&&d>=-Jt&&d<=Jt}var Id=Qe?_i(Qe):Qi;function w1(d){return typeof d=="string"||!tr(d)&&Yu(d)&&mt(d)==wu}function bl(d){return typeof d=="symbol"||Yu(d)&&mt(d)==d0}var Ra=ht?_i(ht):Gr;function iv(d){return d===i}function Lm(d){return Yu(d)&&Iu(d)==Qo}function uv(d){return Yu(d)&&mt(d)==Fs}var ov=md(od),Fm=md(function(d,v){return d<=v});function lv(d){if(!d)return[];if(pl(d))return w1(d)?ei(d):iu(d);if(Pu&&d[Pu])return Qu(d[Pu]());var v=Iu(d),x=v==w?Tu:v==Xt?Z0:Nc;return x(d)}function Aa(d){if(!d)return d===0?d:0;if(d=hl(d),d===Ft||d===-Ft){var v=d<0?-1:1;return v*rt}return d===d?d:0}function Mr(d){var v=Aa(d),x=v%1;return v===v?x?v-x:v:0}function wp(d){return d?r0(Mr(d),0,fe):0}function hl(d){if(typeof d=="number")return d;if(bl(d))return Q;if(bu(d)){var v=typeof d.valueOf=="function"?d.valueOf():d;d=bu(v)?v+"":v}if(typeof d!="string")return d===0?d:+d;d=Lu(d);var x=so.test(d);return x||ko.test(d)?Bs(d.slice(2),x?2:8):ai.test(d)?Q:+d}function gu(d){return M0(d,dn(d))}function S1(d){return d?r0(Mr(d),-Jt,Jt):d===0?d:0}function Ui(d){return d==null?"":sl(d)}var Sp=io(function(d,v){if(Nf(v)||pl(v)){M0(v,N0(v),d);return}for(var x in v)li.call(v,x)&&Ss(d,x,v[x])}),bd=io(function(d,v){M0(v,dn(v),d)}),So=io(function(d,v,x,P){M0(v,dn(v),d,P)}),As=io(function(d,v,x,P){M0(v,N0(v),d,P)}),bf=fl(qa);function Bd(d,v){var x=ri(d);return v==null?x:Ef(x,v)}var Tp=Ir(function(d,v){d=xn(d);var x=-1,P=v.length,q=P>2?v[2]:i;for(q&&oo(v[0],v[1],q)&&(P=1);++x1),ee}),M0(d,sr(d),x),P&&(x=j0(x,C|U|H,im));for(var q=v.length;q--;)R2(x,v[q]);return x});function R1(d,v){return ef(d,Ad(Vn(v)))}var Rp=fl(function(d,v){return d==null?{}:dh(d,v)});function ef(d,v){if(d==null)return{};var x=Lt(sr(d),function(P){return[P]});return v=Vn(v),ph(d,x,function(P,q){return v(P,q[0])})}function Pm(d,v,x){v=Ws(v,d);var P=-1,q=v.length;for(q||(q=1,d=i);++Pv){var P=d;d=v,v=P}if(x||d%1||v%1){var q=E0();return Kn(d+q*(v-d+ba("1e-"+((q+"").length-1))),v)}return ad(d,v)}var Vd=Cf(function(d,v,x){return v=v.toLowerCase(),d+(x?qo(v):v)});function qo(d){return Mp(Ui(d).toLowerCase())}function Gd(d){return d=Ui(d),d&&d.replace($n,Po).replace(Q0,"")}function bm(d,v,x){d=Ui(d),v=sl(v);var P=d.length;x=x===i?P:r0(Mr(x),0,P);var q=x;return x-=v.length,x>=0&&d.slice(x,q)==v}function M1(d){return d=Ui(d),d&&Ps.test(d)?d.replace(su,ys):d}function Bm(d){return d=Ui(d),d&&en.test(d)?d.replace(yi,"\\$&"):d}var Um=Cf(function(d,v,x){return d+(x?"-":"")+v.toLowerCase()}),av=Cf(function(d,v,x){return d+(x?" ":"")+v.toLowerCase()}),jm=_h("toLowerCase");function fv(d,v,x){d=Ui(d),v=Mr(v);var P=v?tu(d):0;if(!v||P>=v)return d;var q=(v-P)/2;return ga(Es(q),x)+d+ga($u(q),x)}function zm(d,v,x){d=Ui(d),v=Mr(v);var P=v?tu(d):0;return v&&P>>0,x?(d=Ui(d),d&&(typeof v=="string"||v!=null&&!D1(v))&&(v=sl(v),!v&&bo(d))?va(ei(d),0,x):d.split(v,x)):[]}var zf=Cf(function(d,v,x){return d+(x?" ":"")+Mp(v)});function dv(d,v,x){return d=Ui(d),x=x==null?0:r0(Mr(x),0,d.length),v=sl(v),d.slice(x,x+v.length)==v}function pv(d,v,x){var P=Y.templateSettings;x&&oo(d,v,x)&&(v=i),d=Ui(d),v=So({},v,P,Rf);var q=So({},v.imports,P.imports,Rf),ee=N0(q),de=Fo(q,ee),_e,Ie,Et=0,St=v.interpolate||el,At="__p += '",on=yu((v.escape||el).source+"|"+St.source+"|"+(St===p0?Xl:el).source+"|"+(v.evaluate||el).source+"|$","g"),kn="//# sourceURL="+(li.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ac+"]")+` -`;d.replace(on,function(ar,ui,di,jl,Zi,lo){return di||(di=jl),At+=d.slice(Et,lo).replace(ao,js),ui&&(_e=!0,At+=`' + -__e(`+ui+`) + -'`),Zi&&(Ie=!0,At+=`'; -`+Zi+`; -__p += '`),di&&(At+=`' + -((__t = (`+di+`)) == null ? '' : __t) + -'`),Et=lo+ar.length,ar}),At+=`'; -`;var rr=li.call(v,"variable")&&v.variable;if(!rr)At=`with (obj) { -`+At+` -} -`;else if(X0.test(rr))throw new Kt(t);At=(Ie?At.replace(Xr,""):At).replace(Ao,"$1").replace(Oo,"$1;"),At="function("+(rr||"obj")+`) { -`+(rr?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(_e?", __e = _.escape":"")+(Ie?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+At+`return __p -}`;var br=_v(function(){return pr(ee,kn+"return "+At).apply(i,de)});if(br.source=At,gp(br))throw br;return br}function hv(d){return Ui(d).toLowerCase()}function Yd(d){return Ui(d).toUpperCase()}function Kd(d,v,x){if(d=Ui(d),d&&(x||v===i))return Lu(d);if(!d||!(v=sl(v)))return d;var P=ei(d),q=ei(v),ee=hf(P,q),de=Sl(P,q)+1;return va(P,ee,de).join("")}function Op(d,v,x){if(d=Ui(d),d&&(x||v===i))return d.slice(0,po(d)+1);if(!d||!(v=sl(v)))return d;var P=ei(d),q=Sl(P,ei(v))+1;return va(P,0,q).join("")}function vv(d,v,x){if(d=Ui(d),d&&(x||v===i))return d.replace(bn,"");if(!d||!(v=sl(v)))return d;var P=ei(d),q=hf(P,ei(v));return va(P,q).join("")}function Xd(d,v){var x=je,P=qe;if(bu(v)){var q="separator"in v?v.separator:q;x="length"in v?Mr(v.length):x,P="omission"in v?sl(v.omission):P}d=Ui(d);var ee=d.length;if(bo(d)){var de=ei(d);ee=de.length}if(x>=ee)return d;var _e=x-tu(P);if(_e<1)return P;var Ie=de?va(de,0,_e).join(""):d.slice(0,_e);if(q===i)return Ie+P;if(de&&(_e+=Ie.length-_e),D1(q)){if(d.slice(_e).search(q)){var Et,St=Ie;for(q.global||(q=yu(q.source,Ui(Mo.exec(q))+"g")),q.lastIndex=0;Et=q.exec(St);)var At=Et.index;Ie=Ie.slice(0,At===i?_e:At)}}else if(d.indexOf(sl(q),_e)!=_e){var on=Ie.lastIndexOf(q);on>-1&&(Ie=Ie.slice(0,on))}return Ie+P}function mv(d){return d=Ui(d),d&&ki.test(d)?d.replace(F0,Bi):d}var yv=Cf(function(d,v,x){return d+(x?" ":"")+v.toUpperCase()}),Mp=_h("toUpperCase");function gv(d,v,x){return d=Ui(d),v=x?i:v,v===i?gs(d)?yf(d):g0(d):d.match(v)||[]}var _v=Ir(function(d,v){try{return ue(d,i,v)}catch(x){return gp(x)?x:new Kt(x)}}),Gm=fl(function(d,v){return nt(v,function(x){x=Ll(x),Gu(d,x,E1(d[x],d))}),d});function Ev(d){var v=d==null?0:d.length,x=Vn();return d=v?Lt(d,function(P){if(typeof P[1]!="function")throw new ti(_);return[x(P[0]),P[1]]}):[],Ir(function(P){for(var q=-1;++qJt)return[];var x=fe,P=Kn(d,fe);v=Vn(v),d-=fe;for(var q=T0(P,v);++x0||v<0)?new at(x):(d<0?x=x.takeRight(-d):d&&(x=x.drop(d)),v!==i&&(v=Mr(v),x=v<0?x.dropRight(-v):x.take(v-d)),x)},at.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},at.prototype.toArray=function(){return this.take(fe)},R(at.prototype,function(d,v){var x=/^(?:filter|find|map|reject)|While$/.test(v),P=/^(?:head|last)$/.test(v),q=Y[P?"take"+(v=="last"?"Right":""):v],ee=P||/^find/.test(v);!q||(Y.prototype[v]=function(){var de=this.__wrapped__,_e=P?[1]:arguments,Ie=de instanceof at,Et=_e[0],St=Ie||tr(de),At=function(ui){var di=q.apply(Y,Dn([ui],_e));return P&&on?di[0]:di};St&&x&&typeof Et=="function"&&Et.length!=1&&(Ie=St=!1);var on=this.__chain__,kn=!!this.__actions__.length,rr=ee&&!on,br=Ie&&!kn;if(!ee&&St){de=br?de:new at(this);var ar=d.apply(de,_e);return ar.__actions__.push({func:y1,args:[At],thisArg:i}),new Vr(ar,on)}return rr&&br?d.apply(this,_e):(ar=this.thru(At),rr?P?ar.value()[0]:ar.value():ar)})}),nt(["pop","push","shift","sort","splice","unshift"],function(d){var v=Jr[d],x=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",P=/^(?:pop|shift)$/.test(d);Y.prototype[d]=function(){var q=arguments;if(P&&!this.__chain__){var ee=this.value();return v.apply(tr(ee)?ee:[],q)}return this[x](function(de){return v.apply(tr(de)?de:[],q)})}}),R(at.prototype,function(d,v){var x=Y[v];if(x){var P=x.name+"";li.call(On,P)||(On[P]=[]),On[P].push({name:v,func:x})}}),On[ya(i,he).name]=[{name:"wrapper",func:i}],at.prototype.clone=Di,at.prototype.reverse=ru,at.prototype.value=D0,Y.prototype.at=Z2,Y.prototype.chain=jh,Y.prototype.commit=$2,Y.prototype.next=zh,Y.prototype.plant=pm,Y.prototype.reverse=Pf,Y.prototype.toJSON=Y.prototype.valueOf=Y.prototype.value=If,Y.prototype.first=Y.prototype.head,Pu&&(Y.prototype[Pu]=dm),Y},eo=$0();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ji._=eo,define(function(){return eo})):z?((z.exports=eo)._=eo,B._=eo):ji._=eo}).call(zv)});var QE=tt((lH,XE)=>{"use strict";var Pi=XE.exports;XE.exports.default=Pi;var Du="[",Ly="]",Hv="\x07",w_=";",$8=process.env.TERM_PROGRAM==="Apple_Terminal";Pi.cursorTo=(i,o)=>{if(typeof i!="number")throw new TypeError("The `x` argument is required");return typeof o!="number"?Du+(i+1)+"G":Du+(o+1)+";"+(i+1)+"H"};Pi.cursorMove=(i,o)=>{if(typeof i!="number")throw new TypeError("The `x` argument is required");let a="";return i<0?a+=Du+-i+"D":i>0&&(a+=Du+i+"C"),o<0?a+=Du+-o+"A":o>0&&(a+=Du+o+"B"),a};Pi.cursorUp=(i=1)=>Du+i+"A";Pi.cursorDown=(i=1)=>Du+i+"B";Pi.cursorForward=(i=1)=>Du+i+"C";Pi.cursorBackward=(i=1)=>Du+i+"D";Pi.cursorLeft=Du+"G";Pi.cursorSavePosition=$8?"7":Du+"s";Pi.cursorRestorePosition=$8?"8":Du+"u";Pi.cursorGetPosition=Du+"6n";Pi.cursorNextLine=Du+"E";Pi.cursorPrevLine=Du+"F";Pi.cursorHide=Du+"?25l";Pi.cursorShow=Du+"?25h";Pi.eraseLines=i=>{let o="";for(let a=0;a[Ly,"8",w_,w_,o,Hv,i,Ly,"8",w_,w_,Hv].join("");Pi.image=(i,o={})=>{let a=`${Ly}1337;File=inline=1`;return o.width&&(a+=`;width=${o.width}`),o.height&&(a+=`;height=${o.height}`),o.preserveAspectRatio===!1&&(a+=";preserveAspectRatio=0"),a+":"+i.toString("base64")+Hv};Pi.iTerm={setCwd:(i=process.cwd())=>`${Ly}50;CurrentDir=${i}${Hv}`,annotation:(i,o={})=>{let a=`${Ly}1337;`,p=typeof o.x!="undefined",_=typeof o.y!="undefined";if((p||_)&&!(p&&_&&typeof o.length!="undefined"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return i=i.replace(/\|/g,""),a+=o.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",o.length>0?a+=(p?[i,o.length,o.x,o.y]:[o.length,i]).join("|"):a+=i,a+Hv}}});var tS=tt((sH,JE)=>{"use strict";var eS=(i,o)=>{for(let a of Reflect.ownKeys(o))Object.defineProperty(i,a,Object.getOwnPropertyDescriptor(o,a));return i};JE.exports=eS;JE.exports.default=eS});var rS=tt((aH,S_)=>{"use strict";var vP=tS(),T_=new WeakMap,nS=(i,o={})=>{if(typeof i!="function")throw new TypeError("Expected a function");let a,p=0,_=i.displayName||i.name||"",t=function(...k){if(T_.set(t,++p),p===1)a=i.apply(this,k),i=null;else if(o.throw===!0)throw new Error(`Function \`${_}\` can only be called once`);return a};return vP(t,i),T_.set(t,p),t};S_.exports=nS;S_.exports.default=nS;S_.exports.callCount=i=>{if(!T_.has(i))throw new Error(`The given function \`${i.name}\` is not wrapped by the \`onetime\` package`);return T_.get(i)}});var iS=tt((fH,C_)=>{C_.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&C_.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&C_.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var tD=tt((cH,Fy)=>{var mP=require("assert"),Py=iS(),yP=/^win/i.test(process.platform),x_=require("events");typeof x_!="function"&&(x_=x_.EventEmitter);var Gl;process.__signal_exit_emitter__?Gl=process.__signal_exit_emitter__:(Gl=process.__signal_exit_emitter__=new x_,Gl.count=0,Gl.emitted={});Gl.infinite||(Gl.setMaxListeners(Infinity),Gl.infinite=!0);Fy.exports=function(i,o){mP.equal(typeof i,"function","a callback must be provided for exit handler"),Iy===!1&&uS();var a="exit";o&&o.alwaysLast&&(a="afterexit");var p=function(){Gl.removeListener(a,i),Gl.listeners("exit").length===0&&Gl.listeners("afterexit").length===0&&ZE()};return Gl.on(a,i),p};Fy.exports.unload=ZE;function ZE(){!Iy||(Iy=!1,Py.forEach(function(i){try{process.removeListener(i,$E[i])}catch(o){}}),process.emit=eD,process.reallyExit=oS,Gl.count-=1)}function qv(i,o,a){Gl.emitted[i]||(Gl.emitted[i]=!0,Gl.emit(i,o,a))}var $E={};Py.forEach(function(i){$E[i]=function(){var a=process.listeners(i);a.length===Gl.count&&(ZE(),qv("exit",null,i),qv("afterexit",null,i),yP&&i==="SIGHUP"&&(i="SIGINT"),process.kill(process.pid,i))}});Fy.exports.signals=function(){return Py};Fy.exports.load=uS;var Iy=!1;function uS(){Iy||(Iy=!0,Gl.count+=1,Py=Py.filter(function(i){try{return process.on(i,$E[i]),!0}catch(o){return!1}}),process.emit=_P,process.reallyExit=gP)}var oS=process.reallyExit;function gP(i){process.exitCode=i||0,qv("exit",process.exitCode,null),qv("afterexit",process.exitCode,null),oS.call(process,process.exitCode)}var eD=process.emit;function _P(i,o){if(i==="exit"){o!==void 0&&(process.exitCode=o);var a=eD.apply(this,arguments);return qv("exit",process.exitCode,null),qv("afterexit",process.exitCode,null),a}else return eD.apply(this,arguments)}});var sS=tt((dH,lS)=>{"use strict";var EP=rS(),DP=tD();lS.exports=EP(()=>{DP(()=>{process.stderr.write("[?25h")},{alwaysLast:!0})})});var nD=tt(Wv=>{"use strict";var wP=sS(),R_=!1;Wv.show=(i=process.stderr)=>{!i.isTTY||(R_=!1,i.write("[?25h"))};Wv.hide=(i=process.stderr)=>{!i.isTTY||(wP(),R_=!0,i.write("[?25l"))};Wv.toggle=(i,o)=>{i!==void 0&&(R_=i),R_?Wv.show(o):Wv.hide(o)}});var dS=tt(by=>{"use strict";var aS=by&&by.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(by,"__esModule",{value:!0});var fS=aS(QE()),cS=aS(nD()),SP=(i,{showCursor:o=!1}={})=>{let a=0,p="",_=!1,t=k=>{!o&&!_&&(cS.default.hide(),_=!0);let L=k+` -`;L!==p&&(p=L,i.write(fS.default.eraseLines(a)+L),a=L.split(` -`).length)};return t.clear=()=>{i.write(fS.default.eraseLines(a)),p="",a=0},t.done=()=>{p="",a=0,o||(cS.default.show(),_=!1)},t};by.default={create:SP}});var hS=tt((vH,pS)=>{pS.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY_BUILD_BASE",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}}]});var yS=tt(Fa=>{"use strict";var vS=hS(),Uc=process.env;Object.defineProperty(Fa,"_vendors",{value:vS.map(function(i){return i.constant})});Fa.name=null;Fa.isPR=null;vS.forEach(function(i){var o=Array.isArray(i.env)?i.env:[i.env],a=o.every(function(p){return mS(p)});if(Fa[i.constant]=a,a)switch(Fa.name=i.name,typeof i.pr){case"string":Fa.isPR=!!Uc[i.pr];break;case"object":"env"in i.pr?Fa.isPR=i.pr.env in Uc&&Uc[i.pr.env]!==i.pr.ne:"any"in i.pr?Fa.isPR=i.pr.any.some(function(p){return!!Uc[p]}):Fa.isPR=mS(i.pr);break;default:Fa.isPR=null}});Fa.isCI=!!(Uc.CI||Uc.CONTINUOUS_INTEGRATION||Uc.BUILD_NUMBER||Uc.RUN_ID||Fa.name);function mS(i){return typeof i=="string"?!!Uc[i]:Object.keys(i).every(function(o){return Uc[o]===i[o]})}});var _S=tt((yH,gS)=>{"use strict";gS.exports=yS().isCI});var DS=tt((gH,ES)=>{"use strict";var TP=i=>{let o=new Set;do for(let a of Reflect.ownKeys(i))o.add([i,a]);while((i=Reflect.getPrototypeOf(i))&&i!==Object.prototype);return o};ES.exports=(i,{include:o,exclude:a}={})=>{let p=_=>{let t=k=>typeof k=="string"?_===k:k.test(_);return o?o.some(t):a?!a.some(t):!0};for(let[_,t]of TP(i.constructor.prototype)){if(t==="constructor"||!p(t))continue;let k=Reflect.getOwnPropertyDescriptor(_,t);k&&typeof k.value=="function"&&(i[t]=i[t].bind(i))}return i}});var AS=tt(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});var Vv,By,A_,O_,rD;typeof window=="undefined"||typeof MessageChannel!="function"?(Gv=null,iD=null,uD=function(){if(Gv!==null)try{var i=ou.unstable_now();Gv(!0,i),Gv=null}catch(o){throw setTimeout(uD,0),o}},wS=Date.now(),ou.unstable_now=function(){return Date.now()-wS},Vv=function(i){Gv!==null?setTimeout(Vv,0,i):(Gv=i,setTimeout(uD,0))},By=function(i,o){iD=setTimeout(i,o)},A_=function(){clearTimeout(iD)},O_=function(){return!1},rD=ou.unstable_forceFrameRate=function(){}):(M_=window.performance,oD=window.Date,SS=window.setTimeout,TS=window.clearTimeout,typeof console!="undefined"&&(CS=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),typeof CS!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),typeof M_=="object"&&typeof M_.now=="function"?ou.unstable_now=function(){return M_.now()}:(xS=oD.now(),ou.unstable_now=function(){return oD.now()-xS}),Uy=!1,jy=null,k_=-1,lD=5,sD=0,O_=function(){return ou.unstable_now()>=sD},rD=function(){},ou.unstable_forceFrameRate=function(i){0>i||125L_(k,a))O!==void 0&&0>L_(O,k)?(i[p]=O,i[L]=a,p=L):(i[p]=k,i[t]=a,p=t);else if(O!==void 0&&0>L_(O,a))i[p]=O,i[L]=a,p=L;else break e}}return o}return null}function L_(i,o){var a=i.sortIndex-o.sortIndex;return a!==0?a:i.id-o.id}var $f=[],c2=[],CP=1,Ls=null,ds=3,P_=!1,Zp=!1,zy=!1;function I_(i){for(var o=cf(c2);o!==null;){if(o.callback===null)F_(c2);else if(o.startTime<=i)F_(c2),o.sortIndex=o.expirationTime,fD($f,o);else break;o=cf(c2)}}function cD(i){if(zy=!1,I_(i),!Zp)if(cf($f)!==null)Zp=!0,Vv(dD);else{var o=cf(c2);o!==null&&By(cD,o.startTime-i)}}function dD(i,o){Zp=!1,zy&&(zy=!1,A_()),P_=!0;var a=ds;try{for(I_(o),Ls=cf($f);Ls!==null&&(!(Ls.expirationTime>o)||i&&!O_());){var p=Ls.callback;if(p!==null){Ls.callback=null,ds=Ls.priorityLevel;var _=p(Ls.expirationTime<=o);o=ou.unstable_now(),typeof _=="function"?Ls.callback=_:Ls===cf($f)&&F_($f),I_(o)}else F_($f);Ls=cf($f)}if(Ls!==null)var t=!0;else{var k=cf(c2);k!==null&&By(cD,k.startTime-o),t=!1}return t}finally{Ls=null,ds=a,P_=!1}}function RS(i){switch(i){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var xP=rD;ou.unstable_ImmediatePriority=1;ou.unstable_UserBlockingPriority=2;ou.unstable_NormalPriority=3;ou.unstable_IdlePriority=5;ou.unstable_LowPriority=4;ou.unstable_runWithPriority=function(i,o){switch(i){case 1:case 2:case 3:case 4:case 5:break;default:i=3}var a=ds;ds=i;try{return o()}finally{ds=a}};ou.unstable_next=function(i){switch(ds){case 1:case 2:case 3:var o=3;break;default:o=ds}var a=ds;ds=o;try{return i()}finally{ds=a}};ou.unstable_scheduleCallback=function(i,o,a){var p=ou.unstable_now();if(typeof a=="object"&&a!==null){var _=a.delay;_=typeof _=="number"&&0<_?p+_:p,a=typeof a.timeout=="number"?a.timeout:RS(i)}else a=RS(i),_=p;return a=_+a,i={id:CP++,callback:o,priorityLevel:i,startTime:_,expirationTime:a,sortIndex:-1},_>p?(i.sortIndex=_,fD(c2,i),cf($f)===null&&i===cf(c2)&&(zy?A_():zy=!0,By(cD,_-p))):(i.sortIndex=a,fD($f,i),Zp||P_||(Zp=!0,Vv(dD))),i};ou.unstable_cancelCallback=function(i){i.callback=null};ou.unstable_wrapCallback=function(i){var o=ds;return function(){var a=ds;ds=o;try{return i.apply(this,arguments)}finally{ds=a}}};ou.unstable_getCurrentPriorityLevel=function(){return ds};ou.unstable_shouldYield=function(){var i=ou.unstable_now();I_(i);var o=cf($f);return o!==Ls&&Ls!==null&&o!==null&&o.callback!==null&&o.startTime<=i&&o.expirationTime{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});var i=!1,o=!1,a=!0,p,_,t,k,L;if(typeof window=="undefined"||typeof MessageChannel!="function"){var O=null,C=null,U=function(){if(O!==null)try{var wt=Ii.unstable_now(),bt=!0;O(bt,wt),O=null}catch(Hn){throw setTimeout(U,0),Hn}},H=Date.now();Ii.unstable_now=function(){return Date.now()-H},p=function(wt){O!==null?setTimeout(p,0,wt):(O=wt,setTimeout(U,0))},_=function(wt,bt){C=setTimeout(wt,bt)},t=function(){clearTimeout(C)},k=function(){return!1},L=Ii.unstable_forceFrameRate=function(){}}else{var W=window.performance,ne=window.Date,m=window.setTimeout,he=window.clearTimeout;if(typeof console!="undefined"){var Ee=window.requestAnimationFrame,ve=window.cancelAnimationFrame;typeof Ee!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),typeof ve!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if(typeof W=="object"&&typeof W.now=="function")Ii.unstable_now=function(){return W.now()};else{var se=ne.now();Ii.unstable_now=function(){return ne.now()-se}}var De=!1,pe=null,me=-1,ie=5,Oe=0,je=300,qe=!1;if(o&&navigator!==void 0&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0){var yt=navigator.scheduling;k=function(){var wt=Ii.unstable_now();return wt>=Oe?qe||yt.isInputPending()?!0:wt>=je:!1},L=function(){qe=!0}}else k=function(){return Ii.unstable_now()>=Oe},L=function(){};Ii.unstable_forceFrameRate=function(wt){if(wt<0||wt>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported");return}wt>0?ie=Math.floor(1e3/wt):ie=5};var gt=function(){if(pe!==null){var wt=Ii.unstable_now();Oe=wt+ie;var bt=!0;try{var Hn=pe(bt,wt);Hn?ut.postMessage(null):(De=!1,pe=null)}catch(qr){throw ut.postMessage(null),qr}}else De=!1;qe=!1},Xe=new MessageChannel,ut=Xe.port2;Xe.port1.onmessage=gt,p=function(wt){pe=wt,De||(De=!0,ut.postMessage(null))},_=function(wt,bt){me=m(function(){wt(Ii.unstable_now())},bt)},t=function(){he(me),me=-1}}function We(wt,bt){var Hn=wt.length;wt.push(bt),rt(wt,bt,Hn)}function Ft(wt){var bt=wt[0];return bt===void 0?null:bt}function Jt(wt){var bt=wt[0];if(bt!==void 0){var Hn=wt.pop();return Hn!==bt&&(wt[0]=Hn,Q(wt,Hn,0)),bt}else return null}function rt(wt,bt,Hn){for(var qr=Hn;;){var Ki=Math.floor((qr-1)/2),Qr=wt[Ki];if(Qr!==void 0&&fe(Qr,bt)>0)wt[Ki]=bt,wt[qr]=Qr,qr=Ki;else return}}function Q(wt,bt,Hn){for(var qr=Hn,Ki=wt.length;qrfr){if(fr*=2,fr>jr){console.error("Scheduler Profiling: Event log exceeded maximum size. Don't forget to call `stopLoggingProfilingEvents()`."),Dr();return}var Hn=new Int32Array(fr*4);Hn.set(Xt),zr=Hn.buffer,Xt=Hn}Xt.set(wt,bt)}}function mi(){fr=vr,zr=new ArrayBuffer(fr*4),Xt=new Int32Array(zr),wu=0}function Dr(){var wt=zr;return fr=0,zr=null,Xt=null,wu=0,wt}function $o(wt,bt){a&&(Vt[Xn]++,Xt!==null&&lu([d0,bt*1e3,wt.id,wt.priorityLevel]))}function G0(wt,bt){a&&(Vt[Er]=xe,Vt[w]=0,Vt[Xn]--,Xt!==null&&lu([Ro,bt*1e3,wt.id]))}function Uu(wt,bt){a&&(Vt[Xn]--,Xt!==null&&lu([Fs,bt*1e3,wt.id]))}function Y0(wt,bt){a&&(Vt[Er]=xe,Vt[w]=0,Vt[Xn]--,Xt!==null&&lu([Qo,bt*1e3,wt.id]))}function Xr(wt,bt){a&&(an++,Vt[Er]=wt.priorityLevel,Vt[w]=wt.id,Vt[jt]=an,Xt!==null&&lu([Jo,bt*1e3,wt.id,an]))}function Ao(wt,bt){a&&(Vt[Er]=xe,Vt[w]=0,Vt[jt]=0,Xt!==null&&lu([Zo,bt*1e3,wt.id,an]))}function Oo(wt){a&&(Mn++,Xt!==null&&lu([qt,wt*1e3,Mn]))}function F0(wt){a&&Xt!==null&&lu([xi,wt*1e3,Mn])}var su=1073741823,ki=-1,Ps=250,Kl=5e3,P0=1e4,p0=su,Hr=[],Ri=[],K0=1,yi=!1,en=null,bn=ct,Ai=!1,gi=!1,Wt=!1;function Au(wt){for(var bt=Ft(Ri);bt!==null;){if(bt.callback===null)Jt(Ri);else if(bt.startTime<=wt)Jt(Ri),bt.sortIndex=bt.expirationTime,We(Hr,bt),a&&($o(bt,wt),bt.isQueued=!0);else return;bt=Ft(Ri)}}function eu(wt){if(Wt=!1,Au(wt),!gi)if(Ft(Hr)!==null)gi=!0,p(X0);else{var bt=Ft(Ri);bt!==null&&_(eu,bt.startTime-wt)}}function X0(wt,bt){a&&F0(bt),gi=!1,Wt&&(Wt=!1,t()),Ai=!0;var Hn=bn;try{if(a)try{return Yi(wt,bt)}catch(Qr){if(en!==null){var qr=Ii.unstable_now();Y0(en,qr),en.isQueued=!1}throw Qr}else return Yi(wt,bt)}finally{if(en=null,bn=Hn,Ai=!1,a){var Ki=Ii.unstable_now();Oo(Ki)}}}function Yi(wt,bt){var Hn=bt;for(Au(Hn),en=Ft(Hr);en!==null&&!(i&&yi)&&!(en.expirationTime>Hn&&(!wt||k()));){var qr=en.callback;if(qr!==null){en.callback=null,bn=en.priorityLevel;var Ki=en.expirationTime<=Hn;Xr(en,Hn);var Qr=qr(Ki);Hn=Ii.unstable_now(),typeof Qr=="function"?(en.callback=Qr,Ao(en,Hn)):(a&&(G0(en,Hn),en.isQueued=!1),en===Ft(Hr)&&Jt(Hr)),Au(Hn)}else Jt(Hr);en=Ft(Hr)}if(en!==null)return!0;var Ou=Ft(Ri);return Ou!==null&&_(eu,Ou.startTime-Hn),!1}function Xl(wt,bt){switch(wt){case oe:case ze:case ct:case Rt:case nn:break;default:wt=ct}var Hn=bn;bn=wt;try{return bt()}finally{bn=Hn}}function Mo(wt){var bt;switch(bn){case oe:case ze:case ct:bt=ct;break;default:bt=bn;break}var Hn=bn;bn=bt;try{return wt()}finally{bn=Hn}}function ai(wt){var bt=bn;return function(){var Hn=bn;bn=bt;try{return wt.apply(this,arguments)}finally{bn=Hn}}}function so(wt){switch(wt){case oe:return ki;case ze:return Ps;case nn:return p0;case Rt:return P0;case ct:default:return Kl}}function Ql(wt,bt,Hn){var qr=Ii.unstable_now(),Ki,Qr;if(typeof Hn=="object"&&Hn!==null){var Ou=Hn.delay;typeof Ou=="number"&&Ou>0?Ki=qr+Ou:Ki=qr,Qr=typeof Hn.timeout=="number"?Hn.timeout:so(wt)}else Qr=so(wt),Ki=qr;var h0=Ki+Qr,Ni={id:K0++,callback:bt,priorityLevel:wt,startTime:Ki,expirationTime:h0,sortIndex:-1};return a&&(Ni.isQueued=!1),Ki>qr?(Ni.sortIndex=Ki,We(Ri,Ni),Ft(Hr)===null&&Ni===Ft(Ri)&&(Wt?t():Wt=!0,_(eu,Ki-qr))):(Ni.sortIndex=h0,We(Hr,Ni),a&&($o(Ni,qr),Ni.isQueued=!0),!gi&&!Ai&&(gi=!0,p(X0))),Ni}function ko(){yi=!0}function Is(){yi=!1,!gi&&!Ai&&(gi=!0,p(X0))}function $n(){return Ft(Hr)}function el(wt){if(a&&wt.isQueued){var bt=Ii.unstable_now();Uu(wt,bt),wt.isQueued=!1}wt.callback=null}function ao(){return bn}function I0(){var wt=Ii.unstable_now();Au(wt);var bt=Ft(Hr);return bt!==en&&en!==null&&bt!==null&&bt.callback!==null&&bt.startTime<=wt&&bt.expirationTime{"use strict";process.env.NODE_ENV==="production"?pD.exports=AS():pD.exports=OS()});var MS=tt((wH,Hy)=>{Hy.exports=function i(o){"use strict";var a=Oy(),p=Mi(),_=b_();function t(g){for(var y="https://reactjs.org/docs/error-decoder.html?invariant="+g,R=1;RK0||(g.current=Ri[K0],Ri[K0]=null,K0--)}function en(g,y){K0++,Ri[K0]=g.current,g.current=y}var bn={},Ai={current:bn},gi={current:!1},Wt=bn;function Au(g,y){var R=g.type.contextTypes;if(!R)return bn;var F=g.stateNode;if(F&&F.__reactInternalMemoizedUnmaskedChildContext===y)return F.__reactInternalMemoizedMaskedChildContext;var b={},J;for(J in R)b[J]=y[J];return F&&(g=g.stateNode,g.__reactInternalMemoizedUnmaskedChildContext=y,g.__reactInternalMemoizedMaskedChildContext=b),b}function eu(g){return g=g.childContextTypes,g!=null}function X0(g){yi(gi,g),yi(Ai,g)}function Yi(g){yi(gi,g),yi(Ai,g)}function Xl(g,y,R){if(Ai.current!==bn)throw Error(t(168));en(Ai,y,g),en(gi,R,g)}function Mo(g,y,R){var F=g.stateNode;if(g=y.childContextTypes,typeof F.getChildContext!="function")return R;F=F.getChildContext();for(var b in F)if(!(b in g))throw Error(t(108,je(y)||"Unknown",b));return a({},R,{},F)}function ai(g){var y=g.stateNode;return y=y&&y.__reactInternalMemoizedMergedChildContext||bn,Wt=Ai.current,en(Ai,y,g),en(gi,gi.current,g),!0}function so(g,y,R){var F=g.stateNode;if(!F)throw Error(t(169));R?(y=Mo(g,y,Wt),F.__reactInternalMemoizedMergedChildContext=y,yi(gi,g),yi(Ai,g),en(Ai,y,g)):yi(gi,g),en(gi,R,g)}var Ql=_.unstable_runWithPriority,ko=_.unstable_scheduleCallback,Is=_.unstable_cancelCallback,$n=_.unstable_shouldYield,el=_.unstable_requestPaint,ao=_.unstable_now,I0=_.unstable_getCurrentPriorityLevel,wl=_.unstable_ImmediatePriority,No=_.unstable_UserBlockingPriority,wt=_.unstable_NormalPriority,bt=_.unstable_LowPriority,Hn=_.unstable_IdlePriority,qr={},Ki=el!==void 0?el:function(){},Qr=null,Ou=null,h0=!1,Ni=ao(),v0=1e4>Ni?ao:function(){return ao()-Ni};function hs(){switch(I0()){case wl:return 99;case No:return 98;case wt:return 97;case bt:return 96;case Hn:return 95;default:throw Error(t(332))}}function Tt(g){switch(g){case 99:return wl;case 98:return No;case 97:return wt;case 96:return bt;case 95:return Hn;default:throw Error(t(332))}}function fo(g,y){return g=Tt(g),Ql(g,y)}function tl(g,y,R){return g=Tt(g),ko(g,y,R)}function Jl(g){return Qr===null?(Qr=[g],Ou=ko(wl,vs)):Qr.push(g),qr}function ju(){if(Ou!==null){var g=Ou;Ou=null,Is(g)}vs()}function vs(){if(!h0&&Qr!==null){h0=!0;var g=0;try{var y=Qr;fo(99,function(){for(;g=y&&(po=!0),g.firstContext=null)}function ku(g,y){if(Mu!==g&&y!==!1&&y!==0)if((typeof y!="number"||y===1073741823)&&(Mu=g,y=1073741823),y={context:g,observedBits:y,next:null},Si===null){if(cr===null)throw Error(t(308));Si=y,cr.dependencies={expirationTime:0,firstContext:y,responders:null}}else Si=Si.next=y;return ln?g._currentValue:g._currentValue2}var co=!1;function qu(g){return{baseState:g,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Pa(g){return{baseState:g.baseState,firstUpdate:g.firstUpdate,lastUpdate:g.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function m0(g,y){return{expirationTime:g,suspenseConfig:y,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function ia(g,y){g.lastUpdate===null?g.firstUpdate=g.lastUpdate=y:(g.lastUpdate.next=y,g.lastUpdate=y)}function Q0(g,y){var R=g.alternate;if(R===null){var F=g.updateQueue,b=null;F===null&&(F=g.updateQueue=qu(g.memoizedState))}else F=g.updateQueue,b=R.updateQueue,F===null?b===null?(F=g.updateQueue=qu(g.memoizedState),b=R.updateQueue=qu(R.memoizedState)):F=g.updateQueue=Pa(b):b===null&&(b=R.updateQueue=Pa(F));b===null||F===b?ia(F,y):F.lastUpdate===null||b.lastUpdate===null?(ia(F,y),ia(b,y)):(ia(F,y),b.lastUpdate=y)}function ua(g,y){var R=g.updateQueue;R=R===null?g.updateQueue=qu(g.memoizedState):Ia(g,R),R.lastCapturedUpdate===null?R.firstCapturedUpdate=R.lastCapturedUpdate=y:(R.lastCapturedUpdate.next=y,R.lastCapturedUpdate=y)}function Ia(g,y){var R=g.alternate;return R!==null&&y===R.updateQueue&&(y=g.updateQueue=Pa(y)),y}function ms(g,y,R,F,b,J){switch(R.tag){case 1:return g=R.payload,typeof g=="function"?g.call(J,F,b):g;case 3:g.effectTag=g.effectTag&-4097|64;case 0:if(g=R.payload,b=typeof g=="function"?g.call(J,F,b):g,b==null)break;return a({},F,b);case 2:co=!0}return F}function S0(g,y,R,F,b){co=!1,y=Ia(g,y);for(var J=y.baseState,ce=null,mt=0,xt=y.firstUpdate,kt=J;xt!==null;){var xr=xt.expirationTime;xrci?(Qi=ur,ur=null):Qi=ur.sibling;var Gr=cu(Ve,ur,lt[ci],$t);if(Gr===null){ur===null&&(ur=Qi);break}g&&ur&&Gr.alternate===null&&y(Ve,ur),Ue=J(Gr,Ue,ci),si===null?Wn=Gr:si.sibling=Gr,si=Gr,ur=Qi}if(ci===lt.length)return R(Ve,ur),Wn;if(ur===null){for(;cici?(Qi=ur,ur=null):Qi=ur.sibling;var Cu=cu(Ve,ur,Gr.value,$t);if(Cu===null){ur===null&&(ur=Qi);break}g&&ur&&Cu.alternate===null&&y(Ve,ur),Ue=J(Cu,Ue,ci),si===null?Wn=Cu:si.sibling=Cu,si=Cu,ur=Qi}if(Gr.done)return R(Ve,ur),Wn;if(ur===null){for(;!Gr.done;ci++,Gr=lt.next())Gr=i0(Ve,Gr.value,$t),Gr!==null&&(Ue=J(Gr,Ue,ci),si===null?Wn=Gr:si.sibling=Gr,si=Gr);return Wn}for(ur=F(Ve,ur);!Gr.done;ci++,Gr=lt.next())Gr=z0(ur,Ve,ci,Gr.value,$t),Gr!==null&&(g&&Gr.alternate!==null&&ur.delete(Gr.key===null?ci:Gr.key),Ue=J(Gr,Ue,ci),si===null?Wn=Gr:si.sibling=Gr,si=Gr);return g&&ur.forEach(function(Wa){return y(Ve,Wa)}),Wn}return function(Ve,Ue,lt,$t){var Wn=typeof lt=="object"&<!==null&<.type===U&<.key===null;Wn&&(lt=lt.props.children);var si=typeof lt=="object"&<!==null;if(si)switch(lt.$$typeof){case O:e:{for(si=lt.key,Wn=Ue;Wn!==null;){if(Wn.key===si)if(Wn.tag===7?lt.type===U:Wn.elementType===lt.type){R(Ve,Wn.sibling),Ue=b(Wn,lt.type===U?lt.props.children:lt.props,$t),Ue.ref=Us(Ve,Wn,lt),Ue.return=Ve,Ve=Ue;break e}else{R(Ve,Wn);break}else y(Ve,Wn);Wn=Wn.sibling}lt.type===U?(Ue=r0(lt.props.children,Ve.mode,$t,lt.key),Ue.return=Ve,Ve=Ue):($t=qa(lt.type,lt.key,lt.props,null,Ve.mode,$t),$t.ref=Us(Ve,Ue,lt),$t.return=Ve,Ve=$t)}return ce(Ve);case C:e:{for(Wn=lt.key;Ue!==null;){if(Ue.key===Wn)if(Ue.tag===4&&Ue.stateNode.containerInfo===lt.containerInfo&&Ue.stateNode.implementation===lt.implementation){R(Ve,Ue.sibling),Ue=b(Ue,lt.children||[],$t),Ue.return=Ve,Ve=Ue;break e}else{R(Ve,Ue);break}else y(Ve,Ue);Ue=Ue.sibling}Ue=Df(lt,Ve.mode,$t),Ue.return=Ve,Ve=Ue}return ce(Ve)}if(typeof lt=="string"||typeof lt=="number")return lt=""+lt,Ue!==null&&Ue.tag===6?(R(Ve,Ue.sibling),Ue=b(Ue,lt,$t),Ue.return=Ve,Ve=Ue):(R(Ve,Ue),Ue=j0(lt,Ve.mode,$t),Ue.return=Ve,Ve=Ue),ce(Ve);if(y0(lt))return Ol(Ve,Ue,lt,$t);if(ie(lt))return u0(Ve,Ue,lt,$t);if(si&&ji(Ve,lt),typeof lt=="undefined"&&!Wn)switch(Ve.tag){case 1:case 0:throw Ve=Ve.type,Error(t(152,Ve.displayName||Ve.name||"Component"))}return R(Ve,Ue)}}var z=B(!0),G=B(!1),$={},Te={current:$},ge={current:$},Re={current:$};function Z(g){if(g===$)throw Error(t(174));return g}function ke(g,y){en(Re,y,g),en(ge,g,g),en(Te,$,g),y=Ft(y),yi(Te,g),en(Te,y,g)}function Qe(g){yi(Te,g),yi(ge,g),yi(Re,g)}function ht(g){var y=Z(Re.current),R=Z(Te.current);y=Jt(R,g.type,y),R!==y&&(en(ge,g,g),en(Te,y,g))}function ue(g){ge.current===g&&(yi(Te,g),yi(ge,g))}var He={current:0};function nt(g){for(var y=g;y!==null;){if(y.tag===13){var R=y.memoizedState;if(R!==null&&(R=R.dehydrated,R===null||Xr(R)||Ao(R)))return y}else if(y.tag===19&&y.memoizedProps.revealOrder!==void 0){if((y.effectTag&64)!=0)return y}else if(y.child!==null){y.child.return=y,y=y.child;continue}if(y===g)break;for(;y.sibling===null;){if(y.return===null||y.return===g)return null;y=y.return}y.sibling.return=y.return,y=y.sibling}return null}function Ct(g,y){return{responder:g,props:y}}var Mt=k.ReactCurrentDispatcher,It=k.ReactCurrentBatchConfig,sn=0,rn=null,Lt=null,Dn=null,dr=null,er=null,Cr=null,An=0,Nr=null,g0=0,Lr=!1,it=null,Dt=0;function $e(){throw Error(t(321))}function Pt(g,y){if(y===null)return!1;for(var R=0;RAn&&(An=xr,Ua(An))):(cc(xr,xt.suspenseConfig),J=xt.eagerReducer===g?xt.eagerState:g(J,xt.action)),ce=xt,xt=xt.next}while(xt!==null&&xt!==F);kt||(mt=ce,b=J),Le(J,y.memoizedState)||(po=!0),y.memoizedState=J,y.baseUpdate=mt,y.baseState=b,R.lastRenderedState=J}return[y.memoizedState,R.dispatch]}function T0(g){var y=Jn();return typeof g=="function"&&(g=g()),y.memoizedState=y.baseState=g,g=y.queue={last:null,dispatch:null,lastRenderedReducer:au,lastRenderedState:g},g=g.dispatch=js.bind(null,rn,g),[y.memoizedState,g]}function J0(g){return Nu(au,g)}function Lu(g,y,R,F){return g={tag:g,create:y,destroy:R,deps:F,next:null},Nr===null?(Nr={lastEffect:null},Nr.lastEffect=g.next=g):(y=Nr.lastEffect,y===null?Nr.lastEffect=g.next=g:(R=y.next,y.next=g,g.next=R,Nr.lastEffect=g)),g}function _i(g,y,R,F){var b=Jn();g0|=g,b.memoizedState=Lu(y,R,void 0,F===void 0?null:F)}function Fo(g,y,R,F){var b=wr();F=F===void 0?null:F;var J=void 0;if(Lt!==null){var ce=Lt.memoizedState;if(J=ce.destroy,F!==null&&Pt(F,ce.deps)){Lu(0,R,J,F);return}}g0|=g,b.memoizedState=Lu(y,R,J,F)}function nl(g,y){return _i(516,192,g,y)}function hf(g,y){return Fo(516,192,g,y)}function Sl(g,y){if(typeof y=="function")return g=g(),y(g),function(){y(null)};if(y!=null)return g=g(),y.current=g,function(){y.current=null}}function vf(){}function Po(g,y){return Jn().memoizedState=[g,y===void 0?null:y],g}function ys(g,y){var R=wr();y=y===void 0?null:y;var F=R.memoizedState;return F!==null&&y!==null&&Pt(y,F[1])?F[0]:(R.memoizedState=[g,y],g)}function js(g,y,R){if(!(25>Dt))throw Error(t(301));var F=g.alternate;if(g===rn||F!==null&&F===rn)if(Lr=!0,g={expirationTime:sn,suspenseConfig:null,action:R,eagerReducer:null,eagerState:null,next:null},it===null&&(it=new Map),R=it.get(y),R===void 0)it.set(y,g);else{for(y=R;y.next!==null;)y=y.next;y.next=g}else{var b=D0(),J=fi.suspense;b=Un(b,g,J),J={expirationTime:b,suspenseConfig:J,action:R,eagerReducer:null,eagerState:null,next:null};var ce=y.last;if(ce===null)J.next=J;else{var mt=ce.next;mt!==null&&(J.next=mt),ce.next=J}if(y.last=J,g.expirationTime===0&&(F===null||F.expirationTime===0)&&(F=y.lastRenderedReducer,F!==null))try{var xt=y.lastRenderedState,kt=F(xt,R);if(J.eagerReducer=F,J.eagerState=kt,Le(kt,xt))return}catch(xr){}finally{}t0(g,b)}}var Io={readContext:ku,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useLayoutEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useResponder:$e,useDeferredValue:$e,useTransition:$e},bo={readContext:ku,useCallback:Po,useContext:ku,useEffect:nl,useImperativeHandle:function(g,y,R){return R=R!=null?R.concat([g]):null,_i(4,36,Sl.bind(null,y,g),R)},useLayoutEffect:function(g,y){return _i(4,36,g,y)},useMemo:function(g,y){var R=Jn();return y=y===void 0?null:y,g=g(),R.memoizedState=[g,y],g},useReducer:function(g,y,R){var F=Jn();return y=R!==void 0?R(y):y,F.memoizedState=F.baseState=y,g=F.queue={last:null,dispatch:null,lastRenderedReducer:g,lastRenderedState:y},g=g.dispatch=js.bind(null,rn,g),[F.memoizedState,g]},useRef:function(g){var y=Jn();return g={current:g},y.memoizedState=g},useState:T0,useDebugValue:vf,useResponder:Ct,useDeferredValue:function(g,y){var R=T0(g),F=R[0],b=R[1];return nl(function(){_.unstable_next(function(){var J=It.suspense;It.suspense=y===void 0?null:y;try{b(g)}finally{It.suspense=J}})},[g,y]),F},useTransition:function(g){var y=T0(!1),R=y[0],F=y[1];return[Po(function(b){F(!0),_.unstable_next(function(){var J=It.suspense;It.suspense=g===void 0?null:g;try{F(!1),b()}finally{It.suspense=J}})},[g,R]),R]}},gs={readContext:ku,useCallback:ys,useContext:ku,useEffect:hf,useImperativeHandle:function(g,y,R){return R=R!=null?R.concat([g]):null,Fo(4,36,Sl.bind(null,y,g),R)},useLayoutEffect:function(g,y){return Fo(4,36,g,y)},useMemo:function(g,y){var R=wr();y=y===void 0?null:y;var F=R.memoizedState;return F!==null&&y!==null&&Pt(y,F[1])?F[0]:(g=g(),R.memoizedState=[g,y],g)},useReducer:Nu,useRef:function(){return wr().memoizedState},useState:J0,useDebugValue:vf,useResponder:Ct,useDeferredValue:function(g,y){var R=J0(g),F=R[0],b=R[1];return hf(function(){_.unstable_next(function(){var J=It.suspense;It.suspense=y===void 0?null:y;try{b(g)}finally{It.suspense=J}})},[g,y]),F},useTransition:function(g){var y=J0(!1),R=y[0],F=y[1];return[ys(function(b){F(!0),_.unstable_next(function(){var J=It.suspense;It.suspense=g===void 0?null:g;try{F(!1),b()}finally{It.suspense=J}})},[g,R]),R]}},Qu=null,Tu=null,Ei=!1;function C0(g,y){var R=zo(5,null,null,0);R.elementType="DELETED",R.type="DELETED",R.stateNode=y,R.return=g,R.effectTag=8,g.lastEffect!==null?(g.lastEffect.nextEffect=R,g.lastEffect=R):g.firstEffect=g.lastEffect=R}function Z0(g,y){switch(g.tag){case 5:return y=Uu(y,g.type,g.pendingProps),y!==null?(g.stateNode=y,!0):!1;case 6:return y=Y0(y,g.pendingProps),y!==null?(g.stateNode=y,!0):!1;case 13:return!1;default:return!1}}function Bo(g){if(Ei){var y=Tu;if(y){var R=y;if(!Z0(g,y)){if(y=Oo(R),!y||!Z0(g,y)){g.effectTag=g.effectTag&-1025|2,Ei=!1,Qu=g;return}C0(Qu,R)}Qu=g,Tu=F0(y)}else g.effectTag=g.effectTag&-1025|2,Ei=!1,Qu=g}}function la(g){for(g=g.return;g!==null&&g.tag!==5&&g.tag!==3&&g.tag!==13;)g=g.return;Qu=g}function $l(g){if(!w||g!==Qu)return!1;if(!Ei)return la(g),Ei=!0,!1;var y=g.type;if(g.tag!==5||y!=="head"&&y!=="body"&&!ct(y,g.memoizedProps))for(y=Tu;y;)C0(g,y),y=Oo(y);if(la(g),g.tag===13){if(!w)throw Error(t(316));if(g=g.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(t(317));Tu=Ps(g)}else Tu=Qu?Oo(g.stateNode):null;return!0}function tu(){w&&(Tu=Qu=null,Ei=!1)}var ei=k.ReactCurrentOwner,po=!1;function Bi(g,y,R,F){y.child=g===null?G(y,null,R,F):z(y,g.child,R,F)}function Ci(g,y,R,F,b){R=R.render;var J=y.ref;return Lo(y,b),F=un(g,y,R,F,J,b),g!==null&&!po?(y.updateQueue=g.updateQueue,y.effectTag&=-517,g.expirationTime<=b&&(g.expirationTime=0),yu(g,y,b)):(y.effectTag|=1,Bi(g,y,F,b),y.child)}function mf(g,y,R,F,b,J){if(g===null){var ce=R.type;return typeof ce=="function"&&!Ef(ce)&&ce.defaultProps===void 0&&R.compare===null&&R.defaultProps===void 0?(y.tag=15,y.type=ce,yf(g,y,ce,F,b,J)):(g=qa(R.type,null,F,null,y.mode,J),g.ref=y.ref,g.return=y,y.child=g)}return ce=g.child,by)&&Vr.set(g,y)))}}function no(g,y){g.expirationTimeg?y:g)}function n0(g){if(g.lastExpiredTime!==0)g.callbackExpirationTime=1073741823,g.callbackPriority=99,g.callbackNode=Jl(ro.bind(null,g));else{var y=vo(g),R=g.callbackNode;if(y===0)R!==null&&(g.callbackNode=null,g.callbackExpirationTime=0,g.callbackPriority=90);else{var F=D0();if(y===1073741823?F=99:y===1||y===2?F=95:(F=10*(1073741821-y)-10*(1073741821-F),F=0>=F?99:250>=F?98:5250>=F?97:95),R!==null){var b=g.callbackPriority;if(g.callbackExpirationTime===y&&b>=F)return;R!==qr&&Is(R)}g.callbackExpirationTime=y,g.callbackPriority=F,y=y===1073741823?Jl(ro.bind(null,g)):tl(F,Uo.bind(null,g),{timeout:10*(1073741821-y)-v0()}),g.callbackNode=y}}}function Uo(g,y){if(ru=0,y)return y=D0(),da(g,y),n0(g),null;var R=vo(g);if(R!==0){if(y=g.callbackNode,(Fn&(nu|fu))!==Rr)throw Error(t(327));if(qs(),g===ae&&R===Fe||Ds(g,R),re!==null){var F=Fn;Fn|=nu;var b=U0(g);do try{nd();break}catch(mt){fa(g,mt)}while(1);if(zu(),Fn=F,$u.current=b,Ae===ni)throw y=st,Ds(g,R),Al(g,R),n0(g),y;if(re===null)switch(b=g.finishedWork=g.current.alternate,g.finishedExpirationTime=R,F=Ae,ae=null,F){case Li:case ni:throw Error(t(345));case Kn:da(g,2=R){g.lastPingedTime=R,Ds(g,R);break}}if(J=vo(g),J!==0&&J!==R)break;if(F!==0&&F!==R){g.lastPingedTime=F;break}g.timeoutHandle=an(xl.bind(null,g),b);break}xl(g);break;case _0:if(Al(g,R),F=g.lastSuspendedTime,R===F&&(g.nextKnownPendingLevel=Hc(b)),_n&&(b=g.lastPingedTime,b===0||b>=R)){g.lastPingedTime=R,Ds(g,R);break}if(b=vo(g),b!==0&&b!==R)break;if(F!==0&&F!==R){g.lastPingedTime=F;break}if(Qt!==1073741823?F=10*(1073741821-Qt)-v0():vt===1073741823?F=0:(F=10*(1073741821-vt)-5e3,b=v0(),R=10*(1073741821-R)-b,F=b-F,0>F&&(F=0),F=(120>F?120:480>F?480:1080>F?1080:1920>F?1920:3e3>F?3e3:4320>F?4320:1960*gf(F/1960))-F,R=F?F=0:(b=ce.busyDelayMs|0,J=v0()-(10*(1073741821-J)-(ce.timeoutMs|0||5e3)),F=J<=b?0:b+F-J),10 component higher in the tree to provide a loading indicator or placeholder to display.`+Hr(b))}Ae!==E0&&(Ae=Kn),J=Tl(J,b),xt=F;do{switch(xt.tag){case 3:ce=J,xt.effectTag|=4096,xt.expirationTime=y;var Ue=_s(xt,ce,y);ua(xt,Ue);break e;case 1:ce=J;var lt=xt.type,$t=xt.stateNode;if((xt.effectTag&64)==0&&(typeof lt.getDerivedStateFromError=="function"||$t!==null&&typeof $t.componentDidCatch=="function"&&(mr===null||!mr.has($t)))){xt.effectTag|=4096,xt.expirationTime=y;var Wn=aa(xt,ce,y);ua(xt,Wn);break e}}xt=xt.return}while(xt!==null)}re=mo(re)}catch(si){y=si;continue}break}while(1)}function U0(){var g=$u.current;return $u.current=Io,g===null?Io:g}function cc(g,y){gSn&&(Sn=g)}function E2(){for(;re!==null;)re=rd(re)}function nd(){for(;re!==null&&!$n();)re=rd(re)}function rd(g){var y=Ha(g.alternate,g,Fe);return g.memoizedProps=g.pendingProps,y===null&&(y=mo(g)),Es.current=null,y}function mo(g){re=g;do{var y=re.alternate;if(g=re.return,(re.effectTag&2048)==0){e:{var R=y;y=re;var F=Fe,b=y.pendingProps;switch(y.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:eu(y.type)&&X0(y);break;case 3:Qe(y),Yi(y),b=y.stateNode,b.pendingContext&&(b.context=b.pendingContext,b.pendingContext=null),(R===null||R.child===null)&&$l(y)&&Ju(y),Jr(y);break;case 5:ue(y);var J=Z(Re.current);if(F=y.type,R!==null&&y.stateNode!=null)Wu(R,y,F,b,J),R.ref!==y.ref&&(y.effectTag|=128);else if(b){if(R=Z(Te.current),$l(y)){if(b=y,!w)throw Error(t(175));R=su(b.stateNode,b.type,b.memoizedProps,J,R,b),b.updateQueue=R,R=R!==null,R&&Ju(y)}else{var ce=fe(F,b,J,R,y);ti(ce,y,!1,!1),y.stateNode=ce,oe(ce,F,b,J,R)&&Ju(y)}y.ref!==null&&(y.effectTag|=128)}else if(y.stateNode===null)throw Error(t(166));break;case 6:if(R&&y.stateNode!=null)Rn(R,y,R.memoizedProps,b);else{if(typeof b!="string"&&y.stateNode===null)throw Error(t(166));if(R=Z(Re.current),J=Z(Te.current),$l(y)){if(R=y,!w)throw Error(t(176));(R=ki(R.stateNode,R.memoizedProps,R))&&Ju(y)}else y.stateNode=nn(b,R,J,y)}break;case 11:break;case 13:if(yi(He,y),b=y.memoizedState,(y.effectTag&64)!=0){y.expirationTime=F;break e}b=b!==null,J=!1,R===null?y.memoizedProps.fallback!==void 0&&$l(y):(F=R.memoizedState,J=F!==null,b||F===null||(F=R.child.sibling,F!==null&&(ce=y.firstEffect,ce!==null?(y.firstEffect=F,F.nextEffect=ce):(y.firstEffect=y.lastEffect=F,F.nextEffect=null),F.effectTag=8))),b&&!J&&(y.mode&2)!=0&&(R===null&&y.memoizedProps.unstable_avoidThisFallback!==!0||(He.current&1)!=0?Ae===Li&&(Ae=e0):((Ae===Li||Ae===e0)&&(Ae=_0),Sn!==0&&ae!==null&&(Al(ae,Fe),Ts(ae,Sn)))),Er&&b&&(y.effectTag|=4),Vt&&(b||J)&&(y.effectTag|=4);break;case 7:break;case 8:break;case 12:break;case 4:Qe(y),Jr(y);break;case 10:Su(y);break;case 9:break;case 14:break;case 17:eu(y.type)&&X0(y);break;case 19:if(yi(He,y),b=y.memoizedState,b===null)break;if(J=(y.effectTag&64)!=0,ce=b.rendering,ce===null){if(J)Fu(b,!1);else if(Ae!==Li||R!==null&&(R.effectTag&64)!=0)for(R=y.child;R!==null;){if(ce=nt(R),ce!==null){for(y.effectTag|=64,Fu(b,!1),R=ce.updateQueue,R!==null&&(y.updateQueue=R,y.effectTag|=4),b.lastEffect===null&&(y.firstEffect=null),y.lastEffect=b.lastEffect,R=F,b=y.child;b!==null;)J=b,F=R,J.effectTag&=2,J.nextEffect=null,J.firstEffect=null,J.lastEffect=null,ce=J.alternate,ce===null?(J.childExpirationTime=0,J.expirationTime=F,J.child=null,J.memoizedProps=null,J.memoizedState=null,J.updateQueue=null,J.dependencies=null):(J.childExpirationTime=ce.childExpirationTime,J.expirationTime=ce.expirationTime,J.child=ce.child,J.memoizedProps=ce.memoizedProps,J.memoizedState=ce.memoizedState,J.updateQueue=ce.updateQueue,F=ce.dependencies,J.dependencies=F===null?null:{expirationTime:F.expirationTime,firstContext:F.firstContext,responders:F.responders}),b=b.sibling;en(He,He.current&1|2,y),y=y.child;break e}R=R.sibling}}else{if(!J)if(R=nt(ce),R!==null){if(y.effectTag|=64,J=!0,R=R.updateQueue,R!==null&&(y.updateQueue=R,y.effectTag|=4),Fu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!ce.alternate){y=y.lastEffect=b.lastEffect,y!==null&&(y.nextEffect=null);break}}else v0()>b.tailExpiration&&1b&&(b=F),ce>b&&(b=ce),J=J.sibling;R.childExpirationTime=b}if(y!==null)return y;g!==null&&(g.effectTag&2048)==0&&(g.firstEffect===null&&(g.firstEffect=re.firstEffect),re.lastEffect!==null&&(g.lastEffect!==null&&(g.lastEffect.nextEffect=re.firstEffect),g.lastEffect=re.lastEffect),1g?y:g}function xl(g){var y=hs();return fo(99,il.bind(null,g,y)),null}function il(g,y){do qs();while(ri!==null);if((Fn&(nu|fu))!==Rr)throw Error(t(327));var R=g.finishedWork,F=g.finishedExpirationTime;if(R===null)return null;if(g.finishedWork=null,g.finishedExpirationTime=0,R===g.current)throw Error(t(177));g.callbackNode=null,g.callbackExpirationTime=0,g.callbackPriority=90,g.nextKnownPendingLevel=0;var b=Hc(R);if(g.firstPendingTime=b,F<=g.lastSuspendedTime?g.firstSuspendedTime=g.lastSuspendedTime=g.nextKnownPendingLevel=0:F<=g.firstSuspendedTime&&(g.firstSuspendedTime=F-1),F<=g.lastPingedTime&&(g.lastPingedTime=0),F<=g.lastExpiredTime&&(g.lastExpiredTime=0),g===ae&&(re=ae=null,Fe=0),1=R?Kt(g,y,R):(en(He,He.current&1,y),y=yu(g,y,R),y!==null?y.sibling:null);en(He,He.current&1,y);break;case 19:if(F=y.childExpirationTime>=R,(g.effectTag&64)!=0){if(F)return xn(g,y,R);y.effectTag|=64}if(b=y.memoizedState,b!==null&&(b.rendering=null,b.tail=null),en(He,He.current,y),!F)return null}return yu(g,y,R)}po=!1}}else po=!1;switch(y.expirationTime=0,y.tag){case 2:if(F=y.type,g!==null&&(g.alternate=null,y.alternate=null,y.effectTag|=2),g=y.pendingProps,b=Au(y,Ai.current),Lo(y,R),b=un(null,y,F,g,b,R),y.effectTag|=1,typeof b=="object"&&b!==null&&typeof b.render=="function"&&b.$$typeof===void 0){if(y.tag=1,fn(),eu(F)){var J=!0;ai(y)}else J=!1;y.memoizedState=b.state!==null&&b.state!==void 0?b.state:null;var ce=F.getDerivedStateFromProps;typeof ce=="function"&&Zl(y,F,ce,g),b.updater=oa,y.stateNode=b,b._reactInternalFiber=y,Bs(y,F,g,R),y=et(null,y,F,!0,J,R)}else y.tag=0,Bi(null,y,b,R),y=y.child;return y;case 16:if(b=y.elementType,g!==null&&(g.alternate=null,y.alternate=null,y.effectTag|=2),g=y.pendingProps,Oe(b),b._status!==1)throw b._result;switch(b=b._result,y.type=b,J=y.tag=ul(b),g=Yn(b,g),J){case 0:y=eo(null,y,b,g,R);break;case 1:y=Ce(null,y,b,g,R);break;case 11:y=Ci(null,y,b,g,R);break;case 14:y=mf(null,y,b,Yn(b.type,g),F,R);break;default:throw Error(t(306,b,""))}return y;case 0:return F=y.type,b=y.pendingProps,b=y.elementType===F?b:Yn(F,b),eo(g,y,F,b,R);case 1:return F=y.type,b=y.pendingProps,b=y.elementType===F?b:Yn(F,b),Ce(g,y,F,b,R);case 3:if(Ye(y),F=y.updateQueue,F===null)throw Error(t(282));if(b=y.memoizedState,b=b!==null?b.element:null,S0(y,F,y.pendingProps,null,R),F=y.memoizedState.element,F===b)tu(),y=yu(g,y,R);else{if((b=y.stateNode.hydrate)&&(w?(Tu=F0(y.stateNode.containerInfo),Qu=y,b=Ei=!0):b=!1),b)for(R=G(y,null,F,R),y.child=R;R;)R.effectTag=R.effectTag&-3|1024,R=R.sibling;else Bi(g,y,F,R),tu();y=y.child}return y;case 5:return ht(y),g===null&&Bo(y),F=y.type,b=y.pendingProps,J=g!==null?g.memoizedProps:null,ce=b.children,ct(F,b)?ce=null:J!==null&&ct(F,J)&&(y.effectTag|=16),$0(g,y),y.mode&4&&R!==1&&Rt(F,b)?(y.expirationTime=y.childExpirationTime=1,y=null):(Bi(g,y,ce,R),y=y.child),y;case 6:return g===null&&Bo(y),null;case 13:return Kt(g,y,R);case 4:return ke(y,y.stateNode.containerInfo),F=y.pendingProps,g===null?y.child=z(y,null,F,R):Bi(g,y,F,R),y.child;case 11:return F=y.type,b=y.pendingProps,b=y.elementType===F?b:Yn(F,b),Ci(g,y,F,b,R);case 7:return Bi(g,y,y.pendingProps,R),y.child;case 8:return Bi(g,y,y.pendingProps.children,R),y.child;case 12:return Bi(g,y,y.pendingProps.children,R),y.child;case 10:e:{if(F=y.type._context,b=y.pendingProps,ce=y.memoizedProps,J=b.value,Hu(y,J),ce!==null){var mt=ce.value;if(J=Le(mt,J)?0:(typeof F._calculateChangedBits=="function"?F._calculateChangedBits(mt,J):1073741823)|0,J===0){if(ce.children===b.children&&!gi.current){y=yu(g,y,R);break e}}else for(mt=y.child,mt!==null&&(mt.return=y);mt!==null;){var xt=mt.dependencies;if(xt!==null){ce=mt.child;for(var kt=xt.firstContext;kt!==null;){if(kt.context===F&&(kt.observedBits&J)!=0){mt.tag===1&&(kt=m0(R,null),kt.tag=2,Q0(mt,kt)),mt.expirationTime=y&&g<=y}function Al(g,y){var R=g.firstSuspendedTime,F=g.lastSuspendedTime;Ry||R===0)&&(g.lastSuspendedTime=y),y<=g.lastPingedTime&&(g.lastPingedTime=0),y<=g.lastExpiredTime&&(g.lastExpiredTime=0)}function Ts(g,y){y>g.firstPendingTime&&(g.firstPendingTime=y);var R=g.firstSuspendedTime;R!==0&&(y>=R?g.firstSuspendedTime=g.lastSuspendedTime=g.nextKnownPendingLevel=0:y>=g.lastSuspendedTime&&(g.lastSuspendedTime=y+1),y>g.nextKnownPendingLevel&&(g.nextKnownPendingLevel=y))}function da(g,y){var R=g.lastExpiredTime;(R===0||R>y)&&(g.lastExpiredTime=y)}function ud(g){var y=g._reactInternalFiber;if(y===void 0)throw typeof g.render=="function"?Error(t(188)):Error(t(268,Object.keys(g)));return g=Xe(y),g===null?null:g.stateNode}function pa(g,y){g=g.memoizedState,g!==null&&g.dehydrated!==null&&g.retryTime{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});var RP=0;ec.__interactionsRef=null;ec.__subscriberRef=null;ec.unstable_clear=function(i){return i()};ec.unstable_getCurrent=function(){return null};ec.unstable_getThreadID=function(){return++RP};ec.unstable_trace=function(i,o,a){return a()};ec.unstable_wrap=function(i){return i};ec.unstable_subscribe=function(){};ec.unstable_unsubscribe=function(){}});var NS=tt(mu=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";Object.defineProperty(mu,"__esModule",{value:!0});var i=!0,o=0,a=0,p=0;mu.__interactionsRef=null,mu.__subscriberRef=null,i&&(mu.__interactionsRef={current:new Set},mu.__subscriberRef={current:null});function _(se){if(!i)return se();var De=mu.__interactionsRef.current;mu.__interactionsRef.current=new Set;try{return se()}finally{mu.__interactionsRef.current=De}}function t(){return i?mu.__interactionsRef.current:null}function k(){return++p}function L(se,De,pe){var me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:o;if(!i)return pe();var ie={__count:1,id:a++,name:se,timestamp:De},Oe=mu.__interactionsRef.current,je=new Set(Oe);je.add(ie),mu.__interactionsRef.current=je;var qe=mu.__subscriberRef.current,yt;try{qe!==null&&qe.onInteractionTraced(ie)}finally{try{qe!==null&&qe.onWorkStarted(je,me)}finally{try{yt=pe()}finally{mu.__interactionsRef.current=Oe;try{qe!==null&&qe.onWorkStopped(je,me)}finally{ie.__count--,qe!==null&&ie.__count===0&&qe.onInteractionScheduledWorkCompleted(ie)}}}}return yt}function O(se){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o;if(!i)return se;var pe=mu.__interactionsRef.current,me=mu.__subscriberRef.current;me!==null&&me.onWorkScheduled(pe,De),pe.forEach(function(je){je.__count++});var ie=!1;function Oe(){var je=mu.__interactionsRef.current;mu.__interactionsRef.current=pe,me=mu.__subscriberRef.current;try{var qe;try{me!==null&&me.onWorkStarted(pe,De)}finally{try{qe=se.apply(void 0,arguments)}finally{mu.__interactionsRef.current=je,me!==null&&me.onWorkStopped(pe,De)}}return qe}finally{ie||(ie=!0,pe.forEach(function(yt){yt.__count--,me!==null&&yt.__count===0&&me.onInteractionScheduledWorkCompleted(yt)}))}}return Oe.cancel=function(){me=mu.__subscriberRef.current;try{me!==null&&me.onWorkCanceled(pe,De)}finally{pe.forEach(function(qe){qe.__count--,me&&qe.__count===0&&me.onInteractionScheduledWorkCompleted(qe)})}},Oe}var C=null;i&&(C=new Set);function U(se){i&&(C.add(se),C.size===1&&(mu.__subscriberRef.current={onInteractionScheduledWorkCompleted:ne,onInteractionTraced:W,onWorkCanceled:ve,onWorkScheduled:m,onWorkStarted:he,onWorkStopped:Ee}))}function H(se){i&&(C.delete(se),C.size===0&&(mu.__subscriberRef.current=null))}function W(se){var De=!1,pe=null;if(C.forEach(function(me){try{me.onInteractionTraced(se)}catch(ie){De||(De=!0,pe=ie)}}),De)throw pe}function ne(se){var De=!1,pe=null;if(C.forEach(function(me){try{me.onInteractionScheduledWorkCompleted(se)}catch(ie){De||(De=!0,pe=ie)}}),De)throw pe}function m(se,De){var pe=!1,me=null;if(C.forEach(function(ie){try{ie.onWorkScheduled(se,De)}catch(Oe){pe||(pe=!0,me=Oe)}}),pe)throw me}function he(se,De){var pe=!1,me=null;if(C.forEach(function(ie){try{ie.onWorkStarted(se,De)}catch(Oe){pe||(pe=!0,me=Oe)}}),pe)throw me}function Ee(se,De){var pe=!1,me=null;if(C.forEach(function(ie){try{ie.onWorkStopped(se,De)}catch(Oe){pe||(pe=!0,me=Oe)}}),pe)throw me}function ve(se,De){var pe=!1,me=null;if(C.forEach(function(ie){try{ie.onWorkCanceled(se,De)}catch(Oe){pe||(pe=!0,me=Oe)}}),pe)throw me}mu.unstable_clear=_,mu.unstable_getCurrent=t,mu.unstable_getThreadID=k,mu.unstable_trace=L,mu.unstable_wrap=O,mu.unstable_subscribe=U,mu.unstable_unsubscribe=H}()});var LS=tt((CH,hD)=>{"use strict";process.env.NODE_ENV==="production"?hD.exports=kS():hD.exports=NS()});var PS=tt((xH,qy)=>{"use strict";process.env.NODE_ENV!=="production"&&(qy.exports=function i(o){"use strict";var a=Oy(),p=Mi(),_=YE(),t=b_(),k=LS(),L=0,O=1,C=2,U=3,H=4,W=5,ne=6,m=7,he=8,Ee=9,ve=10,se=11,De=12,pe=13,me=14,ie=15,Oe=16,je=17,qe=18,yt=19,gt=20,Xe=21,ut=function(){};ut=function(f,c){for(var E=arguments.length,T=new Array(E>2?E-2:0),A=2;A8)throw new Error("warningWithoutStack() currently supports at most 8 arguments.");if(!f){if(typeof console!="undefined"){var j=T.map(function(le){return""+le});j.unshift("Warning: "+c),Function.prototype.apply.call(console.error,console,j)}try{var V=0,te="Warning: "+c.replace(/%s/g,function(){return T[V++]});throw new Error(te)}catch(le){}}};var We=ut;function Ft(f){return f._reactInternalFiber}function Jt(f,c){f._reactInternalFiber=c}var rt=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;rt.hasOwnProperty("ReactCurrentDispatcher")||(rt.ReactCurrentDispatcher={current:null}),rt.hasOwnProperty("ReactCurrentBatchConfig")||(rt.ReactCurrentBatchConfig={suspense:null});var Q=typeof Symbol=="function"&&Symbol.for,fe=Q?Symbol.for("react.element"):60103,xe=Q?Symbol.for("react.portal"):60106,oe=Q?Symbol.for("react.fragment"):60107,ze=Q?Symbol.for("react.strict_mode"):60108,ct=Q?Symbol.for("react.profiler"):60114,Rt=Q?Symbol.for("react.provider"):60109,nn=Q?Symbol.for("react.context"):60110,an=Q?Symbol.for("react.concurrent_mode"):60111,Mn=Q?Symbol.for("react.forward_ref"):60112,lr=Q?Symbol.for("react.suspense"):60113,ln=Q?Symbol.for("react.suspense_list"):60120,Vt=Q?Symbol.for("react.memo"):60115,Er=Q?Symbol.for("react.lazy"):60116,w=Q?Symbol.for("react.fundamental"):60117,jt=Q?Symbol.for("react.responder"):60118,Xn=Q?Symbol.for("react.scope"):60119,vr=typeof Symbol=="function"&&Symbol.iterator,jr="@@iterator";function fr(f){if(f===null||typeof f!="object")return null;var c=vr&&f[vr]||f[jr];return typeof c=="function"?c:null}var zr=We;zr=function(f,c){if(!f){for(var E=rt.ReactDebugCurrentFrame,T=E.getStackAddendum(),A=arguments.length,j=new Array(A>2?A-2:0),V=2;V import('./MyComponent'))`,T),f._status=Ro,f._result=A}},function(T){f._status===d0&&(f._status=Qo,f._result=T)})}}function Zo(f,c,E){var T=c.displayName||c.name||"";return f.displayName||(T!==""?E+"("+T+")":E)}function qt(f){if(f==null)return null;if(typeof f.tag=="number"&&We(!1,"Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case oe:return"Fragment";case xe:return"Portal";case ct:return"Profiler";case ze:return"StrictMode";case lr:return"Suspense";case ln:return"SuspenseList"}if(typeof f=="object")switch(f.$$typeof){case nn:return"Context.Consumer";case Rt:return"Context.Provider";case Mn:return Zo(f,f.render,"ForwardRef");case Vt:return qt(f.type);case Er:{var c=f,E=Fs(c);if(E)return qt(E);break}}return null}var xi=0,lu=1,mi=2,Dr=4,$o=6,G0=8,Uu=16,Y0=32,Xr=64,Ao=128,Oo=256,F0=512,su=1024,ki=1028,Ps=932,Kl=2047,P0=2048,p0=4096,Hr=!0,Ri=!0,K0=!0,yi=!0,en=!0,bn=!0,Ai=!1,gi=!1,Wt=!1,Au=!1,eu=!1,X0=!0,Yi=!1,Xl=!1,Mo=!1,ai=!1,so=!1,Ql=rt.ReactCurrentOwner;function ko(f){var c=f,E=f;if(f.alternate)for(;c.return;)c=c.return;else{var T=c;do c=T,(c.effectTag&(mi|su))!==xi&&(E=c.return),T=c.return;while(T)}return c.tag===U?E:null}function Is(f){return ko(f)===f}function $n(f){{var c=Ql.current;if(c!==null&&c.tag===O){var E=c,T=E.stateNode;T._warnedAboutRefsInRender||We(!1,"%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",qt(E.type)||"A component"),T._warnedAboutRefsInRender=!0}}var A=Ft(f);return A?ko(A)===A:!1}function el(f){if(ko(f)!==f)throw Error("Unable to find node on an unmounted component.")}function ao(f){var c=f.alternate;if(!c){var E=ko(f);if(E===null)throw Error("Unable to find node on an unmounted component.");return E!==f?null:f}for(var T=f,A=c;;){var j=T.return;if(j===null)break;var V=j.alternate;if(V===null){var te=j.return;if(te!==null){T=A=te;continue}break}if(j.child===V.child){for(var le=j.child;le;){if(le===T)return el(j),f;if(le===A)return el(j),c;le=le.sibling}throw Error("Unable to find node on an unmounted component.")}if(T.return!==A.return)T=j,A=V;else{for(var Be=!1,Ke=j.child;Ke;){if(Ke===T){Be=!0,T=j,A=V;break}if(Ke===A){Be=!0,A=j,T=V;break}Ke=Ke.sibling}if(!Be){for(Ke=V.child;Ke;){if(Ke===T){Be=!0,T=V,A=j;break}if(Ke===A){Be=!0,A=V,T=j;break}Ke=Ke.sibling}if(!Be)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(T.alternate!==A)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(T.tag!==U)throw Error("Unable to find node on an unmounted component.");return T.stateNode.current===T?f:c}function I0(f){var c=ao(f);if(!c)return null;for(var E=c;;){if(E.tag===W||E.tag===ne)return E;if(E.child){E.child.return=E,E=E.child;continue}if(E===c)return null;for(;!E.sibling;){if(!E.return||E.return===c)return null;E=E.return}E.sibling.return=E.return,E=E.sibling}return null}function wl(f){var c=ao(f);if(!c)return null;for(var E=c;;){if(E.tag===W||E.tag===ne||Wt&&E.tag===gt)return E;if(E.child&&E.tag!==H){E.child.return=E,E=E.child;continue}if(E===c)return null;for(;!E.sibling;){if(!E.return||E.return===c)return null;E=E.return}E.sibling.return=E.return,E=E.sibling}return null}var No=o.getPublicInstance,wt=o.getRootHostContext,bt=o.getChildHostContext,Hn=o.prepareForCommit,qr=o.resetAfterCommit,Ki=o.createInstance,Qr=o.appendInitialChild,Ou=o.finalizeInitialChildren,h0=o.prepareUpdate,Ni=o.shouldSetTextContent,v0=o.shouldDeprioritizeSubtree,hs=o.createTextInstance,Tt=o.setTimeout,fo=o.clearTimeout,tl=o.noTimeout,Jl=o.now,ju=o.isPrimaryRenderer,vs=o.warnsIfNotActing,b0=o.supportsMutation,X=o.supportsPersistence,we=o.supportsHydration,Le=o.mountResponderInstance,Ne=o.unmountResponderInstance,dt=o.getFundamentalComponentInstance,Yn=o.mountFundamentalComponent,Cn=o.shouldUpdateFundamentalComponent,cr=o.getInstanceFromNode,Si=o.appendChild,Mu=o.appendChildToContainer,zu=o.commitTextUpdate,Hu=o.commitMount,Su=o.commitUpdate,Ti=o.insertBefore,Lo=o.insertInContainerBefore,ku=o.removeChild,co=o.removeChildFromContainer,qu=o.resetTextContent,Pa=o.hideInstance,m0=o.hideTextInstance,ia=o.unhideInstance,Q0=o.unhideTextInstance,ua=o.updateFundamentalComponent,Ia=o.unmountFundamentalComponent,ms=o.cloneInstance,S0=o.createContainerChildSet,Qn=o.appendChildToContainerChildSet,ac=o.finalizeContainerChildren,fi=o.replaceContainerChildren,$r=o.cloneHiddenInstance,Zl=o.cloneHiddenTextInstance,oa=o.cloneInstance,pf=o.canHydrateInstance,bs=o.canHydrateTextInstance,ba=o.canHydrateSuspenseInstance,Bs=o.isSuspenseInstancePending,y0=o.isSuspenseInstanceFallback,Us=o.registerSuspenseInstanceRetry,ji=o.getNextHydratableSibling,B=o.getFirstHydratableChild,z=o.hydrateInstance,G=o.hydrateTextInstance,$=o.hydrateSuspenseInstance,Te=o.getNextHydratableInstanceAfterSuspenseInstance,ge=o.commitHydratedContainer,Re=o.commitHydratedSuspenseInstance,Z=o.clearSuspenseBoundary,ke=o.clearSuspenseBoundaryFromContainer,Qe=o.didNotMatchHydratedContainerTextInstance,ht=o.didNotMatchHydratedTextInstance,ue=o.didNotHydrateContainerInstance,He=o.didNotHydrateInstance,nt=o.didNotFindHydratableContainerInstance,Ct=o.didNotFindHydratableContainerTextInstance,Mt=o.didNotFindHydratableContainerSuspenseInstance,It=o.didNotFindHydratableInstance,sn=o.didNotFindHydratableTextInstance,rn=o.didNotFindHydratableSuspenseInstance,Lt=/^(.*)[\\\/]/,Dn=function(f,c,E){var T="";if(c){var A=c.fileName,j=A.replace(Lt,"");if(/^index\./.test(j)){var V=A.match(Lt);if(V){var te=V[1];if(te){var le=te.replace(Lt,"");j=le+"/"+j}}}T=" (at "+j+":"+c.lineNumber+")"}else E&&(T=" (created by "+E+")");return` - in `+(f||"Unknown")+T},dr=rt.ReactDebugCurrentFrame;function er(f){switch(f.tag){case U:case H:case ne:case m:case ve:case Ee:return"";default:var c=f._debugOwner,E=f._debugSource,T=qt(f.type),A=null;return c&&(A=qt(c.type)),Dn(T,E,A)}}function Cr(f){var c="",E=f;do c+=er(E),E=E.return;while(E);return c}var An=null,Nr=null;function g0(){{if(An===null)return null;var f=An._debugOwner;if(f!==null&&typeof f!="undefined")return qt(f.type)}return null}function Lr(){return An===null?"":Cr(An)}function it(){dr.getCurrentStack=null,An=null,Nr=null}function Dt(f){dr.getCurrentStack=Lr,An=f,Nr=null}function $e(f){Nr=f}var Pt="\u269B",un="\u26D4",fn=typeof performance!="undefined"&&typeof performance.mark=="function"&&typeof performance.clearMarks=="function"&&typeof performance.measure=="function"&&typeof performance.clearMeasures=="function",Jn=null,wr=null,au=null,Nu=!1,T0=!1,J0=!1,Lu=0,_i=0,Fo=new Set,nl=function(f){return Pt+" "+f},hf=function(f,c){var E=c?un+" ":Pt+" ",T=c?" Warning: "+c:"";return""+E+f+T},Sl=function(f){performance.mark(nl(f))},vf=function(f){performance.clearMarks(nl(f))},Po=function(f,c,E){var T=nl(c),A=hf(f,E);try{performance.measure(A,T)}catch(j){}performance.clearMarks(T),performance.clearMeasures(A)},ys=function(f,c){return f+" (#"+c+")"},js=function(f,c,E){return E===null?f+" ["+(c?"update":"mount")+"]":f+"."+E},Io=function(f,c){var E=qt(f.type)||"Unknown",T=f._debugID,A=f.alternate!==null,j=js(E,A,c);if(Nu&&Fo.has(j))return!1;Fo.add(j);var V=ys(j,T);return Sl(V),!0},bo=function(f,c){var E=qt(f.type)||"Unknown",T=f._debugID,A=f.alternate!==null,j=js(E,A,c),V=ys(j,T);vf(V)},gs=function(f,c,E){var T=qt(f.type)||"Unknown",A=f._debugID,j=f.alternate!==null,V=js(T,j,c),te=ys(V,A);Po(V,te,E)},Qu=function(f){switch(f.tag){case U:case W:case ne:case H:case m:case ve:case Ee:case he:return!0;default:return!1}},Tu=function(){wr!==null&&au!==null&&bo(au,wr),au=null,wr=null,J0=!1},Ei=function(){for(var f=Jn;f;)f._debugIsCurrentlyTiming&&gs(f,null,null),f=f.return},C0=function(f){f.return!==null&&C0(f.return),f._debugIsCurrentlyTiming&&Io(f,null)},Z0=function(){Jn!==null&&C0(Jn)};function Bo(){Hr&&_i++}function la(){Hr&&(Nu&&(T0=!0),wr!==null&&wr!=="componentWillMount"&&wr!=="componentWillReceiveProps"&&(J0=!0))}function $l(f){if(Hr){if(!fn||Qu(f)||(Jn=f,!Io(f,null)))return;f._debugIsCurrentlyTiming=!0}}function tu(f){if(Hr){if(!fn||Qu(f))return;f._debugIsCurrentlyTiming=!1,bo(f,null)}}function ei(f){if(Hr){if(!fn||Qu(f)||(Jn=f.return,!f._debugIsCurrentlyTiming))return;f._debugIsCurrentlyTiming=!1,gs(f,null,null)}}function po(f){if(Hr){if(!fn||Qu(f)||(Jn=f.return,!f._debugIsCurrentlyTiming))return;f._debugIsCurrentlyTiming=!1;var c=f.tag===pe?"Rendering was suspended":"An error was thrown inside this error boundary";gs(f,null,c)}}function Bi(f,c){if(Hr){if(!fn||(Tu(),!Io(f,c)))return;au=f,wr=c}}function Ci(){if(Hr){if(!fn)return;if(wr!==null&&au!==null){var f=J0?"Scheduled a cascading update":null;gs(au,wr,f)}wr=null,au=null}}function mf(f){if(Hr){if(Jn=f,!fn)return;Lu=0,Sl("(React Tree Reconciliation)"),Z0()}}function yf(f,c){if(Hr){if(!fn)return;var E=null;if(f!==null)if(f.tag===U)E="A top-level update interrupted the previous render";else{var T=qt(f.type)||"Unknown";E="An update to "+T+" interrupted the previous render"}else Lu>1&&(E="There were cascading updates");Lu=0;var A=c?"(React Tree Reconciliation: Completed Root)":"(React Tree Reconciliation: Yielded)";Ei(),Po(A,"(React Tree Reconciliation)",E)}}function $0(){if(Hr){if(!fn)return;Nu=!0,T0=!1,Fo.clear(),Sl("(Committing Changes)")}}function eo(){if(Hr){if(!fn)return;var f=null;T0?f="Lifecycle hook scheduled a cascading update":Lu>0&&(f="Caused by a cascading update in earlier commit"),T0=!1,Lu++,Nu=!1,Fo.clear(),Po("(Committing Changes)","(Committing Changes)",f)}}function Ce(){if(Hr){if(!fn)return;_i=0,Sl("(Committing Snapshot Effects)")}}function et(){if(Hr){if(!fn)return;var f=_i;_i=0,Po("(Committing Snapshot Effects: "+f+" Total)","(Committing Snapshot Effects)",null)}}function Ye(){if(Hr){if(!fn)return;_i=0,Sl("(Committing Host Effects)")}}function Yt(){if(Hr){if(!fn)return;var f=_i;_i=0,Po("(Committing Host Effects: "+f+" Total)","(Committing Host Effects)",null)}}function Kt(){if(Hr){if(!fn)return;_i=0,Sl("(Calling Lifecycle Methods)")}}function pr(){if(Hr){if(!fn)return;var f=_i;_i=0,Po("(Calling Lifecycle Methods: "+f+" Total)","(Calling Lifecycle Methods)",null)}}var Wr=[],xn;xn=[];var yu=-1;function Ju(f){return{current:f}}function ti(f,c){if(yu<0){We(!1,"Unexpected pop.");return}c!==xn[yu]&&We(!1,"Unexpected Fiber popped."),f.current=Wr[yu],Wr[yu]=null,xn[yu]=null,yu--}function Jr(f,c,E){yu++,Wr[yu]=f.current,xn[yu]=E,f.current=c}var Wu;Wu={};var Rn={};Object.freeze(Rn);var x0=Ju(Rn),Fu=Ju(!1),li=Rn;function Tl(f,c,E){return ai?Rn:E&&Xi(c)?li:x0.current}function zs(f,c,E){if(!ai){var T=f.stateNode;T.__reactInternalMemoizedUnmaskedChildContext=c,T.__reactInternalMemoizedMaskedChildContext=E}}function Vu(f,c){if(ai)return Rn;var E=f.type,T=E.contextTypes;if(!T)return Rn;var A=f.stateNode;if(A&&A.__reactInternalMemoizedUnmaskedChildContext===c)return A.__reactInternalMemoizedMaskedChildContext;var j={};for(var V in T)j[V]=c[V];{var te=qt(E)||"Unknown";_(T,j,"context",te,Lr)}return A&&zs(f,c,j),j}function sa(){return ai?!1:Fu.current}function Xi(f){if(ai)return!1;var c=f.childContextTypes;return c!=null}function Hs(f){ai||(ti(Fu,f),ti(x0,f))}function R0(f){ai||(ti(Fu,f),ti(x0,f))}function zi(f,c,E){if(!ai){if(x0.current!==Rn)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");Jr(x0,c,f),Jr(Fu,E,f)}}function A0(f,c,E){if(ai)return E;var T=f.stateNode,A=c.childContextTypes;if(typeof T.getChildContext!="function"){{var j=qt(c)||"Unknown";Wu[j]||(Wu[j]=!0,We(!1,"%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",j,j))}return E}var V;$e("getChildContext"),Bi(f,"getChildContext"),V=T.getChildContext(),Ci(),$e(null);for(var te in V)if(!(te in A))throw Error((qt(c)||"Unknown")+'.getChildContext(): key "'+te+'" is not defined in childContextTypes.');{var le=qt(c)||"Unknown";_(A,V,"child context",le,Lr)}return a({},E,{},V)}function Hi(f){if(ai)return!1;var c=f.stateNode,E=c&&c.__reactInternalMemoizedMergedChildContext||Rn;return li=x0.current,Jr(x0,E,f),Jr(Fu,Fu.current,f),!0}function rl(f,c,E){if(!ai){var T=f.stateNode;if(!T)throw Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(E){var A=A0(f,c,li);T.__reactInternalMemoizedMergedChildContext=A,ti(Fu,f),ti(x0,f),Jr(x0,A,f),Jr(Fu,E,f)}else ti(Fu,f),Jr(Fu,E,f)}}function Cl(f){if(ai)return Rn;if(!(Is(f)&&f.tag===O))throw Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var c=f;do{switch(c.tag){case U:return c.stateNode.context;case O:{var E=c.type;if(Xi(E))return c.stateNode.__reactInternalMemoizedMergedChildContext;break}}c=c.return}while(c!==null);throw Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}var B0=1,O0=2,ho=t.unstable_runWithPriority,Pu=t.unstable_scheduleCallback,Zu=t.unstable_cancelCallback,es=t.unstable_shouldYield,_s=t.unstable_requestPaint,aa=t.unstable_now,gf=t.unstable_getCurrentPriorityLevel,$u=t.unstable_ImmediatePriority,Es=t.unstable_UserBlockingPriority,Rr=t.unstable_NormalPriority,to=t.unstable_LowPriority,nu=t.unstable_IdlePriority;if(bn&&!(k.__interactionsRef!=null&&k.__interactionsRef.current!=null))throw Error("It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling");var fu={},Li=99,ni=98,Kn=97,e0=96,_0=95,E0=90,Fn=es,ae=_s!==void 0?_s:function(){},re=null,Fe=null,Ae=!1,st=aa(),vt=st<1e4?aa:function(){return aa()-st};function Qt(){switch(gf()){case $u:return Li;case Es:return ni;case Rr:return Kn;case to:return e0;case nu:return _0;default:throw Error("Unknown priority level.")}}function On(f){switch(f){case Li:return $u;case ni:return Es;case Kn:return Rr;case e0:return to;case _0:return nu;default:throw Error("Unknown priority level.")}}function Sn(f,c){var E=On(f);return ho(E,c)}function _n(f,c,E){var T=On(f);return Pu(T,c,E)}function Tn(f){return re===null?(re=[f],Fe=Pu($u,Fi)):re.push(f),fu}function ir(f){f!==fu&&Zu(f)}function Bt(){if(Fe!==null){var f=Fe;Fe=null,Zu(f)}Fi()}function Fi(){if(!Ae&&re!==null){Ae=!0;var f=0;try{var c=!0,E=re;Sn(Li,function(){for(;f1?c-1:0),T=1;T2?E-2:0),A=2;A0&&(ja.forEach(function(Nt){f.add(qt(Nt.type)||"Component"),ts.add(Nt.type)}),ja=[]);var c=new Set;za.length>0&&(za.forEach(function(Nt){c.add(qt(Nt.type)||"Component"),ts.add(Nt.type)}),za=[]);var E=new Set;Ha.length>0&&(Ha.forEach(function(Nt){E.add(qt(Nt.type)||"Component"),ts.add(Nt.type)}),Ha=[]);var T=new Set;ca.length>0&&(ca.forEach(function(Nt){T.add(qt(Nt.type)||"Component"),ts.add(Nt.type)}),ca=[]);var A=new Set;ws.length>0&&(ws.forEach(function(Nt){A.add(qt(Nt.type)||"Component"),ts.add(Nt.type)}),ws=[]);var j=new Set;if(Ss.length>0&&(Ss.forEach(function(Nt){j.add(qt(Nt.type)||"Component"),ts.add(Nt.type)}),Ss=[]),c.size>0){var V=jo(c);We(!1,`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move code with side effects to componentDidMount, and set initial state in the constructor. - -Please update the following components: %s`,V)}if(T.size>0){var te=jo(T);We(!1,`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move data fetching code or side effects to componentDidUpdate. -* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state - -Please update the following components: %s`,te)}if(j.size>0){var le=jo(j);We(!1,`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move data fetching code or side effects to componentDidUpdate. - -Please update the following components: %s`,le)}if(f.size>0){var Be=jo(f);qs(!1,`componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move code with side effects to componentDidMount, and set initial state in the constructor. -* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. - -Please update the following components: %s`,Be)}if(E.size>0){var Ke=jo(E);qs(!1,`componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move data fetching code or side effects to componentDidUpdate. -* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state -* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. - -Please update the following components: %s`,Ke)}if(A.size>0){var pt=jo(A);qs(!1,`componentWillUpdate has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move data fetching code or side effects to componentDidUpdate. -* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. - -Please update the following components: %s`,pt)}};var zo=new Map,Ef=new Set;Rl.recordLegacyContextWarning=function(f,c){var E=id(f);if(E===null){We(!1,"Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(!Ef.has(f.type)){var T=zo.get(E);(f.type.contextTypes!=null||f.type.childContextTypes!=null||c!==null&&typeof c.getChildContext=="function")&&(T===void 0&&(T=[],zo.set(E,T)),T.push(f))}},Rl.flushLegacyContextWarning=function(){zo.forEach(function(f,c){var E=new Set;f.forEach(function(j){E.add(qt(j.type)||"Component"),Ef.add(j.type)});var T=jo(E),A=Cr(c);We(!1,`Legacy context API has been detected within a strict-mode tree. - -The old API will be supported in all 16.x releases, but applications using it should migrate to the new version. - -Please update the following components: %s - -Learn more about this warning here: https://fb.me/react-legacy-context%s`,T,A)})},Rl.discardPendingWarnings=function(){ja=[],za=[],Ha=[],ca=[],ws=[],Ss=[],zo=new Map}}var ul=null,Gu=null,qa=function(f){ul=f};function r0(f){{if(ul===null)return f;var c=ul(f);return c===void 0?f:c.current}}function j0(f){return r0(f)}function Df(f){{if(ul===null)return f;var c=ul(f);if(c===void 0){if(f!=null&&typeof f.render=="function"){var E=r0(f.render);if(f.render!==E){var T={$$typeof:Mn,render:E};return f.displayName!==void 0&&(T.displayName=f.displayName),T}}return f}return c.current}}function qc(f,c){{if(ul===null)return!1;var E=f.elementType,T=c.type,A=!1,j=typeof T=="object"&&T!==null?T.$$typeof:null;switch(f.tag){case O:{typeof T=="function"&&(A=!0);break}case L:{(typeof T=="function"||j===Er)&&(A=!0);break}case se:{(j===Mn||j===Er)&&(A=!0);break}case me:case ie:{(j===Vt||j===Er)&&(A=!0);break}default:return!1}if(A){var V=ul(E);if(V!==void 0&&V===ul(T))return!0}return!1}}function dc(f){{if(ul===null||typeof WeakSet!="function")return;Gu===null&&(Gu=new WeakSet),Gu.add(f)}}var Al=function(f,c){{if(ul===null)return;var E=c.staleFamilies,T=c.updatedFamilies;tf(),Ap(function(){da(f.current,T,E)})}},Ts=function(f,c){{if(f.context!==Rn)return;tf(),fv(function(){Yg(c,f,null,null)})}};function da(f,c,E){{var T=f.alternate,A=f.child,j=f.sibling,V=f.tag,te=f.type,le=null;switch(V){case L:case ie:case O:le=te;break;case se:le=te.render;break;default:break}if(ul===null)throw new Error("Expected resolveFamily to be set during hot reload.");var Be=!1,Ke=!1;if(le!==null){var pt=ul(le);pt!==void 0&&(E.has(pt)?Ke=!0:c.has(pt)&&(V===O?Ke=!0:Be=!0))}Gu!==null&&(Gu.has(f)||T!==null&&Gu.has(T))&&(Ke=!0),Ke&&(f._debugNeedsRemount=!0),(Ke||Be)&&ml(f,Un),A!==null&&!Ke&&da(A,c,E),j!==null&&da(j,c,E)}}var ud=function(f,c){{var E=new Set,T=new Set(c.map(function(A){return A.current}));return pa(f.current,T,E),E}};function pa(f,c,E){{var T=f.child,A=f.sibling,j=f.tag,V=f.type,te=null;switch(j){case L:case ie:case O:te=V;break;case se:te=V.render;break;default:break}var le=!1;te!==null&&c.has(te)&&(le=!0),le?pc(f,E):T!==null&&pa(T,c,E),A!==null&&pa(A,c,E)}}function pc(f,c){{var E=Wc(f,c);if(E)return;for(var T=f;;){switch(T.tag){case W:c.add(T.stateNode);return;case H:c.add(T.stateNode.containerInfo);return;case U:c.add(T.stateNode.containerInfo);return}if(T.return===null)throw new Error("Expected to reach root first.");T=T.return}}}function Wc(f,c){for(var E=f,T=!1;;){if(E.tag===W)T=!0,c.add(E.stateNode);else if(E.child!==null){E.child.return=E,E=E.child;continue}if(E===f)return T;for(;E.sibling===null;){if(E.return===null||E.return===f)return T;E=E.return}E.sibling.return=E.return,E=E.sibling}return!1}function qi(f,c){if(f&&f.defaultProps){var E=a({},c),T=f.defaultProps;for(var A in T)E[A]===void 0&&(E[A]=T[A]);return E}return c}function g(f){if(Jo(f),f._status!==Ro)throw f._result;return f._result}var y=Ju(null),R;R={};var F=null,b=null,J=null,ce=!1;function mt(){F=null,b=null,J=null,ce=!1}function xt(){ce=!0}function kt(){ce=!1}function xr(f,c){var E=f.type._context;ju?(Jr(y,E._currentValue,f),E._currentValue=c,E._currentRenderer===void 0||E._currentRenderer===null||E._currentRenderer===R||We(!1,"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),E._currentRenderer=R):(Jr(y,E._currentValue2,f),E._currentValue2=c,E._currentRenderer2===void 0||E._currentRenderer2===null||E._currentRenderer2===R||We(!1,"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),E._currentRenderer2=R)}function i0(f){var c=y.current;ti(y,f);var E=f.type._context;ju?E._currentValue=c:E._currentValue2=c}function cu(f,c,E){if(mo(E,c))return 0;var T=typeof f._calculateChangedBits=="function"?f._calculateChangedBits(E,c):Vr;return(T&Vr)!==T&&Xt(!1,"calculateChangedBits: Expected the return value to be a 31-bit integer. Instead received: %s",T),T|0}function z0(f,c){for(var E=f;E!==null;){var T=E.alternate;if(E.childExpirationTime=c&&lp(),E.firstContext=null)}}function Ve(f,c){if(ce&&Xt(!1,"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),J!==f){if(!(c===!1||c===0)){var E;typeof c!="number"||c===Vr?(J=f,E=Vr):E=c;var T={context:f,observedBits:E,next:null};if(b===null){if(F===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");b=T,F.dependencies={expirationTime:at,firstContext:T,responders:null}}else b=b.next=T}}return ju?f._currentValue:f._currentValue2}var Ue=0,lt=1,$t=2,Wn=3,si=!1,ur,ci;ur=!1,ci=null;function Qi(f){var c={baseState:f,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null};return c}function Gr(f){var c={baseState:f.baseState,firstUpdate:f.firstUpdate,lastUpdate:f.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null};return c}function Cu(f,c){var E={expirationTime:f,suspenseConfig:c,tag:Ue,payload:null,callback:null,next:null,nextEffect:null};return E.priority=Qt(),E}function Wa(f,c){f.lastUpdate===null?f.firstUpdate=f.lastUpdate=c:(f.lastUpdate.next=c,f.lastUpdate=c)}function Va(f,c){var E=f.alternate,T,A;E===null?(T=f.updateQueue,A=null,T===null&&(T=f.updateQueue=Qi(f.memoizedState))):(T=f.updateQueue,A=E.updateQueue,T===null?A===null?(T=f.updateQueue=Qi(f.memoizedState),A=E.updateQueue=Qi(E.memoizedState)):T=f.updateQueue=Gr(A):A===null&&(A=E.updateQueue=Gr(T))),A===null||T===A?Wa(T,c):T.lastUpdate===null||A.lastUpdate===null?(Wa(T,c),Wa(A,c)):(Wa(T,c),A.lastUpdate=c),f.tag===O&&(ci===T||A!==null&&ci===A)&&!ur&&(We(!1,"An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),ur=!0)}function od(f,c){var E=f.updateQueue;E===null?E=f.updateQueue=Qi(f.memoizedState):E=w2(f,E),E.lastCapturedUpdate===null?E.firstCapturedUpdate=E.lastCapturedUpdate=c:(E.lastCapturedUpdate.next=c,E.lastCapturedUpdate=c)}function w2(f,c){var E=f.alternate;return E!==null&&c===E.updateQueue&&(c=f.updateQueue=Gr(c)),c}function S2(f,c,E,T,A,j){switch(E.tag){case lt:{var V=E.payload;if(typeof V=="function"){xt(),Ri&&f.mode&mr&&V.call(j,T,A);var te=V.call(j,T,A);return kt(),te}return V}case Wn:f.effectTag=f.effectTag&~p0|Xr;case Ue:{var le=E.payload,Be;return typeof le=="function"?(xt(),Ri&&f.mode&mr&&le.call(j,T,A),Be=le.call(j,T,A),kt()):Be=le,Be==null?T:a({},T,Be)}case $t:return si=!0,T}return T}function wf(f,c,E,T,A){si=!1,c=w2(f,c),ci=c;for(var j=c.baseState,V=null,te=at,le=c.firstUpdate,Be=j;le!==null;){var Ke=le.expirationTime;if(Ke from render. Or maybe you meant to call this function rather than return it."))}function yh(f){function c(ot,Ot){if(!!f){var Ze=ot.lastEffect;Ze!==null?(Ze.nextEffect=Ot,ot.lastEffect=Ot):ot.firstEffect=ot.lastEffect=Ot,Ot.nextEffect=null,Ot.effectTag=G0}}function E(ot,Ot){if(!f)return null;for(var Ze=Ot;Ze!==null;)c(ot,Ze),Ze=Ze.sibling;return null}function T(ot,Ot){for(var Ze=new Map,Ut=Ot;Ut!==null;)Ut.key!==null?Ze.set(Ut.key,Ut):Ze.set(Ut.index,Ut),Ut=Ut.sibling;return Ze}function A(ot,Ot,Ze){var Ut=To(ot,Ot,Ze);return Ut.index=0,Ut.sibling=null,Ut}function j(ot,Ot,Ze){if(ot.index=Ze,!f)return Ot;var Ut=ot.alternate;if(Ut!==null){var Pn=Ut.index;return PnKr?(xu=hr,hr=null):xu=hr.sibling;var w0=Nt(ot,hr,Ze[Kr],Ut);if(w0===null){hr===null&&(hr=xu);break}f&&hr&&w0.alternate===null&&c(ot,hr),pu=j(w0,pu,Kr),Ku===null?pi=w0:Ku.sibling=w0,Ku=w0,hr=xu}if(Kr===Ze.length)return E(ot,hr),pi;if(hr===null){for(;KrW0?(Ms=xu,xu=null):Ms=xu.sibling;var yl=Nt(ot,xu,Xu.value,Ut);if(yl===null){xu===null&&(xu=Ms);break}f&&xu&&yl.alternate===null&&c(ot,xu),w0=j(yl,w0,W0),Kr===null?pu=yl:Kr.sibling=yl,Kr=yl,xu=Ms}if(Xu.done)return E(ot,xu),pu;if(xu===null){for(;!Xu.done;W0++,Xu=hr.next()){var rf=pt(ot,Xu.value,Ut);rf!==null&&(w0=j(rf,w0,W0),Kr===null?pu=rf:Kr.sibling=rf,Kr=rf)}return pu}for(var Wo=T(ot,xu);!Xu.done;W0++,Xu=hr.next()){var ks=Gt(Wo,ot,W0,Xu.value,Ut);ks!==null&&(f&&ks.alternate!==null&&Wo.delete(ks.key===null?W0:ks.key),w0=j(ks,w0,W0),Kr===null?pu=ks:Kr.sibling=ks,Kr=ks)}return f&&Wo.forEach(function(Zd){return c(ot,Zd)}),pu}function oi(ot,Ot,Ze,Ut){if(Ot!==null&&Ot.tag===ne){E(ot,Ot.sibling);var Pn=A(Ot,Ze,Ut);return Pn.return=ot,Pn}E(ot,Ot);var vn=dy(Ze,ot.mode,Ut);return vn.return=ot,vn}function Oi(ot,Ot,Ze,Ut){for(var Pn=Ze.key,vn=Ot;vn!==null;){if(vn.key===Pn)if(vn.tag===m?Ze.type===oe:vn.elementType===Ze.type||qc(vn,Ze)){E(ot,vn.sibling);var Wi=A(vn,Ze.type===oe?Ze.props.children:Ze.props,Ut);return Wi.ref=vc(ot,vn,Ze),Wi.return=ot,Wi._debugSource=Ze._source,Wi._debugOwner=Ze._owner,Wi}else{E(ot,vn);break}else c(ot,vn);vn=vn.sibling}if(Ze.type===oe){var pi=nf(Ze.props.children,ot.mode,Ut,Ze.key);return pi.return=ot,pi}else{var Ku=cy(Ze,ot.mode,Ut);return Ku.ref=vc(ot,Ot,Ze),Ku.return=ot,Ku}}function L0(ot,Ot,Ze,Ut){for(var Pn=Ze.key,vn=Ot;vn!==null;){if(vn.key===Pn)if(vn.tag===H&&vn.stateNode.containerInfo===Ze.containerInfo&&vn.stateNode.implementation===Ze.implementation){E(ot,vn.sibling);var Wi=A(vn,Ze.children||[],Ut);return Wi.return=ot,Wi}else{E(ot,vn);break}else c(ot,vn);vn=vn.sibling}var pi=py(Ze,ot.mode,Ut);return pi.return=ot,pi}function $i(ot,Ot,Ze,Ut){var Pn=typeof Ze=="object"&&Ze!==null&&Ze.type===oe&&Ze.key===null;Pn&&(Ze=Ze.props.children);var vn=typeof Ze=="object"&&Ze!==null;if(vn)switch(Ze.$$typeof){case fe:return V(Oi(ot,Ot,Ze,Ut));case xe:return V(L0(ot,Ot,Ze,Ut))}if(typeof Ze=="string"||typeof Ze=="number")return V(oi(ot,Ot,""+Ze,Ut));if(Jc(Ze))return yn(ot,Ot,Ze,Ut);if(fr(Ze))return kr(ot,Ot,Ze,Ut);if(vn&&mc(ot,Ze),typeof Ze=="function"&&pd(),typeof Ze=="undefined"&&!Pn)switch(ot.tag){case O:{var Wi=ot.stateNode;if(Wi.render._isMockFunction)break}case L:{var pi=ot.type;throw Error((pi.displayName||pi.name||"Component")+"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.")}}return E(ot,Ot)}return $i}var Tf=yh(!0),Zc=yh(!1);function gh(f,c){if(!(f===null||c.child===f.child))throw Error("Resuming work not yet implemented.");if(c.child!==null){var E=c.child,T=To(E,E.pendingProps,E.expirationTime);for(c.child=T,T.return=c;E.sibling!==null;)E=E.sibling,T=T.sibling=To(E,E.pendingProps,E.expirationTime),T.return=c;T.sibling=null}}function nm(f,c){for(var E=f.child;E!==null;)Av(E,c),E=E.sibling}var Vs={},ma=Ju(Vs),iu=Ju(Vs),M0=Ju(Vs);function o0(f){if(f===Vs)throw Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return f}function ns(){var f=o0(M0.current);return f}function Ya(f,c){Jr(M0,c,f),Jr(iu,f,f),Jr(ma,Vs,f);var E=wt(c);ti(ma,f),Jr(ma,E,f)}function io(f){ti(ma,f),ti(iu,f),ti(M0,f)}function al(){var f=o0(ma.current);return f}function yc(f){var c=o0(M0.current),E=o0(ma.current),T=bt(E,f.type,c);E!==T&&(Jr(iu,f,f),Jr(ma,T,f))}function k2(f){iu.current===f&&(ti(ma,f),ti(iu,f))}var _h=0,Cf=1,xf=1,$c=2,kl=Ju(_h);function e1(f,c){return(f&c)!=0}function ya(f){return f&Cf}function hd(f,c){return f&Cf|c}function vd(f,c){return f|c}function Fr(f,c){Jr(kl,c,f)}function ga(f){ti(kl,f)}function N2(f,c){var E=f.memoizedState;if(E!==null)return E.dehydrated!==null;var T=f.memoizedProps;return T.fallback===void 0?!1:T.unstable_avoidThisFallback!==!0?!0:!c}function t1(f){for(var c=f;c!==null;){if(c.tag===pe){var E=c.memoizedState;if(E!==null){var T=E.dehydrated;if(T===null||Bs(T)||y0(T))return c}}else if(c.tag===yt&&c.memoizedProps.revealOrder!==void 0){var A=(c.effectTag&Xr)!==xi;if(A)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===f)return null;for(;c.sibling===null;){if(c.return===null||c.return===f)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var md={},wi=Array.isArray;function L2(f,c,E,T){return{fiber:T,props:c,responder:f,rootEventTypes:null,state:E}}function rm(f,c,E,T,A){var j=md,V=f.getInitialState;V!==null&&(j=V(c));var te=L2(f,c,j,E);if(!A)for(var le=E;le!==null;){var Be=le.tag;if(Be===W){A=le.stateNode;break}else if(Be===U){A=le.stateNode.containerInfo;break}le=le.return}Le(f,te,c,j,A),T.set(f,te)}function yd(f,c,E,T,A){var j,V;if(f&&(j=f.responder,V=f.props),!(j&&j.$$typeof===jt))throw Error("An invalid value was used as an event listener. Expect one or many event listeners created via React.unstable_useResponder().");var te=V;if(E.has(j)){Xt(!1,'Duplicate event responder "%s" found in event listeners. Event listeners passed to elements cannot use the same event responder more than once.',j.displayName);return}E.add(j);var le=T.get(j);le===void 0?rm(j,te,c,T,A):(le.props=te,le.fiber=c)}function hn(f,c,E){var T=new Set,A=c.dependencies;if(f!=null){A===null&&(A=c.dependencies={expirationTime:at,firstContext:null,responders:new Map});var j=A.responders;if(j===null&&(j=new Map),wi(f))for(var V=0,te=f.length;V0){var j=A.dispatch;if(Cs!==null){var V=Cs.get(A);if(V!==void 0){Cs.delete(A);var te=T.memoizedState,le=V;do{var Be=le.action;te=f(te,Be),le=le.next}while(le!==null);return mo(te,T.memoizedState)||lp(),T.memoizedState=te,T.baseUpdate===A.last&&(T.baseState=te),A.lastRenderedState=te,[te,j]}}return[T.memoizedState,j]}var Ke=A.last,pt=T.baseUpdate,Nt=T.baseState,Gt;if(pt!==null?(Ke!==null&&(Ke.next=null),Gt=pt.next):Gt=Ke!==null?Ke.next:null,Gt!==null){var zt=Nt,yn=null,kr=null,oi=pt,Oi=Gt,L0=!1;do{var $i=Oi.expirationTime;if($iIu&&(Iu=$i,Xd(Iu));else if(vv($i,Oi.suspenseConfig),Oi.eagerReducer===f)zt=Oi.eagerState;else{var ot=Oi.action;zt=f(zt,ot)}oi=Oi,Oi=Oi.next}while(Oi!==null&&Oi!==Gt);L0||(kr=oi,yn=zt),mo(zt,T.memoizedState)||lp(),T.memoizedState=zt,T.baseUpdate=kr,T.baseState=yn,A.lastRenderedState=zt}var Ot=A.dispatch;return[T.memoizedState,Ot]}function Ff(f){var c=Dc();typeof f=="function"&&(f=f()),c.memoizedState=c.baseState=f;var E=c.queue={last:null,dispatch:null,lastRenderedReducer:F2,lastRenderedState:f},T=E.dispatch=s1.bind(null,cl,E);return[c.memoizedState,T]}function u1(f){return i1(F2,f)}function Qa(f,c,E,T){var A={tag:f,create:c,destroy:E,deps:T,next:null};if(rs===null)rs=Xa(),rs.lastEffect=A.next=A;else{var j=rs.lastEffect;if(j===null)rs.lastEffect=A.next=A;else{var V=j.next;j.next=A,A.next=V,rs.lastEffect=A}}return A}function o1(f){var c=Dc(),E={current:f};return Object.seal(E),c.memoizedState=E,E}function P2(f){var c=r1();return c.memoizedState}function Dd(f,c,E,T){var A=Dc(),j=T===void 0?null:T;Mf|=f,A.memoizedState=Qa(c,E,void 0,j)}function wc(f,c,E,T){var A=r1(),j=T===void 0?null:T,V=void 0;if(jn!==null){var te=jn.memoizedState;if(V=te.destroy,j!==null){var le=te.deps;if(Nf(j,le)){Qa(Af,E,V,j);return}}}Mf|=f,A.memoizedState=Qa(c,E,V,j)}function l1(f,c){return typeof jest!="undefined"&&Rv(cl),Dd(Dr|F0,sr|n1,f,c)}function Ll(f,c){return typeof jest!="undefined"&&Rv(cl),wc(Dr|F0,sr|n1,f,c)}function Ea(f,c){return Dd(Dr,Of|fl,f,c)}function wh(f,c){return wc(Dr,Of|fl,f,c)}function I2(f,c){if(typeof c=="function"){var E=c,T=f();return E(T),function(){E(null)}}else if(c!=null){var A=c;A.hasOwnProperty("current")||Xt(!1,"Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(A).join(", ")+"}");var j=f();return A.current=j,function(){A.current=null}}}function b2(f,c,E){typeof c!="function"&&Xt(!1,"Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",c!==null?typeof c:"null");var T=E!=null?E.concat([f]):null;return Dd(Dr,Of|fl,I2.bind(null,c,f),T)}function Sh(f,c,E){typeof c!="function"&&Xt(!1,"Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",c!==null?typeof c:"null");var T=E!=null?E.concat([f]):null;return wc(Dr,Of|fl,I2.bind(null,c,f),T)}function wd(f,c){}var Th=wd;function Fl(f,c){var E=Dc(),T=c===void 0?null:c;return E.memoizedState=[f,T],f}function us(f,c){var E=r1(),T=c===void 0?null:c,A=E.memoizedState;if(A!==null&&T!==null){var j=A[1];if(Nf(T,j))return A[0]}return E.memoizedState=[f,T],f}function xs(f,c){var E=Dc(),T=c===void 0?null:c,A=f();return E.memoizedState=[A,T],A}function Gs(f,c){var E=r1(),T=c===void 0?null:c,A=E.memoizedState;if(A!==null&&T!==null){var j=A[1];if(Nf(T,j))return A[0]}var V=f();return E.memoizedState=[V,T],V}function B2(f,c){var E=Ff(f),T=E[0],A=E[1];return l1(function(){t.unstable_next(function(){var j=Ho.suspense;Ho.suspense=c===void 0?null:c;try{A(f)}finally{Ho.suspense=j}})},[f,c]),T}function Ch(f,c){var E=u1(f),T=E[0],A=E[1];return Ll(function(){t.unstable_next(function(){var j=Ho.suspense;Ho.suspense=c===void 0?null:c;try{A(f)}finally{Ho.suspense=j}})},[f,c]),T}function U2(f){var c=Ff(!1),E=c[0],T=c[1],A=Fl(function(j){T(!0),t.unstable_next(function(){var V=Ho.suspense;Ho.suspense=f===void 0?null:f;try{T(!1),j()}finally{Ho.suspense=V}})},[f,E]);return[A,E]}function j2(f){var c=u1(!1),E=c[0],T=c[1],A=us(function(j){T(!0),t.unstable_next(function(){var V=Ho.suspense;Ho.suspense=f===void 0?null:f;try{T(!1),j()}finally{Ho.suspense=V}})},[f,E]);return[A,E]}function s1(f,c,E){if(!(Ec=0){var E=f1()-c1;f.actualDuration+=E,c&&(f.selfBaseDuration=E),c1=-1}}var Il=null,Za=null,Da=!1;function W2(){Da&&Xt(!1,"We should not be hydrating here. This is a bug in React. Please file a bug.")}function V2(f){if(!we)return!1;var c=f.stateNode.containerInfo;return Za=B(c),Il=f,Da=!0,!0}function lm(f,c){return we?(Za=ji(c),K2(f),Da=!0,!0):!1}function G2(f,c){switch(f.tag){case U:ue(f.stateNode.containerInfo,c);break;case W:He(f.type,f.memoizedProps,f.stateNode,c);break}var E=I4();E.stateNode=c,E.return=f,E.effectTag=G0,f.lastEffect!==null?(f.lastEffect.nextEffect=E,f.lastEffect=E):f.firstEffect=f.lastEffect=E}function kh(f,c){switch(c.effectTag=c.effectTag&~su|mi,f.tag){case U:{var E=f.stateNode.containerInfo;switch(c.tag){case W:var T=c.type,A=c.pendingProps;nt(E,T,A);break;case ne:var j=c.pendingProps;Ct(E,j);break;case pe:Mt(E);break}break}case W:{var V=f.type,te=f.memoizedProps,le=f.stateNode;switch(c.tag){case W:var Be=c.type,Ke=c.pendingProps;It(V,te,le,Be,Ke);break;case ne:var pt=c.pendingProps;sn(V,te,le,pt);break;case pe:rn(V,te,le);break}break}default:return}}function Nh(f,c){switch(f.tag){case W:{var E=f.type,T=f.pendingProps,A=pf(c,E,T);return A!==null?(f.stateNode=A,!0):!1}case ne:{var j=f.pendingProps,V=bs(c,j);return V!==null?(f.stateNode=V,!0):!1}case pe:{if(Ai){var te=ba(c);if(te!==null){var le={dehydrated:te,retryTime:Di};f.memoizedState=le;var Be=b4(te);return Be.return=f,f.child=Be,!0}}return!1}default:return!1}}function Y2(f){if(!!Da){var c=Za;if(!c){kh(Il,f),Da=!1,Il=f;return}var E=c;if(!Nh(f,c)){if(c=ji(E),!c||!Nh(f,c)){kh(Il,f),Da=!1,Il=f;return}G2(Il,E)}Il=f,Za=B(c)}}function sm(f,c,E){if(!we)throw Error("Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var T=f.stateNode,A=z(T,f.type,f.memoizedProps,c,E,f);return f.updateQueue=A,A!==null}function am(f){if(!we)throw Error("Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var c=f.stateNode,E=f.memoizedProps,T=G(c,E,f);if(T){var A=Il;if(A!==null)switch(A.tag){case U:{var j=A.stateNode.containerInfo;Qe(j,c,E);break}case W:{var V=A.type,te=A.memoizedProps,le=A.stateNode;ht(V,te,le,c,E);break}}}return T}function Lh(f){if(!we)throw Error("Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var c=f.memoizedState,E=c!==null?c.dehydrated:null;if(!E)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");$(E,f)}function fm(f){if(!we)throw Error("Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var c=f.memoizedState,E=c!==null?c.dehydrated:null;if(!E)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return Te(E)}function K2(f){for(var c=f.return;c!==null&&c.tag!==W&&c.tag!==U&&c.tag!==pe;)c=c.return;Il=c}function p1(f){if(!we||f!==Il)return!1;if(!Da)return K2(f),Da=!0,!1;var c=f.type;if(f.tag!==W||c!=="head"&&c!=="body"&&!Ni(c,f.memoizedProps))for(var E=Za;E;)G2(f,E),E=ji(E);return K2(f),f.tag===pe?Za=fm(f):Za=Il?ji(f.stateNode):null,!0}function h1(){!we||(Il=null,Za=null,Da=!1)}var v1=rt.ReactCurrentOwner,wa=!1,X2,Ys,Ks,Xs,Q2,Sa,m1,Sd,Sc,J2;X2={},Ys={},Ks={},Xs={},Q2={},Sa=!1,m1=!1,Sd={},Sc={},J2={};function Do(f,c,E,T){f===null?c.child=Zc(c,null,E,T):c.child=Tf(c,f.child,E,T)}function Fh(f,c,E,T){c.child=Tf(c,f.child,null,T),c.child=Tf(c,null,E,T)}function Ph(f,c,E,T,A){if(c.type!==c.elementType){var j=E.propTypes;j&&_(j,T,"prop",qt(E),Lr)}var V=E.render,te=c.ref,le;return u0(c,A),v1.current=c,$e("render"),le=Lf(f,c,V,T,te,A),Ri&&c.mode&mr&&c.memoizedState!==null&&(le=Lf(f,c,V,T,te,A)),$e(null),f!==null&&!wa?(gd(f,c,A),Ta(f,c,A)):(c.effectTag|=lu,Do(f,c,le,A),c.child)}function Ih(f,c,E,T,A,j){if(f===null){var V=E.type;if(a0(V)&&E.compare===null&&E.defaultProps===void 0){var te=V;return te=r0(V),c.tag=ie,c.type=te,ep(c,V),bh(f,c,te,T,A,j)}{var le=V.propTypes;le&&_(le,T,"prop",qt(V),Lr)}var Be=fy(E.type,null,T,null,c.mode,j);return Be.ref=c.ref,Be.return=c,c.child=Be,Be}{var Ke=E.type,pt=Ke.propTypes;pt&&_(pt,T,"prop",qt(Ke),Lr)}var Nt=f.child;if(A component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",le,le),X2[le]=!0)}c.mode&mr&&Rl.recordLegacyContextWarning(c,null),v1.current=c,te=Lf(null,c,E,A,j,T)}if(c.effectTag|=lu,typeof te=="object"&&te!==null&&typeof te.render=="function"&&te.$$typeof===void 0){{var Be=qt(E)||"Unknown";Ys[Be]||(We(!1,"The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",Be,Be,Be),Ys[Be]=!0)}c.tag=O,_d();var Ke=!1;Xi(E)?(Ke=!0,Hi(c)):Ke=!1,c.memoizedState=te.state!==null&&te.state!==void 0?te.state:null;var pt=E.getDerivedStateFromProps;return typeof pt=="function"&&Sf(c,E,pt,A),sl(c,te),hc(c,E,A,T),$2(null,c,E,!0,Ke,T)}else return c.tag=L,ai&&E.contextTypes&&We(!1,"%s uses the legacy contextTypes API which is no longer supported. Use React.createContext() with React.useContext() instead.",qt(E)||"Unknown"),Ri&&c.mode&mr&&c.memoizedState!==null&&(te=Lf(null,c,E,A,j,T)),Do(null,c,te,T),ep(c,E),c.child}function ep(f,c){if(c&&c.childContextTypes&&We(!1,"%s(...): childContextTypes cannot be defined on a function component.",c.displayName||c.name||"Component"),f.ref!==null){var E="",T=g0();T&&(E+=` - -Check the render method of \``+T+"`.");var A=T||f._debugID||"",j=f._debugSource;j&&(A=j.fileName+":"+j.lineNumber),Q2[A]||(Q2[A]=!0,Xt(!1,"Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",E))}if(Xl&&c.defaultProps!==void 0){var V=qt(c)||"Unknown";J2[V]||(We(!1,"%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",V),J2[V]=!0)}if(typeof c.getDerivedStateFromProps=="function"){var te=qt(c)||"Unknown";Xs[te]||(We(!1,"%s: Function components do not support getDerivedStateFromProps.",te),Xs[te]=!0)}if(typeof c.contextType=="object"&&c.contextType!==null){var le=qt(c)||"Unknown";Ks[le]||(We(!1,"%s: Function components do not support contextType.",le),Ks[le]=!0)}}var Cd={dehydrated:null,retryTime:at};function tp(f,c,E){return e1(f,$c)&&(c===null||c.memoizedState!==null)}function Hh(f,c,E){var T=c.mode,A=c.pendingProps;Xg(c)&&(c.effectTag|=Xr);var j=kl.current,V=!1,te=(c.effectTag&Xr)!==xi;if(te||tp(j,f,c)?(V=!0,c.effectTag&=~Xr):(f===null||f.memoizedState!==null)&&A.fallback!==void 0&&A.unstable_avoidThisFallback!==!0&&(j=vd(j,xf)),j=ya(j),Fr(c,j),"maxDuration"in A&&(m1||(m1=!0,Xt(!1,"maxDuration has been removed from React. Remove the maxDuration prop."))),f===null){if(A.fallback!==void 0&&(Y2(c),Ai)){var le=c.memoizedState;if(le!==null){var Be=le.dehydrated;if(Be!==null)return qh(c,Be,E)}}if(V){var Ke=A.fallback,pt=nf(null,T,at,null);if(pt.return=c,(c.mode&Y)===Ar){var Nt=c.memoizedState,Gt=Nt!==null?c.child.child:c.child;pt.child=Gt;for(var zt=Gt;zt!==null;)zt.return=pt,zt=zt.sibling}var yn=nf(Ke,T,E,null);return yn.return=c,pt.sibling=yn,c.memoizedState=Cd,c.child=pt,yn}else{var kr=A.children;return c.memoizedState=null,c.child=Zc(c,null,kr,E)}}else{var oi=f.memoizedState;if(oi!==null){if(Ai){var Oi=oi.dehydrated;if(Oi!==null)if(te){if(c.memoizedState!==null)return c.child=f.child,c.effectTag|=Xr,null;var L0=A.fallback,$i=nf(null,T,at,null);if($i.return=c,$i.child=null,(c.mode&Y)===Ar)for(var ot=$i.child=c.child;ot!==null;)ot.return=$i,ot=ot.sibling;else Tf(c,f.child,null,E);if(en&&c.mode&ii){for(var Ot=0,Ze=$i.child;Ze!==null;)Ot+=Ze.treeBaseDuration,Ze=Ze.sibling;$i.treeBaseDuration=Ot}var Ut=nf(L0,T,E,null);return Ut.return=c,$i.sibling=Ut,Ut.effectTag|=mi,$i.childExpirationTime=at,c.memoizedState=Cd,c.child=$i,Ut}else return Wh(f,c,Oi,oi,E)}var Pn=f.child,vn=Pn.sibling;if(V){var Wi=A.fallback,pi=To(Pn,Pn.pendingProps,at);if(pi.return=c,(c.mode&Y)===Ar){var Ku=c.memoizedState,hr=Ku!==null?c.child.child:c.child;if(hr!==Pn.child){pi.child=hr;for(var pu=hr;pu!==null;)pu.return=pi,pu=pu.sibling}}if(en&&c.mode&ii){for(var Kr=0,xu=pi.child;xu!==null;)Kr+=xu.treeBaseDuration,xu=xu.sibling;pi.treeBaseDuration=Kr}var w0=To(vn,Wi,vn.expirationTime);return w0.return=c,pi.sibling=w0,pi.childExpirationTime=at,c.memoizedState=Cd,c.child=pi,w0}else{var W0=A.children,Ms=Pn.child,Xu=Tf(c,Ms,W0,E);return c.memoizedState=null,c.child=Xu}}else{var yl=f.child;if(V){var rf=A.fallback,Wo=nf(null,T,at,null);if(Wo.return=c,Wo.child=yl,yl!==null&&(yl.return=Wo),(c.mode&Y)===Ar){var ks=c.memoizedState,Zd=ks!==null?c.child.child:c.child;Wo.child=Zd;for(var Vf=Zd;Vf!==null;)Vf.return=Wo,Vf=Vf.sibling}if(en&&c.mode&ii){for(var Lc=0,zl=Wo.child;zl!==null;)Lc+=zl.treeBaseDuration,zl=zl.sibling;Wo.treeBaseDuration=Lc}var Vo=nf(rf,T,E,null);return Vo.return=c,Wo.sibling=Vo,Vo.effectTag|=mi,Wo.childExpirationTime=at,c.memoizedState=Cd,c.child=Wo,Vo}else{c.memoizedState=null;var N1=A.children;return c.child=Tf(c,yl,N1,E)}}}}function np(f,c,E){c.memoizedState=null;var T=c.pendingProps,A=T.children;return Do(f,c,A,E),c.child}function qh(f,c,E){if((f.mode&Y)===Ar)Xt(!1,"Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOM.createBlockingRoot(container, { hydrate: true }).render(element) or remove the Suspense components from the server rendered components."),f.expirationTime=Un;else if(y0(c)){var T=Ul(),A=Ds(T);bn&&x(A),f.expirationTime=A}else f.expirationTime=Di,bn&&x(Di);return null}function Wh(f,c,E,T,A){if(W2(),(c.mode&Y)===Ar||y0(E))return np(f,c,A);var j=f.childExpirationTime>=A;if(wa||j){if(A. Use lowercase "%s" instead.',f,f.toLowerCase());break}case"forward":case"backward":{Xt(!1,'"%s" is not a valid value for revealOrder on . React uses the -s suffix in the spelling. Use "%ss" instead.',f,f.toLowerCase());break}default:Xt(!1,'"%s" is not a supported revealOrder on . Did you mean "together", "forwards" or "backwards"?',f);break}else Xt(!1,'%s is not a supported value for revealOrder on . Did you mean "together", "forwards" or "backwards"?',f)}function Vh(f,c){f!==void 0&&!Sc[f]&&(f!=="collapsed"&&f!=="hidden"?(Sc[f]=!0,Xt(!1,'"%s" is not a supported value for tail on . Did you mean "collapsed" or "hidden"?',f)):c!=="forwards"&&c!=="backwards"&&(Sc[f]=!0,Xt(!1,' is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',f)))}function g1(f,c){{var E=Array.isArray(f),T=!E&&typeof fr(f)=="function";if(E||T){var A=E?"array":"iterable";return Xt(!1,"A nested %s was passed to row #%s in . Wrap it in an additional SuspenseList to configure its revealOrder: ... {%s} ... ",A,c,A),!1}}return!0}function gm(f,c){if((c==="forwards"||c==="backwards")&&f!==void 0&&f!==null&&f!==!1)if(Array.isArray(f)){for(var E=0;E. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',c)}}function ip(f,c,E,T,A,j){var V=f.memoizedState;V===null?f.memoizedState={isBackwards:c,rendering:null,last:T,tail:E,tailExpiration:0,tailMode:A,lastEffect:j}:(V.isBackwards=c,V.rendering=null,V.last=T,V.tail=E,V.tailExpiration=0,V.tailMode=A,V.lastEffect=j)}function up(f,c,E){var T=c.pendingProps,A=T.revealOrder,j=T.tail,V=T.children;ym(A),Vh(j,A),gm(V,A),Do(f,c,V,E);var te=kl.current,le=e1(te,$c);if(le)te=hd(te,$c),c.effectTag|=Xr;else{var Be=f!==null&&(f.effectTag&Xr)!==xi;Be&&vm(c,c.child,E),te=ya(te)}if(Fr(c,te),(c.mode&Y)===Ar)c.memoizedState=null;else switch(A){case"forwards":{var Ke=mm(c.child),pt;Ke===null?(pt=c.child,c.child=null):(pt=Ke.sibling,Ke.sibling=null),ip(c,!1,pt,Ke,j,c.lastEffect);break}case"backwards":{var Nt=null,Gt=c.child;for(c.child=null;Gt!==null;){var zt=Gt.alternate;if(zt!==null&&t1(zt)===null){c.child=Gt;break}var yn=Gt.sibling;Gt.sibling=Nt,Nt=Gt,Gt=yn}ip(c,!0,Nt,null,j,c.lastEffect);break}case"together":{ip(c,!1,null,null,void 0,c.lastEffect);break}default:c.memoizedState=null}return c.child}function _m(f,c,E){Ya(c,c.stateNode.containerInfo);var T=c.pendingProps;return f===null?c.child=Tf(c,null,T,E):Do(f,c,T,E),c.child}function Em(f,c,E){var T=c.type,A=T._context,j=c.pendingProps,V=c.memoizedProps,te=j.value;{var le=c.type.propTypes;le&&_(le,j,"prop","Context.Provider",Lr)}if(xr(c,te),V!==null){var Be=V.value,Ke=cu(A,te,Be);if(Ke===0){if(V.children===j.children&&!sa())return Ta(f,c,E)}else Ol(c,A,Ke,E)}var pt=j.children;return Do(f,c,pt,E),c.child}var Gh=!1;function Dm(f,c,E){var T=c.type;T._context===void 0?T!==T.Consumer&&(Gh||(Gh=!0,Xt(!1,"Rendering directly is not supported and will be removed in a future major release. Did you mean to render instead?"))):T=T._context;var A=c.pendingProps,j=A.children;typeof j!="function"&&We(!1,"A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),u0(c,E);var V=Ve(T,A.unstable_observedBits),te;return v1.current=c,$e("render"),te=j(V),$e(null),c.effectTag|=lu,Do(f,c,te,E),c.child}function wm(f,c,E){var T=c.type.impl;if(T.reconcileChildren===!1)return null;var A=c.pendingProps,j=A.children;return Do(f,c,j,E),c.child}function op(f,c,E){var T=c.pendingProps,A=T.children;return Do(f,c,A,E),c.child}function lp(){wa=!0}function Ta(f,c,E){tu(c),f!==null&&(c.dependencies=f.dependencies),en&&Mh(c);var T=c.expirationTime;T!==at&&Xd(T);var A=c.childExpirationTime;return A=E;le&&(c.effectTag|=Dr)}break;case pe:{var Be=c.memoizedState;if(Be!==null){if(Ai&&Be.dehydrated!==null){Fr(c,ya(kl.current)),c.effectTag|=Xr;break}var Ke=c.child,pt=Ke.childExpirationTime;if(pt!==at&&pt>=E)return Hh(f,c,E);Fr(c,ya(kl.current));var Nt=Ta(f,c,E);return Nt!==null?Nt.sibling:null}else Fr(c,ya(kl.current));break}case yt:{var Gt=(f.effectTag&Xr)!==xi,zt=c.childExpirationTime>=E;if(Gt){if(zt)return up(f,c,E);c.effectTag|=Xr}var yn=c.memoizedState;if(yn!==null&&(yn.rendering=null,yn.tail=null),Fr(c,kl.current),zt)break;return null}}return Ta(f,c,E)}else wa=!1}else wa=!1;switch(c.expirationTime=at,c.tag){case C:return hm(f,c,c.type,E);case Oe:{var kr=c.elementType;return If(f,c,kr,T,E)}case L:{var oi=c.type,Oi=c.pendingProps,L0=c.elementType===oi?Oi:qi(oi,Oi);return Z2(f,c,oi,L0,E)}case O:{var $i=c.type,ot=c.pendingProps,Ot=c.elementType===$i?ot:qi($i,ot);return jh(f,c,$i,Ot,E)}case U:return dm(f,c,E);case W:return pm(f,c,E);case ne:return Pf(f,c);case pe:return Hh(f,c,E);case H:return _m(f,c,E);case se:{var Ze=c.type,Ut=c.pendingProps,Pn=c.elementType===Ze?Ut:qi(Ze,Ut);return Ph(f,c,Ze,Pn,E)}case m:return cm(f,c,E);case he:return Bh(f,c,E);case De:return Uh(f,c,E);case ve:return Em(f,c,E);case Ee:return Dm(f,c,E);case me:{var vn=c.type,Wi=c.pendingProps,pi=qi(vn,Wi);if(c.type!==c.elementType){var Ku=vn.propTypes;Ku&&_(Ku,pi,"prop",qt(vn),Lr)}return pi=qi(vn.type,pi),Ih(f,c,vn,pi,T,E)}case ie:return bh(f,c,c.type,c.pendingProps,T,E);case je:{var hr=c.type,pu=c.pendingProps,Kr=c.elementType===hr?pu:qi(hr,pu);return Td(f,c,hr,Kr,E)}case yt:return up(f,c,E);case gt:{if(Wt)return wm(f,c,E);break}case Xe:{if(Au)return op(f,c,E);break}}throw Error("Unknown unit of work tag ("+c.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Yh(f,c,E,T){return{currentFiber:f,impl:E,instance:null,prevProps:null,props:c,state:T}}function xd(f){return f.tag===pe&&f.memoizedState!==null}function E1(f){return f.child.sibling.child}var Kh={};function ap(f,c,E){if(Au){if(f.tag===W){var T=f.type,A=f.memoizedProps,j=f.stateNode,V=No(j);V!==null&&c(T,A||Kh,V)===!0&&E.push(V)}var te=f.child;xd(f)&&(te=E1(f)),te!==null&&fp(te,c,E)}}function Xh(f,c){if(Au){if(f.tag===W){var E=f.type,T=f.memoizedProps,A=f.stateNode,j=No(A);if(j!==null&&c(E,T,j)===!0)return j}var V=f.child;if(xd(f)&&(V=E1(f)),V!==null)return Qh(V,c)}return null}function fp(f,c,E){for(var T=f;T!==null;)ap(T,c,E),T=T.sibling}function Qh(f,c){for(var E=f;E!==null;){var T=Xh(E,c);if(T!==null)return T;E=E.sibling}return null}function Jh(f,c,E){if(Rd(f,c))E.push(f.stateNode.methods);else{var T=f.child;xd(f)&&(T=E1(f)),T!==null&&cp(T,c,E)}}function cp(f,c,E){for(var T=f;T!==null;)Jh(T,c,E),T=T.sibling}function Rd(f,c){return f.tag===Xe&&f.type===c&&f.stateNode!==null}function Ad(f,c){return{getChildren:function(){var E=c.fiber,T=E.child,A=[];return T!==null&&cp(T,f,A),A.length===0?null:A},getChildrenFromRoot:function(){for(var E=c.fiber,T=E;T!==null;){var A=T.return;if(A===null||(T=A,T.tag===Xe&&T.type===f))break}var j=[];return cp(T.child,f,j),j.length===0?null:j},getParent:function(){for(var E=c.fiber.return;E!==null;){if(E.tag===Xe&&E.type===f)return E.stateNode.methods;E=E.return}return null},getProps:function(){var E=c.fiber;return E.memoizedProps},queryAllNodes:function(E){var T=c.fiber,A=T.child,j=[];return A!==null&&fp(A,E,j),j.length===0?null:j},queryFirstNode:function(E){var T=c.fiber,A=T.child;return A!==null?Qh(A,E):null},containsNode:function(E){for(var T=cr(E);T!==null;){if(T.tag===Xe&&T.type===f&&T.stateNode===c)return!0;T=T.return}return!1}}}function H0(f){f.effectTag|=Dr}function Od(f){f.effectTag|=Ao}var Ca,$a,Md,kd;if(b0)Ca=function(f,c,E,T){for(var A=c.child;A!==null;){if(A.tag===W||A.tag===ne)Qr(f,A.stateNode);else if(Wt&&A.tag===gt)Qr(f,A.stateNode.instance);else if(A.tag!==H){if(A.child!==null){A.child.return=A,A=A.child;continue}}if(A===c)return;for(;A.sibling===null;){if(A.return===null||A.return===c)return;A=A.return}A.sibling.return=A.return,A=A.sibling}},$a=function(f){},Md=function(f,c,E,T,A){var j=f.memoizedProps;if(j!==T){var V=c.stateNode,te=al(),le=h0(V,E,j,T,A,te);c.updateQueue=le,le&&H0(c)}},kd=function(f,c,E,T){E!==T&&H0(c)};else if(X){Ca=function(f,c,E,T){for(var A=c.child;A!==null;){e:if(A.tag===W){var j=A.stateNode;if(E&&T){var V=A.memoizedProps,te=A.type;j=$r(j,te,V,A)}Qr(f,j)}else if(A.tag===ne){var le=A.stateNode;if(E&&T){var Be=A.memoizedProps;le=Zl(le,Be,A)}Qr(f,le)}else if(Wt&&A.tag===gt){var Ke=A.stateNode.instance;if(E&&T){var pt=A.memoizedProps,Nt=A.type;Ke=$r(Ke,Nt,pt,A)}Qr(f,Ke)}else if(A.tag!==H){if(A.tag===pe){if((A.effectTag&Dr)!==xi){var Gt=A.memoizedState!==null;if(Gt){var zt=A.child;if(zt!==null){zt.child!==null&&(zt.child.return=zt,Ca(f,zt,!0,Gt));var yn=zt.sibling;if(yn!==null){yn.return=A,A=yn;continue}}}}if(A.child!==null){A.child.return=A,A=A.child;continue}}else if(A.child!==null){A.child.return=A,A=A.child;continue}}if(A=A,A===c)return;for(;A.sibling===null;){if(A.return===null||A.return===c)return;A=A.return}A.sibling.return=A.return,A=A.sibling}};var dp=function(f,c,E,T){for(var A=c.child;A!==null;){e:if(A.tag===W){var j=A.stateNode;if(E&&T){var V=A.memoizedProps,te=A.type;j=$r(j,te,V,A)}Qn(f,j)}else if(A.tag===ne){var le=A.stateNode;if(E&&T){var Be=A.memoizedProps;le=Zl(le,Be,A)}Qn(f,le)}else if(Wt&&A.tag===gt){var Ke=A.stateNode.instance;if(E&&T){var pt=A.memoizedProps,Nt=A.type;Ke=$r(Ke,Nt,pt,A)}Qn(f,Ke)}else if(A.tag!==H){if(A.tag===pe){if((A.effectTag&Dr)!==xi){var Gt=A.memoizedState!==null;if(Gt){var zt=A.child;if(zt!==null){zt.child!==null&&(zt.child.return=zt,dp(f,zt,!0,Gt));var yn=zt.sibling;if(yn!==null){yn.return=A,A=yn;continue}}}}if(A.child!==null){A.child.return=A,A=A.child;continue}}else if(A.child!==null){A.child.return=A,A=A.child;continue}}if(A=A,A===c)return;for(;A.sibling===null;){if(A.return===null||A.return===c)return;A=A.return}A.sibling.return=A.return,A=A.sibling}};$a=function(f){var c=f.stateNode,E=f.firstEffect===null;if(!E){var T=c.containerInfo,A=S0(T);dp(A,f,!1,!1),c.pendingChildren=A,H0(f),ac(T,A)}},Md=function(f,c,E,T,A){var j=f.stateNode,V=f.memoizedProps,te=c.firstEffect===null;if(te&&V===T){c.stateNode=j;return}var le=c.stateNode,Be=al(),Ke=null;if(V!==T&&(Ke=h0(le,E,V,T,A,Be)),te&&Ke===null){c.stateNode=j;return}var pt=ms(j,Ke,E,V,T,c,te,le);Ou(pt,E,T,A,Be)&&H0(c),c.stateNode=pt,te?H0(c):Ca(pt,c,!1,!1)},kd=function(f,c,E,T){if(E!==T){var A=ns(),j=al();c.stateNode=hs(T,A,j,c),H0(c)}}}else $a=function(f){},Md=function(f,c,E,T,A){},kd=function(f,c,E,T){};function Nd(f,c){switch(f.tailMode){case"hidden":{for(var E=f.tail,T=null;E!==null;)E.alternate!==null&&(T=E),E=E.sibling;T===null?f.tail=null:T.sibling=null;break}case"collapsed":{for(var A=f.tail,j=null;A!==null;)A.alternate!==null&&(j=A),A=A.sibling;j===null?!c&&f.tail!==null?f.tail.sibling=null:f.tail=null:j.sibling=null;break}}}function Zh(f,c,E){var T=c.pendingProps;switch(c.tag){case C:break;case Oe:break;case ie:case L:break;case O:{var A=c.type;Xi(A)&&Hs(c);break}case U:{io(c),R0(c);var j=c.stateNode;if(j.pendingContext&&(j.context=j.pendingContext,j.pendingContext=null),f===null||f.child===null){var V=p1(c);V&&H0(c)}$a(c);break}case W:{k2(c);var te=ns(),le=c.type;if(f!==null&&c.stateNode!=null){if(Md(f,c,le,T,te),gi){var Be=f.memoizedProps.listeners,Ke=T.listeners;Be!==Ke&&H0(c)}f.ref!==c.ref&&Od(c)}else{if(!T){if(c.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");break}var pt=al(),Nt=p1(c);if(Nt){if(sm(c,te,pt)&&H0(c),gi){var Gt=T.listeners;Gt!=null&&hn(Gt,c,te)}}else{var zt=Ki(le,T,te,pt,c);if(Ca(zt,c,!1,!1),c.stateNode=zt,gi){var yn=T.listeners;yn!=null&&hn(yn,c,te)}Ou(zt,le,T,te,pt)&&H0(c)}c.ref!==null&&Od(c)}break}case ne:{var kr=T;if(f&&c.stateNode!=null){var oi=f.memoizedProps;kd(f,c,oi,kr)}else{if(typeof kr!="string"&&c.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var Oi=ns(),L0=al(),$i=p1(c);$i?am(c)&&H0(c):c.stateNode=hs(kr,Oi,L0,c)}break}case se:break;case pe:{ga(c);var ot=c.memoizedState;if(Ai&&ot!==null&&ot.dehydrated!==null)if(f===null){var Ot=p1(c);if(!Ot)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");return Lh(c),bn&&x(Di),null}else return h1(),(c.effectTag&Xr)===xi&&(c.memoizedState=null),c.effectTag|=Dr,null;if((c.effectTag&Xr)!==xi)return c.expirationTime=E,c;var Ze=ot!==null,Ut=!1;if(f===null)c.memoizedProps.fallback!==void 0&&p1(c);else{var Pn=f.memoizedState;if(Ut=Pn!==null,!Ze&&Pn!==null){var vn=f.child.sibling;if(vn!==null){var Wi=c.firstEffect;Wi!==null?(c.firstEffect=vn,vn.nextEffect=Wi):(c.firstEffect=c.lastEffect=vn,vn.nextEffect=null),vn.effectTag=G0}}}if(Ze&&!Ut&&(c.mode&Y)!==Ar){var pi=f===null&&c.memoizedProps.unstable_avoidThisFallback!==!0;pi||e1(kl.current,xf)?mv():yv()}X&&Ze&&(c.effectTag|=Dr),b0&&(Ze||Ut)&&(c.effectTag|=Dr),Yi&&c.updateQueue!==null&&c.memoizedProps.suspenseCallback!=null&&(c.effectTag|=Dr);break}case m:break;case he:break;case De:break;case H:io(c),$a(c);break;case ve:i0(c);break;case Ee:break;case me:break;case je:{var Ku=c.type;Xi(Ku)&&Hs(c);break}case yt:{ga(c);var hr=c.memoizedState;if(hr===null)break;var pu=(c.effectTag&Xr)!==xi,Kr=hr.rendering;if(Kr===null)if(pu)Nd(hr,!1);else{var xu=gv()&&(f===null||(f.effectTag&Xr)===xi);if(!xu)for(var w0=c.child;w0!==null;){var W0=t1(w0);if(W0!==null){pu=!0,c.effectTag|=Xr,Nd(hr,!1);var Ms=W0.updateQueue;return Ms!==null&&(c.updateQueue=Ms,c.effectTag|=Dr),hr.lastEffect===null&&(c.firstEffect=null),c.lastEffect=hr.lastEffect,nm(c,E),Fr(c,hd(kl.current,$c)),c.child}w0=w0.sibling}}else{if(!pu){var Xu=t1(Kr);if(Xu!==null){c.effectTag|=Xr,pu=!0;var yl=Xu.updateQueue;if(yl!==null&&(c.updateQueue=yl,c.effectTag|=Dr),Nd(hr,!0),hr.tail===null&&hr.tailMode==="hidden"&&!Kr.alternate){var rf=c.lastEffect=hr.lastEffect;return rf!==null&&(rf.nextEffect=null),null}}else if(vt()>hr.tailExpiration&&E>Di){c.effectTag|=Xr,pu=!0,Nd(hr,!1);var Wo=E-1;c.expirationTime=c.childExpirationTime=Wo,bn&&x(Wo)}}if(hr.isBackwards)Kr.sibling=c.child,c.child=Kr;else{var ks=hr.last;ks!==null?ks.sibling=Kr:c.child=Kr,hr.last=Kr}}if(hr.tail!==null){if(hr.tailExpiration===0){var Zd=500;hr.tailExpiration=vt()+Zd}var Vf=hr.tail;hr.rendering=Vf,hr.tail=Vf.sibling,hr.lastEffect=c.lastEffect,Vf.sibling=null;var Lc=kl.current;return pu?Lc=hd(Lc,$c):Lc=ya(Lc),Fr(c,Lc),Vf}break}case gt:{if(Wt){var zl=c.type.impl,Vo=c.stateNode;if(Vo===null){var N1=zl.getInitialState,n_;N1!==void 0&&(n_=N1(T)),Vo=c.stateNode=Yh(c,T,zl,n_||{});var r_=dt(Vo);if(Vo.instance=r_,zl.reconcileChildren===!1)return null;Ca(r_,c,!1,!1),Yn(Vo)}else{var $4=Vo.props;if(Vo.prevProps=$4,Vo.props=T,Vo.currentFiber=c,X){var i_=oa(Vo);Vo.instance=i_,Ca(i_,c,!1,!1)}var eE=Cn(Vo);eE&&H0(c)}}break}case Xe:{if(Au)if(f===null){var tE=c.type,Ey={fiber:c,methods:null};if(c.stateNode=Ey,Ey.methods=Ad(tE,Ey),gi){var u_=T.listeners;if(u_!=null){var nE=ns();hn(u_,c,nE)}}c.ref!==null&&(Od(c),H0(c))}else{if(gi){var rE=f.memoizedProps.listeners,iE=T.listeners;(rE!==iE||c.ref!==null)&&H0(c)}else c.ref!==null&&H0(c);f.ref!==c.ref&&Od(c)}break}default:throw Error("Unknown unit of work tag ("+c.tag+"). This error is likely caused by a bug in React. Please file an issue.")}return null}function Sm(f,c){switch(f.tag){case O:{var E=f.type;Xi(E)&&Hs(f);var T=f.effectTag;return T&p0?(f.effectTag=T&~p0|Xr,f):null}case U:{io(f),R0(f);var A=f.effectTag;if((A&Xr)!==xi)throw Error("The root failed to unmount after an error. This is likely a bug in React. Please file an issue.");return f.effectTag=A&~p0|Xr,f}case W:return k2(f),null;case pe:{if(ga(f),Ai){var j=f.memoizedState;if(j!==null&&j.dehydrated!==null){if(f.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");h1()}}var V=f.effectTag;return V&p0?(f.effectTag=V&~p0|Xr,f):null}case yt:return ga(f),null;case H:return io(f),null;case ve:return i0(f),null;default:return null}}function $h(f){switch(f.tag){case O:{var c=f.type.childContextTypes;c!=null&&Hs(f);break}case U:{io(f),R0(f);break}case W:{k2(f);break}case H:io(f);break;case pe:ga(f);break;case yt:ga(f);break;case ve:i0(f);break;default:break}}function pp(f,c){return{value:f,source:c,stack:Cr(c)}}var hp=function(f,c,E,T,A,j,V,te,le){var Be=Array.prototype.slice.call(arguments,3);try{c.apply(E,Be)}catch(Ke){this.onError(Ke)}};if(typeof window!="undefined"&&typeof window.dispatchEvent=="function"&&typeof document!="undefined"&&typeof document.createEvent=="function"){var vp=document.createElement("react"),Tm=function(f,c,E,T,A,j,V,te,le){if(typeof document=="undefined")throw Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var Be=document.createEvent("Event"),Ke=!0,pt=window.event,Nt=Object.getOwnPropertyDescriptor(window,"event"),Gt=Array.prototype.slice.call(arguments,3);function zt(){vp.removeEventListener(L0,zt,!1),typeof window.event!="undefined"&&window.hasOwnProperty("event")&&(window.event=pt),c.apply(E,Gt),Ke=!1}var yn,kr=!1,oi=!1;function Oi($i){if(yn=$i.error,kr=!0,yn===null&&$i.colno===0&&$i.lineno===0&&(oi=!0),$i.defaultPrevented&&yn!=null&&typeof yn=="object")try{yn._suppressLogging=!0}catch(ot){}}var L0="react-"+(f||"invokeguardedcallback");window.addEventListener("error",Oi),vp.addEventListener(L0,zt,!1),Be.initEvent(L0,!1,!1),vp.dispatchEvent(Be),Nt&&Object.defineProperty(window,"event",Nt),Ke&&(kr?oi&&(yn=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://fb.me/react-crossorigin-error for more information.")):yn=new Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`),this.onError(yn)),window.removeEventListener("error",Oi)};hp=Tm}var Cm=hp,wo=!1,Ld=null,xm={onError:function(f){wo=!0,Ld=f}};function dl(f,c,E,T,A,j,V,te,le){wo=!1,Ld=null,Cm.apply(xm,arguments)}function tr(){return wo}function Qs(){if(wo){var f=Ld;return wo=!1,Ld=null,f}else throw Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}function pl(f){return!0}function l0(f){var c=pl(f);if(c!==!1){var E=f.error;{var T=f.componentName,A=f.componentStack,j=f.errorBoundaryName,V=f.errorBoundaryFound,te=f.willRetry;if(E!=null&&E._suppressLogging){if(V&&te)return;console.error(E)}var le=T?"The above error occurred in the <"+T+"> component:":"The above error occurred in one of your React components:",Be;V&&j?te?Be="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+j+"."):Be="This error was initially handled by the error boundary "+j+`. -Recreating the tree from scratch failed so React will unmount the tree.`:Be=`Consider adding an error boundary to your tree to customize error handling behavior. -Visit https://fb.me/react-error-boundaries to learn more about error boundaries.`;var Ke=""+le+A+` - -`+(""+Be);console.error(Ke)}}}var ev=null;ev=new Set;var Js=typeof WeakSet=="function"?WeakSet:Set;function mp(f,c){var E=c.source,T=c.stack;T===null&&E!==null&&(T=Cr(E));var A={componentName:E!==null?qt(E.type):null,componentStack:T!==null?T:"",error:c.value,errorBoundary:null,errorBoundaryName:null,errorBoundaryFound:!1,willRetry:!1};f!==null&&f.tag===O&&(A.errorBoundary=f.stateNode,A.errorBoundaryName=qt(f.type),A.errorBoundaryFound=!0,A.willRetry=!0);try{l0(A)}catch(j){setTimeout(function(){throw j})}}var Rm=function(f,c){Bi(f,"componentWillUnmount"),c.props=f.memoizedProps,c.state=f.memoizedState,c.componentWillUnmount(),Ci()};function tv(f,c){if(dl(null,Rm,null,f,c),tr()){var E=Qs();Hf(f,E)}}function yp(f){var c=f.ref;if(c!==null)if(typeof c=="function"){if(dl(null,c,null,null),tr()){var E=Qs();Hf(f,E)}}else c.current=null}function Am(f,c){if(dl(null,c,null),tr()){var E=Qs();Hf(f,E)}}function gp(f,c){switch(c.tag){case L:case se:case ie:{Tc(im,Af,c);return}case O:{if(c.effectTag&Oo&&f!==null){var E=f.memoizedProps,T=f.memoizedState;Bi(c,"getSnapshotBeforeUpdate");var A=c.stateNode;c.type===c.elementType&&!Sa&&(A.props!==c.memoizedProps&&Xt(!1,"Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(c.type)||"instance"),A.state!==c.memoizedState&&Xt(!1,"Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(c.type)||"instance"));var j=A.getSnapshotBeforeUpdate(c.elementType===c.type?E:qi(c.type,E),T);{var V=ev;j===void 0&&!V.has(c.type)&&(V.add(c.type),We(!1,"%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",qt(c.type)))}A.__reactInternalSnapshotBeforeUpdate=j,Ci()}return}case U:case W:case ne:case H:case je:return;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function Tc(f,c,E){var T=E.updateQueue,A=T!==null?T.lastEffect:null;if(A!==null){var j=A.next,V=j;do{if((V.tag&f)!==Af){var te=V.destroy;V.destroy=void 0,te!==void 0&&te()}if((V.tag&c)!==Af){var le=V.create;V.destroy=le();{var Be=V.destroy;if(Be!==void 0&&typeof Be!="function"){var Ke=void 0;Be===null?Ke=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof Be.then=="function"?Ke=` - -It looks like you wrote useEffect(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately: - -useEffect(() => { - async function fetchData() { - // You can await here - const response = await MyAPI.getData(someId); - // ... - } - fetchData(); -}, [someId]); // Or [] if effect doesn't need props or state - -Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching`:Ke=" You returned: "+Be,We(!1,"An effect function must not return anything besides a function, which is used for clean-up.%s%s",Ke,Cr(E))}}}V=V.next}while(V!==j)}}function xa(f){if((f.effectTag&F0)!==xi)switch(f.tag){case L:case se:case ie:{Tc(sr,Af,f),Tc(Af,n1,f);break}default:break}}function _p(f,c,E,T){switch(E.tag){case L:case se:case ie:{Tc(um,fl,E);break}case O:{var A=E.stateNode;if(E.effectTag&Dr)if(c===null)Bi(E,"componentDidMount"),E.type===E.elementType&&!Sa&&(A.props!==E.memoizedProps&&Xt(!1,"Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(E.type)||"instance"),A.state!==E.memoizedState&&Xt(!1,"Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(E.type)||"instance")),A.componentDidMount(),Ci();else{var j=E.elementType===E.type?c.memoizedProps:qi(E.type,c.memoizedProps),V=c.memoizedState;Bi(E,"componentDidUpdate"),E.type===E.elementType&&!Sa&&(A.props!==E.memoizedProps&&Xt(!1,"Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(E.type)||"instance"),A.state!==E.memoizedState&&Xt(!1,"Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(E.type)||"instance")),A.componentDidUpdate(j,V,A.__reactInternalSnapshotBeforeUpdate),Ci()}var te=E.updateQueue;te!==null&&(E.type===E.elementType&&!Sa&&(A.props!==E.memoizedProps&&Xt(!1,"Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(E.type)||"instance"),A.state!==E.memoizedState&&Xt(!1,"Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(E.type)||"instance")),yo(E,te,A,T));return}case U:{var le=E.updateQueue;if(le!==null){var Be=null;if(E.child!==null)switch(E.child.tag){case W:Be=No(E.child.stateNode);break;case O:Be=E.child.stateNode;break}yo(E,le,Be,T)}return}case W:{var Ke=E.stateNode;if(c===null&&E.effectTag&Dr){var pt=E.type,Nt=E.memoizedProps;Hu(Ke,pt,Nt,E)}return}case ne:return;case H:return;case De:{if(en){var Gt=E.memoizedProps.onRender;typeof Gt=="function"&&(bn?Gt(E.memoizedProps.id,c===null?"mount":"update",E.actualDuration,E.treeBaseDuration,E.actualStartTime,Pl(),f.memoizedInteractions):Gt(E.memoizedProps.id,c===null?"mount":"update",E.actualDuration,E.treeBaseDuration,E.actualStartTime,Pl()))}return}case pe:{bl(f,E);return}case yt:case je:case gt:case Xe:return;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function Fd(f,c){if(b0)for(var E=f;;){if(E.tag===W){var T=E.stateNode;c?Pa(T):ia(E.stateNode,E.memoizedProps)}else if(E.tag===ne){var A=E.stateNode;c?m0(A):Q0(A,E.memoizedProps)}else if(E.tag===pe&&E.memoizedState!==null&&E.memoizedState.dehydrated===null){var j=E.child.sibling;j.return=E,E=j;continue}else if(E.child!==null){E.child.return=E,E=E.child;continue}if(E===f)return;for(;E.sibling===null;){if(E.return===null||E.return===f)return;E=E.return}E.sibling.return=E.return,E=E.sibling}}function bu(f){var c=f.ref;if(c!==null){var E=f.stateNode,T;switch(f.tag){case W:T=No(E);break;default:T=E}Au&&f.tag===Xe&&(T=E.methods),typeof c=="function"?c(T):(c.hasOwnProperty("current")||We(!1,"Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().%s",qt(f.type),Cr(f)),c.current=T)}}function Yu(f){var c=f.ref;c!==null&&(typeof c=="function"?c(null):c.current=null)}function Ep(f,c,E){switch(kn(c),c.tag){case L:case se:case me:case ie:{var T=c.updateQueue;if(T!==null){var A=T.lastEffect;if(A!==null){var j=A.next,V=E>Kn?Kn:E;Sn(V,function(){var oi=j;do{var Oi=oi.destroy;Oi!==void 0&&Am(c,Oi),oi=oi.next}while(oi!==j)})}}break}case O:{yp(c);var te=c.stateNode;typeof te.componentWillUnmount=="function"&&tv(c,te);return}case W:{if(gi){var le=c.dependencies;if(le!==null){var Be=le.responders;if(Be!==null){for(var Ke=Array.from(Be.values()),pt=0,Nt=Ke.length;pt component higher in the tree to provide a loading indicator or placeholder to display.`+Cr(E))}Mp(),T=pp(T,E);var Nt=c;do{switch(Nt.tag){case U:{var Gt=T;Nt.effectTag|=p0,Nt.expirationTime=A;var zt=uv(Nt,Gt,A);od(Nt,zt);return}case O:var yn=T,kr=Nt.type,oi=Nt.stateNode;if((Nt.effectTag&Xr)===xi&&(typeof kr.getDerivedStateFromError=="function"||oi!==null&&typeof oi.componentDidCatch=="function"&&!Pp(oi))){Nt.effectTag|=p0,Nt.expirationTime=A;var Oi=ov(Nt,yn,A);od(Nt,Oi);return}break;default:break}Nt=Nt.return}while(Nt!==null)}var Aa=Math.ceil,Mr=rt.ReactCurrentDispatcher,wp=rt.ReactCurrentOwner,hl=rt.IsSomeRendererActing,gu=0,S1=1,Ui=2,Sp=4,bd=8,So=16,As=32,bf=0,Bd=1,Tp=2,T1=3,C1=4,Cp=5,nr=gu,vl=null,Gn=null,q0=at,k0=bf,Ud=null,Bl=Un,x1=Un,xc=null,Rc=at,jd=!1,xp=0,N0=500,dn=null,zd=!1,Hd=null,Ac=null,Oc=!1,Mc=null,R1=E0,Rp=at,ef=null,Pm=50,kc=0,qd=null,sv=50,A1=0,Bf=null,Uf=null,O1=at;function Ul(){return(nr&(So|As))!==gu?n0(vt()):(O1!==at||(O1=n0(vt())),O1)}function Nc(){return n0(vt())}function jf(f,c,E){var T=c.mode;if((T&Y)===Ar)return Un;var A=Qt();if((T&ri)===Ar)return A===Li?Un:t0;if((nr&So)!==gu)return q0;var j;if(E!==null)j=fa(f,E.timeoutMs|0||_f);else switch(A){case Li:j=Un;break;case ni:j=Ua(f);break;case Kn:case e0:j=Ds(f);break;case _0:j=ru;break;default:throw Error("Expected a valid priority level")}return vl!==null&&j===q0&&(j-=1),j}function Im(f,c){ty(),uy(f);var E=Wd(f,c);if(E===null){ry(f);return}zp(f,c),la();var T=Qt();if(c===Un?(nr&bd)!==gu&&(nr&(So|As))===gu?(q(E,c),M1(E)):(qo(E),q(E,c),nr===gu&&Bt()):(qo(E),q(E,c)),(nr&Sp)!==gu&&(T===ni||T===Li))if(ef===null)ef=new Map([[E,c]]);else{var A=ef.get(E);(A===void 0||A>c)&&ef.set(E,c)}}var ml=Im;function Wd(f,c){f.expirationTimeA?T:A}function qo(f){var c=f.lastExpiredTime;if(c!==at){f.callbackExpirationTime=Un,f.callbackPriority=Li,f.callbackNode=Tn(M1.bind(null,f));return}var E=Vd(f),T=f.callbackNode;if(E===at){T!==null&&(f.callbackNode=null,f.callbackExpirationTime=at,f.callbackPriority=E0);return}var A=Ul(),j=nd(A,E);if(T!==null){var V=f.callbackPriority,te=f.callbackExpirationTime;if(te===E&&V>=j)return;ir(T)}f.callbackExpirationTime=E,f.callbackPriority=j;var le;E===Un?le=Tn(M1.bind(null,f)):so?le=_n(j,Gd.bind(null,f)):le=_n(j,Gd.bind(null,f),{timeout:Uo(E)-vt()}),f.callbackNode=le}function Gd(f,c){if(O1=at,c){var E=Ul();return Wp(f,E),qo(f),null}var T=Vd(f);if(T!==at){var A=f.callbackNode;if((nr&(So|As))!==gu)throw Error("Should not already be working.");if(tf(),(f!==vl||T!==q0)&&(zf(f,T),ee(f,T)),Gn!==null){var j=nr;nr|=So;var V=pv(f),te=Yd(f);mf(Gn);do try{Ym();break}catch(Ke){dv(f,Ke)}while(!0);if(mt(),nr=j,hv(V),bn&&Kd(te),k0===Bd){var le=Ud;throw jp(),zf(f,T),Wf(f,T),qo(f),le}if(Gn!==null)jp();else{Tv();var Be=f.finishedWork=f.current.alternate;f.finishedExpirationTime=T,bm(f,Be,k0,T)}if(qo(f),f.callbackNode===A)return Gd.bind(null,f)}}return null}function bm(f,c,E,T){switch(vl=null,E){case bf:case Bd:throw Error("Root did not complete. This is a bug in React.");case Tp:{Wp(f,T>ru?ru:T);break}case T1:{Wf(f,T);var A=f.lastSuspendedTime;T===A&&(f.nextKnownPendingLevel=kp(c)),d();var j=Bl===Un;if(j&&!(X0&&qf.current)){var V=xp+N0-vt();if(V>10){if(jd){var te=f.lastPingedTime;if(te===at||te>=T){f.lastPingedTime=T,zf(f,T);break}}var le=Vd(f);if(le!==at&&le!==T)break;if(A!==at&&A!==T){f.lastPingedTime=A;break}f.timeoutHandle=Tt(s0.bind(null,f),V);break}}s0(f);break}case C1:{Wf(f,T);var Be=f.lastSuspendedTime;if(T===Be&&(f.nextKnownPendingLevel=kp(c)),d(),!(X0&&qf.current)){if(jd){var Ke=f.lastPingedTime;if(Ke===at||Ke>=T){f.lastPingedTime=T,zf(f,T);break}}var pt=Vd(f);if(pt!==at&&pt!==T)break;if(Be!==at&&Be!==T){f.lastPingedTime=Be;break}var Nt;if(x1!==Un)Nt=Uo(x1)-vt();else if(Bl===Un)Nt=0;else{var Gt=_v(Bl),zt=vt(),yn=Uo(T)-zt,kr=zt-Gt;kr<0&&(kr=0),Nt=Bp(kr)-kr,yn10){f.timeoutHandle=Tt(s0.bind(null,f),Nt);break}}s0(f);break}case Cp:{if(!(X0&&qf.current)&&Bl!==Un&&xc!==null){var oi=Up(Bl,T,xc);if(oi>10){Wf(f,T),f.timeoutHandle=Tt(s0.bind(null,f),oi);break}}s0(f);break}default:throw Error("Unknown root exit status.")}}function M1(f){var c=f.lastExpiredTime,E=c!==at?c:Un;if(f.finishedExpirationTime===E)s0(f);else{if((nr&(So|As))!==gu)throw Error("Should not already be working.");if(tf(),(f!==vl||E!==q0)&&(zf(f,E),ee(f,E)),Gn!==null){var T=nr;nr|=So;var A=pv(f),j=Yd(f);mf(Gn);do try{Ev();break}catch(te){dv(f,te)}while(!0);if(mt(),nr=T,hv(A),bn&&Kd(j),k0===Bd){var V=Ud;throw jp(),zf(f,E),Wf(f,E),qo(f),V}if(Gn!==null)throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");Tv(),f.finishedWork=f.current.alternate,f.finishedExpirationTime=E,Bm(f,k0,E),qo(f)}}return null}function Bm(f,c,E){vl=null,(c===T1||c===C1)&&d(),s0(f)}function Um(f,c){Wp(f,c),qo(f),(nr&(So|As))===gu&&Bt()}function av(){if((nr&(S1|So|As))!==gu){(nr&So)!==gu&&Xt(!1,"unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering.");return}zm(),tf()}function jm(f){return Sn(Kn,f)}function fv(f,c,E,T){return Sn(Li,f.bind(null,c,E,T))}function zm(){if(ef!==null){var f=ef;ef=null,f.forEach(function(c,E){Wp(E,c),qo(E)}),Bt()}}function Hm(f,c){var E=nr;nr|=S1;try{return f(c)}finally{nr=E,nr===gu&&Bt()}}function qm(f,c){var E=nr;nr|=Ui;try{return f(c)}finally{nr=E,nr===gu&&Bt()}}function cv(f,c,E,T){var A=nr;nr|=Sp;try{return Sn(ni,f.bind(null,c,E,T))}finally{nr=A,nr===gu&&Bt()}}function Wm(f,c){var E=nr;nr&=~S1,nr|=bd;try{return f(c)}finally{nr=E,nr===gu&&Bt()}}function Ap(f,c){if((nr&(So|As))!==gu)throw Error("flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.");var E=nr;nr|=S1;try{return Sn(Li,f.bind(null,c))}finally{nr=E,Bt()}}function Vm(f){var c=nr;nr|=S1;try{Sn(Li,f)}finally{nr=c,nr===gu&&Bt()}}function zf(f,c){f.finishedWork=null,f.finishedExpirationTime=at;var E=f.timeoutHandle;if(E!==tl&&(f.timeoutHandle=tl,fo(E)),Gn!==null)for(var T=Gn.return;T!==null;)$h(T),T=T.return;vl=f,Gn=To(f.current,null,c),q0=c,k0=bf,Ud=null,Bl=Un,x1=Un,xc=null,Rc=at,jd=!1,bn&&(Uf=null),Rl.discardPendingWarnings(),Zs=null}function dv(f,c){do{try{if(mt(),_d(),it(),Gn===null||Gn.return===null)return k0=Bd,Ud=c,null;en&&Gn.mode&ii&&d1(Gn,!0),lv(f,Gn.return,Gn,c,q0),Gn=Dv(Gn)}catch(E){c=E;continue}return}while(!0)}function pv(f){var c=Mr.current;return Mr.current=a1,c===null?a1:c}function hv(f){Mr.current=f}function Yd(f){if(bn){var c=k.__interactionsRef.current;return k.__interactionsRef.current=f.memoizedInteractions,c}return null}function Kd(f){bn&&(k.__interactionsRef.current=f)}function Op(){xp=vt()}function vv(f,c){fru&&(Bl=f),c!==null&&fru&&(x1=f,xc=c)}function Xd(f){f>Rc&&(Rc=f)}function mv(){k0===bf&&(k0=T1)}function yv(){(k0===bf||k0===T1)&&(k0=C1),Rc!==at&&vl!==null&&(Wf(vl,q0),Gg(vl,Rc))}function Mp(){k0!==Cp&&(k0=Tp)}function gv(){return k0===bf}function _v(f){var c=Uo(f);return c-_f}function Gm(f,c){var E=Uo(f);return E-(c.timeoutMs|0||_f)}function Ev(){for(;Gn!==null;)Gn=Qd(Gn)}function Ym(){for(;Gn!==null&&!Fn();)Gn=Qd(Gn)}function Qd(f){var c=f.alternate;$l(f),Dt(f);var E;return en&&(f.mode&ii)!==Ar?(q2(f),E=k1(c,f,q0),d1(f,!0)):E=k1(c,f,q0),it(),f.memoizedProps=f.pendingProps,E===null&&(E=Dv(f)),wp.current=null,E}function Dv(f){Gn=f;do{var c=Gn.alternate,E=Gn.return;if((Gn.effectTag&P0)===xi){Dt(Gn);var T=void 0;if(!en||(Gn.mode&ii)===Ar?T=Zh(c,Gn,q0):(q2(Gn),T=Zh(c,Gn,q0),d1(Gn,!1)),ei(Gn),it(),Km(Gn),T!==null)return T;if(E!==null&&(E.effectTag&P0)===xi){E.firstEffect===null&&(E.firstEffect=Gn.firstEffect),Gn.lastEffect!==null&&(E.lastEffect!==null&&(E.lastEffect.nextEffect=Gn.firstEffect),E.lastEffect=Gn.lastEffect);var A=Gn.effectTag;A>lu&&(E.lastEffect!==null?E.lastEffect.nextEffect=Gn:E.firstEffect=Gn,E.lastEffect=Gn)}}else{var j=Sm(Gn,q0);if(en&&(Gn.mode&ii)!==Ar){d1(Gn,!1);for(var V=Gn.actualDuration,te=Gn.child;te!==null;)V+=te.actualDuration,te=te.sibling;Gn.actualDuration=V}if(j!==null)return po(Gn),j.effectTag&=Kl,j;ei(Gn),E!==null&&(E.firstEffect=E.lastEffect=null,E.effectTag|=P0)}var le=Gn.sibling;if(le!==null)return le;Gn=E}while(Gn!==null);return k0===bf&&(k0=Cp),null}function kp(f){var c=f.expirationTime,E=f.childExpirationTime;return c>E?c:E}function Km(f){if(!(q0!==Di&&f.childExpirationTime===Di)){var c=at;if(en&&(f.mode&ii)!==Ar){for(var E=f.actualDuration,T=f.selfBaseDuration,A=f.alternate===null||f.child!==f.alternate.child,j=f.child;j!==null;){var V=j.expirationTime,te=j.childExpirationTime;V>c&&(c=V),te>c&&(c=te),A&&(E+=j.actualDuration),T+=j.treeBaseDuration,j=j.sibling}f.actualDuration=E,f.treeBaseDuration=T}else for(var le=f.child;le!==null;){var Be=le.expirationTime,Ke=le.childExpirationTime;Be>c&&(c=Be),Ke>c&&(c=Ke),le=le.sibling}f.childExpirationTime=c}}function s0(f){var c=Qt();return Sn(Li,Np.bind(null,f,c)),null}function Np(f,c){do tf();while(Mc!==null);if(ny(),(nr&(So|As))!==gu)throw Error("Should not already be working.");var E=f.finishedWork,T=f.finishedExpirationTime;if(E===null)return null;if(f.finishedWork=null,f.finishedExpirationTime=at,E===f.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");f.callbackNode=null,f.callbackExpirationTime=at,f.callbackPriority=E0,f.nextKnownPendingLevel=at,$0();var A=kp(E);j4(f,T,A),f===vl&&(vl=null,Gn=null,q0=at);var j;if(E.effectTag>lu?E.lastEffect!==null?(E.lastEffect.nextEffect=E,j=E.firstEffect):j=E:j=E.firstEffect,j!==null){var V=nr;nr|=As;var te=Yd(f);wp.current=null,Ce(),Hn(f.containerInfo),dn=j;do if(dl(null,Xm,null),tr()){if(dn===null)throw Error("Should be working on an effect.");var le=Qs();Hf(dn,le),dn=dn.nextEffect}while(dn!==null);et(),en&&Oh(),Ye(),dn=j;do if(dl(null,Qm,null,f,c),tr()){if(dn===null)throw Error("Should be working on an effect.");var Be=Qs();Hf(dn,Be),dn=dn.nextEffect}while(dn!==null);Yt(),qr(f.containerInfo),f.current=E,Kt(),dn=j;do if(dl(null,Lp,null,f,T),tr()){if(dn===null)throw Error("Should be working on an effect.");var Ke=Qs();Hf(dn,Ke),dn=dn.nextEffect}while(dn!==null);pr(),dn=null,ae(),bn&&Kd(te),nr=V}else f.current=E,Ce(),et(),en&&Oh(),Ye(),Yt(),Kt(),pr();eo();var pt=Oc;if(Oc)Oc=!1,Mc=f,Rp=T,R1=c;else for(dn=j;dn!==null;){var Nt=dn.nextEffect;dn.nextEffect=null,dn=Nt}var Gt=f.firstPendingTime;if(Gt!==at){if(bn){if(Uf!==null){var zt=Uf;Uf=null;for(var yn=0;ynKn?Kn:R1;return R1=E0,Sn(f,Fp)}}function Fp(){if(Mc===null)return!1;var f=Mc,c=Rp;if(Mc=null,Rp=at,(nr&(So|As))!==gu)throw Error("Cannot flush passive effects while already rendering.");var E=nr;nr|=As;for(var T=Yd(f),A=f.current.firstEffect;A!==null;){{if(Dt(A),dl(null,xa,null,A),tr()){if(A===null)throw Error("Should be working on an effect.");var j=Qs();Hf(A,j)}it()}var V=A.nextEffect;A.nextEffect=null,A=V}return bn&&(Kd(T),de(f,c)),nr=E,Bt(),A1=Mc===null?0:A1+1,!0}function Pp(f){return Ac!==null&&Ac.has(f)}function Ip(f){Ac===null?Ac=new Set([f]):Ac.add(f)}function Jm(f){zd||(zd=!0,Hd=f)}var Zm=Jm;function wv(f,c,E){var T=pp(E,c),A=uv(f,T,Un);Va(f,A);var j=Wd(f,Un);j!==null&&(qo(j),q(j,Un))}function Hf(f,c){if(f.tag===U){wv(f,f,c);return}for(var E=f.return;E!==null;){if(E.tag===U){wv(E,f,c);return}else if(E.tag===O){var T=E.type,A=E.stateNode;if(typeof T.getDerivedStateFromError=="function"||typeof A.componentDidCatch=="function"&&!Pp(A)){var j=pp(c,f),V=ov(E,j,Un);Va(E,V);var te=Wd(E,Un);te!==null&&(qo(te),q(te,Un));return}}E=E.return}}function bp(f,c,E){var T=f.pingCache;if(T!==null&&T.delete(c),vl===f&&q0===E){k0===C1||k0===T1&&Bl===Un&&vt()-xpPm)throw kc=0,qd=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");A1>sv&&(A1=0,Xt(!1,"Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}function ny(){Rl.flushLegacyContextWarning(),yi&&Rl.flushPendingUnsafeLifecycleWarnings()}function Tv(){var f=!0;yf(Bf,f),Bf=null}function jp(){var f=!1;yf(Bf,f),Bf=null}function zp(f,c){Hr&&vl!==null&&c>q0&&(Bf=f)}var Jd=null;function ry(f){{var c=f.tag;if(c!==U&&c!==O&&c!==L&&c!==se&&c!==me&&c!==ie)return;var E=qt(f.type)||"ReactComponent";if(Jd!==null){if(Jd.has(E))return;Jd.add(E)}else Jd=new Set([E]);We(!1,"Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in %s.%s",c===O?"the componentWillUnmount method":"a useEffect cleanup function",Cr(f))}}var k1;if(K0){var iy=null;k1=function(f,c,E){var T=Wg(iy,c);try{return sp(f,c,E)}catch(j){if(j!==null&&typeof j=="object"&&typeof j.then=="function")throw j;if(mt(),_d(),$h(c),Wg(c,T),en&&c.mode&ii&&q2(c),dl(null,sp,null,f,c,E),tr()){var A=Qs();throw A}else throw j}}}else k1=sp;var Cv=!1,xv=!1;function uy(f){if(f.tag===O)switch(Nr){case"getChildContext":if(xv)return;We(!1,"setState(...): Cannot call setState() inside getChildContext()"),xv=!0;break;case"render":if(Cv)return;We(!1,"Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),Cv=!0;break}}var qf={current:!1};function Hp(f){vs===!0&&hl.current===!0&&qf.current!==!0&&We(!1,`It looks like you're using the wrong act() around your test interactions. -Be sure to use the matching version of act() corresponding to your renderer: - -// for react-dom: -import {act} from 'react-dom/test-utils'; -// ... -act(() => ...); - -// for react-test-renderer: -import TestRenderer from 'react-test-renderer'; -const {act} = TestRenderer; -// ... -act(() => ...);%s`,Cr(f))}function Rv(f){vs===!0&&(f.mode&mr)!==Ar&&hl.current===!1&&qf.current===!1&&We(!1,`An update to %s ran an effect, but was not wrapped in act(...). - -When testing, code that causes React state updates should be wrapped into act(...): - -act(() => { - /* fire events that update state */ -}); -/* assert on the output */ - -This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act%s`,qt(f.type),Cr(f))}function oy(f){vs===!0&&nr===gu&&hl.current===!1&&qf.current===!1&&We(!1,`An update to %s inside a test was not wrapped in act(...). - -When testing, code that causes React state updates should be wrapped into act(...): - -act(() => { - /* fire events that update state */ -}); -/* assert on the output */ - -This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act%s`,qt(f.type),Cr(f))}var ly=oy,qp=!1;function sy(f){qp===!1&&t.unstable_flushAllWithoutAsserting===void 0&&(f.mode&Y||f.mode&ri?(qp=!0,We(!1,`In Concurrent or Sync modes, the "scheduler" module needs to be mocked to guarantee consistent behaviour across tests and browsers. For example, with jest: -jest.mock('scheduler', () => require('scheduler/unstable_mock')); - -For more info, visit https://fb.me/react-mock-scheduler`)):eu===!0&&(qp=!0,We(!1,`Starting from React v17, the "scheduler" module will need to be mocked to guarantee consistent behaviour across tests and browsers. For example, with jest: -jest.mock('scheduler', () => require('scheduler/unstable_mock')); - -For more info, visit https://fb.me/react-mock-scheduler`)))}var Zs=null;function ay(f){{var c=Qt();if((f.mode&ri)!==xi&&(c===ni||c===Li))for(var E=f;E!==null;){var T=E.alternate;if(T!==null)switch(E.tag){case O:var A=T.updateQueue;if(A!==null)for(var j=A.firstUpdate;j!==null;){var V=j.priority;if(V===ni||V===Li){Zs===null?Zs=new Set([qt(E.type)]):Zs.add(qt(E.type));break}j=j.next}break;case L:case se:case ie:if(E.memoizedState!==null&&E.memoizedState.baseUpdate!==null)for(var te=E.memoizedState.baseUpdate;te!==null;){var le=te.priority;if(le===ni||le===Li){Zs===null?Zs=new Set([qt(E.type)]):Zs.add(qt(E.type));break}if(te.next===E.memoizedState.baseUpdate)break;te=te.next}break;default:break}E=E.return}}}function d(){if(Zs!==null){var f=[];Zs.forEach(function(c){return f.push(c)}),Zs=null,f.length>0&&We(!1,`%s triggered a user-blocking update that suspended. - -The fix is to split the update into multiple parts: a user-blocking update to provide immediate feedback, and another update that triggers the bulk of the changes. - -Refer to the documentation for useTransition to learn how to implement this pattern.`,f.sort().join(", "))}}function v(f,c){return c*1e3+f.interactionThreadID}function x(f){!bn||(Uf===null?Uf=[f]:Uf.push(f))}function P(f,c,E){if(!!bn&&E.size>0){var T=f.pendingInteractionMap,A=T.get(c);A!=null?E.forEach(function(te){A.has(te)||te.__count++,A.add(te)}):(T.set(c,new Set(E)),E.forEach(function(te){te.__count++}));var j=k.__subscriberRef.current;if(j!==null){var V=v(f,c);j.onWorkScheduled(E,V)}}}function q(f,c){!bn||P(f,c,k.__interactionsRef.current)}function ee(f,c){if(!!bn){var E=new Set;if(f.pendingInteractionMap.forEach(function(j,V){V>=c&&j.forEach(function(te){return E.add(te)})}),f.memoizedInteractions=E,E.size>0){var T=k.__subscriberRef.current;if(T!==null){var A=v(f,c);try{T.onWorkStarted(E,A)}catch(j){_n(Li,function(){throw j})}}}}}function de(f,c){if(!!bn){var E=f.firstPendingTime,T;try{if(T=k.__subscriberRef.current,T!==null&&f.memoizedInteractions.size>0){var A=v(f,c);T.onWorkStopped(f.memoizedInteractions,A)}}catch(V){_n(Li,function(){throw V})}finally{var j=f.pendingInteractionMap;j.forEach(function(V,te){te>E&&(j.delete(te),V.forEach(function(le){if(le.__count--,T!==null&&le.__count===0)try{T.onInteractionScheduledWorkCompleted(le)}catch(Be){_n(Li,function(){throw Be})}}))})}}}var _e=null,Ie=null,Et=!1,St=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined";function At(f){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined")return!1;var c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(c.isDisabled)return!0;if(!c.supportsFiber)return We(!1,"The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://fb.me/react-devtools"),!0;try{var E=c.inject(f);_e=function(T,A){try{var j=(T.current.effectTag&Xr)===Xr;if(en){var V=Nc(),te=nd(V,A);c.onCommitFiberRoot(E,T,te,j)}else c.onCommitFiberRoot(E,T,void 0,j)}catch(le){Et||(Et=!0,We(!1,"React DevTools encountered an error: %s",le))}},Ie=function(T){try{c.onCommitFiberUnmount(E,T)}catch(A){Et||(Et=!0,We(!1,"React DevTools encountered an error: %s",A))}}}catch(T){We(!1,"React DevTools encountered an error: %s.",T)}return!0}function on(f,c){typeof _e=="function"&&_e(f,c)}function kn(f){typeof Ie=="function"&&Ie(f)}var rr;{rr=!1;try{var br=Object.preventExtensions({}),ar=new Map([[br,null]]),ui=new Set([br]);ar.set(0,0),ui.add(0)}catch(f){rr=!0}}var di=1;function jl(f,c,E,T){this.tag=f,this.key=E,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=c,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=T,this.effectTag=xi,this.nextEffect=null,this.firstEffect=null,this.lastEffect=null,this.expirationTime=at,this.childExpirationTime=at,this.alternate=null,en&&(this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0),Hr&&(this._debugID=di++,this._debugIsCurrentlyTiming=!1),this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!rr&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var Zi=function(f,c,E,T){return new jl(f,c,E,T)};function lo(f){var c=f.prototype;return!!(c&&c.isReactComponent)}function a0(f){return typeof f=="function"&&!lo(f)&&f.defaultProps===void 0}function Os(f){if(typeof f=="function")return lo(f)?O:L;if(f!=null){var c=f.$$typeof;if(c===Mn)return se;if(c===Vt)return me}return C}function To(f,c,E){var T=f.alternate;T===null?(T=Zi(f.tag,c,f.key,f.mode),T.elementType=f.elementType,T.type=f.type,T.stateNode=f.stateNode,T._debugID=f._debugID,T._debugSource=f._debugSource,T._debugOwner=f._debugOwner,T._debugHookTypes=f._debugHookTypes,T.alternate=f,f.alternate=T):(T.pendingProps=c,T.effectTag=xi,T.nextEffect=null,T.firstEffect=null,T.lastEffect=null,en&&(T.actualDuration=0,T.actualStartTime=-1)),T.childExpirationTime=f.childExpirationTime,T.expirationTime=f.expirationTime,T.child=f.child,T.memoizedProps=f.memoizedProps,T.memoizedState=f.memoizedState,T.updateQueue=f.updateQueue;var A=f.dependencies;switch(T.dependencies=A===null?null:{expirationTime:A.expirationTime,firstContext:A.firstContext,responders:A.responders},T.sibling=f.sibling,T.index=f.index,T.ref=f.ref,en&&(T.selfBaseDuration=f.selfBaseDuration,T.treeBaseDuration=f.treeBaseDuration),T._debugNeedsRemount=f._debugNeedsRemount,T.tag){case C:case L:case ie:T.type=r0(f.type);break;case O:T.type=j0(f.type);break;case se:T.type=Df(f.type);break;default:break}return T}function Av(f,c){f.effectTag&=mi,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null;var E=f.alternate;if(E===null)f.childExpirationTime=at,f.expirationTime=c,f.child=null,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,en&&(f.selfBaseDuration=0,f.treeBaseDuration=0);else{f.childExpirationTime=E.childExpirationTime,f.expirationTime=E.expirationTime,f.child=E.child,f.memoizedProps=E.memoizedProps,f.memoizedState=E.memoizedState,f.updateQueue=E.updateQueue;var T=E.dependencies;f.dependencies=T===null?null:{expirationTime:T.expirationTime,firstContext:T.firstContext,responders:T.responders},en&&(f.selfBaseDuration=E.selfBaseDuration,f.treeBaseDuration=E.treeBaseDuration)}return f}function k4(f){var c;return f===O0?c=ri|Y|mr:f===B0?c=Y|mr:c=Ar,en&&St&&(c|=ii),Zi(U,null,null,c)}function fy(f,c,E,T,A,j){var V,te=C,le=f;if(typeof f=="function")lo(f)?(te=O,le=j0(le)):le=r0(le);else if(typeof f=="string")te=W;else{e:switch(f){case oe:return nf(E.children,A,j,c);case an:te=he,A|=ri|Y|mr;break;case ze:te=he,A|=mr;break;case ct:return L4(E,A,j,c);case lr:return F4(E,A,j,c);case ln:return P4(E,A,j,c);default:{if(typeof f=="object"&&f!==null)switch(f.$$typeof){case Rt:te=ve;break e;case nn:te=Ee;break e;case Mn:te=se,le=Df(le);break e;case Vt:te=me;break e;case Er:te=Oe,le=null;break e;case w:if(Wt)return qg(f,E,A,j,c);break;case Xn:if(Au)return N4(f,E,A,j,c)}var Be="";{(f===void 0||typeof f=="object"&&f!==null&&Object.keys(f).length===0)&&(Be+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ke=T?qt(T.type):null;Ke&&(Be+=` - -Check the render method of \``+Ke+"`.")}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(f==null?f:typeof f)+"."+Be)}}}return V=Zi(te,E,c,A),V.elementType=f,V.type=le,V.expirationTime=j,V}function cy(f,c,E){var T=null;T=f._owner;var A=f.type,j=f.key,V=f.props,te=fy(A,j,V,T,c,E);return te._debugSource=f._source,te._debugOwner=f._owner,te}function nf(f,c,E,T){var A=Zi(m,f,T,c);return A.expirationTime=E,A}function qg(f,c,E,T,A){var j=Zi(gt,c,A,E);return j.elementType=f,j.type=f,j.expirationTime=T,j}function N4(f,c,E,T,A){var j=Zi(Xe,c,A,E);return j.type=f,j.elementType=f,j.expirationTime=T,j}function L4(f,c,E,T){(typeof f.id!="string"||typeof f.onRender!="function")&&We(!1,'Profiler must specify an "id" string and "onRender" function as props');var A=Zi(De,f,T,c|ii);return A.elementType=ct,A.type=ct,A.expirationTime=E,A}function F4(f,c,E,T){var A=Zi(pe,f,T,c);return A.type=lr,A.elementType=lr,A.expirationTime=E,A}function P4(f,c,E,T){var A=Zi(yt,f,T,c);return A.type=ln,A.elementType=ln,A.expirationTime=E,A}function dy(f,c,E){var T=Zi(ne,f,null,c);return T.expirationTime=E,T}function I4(){var f=Zi(W,null,null,Ar);return f.elementType="DELETED",f.type="DELETED",f}function b4(f){var c=Zi(qe,null,null,Ar);return c.stateNode=f,c}function py(f,c,E){var T=f.children!==null?f.children:[],A=Zi(H,T,f.key,c);return A.expirationTime=E,A.stateNode={containerInfo:f.containerInfo,pendingChildren:null,implementation:f.implementation},A}function Wg(f,c){return f===null&&(f=Zi(C,null,null,Ar)),f.tag=c.tag,f.key=c.key,f.elementType=c.elementType,f.type=c.type,f.stateNode=c.stateNode,f.return=c.return,f.child=c.child,f.sibling=c.sibling,f.index=c.index,f.ref=c.ref,f.pendingProps=c.pendingProps,f.memoizedProps=c.memoizedProps,f.updateQueue=c.updateQueue,f.memoizedState=c.memoizedState,f.dependencies=c.dependencies,f.mode=c.mode,f.effectTag=c.effectTag,f.nextEffect=c.nextEffect,f.firstEffect=c.firstEffect,f.lastEffect=c.lastEffect,f.expirationTime=c.expirationTime,f.childExpirationTime=c.childExpirationTime,f.alternate=c.alternate,en&&(f.actualDuration=c.actualDuration,f.actualStartTime=c.actualStartTime,f.selfBaseDuration=c.selfBaseDuration,f.treeBaseDuration=c.treeBaseDuration),f._debugID=c._debugID,f._debugSource=c._debugSource,f._debugOwner=c._debugOwner,f._debugIsCurrentlyTiming=c._debugIsCurrentlyTiming,f._debugNeedsRemount=c._debugNeedsRemount,f._debugHookTypes=c._debugHookTypes,f}function B4(f,c,E){this.tag=c,this.current=null,this.containerInfo=f,this.pendingChildren=null,this.pingCache=null,this.finishedExpirationTime=at,this.finishedWork=null,this.timeoutHandle=tl,this.context=null,this.pendingContext=null,this.hydrate=E,this.callbackNode=null,this.callbackPriority=E0,this.firstPendingTime=at,this.firstSuspendedTime=at,this.lastSuspendedTime=at,this.nextKnownPendingLevel=at,this.lastPingedTime=at,this.lastExpiredTime=at,bn&&(this.interactionThreadID=k.unstable_getThreadID(),this.memoizedInteractions=new Set,this.pendingInteractionMap=new Map),Yi&&(this.hydrationCallbacks=null)}function U4(f,c,E,T){var A=new B4(f,c,E);Yi&&(A.hydrationCallbacks=T);var j=k4(c);return A.current=j,j.stateNode=A,A}function Vg(f,c){var E=f.firstSuspendedTime,T=f.lastSuspendedTime;return E!==at&&E>=c&&T<=c}function Wf(f,c){var E=f.firstSuspendedTime,T=f.lastSuspendedTime;Ec||E===at)&&(f.lastSuspendedTime=c),c<=f.lastPingedTime&&(f.lastPingedTime=at),c<=f.lastExpiredTime&&(f.lastExpiredTime=at)}function Gg(f,c){var E=f.firstPendingTime;c>E&&(f.firstPendingTime=c);var T=f.firstSuspendedTime;T!==at&&(c>=T?f.firstSuspendedTime=f.lastSuspendedTime=f.nextKnownPendingLevel=at:c>=f.lastSuspendedTime&&(f.lastSuspendedTime=c+1),c>f.nextKnownPendingLevel&&(f.nextKnownPendingLevel=c))}function j4(f,c,E){f.firstPendingTime=E,c<=f.lastSuspendedTime?f.firstSuspendedTime=f.lastSuspendedTime=f.nextKnownPendingLevel=at:c<=f.firstSuspendedTime&&(f.firstSuspendedTime=c-1),c<=f.lastPingedTime&&(f.lastPingedTime=at),c<=f.lastExpiredTime&&(f.lastExpiredTime=at)}function Wp(f,c){var E=f.lastExpiredTime;(E===at||E>c)&&(f.lastExpiredTime=c)}var z4={debugTool:null},Ov=z4,hy,vy;hy=!1,vy={};function H4(f){if(!f)return Rn;var c=Ft(f),E=Cl(c);if(c.tag===O){var T=c.type;if(Xi(T))return A0(c,T,E)}return E}function my(f){var c=Ft(f);if(c===void 0)throw typeof f.render=="function"?Error("Unable to find node on an unmounted component."):Error("Argument appears to not be a ReactComponent. Keys: "+Object.keys(f));var E=I0(c);return E===null?null:E.stateNode}function q4(f,c){{var E=Ft(f);if(E===void 0)throw typeof f.render=="function"?Error("Unable to find node on an unmounted component."):Error("Argument appears to not be a ReactComponent. Keys: "+Object.keys(f));var T=I0(E);if(T===null)return null;if(T.mode&mr){var A=qt(E.type)||"Component";vy[A]||(vy[A]=!0,E.mode&mr?We(!1,"%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node%s",c,c,A,Cr(T)):We(!1,"%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node%s",c,c,A,Cr(T)))}return T.stateNode}return my(f)}function W4(f,c,E,T){return U4(f,c,E,T)}function Yg(f,c,E,T){var A=c.current,j=Ul();typeof jest!="undefined"&&(sy(A),Hp(A));var V=go(),te=jf(j,A,V);Ov.debugTool&&(A.alternate===null?Ov.debugTool.onMountContainer(c):f===null?Ov.debugTool.onUnmountContainer(c):Ov.debugTool.onUpdateContainer(c));var le=H4(E);c.context===null?c.context=le:c.pendingContext=le,Nr==="render"&&An!==null&&!hy&&(hy=!0,We(!1,`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate. - -Check the render method of %s.`,qt(An.type)||"Unknown"));var Be=Cu(te,V);return Be.payload={element:f},T=T===void 0?null:T,T!==null&&(typeof T!="function"&&We(!1,"render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",T),Be.callback=T),Va(A,Be),ml(A,te),te}function V4(f){var c=f.current;if(!c.child)return null;switch(c.child.tag){case W:return No(c.child.stateNode);default:return c.child.stateNode}}function G4(f){switch(f.tag){case U:var c=f.stateNode;c.hydrate&&Um(c,c.firstPendingTime);break;case pe:Ap(function(){return ml(f,Un)});var E=Ua(Ul());Mv(f,E);break}}function Kg(f,c){var E=f.memoizedState;E!==null&&E.dehydrated!==null&&E.retryTime=c.length)return T;var A=c[E],j=Array.isArray(f)?f.slice():a({},f);return j[A]=_y(f[A],c,E+1,T),j},e_=function(f,c,E){return _y(f,c,0,E)};Qg=function(f,c,E,T){for(var A=f.memoizedState;A!==null&&c>0;)A=A.next,c--;if(A!==null){var j=e_(A.memoizedState,E,T);A.memoizedState=j,A.baseState=j,f.memoizedProps=a({},f.memoizedProps),ml(f,Un)}},Jg=function(f,c,E){f.pendingProps=e_(f.memoizedProps,c,E),f.alternate&&(f.alternate.pendingProps=f.pendingProps),ml(f,Un)},Zg=function(f){ml(f,Un)},$g=function(f){gy=f}}function Q4(f){var c=f.findFiberByHostInstance,E=rt.ReactCurrentDispatcher;return At(a({},f,{overrideHookState:Qg,overrideProps:Jg,setSuspenseHandler:$g,scheduleUpdate:Zg,currentDispatcherRef:E,findHostInstanceByFiber:function(T){var A=I0(T);return A===null?null:A.stateNode},findFiberByHostInstance:function(T){return c?c(T):null},findHostInstancesForRefresh:ud,scheduleRefresh:Al,scheduleRoot:Ts,setRefreshHandler:qa,getCurrentFiber:function(){return An}}))}var t_=Object.freeze({createContainer:W4,updateContainer:Yg,batchedEventUpdates:qm,batchedUpdates:Hm,unbatchedUpdates:Wm,deferredUpdates:jm,syncUpdates:fv,discreteUpdates:cv,flushDiscreteUpdates:av,flushControlled:Vm,flushSync:Ap,flushPassiveEffects:tf,IsThisRendererActing:qf,getPublicRootInstance:V4,attemptSynchronousHydration:G4,attemptUserBlockingHydration:Y4,attemptContinuousHydration:yy,attemptHydrationAtCurrentPriority:K4,findHostInstance:my,findHostInstanceWithWarning:q4,findHostInstanceWithNoPortals:X4,shouldSuspend:Xg,injectIntoDevTools:Q4}),J4=t_.default||t_;qy.exports=J4;var Z4=qy.exports;return qy.exports=i,Z4})});var IS=tt((RH,vD)=>{"use strict";process.env.NODE_ENV==="production"?vD.exports=MS():vD.exports=PS()});var BS=tt((AH,bS)=>{"use strict";var AP={ALIGN_COUNT:8,ALIGN_AUTO:0,ALIGN_FLEX_START:1,ALIGN_CENTER:2,ALIGN_FLEX_END:3,ALIGN_STRETCH:4,ALIGN_BASELINE:5,ALIGN_SPACE_BETWEEN:6,ALIGN_SPACE_AROUND:7,DIMENSION_COUNT:2,DIMENSION_WIDTH:0,DIMENSION_HEIGHT:1,DIRECTION_COUNT:3,DIRECTION_INHERIT:0,DIRECTION_LTR:1,DIRECTION_RTL:2,DISPLAY_COUNT:2,DISPLAY_FLEX:0,DISPLAY_NONE:1,EDGE_COUNT:9,EDGE_LEFT:0,EDGE_TOP:1,EDGE_RIGHT:2,EDGE_BOTTOM:3,EDGE_START:4,EDGE_END:5,EDGE_HORIZONTAL:6,EDGE_VERTICAL:7,EDGE_ALL:8,EXPERIMENTAL_FEATURE_COUNT:1,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:0,FLEX_DIRECTION_COUNT:4,FLEX_DIRECTION_COLUMN:0,FLEX_DIRECTION_COLUMN_REVERSE:1,FLEX_DIRECTION_ROW:2,FLEX_DIRECTION_ROW_REVERSE:3,JUSTIFY_COUNT:6,JUSTIFY_FLEX_START:0,JUSTIFY_CENTER:1,JUSTIFY_FLEX_END:2,JUSTIFY_SPACE_BETWEEN:3,JUSTIFY_SPACE_AROUND:4,JUSTIFY_SPACE_EVENLY:5,LOG_LEVEL_COUNT:6,LOG_LEVEL_ERROR:0,LOG_LEVEL_WARN:1,LOG_LEVEL_INFO:2,LOG_LEVEL_DEBUG:3,LOG_LEVEL_VERBOSE:4,LOG_LEVEL_FATAL:5,MEASURE_MODE_COUNT:3,MEASURE_MODE_UNDEFINED:0,MEASURE_MODE_EXACTLY:1,MEASURE_MODE_AT_MOST:2,NODE_TYPE_COUNT:2,NODE_TYPE_DEFAULT:0,NODE_TYPE_TEXT:1,OVERFLOW_COUNT:3,OVERFLOW_VISIBLE:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2,POSITION_TYPE_COUNT:2,POSITION_TYPE_RELATIVE:0,POSITION_TYPE_ABSOLUTE:1,PRINT_OPTIONS_COUNT:3,PRINT_OPTIONS_LAYOUT:1,PRINT_OPTIONS_STYLE:2,PRINT_OPTIONS_CHILDREN:4,UNIT_COUNT:4,UNIT_UNDEFINED:0,UNIT_POINT:1,UNIT_PERCENT:2,UNIT_AUTO:3,WRAP_COUNT:3,WRAP_NO_WRAP:0,WRAP_WRAP:1,WRAP_WRAP_REVERSE:2};bS.exports=AP});var HS=tt((OH,US)=>{"use strict";var OP=Object.assign||function(i){for(var o=1;o"}}]),i}(),jS=function(){B_(i,null,[{key:"fromJS",value:function(a){var p=a.width,_=a.height;return new i(p,_)}}]);function i(o,a){yD(this,i),this.width=o,this.height=a}return B_(i,[{key:"fromJS",value:function(a){a(this.width,this.height)}},{key:"toString",value:function(){return""}}]),i}(),zS=function(){function i(o,a){yD(this,i),this.unit=o,this.value=a}return B_(i,[{key:"fromJS",value:function(a){a(this.unit,this.value)}},{key:"toString",value:function(){switch(this.unit){case tc.UNIT_POINT:return String(this.value);case tc.UNIT_PERCENT:return this.value+"%";case tc.UNIT_AUTO:return"auto";default:return this.value+"?"}}},{key:"valueOf",value:function(){return this.value}}]),i}();US.exports=function(i,o){function a(k,L,O){var C=k[L];k[L]=function(){for(var U=arguments.length,H=Array(U),W=0;W1?H-1:0),ne=1;ne1&&arguments[1]!==void 0?arguments[1]:NaN,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:tc.DIRECTION_LTR;return k.call(this,L,O,C)}),OP({Config:o.Config,Node:o.Node,Layout:i("Layout",MP),Size:i("Size",jS),Value:i("Value",zS),getInstanceCount:function(){return o.getInstanceCount.apply(o,arguments)}},tc)}});var qS=tt((exports,module)=>{(function(i,o){typeof define=="function"&&define.amd?define([],function(){return o}):typeof module=="object"&&module.exports?module.exports=o:(i.nbind=i.nbind||{}).init=o})(exports,function(Module,cb){typeof Module=="function"&&(cb=Module,Module={}),Module.onRuntimeInitialized=function(i,o){return function(){i&&i.apply(this,arguments);try{Module.ccall("nbind_init")}catch(a){o(a);return}o(null,{bind:Module._nbind_value,reflect:Module.NBind.reflect,queryType:Module.NBind.queryType,toggleLightGC:Module.toggleLightGC,lib:Module})}}(Module.onRuntimeInitialized,cb);var Module;Module||(Module=(typeof Module!="undefined"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(Module.ENVIRONMENT)if(Module.ENVIRONMENT==="WEB")ENVIRONMENT_IS_WEB=!0;else if(Module.ENVIRONMENT==="WORKER")ENVIRONMENT_IS_WORKER=!0;else if(Module.ENVIRONMENT==="NODE")ENVIRONMENT_IS_NODE=!0;else if(Module.ENVIRONMENT==="SHELL")ENVIRONMENT_IS_SHELL=!0;else throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");else ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof require=="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn);var nodeFS,nodePath;Module.read=function(o,a){nodeFS||(nodeFS={}("")),nodePath||(nodePath={}("")),o=nodePath.normalize(o);var p=nodeFS.readFileSync(o);return a?p:p.toString()},Module.readBinary=function(o){var a=Module.read(o,!0);return a.buffer||(a=new Uint8Array(a)),assert(a.buffer),a},Module.load=function(o){globalEval(read(o))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),typeof module!="undefined"&&(module.exports=Module),Module.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr!="undefined"&&(Module.printErr=printErr),typeof read!="undefined"?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(o){if(typeof readbuffer=="function")return new Uint8Array(readbuffer(o));var a=read(o,"binary");return assert(typeof a=="object"),a},typeof scriptArgs!="undefined"?Module.arguments=scriptArgs:typeof arguments!="undefined"&&(Module.arguments=arguments),typeof quit=="function"&&(Module.quit=function(i,o){quit(i)});else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(Module.read=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.send(null),a.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(o){var a=new XMLHttpRequest;return a.open("GET",o,!1),a.responseType="arraybuffer",a.send(null),new Uint8Array(a.response)}),Module.readAsync=function(o,a,p){var _=new XMLHttpRequest;_.open("GET",o,!0),_.responseType="arraybuffer",_.onload=function(){_.status==200||_.status==0&&_.response?a(_.response):p()},_.onerror=p,_.send(null)},typeof arguments!="undefined"&&(Module.arguments=arguments),typeof console!="undefined")Module.print||(Module.print=function(o){console.log(o)}),Module.printErr||(Module.printErr=function(o){console.warn(o)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump!="undefined"?function(i){dump(i)}:function(i){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle=="undefined"&&(Module.setWindowTitle=function(i){document.title=i})}else throw"Unknown runtime environment. Where are we?";function globalEval(i){eval.call(null,i)}!Module.load&&Module.read&&(Module.load=function(o){globalEval(Module.read(o))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.quit||(Module.quit=function(i,o){throw o}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[];for(var key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(i){return tempRet0=i,i},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(i){STACKTOP=i},getNativeTypeSize:function(i){switch(i){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(i[i.length-1]==="*")return Runtime.QUANTUM_SIZE;if(i[0]==="i"){var o=parseInt(i.substr(1));return assert(o%8==0),o/8}else return 0}}},getNativeFieldSize:function(i){return Math.max(Runtime.getNativeTypeSize(i),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(i,o){return o==="double"||o==="i64"?i&7&&(assert((i&7)==4),i+=4):assert((i&3)==0),i},getAlignSize:function(i,o,a){return!a&&(i=="i64"||i=="double")?8:i?Math.min(o||(i?Runtime.getNativeFieldSize(i):0),Runtime.QUANTUM_SIZE):Math.min(o,8)},dynCall:function(i,o,a){return a&&a.length?Module["dynCall_"+i].apply(null,[o].concat(a)):Module["dynCall_"+i].call(null,o)},functionPointers:[],addFunction:function(i){for(var o=0;o>2],a=(o+i+15|0)&-16;if(HEAP32[DYNAMICTOP_PTR>>2]=a,a>=TOTAL_MEMORY){var p=enlargeMemory();if(!p)return HEAP32[DYNAMICTOP_PTR>>2]=o,0}return o},alignMemory:function(i,o){var a=i=Math.ceil(i/(o||16))*(o||16);return a},makeBigInt:function(i,o,a){var p=a?+(i>>>0)+ +(o>>>0)*4294967296:+(i>>>0)+ +(o|0)*4294967296;return p},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=0,EXITSTATUS=0;function assert(i,o){i||abort("Assertion failed: "+o)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(i){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}var cwrap,ccall;(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(i){var o=Runtime.stackAlloc(i.length);return writeArrayToMemory(i,o),o},stringToC:function(i){var o=0;if(i!=null&&i!==0){var a=(i.length<<2)+1;o=Runtime.stackAlloc(a),stringToUTF8(i,o,a)}return o}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(o,a,p,_,t){var k=getCFunc(o),L=[],O=0;if(_)for(var C=0;C<_.length;C++){var U=toC[p[C]];U?(O===0&&(O=Runtime.stackSave()),L[C]=U(_[C])):L[C]=_[C]}var H=k.apply(null,L);if(a==="string"&&(H=Pointer_stringify(H)),O!==0){if(t&&t.async){EmterpreterAsync.asyncFinalizers.push(function(){Runtime.stackRestore(O)});return}Runtime.stackRestore(O)}return H};var sourceRegex=/^function\s*[a-zA-Z$_0-9]*\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/;function parseJSFunc(i){var o=i.toString().match(sourceRegex).slice(1);return{arguments:o[0],body:o[1],returnValue:o[2]}}var JSsource=null;function ensureJSsource(){if(!JSsource){JSsource={};for(var i in JSfuncs)JSfuncs.hasOwnProperty(i)&&(JSsource[i]=parseJSFunc(JSfuncs[i]))}}cwrap=function(ident,returnType,argTypes){argTypes=argTypes||[];var cfunc=getCFunc(ident),numericArgs=argTypes.every(function(i){return i==="number"}),numericRet=returnType!=="string";if(numericRet&&numericArgs)return cfunc;var argNames=argTypes.map(function(i,o){return"$"+o}),funcstr="(function("+argNames.join(",")+") {",nargs=argTypes.length;if(!numericArgs){ensureJSsource(),funcstr+="var stack = "+JSsource.stackSave.body+";";for(var i=0;i>0]=o;break;case"i8":HEAP8[i>>0]=o;break;case"i16":HEAP16[i>>1]=o;break;case"i32":HEAP32[i>>2]=o;break;case"i64":tempI64=[o>>>0,(tempDouble=o,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[i>>2]=tempI64[0],HEAP32[i+4>>2]=tempI64[1];break;case"float":HEAPF32[i>>2]=o;break;case"double":HEAPF64[i>>3]=o;break;default:abort("invalid type for setValue: "+a)}}Module.setValue=setValue;function getValue(i,o,a){switch(o=o||"i8",o.charAt(o.length-1)==="*"&&(o="i32"),o){case"i1":return HEAP8[i>>0];case"i8":return HEAP8[i>>0];case"i16":return HEAP16[i>>1];case"i32":return HEAP32[i>>2];case"i64":return HEAP32[i>>2];case"float":return HEAPF32[i>>2];case"double":return HEAPF64[i>>3];default:abort("invalid type for setValue: "+o)}return null}Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE;function allocate(i,o,a,p){var _,t;typeof i=="number"?(_=!0,t=i):(_=!1,t=i.length);var k=typeof o=="string"?o:null,L;if(a==ALLOC_NONE?L=p:L=[typeof _malloc=="function"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][a===void 0?ALLOC_STATIC:a](Math.max(t,k?1:o.length)),_){var p=L,O;for(assert((L&3)==0),O=L+(t&~3);p>2]=0;for(O=L+t;p>0]=0;return L}if(k==="i8")return i.subarray||i.slice?HEAPU8.set(i,L):HEAPU8.set(new Uint8Array(i),L),L;for(var C=0,U,H,W;C>0],a|=p,!(p==0&&!o||(_++,o&&_==o)););o||(o=_);var t="";if(a<128){for(var k=1024,L;o>0;)L=String.fromCharCode.apply(String,HEAPU8.subarray(i,i+Math.min(o,k))),t=t?t+L:L,i+=k,o-=k;return t}return Module.UTF8ToString(i)}Module.Pointer_stringify=Pointer_stringify;function AsciiToString(i){for(var o="";;){var a=HEAP8[i++>>0];if(!a)return o;o+=String.fromCharCode(a)}}Module.AsciiToString=AsciiToString;function stringToAscii(i,o){return writeAsciiToMemory(i,o,!1)}Module.stringToAscii=stringToAscii;var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(i,o){for(var a=o;i[a];)++a;if(a-o>16&&i.subarray&&UTF8Decoder)return UTF8Decoder.decode(i.subarray(o,a));for(var p,_,t,k,L,O,C="";;){if(p=i[o++],!p)return C;if(!(p&128)){C+=String.fromCharCode(p);continue}if(_=i[o++]&63,(p&224)==192){C+=String.fromCharCode((p&31)<<6|_);continue}if(t=i[o++]&63,(p&240)==224?p=(p&15)<<12|_<<6|t:(k=i[o++]&63,(p&248)==240?p=(p&7)<<18|_<<12|t<<6|k:(L=i[o++]&63,(p&252)==248?p=(p&3)<<24|_<<18|t<<12|k<<6|L:(O=i[o++]&63,p=(p&1)<<30|_<<24|t<<18|k<<12|L<<6|O))),p<65536)C+=String.fromCharCode(p);else{var U=p-65536;C+=String.fromCharCode(55296|U>>10,56320|U&1023)}}}Module.UTF8ArrayToString=UTF8ArrayToString;function UTF8ToString(i){return UTF8ArrayToString(HEAPU8,i)}Module.UTF8ToString=UTF8ToString;function stringToUTF8Array(i,o,a,p){if(!(p>0))return 0;for(var _=a,t=a+p-1,k=0;k=55296&&L<=57343&&(L=65536+((L&1023)<<10)|i.charCodeAt(++k)&1023),L<=127){if(a>=t)break;o[a++]=L}else if(L<=2047){if(a+1>=t)break;o[a++]=192|L>>6,o[a++]=128|L&63}else if(L<=65535){if(a+2>=t)break;o[a++]=224|L>>12,o[a++]=128|L>>6&63,o[a++]=128|L&63}else if(L<=2097151){if(a+3>=t)break;o[a++]=240|L>>18,o[a++]=128|L>>12&63,o[a++]=128|L>>6&63,o[a++]=128|L&63}else if(L<=67108863){if(a+4>=t)break;o[a++]=248|L>>24,o[a++]=128|L>>18&63,o[a++]=128|L>>12&63,o[a++]=128|L>>6&63,o[a++]=128|L&63}else{if(a+5>=t)break;o[a++]=252|L>>30,o[a++]=128|L>>24&63,o[a++]=128|L>>18&63,o[a++]=128|L>>12&63,o[a++]=128|L>>6&63,o[a++]=128|L&63}}return o[a]=0,a-_}Module.stringToUTF8Array=stringToUTF8Array;function stringToUTF8(i,o,a){return stringToUTF8Array(i,HEAPU8,o,a)}Module.stringToUTF8=stringToUTF8;function lengthBytesUTF8(i){for(var o=0,a=0;a=55296&&p<=57343&&(p=65536+((p&1023)<<10)|i.charCodeAt(++a)&1023),p<=127?++o:p<=2047?o+=2:p<=65535?o+=3:p<=2097151?o+=4:p<=67108863?o+=5:o+=6}return o}Module.lengthBytesUTF8=lengthBytesUTF8;var UTF16Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf-16le"):void 0;function demangle(i){var o=Module.___cxa_demangle||Module.__cxa_demangle;if(o){try{var a=i.substr(1),p=lengthBytesUTF8(a)+1,_=_malloc(p);stringToUTF8(a,_,p);var t=_malloc(4),k=o(_,0,0,t);if(getValue(t,"i32")===0&&k)return Pointer_stringify(k)}catch(L){}finally{_&&_free(_),t&&_free(t),k&&_free(k)}return i}return Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),i}function demangleAll(i){var o=/__Z[\w\d_]+/g;return i.replace(o,function(a){var p=demangle(a);return a===p?a:a+" ["+p+"]"})}function jsStackTrace(){var i=new Error;if(!i.stack){try{throw new Error(0)}catch(o){i=o}if(!i.stack)return"(no stack trace available)"}return i.stack.toString()}function stackTrace(){var i=jsStackTrace();return Module.extraStackTrace&&(i+=` -`+Module.extraStackTrace()),demangleAll(i)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY0;){var o=i.shift();if(typeof o=="function"){o();continue}var a=o.func;typeof a=="number"?o.arg===void 0?Module.dynCall_v(a):Module.dynCall_vi(a,o.arg):a(o.arg===void 0?null:o.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(i){__ATPRERUN__.unshift(i)}Module.addOnPreRun=addOnPreRun;function addOnInit(i){__ATINIT__.unshift(i)}Module.addOnInit=addOnInit;function addOnPreMain(i){__ATMAIN__.unshift(i)}Module.addOnPreMain=addOnPreMain;function addOnExit(i){__ATEXIT__.unshift(i)}Module.addOnExit=addOnExit;function addOnPostRun(i){__ATPOSTRUN__.unshift(i)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(i,o,a){var p=a>0?a:lengthBytesUTF8(i)+1,_=new Array(p),t=stringToUTF8Array(i,_,0,_.length);return o&&(_.length=t),_}Module.intArrayFromString=intArrayFromString;function intArrayToString(i){for(var o=[],a=0;a255&&(p&=255),o.push(String.fromCharCode(p))}return o.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(i,o,a){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var p,_;a&&(_=o+lengthBytesUTF8(i),p=HEAP8[_]),stringToUTF8(i,o,Infinity),a&&(HEAP8[_]=p)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(i,o){HEAP8.set(i,o)}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(i,o,a){for(var p=0;p>0]=i.charCodeAt(p);a||(HEAP8[o>>0]=0)}if(Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function(o,a){var p=o>>>16,_=o&65535,t=a>>>16,k=a&65535;return _*k+(p*k+_*t<<16)|0}),Math.imul=Math.imul,!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(i){return froundBuffer[0]=i,froundBuffer[0]}}Math.fround=Math.fround,Math.clz32||(Math.clz32=function(i){i=i>>>0;for(var o=0;o<32;o++)if(i&1<<31-o)return o;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(i){return i<0?Math.ceil(i):Math.floor(i)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_round=Math.round,Math_min=Math.min,Math_clz32=Math.clz32,Math_trunc=Math.trunc,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(i){return i}function addRunDependency(i){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}Module.addRunDependency=addRunDependency;function removeRunDependency(i){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var o=dependenciesFulfilled;dependenciesFulfilled=null,o()}}Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={};var ASM_CONSTS=[function(i,o,a,p,_,t,k,L){return _nbind.callbackSignatureList[i].apply(this,arguments)}];function _emscripten_asm_const_iiiiiiii(i,o,a,p,_,t,k,L){return ASM_CONSTS[i](o,a,p,_,t,k,L)}function _emscripten_asm_const_iiiii(i,o,a,p,_){return ASM_CONSTS[i](o,a,p,_)}function _emscripten_asm_const_iiidddddd(i,o,a,p,_,t,k,L,O){return ASM_CONSTS[i](o,a,p,_,t,k,L,O)}function _emscripten_asm_const_iiididi(i,o,a,p,_,t,k){return ASM_CONSTS[i](o,a,p,_,t,k)}function _emscripten_asm_const_iiii(i,o,a,p){return ASM_CONSTS[i](o,a,p)}function _emscripten_asm_const_iiiid(i,o,a,p,_){return ASM_CONSTS[i](o,a,p,_)}function _emscripten_asm_const_iiiiii(i,o,a,p,_,t){return ASM_CONSTS[i](o,a,p,_,t)}STATIC_BASE=Runtime.GLOBAL_BASE,STATICTOP=STATIC_BASE+12800,__ATINIT__.push({func:function(){__GLOBAL__sub_I_Yoga_cpp()}},{func:function(){__GLOBAL__sub_I_nbind_cc()}},{func:function(){__GLOBAL__sub_I_common_cc()}},{func:function(){__GLOBAL__sub_I_Binding_cc()}}),allocate([0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,192,127,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,128,191,0,0,128,191,0,0,192,127,0,0,0,0,0,0,0,0,0,0,128,63,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,190,12,0,0,200,12,0,0,208,12,0,0,216,12,0,0,230,12,0,0,242,12,0,0,1,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,0,0,192,127,3,0,0,0,180,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,182,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,183,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,184,45,0,0,185,45,0,0,181,45,0,0,181,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,148,4,0,0,3,0,0,0,187,45,0,0,164,4,0,0,188,45,0,0,2,0,0,0,189,45,0,0,164,4,0,0,188,45,0,0,185,45,0,0,164,4,0,0,185,45,0,0,164,4,0,0,188,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,5,0,0,0,6,0,0,0,1,0,0,0,7,0,0,0,183,45,0,0,182,45,0,0,181,45,0,0,190,45,0,0,190,45,0,0,182,45,0,0,182,45,0,0,185,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,185,45,0,0,48,5,0,0,3,0,0,0,56,5,0,0,1,0,0,0,189,45,0,0,185,45,0,0,164,4,0,0,76,5,0,0,2,0,0,0,191,45,0,0,186,45,0,0,182,45,0,0,185,45,0,0,192,45,0,0,185,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,76,5,0,0,76,5,0,0,136,5,0,0,182,45,0,0,181,45,0,0,2,0,0,0,190,45,0,0,136,5,0,0,56,19,0,0,156,5,0,0,2,0,0,0,184,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,8,0,0,0,9,0,0,0,1,0,0,0,10,0,0,0,204,5,0,0,181,45,0,0,181,45,0,0,2,0,0,0,180,45,0,0,204,5,0,0,2,0,0,0,195,45,0,0,236,5,0,0,97,19,0,0,198,45,0,0,211,45,0,0,212,45,0,0,213,45,0,0,214,45,0,0,215,45,0,0,188,45,0,0,182,45,0,0,216,45,0,0,217,45,0,0,218,45,0,0,219,45,0,0,192,45,0,0,181,45,0,0,0,0,0,0,185,45,0,0,110,19,0,0,186,45,0,0,115,19,0,0,221,45,0,0,120,19,0,0,148,4,0,0,132,19,0,0,96,6,0,0,145,19,0,0,222,45,0,0,164,19,0,0,223,45,0,0,173,19,0,0,0,0,0,0,3,0,0,0,104,6,0,0,1,0,0,0,187,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,11,0,0,0,12,0,0,0,1,0,0,0,13,0,0,0,185,45,0,0,224,45,0,0,164,6,0,0,188,45,0,0,172,6,0,0,180,6,0,0,2,0,0,0,188,6,0,0,7,0,0,0,224,45,0,0,7,0,0,0,164,6,0,0,1,0,0,0,213,45,0,0,185,45,0,0,224,45,0,0,172,6,0,0,185,45,0,0,224,45,0,0,164,6,0,0,185,45,0,0,224,45,0,0,211,45,0,0,211,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,172,6,0,0,222,45,0,0,211,45,0,0,224,45,0,0,188,45,0,0,222,45,0,0,211,45,0,0,40,7,0,0,188,45,0,0,2,0,0,0,224,45,0,0,185,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,222,45,0,0,224,45,0,0,148,4,0,0,185,45,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,185,45,0,0,164,6,0,0,148,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,14,0,0,0,15,0,0,0,1,0,0,0,16,0,0,0,148,7,0,0,2,0,0,0,225,45,0,0,183,45,0,0,188,45,0,0,168,7,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,234,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,148,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,9,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,242,45,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,110,111,100,101,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,119,104,105,99,104,32,115,116,105,108,108,32,104,97,115,32,99,104,105,108,100,114,101,110,32,97,116,116,97,99,104,101,100,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,115,116,105,108,108,32,97,116,116,97,99,104,101,100,32,116,111,32,97,32,112,97,114,101,110,116,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,99,111,110,102,105,103,0,67,97,110,110,111,116,32,115,101,116,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,67,104,105,108,100,32,97,108,114,101,97,100,121,32,104,97,115,32,97,32,112,97,114,101,110,116,44,32,105,116,32,109,117,115,116,32,98,101,32,114,101,109,111,118,101,100,32,102,105,114,115,116,46,0,67,97,110,110,111,116,32,97,100,100,32,99,104,105,108,100,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,79,110,108,121,32,108,101,97,102,32,110,111,100,101,115,32,119,105,116,104,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,115,104,111,117,108,100,32,109,97,110,117,97,108,108,121,32,109,97,114,107,32,116,104,101,109,115,101,108,118,101,115,32,97,115,32,100,105,114,116,121,0,67,97,110,110,111,116,32,103,101,116,32,108,97,121,111,117,116,32,112,114,111,112,101,114,116,105,101,115,32,111,102,32,109,117,108,116,105,45,101,100,103,101,32,115,104,111,114,116,104,97,110,100,115,0,37,115,37,100,46,123,91,115,107,105,112,112,101,100,93,32,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,61,62,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,37,115,37,100,46,123,37,115,0,42,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,37,115,10,0,37,115,37,100,46,125,37,115,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,79,117,116,32,111,102,32,99,97,99,104,101,32,101,110,116,114,105,101,115,33,10,0,83,99,97,108,101,32,102,97,99,116,111,114,32,115,104,111,117,108,100,32,110,111,116,32,98,101,32,108,101,115,115,32,116,104,97,110,32,122,101,114,111,0,105,110,105,116,105,97,108,0,37,115,10,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,85,78,68,69,70,73,78,69,68,0,69,88,65,67,84,76,89,0,65,84,95,77,79,83,84,0,76,65,89,95,85,78,68,69,70,73,78,69,68,0,76,65,89,95,69,88,65,67,84,76,89,0,76,65,89,95,65,84,95,77,79,83,84,0,97,118,97,105,108,97,98,108,101,87,105,100,116,104,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,119,105,100,116,104,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,97,118,97,105,108,97,98,108,101,72,101,105,103,104,116,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,104,101,105,103,104,116,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,102,108,101,120,0,115,116,114,101,116,99,104,0,109,117,108,116,105,108,105,110,101,45,115,116,114,101,116,99,104,0,69,120,112,101,99,116,101,100,32,110,111,100,101,32,116,111,32,104,97,118,101,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,0,109,101,97,115,117,114,101,0,69,120,112,101,99,116,32,99,117,115,116,111,109,32,98,97,115,101,108,105,110,101,32,102,117,110,99,116,105,111,110,32,116,111,32,110,111,116,32,114,101,116,117,114,110,32,78,97,78,0,97,98,115,45,109,101,97,115,117,114,101,0,97,98,115,45,108,97,121,111,117,116,0,78,111,100,101,0,99,114,101,97,116,101,68,101,102,97,117,108,116,0,99,114,101,97,116,101,87,105,116,104,67,111,110,102,105,103,0,100,101,115,116,114,111,121,0,114,101,115,101,116,0,99,111,112,121,83,116,121,108,101,0,115,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,115,101,116,80,111,115,105,116,105,111,110,0,115,101,116,80,111,115,105,116,105,111,110,80,101,114,99,101,110,116,0,115,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,115,101,116,65,108,105,103,110,73,116,101,109,115,0,115,101,116,65,108,105,103,110,83,101,108,102,0,115,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,115,101,116,70,108,101,120,87,114,97,112,0,115,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,115,101,116,77,97,114,103,105,110,0,115,101,116,77,97,114,103,105,110,80,101,114,99,101,110,116,0,115,101,116,77,97,114,103,105,110,65,117,116,111,0,115,101,116,79,118,101,114,102,108,111,119,0,115,101,116,68,105,115,112,108,97,121,0,115,101,116,70,108,101,120,0,115,101,116,70,108,101,120,66,97,115,105,115,0,115,101,116,70,108,101,120,66,97,115,105,115,80,101,114,99,101,110,116,0,115,101,116,70,108,101,120,71,114,111,119,0,115,101,116,70,108,101,120,83,104,114,105,110,107,0,115,101,116,87,105,100,116,104,0,115,101,116,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,87,105,100,116,104,65,117,116,111,0,115,101,116,72,101,105,103,104,116,0,115,101,116,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,72,101,105,103,104,116,65,117,116,111,0,115,101,116,77,105,110,87,105,100,116,104,0,115,101,116,77,105,110,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,105,110,72,101,105,103,104,116,0,115,101,116,77,105,110,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,77,97,120,87,105,100,116,104,0,115,101,116,77,97,120,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,97,120,72,101,105,103,104,116,0,115,101,116,77,97,120,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,65,115,112,101,99,116,82,97,116,105,111,0,115,101,116,66,111,114,100,101,114,0,115,101,116,80,97,100,100,105,110,103,0,115,101,116,80,97,100,100,105,110,103,80,101,114,99,101,110,116,0,103,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,103,101,116,80,111,115,105,116,105,111,110,0,103,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,103,101,116,65,108,105,103,110,73,116,101,109,115,0,103,101,116,65,108,105,103,110,83,101,108,102,0,103,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,103,101,116,70,108,101,120,87,114,97,112,0,103,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,103,101,116,77,97,114,103,105,110,0,103,101,116,70,108,101,120,66,97,115,105,115,0,103,101,116,70,108,101,120,71,114,111,119,0,103,101,116,70,108,101,120,83,104,114,105,110,107,0,103,101,116,87,105,100,116,104,0,103,101,116,72,101,105,103,104,116,0,103,101,116,77,105,110,87,105,100,116,104,0,103,101,116,77,105,110,72,101,105,103,104,116,0,103,101,116,77,97,120,87,105,100,116,104,0,103,101,116,77,97,120,72,101,105,103,104,116,0,103,101,116,65,115,112,101,99,116,82,97,116,105,111,0,103,101,116,66,111,114,100,101,114,0,103,101,116,79,118,101,114,102,108,111,119,0,103,101,116,68,105,115,112,108,97,121,0,103,101,116,80,97,100,100,105,110,103,0,105,110,115,101,114,116,67,104,105,108,100,0,114,101,109,111,118,101,67,104,105,108,100,0,103,101,116,67,104,105,108,100,67,111,117,110,116,0,103,101,116,80,97,114,101,110,116,0,103,101,116,67,104,105,108,100,0,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,117,110,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,109,97,114,107,68,105,114,116,121,0,105,115,68,105,114,116,121,0,99,97,108,99,117,108,97,116,101,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,76,101,102,116,0,103,101,116,67,111,109,112,117,116,101,100,82,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,84,111,112,0,103,101,116,67,111,109,112,117,116,101,100,66,111,116,116,111,109,0,103,101,116,67,111,109,112,117,116,101,100,87,105,100,116,104,0,103,101,116,67,111,109,112,117,116,101,100,72,101,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,77,97,114,103,105,110,0,103,101,116,67,111,109,112,117,116,101,100,66,111,114,100,101,114,0,103,101,116,67,111,109,112,117,116,101,100,80,97,100,100,105,110,103,0,67,111,110,102,105,103,0,99,114,101,97,116,101,0,115,101,116,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,115,101,116,80,111,105,110,116,83,99,97,108,101,70,97,99,116,111,114,0,105,115,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,86,97,108,117,101,0,76,97,121,111,117,116,0,83,105,122,101,0,103,101,116,73,110,115,116,97,110,99,101,67,111,117,110,116,0,73,110,116,54,52,0,1,1,1,2,2,4,4,4,4,8,8,4,8,118,111,105,100,0,98,111,111,108,0,115,116,100,58,58,115,116,114,105,110,103,0,99,98,70,117,110,99,116,105,111,110,32,38,0,99,111,110,115,116,32,99,98,70,117,110,99,116,105,111,110,32,38,0,69,120,116,101,114,110,97,108,0,66,117,102,102,101,114,0,78,66,105,110,100,73,68,0,78,66,105,110,100,0,98,105,110,100,95,118,97,108,117,101,0,114,101,102,108,101,99,116,0,113,117,101,114,121,84,121,112,101,0,108,97,108,108,111,99,0,108,114,101,115,101,116,0,123,114,101,116,117,114,110,40,95,110,98,105,110,100,46,99,97,108,108,98,97,99,107,83,105,103,110,97,116,117,114,101,76,105,115,116,91,36,48,93,46,97,112,112,108,121,40,116,104,105,115,44,97,114,103,117,109,101,110,116,115,41,41,59,125,0,95,110,98,105,110,100,95,110,101,119,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;STATICTOP+=16;function _atexit(i,o){__ATEXIT__.unshift({func:i,arg:o})}function ___cxa_atexit(){return _atexit.apply(null,arguments)}function _abort(){Module.abort()}function __ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj(){Module.printErr("missing function: _ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj"),abort(-1)}function __decorate(i,o,a,p){var _=arguments.length,t=_<3?o:p===null?p=Object.getOwnPropertyDescriptor(o,a):p,k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,o,a,p);else for(var L=i.length-1;L>=0;L--)(k=i[L])&&(t=(_<3?k(t):_>3?k(o,a,t):k(o,a))||t);return _>3&&t&&Object.defineProperty(o,a,t),t}function _defineHidden(i){return function(o,a){Object.defineProperty(o,a,{configurable:!1,enumerable:!1,value:i,writable:!0})}}var _nbind={};function __nbind_free_external(i){_nbind.externalList[i].dereference(i)}function __nbind_reference_external(i){_nbind.externalList[i].reference()}function _llvm_stackrestore(i){var o=_llvm_stacksave,a=o.LLVM_SAVEDSTACKS[i];o.LLVM_SAVEDSTACKS.splice(i,1),Runtime.stackRestore(a)}function __nbind_register_pool(i,o,a,p){_nbind.Pool.pageSize=i,_nbind.Pool.usedPtr=o/4,_nbind.Pool.rootPtr=a,_nbind.Pool.pagePtr=p/4,HEAP32[o/4]=16909060,HEAP8[o]==1&&(_nbind.bigEndian=!0),HEAP32[o/4]=0,_nbind.makeTypeKindTbl=(t={},t[1024]=_nbind.PrimitiveType,t[64]=_nbind.Int64Type,t[2048]=_nbind.BindClass,t[3072]=_nbind.BindClassPtr,t[4096]=_nbind.SharedClassPtr,t[5120]=_nbind.ArrayType,t[6144]=_nbind.ArrayType,t[7168]=_nbind.CStringType,t[9216]=_nbind.CallbackType,t[10240]=_nbind.BindType,t),_nbind.makeTypeNameTbl={Buffer:_nbind.BufferType,External:_nbind.ExternalType,Int64:_nbind.Int64Type,_nbind_new:_nbind.CreateValueType,bool:_nbind.BooleanType,"cbFunction &":_nbind.CallbackType,"const cbFunction &":_nbind.CallbackType,"const std::string &":_nbind.StringType,"std::string":_nbind.StringType},Module.toggleLightGC=_nbind.toggleLightGC,_nbind.callUpcast=Module.dynCall_ii;var _=_nbind.makeType(_nbind.constructType,{flags:2048,id:0,name:""});_.proto=Module,_nbind.BindClass.list.push(_);var t}function _emscripten_set_main_loop_timing(i,o){if(Browser.mainLoop.timingMode=i,Browser.mainLoop.timingValue=o,!Browser.mainLoop.func)return 1;if(i==0)Browser.mainLoop.scheduler=function(){var k=Math.max(0,Browser.mainLoop.tickStartTime+o-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,k)},Browser.mainLoop.method="timeout";else if(i==1)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method="rAF";else if(i==2){if(!window.setImmediate){let t=function(k){k.source===window&&k.data===p&&(k.stopPropagation(),a.shift()())};var _=t,a=[],p="setimmediate";window.addEventListener("message",t,!0),window.setImmediate=function(L){a.push(L),ENVIRONMENT_IS_WORKER?(Module.setImmediates===void 0&&(Module.setImmediates=[]),Module.setImmediates.push(L),window.postMessage({target:p})):window.postMessage(p,"*")}}Browser.mainLoop.scheduler=function(){window.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method="immediate"}return 0}function _emscripten_get_now(){abort()}function _emscripten_set_main_loop(i,o,a,p,_){Module.noExitRuntime=!0,assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Browser.mainLoop.func=i,Browser.mainLoop.arg=p;var t;typeof p!="undefined"?t=function(){Module.dynCall_vi(i,p)}:t=function(){Module.dynCall_v(i)};var k=Browser.mainLoop.currentlyRunningMainloop;if(Browser.mainLoop.runner=function(){if(!ABORT){if(Browser.mainLoop.queue.length>0){var O=Date.now(),C=Browser.mainLoop.queue.shift();if(C.func(C.arg),Browser.mainLoop.remainingBlockers){var U=Browser.mainLoop.remainingBlockers,H=U%1==0?U-1:Math.floor(U);C.counted?Browser.mainLoop.remainingBlockers=H:(H=H+.5,Browser.mainLoop.remainingBlockers=(8*U+H)/9)}if(console.log('main loop blocker "'+C.name+'" took '+(Date.now()-O)+" ms"),Browser.mainLoop.updateStatus(),k1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else Browser.mainLoop.timingMode==0&&(Browser.mainLoop.tickStartTime=_emscripten_get_now());Browser.mainLoop.method==="timeout"&&Module.ctx&&(Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),Browser.mainLoop.method=""),Browser.mainLoop.runIter(t),!(k0?_emscripten_set_main_loop_timing(0,1e3/o):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),a)throw"SimulateInfiniteLoop"}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var i=Browser.mainLoop.timingMode,o=Browser.mainLoop.timingValue,a=Browser.mainLoop.func;Browser.mainLoop.func=null,_emscripten_set_main_loop(a,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(i,o),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var i=Module.statusMessage||"Please wait...",o=Browser.mainLoop.remainingBlockers,a=Browser.mainLoop.expectedBlockers;o?o=6;){var qe=ie>>Oe-6&63;Oe-=6,me+=De[qe]}return Oe==2?(me+=De[(ie&3)<<4],me+=pe+pe):Oe==4&&(me+=De[(ie&15)<<2],me+=pe),me}m.src="data:audio/x-"+k.substr(-3)+";base64,"+ve(t),U(m)},m.src=ne,Browser.safeSetTimeout(function(){U(m)},1e4)}else return H()},Module.preloadPlugins.push(o);function a(){Browser.pointerLock=document.pointerLockElement===Module.canvas||document.mozPointerLockElement===Module.canvas||document.webkitPointerLockElement===Module.canvas||document.msPointerLockElement===Module.canvas}var p=Module.canvas;p&&(p.requestPointerLock=p.requestPointerLock||p.mozRequestPointerLock||p.webkitRequestPointerLock||p.msRequestPointerLock||function(){},p.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},p.exitPointerLock=p.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",a,!1),document.addEventListener("mozpointerlockchange",a,!1),document.addEventListener("webkitpointerlockchange",a,!1),document.addEventListener("mspointerlockchange",a,!1),Module.elementPointerLock&&p.addEventListener("click",function(_){!Browser.pointerLock&&Module.canvas.requestPointerLock&&(Module.canvas.requestPointerLock(),_.preventDefault())},!1))},createContext:function(i,o,a,p){if(o&&Module.ctx&&i==Module.canvas)return Module.ctx;var _,t;if(o){var k={antialias:!1,alpha:!1};if(p)for(var L in p)k[L]=p[L];t=GL.createContext(i,k),t&&(_=GL.getContext(t).GLctx)}else _=i.getContext("2d");return _?(a&&(o||assert(typeof GLctx=="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=_,o&&GL.makeContextCurrent(t),Module.useWebGL=o,Browser.moduleContextCreatedCallbacks.forEach(function(O){O()}),Browser.init()),_):null},destroyContext:function(i,o,a){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(i,o,a){Browser.lockPointer=i,Browser.resizeCanvas=o,Browser.vrDevice=a,typeof Browser.lockPointer=="undefined"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas=="undefined"&&(Browser.resizeCanvas=!1),typeof Browser.vrDevice=="undefined"&&(Browser.vrDevice=null);var p=Module.canvas;function _(){Browser.isFullscreen=!1;var k=p.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===k?(p.exitFullscreen=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){},p.exitFullscreen=p.exitFullscreen.bind(document),Browser.lockPointer&&p.requestPointerLock(),Browser.isFullscreen=!0,Browser.resizeCanvas&&Browser.setFullscreenCanvasSize()):(k.parentNode.insertBefore(p,k),k.parentNode.removeChild(k),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullscreen),Module.onFullscreen&&Module.onFullscreen(Browser.isFullscreen),Browser.updateCanvasDimensions(p)}Browser.fullscreenHandlersInstalled||(Browser.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",_,!1),document.addEventListener("mozfullscreenchange",_,!1),document.addEventListener("webkitfullscreenchange",_,!1),document.addEventListener("MSFullscreenChange",_,!1));var t=document.createElement("div");p.parentNode.insertBefore(t,p),t.appendChild(p),t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||(t.webkitRequestFullscreen?function(){t.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(t.webkitRequestFullScreen?function(){t.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),a?t.requestFullscreen({vrDisplay:a}):t.requestFullscreen()},requestFullScreen:function(i,o,a){return Module.printErr("Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead."),Browser.requestFullScreen=function(p,_,t){return Browser.requestFullscreen(p,_,t)},Browser.requestFullscreen(i,o,a)},nextRAF:0,fakeRequestAnimationFrame:function(i){var o=Date.now();if(Browser.nextRAF===0)Browser.nextRAF=o+1e3/60;else for(;o+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var a=Math.max(Browser.nextRAF-o,0);setTimeout(i,a)},requestAnimationFrame:function(o){typeof window=="undefined"?Browser.fakeRequestAnimationFrame(o):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(o))},safeCallback:function(i){return function(){if(!ABORT)return i.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,Browser.queuedAsyncCallbacks.length>0){var i=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[],i.forEach(function(o){o()})}},safeRequestAnimationFrame:function(i){return Browser.requestAnimationFrame(function(){ABORT||(Browser.allowAsyncCallbacks?i():Browser.queuedAsyncCallbacks.push(i))})},safeSetTimeout:function(i,o){return Module.noExitRuntime=!0,setTimeout(function(){ABORT||(Browser.allowAsyncCallbacks?i():Browser.queuedAsyncCallbacks.push(i))},o)},safeSetInterval:function(i,o){return Module.noExitRuntime=!0,setInterval(function(){ABORT||Browser.allowAsyncCallbacks&&i()},o)},getMimetype:function(i){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[i.substr(i.lastIndexOf(".")+1)]},getUserMedia:function(i){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(i)},getMovementX:function(i){return i.movementX||i.mozMovementX||i.webkitMovementX||0},getMovementY:function(i){return i.movementY||i.mozMovementY||i.webkitMovementY||0},getMouseWheelDelta:function(i){var o=0;switch(i.type){case"DOMMouseScroll":o=i.detail;break;case"mousewheel":o=i.wheelDelta;break;case"wheel":o=i.deltaY;break;default:throw"unrecognized mouse wheel event: "+i.type}return o},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(i){if(Browser.pointerLock)i.type!="mousemove"&&"mozMovementX"in i?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(i),Browser.mouseMovementY=Browser.getMovementY(i)),typeof SDL!="undefined"?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var o=Module.canvas.getBoundingClientRect(),a=Module.canvas.width,p=Module.canvas.height,_=typeof window.scrollX!="undefined"?window.scrollX:window.pageXOffset,t=typeof window.scrollY!="undefined"?window.scrollY:window.pageYOffset;if(i.type==="touchstart"||i.type==="touchend"||i.type==="touchmove"){var k=i.touch;if(k===void 0)return;var L=k.pageX-(_+o.left),O=k.pageY-(t+o.top);L=L*(a/o.width),O=O*(p/o.height);var C={x:L,y:O};if(i.type==="touchstart")Browser.lastTouches[k.identifier]=C,Browser.touches[k.identifier]=C;else if(i.type==="touchend"||i.type==="touchmove"){var U=Browser.touches[k.identifier];U||(U=C),Browser.lastTouches[k.identifier]=U,Browser.touches[k.identifier]=C}return}var H=i.pageX-(_+o.left),W=i.pageY-(t+o.top);H=H*(a/o.width),W=W*(p/o.height),Browser.mouseMovementX=H-Browser.mouseX,Browser.mouseMovementY=W-Browser.mouseY,Browser.mouseX=H,Browser.mouseY=W}},asyncLoad:function(i,o,a,p){var _=p?"":getUniqueRunDependency("al "+i);Module.readAsync(i,function(t){assert(t,'Loading data file "'+i+'" failed (no arrayBuffer).'),o(new Uint8Array(t)),_&&removeRunDependency(_)},function(t){if(a)a();else throw'Loading data file "'+i+'" failed.'}),_&&addRunDependency(_)},resizeListeners:[],updateResizeListeners:function(){var i=Module.canvas;Browser.resizeListeners.forEach(function(o){o(i.width,i.height)})},setCanvasSize:function(i,o,a){var p=Module.canvas;Browser.updateCanvasDimensions(p,i,o),a||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!="undefined"){var i=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];i=i|8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=i}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var i=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];i=i&~8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=i}Browser.updateResizeListeners()},updateCanvasDimensions:function(i,o,a){o&&a?(i.widthNative=o,i.heightNative=a):(o=i.widthNative,a=i.heightNative);var p=o,_=a;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(p/_>2];return o},getStr:function(){var i=Pointer_stringify(SYSCALLS.get());return i},get64:function(){var i=SYSCALLS.get(),o=SYSCALLS.get();return i>=0?assert(o===0):assert(o===-1),i},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall6(i,o){SYSCALLS.varargs=o;try{var a=SYSCALLS.getStreamFromFD();return FS.close(a),0}catch(p){return(typeof FS=="undefined"||!(p instanceof FS.ErrnoError))&&abort(p),-p.errno}}function ___syscall54(i,o){SYSCALLS.varargs=o;try{return 0}catch(a){return(typeof FS=="undefined"||!(a instanceof FS.ErrnoError))&&abort(a),-a.errno}}function _typeModule(i){var o=[[0,1,"X"],[1,1,"const X"],[128,1,"X *"],[256,1,"X &"],[384,1,"X &&"],[512,1,"std::shared_ptr"],[640,1,"std::unique_ptr"],[5120,1,"std::vector"],[6144,2,"std::array"],[9216,-1,"std::function"]];function a(O,C,U,H,W,ne){if(C==1){var m=H&896;(m==128||m==256||m==384)&&(O="X const")}var he;return ne?he=U.replace("X",O).replace("Y",W):he=O.replace("X",U).replace("Y",W),he.replace(/([*&]) (?=[*&])/g,"$1")}function p(O,C,U,H,W){throw new Error(O+" type "+U.replace("X",C+"?")+(H?" with flag "+H:"")+" in "+W)}function _(O,C,U,H,W,ne,m,he){ne===void 0&&(ne="X"),he===void 0&&(he=1);var Ee=U(O);if(Ee)return Ee;var ve=H(O),se=ve.placeholderFlag,De=o[se];m&&De&&(ne=a(m[2],m[0],ne,De[0],"?",!0));var pe;se==0&&(pe="Unbound"),se>=10&&(pe="Corrupt"),he>20&&(pe="Deeply nested"),pe&&p(pe,O,ne,se,W||"?");var me=ve.paramList[0],ie=_(me,C,U,H,W,ne,De,he+1),Oe,je={flags:De[0],id:O,name:"",paramList:[ie]},qe=[],yt="?";switch(ve.placeholderFlag){case 1:Oe=ie.spec;break;case 2:if((ie.flags&15360)==1024&&ie.spec.ptrSize==1){je.flags=7168;break}case 3:case 6:case 5:Oe=ie.spec,(ie.flags&15360)!=2048;break;case 8:yt=""+ve.paramList[1],je.paramList.push(ve.paramList[1]);break;case 9:for(var gt=0,Xe=ve.paramList[1];gt>2]=i),i}function _llvm_stacksave(){var i=_llvm_stacksave;return i.LLVM_SAVEDSTACKS||(i.LLVM_SAVEDSTACKS=[]),i.LLVM_SAVEDSTACKS.push(Runtime.stackSave()),i.LLVM_SAVEDSTACKS.length-1}function ___syscall140(i,o){SYSCALLS.varargs=o;try{var a=SYSCALLS.getStreamFromFD(),p=SYSCALLS.get(),_=SYSCALLS.get(),t=SYSCALLS.get(),k=SYSCALLS.get(),L=_;return FS.llseek(a,L,k),HEAP32[t>>2]=a.position,a.getdents&&L===0&&k===0&&(a.getdents=null),0}catch(O){return(typeof FS=="undefined"||!(O instanceof FS.ErrnoError))&&abort(O),-O.errno}}function ___syscall146(i,o){SYSCALLS.varargs=o;try{var a=SYSCALLS.get(),p=SYSCALLS.get(),_=SYSCALLS.get(),t=0;___syscall146.buffer||(___syscall146.buffers=[null,[],[]],___syscall146.printChar=function(U,H){var W=___syscall146.buffers[U];assert(W),H===0||H===10?((U===1?Module.print:Module.printErr)(UTF8ArrayToString(W,0)),W.length=0):W.push(H)});for(var k=0;k<_;k++){for(var L=HEAP32[p+k*8>>2],O=HEAP32[p+(k*8+4)>>2],C=0;Ci.pageSize/2||o>i.pageSize-a){var p=_nbind.typeNameTbl.NBind.proto;return p.lalloc(o)}else return HEAPU32[i.usedPtr]=a+o,i.rootPtr+a},i.lreset=function(o,a){var p=HEAPU32[i.pagePtr];if(p){var _=_nbind.typeNameTbl.NBind.proto;_.lreset(o,a)}else HEAPU32[i.usedPtr]=o},i}();_nbind.Pool=Pool;function constructType(i,o){var a=i==10240?_nbind.makeTypeNameTbl[o.name]||_nbind.BindType:_nbind.makeTypeKindTbl[i],p=new a(o);return typeIdTbl[o.id]=p,_nbind.typeNameTbl[o.name]=p,p}_nbind.constructType=constructType;function getType(i){return typeIdTbl[i]}_nbind.getType=getType;function queryType(i){var o=HEAPU8[i],a=_nbind.structureList[o][1];i/=4,a<0&&(++i,a=HEAPU32[i]+1);var p=Array.prototype.slice.call(HEAPU32.subarray(i+1,i+1+a));return o==9&&(p=[p[0],p.slice(1)]),{paramList:p,placeholderFlag:o}}_nbind.queryType=queryType;function getTypes(i,o){return i.map(function(a){return typeof a=="number"?_nbind.getComplexType(a,constructType,getType,queryType,o):_nbind.typeNameTbl[a]})}_nbind.getTypes=getTypes;function readTypeIdList(i,o){return Array.prototype.slice.call(HEAPU32,i/4,i/4+o)}_nbind.readTypeIdList=readTypeIdList;function readAsciiString(i){for(var o=i;HEAPU8[o++];);return String.fromCharCode.apply("",HEAPU8.subarray(i,o-1))}_nbind.readAsciiString=readAsciiString;function readPolicyList(i){var o={};if(i)for(;;){var a=HEAPU32[i/4];if(!a)break;o[readAsciiString(a)]=!0,i+=4}return o}_nbind.readPolicyList=readPolicyList;function getDynCall(i,o){var a={float32_t:"d",float64_t:"d",int64_t:"d",uint64_t:"d",void:"v"},p=i.map(function(t){return a[t.name]||"i"}).join(""),_=Module["dynCall_"+p];if(!_)throw new Error("dynCall_"+p+" not found for "+o+"("+i.map(function(t){return t.name}).join(", ")+")");return _}_nbind.getDynCall=getDynCall;function addMethod(i,o,a,p){var _=i[o];i.hasOwnProperty(o)&&_?((_.arity||_.arity===0)&&(_=_nbind.makeOverloader(_,_.arity),i[o]=_),_.addMethod(a,p)):(a.arity=p,i[o]=a)}_nbind.addMethod=addMethod;function throwError(i){throw new Error(i)}_nbind.throwError=throwError,_nbind.bigEndian=!1,_a=_typeModule(_typeModule),_nbind.Type=_a.Type,_nbind.makeType=_a.makeType,_nbind.getComplexType=_a.getComplexType,_nbind.structureList=_a.structureList;var BindType=function(i){__extends(o,i);function o(){var a=i!==null&&i.apply(this,arguments)||this;return a.heap=HEAPU32,a.ptrSize=4,a}return o.prototype.needsWireRead=function(a){return!!this.wireRead||!!this.makeWireRead},o.prototype.needsWireWrite=function(a){return!!this.wireWrite||!!this.makeWireWrite},o}(_nbind.Type);_nbind.BindType=BindType;var PrimitiveType=function(i){__extends(o,i);function o(a){var p=i.call(this,a)||this,_=a.flags&32?{32:HEAPF32,64:HEAPF64}:a.flags&8?{8:HEAPU8,16:HEAPU16,32:HEAPU32}:{8:HEAP8,16:HEAP16,32:HEAP32};return p.heap=_[a.ptrSize*8],p.ptrSize=a.ptrSize,p}return o.prototype.needsWireWrite=function(a){return!!a&&!!a.Strict},o.prototype.makeWireWrite=function(a,p){return p&&p.Strict&&function(_){if(typeof _=="number")return _;throw new Error("Type mismatch")}},o}(BindType);_nbind.PrimitiveType=PrimitiveType;function pushCString(i,o){if(i==null){if(o&&o.Nullable)return 0;throw new Error("Type mismatch")}if(o&&o.Strict){if(typeof i!="string")throw new Error("Type mismatch")}else i=i.toString();var a=Module.lengthBytesUTF8(i)+1,p=_nbind.Pool.lalloc(a);return Module.stringToUTF8Array(i,HEAPU8,p,a),p}_nbind.pushCString=pushCString;function popCString(i){return i===0?null:Module.Pointer_stringify(i)}_nbind.popCString=popCString;var CStringType=function(i){__extends(o,i);function o(){var a=i!==null&&i.apply(this,arguments)||this;return a.wireRead=popCString,a.wireWrite=pushCString,a.readResources=[_nbind.resources.pool],a.writeResources=[_nbind.resources.pool],a}return o.prototype.makeWireWrite=function(a,p){return function(_){return pushCString(_,p)}},o}(BindType);_nbind.CStringType=CStringType;var BooleanType=function(i){__extends(o,i);function o(){var a=i!==null&&i.apply(this,arguments)||this;return a.wireRead=function(p){return!!p},a}return o.prototype.needsWireWrite=function(a){return!!a&&!!a.Strict},o.prototype.makeWireRead=function(a){return"!!("+a+")"},o.prototype.makeWireWrite=function(a,p){return p&&p.Strict&&function(_){if(typeof _=="boolean")return _;throw new Error("Type mismatch")}||a},o}(BindType);_nbind.BooleanType=BooleanType;var Wrapper=function(){function i(){}return i.prototype.persist=function(){this.__nbindState|=1},i}();_nbind.Wrapper=Wrapper;function makeBound(i,o){var a=function(p){__extends(_,p);function _(t,k,L,O){var C=p.call(this)||this;if(!(C instanceof _))return new(Function.prototype.bind.apply(_,Array.prototype.concat.apply([null],arguments)));var U=k,H=L,W=O;if(t!==_nbind.ptrMarker){var ne=C.__nbindConstructor.apply(C,arguments);U=4096|512,W=HEAPU32[ne/4],H=HEAPU32[ne/4+1]}var m={configurable:!0,enumerable:!1,value:null,writable:!1},he={__nbindFlags:U,__nbindPtr:H};W&&(he.__nbindShared=W,_nbind.mark(C));for(var Ee=0,ve=Object.keys(he);Ee>=1;var a=_nbind.valueList[i];return _nbind.valueList[i]=firstFreeValue,firstFreeValue=i,a}else{if(o)return _nbind.popShared(i,o);throw new Error("Invalid value slot "+i)}}_nbind.popValue=popValue;var valueBase=18446744073709552e3;function push64(i){return typeof i=="number"?i:pushValue(i)*4096+valueBase}function pop64(i){return i=3?k=Buffer.from(t):k=new Buffer(t),k.copy(p)}else getBuffer(p).set(t)}}_nbind.commitBuffer=commitBuffer;var dirtyList=[],gcTimer=0;function sweep(){for(var i=0,o=dirtyList;i>2]=DYNAMIC_BASE,staticSealed=!0;function invoke_viiiii(i,o,a,p,_,t){try{Module.dynCall_viiiii(i,o,a,p,_,t)}catch(k){if(typeof k!="number"&&k!=="longjmp")throw k;Module.setThrew(1,0)}}function invoke_vif(i,o,a){try{Module.dynCall_vif(i,o,a)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_vid(i,o,a){try{Module.dynCall_vid(i,o,a)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_fiff(i,o,a,p){try{return Module.dynCall_fiff(i,o,a,p)}catch(_){if(typeof _!="number"&&_!=="longjmp")throw _;Module.setThrew(1,0)}}function invoke_vi(i,o){try{Module.dynCall_vi(i,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_vii(i,o,a){try{Module.dynCall_vii(i,o,a)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_ii(i,o){try{return Module.dynCall_ii(i,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_viddi(i,o,a,p,_){try{Module.dynCall_viddi(i,o,a,p,_)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;Module.setThrew(1,0)}}function invoke_vidd(i,o,a,p){try{Module.dynCall_vidd(i,o,a,p)}catch(_){if(typeof _!="number"&&_!=="longjmp")throw _;Module.setThrew(1,0)}}function invoke_iiii(i,o,a,p){try{return Module.dynCall_iiii(i,o,a,p)}catch(_){if(typeof _!="number"&&_!=="longjmp")throw _;Module.setThrew(1,0)}}function invoke_diii(i,o,a,p){try{return Module.dynCall_diii(i,o,a,p)}catch(_){if(typeof _!="number"&&_!=="longjmp")throw _;Module.setThrew(1,0)}}function invoke_di(i,o){try{return Module.dynCall_di(i,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_iid(i,o,a){try{return Module.dynCall_iid(i,o,a)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_iii(i,o,a){try{return Module.dynCall_iii(i,o,a)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_viiddi(i,o,a,p,_,t){try{Module.dynCall_viiddi(i,o,a,p,_,t)}catch(k){if(typeof k!="number"&&k!=="longjmp")throw k;Module.setThrew(1,0)}}function invoke_viiiiii(i,o,a,p,_,t,k){try{Module.dynCall_viiiiii(i,o,a,p,_,t,k)}catch(L){if(typeof L!="number"&&L!=="longjmp")throw L;Module.setThrew(1,0)}}function invoke_dii(i,o,a){try{return Module.dynCall_dii(i,o,a)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_i(i){try{return Module.dynCall_i(i)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_iiiiii(i,o,a,p,_,t){try{return Module.dynCall_iiiiii(i,o,a,p,_,t)}catch(k){if(typeof k!="number"&&k!=="longjmp")throw k;Module.setThrew(1,0)}}function invoke_viiid(i,o,a,p,_){try{Module.dynCall_viiid(i,o,a,p,_)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;Module.setThrew(1,0)}}function invoke_viififi(i,o,a,p,_,t,k){try{Module.dynCall_viififi(i,o,a,p,_,t,k)}catch(L){if(typeof L!="number"&&L!=="longjmp")throw L;Module.setThrew(1,0)}}function invoke_viii(i,o,a,p){try{Module.dynCall_viii(i,o,a,p)}catch(_){if(typeof _!="number"&&_!=="longjmp")throw _;Module.setThrew(1,0)}}function invoke_v(i){try{Module.dynCall_v(i)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_viid(i,o,a,p){try{Module.dynCall_viid(i,o,a,p)}catch(_){if(typeof _!="number"&&_!=="longjmp")throw _;Module.setThrew(1,0)}}function invoke_idd(i,o,a){try{return Module.dynCall_idd(i,o,a)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_viiii(i,o,a,p,_){try{Module.dynCall_viiii(i,o,a,p,_)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;Module.setThrew(1,0)}}Module.asmGlobalArg={Math,Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Float32Array,Float64Array,NaN:NaN,Infinity:Infinity},Module.asmLibraryArg={abort,assert,enlargeMemory,getTotalMemory,abortOnCannotGrowMemory,invoke_viiiii,invoke_vif,invoke_vid,invoke_fiff,invoke_vi,invoke_vii,invoke_ii,invoke_viddi,invoke_vidd,invoke_iiii,invoke_diii,invoke_di,invoke_iid,invoke_iii,invoke_viiddi,invoke_viiiiii,invoke_dii,invoke_i,invoke_iiiiii,invoke_viiid,invoke_viififi,invoke_viii,invoke_v,invoke_viid,invoke_idd,invoke_viiii,_emscripten_asm_const_iiiii,_emscripten_asm_const_iiidddddd,_emscripten_asm_const_iiiid,__nbind_reference_external,_emscripten_asm_const_iiiiiiii,_removeAccessorPrefix,_typeModule,__nbind_register_pool,__decorate,_llvm_stackrestore,___cxa_atexit,__extends,__nbind_get_value_object,__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,_emscripten_set_main_loop_timing,__nbind_register_primitive,__nbind_register_type,_emscripten_memcpy_big,__nbind_register_function,___setErrNo,__nbind_register_class,__nbind_finish,_abort,_nbind_value,_llvm_stacksave,___syscall54,_defineHidden,_emscripten_set_main_loop,_emscripten_get_now,__nbind_register_callback_signature,_emscripten_asm_const_iiiiii,__nbind_free_external,_emscripten_asm_const_iiii,_emscripten_asm_const_iiididi,___syscall6,_atexit,___syscall140,___syscall146,DYNAMICTOP_PTR,tempDoublePtr,ABORT,STACKTOP,STACK_MAX,cttz_i8,___dso_handle};var asm=function(i,o,a){var p=new i.Int8Array(a),_=new i.Int16Array(a),t=new i.Int32Array(a),k=new i.Uint8Array(a),L=new i.Uint16Array(a),O=new i.Uint32Array(a),C=new i.Float32Array(a),U=new i.Float64Array(a),H=o.DYNAMICTOP_PTR|0,W=o.tempDoublePtr|0,ne=o.ABORT|0,m=o.STACKTOP|0,he=o.STACK_MAX|0,Ee=o.cttz_i8|0,ve=o.___dso_handle|0,se=0,De=0,pe=0,me=0,ie=i.NaN,Oe=i.Infinity,je=0,qe=0,yt=0,gt=0,Xe=0,ut=0,We=i.Math.floor,Ft=i.Math.abs,Jt=i.Math.sqrt,rt=i.Math.pow,Q=i.Math.cos,fe=i.Math.sin,xe=i.Math.tan,oe=i.Math.acos,ze=i.Math.asin,ct=i.Math.atan,Rt=i.Math.atan2,nn=i.Math.exp,an=i.Math.log,Mn=i.Math.ceil,lr=i.Math.imul,ln=i.Math.min,Vt=i.Math.max,Er=i.Math.clz32,w=i.Math.fround,jt=o.abort,Xn=o.assert,vr=o.enlargeMemory,jr=o.getTotalMemory,fr=o.abortOnCannotGrowMemory,zr=o.invoke_viiiii,Xt=o.invoke_vif,wu=o.invoke_vid,d0=o.invoke_fiff,Ro=o.invoke_vi,Qo=o.invoke_vii,Fs=o.invoke_ii,Jo=o.invoke_viddi,Zo=o.invoke_vidd,qt=o.invoke_iiii,xi=o.invoke_diii,lu=o.invoke_di,mi=o.invoke_iid,Dr=o.invoke_iii,$o=o.invoke_viiddi,G0=o.invoke_viiiiii,Uu=o.invoke_dii,Y0=o.invoke_i,Xr=o.invoke_iiiiii,Ao=o.invoke_viiid,Oo=o.invoke_viififi,F0=o.invoke_viii,su=o.invoke_v,ki=o.invoke_viid,Ps=o.invoke_idd,Kl=o.invoke_viiii,P0=o._emscripten_asm_const_iiiii,p0=o._emscripten_asm_const_iiidddddd,Hr=o._emscripten_asm_const_iiiid,Ri=o.__nbind_reference_external,K0=o._emscripten_asm_const_iiiiiiii,yi=o._removeAccessorPrefix,en=o._typeModule,bn=o.__nbind_register_pool,Ai=o.__decorate,gi=o._llvm_stackrestore,Wt=o.___cxa_atexit,Au=o.__extends,eu=o.__nbind_get_value_object,X0=o.__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,Yi=o._emscripten_set_main_loop_timing,Xl=o.__nbind_register_primitive,Mo=o.__nbind_register_type,ai=o._emscripten_memcpy_big,so=o.__nbind_register_function,Ql=o.___setErrNo,ko=o.__nbind_register_class,Is=o.__nbind_finish,$n=o._abort,el=o._nbind_value,ao=o._llvm_stacksave,I0=o.___syscall54,wl=o._defineHidden,No=o._emscripten_set_main_loop,wt=o._emscripten_get_now,bt=o.__nbind_register_callback_signature,Hn=o._emscripten_asm_const_iiiiii,qr=o.__nbind_free_external,Ki=o._emscripten_asm_const_iiii,Qr=o._emscripten_asm_const_iiididi,Ou=o.___syscall6,h0=o._atexit,Ni=o.___syscall140,v0=o.___syscall146,hs=w(0);let Tt=w(0);function fo(e){e=e|0;var n=0;return n=m,m=m+e|0,m=m+15&-16,n|0}function tl(){return m|0}function Jl(e){e=e|0,m=e}function ju(e,n){e=e|0,n=n|0,m=e,he=n}function vs(e,n){e=e|0,n=n|0,se||(se=e,De=n)}function b0(e){e=e|0,ut=e}function X(){return ut|0}function we(){var e=0,n=0;gr(8104,8,400)|0,gr(8504,408,540)|0,e=9044,n=e+44|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));p[9088]=0,p[9089]=1,t[2273]=0,t[2274]=948,t[2275]=948,Wt(17,8104,ve|0)|0}function Le(e){e=e|0,ac(e+948|0)}function Ne(e){return e=w(e),((mr(e)|0)&2147483647)>>>0>2139095040|0}function dt(e,n,r){e=e|0,n=n|0,r=r|0;e:do if(t[e+(n<<3)+4>>2]|0)e=e+(n<<3)|0;else{if((n|2|0)==3?t[e+60>>2]|0:0){e=e+56|0;break}switch(n|0){case 0:case 2:case 4:case 5:{if(t[e+52>>2]|0){e=e+48|0;break e}break}default:}if(t[e+68>>2]|0){e=e+64|0;break}else{e=(n|1|0)==5?948:r;break}}while(0);return e|0}function Yn(e){e=e|0;var n=0;return n=c_(1e3)|0,Cn(e,(n|0)!=0,2456),t[2276]=(t[2276]|0)+1,gr(n|0,8104,1e3)|0,p[e+2>>0]|0&&(t[n+4>>2]=2,t[n+12>>2]=4),t[n+976>>2]=e,n|0}function Cn(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;l=m,m=m+16|0,u=l,n||(t[u>>2]=r,Tl(e,5,3197,u)),m=l}function cr(){return Yn(956)|0}function Si(e){e=e|0;var n=0;return n=pn(1e3)|0,Mu(n,e),Cn(t[e+976>>2]|0,1,2456),t[2276]=(t[2276]|0)+1,t[n+944>>2]=0,n|0}function Mu(e,n){e=e|0,n=n|0;var r=0;gr(e|0,n|0,948)|0,sa(e+948|0,n+948|0),r=e+960|0,e=n+960|0,n=r+40|0;do t[r>>2]=t[e>>2],r=r+4|0,e=e+4|0;while((r|0)<(n|0))}function zu(e){e=e|0;var n=0,r=0,u=0,l=0;if(n=e+944|0,r=t[n>>2]|0,r|0&&(Hu(r+948|0,e)|0,t[n>>2]=0),r=Su(e)|0,r|0){n=0;do t[(Ti(e,n)|0)+944>>2]=0,n=n+1|0;while((n|0)!=(r|0))}r=e+948|0,u=t[r>>2]|0,l=e+952|0,n=t[l>>2]|0,(n|0)!=(u|0)&&(t[l>>2]=n+(~((n+-4-u|0)>>>2)<<2)),Lo(r),d_(e),t[2276]=(t[2276]|0)+-1}function Hu(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0;u=t[e>>2]|0,D=e+4|0,r=t[D>>2]|0,s=r;e:do if((u|0)==(r|0))l=u,h=4;else for(e=u;;){if((t[e>>2]|0)==(n|0)){l=e,h=4;break e}if(e=e+4|0,(e|0)==(r|0)){e=0;break}}while(0);return(h|0)==4&&((l|0)!=(r|0)?(u=l+4|0,e=s-u|0,n=e>>2,n&&(Ty(l|0,u|0,e|0)|0,r=t[D>>2]|0),e=l+(n<<2)|0,(r|0)==(e|0)||(t[D>>2]=r+(~((r+-4-e|0)>>>2)<<2)),e=1):e=0),e|0}function Su(e){return e=e|0,(t[e+952>>2]|0)-(t[e+948>>2]|0)>>2|0}function Ti(e,n){e=e|0,n=n|0;var r=0;return r=t[e+948>>2]|0,(t[e+952>>2]|0)-r>>2>>>0>n>>>0?e=t[r+(n<<2)>>2]|0:e=0,e|0}function Lo(e){e=e|0;var n=0,r=0,u=0,l=0;u=m,m=m+32|0,n=u,l=t[e>>2]|0,r=(t[e+4>>2]|0)-l|0,((t[e+8>>2]|0)-l|0)>>>0>r>>>0&&(l=r>>2,Y(n,l,l,e+8|0),ri(e,n),ii(n)),m=u}function ku(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0;N=Su(e)|0;do if(N|0){if((t[(Ti(e,0)|0)+944>>2]|0)==(e|0)){if(!(Hu(e+948|0,n)|0))break;gr(n+400|0,8504,540)|0,t[n+944>>2]=0,Qn(e);break}h=t[(t[e+976>>2]|0)+12>>2]|0,D=e+948|0,S=(h|0)==0,r=0,s=0;do u=t[(t[D>>2]|0)+(s<<2)>>2]|0,(u|0)==(n|0)?Qn(e):(l=Si(u)|0,t[(t[D>>2]|0)+(r<<2)>>2]=l,t[l+944>>2]=e,S||PE[h&15](u,l,e,r),r=r+1|0),s=s+1|0;while((s|0)!=(N|0));if(r>>>0>>0){S=e+948|0,D=e+952|0,h=r,r=t[D>>2]|0;do s=(t[S>>2]|0)+(h<<2)|0,u=s+4|0,l=r-u|0,n=l>>2,n&&(Ty(s|0,u|0,l|0)|0,r=t[D>>2]|0),l=r,u=s+(n<<2)|0,(l|0)!=(u|0)&&(r=l+(~((l+-4-u|0)>>>2)<<2)|0,t[D>>2]=r),h=h+1|0;while((h|0)!=(N|0))}}while(0)}function co(e){e=e|0;var n=0,r=0,u=0,l=0;qu(e,(Su(e)|0)==0,2491),qu(e,(t[e+944>>2]|0)==0,2545),n=e+948|0,r=t[n>>2]|0,u=e+952|0,l=t[u>>2]|0,(l|0)!=(r|0)&&(t[u>>2]=l+(~((l+-4-r|0)>>>2)<<2)),Lo(n),n=e+976|0,r=t[n>>2]|0,gr(e|0,8104,1e3)|0,p[r+2>>0]|0&&(t[e+4>>2]=2,t[e+12>>2]=4),t[n>>2]=r}function qu(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;l=m,m=m+16|0,u=l,n||(t[u>>2]=r,pr(e,5,3197,u)),m=l}function Pa(){return t[2276]|0}function m0(){var e=0;return e=c_(20)|0,ia((e|0)!=0,2592),t[2277]=(t[2277]|0)+1,t[e>>2]=t[239],t[e+4>>2]=t[240],t[e+8>>2]=t[241],t[e+12>>2]=t[242],t[e+16>>2]=t[243],e|0}function ia(e,n){e=e|0,n=n|0;var r=0,u=0;u=m,m=m+16|0,r=u,e||(t[r>>2]=n,pr(0,5,3197,r)),m=u}function Q0(e){e=e|0,d_(e),t[2277]=(t[2277]|0)+-1}function ua(e,n){e=e|0,n=n|0;var r=0;n?(qu(e,(Su(e)|0)==0,2629),r=1):(r=0,n=0),t[e+964>>2]=n,t[e+988>>2]=r}function Ia(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,s=u+8|0,l=u+4|0,h=u,t[l>>2]=n,qu(e,(t[n+944>>2]|0)==0,2709),qu(e,(t[e+964>>2]|0)==0,2763),ms(e),n=e+948|0,t[h>>2]=(t[n>>2]|0)+(r<<2),t[s>>2]=t[h>>2],S0(n,s,l)|0,t[(t[l>>2]|0)+944>>2]=e,Qn(e),m=u}function ms(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0;if(r=Su(e)|0,r|0?(t[(Ti(e,0)|0)+944>>2]|0)!=(e|0):0){u=t[(t[e+976>>2]|0)+12>>2]|0,l=e+948|0,s=(u|0)==0,n=0;do h=t[(t[l>>2]|0)+(n<<2)>>2]|0,D=Si(h)|0,t[(t[l>>2]|0)+(n<<2)>>2]=D,t[D+944>>2]=e,s||PE[u&15](h,D,e,n),n=n+1|0;while((n|0)!=(r|0))}}function S0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0,Se=0,ye=0,Je=0,Ge=0;Je=m,m=m+64|0,I=Je+52|0,D=Je+48|0,K=Je+28|0,be=Je+24|0,Se=Je+20|0,ye=Je,u=t[e>>2]|0,s=u,n=u+((t[n>>2]|0)-s>>2<<2)|0,u=e+4|0,l=t[u>>2]|0,h=e+8|0;do if(l>>>0<(t[h>>2]|0)>>>0){if((n|0)==(l|0)){t[n>>2]=t[r>>2],t[u>>2]=(t[u>>2]|0)+4;break}Vr(e,n,l,n+4|0),n>>>0<=r>>>0&&(r=(t[u>>2]|0)>>>0>r>>>0?r+4|0:r),t[n>>2]=t[r>>2]}else{u=(l-s>>2)+1|0,l=R0(e)|0,l>>>0>>0&&hi(e),M=t[e>>2]|0,N=(t[h>>2]|0)-M|0,s=N>>1,Y(ye,N>>2>>>0>>1>>>0?s>>>0>>0?u:s:l,n-M>>2,e+8|0),M=ye+8|0,u=t[M>>2]|0,s=ye+12|0,N=t[s>>2]|0,h=N,S=u;do if((u|0)==(N|0)){if(N=ye+4|0,u=t[N>>2]|0,Ge=t[ye>>2]|0,l=Ge,u>>>0<=Ge>>>0){u=h-l>>1,u=(u|0)==0?1:u,Y(K,u,u>>>2,t[ye+16>>2]|0),t[be>>2]=t[N>>2],t[Se>>2]=t[M>>2],t[D>>2]=t[be>>2],t[I>>2]=t[Se>>2],Di(K,D,I),u=t[ye>>2]|0,t[ye>>2]=t[K>>2],t[K>>2]=u,u=K+4|0,Ge=t[N>>2]|0,t[N>>2]=t[u>>2],t[u>>2]=Ge,u=K+8|0,Ge=t[M>>2]|0,t[M>>2]=t[u>>2],t[u>>2]=Ge,u=K+12|0,Ge=t[s>>2]|0,t[s>>2]=t[u>>2],t[u>>2]=Ge,ii(K),u=t[M>>2]|0;break}s=u,h=((s-l>>2)+1|0)/-2|0,D=u+(h<<2)|0,l=S-s|0,s=l>>2,s&&(Ty(D|0,u|0,l|0)|0,u=t[N>>2]|0),Ge=D+(s<<2)|0,t[M>>2]=Ge,t[N>>2]=u+(h<<2),u=Ge}while(0);t[u>>2]=t[r>>2],t[M>>2]=(t[M>>2]|0)+4,n=at(e,ye,n)|0,ii(ye)}while(0);return m=Je,n|0}function Qn(e){e=e|0;var n=0;do{if(n=e+984|0,p[n>>0]|0)break;p[n>>0]=1,C[e+504>>2]=w(ie),e=t[e+944>>2]|0}while((e|0)!=0)}function ac(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-4-u|0)>>>2)<<2)),_t(r))}function fi(e){return e=e|0,t[e+944>>2]|0}function $r(e){e=e|0,qu(e,(t[e+964>>2]|0)!=0,2832),Qn(e)}function Zl(e){return e=e|0,(p[e+984>>0]|0)!=0|0}function oa(e,n){e=e|0,n=n|0,gL(e,n,400)|0&&(gr(e|0,n|0,400)|0,Qn(e))}function pf(e){e=e|0;var n=Tt;return n=w(C[e+44>>2]),e=Ne(n)|0,w(e?w(0):n)}function bs(e){e=e|0;var n=Tt;return n=w(C[e+48>>2]),Ne(n)|0&&(n=p[(t[e+976>>2]|0)+2>>0]|0?w(1):w(0)),w(n)}function ba(e,n){e=e|0,n=n|0,t[e+980>>2]=n}function Bs(e){return e=e|0,t[e+980>>2]|0}function y0(e,n){e=e|0,n=n|0;var r=0;r=e+4|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function Us(e){return e=e|0,t[e+4>>2]|0}function ji(e,n){e=e|0,n=n|0;var r=0;r=e+8|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function B(e){return e=e|0,t[e+8>>2]|0}function z(e,n){e=e|0,n=n|0;var r=0;r=e+12|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function G(e){return e=e|0,t[e+12>>2]|0}function $(e,n){e=e|0,n=n|0;var r=0;r=e+16|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function Te(e){return e=e|0,t[e+16>>2]|0}function ge(e,n){e=e|0,n=n|0;var r=0;r=e+20|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function Re(e){return e=e|0,t[e+20>>2]|0}function Z(e,n){e=e|0,n=n|0;var r=0;r=e+24|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function ke(e){return e=e|0,t[e+24>>2]|0}function Qe(e,n){e=e|0,n=n|0;var r=0;r=e+28|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function ht(e){return e=e|0,t[e+28>>2]|0}function ue(e,n){e=e|0,n=n|0;var r=0;r=e+32|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function He(e){return e=e|0,t[e+32>>2]|0}function nt(e,n){e=e|0,n=n|0;var r=0;r=e+36|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Qn(e))}function Ct(e){return e=e|0,t[e+36>>2]|0}function Mt(e,n){e=e|0,n=w(n);var r=0;r=e+40|0,w(C[r>>2])!=n&&(C[r>>2]=n,Qn(e))}function It(e,n){e=e|0,n=w(n);var r=0;r=e+44|0,w(C[r>>2])!=n&&(C[r>>2]=n,Qn(e))}function sn(e,n){e=e|0,n=w(n);var r=0;r=e+48|0,w(C[r>>2])!=n&&(C[r>>2]=n,Qn(e))}function rn(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=(s^1)&1,u=e+52|0,l=e+56|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function Lt(e,n){e=e|0,n=w(n);var r=0,u=0;u=e+52|0,r=e+56|0,(w(C[u>>2])==n?(t[r>>2]|0)==2:0)||(C[u>>2]=n,u=Ne(n)|0,t[r>>2]=u?3:2,Qn(e))}function Dn(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+52|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function dr(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Ne(r)|0,u=(s^1)&1,l=e+132+(n<<3)|0,n=e+132+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Qn(e))}function er(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Ne(r)|0,u=s?0:2,l=e+132+(n<<3)|0,n=e+132+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Qn(e))}function Cr(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=n+132+(r<<3)|0,n=t[u+4>>2]|0,r=e,t[r>>2]=t[u>>2],t[r+4>>2]=n}function An(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Ne(r)|0,u=(s^1)&1,l=e+60+(n<<3)|0,n=e+60+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Qn(e))}function Nr(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Ne(r)|0,u=s?0:2,l=e+60+(n<<3)|0,n=e+60+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Qn(e))}function g0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=n+60+(r<<3)|0,n=t[u+4>>2]|0,r=e,t[r>>2]=t[u>>2],t[r+4>>2]=n}function Lr(e,n){e=e|0,n=n|0;var r=0;r=e+60+(n<<3)+4|0,(t[r>>2]|0)!=3&&(C[e+60+(n<<3)>>2]=w(ie),t[r>>2]=3,Qn(e))}function it(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Ne(r)|0,u=(s^1)&1,l=e+204+(n<<3)|0,n=e+204+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Qn(e))}function Dt(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Ne(r)|0,u=s?0:2,l=e+204+(n<<3)|0,n=e+204+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Qn(e))}function $e(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=n+204+(r<<3)|0,n=t[u+4>>2]|0,r=e,t[r>>2]=t[u>>2],t[r+4>>2]=n}function Pt(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Ne(r)|0,u=(s^1)&1,l=e+276+(n<<3)|0,n=e+276+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Qn(e))}function un(e,n){return e=e|0,n=n|0,w(C[e+276+(n<<3)>>2])}function fn(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=(s^1)&1,u=e+348|0,l=e+352|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function Jn(e,n){e=e|0,n=w(n);var r=0,u=0;u=e+348|0,r=e+352|0,(w(C[u>>2])==n?(t[r>>2]|0)==2:0)||(C[u>>2]=n,u=Ne(n)|0,t[r>>2]=u?3:2,Qn(e))}function wr(e){e=e|0;var n=0;n=e+352|0,(t[n>>2]|0)!=3&&(C[e+348>>2]=w(ie),t[n>>2]=3,Qn(e))}function au(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+348|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function Nu(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=(s^1)&1,u=e+356|0,l=e+360|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function T0(e,n){e=e|0,n=w(n);var r=0,u=0;u=e+356|0,r=e+360|0,(w(C[u>>2])==n?(t[r>>2]|0)==2:0)||(C[u>>2]=n,u=Ne(n)|0,t[r>>2]=u?3:2,Qn(e))}function J0(e){e=e|0;var n=0;n=e+360|0,(t[n>>2]|0)!=3&&(C[e+356>>2]=w(ie),t[n>>2]=3,Qn(e))}function Lu(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+356|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function _i(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=(s^1)&1,u=e+364|0,l=e+368|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function Fo(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=s?0:2,u=e+364|0,l=e+368|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function nl(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+364|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function hf(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=(s^1)&1,u=e+372|0,l=e+376|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function Sl(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=s?0:2,u=e+372|0,l=e+376|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function vf(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+372|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function Po(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=(s^1)&1,u=e+380|0,l=e+384|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function ys(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=s?0:2,u=e+380|0,l=e+384|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function js(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+380|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function Io(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=(s^1)&1,u=e+388|0,l=e+392|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function bo(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Ne(n)|0,r=s?0:2,u=e+388|0,l=e+392|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Qn(e))}function gs(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+388|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function Qu(e,n){e=e|0,n=w(n);var r=0;r=e+396|0,w(C[r>>2])!=n&&(C[r>>2]=n,Qn(e))}function Tu(e){return e=e|0,w(C[e+396>>2])}function Ei(e){return e=e|0,w(C[e+400>>2])}function C0(e){return e=e|0,w(C[e+404>>2])}function Z0(e){return e=e|0,w(C[e+408>>2])}function Bo(e){return e=e|0,w(C[e+412>>2])}function la(e){return e=e|0,w(C[e+416>>2])}function $l(e){return e=e|0,w(C[e+420>>2])}function tu(e,n){switch(e=e|0,n=n|0,qu(e,(n|0)<6,2918),n|0){case 0:{n=(t[e+496>>2]|0)==2?5:4;break}case 2:{n=(t[e+496>>2]|0)==2?4:5;break}default:}return w(C[e+424+(n<<2)>>2])}function ei(e,n){switch(e=e|0,n=n|0,qu(e,(n|0)<6,2918),n|0){case 0:{n=(t[e+496>>2]|0)==2?5:4;break}case 2:{n=(t[e+496>>2]|0)==2?4:5;break}default:}return w(C[e+448+(n<<2)>>2])}function po(e,n){switch(e=e|0,n=n|0,qu(e,(n|0)<6,2918),n|0){case 0:{n=(t[e+496>>2]|0)==2?5:4;break}case 2:{n=(t[e+496>>2]|0)==2?4:5;break}default:}return w(C[e+472+(n<<2)>>2])}function Bi(e,n){e=e|0,n=n|0;var r=0,u=Tt;return r=t[e+4>>2]|0,(r|0)==(t[n+4>>2]|0)?r?(u=w(C[e>>2]),e=w(Ft(w(u-w(C[n>>2]))))>2]=0,t[u+4>>2]=0,t[u+8>>2]=0,X0(u|0,e|0,n|0,0),pr(e,3,(p[u+11>>0]|0)<0?t[u>>2]|0:u,r),zL(u),m=r}function $0(e,n,r,u){e=w(e),n=w(n),r=r|0,u=u|0;var l=Tt;e=w(e*n),l=w(OE(e,w(1)));do if(Ci(l,w(0))|0)e=w(e-l);else{if(e=w(e-l),Ci(l,w(1))|0){e=w(e+w(1));break}if(r){e=w(e+w(1));break}u||(l>w(.5)?l=w(1):(u=Ci(l,w(.5))|0,l=w(u?1:0)),e=w(e+l))}while(0);return w(e/n)}function eo(e,n,r,u,l,s,h,D,S,N,M,I,K){e=e|0,n=w(n),r=r|0,u=w(u),l=l|0,s=w(s),h=h|0,D=w(D),S=w(S),N=w(N),M=w(M),I=w(I),K=K|0;var be=0,Se=Tt,ye=Tt,Je=Tt,Ge=Tt,ft=Tt,Me=Tt;return S>2]),Se!=w(0)):0)?(Je=w($0(n,Se,0,0)),Ge=w($0(u,Se,0,0)),ye=w($0(s,Se,0,0)),Se=w($0(D,Se,0,0))):(ye=s,Je=n,Se=D,Ge=u),(l|0)==(e|0)?be=Ci(ye,Je)|0:be=0,(h|0)==(r|0)?K=Ci(Se,Ge)|0:K=0,((be?0:(ft=w(n-M),!(Ce(e,ft,S)|0)))?!(et(e,ft,l,S)|0):0)?be=Ye(e,ft,l,s,S)|0:be=1,((K?0:(Me=w(u-I),!(Ce(r,Me,N)|0)))?!(et(r,Me,h,N)|0):0)?K=Ye(r,Me,h,D,N)|0:K=1,K=be&K),K|0}function Ce(e,n,r){return e=e|0,n=w(n),r=w(r),(e|0)==1?e=Ci(n,r)|0:e=0,e|0}function et(e,n,r,u){return e=e|0,n=w(n),r=r|0,u=w(u),(e|0)==2&(r|0)==0?n>=u?e=1:e=Ci(n,u)|0:e=0,e|0}function Ye(e,n,r,u,l){return e=e|0,n=w(n),r=r|0,u=w(u),l=w(l),(e|0)==2&(r|0)==2&u>n?l<=n?e=1:e=Ci(n,l)|0:e=0,e|0}function Yt(e,n,r,u,l,s,h,D,S,N,M){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=s|0,h=w(h),D=w(D),S=S|0,N=N|0,M=M|0;var I=0,K=0,be=0,Se=0,ye=Tt,Je=Tt,Ge=0,ft=0,Me=0,Pe=0,Zt=0,Br=0,In=0,gn=0,_r=0,Pr=0,Nn=0,uu=Tt,os=Tt,ls=Tt,ss=0,ea=0;Nn=m,m=m+160|0,gn=Nn+152|0,In=Nn+120|0,Br=Nn+104|0,Me=Nn+72|0,Se=Nn+56|0,Zt=Nn+8|0,ft=Nn,Pe=(t[2279]|0)+1|0,t[2279]=Pe,_r=e+984|0,((p[_r>>0]|0)!=0?(t[e+512>>2]|0)!=(t[2278]|0):0)?Ge=4:(t[e+516>>2]|0)==(u|0)?Pr=0:Ge=4,(Ge|0)==4&&(t[e+520>>2]=0,t[e+924>>2]=-1,t[e+928>>2]=-1,C[e+932>>2]=w(-1),C[e+936>>2]=w(-1),Pr=1);e:do if(t[e+964>>2]|0)if(ye=w(Kt(e,2,h)),Je=w(Kt(e,0,h)),I=e+916|0,ls=w(C[I>>2]),os=w(C[e+920>>2]),uu=w(C[e+932>>2]),eo(l,n,s,r,t[e+924>>2]|0,ls,t[e+928>>2]|0,os,uu,w(C[e+936>>2]),ye,Je,M)|0)Ge=22;else if(be=t[e+520>>2]|0,!be)Ge=21;else for(K=0;;){if(I=e+524+(K*24|0)|0,uu=w(C[I>>2]),os=w(C[e+524+(K*24|0)+4>>2]),ls=w(C[e+524+(K*24|0)+16>>2]),eo(l,n,s,r,t[e+524+(K*24|0)+8>>2]|0,uu,t[e+524+(K*24|0)+12>>2]|0,os,ls,w(C[e+524+(K*24|0)+20>>2]),ye,Je,M)|0){Ge=22;break e}if(K=K+1|0,K>>>0>=be>>>0){Ge=21;break}}else{if(S){if(I=e+916|0,!(Ci(w(C[I>>2]),n)|0)){Ge=21;break}if(!(Ci(w(C[e+920>>2]),r)|0)){Ge=21;break}if((t[e+924>>2]|0)!=(l|0)){Ge=21;break}I=(t[e+928>>2]|0)==(s|0)?I:0,Ge=22;break}if(be=t[e+520>>2]|0,!be)Ge=21;else for(K=0;;){if(I=e+524+(K*24|0)|0,((Ci(w(C[I>>2]),n)|0?Ci(w(C[e+524+(K*24|0)+4>>2]),r)|0:0)?(t[e+524+(K*24|0)+8>>2]|0)==(l|0):0)?(t[e+524+(K*24|0)+12>>2]|0)==(s|0):0){Ge=22;break e}if(K=K+1|0,K>>>0>=be>>>0){Ge=21;break}}}while(0);do if((Ge|0)==21)p[11697]|0?(I=0,Ge=28):(I=0,Ge=31);else if((Ge|0)==22){if(K=(p[11697]|0)!=0,!((I|0)!=0&(Pr^1)))if(K){Ge=28;break}else{Ge=31;break}Se=I+16|0,t[e+908>>2]=t[Se>>2],be=I+20|0,t[e+912>>2]=t[be>>2],(p[11698]|0)==0|K^1||(t[ft>>2]=Wr(Pe)|0,t[ft+4>>2]=Pe,pr(e,4,2972,ft),K=t[e+972>>2]|0,K|0&&F1[K&127](e),l=xn(l,S)|0,s=xn(s,S)|0,ea=+w(C[Se>>2]),ss=+w(C[be>>2]),t[Zt>>2]=l,t[Zt+4>>2]=s,U[Zt+8>>3]=+n,U[Zt+16>>3]=+r,U[Zt+24>>3]=ea,U[Zt+32>>3]=ss,t[Zt+40>>2]=N,pr(e,4,2989,Zt))}while(0);return(Ge|0)==28&&(K=Wr(Pe)|0,t[Se>>2]=K,t[Se+4>>2]=Pe,t[Se+8>>2]=Pr?3047:11699,pr(e,4,3038,Se),K=t[e+972>>2]|0,K|0&&F1[K&127](e),Zt=xn(l,S)|0,Ge=xn(s,S)|0,t[Me>>2]=Zt,t[Me+4>>2]=Ge,U[Me+8>>3]=+n,U[Me+16>>3]=+r,t[Me+24>>2]=N,pr(e,4,3049,Me),Ge=31),(Ge|0)==31&&(yu(e,n,r,u,l,s,h,D,S,M),p[11697]|0&&(K=t[2279]|0,Zt=Wr(K)|0,t[Br>>2]=Zt,t[Br+4>>2]=K,t[Br+8>>2]=Pr?3047:11699,pr(e,4,3083,Br),K=t[e+972>>2]|0,K|0&&F1[K&127](e),Zt=xn(l,S)|0,Br=xn(s,S)|0,ss=+w(C[e+908>>2]),ea=+w(C[e+912>>2]),t[In>>2]=Zt,t[In+4>>2]=Br,U[In+8>>3]=ss,U[In+16>>3]=ea,t[In+24>>2]=N,pr(e,4,3092,In)),t[e+516>>2]=u,I||(K=e+520|0,I=t[K>>2]|0,(I|0)==16&&(p[11697]|0&&pr(e,4,3124,gn),t[K>>2]=0,I=0),S?I=e+916|0:(t[K>>2]=I+1,I=e+524+(I*24|0)|0),C[I>>2]=n,C[I+4>>2]=r,t[I+8>>2]=l,t[I+12>>2]=s,t[I+16>>2]=t[e+908>>2],t[I+20>>2]=t[e+912>>2],I=0)),S&&(t[e+416>>2]=t[e+908>>2],t[e+420>>2]=t[e+912>>2],p[e+985>>0]=1,p[_r>>0]=0),t[2279]=(t[2279]|0)+-1,t[e+512>>2]=t[2278],m=Nn,Pr|(I|0)==0|0}function Kt(e,n,r){e=e|0,n=n|0,r=w(r);var u=Tt;return u=w(zi(e,n,r)),w(u+w(A0(e,n,r)))}function pr(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=m,m=m+16|0,l=s,t[l>>2]=u,e?u=t[e+976>>2]|0:u=0,zs(u,e,n,r,l),m=s}function Wr(e){return e=e|0,(e>>>0>60?3201:3201+(60-e)|0)|0}function xn(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;return l=m,m=m+32|0,r=l+12|0,u=l,t[r>>2]=t[254],t[r+4>>2]=t[255],t[r+8>>2]=t[256],t[u>>2]=t[257],t[u+4>>2]=t[258],t[u+8>>2]=t[259],(e|0)>2?e=11699:e=t[(n?u:r)+(e<<2)>>2]|0,m=l,e|0}function yu(e,n,r,u,l,s,h,D,S,N){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=s|0,h=w(h),D=w(D),S=S|0,N=N|0;var M=0,I=0,K=0,be=0,Se=Tt,ye=Tt,Je=Tt,Ge=Tt,ft=Tt,Me=Tt,Pe=Tt,Zt=0,Br=0,In=0,gn=Tt,_r=Tt,Pr=0,Nn=Tt,uu=0,os=0,ls=0,ss=0,ea=0,n2=0,r2=0,uf=0,i2=0,Fc=0,Pc=0,u2=0,o2=0,l2=0,vi=0,of=0,s2=0,Yf=0,a2=Tt,f2=Tt,Ic=Tt,bc=Tt,Kf=Tt,Hl=0,La=0,Ns=0,lf=0,I1=0,b1=Tt,Bc=Tt,B1=Tt,U1=Tt,ql=Tt,_l=Tt,sf=0,hu=Tt,j1=Tt,as=Tt,Xf=Tt,fs=Tt,Qf=Tt,z1=0,H1=0,Jf=Tt,Wl=Tt,af=0,q1=0,W1=0,V1=0,Sr=Tt,Bu=0,El=0,cs=0,Vl=0,Or=0,Bn=0,ff=0,mn=Tt,G1=0,f0=0;ff=m,m=m+16|0,Hl=ff+12|0,La=ff+8|0,Ns=ff+4|0,lf=ff,qu(e,(l|0)==0|(Ne(n)|0)^1,3326),qu(e,(s|0)==0|(Ne(r)|0)^1,3406),El=Cl(e,u)|0,t[e+496>>2]=El,Or=B0(2,El)|0,Bn=B0(0,El)|0,C[e+440>>2]=w(zi(e,Or,h)),C[e+444>>2]=w(A0(e,Or,h)),C[e+428>>2]=w(zi(e,Bn,h)),C[e+436>>2]=w(A0(e,Bn,h)),C[e+464>>2]=w(O0(e,Or)),C[e+468>>2]=w(ho(e,Or)),C[e+452>>2]=w(O0(e,Bn)),C[e+460>>2]=w(ho(e,Bn)),C[e+488>>2]=w(Pu(e,Or,h)),C[e+492>>2]=w(Zu(e,Or,h)),C[e+476>>2]=w(Pu(e,Bn,h)),C[e+484>>2]=w(Zu(e,Bn,h));do if(t[e+964>>2]|0)es(e,n,r,l,s,h,D);else{if(cs=e+948|0,Vl=(t[e+952>>2]|0)-(t[cs>>2]|0)>>2,!Vl){_s(e,n,r,l,s,h,D);break}if(S?0:aa(e,n,r,l,s,h,D)|0)break;ms(e),of=e+508|0,p[of>>0]=0,Or=B0(t[e+4>>2]|0,El)|0,Bn=gf(Or,El)|0,Bu=Hi(Or)|0,s2=t[e+8>>2]|0,q1=e+28|0,Yf=(t[q1>>2]|0)!=0,fs=Bu?h:D,Jf=Bu?D:h,a2=w($u(e,Or,h)),f2=w(Es(e,Or,h)),Se=w($u(e,Bn,h)),Qf=w(Rr(e,Or,h)),Wl=w(Rr(e,Bn,h)),In=Bu?l:s,af=Bu?s:l,Sr=Bu?Qf:Wl,ft=Bu?Wl:Qf,Xf=w(Kt(e,2,h)),Ge=w(Kt(e,0,h)),ye=w(w(Rn(e+364|0,h))-Sr),Je=w(w(Rn(e+380|0,h))-Sr),Me=w(w(Rn(e+372|0,D))-ft),Pe=w(w(Rn(e+388|0,D))-ft),Ic=Bu?ye:Me,bc=Bu?Je:Pe,Xf=w(n-Xf),n=w(Xf-Sr),Ne(n)|0?Sr=n:Sr=w(Ru(w(Xp(n,Je)),ye)),j1=w(r-Ge),n=w(j1-ft),Ne(n)|0?as=n:as=w(Ru(w(Xp(n,Pe)),Me)),ye=Bu?Sr:as,hu=Bu?as:Sr;e:do if((In|0)==1)for(u=0,I=0;;){if(M=Ti(e,I)|0,!u)(w(nu(M))>w(0)?w(fu(M))>w(0):0)?u=M:u=0;else if(to(M)|0){be=0;break e}if(I=I+1|0,I>>>0>=Vl>>>0){be=u;break}}else be=0;while(0);Zt=be+500|0,Br=be+504|0,u=0,M=0,n=w(0),K=0;do{if(I=t[(t[cs>>2]|0)+(K<<2)>>2]|0,(t[I+36>>2]|0)==1)Li(I),p[I+985>>0]=1,p[I+984>>0]=0;else{Jr(I),S&&x0(I,Cl(I,El)|0,ye,hu,Sr);do if((t[I+24>>2]|0)!=1)if((I|0)==(be|0)){t[Zt>>2]=t[2278],C[Br>>2]=w(0);break}else{ni(e,I,Sr,l,as,Sr,as,s,El,N);break}else M|0&&(t[M+960>>2]=I),t[I+960>>2]=0,M=I,u=(u|0)==0?I:u;while(0);_l=w(C[I+504>>2]),n=w(n+w(_l+w(Kt(I,Or,Sr))))}K=K+1|0}while((K|0)!=(Vl|0));for(ls=n>ye,sf=Yf&((In|0)==2&ls)?1:In,uu=(af|0)==1,ea=uu&(S^1),n2=(sf|0)==1,r2=(sf|0)==2,uf=976+(Or<<2)|0,i2=(af|2|0)==2,l2=uu&(Yf^1),Fc=1040+(Bn<<2)|0,Pc=1040+(Or<<2)|0,u2=976+(Bn<<2)|0,o2=(af|0)!=1,ls=Yf&((In|0)!=0&ls),os=e+976|0,uu=uu^1,n=ye,Pr=0,ss=0,_l=w(0),Kf=w(0);;){e:do if(Pr>>>0>>0)for(Br=t[cs>>2]|0,K=0,Pe=w(0),Me=w(0),Je=w(0),ye=w(0),I=0,M=0,be=Pr;;){if(Zt=t[Br+(be<<2)>>2]|0,(t[Zt+36>>2]|0)!=1?(t[Zt+940>>2]=ss,(t[Zt+24>>2]|0)!=1):0){if(Ge=w(Kt(Zt,Or,Sr)),vi=t[uf>>2]|0,r=w(Rn(Zt+380+(vi<<3)|0,fs)),ft=w(C[Zt+504>>2]),r=w(Xp(r,ft)),r=w(Ru(w(Rn(Zt+364+(vi<<3)|0,fs)),r)),Yf&(K|0)!=0&w(Ge+w(Me+r))>n){s=K,Ge=Pe,In=be;break e}Ge=w(Ge+r),r=w(Me+Ge),Ge=w(Pe+Ge),to(Zt)|0&&(Je=w(Je+w(nu(Zt))),ye=w(ye-w(ft*w(fu(Zt))))),M|0&&(t[M+960>>2]=Zt),t[Zt+960>>2]=0,K=K+1|0,M=Zt,I=(I|0)==0?Zt:I}else Ge=Pe,r=Me;if(be=be+1|0,be>>>0>>0)Pe=Ge,Me=r;else{s=K,In=be;break}}else s=0,Ge=w(0),Je=w(0),ye=w(0),I=0,In=Pr;while(0);vi=Je>w(0)&Jew(0)&yebc&((Ne(bc)|0)^1))n=bc,vi=51;else if(p[(t[os>>2]|0)+3>>0]|0)vi=51;else{if(gn!=w(0)?w(nu(e))!=w(0):0){vi=53;break}n=Ge,vi=53}while(0);if((vi|0)==51&&(vi=0,Ne(n)|0?vi=53:(_r=w(n-Ge),Nn=n)),(vi|0)==53&&(vi=0,Ge>2]|0,be=_rw(0),Me=w(_r/gn),Je=w(0),Ge=w(0),n=w(0),M=I;do r=w(Rn(M+380+(K<<3)|0,fs)),ye=w(Rn(M+364+(K<<3)|0,fs)),ye=w(Xp(r,w(Ru(ye,w(C[M+504>>2]))))),be?(r=w(ye*w(fu(M))),(r!=w(-0)?(mn=w(ye-w(ft*r)),b1=w(Kn(M,Or,mn,Nn,Sr)),mn!=b1):0)&&(Je=w(Je-w(b1-ye)),n=w(n+r))):((Zt?(Bc=w(nu(M)),Bc!=w(0)):0)?(mn=w(ye+w(Me*Bc)),B1=w(Kn(M,Or,mn,Nn,Sr)),mn!=B1):0)&&(Je=w(Je-w(B1-ye)),Ge=w(Ge-Bc)),M=t[M+960>>2]|0;while((M|0)!=0);if(n=w(Pe+n),ye=w(_r+Je),I1)n=w(0);else{ft=w(gn+Ge),be=t[uf>>2]|0,Zt=yew(0),ft=w(ye/ft),n=w(0);do{mn=w(Rn(I+380+(be<<3)|0,fs)),Je=w(Rn(I+364+(be<<3)|0,fs)),Je=w(Xp(mn,w(Ru(Je,w(C[I+504>>2]))))),Zt?(mn=w(Je*w(fu(I))),ye=w(-mn),mn!=w(-0)?(mn=w(Me*ye),ye=w(Kn(I,Or,w(Je+(Br?ye:mn)),Nn,Sr))):ye=Je):(K?(U1=w(nu(I)),U1!=w(0)):0)?ye=w(Kn(I,Or,w(Je+w(ft*U1)),Nn,Sr)):ye=Je,n=w(n-w(ye-Je)),Ge=w(Kt(I,Or,Sr)),r=w(Kt(I,Bn,Sr)),ye=w(ye+Ge),C[La>>2]=ye,t[lf>>2]=1,Je=w(C[I+396>>2]);e:do if(Ne(Je)|0){M=Ne(hu)|0;do if(!M){if(ls|(Wu(I,Bn,hu)|0|uu)||(e0(e,I)|0)!=4||(t[(_0(I,Bn)|0)+4>>2]|0)==3||(t[(E0(I,Bn)|0)+4>>2]|0)==3)break;C[Hl>>2]=hu,t[Ns>>2]=1;break e}while(0);if(Wu(I,Bn,hu)|0){M=t[I+992+(t[u2>>2]<<2)>>2]|0,mn=w(r+w(Rn(M,hu))),C[Hl>>2]=mn,M=o2&(t[M+4>>2]|0)==2,t[Ns>>2]=((Ne(mn)|0|M)^1)&1;break}else{C[Hl>>2]=hu,t[Ns>>2]=M?0:2;break}}else mn=w(ye-Ge),gn=w(mn/Je),mn=w(Je*mn),t[Ns>>2]=1,C[Hl>>2]=w(r+(Bu?gn:mn));while(0);Fn(I,Or,Nn,Sr,lf,La),Fn(I,Bn,hu,Sr,Ns,Hl);do if(Wu(I,Bn,hu)|0?0:(e0(e,I)|0)==4){if((t[(_0(I,Bn)|0)+4>>2]|0)==3){M=0;break}M=(t[(E0(I,Bn)|0)+4>>2]|0)!=3}else M=0;while(0);mn=w(C[La>>2]),gn=w(C[Hl>>2]),G1=t[lf>>2]|0,f0=t[Ns>>2]|0,Yt(I,Bu?mn:gn,Bu?gn:mn,El,Bu?G1:f0,Bu?f0:G1,Sr,as,S&(M^1),3488,N)|0,p[of>>0]=p[of>>0]|p[I+508>>0],I=t[I+960>>2]|0}while((I|0)!=0)}}else n=w(0);if(n=w(_r+n),f0=n>0]=f0|k[of>>0],r2&n>w(0)?(M=t[uf>>2]|0,((t[e+364+(M<<3)+4>>2]|0)!=0?(ql=w(Rn(e+364+(M<<3)|0,fs)),ql>=w(0)):0)?ye=w(Ru(w(0),w(ql-w(Nn-n)))):ye=w(0)):ye=n,Zt=Pr>>>0>>0,Zt){be=t[cs>>2]|0,K=Pr,M=0;do I=t[be+(K<<2)>>2]|0,t[I+24>>2]|0||(M=((t[(_0(I,Or)|0)+4>>2]|0)==3&1)+M|0,M=M+((t[(E0(I,Or)|0)+4>>2]|0)==3&1)|0),K=K+1|0;while((K|0)!=(In|0));M?(Ge=w(0),r=w(0)):vi=101}else vi=101;e:do if((vi|0)==101)switch(vi=0,s2|0){case 1:{M=0,Ge=w(ye*w(.5)),r=w(0);break e}case 2:{M=0,Ge=ye,r=w(0);break e}case 3:{if(s>>>0<=1){M=0,Ge=w(0),r=w(0);break e}r=w((s+-1|0)>>>0),M=0,Ge=w(0),r=w(w(Ru(ye,w(0)))/r);break e}case 5:{r=w(ye/w((s+1|0)>>>0)),M=0,Ge=r;break e}case 4:{r=w(ye/w(s>>>0)),M=0,Ge=w(r*w(.5));break e}default:{M=0,Ge=w(0),r=w(0);break e}}while(0);if(n=w(a2+Ge),Zt){Je=w(ye/w(M|0)),K=t[cs>>2]|0,I=Pr,ye=w(0);do{M=t[K+(I<<2)>>2]|0;e:do if((t[M+36>>2]|0)!=1){switch(t[M+24>>2]|0){case 1:{if(ae(M,Or)|0){if(!S)break e;mn=w(re(M,Or,Nn)),mn=w(mn+w(O0(e,Or))),mn=w(mn+w(zi(M,Or,Sr))),C[M+400+(t[Pc>>2]<<2)>>2]=mn;break e}break}case 0:if(f0=(t[(_0(M,Or)|0)+4>>2]|0)==3,mn=w(Je+n),n=f0?mn:n,S&&(f0=M+400+(t[Pc>>2]<<2)|0,C[f0>>2]=w(n+w(C[f0>>2]))),f0=(t[(E0(M,Or)|0)+4>>2]|0)==3,mn=w(Je+n),n=f0?mn:n,ea){mn=w(r+w(Kt(M,Or,Sr))),ye=hu,n=w(n+w(mn+w(C[M+504>>2])));break e}else{n=w(n+w(r+w(Fe(M,Or,Sr)))),ye=w(Ru(ye,w(Fe(M,Bn,Sr))));break e}default:}S&&(mn=w(Ge+w(O0(e,Or))),f0=M+400+(t[Pc>>2]<<2)|0,C[f0>>2]=w(mn+w(C[f0>>2])))}while(0);I=I+1|0}while((I|0)!=(In|0))}else ye=w(0);if(r=w(f2+n),i2?Ge=w(w(Kn(e,Bn,w(Wl+ye),Jf,h))-Wl):Ge=hu,Je=w(w(Kn(e,Bn,w(Wl+(l2?hu:ye)),Jf,h))-Wl),Zt&S){I=Pr;do{K=t[(t[cs>>2]|0)+(I<<2)>>2]|0;do if((t[K+36>>2]|0)!=1){if((t[K+24>>2]|0)==1){if(ae(K,Bn)|0){if(mn=w(re(K,Bn,hu)),mn=w(mn+w(O0(e,Bn))),mn=w(mn+w(zi(K,Bn,Sr))),M=t[Fc>>2]|0,C[K+400+(M<<2)>>2]=mn,!(Ne(mn)|0))break}else M=t[Fc>>2]|0;mn=w(O0(e,Bn)),C[K+400+(M<<2)>>2]=w(mn+w(zi(K,Bn,Sr)));break}M=e0(e,K)|0;do if((M|0)==4){if((t[(_0(K,Bn)|0)+4>>2]|0)==3){vi=139;break}if((t[(E0(K,Bn)|0)+4>>2]|0)==3){vi=139;break}if(Wu(K,Bn,hu)|0){n=Se;break}G1=t[K+908+(t[uf>>2]<<2)>>2]|0,t[Hl>>2]=G1,n=w(C[K+396>>2]),f0=Ne(n)|0,ye=(t[W>>2]=G1,w(C[W>>2])),f0?n=Je:(_r=w(Kt(K,Bn,Sr)),mn=w(ye/n),n=w(n*ye),n=w(_r+(Bu?mn:n))),C[La>>2]=n,C[Hl>>2]=w(w(Kt(K,Or,Sr))+ye),t[Ns>>2]=1,t[lf>>2]=1,Fn(K,Or,Nn,Sr,Ns,Hl),Fn(K,Bn,hu,Sr,lf,La),n=w(C[Hl>>2]),_r=w(C[La>>2]),mn=Bu?n:_r,n=Bu?_r:n,f0=((Ne(mn)|0)^1)&1,Yt(K,mn,n,El,f0,((Ne(n)|0)^1)&1,Sr,as,1,3493,N)|0,n=Se}else vi=139;while(0);e:do if((vi|0)==139){vi=0,n=w(Ge-w(Fe(K,Bn,Sr)));do if((t[(_0(K,Bn)|0)+4>>2]|0)==3){if((t[(E0(K,Bn)|0)+4>>2]|0)!=3)break;n=w(Se+w(Ru(w(0),w(n*w(.5)))));break e}while(0);if((t[(E0(K,Bn)|0)+4>>2]|0)==3){n=Se;break}if((t[(_0(K,Bn)|0)+4>>2]|0)==3){n=w(Se+w(Ru(w(0),n)));break}switch(M|0){case 1:{n=Se;break e}case 2:{n=w(Se+w(n*w(.5)));break e}default:{n=w(Se+n);break e}}}while(0);mn=w(_l+n),f0=K+400+(t[Fc>>2]<<2)|0,C[f0>>2]=w(mn+w(C[f0>>2]))}while(0);I=I+1|0}while((I|0)!=(In|0))}if(_l=w(_l+Je),Kf=w(Ru(Kf,r)),s=ss+1|0,In>>>0>=Vl>>>0)break;n=Nn,Pr=In,ss=s}do if(S){if(M=s>>>0>1,M?0:!(Ae(e)|0))break;if(!(Ne(hu)|0)){n=w(hu-_l);e:do switch(t[e+12>>2]|0){case 3:{Se=w(Se+n),Me=w(0);break}case 2:{Se=w(Se+w(n*w(.5))),Me=w(0);break}case 4:{hu>_l?Me=w(n/w(s>>>0)):Me=w(0);break}case 7:if(hu>_l){Se=w(Se+w(n/w(s<<1>>>0))),Me=w(n/w(s>>>0)),Me=M?Me:w(0);break e}else{Se=w(Se+w(n*w(.5))),Me=w(0);break e}case 6:{Me=w(n/w(ss>>>0)),Me=hu>_l&M?Me:w(0);break}default:Me=w(0)}while(0);if(s|0)for(Zt=1040+(Bn<<2)|0,Br=976+(Bn<<2)|0,be=0,I=0;;){e:do if(I>>>0>>0)for(ye=w(0),Je=w(0),n=w(0),K=I;;){M=t[(t[cs>>2]|0)+(K<<2)>>2]|0;do if((t[M+36>>2]|0)!=1?(t[M+24>>2]|0)==0:0){if((t[M+940>>2]|0)!=(be|0))break e;if(st(M,Bn)|0&&(mn=w(C[M+908+(t[Br>>2]<<2)>>2]),n=w(Ru(n,w(mn+w(Kt(M,Bn,Sr)))))),(e0(e,M)|0)!=5)break;ql=w(vt(M)),ql=w(ql+w(zi(M,0,Sr))),mn=w(C[M+912>>2]),mn=w(w(mn+w(Kt(M,0,Sr)))-ql),ql=w(Ru(Je,ql)),mn=w(Ru(ye,mn)),ye=mn,Je=ql,n=w(Ru(n,w(ql+mn)))}while(0);if(M=K+1|0,M>>>0>>0)K=M;else{K=M;break}}else Je=w(0),n=w(0),K=I;while(0);if(ft=w(Me+n),r=Se,Se=w(Se+ft),I>>>0>>0){Ge=w(r+Je),M=I;do{I=t[(t[cs>>2]|0)+(M<<2)>>2]|0;e:do if((t[I+36>>2]|0)!=1?(t[I+24>>2]|0)==0:0)switch(e0(e,I)|0){case 1:{mn=w(r+w(zi(I,Bn,Sr))),C[I+400+(t[Zt>>2]<<2)>>2]=mn;break e}case 3:{mn=w(w(Se-w(A0(I,Bn,Sr)))-w(C[I+908+(t[Br>>2]<<2)>>2])),C[I+400+(t[Zt>>2]<<2)>>2]=mn;break e}case 2:{mn=w(r+w(w(ft-w(C[I+908+(t[Br>>2]<<2)>>2]))*w(.5))),C[I+400+(t[Zt>>2]<<2)>>2]=mn;break e}case 4:{if(mn=w(r+w(zi(I,Bn,Sr))),C[I+400+(t[Zt>>2]<<2)>>2]=mn,Wu(I,Bn,hu)|0||(Bu?(ye=w(C[I+908>>2]),n=w(ye+w(Kt(I,Or,Sr))),Je=ft):(Je=w(C[I+912>>2]),Je=w(Je+w(Kt(I,Bn,Sr))),n=ft,ye=w(C[I+908>>2])),Ci(n,ye)|0?Ci(Je,w(C[I+912>>2]))|0:0))break e;Yt(I,n,Je,El,1,1,Sr,as,1,3501,N)|0;break e}case 5:{C[I+404>>2]=w(w(Ge-w(vt(I)))+w(re(I,0,hu)));break e}default:break e}while(0);M=M+1|0}while((M|0)!=(K|0))}if(be=be+1|0,(be|0)==(s|0))break;I=K}}}while(0);if(C[e+908>>2]=w(Kn(e,2,Xf,h,h)),C[e+912>>2]=w(Kn(e,0,j1,D,h)),((sf|0)!=0?(z1=t[e+32>>2]|0,H1=(sf|0)==2,!(H1&(z1|0)!=2)):0)?H1&(z1|0)==2&&(n=w(Qf+Nn),n=w(Ru(w(Xp(n,w(Qt(e,Or,Kf,fs)))),Qf)),vi=198):(n=w(Kn(e,Or,Kf,fs,h)),vi=198),(vi|0)==198&&(C[e+908+(t[976+(Or<<2)>>2]<<2)>>2]=n),((af|0)!=0?(W1=t[e+32>>2]|0,V1=(af|0)==2,!(V1&(W1|0)!=2)):0)?V1&(W1|0)==2&&(n=w(Wl+hu),n=w(Ru(w(Xp(n,w(Qt(e,Bn,w(Wl+_l),Jf)))),Wl)),vi=204):(n=w(Kn(e,Bn,w(Wl+_l),Jf,h)),vi=204),(vi|0)==204&&(C[e+908+(t[976+(Bn<<2)>>2]<<2)>>2]=n),S){if((t[q1>>2]|0)==2){I=976+(Bn<<2)|0,K=1040+(Bn<<2)|0,M=0;do be=Ti(e,M)|0,t[be+24>>2]|0||(G1=t[I>>2]|0,mn=w(C[e+908+(G1<<2)>>2]),f0=be+400+(t[K>>2]<<2)|0,mn=w(mn-w(C[f0>>2])),C[f0>>2]=w(mn-w(C[be+908+(G1<<2)>>2]))),M=M+1|0;while((M|0)!=(Vl|0))}if(u|0){M=Bu?sf:l;do On(e,u,Sr,M,as,El,N),u=t[u+960>>2]|0;while((u|0)!=0)}if(M=(Or|2|0)==3,I=(Bn|2|0)==3,M|I){u=0;do K=t[(t[cs>>2]|0)+(u<<2)>>2]|0,(t[K+36>>2]|0)!=1&&(M&&Sn(e,K,Or),I&&Sn(e,K,Bn)),u=u+1|0;while((u|0)!=(Vl|0))}}}while(0);m=ff}function Ju(e,n){e=e|0,n=w(n);var r=0;Cn(e,n>=w(0),3147),r=n==w(0),C[e+4>>2]=r?w(0):n}function ti(e,n,r,u){e=e|0,n=w(n),r=w(r),u=u|0;var l=Tt,s=Tt,h=0,D=0,S=0;t[2278]=(t[2278]|0)+1,Jr(e),Wu(e,2,n)|0?(l=w(Rn(t[e+992>>2]|0,n)),S=1,l=w(l+w(Kt(e,2,n)))):(l=w(Rn(e+380|0,n)),l>=w(0)?S=2:(S=((Ne(n)|0)^1)&1,l=n)),Wu(e,0,r)|0?(s=w(Rn(t[e+996>>2]|0,r)),D=1,s=w(s+w(Kt(e,0,n)))):(s=w(Rn(e+388|0,r)),s>=w(0)?D=2:(D=((Ne(r)|0)^1)&1,s=r)),h=e+976|0,(Yt(e,l,s,u,S,D,n,r,1,3189,t[h>>2]|0)|0?(x0(e,t[e+496>>2]|0,n,r,n),Fu(e,w(C[(t[h>>2]|0)+4>>2]),w(0),w(0)),p[11696]|0):0)&&mf(e,7)}function Jr(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;D=m,m=m+32|0,h=D+24|0,s=D+16|0,u=D+8|0,l=D,r=0;do n=e+380+(r<<3)|0,((t[e+380+(r<<3)+4>>2]|0)!=0?(S=n,N=t[S+4>>2]|0,M=u,t[M>>2]=t[S>>2],t[M+4>>2]=N,M=e+364+(r<<3)|0,N=t[M+4>>2]|0,S=l,t[S>>2]=t[M>>2],t[S+4>>2]=N,t[s>>2]=t[u>>2],t[s+4>>2]=t[u+4>>2],t[h>>2]=t[l>>2],t[h+4>>2]=t[l+4>>2],Bi(s,h)|0):0)||(n=e+348+(r<<3)|0),t[e+992+(r<<2)>>2]=n,r=r+1|0;while((r|0)!=2);m=D}function Wu(e,n,r){e=e|0,n=n|0,r=w(r);var u=0;switch(e=t[e+992+(t[976+(n<<2)>>2]<<2)>>2]|0,t[e+4>>2]|0){case 0:case 3:{e=0;break}case 1:{w(C[e>>2])>2])>2]|0){case 2:{n=w(w(w(C[e>>2])*n)/w(100));break}case 1:{n=w(C[e>>2]);break}default:n=w(ie)}return w(n)}function x0(e,n,r,u,l){e=e|0,n=n|0,r=w(r),u=w(u),l=w(l);var s=0,h=Tt;n=t[e+944>>2]|0?n:1,s=B0(t[e+4>>2]|0,n)|0,n=gf(s,n)|0,r=w(Ar(e,s,r)),u=w(Ar(e,n,u)),h=w(r+w(zi(e,s,l))),C[e+400+(t[1040+(s<<2)>>2]<<2)>>2]=h,r=w(r+w(A0(e,s,l))),C[e+400+(t[1e3+(s<<2)>>2]<<2)>>2]=r,r=w(u+w(zi(e,n,l))),C[e+400+(t[1040+(n<<2)>>2]<<2)>>2]=r,l=w(u+w(A0(e,n,l))),C[e+400+(t[1e3+(n<<2)>>2]<<2)>>2]=l}function Fu(e,n,r,u){e=e|0,n=w(n),r=w(r),u=w(u);var l=0,s=0,h=Tt,D=Tt,S=0,N=0,M=Tt,I=0,K=Tt,be=Tt,Se=Tt,ye=Tt;if(n!=w(0)&&(l=e+400|0,ye=w(C[l>>2]),s=e+404|0,Se=w(C[s>>2]),I=e+416|0,be=w(C[I>>2]),N=e+420|0,h=w(C[N>>2]),K=w(ye+r),M=w(Se+u),u=w(K+be),D=w(M+h),S=(t[e+988>>2]|0)==1,C[l>>2]=w($0(ye,n,0,S)),C[s>>2]=w($0(Se,n,0,S)),r=w(OE(w(be*n),w(1))),Ci(r,w(0))|0?s=0:s=(Ci(r,w(1))|0)^1,r=w(OE(w(h*n),w(1))),Ci(r,w(0))|0?l=0:l=(Ci(r,w(1))|0)^1,ye=w($0(u,n,S&s,S&(s^1))),C[I>>2]=w(ye-w($0(K,n,0,S))),ye=w($0(D,n,S&l,S&(l^1))),C[N>>2]=w(ye-w($0(M,n,0,S))),s=(t[e+952>>2]|0)-(t[e+948>>2]|0)>>2,s|0)){l=0;do Fu(Ti(e,l)|0,n,K,M),l=l+1|0;while((l|0)!=(s|0))}}function li(e,n,r,u,l){switch(e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,r|0){case 5:case 0:{e=i8(t[489]|0,u,l)|0;break}default:e=bL(u,l)|0}return e|0}function Tl(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;l=m,m=m+16|0,s=l,t[s>>2]=u,zs(e,0,n,r,s),m=l}function zs(e,n,r,u,l){if(e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,e=e|0?e:956,C8[t[e+8>>2]&1](e,n,r,u,l)|0,(r|0)==5)$n();else return}function Vu(e,n,r){e=e|0,n=n|0,r=r|0,p[e+n>>0]=r&1}function sa(e,n){e=e|0,n=n|0;var r=0,u=0;t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,r=n+4|0,u=(t[r>>2]|0)-(t[n>>2]|0)>>2,u|0&&(Xi(e,u),Hs(e,t[n>>2]|0,t[r>>2]|0,u))}function Xi(e,n){e=e|0,n=n|0;var r=0;if((R0(e)|0)>>>0>>0&&hi(e),n>>>0>1073741823)$n();else{r=pn(n<<2)|0,t[e+4>>2]=r,t[e>>2]=r,t[e+8>>2]=r+(n<<2);return}}function Hs(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,u=e+4|0,e=r-n|0,(e|0)>0&&(gr(t[u>>2]|0,n|0,e|0)|0,t[u>>2]=(t[u>>2]|0)+(e>>>2<<2))}function R0(e){return e=e|0,1073741823}function zi(e,n,r){return e=e|0,n=n|0,r=w(r),(Hi(n)|0?(t[e+96>>2]|0)!=0:0)?e=e+92|0:e=dt(e+60|0,t[1040+(n<<2)>>2]|0,992)|0,w(rl(e,r))}function A0(e,n,r){return e=e|0,n=n|0,r=w(r),(Hi(n)|0?(t[e+104>>2]|0)!=0:0)?e=e+100|0:e=dt(e+60|0,t[1e3+(n<<2)>>2]|0,992)|0,w(rl(e,r))}function Hi(e){return e=e|0,(e|1|0)==3|0}function rl(e,n){return e=e|0,n=w(n),(t[e+4>>2]|0)==3?n=w(0):n=w(Rn(e,n)),w(n)}function Cl(e,n){return e=e|0,n=n|0,e=t[e>>2]|0,((e|0)==0?(n|0)>1?n:1:e)|0}function B0(e,n){e=e|0,n=n|0;var r=0;e:do if((n|0)==2){switch(e|0){case 2:{e=3;break e}case 3:break;default:{r=4;break e}}e=2}else r=4;while(0);return e|0}function O0(e,n){e=e|0,n=n|0;var r=Tt;return((Hi(n)|0?(t[e+312>>2]|0)!=0:0)?(r=w(C[e+308>>2]),r>=w(0)):0)||(r=w(Ru(w(C[(dt(e+276|0,t[1040+(n<<2)>>2]|0,992)|0)>>2]),w(0)))),w(r)}function ho(e,n){e=e|0,n=n|0;var r=Tt;return((Hi(n)|0?(t[e+320>>2]|0)!=0:0)?(r=w(C[e+316>>2]),r>=w(0)):0)||(r=w(Ru(w(C[(dt(e+276|0,t[1e3+(n<<2)>>2]|0,992)|0)>>2]),w(0)))),w(r)}function Pu(e,n,r){e=e|0,n=n|0,r=w(r);var u=Tt;return((Hi(n)|0?(t[e+240>>2]|0)!=0:0)?(u=w(Rn(e+236|0,r)),u>=w(0)):0)||(u=w(Ru(w(Rn(dt(e+204|0,t[1040+(n<<2)>>2]|0,992)|0,r)),w(0)))),w(u)}function Zu(e,n,r){e=e|0,n=n|0,r=w(r);var u=Tt;return((Hi(n)|0?(t[e+248>>2]|0)!=0:0)?(u=w(Rn(e+244|0,r)),u>=w(0)):0)||(u=w(Ru(w(Rn(dt(e+204|0,t[1e3+(n<<2)>>2]|0,992)|0,r)),w(0)))),w(u)}function es(e,n,r,u,l,s,h){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=w(s),h=w(h);var D=Tt,S=Tt,N=Tt,M=Tt,I=Tt,K=Tt,be=0,Se=0,ye=0;ye=m,m=m+16|0,be=ye,Se=e+964|0,qu(e,(t[Se>>2]|0)!=0,3519),D=w(Rr(e,2,n)),S=w(Rr(e,0,n)),N=w(Kt(e,2,n)),M=w(Kt(e,0,n)),Ne(n)|0?I=n:I=w(Ru(w(0),w(w(n-N)-D))),Ne(r)|0?K=r:K=w(Ru(w(0),w(w(r-M)-S))),(u|0)==1&(l|0)==1?(C[e+908>>2]=w(Kn(e,2,w(n-N),s,s)),n=w(Kn(e,0,w(r-M),h,s))):(x8[t[Se>>2]&1](be,e,I,u,K,l),I=w(D+w(C[be>>2])),K=w(n-N),C[e+908>>2]=w(Kn(e,2,(u|2|0)==2?I:K,s,s)),K=w(S+w(C[be+4>>2])),n=w(r-M),n=w(Kn(e,0,(l|2|0)==2?K:n,h,s))),C[e+912>>2]=n,m=ye}function _s(e,n,r,u,l,s,h){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=w(s),h=w(h);var D=Tt,S=Tt,N=Tt,M=Tt;N=w(Rr(e,2,s)),D=w(Rr(e,0,s)),M=w(Kt(e,2,s)),S=w(Kt(e,0,s)),n=w(n-M),C[e+908>>2]=w(Kn(e,2,(u|2|0)==2?N:n,s,s)),r=w(r-S),C[e+912>>2]=w(Kn(e,0,(l|2|0)==2?D:r,h,s))}function aa(e,n,r,u,l,s,h){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=w(s),h=w(h);var D=0,S=Tt,N=Tt;return D=(u|0)==2,((n<=w(0)&D?0:!(r<=w(0)&(l|0)==2))?!((u|0)==1&(l|0)==1):0)?e=0:(S=w(Kt(e,0,s)),N=w(Kt(e,2,s)),D=n>2]=w(Kn(e,2,D?w(0):n,s,s)),n=w(r-S),D=r>2]=w(Kn(e,0,D?w(0):n,h,s)),e=1),e|0}function gf(e,n){return e=e|0,n=n|0,_n(e)|0?e=B0(2,n)|0:e=0,e|0}function $u(e,n,r){return e=e|0,n=n|0,r=w(r),r=w(Pu(e,n,r)),w(r+w(O0(e,n)))}function Es(e,n,r){return e=e|0,n=n|0,r=w(r),r=w(Zu(e,n,r)),w(r+w(ho(e,n)))}function Rr(e,n,r){e=e|0,n=n|0,r=w(r);var u=Tt;return u=w($u(e,n,r)),w(u+w(Es(e,n,r)))}function to(e){return e=e|0,t[e+24>>2]|0?e=0:w(nu(e))!=w(0)?e=1:e=w(fu(e))!=w(0),e|0}function nu(e){e=e|0;var n=Tt;if(t[e+944>>2]|0){if(n=w(C[e+44>>2]),Ne(n)|0)return n=w(C[e+40>>2]),e=n>w(0)&((Ne(n)|0)^1),w(e?n:w(0))}else n=w(0);return w(n)}function fu(e){e=e|0;var n=Tt,r=0,u=Tt;do if(t[e+944>>2]|0){if(n=w(C[e+48>>2]),Ne(n)|0){if(r=p[(t[e+976>>2]|0)+2>>0]|0,r<<24>>24==0?(u=w(C[e+40>>2]),u>24?w(1):w(0)}}else n=w(0);while(0);return w(n)}function Li(e){e=e|0;var n=0,r=0;if(bv(e+400|0,0,540)|0,p[e+985>>0]=1,ms(e),r=Su(e)|0,r|0){n=e+948|0,e=0;do Li(t[(t[n>>2]|0)+(e<<2)>>2]|0),e=e+1|0;while((e|0)!=(r|0))}}function ni(e,n,r,u,l,s,h,D,S,N){e=e|0,n=n|0,r=w(r),u=u|0,l=w(l),s=w(s),h=w(h),D=D|0,S=S|0,N=N|0;var M=0,I=Tt,K=0,be=0,Se=Tt,ye=Tt,Je=0,Ge=Tt,ft=0,Me=Tt,Pe=0,Zt=0,Br=0,In=0,gn=0,_r=0,Pr=0,Nn=0,uu=0,os=0;uu=m,m=m+16|0,Br=uu+12|0,In=uu+8|0,gn=uu+4|0,_r=uu,Nn=B0(t[e+4>>2]|0,S)|0,Pe=Hi(Nn)|0,I=w(Rn(Tn(n)|0,Pe?s:h)),Zt=Wu(n,2,s)|0,Pr=Wu(n,0,h)|0;do if(Ne(I)|0?0:!(Ne(Pe?r:l)|0)){if(M=n+504|0,!(Ne(w(C[M>>2]))|0)&&(!(ir(t[n+976>>2]|0,0)|0)||(t[n+500>>2]|0)==(t[2278]|0)))break;C[M>>2]=w(Ru(I,w(Rr(n,Nn,s))))}else K=7;while(0);do if((K|0)==7){if(ft=Pe^1,!(ft|Zt^1)){h=w(Rn(t[n+992>>2]|0,s)),C[n+504>>2]=w(Ru(h,w(Rr(n,2,s))));break}if(!(Pe|Pr^1)){h=w(Rn(t[n+996>>2]|0,h)),C[n+504>>2]=w(Ru(h,w(Rr(n,0,s))));break}C[Br>>2]=w(ie),C[In>>2]=w(ie),t[gn>>2]=0,t[_r>>2]=0,Ge=w(Kt(n,2,s)),Me=w(Kt(n,0,s)),Zt?(Se=w(Ge+w(Rn(t[n+992>>2]|0,s))),C[Br>>2]=Se,t[gn>>2]=1,be=1):(be=0,Se=w(ie)),Pr?(I=w(Me+w(Rn(t[n+996>>2]|0,h))),C[In>>2]=I,t[_r>>2]=1,M=1):(M=0,I=w(ie)),K=t[e+32>>2]|0,Pe&(K|0)==2?K=2:(Ne(Se)|0?!(Ne(r)|0):0)&&(C[Br>>2]=r,t[gn>>2]=2,be=2,Se=r),(((K|0)==2&ft?0:Ne(I)|0)?!(Ne(l)|0):0)&&(C[In>>2]=l,t[_r>>2]=2,M=2,I=l),ye=w(C[n+396>>2]),Je=Ne(ye)|0;do if(Je)K=be;else{if((be|0)==1&ft){C[In>>2]=w(w(Se-Ge)/ye),t[_r>>2]=1,M=1,K=1;break}Pe&(M|0)==1?(C[Br>>2]=w(ye*w(I-Me)),t[gn>>2]=1,M=1,K=1):K=be}while(0);os=Ne(r)|0,be=(e0(e,n)|0)!=4,(Pe|Zt|((u|0)!=1|os)|(be|(K|0)==1)?0:(C[Br>>2]=r,t[gn>>2]=1,!Je))&&(C[In>>2]=w(w(r-Ge)/ye),t[_r>>2]=1,M=1),(Pr|ft|((D|0)!=1|(Ne(l)|0))|(be|(M|0)==1)?0:(C[In>>2]=l,t[_r>>2]=1,!Je))&&(C[Br>>2]=w(ye*w(l-Me)),t[gn>>2]=1),Fn(n,2,s,s,gn,Br),Fn(n,0,h,s,_r,In),r=w(C[Br>>2]),l=w(C[In>>2]),Yt(n,r,l,S,t[gn>>2]|0,t[_r>>2]|0,s,h,0,3565,N)|0,h=w(C[n+908+(t[976+(Nn<<2)>>2]<<2)>>2]),C[n+504>>2]=w(Ru(h,w(Rr(n,Nn,s))))}while(0);t[n+500>>2]=t[2278],m=uu}function Kn(e,n,r,u,l){return e=e|0,n=n|0,r=w(r),u=w(u),l=w(l),u=w(Qt(e,n,r,u)),w(Ru(u,w(Rr(e,n,l))))}function e0(e,n){return e=e|0,n=n|0,n=n+20|0,n=t[((t[n>>2]|0)==0?e+16|0:n)>>2]|0,((n|0)==5?_n(t[e+4>>2]|0)|0:0)&&(n=1),n|0}function _0(e,n){return e=e|0,n=n|0,(Hi(n)|0?(t[e+96>>2]|0)!=0:0)?n=4:n=t[1040+(n<<2)>>2]|0,e+60+(n<<3)|0}function E0(e,n){return e=e|0,n=n|0,(Hi(n)|0?(t[e+104>>2]|0)!=0:0)?n=5:n=t[1e3+(n<<2)>>2]|0,e+60+(n<<3)|0}function Fn(e,n,r,u,l,s){switch(e=e|0,n=n|0,r=w(r),u=w(u),l=l|0,s=s|0,r=w(Rn(e+380+(t[976+(n<<2)>>2]<<3)|0,r)),r=w(r+w(Kt(e,n,u))),t[l>>2]|0){case 2:case 1:{l=Ne(r)|0,u=w(C[s>>2]),C[s>>2]=l|u>2]=2,C[s>>2]=r);break}default:}}function ae(e,n){return e=e|0,n=n|0,e=e+132|0,(Hi(n)|0?(t[(dt(e,4,948)|0)+4>>2]|0)!=0:0)?e=1:e=(t[(dt(e,t[1040+(n<<2)>>2]|0,948)|0)+4>>2]|0)!=0,e|0}function re(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0;return e=e+132|0,(Hi(n)|0?(u=dt(e,4,948)|0,(t[u+4>>2]|0)!=0):0)?l=4:(u=dt(e,t[1040+(n<<2)>>2]|0,948)|0,t[u+4>>2]|0?l=4:r=w(0)),(l|0)==4&&(r=w(Rn(u,r))),w(r)}function Fe(e,n,r){e=e|0,n=n|0,r=w(r);var u=Tt;return u=w(C[e+908+(t[976+(n<<2)>>2]<<2)>>2]),u=w(u+w(zi(e,n,r))),w(u+w(A0(e,n,r)))}function Ae(e){e=e|0;var n=0,r=0,u=0;e:do if(_n(t[e+4>>2]|0)|0)n=0;else if((t[e+16>>2]|0)!=5)if(r=Su(e)|0,!r)n=0;else for(n=0;;){if(u=Ti(e,n)|0,(t[u+24>>2]|0)==0?(t[u+20>>2]|0)==5:0){n=1;break e}if(n=n+1|0,n>>>0>=r>>>0){n=0;break}}else n=1;while(0);return n|0}function st(e,n){e=e|0,n=n|0;var r=Tt;return r=w(C[e+908+(t[976+(n<<2)>>2]<<2)>>2]),r>=w(0)&((Ne(r)|0)^1)|0}function vt(e){e=e|0;var n=Tt,r=0,u=0,l=0,s=0,h=0,D=0,S=Tt;if(r=t[e+968>>2]|0,r)S=w(C[e+908>>2]),n=w(C[e+912>>2]),n=w(D8[r&0](e,S,n)),qu(e,(Ne(n)|0)^1,3573);else{s=Su(e)|0;do if(s|0){for(r=0,l=0;;){if(u=Ti(e,l)|0,t[u+940>>2]|0){h=8;break}if((t[u+24>>2]|0)!=1)if(D=(e0(e,u)|0)==5,D){r=u;break}else r=(r|0)==0?u:r;if(l=l+1|0,l>>>0>=s>>>0){h=8;break}}if((h|0)==8&&!r)break;return n=w(vt(r)),w(n+w(C[r+404>>2]))}while(0);n=w(C[e+912>>2])}return w(n)}function Qt(e,n,r,u){e=e|0,n=n|0,r=w(r),u=w(u);var l=Tt,s=0;return _n(n)|0?(n=1,s=3):Hi(n)|0?(n=0,s=3):(u=w(ie),l=w(ie)),(s|0)==3&&(l=w(Rn(e+364+(n<<3)|0,u)),u=w(Rn(e+380+(n<<3)|0,u))),s=u=w(0)&((Ne(u)|0)^1)),r=s?u:r,s=l>=w(0)&((Ne(l)|0)^1)&r>2]|0,s)|0,Se=gf(Je,s)|0,ye=Hi(Je)|0,I=w(Kt(n,2,r)),K=w(Kt(n,0,r)),Wu(n,2,r)|0?D=w(I+w(Rn(t[n+992>>2]|0,r))):(ae(n,2)|0?Bt(n,2)|0:0)?(D=w(C[e+908>>2]),S=w(O0(e,2)),S=w(D-w(S+w(ho(e,2)))),D=w(re(n,2,r)),D=w(Kn(n,2,w(S-w(D+w(Fi(n,2,r)))),r,r))):D=w(ie),Wu(n,0,l)|0?S=w(K+w(Rn(t[n+996>>2]|0,l))):(ae(n,0)|0?Bt(n,0)|0:0)?(S=w(C[e+912>>2]),ft=w(O0(e,0)),ft=w(S-w(ft+w(ho(e,0)))),S=w(re(n,0,l)),S=w(Kn(n,0,w(ft-w(S+w(Fi(n,0,l)))),l,r))):S=w(ie),N=Ne(D)|0,M=Ne(S)|0;do if(N^M?(be=w(C[n+396>>2]),!(Ne(be)|0)):0)if(N){D=w(I+w(w(S-K)*be));break}else{ft=w(K+w(w(D-I)/be)),S=M?ft:S;break}while(0);M=Ne(D)|0,N=Ne(S)|0,M|N&&(Me=(M^1)&1,u=r>w(0)&((u|0)!=0&M),D=ye?D:u?r:D,Yt(n,D,S,s,ye?Me:u?2:Me,M&(N^1)&1,D,S,0,3623,h)|0,D=w(C[n+908>>2]),D=w(D+w(Kt(n,2,r))),S=w(C[n+912>>2]),S=w(S+w(Kt(n,0,r)))),Yt(n,D,S,s,1,1,D,S,1,3635,h)|0,(Bt(n,Je)|0?!(ae(n,Je)|0):0)?(Me=t[976+(Je<<2)>>2]|0,ft=w(C[e+908+(Me<<2)>>2]),ft=w(ft-w(C[n+908+(Me<<2)>>2])),ft=w(ft-w(ho(e,Je))),ft=w(ft-w(A0(n,Je,r))),ft=w(ft-w(Fi(n,Je,ye?r:l))),C[n+400+(t[1040+(Je<<2)>>2]<<2)>>2]=ft):Ge=21;do if((Ge|0)==21){if(ae(n,Je)|0?0:(t[e+8>>2]|0)==1){Me=t[976+(Je<<2)>>2]|0,ft=w(C[e+908+(Me<<2)>>2]),ft=w(w(ft-w(C[n+908+(Me<<2)>>2]))*w(.5)),C[n+400+(t[1040+(Je<<2)>>2]<<2)>>2]=ft;break}(ae(n,Je)|0?0:(t[e+8>>2]|0)==2)&&(Me=t[976+(Je<<2)>>2]|0,ft=w(C[e+908+(Me<<2)>>2]),ft=w(ft-w(C[n+908+(Me<<2)>>2])),C[n+400+(t[1040+(Je<<2)>>2]<<2)>>2]=ft)}while(0);(Bt(n,Se)|0?!(ae(n,Se)|0):0)?(Me=t[976+(Se<<2)>>2]|0,ft=w(C[e+908+(Me<<2)>>2]),ft=w(ft-w(C[n+908+(Me<<2)>>2])),ft=w(ft-w(ho(e,Se))),ft=w(ft-w(A0(n,Se,r))),ft=w(ft-w(Fi(n,Se,ye?l:r))),C[n+400+(t[1040+(Se<<2)>>2]<<2)>>2]=ft):Ge=30;do if((Ge|0)==30?!(ae(n,Se)|0):0){if((e0(e,n)|0)==2){Me=t[976+(Se<<2)>>2]|0,ft=w(C[e+908+(Me<<2)>>2]),ft=w(w(ft-w(C[n+908+(Me<<2)>>2]))*w(.5)),C[n+400+(t[1040+(Se<<2)>>2]<<2)>>2]=ft;break}Me=(e0(e,n)|0)==3,Me^(t[e+28>>2]|0)==2&&(Me=t[976+(Se<<2)>>2]|0,ft=w(C[e+908+(Me<<2)>>2]),ft=w(ft-w(C[n+908+(Me<<2)>>2])),C[n+400+(t[1040+(Se<<2)>>2]<<2)>>2]=ft)}while(0)}function Sn(e,n,r){e=e|0,n=n|0,r=r|0;var u=Tt,l=0;l=t[976+(r<<2)>>2]|0,u=w(C[n+908+(l<<2)>>2]),u=w(w(C[e+908+(l<<2)>>2])-u),u=w(u-w(C[n+400+(t[1040+(r<<2)>>2]<<2)>>2])),C[n+400+(t[1e3+(r<<2)>>2]<<2)>>2]=u}function _n(e){return e=e|0,(e|1|0)==1|0}function Tn(e){e=e|0;var n=Tt;switch(t[e+56>>2]|0){case 0:case 3:{n=w(C[e+40>>2]),n>w(0)&((Ne(n)|0)^1)?e=p[(t[e+976>>2]|0)+2>>0]|0?1056:992:e=1056;break}default:e=e+52|0}return e|0}function ir(e,n){return e=e|0,n=n|0,(p[e+n>>0]|0)!=0|0}function Bt(e,n){return e=e|0,n=n|0,e=e+132|0,(Hi(n)|0?(t[(dt(e,5,948)|0)+4>>2]|0)!=0:0)?e=1:e=(t[(dt(e,t[1e3+(n<<2)>>2]|0,948)|0)+4>>2]|0)!=0,e|0}function Fi(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0;return e=e+132|0,(Hi(n)|0?(u=dt(e,5,948)|0,(t[u+4>>2]|0)!=0):0)?l=4:(u=dt(e,t[1e3+(n<<2)>>2]|0,948)|0,t[u+4>>2]|0?l=4:r=w(0)),(l|0)==4&&(r=w(Rn(u,r))),w(r)}function Ar(e,n,r){return e=e|0,n=n|0,r=w(r),ae(e,n)|0?r=w(re(e,n,r)):r=w(-w(Fi(e,n,r))),w(r)}function mr(e){return e=w(e),C[W>>2]=e,t[W>>2]|0|0}function Y(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>1073741823)$n();else{l=pn(n<<2)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<2)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<2)}function ri(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>2)<<2)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function ii(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-4-n|0)>>>2)<<2)),e=t[e>>2]|0,e|0&&_t(e)}function Vr(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;if(h=e+4|0,D=t[h>>2]|0,l=D-u|0,s=l>>2,e=n+(s<<2)|0,e>>>0>>0){u=D;do t[u>>2]=t[e>>2],e=e+4|0,u=(t[h>>2]|0)+4|0,t[h>>2]=u;while(e>>>0>>0)}s|0&&Ty(D+(0-s<<2)|0,n|0,l|0)|0}function at(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0;return D=n+4|0,S=t[D>>2]|0,l=t[e>>2]|0,h=r,s=h-l|0,u=S+(0-(s>>2)<<2)|0,t[D>>2]=u,(s|0)>0&&gr(u|0,l|0,s|0)|0,l=e+4|0,s=n+8|0,u=(t[l>>2]|0)-h|0,(u|0)>0&&(gr(t[s>>2]|0,r|0,u|0)|0,t[s>>2]=(t[s>>2]|0)+(u>>>2<<2)),h=t[e>>2]|0,t[e>>2]=t[D>>2],t[D>>2]=h,h=t[l>>2]|0,t[l>>2]=t[s>>2],t[s>>2]=h,h=e+8|0,r=n+12|0,e=t[h>>2]|0,t[h>>2]=t[r>>2],t[r>>2]=e,t[n>>2]=t[D>>2],S|0}function Di(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;if(h=t[n>>2]|0,s=t[r>>2]|0,(h|0)!=(s|0)){l=e+8|0,r=((s+-4-h|0)>>>2)+1|0,e=h,u=t[l>>2]|0;do t[u>>2]=t[e>>2],u=(t[l>>2]|0)+4|0,t[l>>2]=u,e=e+4|0;while((e|0)!=(s|0));t[n>>2]=h+(r<<2)}}function ru(){we()}function D0(){var e=0;return e=pn(4)|0,Un(e),e|0}function Un(e){e=e|0,t[e>>2]=m0()|0}function t0(e){e=e|0,e|0&&(no(e),_t(e))}function no(e){e=e|0,Q0(t[e>>2]|0)}function vo(e,n,r){e=e|0,n=n|0,r=r|0,Vu(t[e>>2]|0,n,r)}function n0(e,n){e=e|0,n=w(n),Ju(t[e>>2]|0,n)}function Uo(e,n){return e=e|0,n=n|0,ir(t[e>>2]|0,n)|0}function ro(){var e=0;return e=pn(8)|0,Ba(e,0),e|0}function Ba(e,n){e=e|0,n=n|0,n?n=Yn(t[n>>2]|0)|0:n=cr()|0,t[e>>2]=n,t[e+4>>2]=0,ba(n,e)}function _f(e){e=e|0;var n=0;return n=pn(8)|0,Ba(n,e),n|0}function fc(e){e=e|0,e|0&&(Ds(e),_t(e))}function Ds(e){e=e|0;var n=0;zu(t[e>>2]|0),n=e+4|0,e=t[n>>2]|0,t[n>>2]=0,e|0&&(fa(e),_t(e))}function fa(e){e=e|0,U0(e)}function U0(e){e=e|0,e=t[e>>2]|0,e|0&&qr(e|0)}function cc(e){return e=e|0,Bs(e)|0}function Ua(e){e=e|0;var n=0,r=0;r=e+4|0,n=t[r>>2]|0,t[r>>2]=0,n|0&&(fa(n),_t(n)),co(t[e>>2]|0)}function E2(e,n){e=e|0,n=n|0,oa(t[e>>2]|0,t[n>>2]|0)}function nd(e,n){e=e|0,n=n|0,Z(t[e>>2]|0,n)}function rd(e,n,r){e=e|0,n=n|0,r=+r,dr(t[e>>2]|0,n,w(r))}function mo(e,n,r){e=e|0,n=n|0,r=+r,er(t[e>>2]|0,n,w(r))}function Hc(e,n){e=e|0,n=n|0,z(t[e>>2]|0,n)}function xl(e,n){e=e|0,n=n|0,$(t[e>>2]|0,n)}function il(e,n){e=e|0,n=n|0,ge(t[e>>2]|0,n)}function D2(e,n){e=e|0,n=n|0,y0(t[e>>2]|0,n)}function qs(e,n){e=e|0,n=n|0,Qe(t[e>>2]|0,n)}function Rl(e,n){e=e|0,n=n|0,ji(t[e>>2]|0,n)}function id(e,n,r){e=e|0,n=n|0,r=+r,An(t[e>>2]|0,n,w(r))}function jo(e,n,r){e=e|0,n=n|0,r=+r,Nr(t[e>>2]|0,n,w(r))}function ja(e,n){e=e|0,n=n|0,Lr(t[e>>2]|0,n)}function za(e,n){e=e|0,n=n|0,ue(t[e>>2]|0,n)}function Ha(e,n){e=e|0,n=n|0,nt(t[e>>2]|0,n)}function ca(e,n){e=e|0,n=+n,Mt(t[e>>2]|0,w(n))}function ws(e,n){e=e|0,n=+n,rn(t[e>>2]|0,w(n))}function Ss(e,n){e=e|0,n=+n,Lt(t[e>>2]|0,w(n))}function ts(e,n){e=e|0,n=+n,It(t[e>>2]|0,w(n))}function zo(e,n){e=e|0,n=+n,sn(t[e>>2]|0,w(n))}function Ef(e,n){e=e|0,n=+n,fn(t[e>>2]|0,w(n))}function ul(e,n){e=e|0,n=+n,Jn(t[e>>2]|0,w(n))}function Gu(e){e=e|0,wr(t[e>>2]|0)}function qa(e,n){e=e|0,n=+n,Nu(t[e>>2]|0,w(n))}function r0(e,n){e=e|0,n=+n,T0(t[e>>2]|0,w(n))}function j0(e){e=e|0,J0(t[e>>2]|0)}function Df(e,n){e=e|0,n=+n,_i(t[e>>2]|0,w(n))}function qc(e,n){e=e|0,n=+n,Fo(t[e>>2]|0,w(n))}function dc(e,n){e=e|0,n=+n,hf(t[e>>2]|0,w(n))}function Al(e,n){e=e|0,n=+n,Sl(t[e>>2]|0,w(n))}function Ts(e,n){e=e|0,n=+n,Po(t[e>>2]|0,w(n))}function da(e,n){e=e|0,n=+n,ys(t[e>>2]|0,w(n))}function ud(e,n){e=e|0,n=+n,Io(t[e>>2]|0,w(n))}function pa(e,n){e=e|0,n=+n,bo(t[e>>2]|0,w(n))}function pc(e,n){e=e|0,n=+n,Qu(t[e>>2]|0,w(n))}function Wc(e,n,r){e=e|0,n=n|0,r=+r,Pt(t[e>>2]|0,n,w(r))}function qi(e,n,r){e=e|0,n=n|0,r=+r,it(t[e>>2]|0,n,w(r))}function g(e,n,r){e=e|0,n=n|0,r=+r,Dt(t[e>>2]|0,n,w(r))}function y(e){return e=e|0,ke(t[e>>2]|0)|0}function R(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;u=m,m=m+16|0,l=u,Cr(l,t[n>>2]|0,r),F(e,l),m=u}function F(e,n){e=e|0,n=n|0,b(e,t[n+4>>2]|0,+w(C[n>>2]))}function b(e,n,r){e=e|0,n=n|0,r=+r,t[e>>2]=n,U[e+8>>3]=r}function J(e){return e=e|0,G(t[e>>2]|0)|0}function ce(e){return e=e|0,Te(t[e>>2]|0)|0}function mt(e){return e=e|0,Re(t[e>>2]|0)|0}function xt(e){return e=e|0,Us(t[e>>2]|0)|0}function kt(e){return e=e|0,ht(t[e>>2]|0)|0}function xr(e){return e=e|0,B(t[e>>2]|0)|0}function i0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;u=m,m=m+16|0,l=u,g0(l,t[n>>2]|0,r),F(e,l),m=u}function cu(e){return e=e|0,He(t[e>>2]|0)|0}function z0(e){return e=e|0,Ct(t[e>>2]|0)|0}function Ol(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,Dn(u,t[n>>2]|0),F(e,u),m=r}function u0(e){return e=e|0,+ +w(pf(t[e>>2]|0))}function Ve(e){return e=e|0,+ +w(bs(t[e>>2]|0))}function Ue(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,au(u,t[n>>2]|0),F(e,u),m=r}function lt(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,Lu(u,t[n>>2]|0),F(e,u),m=r}function $t(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,nl(u,t[n>>2]|0),F(e,u),m=r}function Wn(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,vf(u,t[n>>2]|0),F(e,u),m=r}function si(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,js(u,t[n>>2]|0),F(e,u),m=r}function ur(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,gs(u,t[n>>2]|0),F(e,u),m=r}function ci(e){return e=e|0,+ +w(Tu(t[e>>2]|0))}function Qi(e,n){return e=e|0,n=n|0,+ +w(un(t[e>>2]|0,n))}function Gr(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;u=m,m=m+16|0,l=u,$e(l,t[n>>2]|0,r),F(e,l),m=u}function Cu(e,n,r){e=e|0,n=n|0,r=r|0,Ia(t[e>>2]|0,t[n>>2]|0,r)}function Wa(e,n){e=e|0,n=n|0,ku(t[e>>2]|0,t[n>>2]|0)}function Va(e){return e=e|0,Su(t[e>>2]|0)|0}function od(e){return e=e|0,e=fi(t[e>>2]|0)|0,e?e=cc(e)|0:e=0,e|0}function w2(e,n){return e=e|0,n=n|0,e=Ti(t[e>>2]|0,n)|0,e?e=cc(e)|0:e=0,e|0}function S2(e,n){e=e|0,n=n|0;var r=0,u=0;u=pn(4)|0,wf(u,n),r=e+4|0,n=t[r>>2]|0,t[r>>2]=u,n|0&&(fa(n),_t(n)),ua(t[e>>2]|0,1)}function wf(e,n){e=e|0,n=n|0,ll(e,n)}function ld(e,n,r,u,l,s){e=e|0,n=n|0,r=w(r),u=u|0,l=w(l),s=s|0;var h=0,D=0;h=m,m=m+16|0,D=h,ch(D,Bs(n)|0,+r,u,+l,s),C[e>>2]=w(+U[D>>3]),C[e+4>>2]=w(+U[D+8>>3]),m=h}function ch(e,n,r,u,l,s){e=e|0,n=n|0,r=+r,u=u|0,l=+l,s=s|0;var h=0,D=0,S=0,N=0,M=0;h=m,m=m+32|0,M=h+8|0,N=h+20|0,S=h,D=h+16|0,U[M>>3]=r,t[N>>2]=u,U[S>>3]=l,t[D>>2]=s,Vc(e,t[n+4>>2]|0,M,N,S,D),m=h}function Vc(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0;h=m,m=m+16|0,D=h,Ma(D),n=yo(n)|0,dh(e,n,+U[r>>3],t[u>>2]|0,+U[l>>3],t[s>>2]|0),ka(D),m=h}function yo(e){return e=e|0,t[e>>2]|0}function dh(e,n,r,u,l,s){e=e|0,n=n|0,r=+r,u=u|0,l=+l,s=s|0;var h=0;h=go(ph()|0)|0,r=+Ml(r),u=sd(u)|0,l=+Ml(l),ad(e,Qr(0,h|0,n|0,+r,u|0,+l,sd(s)|0)|0)}function ph(){var e=0;return p[7608]|0||(Yc(9120),e=7608,t[e>>2]=1,t[e+4>>2]=0),9120}function go(e){return e=e|0,t[e+8>>2]|0}function Ml(e){return e=+e,+ +Ga(e)}function sd(e){return e=e|0,cd(e)|0}function ad(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;l=m,m=m+32|0,r=l,u=n,u&1?(T2(r,0),eu(u|0,r|0)|0,Gc(e,r),Ir(r)):(t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=t[n+8>>2],t[e+12>>2]=t[n+12>>2]),m=l}function T2(e,n){e=e|0,n=n|0,fd(e,n),t[e+8>>2]=0,p[e+24>>0]=0}function Gc(e,n){e=e|0,n=n|0,n=n+8|0,t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=t[n+8>>2],t[e+12>>2]=t[n+12>>2]}function Ir(e){e=e|0,p[e+24>>0]=0}function fd(e,n){e=e|0,n=n|0,t[e>>2]=n}function cd(e){return e=e|0,e|0}function Ga(e){return e=+e,+e}function Yc(e){e=e|0,ol(e,C2()|0,4)}function C2(){return 1064}function ol(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r,t[e+8>>2]=bt(n|0,r+1|0)|0}function ll(e,n){e=e|0,n=n|0,n=t[n>>2]|0,t[e>>2]=n,Ri(n|0)}function hh(e){e=e|0;var n=0,r=0;r=e+4|0,n=t[r>>2]|0,t[r>>2]=0,n|0&&(fa(n),_t(n)),ua(t[e>>2]|0,0)}function Sf(e){e=e|0,$r(t[e>>2]|0)}function Kc(e){return e=e|0,Zl(t[e>>2]|0)|0}function x2(e,n,r,u){e=e|0,n=+n,r=+r,u=u|0,ti(t[e>>2]|0,w(n),w(r),u)}function vh(e){return e=e|0,+ +w(Ei(t[e>>2]|0))}function sl(e){return e=e|0,+ +w(Z0(t[e>>2]|0))}function ha(e){return e=e|0,+ +w(C0(t[e>>2]|0))}function R2(e){return e=e|0,+ +w(Bo(t[e>>2]|0))}function A2(e){return e=e|0,+ +w(la(t[e>>2]|0))}function hc(e){return e=e|0,+ +w($l(t[e>>2]|0))}function mh(e,n){e=e|0,n=n|0,U[e>>3]=+w(Ei(t[n>>2]|0)),U[e+8>>3]=+w(Z0(t[n>>2]|0)),U[e+16>>3]=+w(C0(t[n>>2]|0)),U[e+24>>3]=+w(Bo(t[n>>2]|0)),U[e+32>>3]=+w(la(t[n>>2]|0)),U[e+40>>3]=+w($l(t[n>>2]|0))}function O2(e,n){return e=e|0,n=n|0,+ +w(tu(t[e>>2]|0,n))}function dd(e,n){return e=e|0,n=n|0,+ +w(ei(t[e>>2]|0,n))}function Xc(e,n){return e=e|0,n=n|0,+ +w(po(t[e>>2]|0,n))}function Qc(){return Pa()|0}function Ws(){M2(),va(),Jc(),vc(),mc(),pd()}function M2(){S7(11713,4938,1)}function va(){HA(10448)}function Jc(){SA(10408)}function vc(){GR(10324)}function mc(){$4(10096)}function pd(){yh(9132)}function yh(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0,Se=0,ye=0,Je=0,Ge=0,ft=0,Me=0,Pe=0,Zt=0,Br=0,In=0,gn=0,_r=0,Pr=0,Nn=0,uu=0,os=0,ls=0,ss=0,ea=0,n2=0,r2=0,uf=0,i2=0,Fc=0,Pc=0,u2=0,o2=0,l2=0,vi=0,of=0,s2=0,Yf=0,a2=0,f2=0,Ic=0,bc=0,Kf=0,Hl=0,La=0,Ns=0,lf=0,I1=0,b1=0,Bc=0,B1=0,U1=0,ql=0,_l=0,sf=0,hu=0,j1=0,as=0,Xf=0,fs=0,Qf=0,z1=0,H1=0,Jf=0,Wl=0,af=0,q1=0,W1=0,V1=0,Sr=0,Bu=0,El=0,cs=0,Vl=0,Or=0,Bn=0,ff=0;n=m,m=m+672|0,r=n+656|0,ff=n+648|0,Bn=n+640|0,Or=n+632|0,Vl=n+624|0,cs=n+616|0,El=n+608|0,Bu=n+600|0,Sr=n+592|0,V1=n+584|0,W1=n+576|0,q1=n+568|0,af=n+560|0,Wl=n+552|0,Jf=n+544|0,H1=n+536|0,z1=n+528|0,Qf=n+520|0,fs=n+512|0,Xf=n+504|0,as=n+496|0,j1=n+488|0,hu=n+480|0,sf=n+472|0,_l=n+464|0,ql=n+456|0,U1=n+448|0,B1=n+440|0,Bc=n+432|0,b1=n+424|0,I1=n+416|0,lf=n+408|0,Ns=n+400|0,La=n+392|0,Hl=n+384|0,Kf=n+376|0,bc=n+368|0,Ic=n+360|0,f2=n+352|0,a2=n+344|0,Yf=n+336|0,s2=n+328|0,of=n+320|0,vi=n+312|0,l2=n+304|0,o2=n+296|0,u2=n+288|0,Pc=n+280|0,Fc=n+272|0,i2=n+264|0,uf=n+256|0,r2=n+248|0,n2=n+240|0,ea=n+232|0,ss=n+224|0,ls=n+216|0,os=n+208|0,uu=n+200|0,Nn=n+192|0,Pr=n+184|0,_r=n+176|0,gn=n+168|0,In=n+160|0,Br=n+152|0,Zt=n+144|0,Pe=n+136|0,Me=n+128|0,ft=n+120|0,Ge=n+112|0,Je=n+104|0,ye=n+96|0,Se=n+88|0,be=n+80|0,K=n+72|0,I=n+64|0,M=n+56|0,N=n+48|0,S=n+40|0,D=n+32|0,h=n+24|0,s=n+16|0,l=n+8|0,u=n,Tf(e,3646),Zc(e,3651,2)|0,gh(e,3665,2)|0,nm(e,3682,18)|0,t[ff>>2]=19,t[ff+4>>2]=0,t[r>>2]=t[ff>>2],t[r+4>>2]=t[ff+4>>2],Vs(e,3690,r)|0,t[Bn>>2]=1,t[Bn+4>>2]=0,t[r>>2]=t[Bn>>2],t[r+4>>2]=t[Bn+4>>2],ma(e,3696,r)|0,t[Or>>2]=2,t[Or+4>>2]=0,t[r>>2]=t[Or>>2],t[r+4>>2]=t[Or+4>>2],iu(e,3706,r)|0,t[Vl>>2]=1,t[Vl+4>>2]=0,t[r>>2]=t[Vl>>2],t[r+4>>2]=t[Vl+4>>2],M0(e,3722,r)|0,t[cs>>2]=2,t[cs+4>>2]=0,t[r>>2]=t[cs>>2],t[r+4>>2]=t[cs+4>>2],M0(e,3734,r)|0,t[El>>2]=3,t[El+4>>2]=0,t[r>>2]=t[El>>2],t[r+4>>2]=t[El+4>>2],iu(e,3753,r)|0,t[Bu>>2]=4,t[Bu+4>>2]=0,t[r>>2]=t[Bu>>2],t[r+4>>2]=t[Bu+4>>2],iu(e,3769,r)|0,t[Sr>>2]=5,t[Sr+4>>2]=0,t[r>>2]=t[Sr>>2],t[r+4>>2]=t[Sr+4>>2],iu(e,3783,r)|0,t[V1>>2]=6,t[V1+4>>2]=0,t[r>>2]=t[V1>>2],t[r+4>>2]=t[V1+4>>2],iu(e,3796,r)|0,t[W1>>2]=7,t[W1+4>>2]=0,t[r>>2]=t[W1>>2],t[r+4>>2]=t[W1+4>>2],iu(e,3813,r)|0,t[q1>>2]=8,t[q1+4>>2]=0,t[r>>2]=t[q1>>2],t[r+4>>2]=t[q1+4>>2],iu(e,3825,r)|0,t[af>>2]=3,t[af+4>>2]=0,t[r>>2]=t[af>>2],t[r+4>>2]=t[af+4>>2],M0(e,3843,r)|0,t[Wl>>2]=4,t[Wl+4>>2]=0,t[r>>2]=t[Wl>>2],t[r+4>>2]=t[Wl+4>>2],M0(e,3853,r)|0,t[Jf>>2]=9,t[Jf+4>>2]=0,t[r>>2]=t[Jf>>2],t[r+4>>2]=t[Jf+4>>2],iu(e,3870,r)|0,t[H1>>2]=10,t[H1+4>>2]=0,t[r>>2]=t[H1>>2],t[r+4>>2]=t[H1+4>>2],iu(e,3884,r)|0,t[z1>>2]=11,t[z1+4>>2]=0,t[r>>2]=t[z1>>2],t[r+4>>2]=t[z1+4>>2],iu(e,3896,r)|0,t[Qf>>2]=1,t[Qf+4>>2]=0,t[r>>2]=t[Qf>>2],t[r+4>>2]=t[Qf+4>>2],o0(e,3907,r)|0,t[fs>>2]=2,t[fs+4>>2]=0,t[r>>2]=t[fs>>2],t[r+4>>2]=t[fs+4>>2],o0(e,3915,r)|0,t[Xf>>2]=3,t[Xf+4>>2]=0,t[r>>2]=t[Xf>>2],t[r+4>>2]=t[Xf+4>>2],o0(e,3928,r)|0,t[as>>2]=4,t[as+4>>2]=0,t[r>>2]=t[as>>2],t[r+4>>2]=t[as+4>>2],o0(e,3948,r)|0,t[j1>>2]=5,t[j1+4>>2]=0,t[r>>2]=t[j1>>2],t[r+4>>2]=t[j1+4>>2],o0(e,3960,r)|0,t[hu>>2]=6,t[hu+4>>2]=0,t[r>>2]=t[hu>>2],t[r+4>>2]=t[hu+4>>2],o0(e,3974,r)|0,t[sf>>2]=7,t[sf+4>>2]=0,t[r>>2]=t[sf>>2],t[r+4>>2]=t[sf+4>>2],o0(e,3983,r)|0,t[_l>>2]=20,t[_l+4>>2]=0,t[r>>2]=t[_l>>2],t[r+4>>2]=t[_l+4>>2],Vs(e,3999,r)|0,t[ql>>2]=8,t[ql+4>>2]=0,t[r>>2]=t[ql>>2],t[r+4>>2]=t[ql+4>>2],o0(e,4012,r)|0,t[U1>>2]=9,t[U1+4>>2]=0,t[r>>2]=t[U1>>2],t[r+4>>2]=t[U1+4>>2],o0(e,4022,r)|0,t[B1>>2]=21,t[B1+4>>2]=0,t[r>>2]=t[B1>>2],t[r+4>>2]=t[B1+4>>2],Vs(e,4039,r)|0,t[Bc>>2]=10,t[Bc+4>>2]=0,t[r>>2]=t[Bc>>2],t[r+4>>2]=t[Bc+4>>2],o0(e,4053,r)|0,t[b1>>2]=11,t[b1+4>>2]=0,t[r>>2]=t[b1>>2],t[r+4>>2]=t[b1+4>>2],o0(e,4065,r)|0,t[I1>>2]=12,t[I1+4>>2]=0,t[r>>2]=t[I1>>2],t[r+4>>2]=t[I1+4>>2],o0(e,4084,r)|0,t[lf>>2]=13,t[lf+4>>2]=0,t[r>>2]=t[lf>>2],t[r+4>>2]=t[lf+4>>2],o0(e,4097,r)|0,t[Ns>>2]=14,t[Ns+4>>2]=0,t[r>>2]=t[Ns>>2],t[r+4>>2]=t[Ns+4>>2],o0(e,4117,r)|0,t[La>>2]=15,t[La+4>>2]=0,t[r>>2]=t[La>>2],t[r+4>>2]=t[La+4>>2],o0(e,4129,r)|0,t[Hl>>2]=16,t[Hl+4>>2]=0,t[r>>2]=t[Hl>>2],t[r+4>>2]=t[Hl+4>>2],o0(e,4148,r)|0,t[Kf>>2]=17,t[Kf+4>>2]=0,t[r>>2]=t[Kf>>2],t[r+4>>2]=t[Kf+4>>2],o0(e,4161,r)|0,t[bc>>2]=18,t[bc+4>>2]=0,t[r>>2]=t[bc>>2],t[r+4>>2]=t[bc+4>>2],o0(e,4181,r)|0,t[Ic>>2]=5,t[Ic+4>>2]=0,t[r>>2]=t[Ic>>2],t[r+4>>2]=t[Ic+4>>2],M0(e,4196,r)|0,t[f2>>2]=6,t[f2+4>>2]=0,t[r>>2]=t[f2>>2],t[r+4>>2]=t[f2+4>>2],M0(e,4206,r)|0,t[a2>>2]=7,t[a2+4>>2]=0,t[r>>2]=t[a2>>2],t[r+4>>2]=t[a2+4>>2],M0(e,4217,r)|0,t[Yf>>2]=3,t[Yf+4>>2]=0,t[r>>2]=t[Yf>>2],t[r+4>>2]=t[Yf+4>>2],ns(e,4235,r)|0,t[s2>>2]=1,t[s2+4>>2]=0,t[r>>2]=t[s2>>2],t[r+4>>2]=t[s2+4>>2],Ya(e,4251,r)|0,t[of>>2]=4,t[of+4>>2]=0,t[r>>2]=t[of>>2],t[r+4>>2]=t[of+4>>2],ns(e,4263,r)|0,t[vi>>2]=5,t[vi+4>>2]=0,t[r>>2]=t[vi>>2],t[r+4>>2]=t[vi+4>>2],ns(e,4279,r)|0,t[l2>>2]=6,t[l2+4>>2]=0,t[r>>2]=t[l2>>2],t[r+4>>2]=t[l2+4>>2],ns(e,4293,r)|0,t[o2>>2]=7,t[o2+4>>2]=0,t[r>>2]=t[o2>>2],t[r+4>>2]=t[o2+4>>2],ns(e,4306,r)|0,t[u2>>2]=8,t[u2+4>>2]=0,t[r>>2]=t[u2>>2],t[r+4>>2]=t[u2+4>>2],ns(e,4323,r)|0,t[Pc>>2]=9,t[Pc+4>>2]=0,t[r>>2]=t[Pc>>2],t[r+4>>2]=t[Pc+4>>2],ns(e,4335,r)|0,t[Fc>>2]=2,t[Fc+4>>2]=0,t[r>>2]=t[Fc>>2],t[r+4>>2]=t[Fc+4>>2],Ya(e,4353,r)|0,t[i2>>2]=12,t[i2+4>>2]=0,t[r>>2]=t[i2>>2],t[r+4>>2]=t[i2+4>>2],io(e,4363,r)|0,t[uf>>2]=1,t[uf+4>>2]=0,t[r>>2]=t[uf>>2],t[r+4>>2]=t[uf+4>>2],al(e,4376,r)|0,t[r2>>2]=2,t[r2+4>>2]=0,t[r>>2]=t[r2>>2],t[r+4>>2]=t[r2+4>>2],al(e,4388,r)|0,t[n2>>2]=13,t[n2+4>>2]=0,t[r>>2]=t[n2>>2],t[r+4>>2]=t[n2+4>>2],io(e,4402,r)|0,t[ea>>2]=14,t[ea+4>>2]=0,t[r>>2]=t[ea>>2],t[r+4>>2]=t[ea+4>>2],io(e,4411,r)|0,t[ss>>2]=15,t[ss+4>>2]=0,t[r>>2]=t[ss>>2],t[r+4>>2]=t[ss+4>>2],io(e,4421,r)|0,t[ls>>2]=16,t[ls+4>>2]=0,t[r>>2]=t[ls>>2],t[r+4>>2]=t[ls+4>>2],io(e,4433,r)|0,t[os>>2]=17,t[os+4>>2]=0,t[r>>2]=t[os>>2],t[r+4>>2]=t[os+4>>2],io(e,4446,r)|0,t[uu>>2]=18,t[uu+4>>2]=0,t[r>>2]=t[uu>>2],t[r+4>>2]=t[uu+4>>2],io(e,4458,r)|0,t[Nn>>2]=3,t[Nn+4>>2]=0,t[r>>2]=t[Nn>>2],t[r+4>>2]=t[Nn+4>>2],al(e,4471,r)|0,t[Pr>>2]=1,t[Pr+4>>2]=0,t[r>>2]=t[Pr>>2],t[r+4>>2]=t[Pr+4>>2],yc(e,4486,r)|0,t[_r>>2]=10,t[_r+4>>2]=0,t[r>>2]=t[_r>>2],t[r+4>>2]=t[_r+4>>2],ns(e,4496,r)|0,t[gn>>2]=11,t[gn+4>>2]=0,t[r>>2]=t[gn>>2],t[r+4>>2]=t[gn+4>>2],ns(e,4508,r)|0,t[In>>2]=3,t[In+4>>2]=0,t[r>>2]=t[In>>2],t[r+4>>2]=t[In+4>>2],Ya(e,4519,r)|0,t[Br>>2]=4,t[Br+4>>2]=0,t[r>>2]=t[Br>>2],t[r+4>>2]=t[Br+4>>2],k2(e,4530,r)|0,t[Zt>>2]=19,t[Zt+4>>2]=0,t[r>>2]=t[Zt>>2],t[r+4>>2]=t[Zt+4>>2],_h(e,4542,r)|0,t[Pe>>2]=12,t[Pe+4>>2]=0,t[r>>2]=t[Pe>>2],t[r+4>>2]=t[Pe+4>>2],Cf(e,4554,r)|0,t[Me>>2]=13,t[Me+4>>2]=0,t[r>>2]=t[Me>>2],t[r+4>>2]=t[Me+4>>2],xf(e,4568,r)|0,t[ft>>2]=2,t[ft+4>>2]=0,t[r>>2]=t[ft>>2],t[r+4>>2]=t[ft+4>>2],$c(e,4578,r)|0,t[Ge>>2]=20,t[Ge+4>>2]=0,t[r>>2]=t[Ge>>2],t[r+4>>2]=t[Ge+4>>2],kl(e,4587,r)|0,t[Je>>2]=22,t[Je+4>>2]=0,t[r>>2]=t[Je>>2],t[r+4>>2]=t[Je+4>>2],Vs(e,4602,r)|0,t[ye>>2]=23,t[ye+4>>2]=0,t[r>>2]=t[ye>>2],t[r+4>>2]=t[ye+4>>2],Vs(e,4619,r)|0,t[Se>>2]=14,t[Se+4>>2]=0,t[r>>2]=t[Se>>2],t[r+4>>2]=t[Se+4>>2],e1(e,4629,r)|0,t[be>>2]=1,t[be+4>>2]=0,t[r>>2]=t[be>>2],t[r+4>>2]=t[be+4>>2],ya(e,4637,r)|0,t[K>>2]=4,t[K+4>>2]=0,t[r>>2]=t[K>>2],t[r+4>>2]=t[K+4>>2],al(e,4653,r)|0,t[I>>2]=5,t[I+4>>2]=0,t[r>>2]=t[I>>2],t[r+4>>2]=t[I+4>>2],al(e,4669,r)|0,t[M>>2]=6,t[M+4>>2]=0,t[r>>2]=t[M>>2],t[r+4>>2]=t[M+4>>2],al(e,4686,r)|0,t[N>>2]=7,t[N+4>>2]=0,t[r>>2]=t[N>>2],t[r+4>>2]=t[N+4>>2],al(e,4701,r)|0,t[S>>2]=8,t[S+4>>2]=0,t[r>>2]=t[S>>2],t[r+4>>2]=t[S+4>>2],al(e,4719,r)|0,t[D>>2]=9,t[D+4>>2]=0,t[r>>2]=t[D>>2],t[r+4>>2]=t[D+4>>2],al(e,4736,r)|0,t[h>>2]=21,t[h+4>>2]=0,t[r>>2]=t[h>>2],t[r+4>>2]=t[h+4>>2],hd(e,4754,r)|0,t[s>>2]=2,t[s+4>>2]=0,t[r>>2]=t[s>>2],t[r+4>>2]=t[s+4>>2],yc(e,4772,r)|0,t[l>>2]=3,t[l+4>>2]=0,t[r>>2]=t[l>>2],t[r+4>>2]=t[l+4>>2],yc(e,4790,r)|0,t[u>>2]=4,t[u+4>>2]=0,t[r>>2]=t[u>>2],t[r+4>>2]=t[u+4>>2],yc(e,4808,r)|0,m=n}function Tf(e,n){e=e|0,n=n|0;var r=0;r=rf()|0,t[e>>2]=r,Wo(r,n),$d(t[e>>2]|0)}function Zc(e,n,r){return e=e|0,n=n|0,r=r|0,Ot(e,Fr(n)|0,r,0),e|0}function gh(e,n,r){return e=e|0,n=n|0,r=r|0,c(e,Fr(n)|0,r,0),e|0}function nm(e,n,r){return e=e|0,n=n|0,r=r|0,Y4(e,Fr(n)|0,r,0),e|0}function Vs(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],U4(e,n,l),m=u,e|0}function ma(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],jl(e,n,l),m=u,e|0}function iu(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],d(e,n,l),m=u,e|0}function M0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Tv(e,n,l),m=u,e|0}function o0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Xm(e,n,l),m=u,e|0}function ns(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Yd(e,n,l),m=u,e|0}function Ya(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Gd(e,n,l),m=u,e|0}function io(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],k0(e,n,l),m=u,e|0}function al(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],wp(e,n,l),m=u,e|0}function yc(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Mm(e,n,l),m=u,e|0}function k2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],l0(e,n,l),m=u,e|0}function _h(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Od(e,n,l),m=u,e|0}function Cf(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Dm(e,n,l),m=u,e|0}function xf(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ep(e,n,l),m=u,e|0}function $c(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],m1(e,n,l),m=u,e|0}function kl(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Za(e,n,l),m=u,e|0}function e1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],U2(e,n,l),m=u,e|0}function ya(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],F2(e,n,l),m=u,e|0}function hd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],vd(e,n,l),m=u,e|0}function vd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ga(e,r,l,1),m=u}function Fr(e){return e=e|0,e|0}function ga(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=N2()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=t1(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,md(s,u)|0,u),m=l}function N2(){var e=0,n=0;if(p[7616]|0||(fl(9136),Wt(24,9136,ve|0)|0,n=7616,t[n>>2]=1,t[n+4>>2]=0),!(sr(9136)|0)){e=9136,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));fl(9136)}return 9136}function t1(e){return e=e|0,0}function md(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=N2()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Rf(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Af(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function wi(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0;h=m,m=m+32|0,K=h+24|0,I=h+20|0,S=h+16|0,M=h+12|0,N=h+8|0,D=h+4|0,be=h,t[I>>2]=n,t[S>>2]=r,t[M>>2]=u,t[N>>2]=l,t[D>>2]=s,s=e+28|0,t[be>>2]=t[s>>2],t[K>>2]=t[be>>2],L2(e+24|0,K,I,M,N,S,D)|0,t[s>>2]=t[t[s>>2]>>2],m=h}function L2(e,n,r,u,l,s,h){return e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,h=h|0,e=rm(n)|0,n=pn(24)|0,yd(n+4|0,t[r>>2]|0,t[u>>2]|0,t[l>>2]|0,t[s>>2]|0,t[h>>2]|0),t[n>>2]=t[e>>2],t[e>>2]=n,n|0}function rm(e){return e=e|0,t[e>>2]|0}function yd(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,t[e>>2]=n,t[e+4>>2]=r,t[e+8>>2]=u,t[e+12>>2]=l,t[e+16>>2]=s}function hn(e,n){return e=e|0,n=n|0,n|e|0}function Rf(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Af(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=im(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,Of(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Rf(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Eh(e,D),um(D),m=N;return}}function im(e){return e=e|0,357913941}function Of(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Eh(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function um(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function fl(e){e=e|0,Ho(e)}function n1(e){e=e|0,qn(e+24|0)}function sr(e){return e=e|0,t[e>>2]|0}function qn(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Ho(e){e=e|0;var n=0;n=yr()|0,jn(e,2,3,n,Vn()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function yr(){return 9228}function Vn(){return 1140}function cl(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=_o(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=gc(n,u)|0,m=r,n|0}function jn(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,t[e>>2]=n,t[e+4>>2]=r,t[e+8>>2]=u,t[e+12>>2]=l,t[e+16>>2]=s}function _o(e){return e=e|0,(t[(N2()|0)+24>>2]|0)+(e*12|0)|0}function gc(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;return l=m,m=m+48|0,u=l,r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),P1[r&31](u,e),u=uo(u)|0,m=l,u|0}function uo(e){e=e|0;var n=0,r=0,u=0,l=0;return l=m,m=m+32|0,n=l+12|0,r=l,u=Iu(Ka()|0)|0,u?(rs(n,u),Mf(r,n),_c(e,r),e=Cs(n)|0):e=Ec(e)|0,m=l,e|0}function Ka(){var e=0;return p[7632]|0||(Nf(9184),Wt(25,9184,ve|0)|0,e=7632,t[e>>2]=1,t[e+4>>2]=0),9184}function Iu(e){return e=e|0,t[e+36>>2]|0}function rs(e,n){e=e|0,n=n|0,t[e>>2]=n,t[e+4>>2]=e,t[e+8>>2]=0}function Mf(e,n){e=e|0,n=n|0,t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=0}function _c(e,n){e=e|0,n=n|0,oo(n,e,e+8|0,e+16|0,e+24|0,e+32|0,e+40|0)|0}function Cs(e){return e=e|0,t[(t[e+4>>2]|0)+8>>2]|0}function Ec(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0;S=m,m=m+16|0,r=S+4|0,u=S,l=Oa(8)|0,s=l,h=pn(48)|0,D=h,n=D+48|0;do t[D>>2]=t[e>>2],D=D+4|0,e=e+4|0;while((D|0)<(n|0));return n=s+4|0,t[n>>2]=h,D=pn(8)|0,h=t[n>>2]|0,t[u>>2]=0,t[r>>2]=t[u>>2],Dh(D,h,r),t[l>>2]=D,m=S,s|0}function Dh(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=pn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1092,t[r+12>>2]=n,t[e+4>>2]=r}function cn(e){e=e|0,Iv(e),_t(e)}function is(e){e=e|0,e=t[e+12>>2]|0,e|0&&_t(e)}function Eo(e){e=e|0,_t(e)}function oo(e,n,r,u,l,s,h){return e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,h=h|0,s=Ji(t[e>>2]|0,n,r,u,l,s,h)|0,h=e+4|0,t[(t[h>>2]|0)+8>>2]=s,t[(t[h>>2]|0)+8>>2]|0}function Ji(e,n,r,u,l,s,h){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,h=h|0;var D=0,S=0;return D=m,m=m+16|0,S=D,Ma(S),e=yo(e)|0,h=Yr(e,+U[n>>3],+U[r>>3],+U[u>>3],+U[l>>3],+U[s>>3],+U[h>>3])|0,ka(S),m=D,h|0}function Yr(e,n,r,u,l,s,h){e=e|0,n=+n,r=+r,u=+u,l=+l,s=+s,h=+h;var D=0;return D=go(kf()|0)|0,n=+Ml(n),r=+Ml(r),u=+Ml(u),l=+Ml(l),s=+Ml(s),p0(0,D|0,e|0,+n,+r,+u,+l,+s,+ +Ml(h))|0}function kf(){var e=0;return p[7624]|0||(om(9172),e=7624,t[e>>2]=1,t[e+4>>2]=0),9172}function om(e){e=e|0,ol(e,Nl()|0,6)}function Nl(){return 1112}function Nf(e){e=e|0,Xa(e)}function Lf(e){e=e|0,gd(e+24|0),_d(e+16|0)}function gd(e){e=e|0,r1(e)}function _d(e){e=e|0,Dc(e)}function Dc(e){e=e|0;var n=0,r=0;if(n=t[e>>2]|0,n|0)do r=n,n=t[n>>2]|0,_t(r);while((n|0)!=0);t[e>>2]=0}function r1(e){e=e|0;var n=0,r=0;if(n=t[e>>2]|0,n|0)do r=n,n=t[n>>2]|0,_t(r);while((n|0)!=0);t[e>>2]=0}function Xa(e){e=e|0;var n=0;t[e+16>>2]=0,t[e+20>>2]=0,n=e+24|0,t[n>>2]=0,t[e+28>>2]=n,t[e+36>>2]=0,p[e+40>>0]=0,p[e+41>>0]=0}function F2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Ed(e,r,l,0),m=u}function Ed(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=i1()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=Ff(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,u1(s,u)|0,u),m=l}function i1(){var e=0,n=0;if(p[7640]|0||(Ll(9232),Wt(26,9232,ve|0)|0,n=7640,t[n>>2]=1,t[n+4>>2]=0),!(sr(9232)|0)){e=9232,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Ll(9232)}return 9232}function Ff(e){return e=e|0,0}function u1(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=i1()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Qa(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(o1(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function Qa(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function o1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=P2(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,Dd(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Qa(s,u,r),t[S>>2]=(t[S>>2]|0)+12,wc(e,D),l1(D),m=N;return}}function P2(e){return e=e|0,357913941}function Dd(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function wc(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function l1(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Ll(e){e=e|0,I2(e)}function Ea(e){e=e|0,wh(e+24|0)}function wh(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function I2(e){e=e|0;var n=0;n=yr()|0,jn(e,2,1,n,b2()|0,3),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function b2(){return 1144}function Sh(e,n,r,u,l){e=e|0,n=n|0,r=+r,u=+u,l=l|0;var s=0,h=0,D=0,S=0;s=m,m=m+16|0,h=s+8|0,D=s,S=wd(e)|0,e=t[S+4>>2]|0,t[D>>2]=t[S>>2],t[D+4>>2]=e,t[h>>2]=t[D>>2],t[h+4>>2]=t[D+4>>2],Th(n,h,r,u,l),m=s}function wd(e){return e=e|0,(t[(i1()|0)+24>>2]|0)+(e*12|0)|0}function Th(e,n,r,u,l){e=e|0,n=n|0,r=+r,u=+u,l=l|0;var s=0,h=0,D=0,S=0,N=0;N=m,m=m+16|0,h=N+2|0,D=N+1|0,S=N,s=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(s=t[(t[e>>2]|0)+s>>2]|0),Fl(h,r),r=+us(h,r),Fl(D,u),u=+us(D,u),xs(S,l),S=Gs(S,l)|0,w8[s&1](e,r,u,S),m=N}function Fl(e,n){e=e|0,n=+n}function us(e,n){return e=e|0,n=+n,+ +Ch(n)}function xs(e,n){e=e|0,n=n|0}function Gs(e,n){return e=e|0,n=n|0,B2(n)|0}function B2(e){return e=e|0,e|0}function Ch(e){return e=+e,+e}function U2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],j2(e,r,l,1),m=u}function j2(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=s1()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=a1(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,xh(s,u)|0,u),m=l}function s1(){var e=0,n=0;if(p[7648]|0||(f1(9268),Wt(27,9268,ve|0)|0,n=7648,t[n>>2]=1,t[n+4>>2]=0),!(sr(9268)|0)){e=9268,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));f1(9268)}return 9268}function a1(e){return e=e|0,0}function xh(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=s1()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],z2(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(H2(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function z2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function H2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Rs(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,Ja(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],z2(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Rh(e,D),du(D),m=N;return}}function Rs(e){return e=e|0,357913941}function Ja(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Rh(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function du(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function f1(e){e=e|0,Pl(e)}function Ah(e){e=e|0,c1(e+24|0)}function c1(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Pl(e){e=e|0;var n=0;n=yr()|0,jn(e,2,4,n,Oh()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Oh(){return 1160}function q2(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=Mh(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=d1(n,u)|0,m=r,n|0}function Mh(e){return e=e|0,(t[(s1()|0)+24>>2]|0)+(e*12|0)|0}function d1(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),Il(Jp[r&31](e)|0)|0}function Il(e){return e=e|0,e&1|0}function Za(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Da(e,r,l,0),m=u}function Da(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=W2()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=V2(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,lm(s,u)|0,u),m=l}function W2(){var e=0,n=0;if(p[7656]|0||(Lh(9304),Wt(28,9304,ve|0)|0,n=7656,t[n>>2]=1,t[n+4>>2]=0),!(sr(9304)|0)){e=9304,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Lh(9304)}return 9304}function V2(e){return e=e|0,0}function lm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=W2()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],G2(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(kh(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function G2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function kh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Nh(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,Y2(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],G2(s,u,r),t[S>>2]=(t[S>>2]|0)+12,sm(e,D),am(D),m=N;return}}function Nh(e){return e=e|0,357913941}function Y2(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function sm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function am(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Lh(e){e=e|0,p1(e)}function fm(e){e=e|0,K2(e+24|0)}function K2(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function p1(e){e=e|0;var n=0;n=yr()|0,jn(e,2,5,n,h1()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function h1(){return 1164}function v1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=wa(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],X2(n,l,r),m=u}function wa(e){return e=e|0,(t[(W2()|0)+24>>2]|0)+(e*12|0)|0}function X2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Ys(l,r),r=Ks(l,r)|0,P1[u&31](e,r),Xs(l),m=s}function Ys(e,n){e=e|0,n=n|0,Q2(e,n)}function Ks(e,n){return e=e|0,n=n|0,e|0}function Xs(e){e=e|0,fa(e)}function Q2(e,n){e=e|0,n=n|0,Sa(e,n)}function Sa(e,n){e=e|0,n=n|0,t[e>>2]=n}function m1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Sd(e,r,l,0),m=u}function Sd(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Sc()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=J2(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Do(s,u)|0,u),m=l}function Sc(){var e=0,n=0;if(p[7664]|0||(Uh(9340),Wt(29,9340,ve|0)|0,n=7664,t[n>>2]=1,t[n+4>>2]=0),!(sr(9340)|0)){e=9340,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Uh(9340)}return 9340}function J2(e){return e=e|0,0}function Do(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Sc()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Fh(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Ph(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function Fh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Ph(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Ih(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,bh(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Fh(s,u,r),t[S>>2]=(t[S>>2]|0)+12,cm(e,D),Bh(D),m=N;return}}function Ih(e){return e=e|0,357913941}function bh(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function cm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Bh(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Uh(e){e=e|0,jh(e)}function y1(e){e=e|0,Z2(e+24|0)}function Z2(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function jh(e){e=e|0;var n=0;n=yr()|0,jn(e,2,4,n,$2()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function $2(){return 1180}function zh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=dm(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],r=pm(n,l,r)|0,m=u,r|0}function dm(e){return e=e|0,(t[(Sc()|0)+24>>2]|0)+(e*12|0)|0}function pm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;return s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Pf(l,r),l=If(l,r)|0,l=Td(FE[u&15](e,l)|0)|0,m=s,l|0}function Pf(e,n){e=e|0,n=n|0}function If(e,n){return e=e|0,n=n|0,hm(n)|0}function Td(e){return e=e|0,e|0}function hm(e){return e=e|0,e|0}function ep(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Cd(e,r,l,0),m=u}function Cd(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=tp()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=Hh(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,np(s,u)|0,u),m=l}function tp(){var e=0,n=0;if(p[7672]|0||(Vh(9376),Wt(30,9376,ve|0)|0,n=7672,t[n>>2]=1,t[n+4>>2]=0),!(sr(9376)|0)){e=9376,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Vh(9376)}return 9376}function Hh(e){return e=e|0,0}function np(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=tp()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],qh(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Wh(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function qh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Wh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=rp(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,vm(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],qh(s,u,r),t[S>>2]=(t[S>>2]|0)+12,mm(e,D),ym(D),m=N;return}}function rp(e){return e=e|0,357913941}function vm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function mm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function ym(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Vh(e){e=e|0,ip(e)}function g1(e){e=e|0,gm(e+24|0)}function gm(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function ip(e){e=e|0;var n=0;n=yr()|0,jn(e,2,5,n,up()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function up(){return 1196}function _m(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=Em(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=Gh(n,u)|0,m=r,n|0}function Em(e){return e=e|0,(t[(tp()|0)+24>>2]|0)+(e*12|0)|0}function Gh(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),Td(Jp[r&31](e)|0)|0}function Dm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],wm(e,r,l,1),m=u}function wm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=op()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=lp(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Ta(s,u)|0,u),m=l}function op(){var e=0,n=0;if(p[7680]|0||(ap(9412),Wt(31,9412,ve|0)|0,n=7680,t[n>>2]=1,t[n+4>>2]=0),!(sr(9412)|0)){e=9412,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));ap(9412)}return 9412}function lp(e){return e=e|0,0}function Ta(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=op()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],_1(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(sp(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function _1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function sp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Yh(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,xd(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],_1(s,u,r),t[S>>2]=(t[S>>2]|0)+12,E1(e,D),Kh(D),m=N;return}}function Yh(e){return e=e|0,357913941}function xd(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function E1(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Kh(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function ap(e){e=e|0,Qh(e)}function Xh(e){e=e|0,fp(e+24|0)}function fp(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Qh(e){e=e|0;var n=0;n=yr()|0,jn(e,2,6,n,Jh()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Jh(){return 1200}function cp(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=Rd(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=Ad(n,u)|0,m=r,n|0}function Rd(e){return e=e|0,(t[(op()|0)+24>>2]|0)+(e*12|0)|0}function Ad(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),H0(Jp[r&31](e)|0)|0}function H0(e){return e=e|0,e|0}function Od(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Ca(e,r,l,0),m=u}function Ca(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=$a()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=Md(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,kd(s,u)|0,u),m=l}function $a(){var e=0,n=0;if(p[7688]|0||(hp(9448),Wt(32,9448,ve|0)|0,n=7688,t[n>>2]=1,t[n+4>>2]=0),!(sr(9448)|0)){e=9448,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));hp(9448)}return 9448}function Md(e){return e=e|0,0}function kd(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=$a()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],dp(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Nd(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function dp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Nd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Zh(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,Sm(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],dp(s,u,r),t[S>>2]=(t[S>>2]|0)+12,$h(e,D),pp(D),m=N;return}}function Zh(e){return e=e|0,357913941}function Sm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function $h(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function pp(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function hp(e){e=e|0,Cm(e)}function vp(e){e=e|0,Tm(e+24|0)}function Tm(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Cm(e){e=e|0;var n=0;n=yr()|0,jn(e,2,6,n,wo()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function wo(){return 1204}function Ld(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=xm(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],dl(n,l,r),m=u}function xm(e){return e=e|0,(t[($a()|0)+24>>2]|0)+(e*12|0)|0}function dl(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),tr(l,r),l=Qs(l,r)|0,P1[u&31](e,l),m=s}function tr(e,n){e=e|0,n=n|0}function Qs(e,n){return e=e|0,n=n|0,pl(n)|0}function pl(e){return e=e|0,e|0}function l0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ev(e,r,l,0),m=u}function ev(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Js()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=mp(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Rm(s,u)|0,u),m=l}function Js(){var e=0,n=0;if(p[7696]|0||(_p(9484),Wt(33,9484,ve|0)|0,n=7696,t[n>>2]=1,t[n+4>>2]=0),!(sr(9484)|0)){e=9484,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));_p(9484)}return 9484}function mp(e){return e=e|0,0}function Rm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Js()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],tv(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(yp(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function tv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function yp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Am(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,gp(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],tv(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Tc(e,D),xa(D),m=N;return}}function Am(e){return e=e|0,357913941}function gp(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Tc(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function xa(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function _p(e){e=e|0,Yu(e)}function Fd(e){e=e|0,bu(e+24|0)}function bu(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Yu(e){e=e|0;var n=0;n=yr()|0,jn(e,2,1,n,Ep()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Ep(){return 1212}function Dp(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,s=l+8|0,h=l,D=nv(e)|0,e=t[D+4>>2]|0,t[h>>2]=t[D>>2],t[h+4>>2]=e,t[s>>2]=t[h>>2],t[s+4>>2]=t[h+4>>2],Om(n,s,r,u),m=l}function nv(e){return e=e|0,(t[(Js()|0)+24>>2]|0)+(e*12|0)|0}function Om(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;D=m,m=m+16|0,s=D+1|0,h=D,l=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(l=t[(t[e>>2]|0)+l>>2]|0),tr(s,r),s=Qs(s,r)|0,Pf(h,u),h=If(h,u)|0,Ry[l&15](e,s,h),m=D}function Mm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],km(e,r,l,1),m=u}function km(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Pd()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=rv(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Cc(s,u)|0,u),m=l}function Pd(){var e=0,n=0;if(p[7704]|0||(iv(9520),Wt(34,9520,ve|0)|0,n=7704,t[n>>2]=1,t[n+4>>2]=0),!(sr(9520)|0)){e=9520,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));iv(9520)}return 9520}function rv(e){return e=e|0,0}function Cc(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Pd()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],D1(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Nm(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function D1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Nm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Id(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,w1(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],D1(s,u,r),t[S>>2]=(t[S>>2]|0)+12,bl(e,D),Ra(D),m=N;return}}function Id(e){return e=e|0,357913941}function w1(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function bl(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Ra(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function iv(e){e=e|0,ov(e)}function Lm(e){e=e|0,uv(e+24|0)}function uv(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function ov(e){e=e|0;var n=0;n=yr()|0,jn(e,2,1,n,Fm()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Fm(){return 1224}function lv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;return l=m,m=m+16|0,s=l+8|0,h=l,D=Aa(e)|0,e=t[D+4>>2]|0,t[h>>2]=t[D>>2],t[h+4>>2]=e,t[s>>2]=t[h>>2],t[s+4>>2]=t[h+4>>2],u=+Mr(n,s,r),m=l,+u}function Aa(e){return e=e|0,(t[(Pd()|0)+24>>2]|0)+(e*12|0)|0}function Mr(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),xs(l,r),l=Gs(l,r)|0,h=+Ga(+T8[u&7](e,l)),m=s,+h}function wp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],hl(e,r,l,1),m=u}function hl(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=gu()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=S1(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Ui(s,u)|0,u),m=l}function gu(){var e=0,n=0;if(p[7712]|0||(Tp(9556),Wt(35,9556,ve|0)|0,n=7712,t[n>>2]=1,t[n+4>>2]=0),!(sr(9556)|0)){e=9556,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Tp(9556)}return 9556}function S1(e){return e=e|0,0}function Ui(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=gu()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Sp(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(bd(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function Sp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function bd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=So(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,As(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Sp(s,u,r),t[S>>2]=(t[S>>2]|0)+12,bf(e,D),Bd(D),m=N;return}}function So(e){return e=e|0,357913941}function As(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function bf(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Bd(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Tp(e){e=e|0,Cp(e)}function T1(e){e=e|0,C1(e+24|0)}function C1(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Cp(e){e=e|0;var n=0;n=yr()|0,jn(e,2,5,n,nr()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function nr(){return 1232}function vl(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=Gn(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],r=+q0(n,l),m=u,+r}function Gn(e){return e=e|0,(t[(gu()|0)+24>>2]|0)+(e*12|0)|0}function q0(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),+ +Ga(+S8[r&15](e))}function k0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Ud(e,r,l,1),m=u}function Ud(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Bl()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=x1(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,xc(s,u)|0,u),m=l}function Bl(){var e=0,n=0;if(p[7720]|0||(Hd(9592),Wt(36,9592,ve|0)|0,n=7720,t[n>>2]=1,t[n+4>>2]=0),!(sr(9592)|0)){e=9592,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Hd(9592)}return 9592}function x1(e){return e=e|0,0}function xc(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Bl()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Rc(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(jd(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function Rc(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function jd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=xp(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,N0(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Rc(s,u,r),t[S>>2]=(t[S>>2]|0)+12,dn(e,D),zd(D),m=N;return}}function xp(e){return e=e|0,357913941}function N0(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function dn(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function zd(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Hd(e){e=e|0,Mc(e)}function Ac(e){e=e|0,Oc(e+24|0)}function Oc(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Mc(e){e=e|0;var n=0;n=yr()|0,jn(e,2,7,n,R1()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function R1(){return 1276}function Rp(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=ef(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=Pm(n,u)|0,m=r,n|0}function ef(e){return e=e|0,(t[(Bl()|0)+24>>2]|0)+(e*12|0)|0}function Pm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;return l=m,m=m+16|0,u=l,r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),P1[r&31](u,e),u=kc(u)|0,m=l,u|0}function kc(e){e=e|0;var n=0,r=0,u=0,l=0;return l=m,m=m+32|0,n=l+12|0,r=l,u=Iu(qd()|0)|0,u?(rs(n,u),Mf(r,n),sv(e,r),e=Cs(n)|0):e=A1(e)|0,m=l,e|0}function qd(){var e=0;return p[7736]|0||(qo(9640),Wt(25,9640,ve|0)|0,e=7736,t[e>>2]=1,t[e+4>>2]=0),9640}function sv(e,n){e=e|0,n=n|0,Nc(n,e,e+8|0)|0}function A1(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0;return r=m,m=m+16|0,l=r+4|0,h=r,u=Oa(8)|0,n=u,D=pn(16)|0,t[D>>2]=t[e>>2],t[D+4>>2]=t[e+4>>2],t[D+8>>2]=t[e+8>>2],t[D+12>>2]=t[e+12>>2],s=n+4|0,t[s>>2]=D,e=pn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],Bf(e,s,l),t[u>>2]=e,m=r,n|0}function Bf(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=pn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1244,t[r+12>>2]=n,t[e+4>>2]=r}function Uf(e){e=e|0,Iv(e),_t(e)}function O1(e){e=e|0,e=t[e+12>>2]|0,e|0&&_t(e)}function Ul(e){e=e|0,_t(e)}function Nc(e,n,r){return e=e|0,n=n|0,r=r|0,n=jf(t[e>>2]|0,n,r)|0,r=e+4|0,t[(t[r>>2]|0)+8>>2]=n,t[(t[r>>2]|0)+8>>2]|0}function jf(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;return u=m,m=m+16|0,l=u,Ma(l),e=yo(e)|0,r=Im(e,t[n>>2]|0,+U[r>>3])|0,ka(l),m=u,r|0}function Im(e,n,r){e=e|0,n=n|0,r=+r;var u=0;return u=go(ml()|0)|0,n=sd(n)|0,Hr(0,u|0,e|0,n|0,+ +Ml(r))|0}function ml(){var e=0;return p[7728]|0||(Wd(9628),e=7728,t[e>>2]=1,t[e+4>>2]=0),9628}function Wd(e){e=e|0,ol(e,Vd()|0,2)}function Vd(){return 1264}function qo(e){e=e|0,Xa(e)}function Gd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],bm(e,r,l,1),m=u}function bm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=M1()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=Bm(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Um(s,u)|0,u),m=l}function M1(){var e=0,n=0;if(p[7744]|0||(cv(9684),Wt(37,9684,ve|0)|0,n=7744,t[n>>2]=1,t[n+4>>2]=0),!(sr(9684)|0)){e=9684,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));cv(9684)}return 9684}function Bm(e){return e=e|0,0}function Um(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=M1()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],av(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(jm(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function av(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function jm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=fv(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,zm(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],av(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Hm(e,D),qm(D),m=N;return}}function fv(e){return e=e|0,357913941}function zm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Hm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function qm(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function cv(e){e=e|0,Vm(e)}function Wm(e){e=e|0,Ap(e+24|0)}function Ap(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Vm(e){e=e|0;var n=0;n=yr()|0,jn(e,2,5,n,zf()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function zf(){return 1280}function dv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=pv(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],r=hv(n,l,r)|0,m=u,r|0}function pv(e){return e=e|0,(t[(M1()|0)+24>>2]|0)+(e*12|0)|0}function hv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return h=m,m=m+32|0,l=h,s=h+16|0,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),xs(s,r),s=Gs(s,r)|0,Ry[u&15](l,e,s),s=kc(l)|0,m=h,s|0}function Yd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Kd(e,r,l,1),m=u}function Kd(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Op()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=vv(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Xd(s,u)|0,u),m=l}function Op(){var e=0,n=0;if(p[7752]|0||(Ev(9720),Wt(38,9720,ve|0)|0,n=7752,t[n>>2]=1,t[n+4>>2]=0),!(sr(9720)|0)){e=9720,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Ev(9720)}return 9720}function vv(e){return e=e|0,0}function Xd(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Op()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],mv(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(yv(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function mv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function yv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Mp(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,gv(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],mv(s,u,r),t[S>>2]=(t[S>>2]|0)+12,_v(e,D),Gm(D),m=N;return}}function Mp(e){return e=e|0,357913941}function gv(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function _v(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Gm(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Ev(e){e=e|0,Dv(e)}function Ym(e){e=e|0,Qd(e+24|0)}function Qd(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Dv(e){e=e|0;var n=0;n=yr()|0,jn(e,2,8,n,kp()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function kp(){return 1288}function Km(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=s0(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=Np(n,u)|0,m=r,n|0}function s0(e){return e=e|0,(t[(Op()|0)+24>>2]|0)+(e*12|0)|0}function Np(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),cd(Jp[r&31](e)|0)|0}function Xm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Qm(e,r,l,0),m=u}function Qm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Lp()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=tf(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Fp(s,u)|0,u),m=l}function Lp(){var e=0,n=0;if(p[7760]|0||(bp(9756),Wt(39,9756,ve|0)|0,n=7760,t[n>>2]=1,t[n+4>>2]=0),!(sr(9756)|0)){e=9756,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));bp(9756)}return 9756}function tf(e){return e=e|0,0}function Fp(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Lp()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Pp(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Ip(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function Pp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Ip(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Jm(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,Zm(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Pp(s,u,r),t[S>>2]=(t[S>>2]|0)+12,wv(e,D),Hf(D),m=N;return}}function Jm(e){return e=e|0,357913941}function Zm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function wv(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Hf(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function bp(e){e=e|0,ey(e)}function Sv(e){e=e|0,$m(e+24|0)}function $m(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function ey(e){e=e|0;var n=0;n=yr()|0,jn(e,2,8,n,Bp()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Bp(){return 1292}function Up(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=ty(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ny(n,l,r),m=u}function ty(e){return e=e|0,(t[(Lp()|0)+24>>2]|0)+(e*12|0)|0}function ny(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Fl(l,r),r=+us(l,r),E8[u&31](e,r),m=s}function Tv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],jp(e,r,l,0),m=u}function jp(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=zp()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=Jd(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,ry(s,u)|0,u),m=l}function zp(){var e=0,n=0;if(p[7768]|0||(Hp(9792),Wt(40,9792,ve|0)|0,n=7768,t[n>>2]=1,t[n+4>>2]=0),!(sr(9792)|0)){e=9792,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Hp(9792)}return 9792}function Jd(e){return e=e|0,0}function ry(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=zp()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],k1(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(iy(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function k1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function iy(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Cv(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,xv(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],k1(s,u,r),t[S>>2]=(t[S>>2]|0)+12,uy(e,D),qf(D),m=N;return}}function Cv(e){return e=e|0,357913941}function xv(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function uy(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function qf(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function Hp(e){e=e|0,ly(e)}function Rv(e){e=e|0,oy(e+24|0)}function oy(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function ly(e){e=e|0;var n=0;n=yr()|0,jn(e,2,1,n,qp()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function qp(){return 1300}function sy(e,n,r,u){e=e|0,n=n|0,r=r|0,u=+u;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,s=l+8|0,h=l,D=Zs(e)|0,e=t[D+4>>2]|0,t[h>>2]=t[D>>2],t[h+4>>2]=e,t[s>>2]=t[h>>2],t[s+4>>2]=t[h+4>>2],ay(n,s,r,u),m=l}function Zs(e){return e=e|0,(t[(zp()|0)+24>>2]|0)+(e*12|0)|0}function ay(e,n,r,u){e=e|0,n=n|0,r=r|0,u=+u;var l=0,s=0,h=0,D=0;D=m,m=m+16|0,s=D+1|0,h=D,l=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(l=t[(t[e>>2]|0)+l>>2]|0),xs(s,r),s=Gs(s,r)|0,Fl(h,u),u=+us(h,u),A8[l&15](e,s,u),m=D}function d(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],v(e,r,l,0),m=u}function v(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=x()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=P(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,q(s,u)|0,u),m=l}function x(){var e=0,n=0;if(p[7776]|0||(At(9828),Wt(41,9828,ve|0)|0,n=7776,t[n>>2]=1,t[n+4>>2]=0),!(sr(9828)|0)){e=9828,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));At(9828)}return 9828}function P(e){return e=e|0,0}function q(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=x()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],ee(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(de(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function ee(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function de(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=_e(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,Ie(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],ee(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Et(e,D),St(D),m=N;return}}function _e(e){return e=e|0,357913941}function Ie(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Et(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function St(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function At(e){e=e|0,rr(e)}function on(e){e=e|0,kn(e+24|0)}function kn(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function rr(e){e=e|0;var n=0;n=yr()|0,jn(e,2,7,n,br()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function br(){return 1312}function ar(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=ui(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],di(n,l,r),m=u}function ui(e){return e=e|0,(t[(x()|0)+24>>2]|0)+(e*12|0)|0}function di(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),xs(l,r),l=Gs(l,r)|0,P1[u&31](e,l),m=s}function jl(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Zi(e,r,l,0),m=u}function Zi(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=lo()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=a0(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,Os(s,u)|0,u),m=l}function lo(){var e=0,n=0;if(p[7784]|0||(qg(9864),Wt(42,9864,ve|0)|0,n=7784,t[n>>2]=1,t[n+4>>2]=0),!(sr(9864)|0)){e=9864,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));qg(9864)}return 9864}function a0(e){return e=e|0,0}function Os(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=lo()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],To(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Av(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function To(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Av(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=k4(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,fy(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],To(s,u,r),t[S>>2]=(t[S>>2]|0)+12,cy(e,D),nf(D),m=N;return}}function k4(e){return e=e|0,357913941}function fy(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function cy(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function nf(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function qg(e){e=e|0,F4(e)}function N4(e){e=e|0,L4(e+24|0)}function L4(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function F4(e){e=e|0;var n=0;n=yr()|0,jn(e,2,8,n,P4()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function P4(){return 1320}function dy(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=I4(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],b4(n,l,r),m=u}function I4(e){return e=e|0,(t[(lo()|0)+24>>2]|0)+(e*12|0)|0}function b4(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),py(l,r),l=Wg(l,r)|0,P1[u&31](e,l),m=s}function py(e,n){e=e|0,n=n|0}function Wg(e,n){return e=e|0,n=n|0,B4(n)|0}function B4(e){return e=e|0,e|0}function U4(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Vg(e,r,l,0),m=u}function Vg(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Wf()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=Gg(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,j4(s,u)|0,u),m=l}function Wf(){var e=0,n=0;if(p[7792]|0||(my(9900),Wt(43,9900,ve|0)|0,n=7792,t[n>>2]=1,t[n+4>>2]=0),!(sr(9900)|0)){e=9900,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));my(9900)}return 9900}function Gg(e){return e=e|0,0}function j4(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=Wf()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Wp(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(z4(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function Wp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function z4(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Ov(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,hy(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Wp(s,u,r),t[S>>2]=(t[S>>2]|0)+12,vy(e,D),H4(D),m=N;return}}function Ov(e){return e=e|0,357913941}function hy(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function vy(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function H4(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function my(e){e=e|0,Yg(e)}function q4(e){e=e|0,W4(e+24|0)}function W4(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function Yg(e){e=e|0;var n=0;n=yr()|0,jn(e,2,22,n,V4()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function V4(){return 1344}function G4(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;r=m,m=m+16|0,u=r+8|0,l=r,s=Kg(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],Mv(n,u),m=r}function Kg(e){return e=e|0,(t[(Wf()|0)+24>>2]|0)+(e*12|0)|0}function Mv(e,n){e=e|0,n=n|0;var r=0;r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),F1[r&127](e)}function Y4(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=yy()|0,e=K4(r)|0,wi(s,n,l,e,X4(r,u)|0,u)}function yy(){var e=0,n=0;if(p[7800]|0||(_y(9936),Wt(44,9936,ve|0)|0,n=7800,t[n>>2]=1,t[n+4>>2]=0),!(sr(9936)|0)){e=9936,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));_y(9936)}return 9936}function K4(e){return e=e|0,e|0}function X4(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=yy()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(gy(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(Xg(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function gy(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function Xg(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=Qg(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,Jg(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,gy(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,Zg(e,l),$g(l),m=D;return}}function Qg(e){return e=e|0,536870911}function Jg(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function Zg(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function $g(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function _y(e){e=e|0,t_(e)}function e_(e){e=e|0,Q4(e+24|0)}function Q4(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function t_(e){e=e|0;var n=0;n=yr()|0,jn(e,1,23,n,wo()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function J4(e,n){e=e|0,n=n|0,f(t[(Z4(e)|0)>>2]|0,n)}function Z4(e){return e=e|0,(t[(yy()|0)+24>>2]|0)+(e<<3)|0}function f(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,tr(u,n),n=Qs(u,n)|0,F1[e&127](n),m=r}function c(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=E()|0,e=T(r)|0,wi(s,n,l,e,A(r,u)|0,u)}function E(){var e=0,n=0;if(p[7808]|0||(pt(9972),Wt(45,9972,ve|0)|0,n=7808,t[n>>2]=1,t[n+4>>2]=0),!(sr(9972)|0)){e=9972,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));pt(9972)}return 9972}function T(e){return e=e|0,e|0}function A(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=E()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(j(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(V(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function j(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function V(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=te(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,le(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,j(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,Be(e,l),Ke(l),m=D;return}}function te(e){return e=e|0,536870911}function le(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function Be(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Ke(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function pt(e){e=e|0,zt(e)}function Nt(e){e=e|0,Gt(e+24|0)}function Gt(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function zt(e){e=e|0;var n=0;n=yr()|0,jn(e,1,9,n,yn()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function yn(){return 1348}function kr(e,n){return e=e|0,n=n|0,Oi(t[(oi(e)|0)>>2]|0,n)|0}function oi(e){return e=e|0,(t[(E()|0)+24>>2]|0)+(e<<3)|0}function Oi(e,n){e=e|0,n=n|0;var r=0,u=0;return r=m,m=m+16|0,u=r,L0(u,n),n=$i(u,n)|0,n=Td(Jp[e&31](n)|0)|0,m=r,n|0}function L0(e,n){e=e|0,n=n|0}function $i(e,n){return e=e|0,n=n|0,ot(n)|0}function ot(e){return e=e|0,e|0}function Ot(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=Ze()|0,e=Ut(r)|0,wi(s,n,l,e,Pn(r,u)|0,u)}function Ze(){var e=0,n=0;if(p[7816]|0||(Kr(10008),Wt(46,10008,ve|0)|0,n=7816,t[n>>2]=1,t[n+4>>2]=0),!(sr(10008)|0)){e=10008,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Kr(10008)}return 10008}function Ut(e){return e=e|0,e|0}function Pn(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=Ze()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(vn(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(Wi(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function vn(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function Wi(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=pi(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,Ku(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,vn(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,hr(e,l),pu(l),m=D;return}}function pi(e){return e=e|0,536870911}function Ku(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function hr(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function pu(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function Kr(e){e=e|0,W0(e)}function xu(e){e=e|0,w0(e+24|0)}function w0(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function W0(e){e=e|0;var n=0;n=yr()|0,jn(e,1,15,n,up()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Ms(e){return e=e|0,yl(t[(Xu(e)|0)>>2]|0)|0}function Xu(e){return e=e|0,(t[(Ze()|0)+24>>2]|0)+(e<<3)|0}function yl(e){return e=e|0,Td(g_[e&7]()|0)|0}function rf(){var e=0;return p[7832]|0||(r_(10052),Wt(25,10052,ve|0)|0,e=7832,t[e>>2]=1,t[e+4>>2]=0),10052}function Wo(e,n){e=e|0,n=n|0,t[e>>2]=ks()|0,t[e+4>>2]=Zd()|0,t[e+12>>2]=n,t[e+8>>2]=Vf()|0,t[e+32>>2]=2}function ks(){return 11709}function Zd(){return 1188}function Vf(){return N1()|0}function Lc(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(zl(u,896)|0)==512?r|0&&(Vo(r),_t(r)):n|0&&(Ds(n),_t(n))}function zl(e,n){return e=e|0,n=n|0,n&e|0}function Vo(e){e=e|0,e=t[e+4>>2]|0,e|0&&e2(e)}function N1(){var e=0;return p[7824]|0||(t[2511]=n_()|0,t[2512]=0,e=7824,t[e>>2]=1,t[e+4>>2]=0),10044}function n_(){return 0}function r_(e){e=e|0,Xa(e)}function $4(e){e=e|0;var n=0,r=0,u=0,l=0,s=0;n=m,m=m+32|0,r=n+24|0,s=n+16|0,l=n+8|0,u=n,i_(e,4827),eE(e,4834,3)|0,tE(e,3682,47)|0,t[s>>2]=9,t[s+4>>2]=0,t[r>>2]=t[s>>2],t[r+4>>2]=t[s+4>>2],Ey(e,4841,r)|0,t[l>>2]=1,t[l+4>>2]=0,t[r>>2]=t[l>>2],t[r+4>>2]=t[l+4>>2],u_(e,4871,r)|0,t[u>>2]=10,t[u+4>>2]=0,t[r>>2]=t[u>>2],t[r+4>>2]=t[u+4>>2],nE(e,4891,r)|0,m=n}function i_(e,n){e=e|0,n=n|0;var r=0;r=BR()|0,t[e>>2]=r,UR(r,n),$d(t[e>>2]|0)}function eE(e,n,r){return e=e|0,n=n|0,r=r|0,wR(e,Fr(n)|0,r,0),e|0}function tE(e,n,r){return e=e|0,n=n|0,r=r|0,lR(e,Fr(n)|0,r,0),e|0}function Ey(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],H9(e,n,l),m=u,e|0}function u_(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],S9(e,n,l),m=u,e|0}function nE(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],rE(e,n,l),m=u,e|0}function rE(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],iE(e,r,l,1),m=u}function iE(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=uE()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=a9(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,f9(s,u)|0,u),m=l}function uE(){var e=0,n=0;if(p[7840]|0||(rw(10100),Wt(48,10100,ve|0)|0,n=7840,t[n>>2]=1,t[n+4>>2]=0),!(sr(10100)|0)){e=10100,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));rw(10100)}return 10100}function a9(e){return e=e|0,0}function f9(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=uE()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],nw(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(c9(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function nw(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function c9(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=d9(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,p9(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],nw(s,u,r),t[S>>2]=(t[S>>2]|0)+12,h9(e,D),v9(D),m=N;return}}function d9(e){return e=e|0,357913941}function p9(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function h9(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function v9(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function rw(e){e=e|0,g9(e)}function m9(e){e=e|0,y9(e+24|0)}function y9(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function g9(e){e=e|0;var n=0;n=yr()|0,jn(e,2,6,n,_9()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function _9(){return 1364}function E9(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=D9(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],r=w9(n,l,r)|0,m=u,r|0}function D9(e){return e=e|0,(t[(uE()|0)+24>>2]|0)+(e*12|0)|0}function w9(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;return s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),xs(l,r),l=Gs(l,r)|0,l=Il(FE[u&15](e,l)|0)|0,m=s,l|0}function S9(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],T9(e,r,l,0),m=u}function T9(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=oE()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=C9(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,x9(s,u)|0,u),m=l}function oE(){var e=0,n=0;if(p[7848]|0||(uw(10136),Wt(49,10136,ve|0)|0,n=7848,t[n>>2]=1,t[n+4>>2]=0),!(sr(10136)|0)){e=10136,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));uw(10136)}return 10136}function C9(e){return e=e|0,0}function x9(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=oE()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],iw(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(R9(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function iw(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function R9(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=A9(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,O9(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],iw(s,u,r),t[S>>2]=(t[S>>2]|0)+12,M9(e,D),k9(D),m=N;return}}function A9(e){return e=e|0,357913941}function O9(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function M9(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function k9(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function uw(e){e=e|0,F9(e)}function N9(e){e=e|0,L9(e+24|0)}function L9(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function F9(e){e=e|0;var n=0;n=yr()|0,jn(e,2,9,n,P9()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function P9(){return 1372}function I9(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=b9(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],B9(n,l,r),m=u}function b9(e){return e=e|0,(t[(oE()|0)+24>>2]|0)+(e*12|0)|0}function B9(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0,h=Tt;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),U9(l,r),h=w(j9(l,r)),_8[u&1](e,h),m=s}function U9(e,n){e=e|0,n=+n}function j9(e,n){return e=e|0,n=+n,w(z9(n))}function z9(e){return e=+e,w(e)}function H9(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Fr(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],q9(e,r,l,0),m=u}function q9(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,N=0,M=0;l=m,m=m+32|0,s=l+16|0,M=l+8|0,D=l,N=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=lE()|0,t[M>>2]=N,t[M+4>>2]=S,t[s>>2]=t[M>>2],t[s+4>>2]=t[M+4>>2],r=W9(s)|0,t[D>>2]=N,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],wi(h,n,e,r,V9(s,u)|0,u),m=l}function lE(){var e=0,n=0;if(p[7856]|0||(lw(10172),Wt(50,10172,ve|0)|0,n=7856,t[n>>2]=1,t[n+4>>2]=0),!(sr(10172)|0)){e=10172,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));lw(10172)}return 10172}function W9(e){return e=e|0,0}function V9(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0;return M=m,m=m+32|0,l=M+24|0,h=M+16|0,D=M,S=M+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,I=lE()|0,N=I+24|0,e=hn(n,4)|0,t[S>>2]=e,n=I+28|0,r=t[n>>2]|0,r>>>0<(t[I+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],ow(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(G9(N,D,S),e=t[n>>2]|0),m=M,((e-(t[N>>2]|0)|0)/12|0)+-1|0}function ow(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function G9(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;if(N=m,m=m+48|0,u=N+32|0,h=N+24|0,D=N,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Y9(e)|0,s>>>0>>0)hi(e);else{M=t[e>>2]|0,K=((t[e+8>>2]|0)-M|0)/12|0,I=K<<1,K9(D,K>>>0>>1>>>0?I>>>0>>0?l:I:s,((t[S>>2]|0)-M|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],ow(s,u,r),t[S>>2]=(t[S>>2]|0)+12,X9(e,D),Q9(D),m=N;return}}function Y9(e){return e=e|0,357913941}function K9(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)$n();else{l=pn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function X9(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Q9(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&_t(e)}function lw(e){e=e|0,$9(e)}function J9(e){e=e|0,Z9(e+24|0)}function Z9(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),_t(r))}function $9(e){e=e|0;var n=0;n=yr()|0,jn(e,2,3,n,eR()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function eR(){return 1380}function tR(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,s=l+8|0,h=l,D=nR(e)|0,e=t[D+4>>2]|0,t[h>>2]=t[D>>2],t[h+4>>2]=e,t[s>>2]=t[h>>2],t[s+4>>2]=t[h+4>>2],rR(n,s,r,u),m=l}function nR(e){return e=e|0,(t[(lE()|0)+24>>2]|0)+(e*12|0)|0}function rR(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;D=m,m=m+16|0,s=D+1|0,h=D,l=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(l=t[(t[e>>2]|0)+l>>2]|0),xs(s,r),s=Gs(s,r)|0,iR(h,u),h=uR(h,u)|0,Ry[l&15](e,s,h),m=D}function iR(e,n){e=e|0,n=n|0}function uR(e,n){return e=e|0,n=n|0,oR(n)|0}function oR(e){return e=e|0,(e|0)!=0|0}function lR(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=sE()|0,e=sR(r)|0,wi(s,n,l,e,aR(r,u)|0,u)}function sE(){var e=0,n=0;if(p[7864]|0||(aw(10208),Wt(51,10208,ve|0)|0,n=7864,t[n>>2]=1,t[n+4>>2]=0),!(sr(10208)|0)){e=10208,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));aw(10208)}return 10208}function sR(e){return e=e|0,e|0}function aR(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=sE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(sw(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(fR(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function sw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function fR(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=cR(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,dR(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,sw(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,pR(e,l),hR(l),m=D;return}}function cR(e){return e=e|0,536870911}function dR(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function pR(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function hR(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function aw(e){e=e|0,yR(e)}function vR(e){e=e|0,mR(e+24|0)}function mR(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function yR(e){e=e|0;var n=0;n=yr()|0,jn(e,1,24,n,gR()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function gR(){return 1392}function _R(e,n){e=e|0,n=n|0,DR(t[(ER(e)|0)>>2]|0,n)}function ER(e){return e=e|0,(t[(sE()|0)+24>>2]|0)+(e<<3)|0}function DR(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,L0(u,n),n=$i(u,n)|0,F1[e&127](n),m=r}function wR(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=aE()|0,e=SR(r)|0,wi(s,n,l,e,TR(r,u)|0,u)}function aE(){var e=0,n=0;if(p[7872]|0||(cw(10244),Wt(52,10244,ve|0)|0,n=7872,t[n>>2]=1,t[n+4>>2]=0),!(sr(10244)|0)){e=10244,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));cw(10244)}return 10244}function SR(e){return e=e|0,e|0}function TR(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=aE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(fw(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(CR(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function fw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function CR(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=xR(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,RR(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,fw(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,AR(e,l),OR(l),m=D;return}}function xR(e){return e=e|0,536870911}function RR(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function AR(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function OR(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function cw(e){e=e|0,NR(e)}function MR(e){e=e|0,kR(e+24|0)}function kR(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function NR(e){e=e|0;var n=0;n=yr()|0,jn(e,1,16,n,LR()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function LR(){return 1400}function FR(e){return e=e|0,IR(t[(PR(e)|0)>>2]|0)|0}function PR(e){return e=e|0,(t[(aE()|0)+24>>2]|0)+(e<<3)|0}function IR(e){return e=e|0,bR(g_[e&7]()|0)|0}function bR(e){return e=e|0,e|0}function BR(){var e=0;return p[7880]|0||(VR(10280),Wt(25,10280,ve|0)|0,e=7880,t[e>>2]=1,t[e+4>>2]=0),10280}function UR(e,n){e=e|0,n=n|0,t[e>>2]=jR()|0,t[e+4>>2]=zR()|0,t[e+12>>2]=n,t[e+8>>2]=HR()|0,t[e+32>>2]=4}function jR(){return 11711}function zR(){return 1356}function HR(){return N1()|0}function qR(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(zl(u,896)|0)==512?r|0&&(WR(r),_t(r)):n|0&&(no(n),_t(n))}function WR(e){e=e|0,e=t[e+4>>2]|0,e|0&&e2(e)}function VR(e){e=e|0,Xa(e)}function GR(e){e=e|0,YR(e,4920),KR(e)|0,XR(e)|0}function YR(e,n){e=e|0,n=n|0;var r=0;r=qd()|0,t[e>>2]=r,mA(r,n),$d(t[e>>2]|0)}function KR(e){e=e|0;var n=0;return n=t[e>>2]|0,Vp(n,oA()|0),e|0}function XR(e){e=e|0;var n=0;return n=t[e>>2]|0,Vp(n,QR()|0),e|0}function QR(){var e=0;return p[7888]|0||(dw(10328),Wt(53,10328,ve|0)|0,e=7888,t[e>>2]=1,t[e+4>>2]=0),sr(10328)|0||dw(10328),10328}function Vp(e,n){e=e|0,n=n|0,wi(e,0,n,0,0,0)}function dw(e){e=e|0,$R(e),Gp(e,10)}function JR(e){e=e|0,ZR(e+24|0)}function ZR(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function $R(e){e=e|0;var n=0;n=yr()|0,jn(e,5,1,n,rA()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function eA(e,n,r){e=e|0,n=n|0,r=+r,tA(e,n,r)}function Gp(e,n){e=e|0,n=n|0,t[e+20>>2]=n}function tA(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,s=u+8|0,D=u+13|0,l=u,h=u+12|0,xs(D,n),t[s>>2]=Gs(D,n)|0,Fl(h,r),U[l>>3]=+us(h,r),nA(e,s,l),m=u}function nA(e,n,r){e=e|0,n=n|0,r=r|0,b(e+8|0,t[n>>2]|0,+U[r>>3]),p[e+24>>0]=1}function rA(){return 1404}function iA(e,n){return e=e|0,n=+n,uA(e,n)|0}function uA(e,n){e=e|0,n=+n;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return u=m,m=m+16|0,s=u+4|0,h=u+8|0,D=u,l=Oa(8)|0,r=l,S=pn(16)|0,xs(s,e),e=Gs(s,e)|0,Fl(h,n),b(S,e,+us(h,n)),h=r+4|0,t[h>>2]=S,e=pn(8)|0,h=t[h>>2]|0,t[D>>2]=0,t[s>>2]=t[D>>2],Bf(e,h,s),t[l>>2]=e,m=u,r|0}function oA(){var e=0;return p[7896]|0||(pw(10364),Wt(54,10364,ve|0)|0,e=7896,t[e>>2]=1,t[e+4>>2]=0),sr(10364)|0||pw(10364),10364}function pw(e){e=e|0,aA(e),Gp(e,55)}function lA(e){e=e|0,sA(e+24|0)}function sA(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function aA(e){e=e|0;var n=0;n=yr()|0,jn(e,5,4,n,pA()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function fA(e){e=e|0,cA(e)}function cA(e){e=e|0,dA(e)}function dA(e){e=e|0,hw(e+8|0),p[e+24>>0]=1}function hw(e){e=e|0,t[e>>2]=0,U[e+8>>3]=0}function pA(){return 1424}function hA(){return vA()|0}function vA(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0;return n=m,m=m+16|0,l=n+4|0,h=n,r=Oa(8)|0,e=r,u=pn(16)|0,hw(u),s=e+4|0,t[s>>2]=u,u=pn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],Bf(u,s,l),t[r>>2]=u,m=n,e|0}function mA(e,n){e=e|0,n=n|0,t[e>>2]=yA()|0,t[e+4>>2]=gA()|0,t[e+12>>2]=n,t[e+8>>2]=_A()|0,t[e+32>>2]=5}function yA(){return 11710}function gA(){return 1416}function _A(){return o_()|0}function EA(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(zl(u,896)|0)==512?r|0&&(DA(r),_t(r)):n|0&&_t(n)}function DA(e){e=e|0,e=t[e+4>>2]|0,e|0&&e2(e)}function o_(){var e=0;return p[7904]|0||(t[2600]=wA()|0,t[2601]=0,e=7904,t[e>>2]=1,t[e+4>>2]=0),10400}function wA(){return t[357]|0}function SA(e){e=e|0,TA(e,4926),CA(e)|0}function TA(e,n){e=e|0,n=n|0;var r=0;r=Ka()|0,t[e>>2]=r,IA(r,n),$d(t[e>>2]|0)}function CA(e){e=e|0;var n=0;return n=t[e>>2]|0,Vp(n,xA()|0),e|0}function xA(){var e=0;return p[7912]|0||(vw(10412),Wt(56,10412,ve|0)|0,e=7912,t[e>>2]=1,t[e+4>>2]=0),sr(10412)|0||vw(10412),10412}function vw(e){e=e|0,OA(e),Gp(e,57)}function RA(e){e=e|0,AA(e+24|0)}function AA(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function OA(e){e=e|0;var n=0;n=yr()|0,jn(e,5,5,n,LA()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function MA(e){e=e|0,kA(e)}function kA(e){e=e|0,NA(e)}function NA(e){e=e|0;var n=0,r=0;n=e+8|0,r=n+48|0;do t[n>>2]=0,n=n+4|0;while((n|0)<(r|0));p[e+56>>0]=1}function LA(){return 1432}function FA(){return PA()|0}function PA(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0,D=0;h=m,m=m+16|0,e=h+4|0,n=h,r=Oa(8)|0,u=r,l=pn(48)|0,s=l,D=s+48|0;do t[s>>2]=0,s=s+4|0;while((s|0)<(D|0));return s=u+4|0,t[s>>2]=l,D=pn(8)|0,s=t[s>>2]|0,t[n>>2]=0,t[e>>2]=t[n>>2],Dh(D,s,e),t[r>>2]=D,m=h,u|0}function IA(e,n){e=e|0,n=n|0,t[e>>2]=bA()|0,t[e+4>>2]=BA()|0,t[e+12>>2]=n,t[e+8>>2]=UA()|0,t[e+32>>2]=6}function bA(){return 11704}function BA(){return 1436}function UA(){return o_()|0}function jA(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(zl(u,896)|0)==512?r|0&&(zA(r),_t(r)):n|0&&_t(n)}function zA(e){e=e|0,e=t[e+4>>2]|0,e|0&&e2(e)}function HA(e){e=e|0,qA(e,4933),WA(e)|0,VA(e)|0}function qA(e,n){e=e|0,n=n|0;var r=0;r=v7()|0,t[e>>2]=r,m7(r,n),$d(t[e>>2]|0)}function WA(e){e=e|0;var n=0;return n=t[e>>2]|0,Vp(n,u7()|0),e|0}function VA(e){e=e|0;var n=0;return n=t[e>>2]|0,Vp(n,GA()|0),e|0}function GA(){var e=0;return p[7920]|0||(mw(10452),Wt(58,10452,ve|0)|0,e=7920,t[e>>2]=1,t[e+4>>2]=0),sr(10452)|0||mw(10452),10452}function mw(e){e=e|0,XA(e),Gp(e,1)}function YA(e){e=e|0,KA(e+24|0)}function KA(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function XA(e){e=e|0;var n=0;n=yr()|0,jn(e,5,1,n,$A()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function QA(e,n,r){e=e|0,n=+n,r=+r,JA(e,n,r)}function JA(e,n,r){e=e|0,n=+n,r=+r;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+32|0,s=u+8|0,D=u+17|0,l=u,h=u+16|0,Fl(D,n),U[s>>3]=+us(D,n),Fl(h,r),U[l>>3]=+us(h,r),ZA(e,s,l),m=u}function ZA(e,n,r){e=e|0,n=n|0,r=r|0,yw(e+8|0,+U[n>>3],+U[r>>3]),p[e+24>>0]=1}function yw(e,n,r){e=e|0,n=+n,r=+r,U[e>>3]=n,U[e+8>>3]=r}function $A(){return 1472}function e7(e,n){return e=+e,n=+n,t7(e,n)|0}function t7(e,n){e=+e,n=+n;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return u=m,m=m+16|0,h=u+4|0,D=u+8|0,S=u,l=Oa(8)|0,r=l,s=pn(16)|0,Fl(h,e),e=+us(h,e),Fl(D,n),yw(s,e,+us(D,n)),D=r+4|0,t[D>>2]=s,s=pn(8)|0,D=t[D>>2]|0,t[S>>2]=0,t[h>>2]=t[S>>2],gw(s,D,h),t[l>>2]=s,m=u,r|0}function gw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=pn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1452,t[r+12>>2]=n,t[e+4>>2]=r}function n7(e){e=e|0,Iv(e),_t(e)}function r7(e){e=e|0,e=t[e+12>>2]|0,e|0&&_t(e)}function i7(e){e=e|0,_t(e)}function u7(){var e=0;return p[7928]|0||(_w(10488),Wt(59,10488,ve|0)|0,e=7928,t[e>>2]=1,t[e+4>>2]=0),sr(10488)|0||_w(10488),10488}function _w(e){e=e|0,s7(e),Gp(e,60)}function o7(e){e=e|0,l7(e+24|0)}function l7(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function s7(e){e=e|0;var n=0;n=yr()|0,jn(e,5,6,n,d7()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function a7(e){e=e|0,f7(e)}function f7(e){e=e|0,c7(e)}function c7(e){e=e|0,Ew(e+8|0),p[e+24>>0]=1}function Ew(e){e=e|0,t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,t[e+12>>2]=0}function d7(){return 1492}function p7(){return h7()|0}function h7(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0;return n=m,m=m+16|0,l=n+4|0,h=n,r=Oa(8)|0,e=r,u=pn(16)|0,Ew(u),s=e+4|0,t[s>>2]=u,u=pn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],gw(u,s,l),t[r>>2]=u,m=n,e|0}function v7(){var e=0;return p[7936]|0||(w7(10524),Wt(25,10524,ve|0)|0,e=7936,t[e>>2]=1,t[e+4>>2]=0),10524}function m7(e,n){e=e|0,n=n|0,t[e>>2]=y7()|0,t[e+4>>2]=g7()|0,t[e+12>>2]=n,t[e+8>>2]=_7()|0,t[e+32>>2]=7}function y7(){return 11700}function g7(){return 1484}function _7(){return o_()|0}function E7(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(zl(u,896)|0)==512?r|0&&(D7(r),_t(r)):n|0&&_t(n)}function D7(e){e=e|0,e=t[e+4>>2]|0,e|0&&e2(e)}function w7(e){e=e|0,Xa(e)}function S7(e,n,r){e=e|0,n=n|0,r=r|0,e=Fr(n)|0,n=T7(r)|0,r=C7(r,0)|0,tO(e,n,r,fE()|0,0)}function T7(e){return e=e|0,e|0}function C7(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=fE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(ww(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(N7(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function fE(){var e=0,n=0;if(p[7944]|0||(Dw(10568),Wt(61,10568,ve|0)|0,n=7944,t[n>>2]=1,t[n+4>>2]=0),!(sr(10568)|0)){e=10568,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Dw(10568)}return 10568}function Dw(e){e=e|0,A7(e)}function x7(e){e=e|0,R7(e+24|0)}function R7(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function A7(e){e=e|0;var n=0;n=yr()|0,jn(e,1,17,n,Jh()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function O7(e){return e=e|0,k7(t[(M7(e)|0)>>2]|0)|0}function M7(e){return e=e|0,(t[(fE()|0)+24>>2]|0)+(e<<3)|0}function k7(e){return e=e|0,H0(g_[e&7]()|0)|0}function ww(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function N7(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=L7(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,F7(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,ww(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,P7(e,l),I7(l),m=D;return}}function L7(e){return e=e|0,536870911}function F7(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function P7(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function I7(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function b7(){B7()}function B7(){U7(10604)}function U7(e){e=e|0,j7(e,4955)}function j7(e,n){e=e|0,n=n|0;var r=0;r=z7()|0,t[e>>2]=r,H7(r,n),$d(t[e>>2]|0)}function z7(){var e=0;return p[7952]|0||(J7(10612),Wt(25,10612,ve|0)|0,e=7952,t[e>>2]=1,t[e+4>>2]=0),10612}function H7(e,n){e=e|0,n=n|0,t[e>>2]=G7()|0,t[e+4>>2]=Y7()|0,t[e+12>>2]=n,t[e+8>>2]=K7()|0,t[e+32>>2]=8}function $d(e){e=e|0;var n=0,r=0;n=m,m=m+16|0,r=n,kv()|0,t[r>>2]=e,q7(10608,r),m=n}function kv(){return p[11714]|0||(t[2652]=0,Wt(62,10608,ve|0)|0,p[11714]=1),10608}function q7(e,n){e=e|0,n=n|0;var r=0;r=pn(8)|0,t[r+4>>2]=t[n>>2],t[r>>2]=t[e>>2],t[e>>2]=r}function W7(e){e=e|0,V7(e)}function V7(e){e=e|0;var n=0,r=0;if(n=t[e>>2]|0,n|0)do r=n,n=t[n>>2]|0,_t(r);while((n|0)!=0);t[e>>2]=0}function G7(){return 11715}function Y7(){return 1496}function K7(){return N1()|0}function X7(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(zl(u,896)|0)==512?r|0&&(Q7(r),_t(r)):n|0&&_t(n)}function Q7(e){e=e|0,e=t[e+4>>2]|0,e|0&&e2(e)}function J7(e){e=e|0,Xa(e)}function Z7(e,n){e=e|0,n=n|0;var r=0,u=0;kv()|0,r=t[2652]|0;e:do if(r|0){for(;u=t[r+4>>2]|0,!(u|0?(r8(cE(u)|0,e)|0)==0:0);)if(r=t[r>>2]|0,!r)break e;$7(u,n)}while(0)}function cE(e){return e=e|0,t[e+12>>2]|0}function $7(e,n){e=e|0,n=n|0;var r=0;e=e+36|0,r=t[e>>2]|0,r|0&&(fa(r),_t(r)),r=pn(4)|0,wf(r,n),t[e>>2]=r}function dE(){return p[11716]|0||(t[2664]=0,Wt(63,10656,ve|0)|0,p[11716]=1),10656}function Sw(){var e=0;return p[11717]|0?e=t[2665]|0:(eO(),t[2665]=1504,p[11717]=1,e=1504),e|0}function eO(){p[11740]|0||(p[11718]=hn(hn(8,0)|0,0)|0,p[11719]=hn(hn(0,0)|0,0)|0,p[11720]=hn(hn(0,16)|0,0)|0,p[11721]=hn(hn(8,0)|0,0)|0,p[11722]=hn(hn(0,0)|0,0)|0,p[11723]=hn(hn(8,0)|0,0)|0,p[11724]=hn(hn(0,0)|0,0)|0,p[11725]=hn(hn(8,0)|0,0)|0,p[11726]=hn(hn(0,0)|0,0)|0,p[11727]=hn(hn(8,0)|0,0)|0,p[11728]=hn(hn(0,0)|0,0)|0,p[11729]=hn(hn(0,0)|0,32)|0,p[11730]=hn(hn(0,0)|0,32)|0,p[11740]=1)}function Tw(){return 1572}function tO(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,N=0,M=0;s=m,m=m+32|0,M=s+16|0,N=s+12|0,S=s+8|0,D=s+4|0,h=s,t[M>>2]=e,t[N>>2]=n,t[S>>2]=r,t[D>>2]=u,t[h>>2]=l,dE()|0,nO(10656,M,N,S,D,h),m=s}function nO(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0;h=pn(24)|0,yd(h+4|0,t[n>>2]|0,t[r>>2]|0,t[u>>2]|0,t[l>>2]|0,t[s>>2]|0),t[h>>2]=t[e>>2],t[e>>2]=h}function Cw(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0,Se=0,ye=0,Je=0,Ge=0,ft=0;if(ft=m,m=m+32|0,Se=ft+20|0,ye=ft+8|0,Je=ft+4|0,Ge=ft,n=t[n>>2]|0,n|0){be=Se+4|0,S=Se+8|0,N=ye+4|0,M=ye+8|0,I=ye+8|0,K=Se+8|0;do{if(h=n+4|0,D=pE(h)|0,D|0){if(l=Dy(D)|0,t[Se>>2]=0,t[be>>2]=0,t[S>>2]=0,u=(wy(D)|0)+1|0,rO(Se,u),u|0)for(;u=u+-1|0,Gf(ye,t[l>>2]|0),s=t[be>>2]|0,s>>>0<(t[K>>2]|0)>>>0?(t[s>>2]=t[ye>>2],t[be>>2]=(t[be>>2]|0)+4):hE(Se,ye),u;)l=l+4|0;u=Sy(D)|0,t[ye>>2]=0,t[N>>2]=0,t[M>>2]=0;e:do if(t[u>>2]|0)for(l=0,s=0;;){if((l|0)==(s|0)?iO(ye,u):(t[l>>2]=t[u>>2],t[N>>2]=(t[N>>2]|0)+4),u=u+4|0,!(t[u>>2]|0))break e;l=t[N>>2]|0,s=t[I>>2]|0}while(0);t[Je>>2]=l_(h)|0,t[Ge>>2]=sr(D)|0,uO(r,e,Je,Ge,Se,ye),vE(ye),L1(Se)}n=t[n>>2]|0}while((n|0)!=0)}m=ft}function pE(e){return e=e|0,t[e+12>>2]|0}function Dy(e){return e=e|0,t[e+12>>2]|0}function wy(e){return e=e|0,t[e+16>>2]|0}function rO(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;l=m,m=m+32|0,r=l,u=t[e>>2]|0,(t[e+8>>2]|0)-u>>2>>>0>>0&&(Lw(r,n,(t[e+4>>2]|0)-u>>2,e+8|0),Fw(e,r),Pw(r)),m=l}function hE(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0;if(h=m,m=m+32|0,r=h,u=e+4|0,l=((t[u>>2]|0)-(t[e>>2]|0)>>2)+1|0,s=Nw(e)|0,s>>>0>>0)hi(e);else{D=t[e>>2]|0,N=(t[e+8>>2]|0)-D|0,S=N>>1,Lw(r,N>>2>>>0>>1>>>0?S>>>0>>0?l:S:s,(t[u>>2]|0)-D>>2,e+8|0),s=r+8|0,t[t[s>>2]>>2]=t[n>>2],t[s>>2]=(t[s>>2]|0)+4,Fw(e,r),Pw(r),m=h;return}}function Sy(e){return e=e|0,t[e+8>>2]|0}function iO(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0;if(h=m,m=m+32|0,r=h,u=e+4|0,l=((t[u>>2]|0)-(t[e>>2]|0)>>2)+1|0,s=kw(e)|0,s>>>0>>0)hi(e);else{D=t[e>>2]|0,N=(t[e+8>>2]|0)-D|0,S=N>>1,TO(r,N>>2>>>0>>1>>>0?S>>>0>>0?l:S:s,(t[u>>2]|0)-D>>2,e+8|0),s=r+8|0,t[t[s>>2]>>2]=t[n>>2],t[s>>2]=(t[s>>2]|0)+4,CO(e,r),xO(r),m=h;return}}function l_(e){return e=e|0,t[e>>2]|0}function uO(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,oO(e,n,r,u,l,s)}function vE(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-4-u|0)>>>2)<<2)),_t(r))}function L1(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-4-u|0)>>>2)<<2)),_t(r))}function oO(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,N=0,M=0,I=0;h=m,m=m+48|0,M=h+40|0,D=h+32|0,I=h+24|0,S=h+12|0,N=h,Ma(D),e=yo(e)|0,t[I>>2]=t[n>>2],r=t[r>>2]|0,u=t[u>>2]|0,mE(S,l),lO(N,s),t[M>>2]=t[I>>2],sO(e,M,r,u,S,N),vE(N),L1(S),ka(D),m=h}function mE(e,n){e=e|0,n=n|0;var r=0,u=0;t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,r=n+4|0,u=(t[r>>2]|0)-(t[n>>2]|0)>>2,u|0&&(wO(e,u),SO(e,t[n>>2]|0,t[r>>2]|0,u))}function lO(e,n){e=e|0,n=n|0;var r=0,u=0;t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,r=n+4|0,u=(t[r>>2]|0)-(t[n>>2]|0)>>2,u|0&&(EO(e,u),DO(e,t[n>>2]|0,t[r>>2]|0,u))}function sO(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,N=0,M=0,I=0;h=m,m=m+32|0,M=h+28|0,I=h+24|0,D=h+12|0,S=h,N=go(aO()|0)|0,t[I>>2]=t[n>>2],t[M>>2]=t[I>>2],n=Yp(M)|0,r=xw(r)|0,u=yE(u)|0,t[D>>2]=t[l>>2],M=l+4|0,t[D+4>>2]=t[M>>2],I=l+8|0,t[D+8>>2]=t[I>>2],t[I>>2]=0,t[M>>2]=0,t[l>>2]=0,l=gE(D)|0,t[S>>2]=t[s>>2],M=s+4|0,t[S+4>>2]=t[M>>2],I=s+8|0,t[S+8>>2]=t[I>>2],t[I>>2]=0,t[M>>2]=0,t[s>>2]=0,K0(0,N|0,e|0,n|0,r|0,u|0,l|0,fO(S)|0)|0,vE(S),L1(D),m=h}function aO(){var e=0;return p[7968]|0||(gO(10708),e=7968,t[e>>2]=1,t[e+4>>2]=0),10708}function Yp(e){return e=e|0,Aw(e)|0}function xw(e){return e=e|0,Rw(e)|0}function yE(e){return e=e|0,H0(e)|0}function gE(e){return e=e|0,dO(e)|0}function fO(e){return e=e|0,cO(e)|0}function cO(e){e=e|0;var n=0,r=0,u=0;if(u=(t[e+4>>2]|0)-(t[e>>2]|0)|0,r=u>>2,u=Oa(u+4|0)|0,t[u>>2]=r,r|0){n=0;do t[u+4+(n<<2)>>2]=Rw(t[(t[e>>2]|0)+(n<<2)>>2]|0)|0,n=n+1|0;while((n|0)!=(r|0))}return u|0}function Rw(e){return e=e|0,e|0}function dO(e){e=e|0;var n=0,r=0,u=0;if(u=(t[e+4>>2]|0)-(t[e>>2]|0)|0,r=u>>2,u=Oa(u+4|0)|0,t[u>>2]=r,r|0){n=0;do t[u+4+(n<<2)>>2]=Aw((t[e>>2]|0)+(n<<2)|0)|0,n=n+1|0;while((n|0)!=(r|0))}return u|0}function Aw(e){e=e|0;var n=0,r=0,u=0,l=0;return l=m,m=m+32|0,n=l+12|0,r=l,u=Iu(Ow()|0)|0,u?(rs(n,u),Mf(r,n),KN(e,r),e=Cs(n)|0):e=pO(e)|0,m=l,e|0}function Ow(){var e=0;return p[7960]|0||(yO(10664),Wt(25,10664,ve|0)|0,e=7960,t[e>>2]=1,t[e+4>>2]=0),10664}function pO(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0;return r=m,m=m+16|0,l=r+4|0,h=r,u=Oa(8)|0,n=u,D=pn(4)|0,t[D>>2]=t[e>>2],s=n+4|0,t[s>>2]=D,e=pn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],Mw(e,s,l),t[u>>2]=e,m=r,n|0}function Mw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=pn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1656,t[r+12>>2]=n,t[e+4>>2]=r}function hO(e){e=e|0,Iv(e),_t(e)}function vO(e){e=e|0,e=t[e+12>>2]|0,e|0&&_t(e)}function mO(e){e=e|0,_t(e)}function yO(e){e=e|0,Xa(e)}function gO(e){e=e|0,ol(e,_O()|0,5)}function _O(){return 1676}function EO(e,n){e=e|0,n=n|0;var r=0;if((kw(e)|0)>>>0>>0&&hi(e),n>>>0>1073741823)$n();else{r=pn(n<<2)|0,t[e+4>>2]=r,t[e>>2]=r,t[e+8>>2]=r+(n<<2);return}}function DO(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,u=e+4|0,e=r-n|0,(e|0)>0&&(gr(t[u>>2]|0,n|0,e|0)|0,t[u>>2]=(t[u>>2]|0)+(e>>>2<<2))}function kw(e){return e=e|0,1073741823}function wO(e,n){e=e|0,n=n|0;var r=0;if((Nw(e)|0)>>>0>>0&&hi(e),n>>>0>1073741823)$n();else{r=pn(n<<2)|0,t[e+4>>2]=r,t[e>>2]=r,t[e+8>>2]=r+(n<<2);return}}function SO(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,u=e+4|0,e=r-n|0,(e|0)>0&&(gr(t[u>>2]|0,n|0,e|0)|0,t[u>>2]=(t[u>>2]|0)+(e>>>2<<2))}function Nw(e){return e=e|0,1073741823}function TO(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>1073741823)$n();else{l=pn(n<<2)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<2)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<2)}function CO(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>2)<<2)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function xO(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-4-n|0)>>>2)<<2)),e=t[e>>2]|0,e|0&&_t(e)}function Lw(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>1073741823)$n();else{l=pn(n<<2)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<2)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<2)}function Fw(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>2)<<2)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Pw(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-4-n|0)>>>2)<<2)),e=t[e>>2]|0,e|0&&_t(e)}function RO(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0,Se=0,ye=0;if(ye=m,m=m+32|0,M=ye+20|0,I=ye+12|0,N=ye+16|0,K=ye+4|0,be=ye,Se=ye+8|0,D=Sw()|0,s=t[D>>2]|0,h=t[s>>2]|0,h|0)for(S=t[D+8>>2]|0,D=t[D+4>>2]|0;Gf(M,h),AO(e,M,D,S),s=s+4|0,h=t[s>>2]|0,h;)S=S+1|0,D=D+1|0;if(s=Tw()|0,h=t[s>>2]|0,h|0)do Gf(M,h),t[I>>2]=t[s+4>>2],OO(n,M,I),s=s+8|0,h=t[s>>2]|0;while((h|0)!=0);if(s=t[(kv()|0)>>2]|0,s|0)do n=t[s+4>>2]|0,Gf(M,t[(Nv(n)|0)>>2]|0),t[I>>2]=cE(n)|0,MO(r,M,I),s=t[s>>2]|0;while((s|0)!=0);if(Gf(N,0),s=dE()|0,t[M>>2]=t[N>>2],Cw(M,s,l),s=t[(kv()|0)>>2]|0,s|0){e=M+4|0,n=M+8|0,r=M+8|0;do{if(S=t[s+4>>2]|0,Gf(I,t[(Nv(S)|0)>>2]|0),kO(K,Iw(S)|0),h=t[K>>2]|0,h|0){t[M>>2]=0,t[e>>2]=0,t[n>>2]=0;do Gf(be,t[(Nv(t[h+4>>2]|0)|0)>>2]|0),D=t[e>>2]|0,D>>>0<(t[r>>2]|0)>>>0?(t[D>>2]=t[be>>2],t[e>>2]=(t[e>>2]|0)+4):hE(M,be),h=t[h>>2]|0;while((h|0)!=0);NO(u,I,M),L1(M)}t[Se>>2]=t[I>>2],N=bw(S)|0,t[M>>2]=t[Se>>2],Cw(M,N,l),_d(K),s=t[s>>2]|0}while((s|0)!=0)}m=ye}function AO(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,WO(e,n,r,u)}function OO(e,n,r){e=e|0,n=n|0,r=r|0,qO(e,n,r)}function Nv(e){return e=e|0,e|0}function MO(e,n,r){e=e|0,n=n|0,r=r|0,UO(e,n,r)}function Iw(e){return e=e|0,e+16|0}function kO(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;if(s=m,m=m+16|0,l=s+8|0,r=s,t[e>>2]=0,u=t[n>>2]|0,t[l>>2]=u,t[r>>2]=e,r=BO(r)|0,u|0){if(u=pn(12)|0,h=(Bw(l)|0)+4|0,e=t[h+4>>2]|0,n=u+4|0,t[n>>2]=t[h>>2],t[n+4>>2]=e,n=t[t[l>>2]>>2]|0,t[l>>2]=n,!n)e=u;else for(n=u;e=pn(12)|0,S=(Bw(l)|0)+4|0,D=t[S+4>>2]|0,h=e+4|0,t[h>>2]=t[S>>2],t[h+4>>2]=D,t[n>>2]=e,h=t[t[l>>2]>>2]|0,t[l>>2]=h,h;)n=e;t[e>>2]=t[r>>2],t[r>>2]=u}m=s}function NO(e,n,r){e=e|0,n=n|0,r=r|0,LO(e,n,r)}function bw(e){return e=e|0,e+24|0}function LO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+32|0,h=u+24|0,l=u+16|0,D=u+12|0,s=u,Ma(l),e=yo(e)|0,t[D>>2]=t[n>>2],mE(s,r),t[h>>2]=t[D>>2],FO(e,h,s),L1(s),ka(l),m=u}function FO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+32|0,h=u+16|0,D=u+12|0,l=u,s=go(PO()|0)|0,t[D>>2]=t[n>>2],t[h>>2]=t[D>>2],n=Yp(h)|0,t[l>>2]=t[r>>2],h=r+4|0,t[l+4>>2]=t[h>>2],D=r+8|0,t[l+8>>2]=t[D>>2],t[D>>2]=0,t[h>>2]=0,t[r>>2]=0,P0(0,s|0,e|0,n|0,gE(l)|0)|0,L1(l),m=u}function PO(){var e=0;return p[7976]|0||(IO(10720),e=7976,t[e>>2]=1,t[e+4>>2]=0),10720}function IO(e){e=e|0,ol(e,bO()|0,2)}function bO(){return 1732}function BO(e){return e=e|0,t[e>>2]|0}function Bw(e){return e=e|0,t[e>>2]|0}function UO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+32|0,s=u+16|0,l=u+8|0,h=u,Ma(l),e=yo(e)|0,t[h>>2]=t[n>>2],r=t[r>>2]|0,t[s>>2]=t[h>>2],Uw(e,s,r),ka(l),m=u}function Uw(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,s=u+4|0,h=u,l=go(jO()|0)|0,t[h>>2]=t[n>>2],t[s>>2]=t[h>>2],n=Yp(s)|0,P0(0,l|0,e|0,n|0,xw(r)|0)|0,m=u}function jO(){var e=0;return p[7984]|0||(zO(10732),e=7984,t[e>>2]=1,t[e+4>>2]=0),10732}function zO(e){e=e|0,ol(e,HO()|0,2)}function HO(){return 1744}function qO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+32|0,s=u+16|0,l=u+8|0,h=u,Ma(l),e=yo(e)|0,t[h>>2]=t[n>>2],r=t[r>>2]|0,t[s>>2]=t[h>>2],Uw(e,s,r),ka(l),m=u}function WO(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+32|0,h=l+16|0,s=l+8|0,D=l,Ma(s),e=yo(e)|0,t[D>>2]=t[n>>2],r=p[r>>0]|0,u=p[u>>0]|0,t[h>>2]=t[D>>2],VO(e,h,r,u),ka(s),m=l}function VO(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,h=l+4|0,D=l,s=go(GO()|0)|0,t[D>>2]=t[n>>2],t[h>>2]=t[D>>2],n=Yp(h)|0,r=Lv(r)|0,Hn(0,s|0,e|0,n|0,r|0,Lv(u)|0)|0,m=l}function GO(){var e=0;return p[7992]|0||(KO(10744),e=7992,t[e>>2]=1,t[e+4>>2]=0),10744}function Lv(e){return e=e|0,YO(e)|0}function YO(e){return e=e|0,e&255|0}function KO(e){e=e|0,ol(e,XO()|0,3)}function XO(){return 1756}function QO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;switch(K=m,m=m+32|0,D=K+8|0,S=K+4|0,N=K+20|0,M=K,Sa(e,0),u=YN(n)|0,t[D>>2]=0,I=D+4|0,t[I>>2]=0,t[D+8>>2]=0,u<<24>>24){case 0:{p[N>>0]=0,JO(S,r,N),s_(e,S)|0,U0(S);break}case 8:{I=TE(n)|0,p[N>>0]=8,Gf(M,t[I+4>>2]|0),ZO(S,r,N,M,I+8|0),s_(e,S)|0,U0(S);break}case 9:{if(s=TE(n)|0,n=t[s+4>>2]|0,n|0)for(h=D+8|0,l=s+12|0;n=n+-1|0,Gf(S,t[l>>2]|0),u=t[I>>2]|0,u>>>0<(t[h>>2]|0)>>>0?(t[u>>2]=t[S>>2],t[I>>2]=(t[I>>2]|0)+4):hE(D,S),n;)l=l+4|0;p[N>>0]=9,Gf(M,t[s+8>>2]|0),$O(S,r,N,M,D),s_(e,S)|0,U0(S);break}default:I=TE(n)|0,p[N>>0]=u,Gf(M,t[I+4>>2]|0),eM(S,r,N,M),s_(e,S)|0,U0(S)}L1(D),m=K}function JO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;u=m,m=m+16|0,l=u,Ma(l),n=yo(n)|0,pM(e,n,p[r>>0]|0),ka(l),m=u}function s_(e,n){e=e|0,n=n|0;var r=0;return r=t[e>>2]|0,r|0&&qr(r|0),t[e>>2]=t[n>>2],t[n>>2]=0,e|0}function ZO(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0;s=m,m=m+32|0,D=s+16|0,h=s+8|0,S=s,Ma(h),n=yo(n)|0,r=p[r>>0]|0,t[S>>2]=t[u>>2],l=t[l>>2]|0,t[D>>2]=t[S>>2],aM(e,n,r,D,l),ka(h),m=s}function $O(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,N=0;s=m,m=m+32|0,S=s+24|0,h=s+16|0,N=s+12|0,D=s,Ma(h),n=yo(n)|0,r=p[r>>0]|0,t[N>>2]=t[u>>2],mE(D,l),t[S>>2]=t[N>>2],uM(e,n,r,S,D),L1(D),ka(h),m=s}function eM(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+32|0,h=l+16|0,s=l+8|0,D=l,Ma(s),n=yo(n)|0,r=p[r>>0]|0,t[D>>2]=t[u>>2],t[h>>2]=t[D>>2],tM(e,n,r,h),ka(s),m=l}function tM(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,s=l+4|0,D=l,h=go(nM()|0)|0,r=Lv(r)|0,t[D>>2]=t[u>>2],t[s>>2]=t[D>>2],a_(e,P0(0,h|0,n|0,r|0,Yp(s)|0)|0),m=l}function nM(){var e=0;return p[8e3]|0||(rM(10756),e=8e3,t[e>>2]=1,t[e+4>>2]=0),10756}function a_(e,n){e=e|0,n=n|0,Sa(e,n)}function rM(e){e=e|0,ol(e,iM()|0,2)}function iM(){return 1772}function uM(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,N=0;s=m,m=m+32|0,S=s+16|0,N=s+12|0,h=s,D=go(oM()|0)|0,r=Lv(r)|0,t[N>>2]=t[u>>2],t[S>>2]=t[N>>2],u=Yp(S)|0,t[h>>2]=t[l>>2],S=l+4|0,t[h+4>>2]=t[S>>2],N=l+8|0,t[h+8>>2]=t[N>>2],t[N>>2]=0,t[S>>2]=0,t[l>>2]=0,a_(e,Hn(0,D|0,n|0,r|0,u|0,gE(h)|0)|0),L1(h),m=s}function oM(){var e=0;return p[8008]|0||(lM(10768),e=8008,t[e>>2]=1,t[e+4>>2]=0),10768}function lM(e){e=e|0,ol(e,sM()|0,3)}function sM(){return 1784}function aM(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0;s=m,m=m+16|0,D=s+4|0,S=s,h=go(fM()|0)|0,r=Lv(r)|0,t[S>>2]=t[u>>2],t[D>>2]=t[S>>2],u=Yp(D)|0,a_(e,Hn(0,h|0,n|0,r|0,u|0,yE(l)|0)|0),m=s}function fM(){var e=0;return p[8016]|0||(cM(10780),e=8016,t[e>>2]=1,t[e+4>>2]=0),10780}function cM(e){e=e|0,ol(e,dM()|0,3)}function dM(){return 1800}function pM(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=go(hM()|0)|0,a_(e,Ki(0,u|0,n|0,Lv(r)|0)|0)}function hM(){var e=0;return p[8024]|0||(vM(10792),e=8024,t[e>>2]=1,t[e+4>>2]=0),10792}function vM(e){e=e|0,ol(e,mM()|0,1)}function mM(){return 1816}function yM(){gM(),_M(),EM()}function gM(){t[2702]=p8(65536)|0}function _M(){jM(10856)}function EM(){DM(10816)}function DM(e){e=e|0,wM(e,5044),SM(e)|0}function wM(e,n){e=e|0,n=n|0;var r=0;r=Ow()|0,t[e>>2]=r,FM(r,n),$d(t[e>>2]|0)}function SM(e){e=e|0;var n=0;return n=t[e>>2]|0,Vp(n,TM()|0),e|0}function TM(){var e=0;return p[8032]|0||(jw(10820),Wt(64,10820,ve|0)|0,e=8032,t[e>>2]=1,t[e+4>>2]=0),sr(10820)|0||jw(10820),10820}function jw(e){e=e|0,RM(e),Gp(e,25)}function CM(e){e=e|0,xM(e+24|0)}function xM(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function RM(e){e=e|0;var n=0;n=yr()|0,jn(e,5,18,n,kM()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function AM(e,n){e=e|0,n=n|0,OM(e,n)}function OM(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;r=m,m=m+16|0,u=r,l=r+4|0,Pf(l,n),t[u>>2]=If(l,n)|0,MM(e,u),m=r}function MM(e,n){e=e|0,n=n|0,zw(e+4|0,t[n>>2]|0),p[e+8>>0]=1}function zw(e,n){e=e|0,n=n|0,t[e>>2]=n}function kM(){return 1824}function NM(e){return e=e|0,LM(e)|0}function LM(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0;return r=m,m=m+16|0,l=r+4|0,h=r,u=Oa(8)|0,n=u,D=pn(4)|0,Pf(l,e),zw(D,If(l,e)|0),s=n+4|0,t[s>>2]=D,e=pn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],Mw(e,s,l),t[u>>2]=e,m=r,n|0}function Oa(e){e=e|0;var n=0,r=0;return e=e+7&-8,(e>>>0<=32768?(n=t[2701]|0,e>>>0<=(65536-n|0)>>>0):0)?(r=(t[2702]|0)+n|0,t[2701]=n+e,e=r):(e=p8(e+8|0)|0,t[e>>2]=t[2703],t[2703]=e,e=e+8|0),e|0}function FM(e,n){e=e|0,n=n|0,t[e>>2]=PM()|0,t[e+4>>2]=IM()|0,t[e+12>>2]=n,t[e+8>>2]=bM()|0,t[e+32>>2]=9}function PM(){return 11744}function IM(){return 1832}function bM(){return o_()|0}function BM(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(zl(u,896)|0)==512?r|0&&(UM(r),_t(r)):n|0&&_t(n)}function UM(e){e=e|0,e=t[e+4>>2]|0,e|0&&e2(e)}function jM(e){e=e|0,zM(e,5052),HM(e)|0,qM(e,5058,26)|0,WM(e,5069,1)|0,VM(e,5077,10)|0,GM(e,5087,19)|0,YM(e,5094,27)|0}function zM(e,n){e=e|0,n=n|0;var r=0;r=UN()|0,t[e>>2]=r,jN(r,n),$d(t[e>>2]|0)}function HM(e){e=e|0;var n=0;return n=t[e>>2]|0,Vp(n,CN()|0),e|0}function qM(e,n,r){return e=e|0,n=n|0,r=r|0,lN(e,Fr(n)|0,r,0),e|0}function WM(e,n,r){return e=e|0,n=n|0,r=r|0,Gk(e,Fr(n)|0,r,0),e|0}function VM(e,n,r){return e=e|0,n=n|0,r=r|0,Tk(e,Fr(n)|0,r,0),e|0}function GM(e,n,r){return e=e|0,n=n|0,r=r|0,ak(e,Fr(n)|0,r,0),e|0}function Hw(e,n){e=e|0,n=n|0;var r=0,u=0;e:for(;;){for(r=t[2703]|0;;){if((r|0)==(n|0))break e;if(u=t[r>>2]|0,t[2703]=u,!r)r=u;else break}_t(r)}t[2701]=e}function YM(e,n,r){return e=e|0,n=n|0,r=r|0,KM(e,Fr(n)|0,r,0),e|0}function KM(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=_E()|0,e=XM(r)|0,wi(s,n,l,e,QM(r,u)|0,u)}function _E(){var e=0,n=0;if(p[8040]|0||(Ww(10860),Wt(65,10860,ve|0)|0,n=8040,t[n>>2]=1,t[n+4>>2]=0),!(sr(10860)|0)){e=10860,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Ww(10860)}return 10860}function XM(e){return e=e|0,e|0}function QM(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=_E()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(qw(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(JM(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function qw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function JM(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=ZM(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,$M(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,qw(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,ek(e,l),tk(l),m=D;return}}function ZM(e){return e=e|0,536870911}function $M(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function ek(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function tk(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function Ww(e){e=e|0,ik(e)}function nk(e){e=e|0,rk(e+24|0)}function rk(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function ik(e){e=e|0;var n=0;n=yr()|0,jn(e,1,11,n,uk()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function uk(){return 1840}function ok(e,n,r){e=e|0,n=n|0,r=r|0,sk(t[(lk(e)|0)>>2]|0,n,r)}function lk(e){return e=e|0,(t[(_E()|0)+24>>2]|0)+(e<<3)|0}function sk(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;u=m,m=m+16|0,s=u+1|0,l=u,Pf(s,n),n=If(s,n)|0,Pf(l,r),r=If(l,r)|0,P1[e&31](n,r),m=u}function ak(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=EE()|0,e=fk(r)|0,wi(s,n,l,e,ck(r,u)|0,u)}function EE(){var e=0,n=0;if(p[8048]|0||(Gw(10896),Wt(66,10896,ve|0)|0,n=8048,t[n>>2]=1,t[n+4>>2]=0),!(sr(10896)|0)){e=10896,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Gw(10896)}return 10896}function fk(e){return e=e|0,e|0}function ck(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=EE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(Vw(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(dk(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function Vw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function dk(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=pk(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,hk(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,Vw(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,vk(e,l),mk(l),m=D;return}}function pk(e){return e=e|0,536870911}function hk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function vk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function mk(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function Gw(e){e=e|0,_k(e)}function yk(e){e=e|0,gk(e+24|0)}function gk(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function _k(e){e=e|0;var n=0;n=yr()|0,jn(e,1,11,n,Ek()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Ek(){return 1852}function Dk(e,n){return e=e|0,n=n|0,Sk(t[(wk(e)|0)>>2]|0,n)|0}function wk(e){return e=e|0,(t[(EE()|0)+24>>2]|0)+(e<<3)|0}function Sk(e,n){e=e|0,n=n|0;var r=0,u=0;return r=m,m=m+16|0,u=r,Pf(u,n),n=If(u,n)|0,n=H0(Jp[e&31](n)|0)|0,m=r,n|0}function Tk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=DE()|0,e=Ck(r)|0,wi(s,n,l,e,xk(r,u)|0,u)}function DE(){var e=0,n=0;if(p[8056]|0||(Kw(10932),Wt(67,10932,ve|0)|0,n=8056,t[n>>2]=1,t[n+4>>2]=0),!(sr(10932)|0)){e=10932,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Kw(10932)}return 10932}function Ck(e){return e=e|0,e|0}function xk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=DE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(Yw(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(Rk(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function Yw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function Rk(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=Ak(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,Ok(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,Yw(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,Mk(e,l),kk(l),m=D;return}}function Ak(e){return e=e|0,536870911}function Ok(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function Mk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function kk(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function Kw(e){e=e|0,Fk(e)}function Nk(e){e=e|0,Lk(e+24|0)}function Lk(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function Fk(e){e=e|0;var n=0;n=yr()|0,jn(e,1,7,n,Pk()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Pk(){return 1860}function Ik(e,n,r){return e=e|0,n=n|0,r=r|0,Bk(t[(bk(e)|0)>>2]|0,n,r)|0}function bk(e){return e=e|0,(t[(DE()|0)+24>>2]|0)+(e<<3)|0}function Bk(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0;return u=m,m=m+32|0,h=u+12|0,s=u+8|0,D=u,S=u+16|0,l=u+4|0,Uk(S,n),jk(D,S,n),Ys(l,r),r=Ks(l,r)|0,t[h>>2]=t[D>>2],Ry[e&15](s,h,r),r=zk(s)|0,U0(s),Xs(l),m=u,r|0}function Uk(e,n){e=e|0,n=n|0}function jk(e,n,r){e=e|0,n=n|0,r=r|0,Hk(e,r)}function zk(e){return e=e|0,yo(e)|0}function Hk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;l=m,m=m+16|0,r=l,u=n,u&1?(qk(r,0),eu(u|0,r|0)|0,Wk(e,r),Vk(r)):t[e>>2]=t[n>>2],m=l}function qk(e,n){e=e|0,n=n|0,fd(e,n),t[e+4>>2]=0,p[e+8>>0]=0}function Wk(e,n){e=e|0,n=n|0,t[e>>2]=t[n+4>>2]}function Vk(e){e=e|0,p[e+8>>0]=0}function Gk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=wE()|0,e=Yk(r)|0,wi(s,n,l,e,Kk(r,u)|0,u)}function wE(){var e=0,n=0;if(p[8064]|0||(Qw(10968),Wt(68,10968,ve|0)|0,n=8064,t[n>>2]=1,t[n+4>>2]=0),!(sr(10968)|0)){e=10968,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Qw(10968)}return 10968}function Yk(e){return e=e|0,e|0}function Kk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=wE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(Xw(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(Xk(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function Xw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function Xk(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=Qk(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,Jk(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,Xw(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,Zk(e,l),$k(l),m=D;return}}function Qk(e){return e=e|0,536870911}function Jk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function Zk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function $k(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function Qw(e){e=e|0,nN(e)}function eN(e){e=e|0,tN(e+24|0)}function tN(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function nN(e){e=e|0;var n=0;n=yr()|0,jn(e,1,1,n,rN()|0,5),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function rN(){return 1872}function iN(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,oN(t[(uN(e)|0)>>2]|0,n,r,u,l,s)}function uN(e){return e=e|0,(t[(wE()|0)+24>>2]|0)+(e<<3)|0}function oN(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,N=0,M=0,I=0;h=m,m=m+32|0,D=h+16|0,S=h+12|0,N=h+8|0,M=h+4|0,I=h,Ys(D,n),n=Ks(D,n)|0,Ys(S,r),r=Ks(S,r)|0,Ys(N,u),u=Ks(N,u)|0,Ys(M,l),l=Ks(M,l)|0,Ys(I,s),s=Ks(I,s)|0,g8[e&1](n,r,u,l,s),Xs(I),Xs(M),Xs(N),Xs(S),Xs(D),m=h}function lN(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=SE()|0,e=sN(r)|0,wi(s,n,l,e,aN(r,u)|0,u)}function SE(){var e=0,n=0;if(p[8072]|0||(Zw(11004),Wt(69,11004,ve|0)|0,n=8072,t[n>>2]=1,t[n+4>>2]=0),!(sr(11004)|0)){e=11004,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Zw(11004)}return 11004}function sN(e){return e=e|0,e|0}function aN(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=SE()|0,h=S+24|0,n=hn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(Jw(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(fN(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function Jw(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function fN(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=cN(e)|0,u>>>0>>0)hi(e);else{S=t[e>>2]|0,M=(t[e+8>>2]|0)-S|0,N=M>>2,dN(l,M>>3>>>0>>1>>>0?N>>>0>>0?h:N:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,Jw(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,pN(e,l),hN(l),m=D;return}}function cN(e){return e=e|0,536870911}function dN(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)$n();else{l=pn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function pN(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(gr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function hN(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&_t(e)}function Zw(e){e=e|0,yN(e)}function vN(e){e=e|0,mN(e+24|0)}function mN(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function yN(e){e=e|0;var n=0;n=yr()|0,jn(e,1,12,n,gN()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function gN(){return 1896}function _N(e,n,r){e=e|0,n=n|0,r=r|0,DN(t[(EN(e)|0)>>2]|0,n,r)}function EN(e){return e=e|0,(t[(SE()|0)+24>>2]|0)+(e<<3)|0}function DN(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;u=m,m=m+16|0,s=u+4|0,l=u,wN(s,n),n=SN(s,n)|0,Ys(l,r),r=Ks(l,r)|0,P1[e&31](n,r),Xs(l),m=u}function wN(e,n){e=e|0,n=n|0}function SN(e,n){return e=e|0,n=n|0,TN(n)|0}function TN(e){return e=e|0,e|0}function CN(){var e=0;return p[8080]|0||($w(11040),Wt(70,11040,ve|0)|0,e=8080,t[e>>2]=1,t[e+4>>2]=0),sr(11040)|0||$w(11040),11040}function $w(e){e=e|0,AN(e),Gp(e,71)}function xN(e){e=e|0,RN(e+24|0)}function RN(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),_t(r))}function AN(e){e=e|0;var n=0;n=yr()|0,jn(e,5,7,n,NN()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function ON(e){e=e|0,MN(e)}function MN(e){e=e|0,kN(e)}function kN(e){e=e|0,p[e+8>>0]=1}function NN(){return 1936}function LN(){return FN()|0}function FN(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0;return n=m,m=m+16|0,l=n+4|0,h=n,r=Oa(8)|0,e=r,s=e+4|0,t[s>>2]=pn(1)|0,u=pn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],PN(u,s,l),t[r>>2]=u,m=n,e|0}function PN(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=pn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1916,t[r+12>>2]=n,t[e+4>>2]=r}function IN(e){e=e|0,Iv(e),_t(e)}function bN(e){e=e|0,e=t[e+12>>2]|0,e|0&&_t(e)}function BN(e){e=e|0,_t(e)}function UN(){var e=0;return p[8088]|0||(GN(11076),Wt(25,11076,ve|0)|0,e=8088,t[e>>2]=1,t[e+4>>2]=0),11076}function jN(e,n){e=e|0,n=n|0,t[e>>2]=zN()|0,t[e+4>>2]=HN()|0,t[e+12>>2]=n,t[e+8>>2]=qN()|0,t[e+32>>2]=10}function zN(){return 11745}function HN(){return 1940}function qN(){return N1()|0}function WN(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(zl(u,896)|0)==512?r|0&&(VN(r),_t(r)):n|0&&_t(n)}function VN(e){e=e|0,e=t[e+4>>2]|0,e|0&&e2(e)}function GN(e){e=e|0,Xa(e)}function Gf(e,n){e=e|0,n=n|0,t[e>>2]=n}function TE(e){return e=e|0,t[e>>2]|0}function YN(e){return e=e|0,p[t[e>>2]>>0]|0}function KN(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,t[u>>2]=t[e>>2],XN(n,u)|0,m=r}function XN(e,n){e=e|0,n=n|0;var r=0;return r=QN(t[e>>2]|0,n)|0,n=e+4|0,t[(t[n>>2]|0)+8>>2]=r,t[(t[n>>2]|0)+8>>2]|0}function QN(e,n){e=e|0,n=n|0;var r=0,u=0;return r=m,m=m+16|0,u=r,Ma(u),e=yo(e)|0,n=JN(e,t[n>>2]|0)|0,ka(u),m=r,n|0}function Ma(e){e=e|0,t[e>>2]=t[2701],t[e+4>>2]=t[2703]}function JN(e,n){e=e|0,n=n|0;var r=0;return r=go(ZN()|0)|0,Ki(0,r|0,e|0,yE(n)|0)|0}function ka(e){e=e|0,Hw(t[e>>2]|0,t[e+4>>2]|0)}function ZN(){var e=0;return p[8096]|0||($N(11120),e=8096,t[e>>2]=1,t[e+4>>2]=0),11120}function $N(e){e=e|0,ol(e,eL()|0,1)}function eL(){return 1948}function tL(){nL()}function nL(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0,Se=0,ye=0;if(Se=m,m=m+16|0,M=Se+4|0,I=Se,bn(65536,10804,t[2702]|0,10812),r=Sw()|0,n=t[r>>2]|0,e=t[n>>2]|0,e|0)for(u=t[r+8>>2]|0,r=t[r+4>>2]|0;Xl(e|0,k[r>>0]|0|0,p[u>>0]|0),n=n+4|0,e=t[n>>2]|0,e;)u=u+1|0,r=r+1|0;if(e=Tw()|0,n=t[e>>2]|0,n|0)do Mo(n|0,t[e+4>>2]|0),e=e+8|0,n=t[e>>2]|0;while((n|0)!=0);Mo(rL()|0,5167),N=kv()|0,e=t[N>>2]|0;e:do if(e|0){do iL(t[e+4>>2]|0),e=t[e>>2]|0;while((e|0)!=0);if(e=t[N>>2]|0,e|0){S=N;do{for(;l=e,e=t[e>>2]|0,l=t[l+4>>2]|0,!!(uL(l)|0);)if(t[I>>2]=S,t[M>>2]=t[I>>2],oL(N,M)|0,!e)break e;if(lL(l),S=t[S>>2]|0,n=e8(l)|0,s=ao()|0,h=m,m=m+((1*(n<<2)|0)+15&-16)|0,D=m,m=m+((1*(n<<2)|0)+15&-16)|0,n=t[(Iw(l)|0)>>2]|0,n|0)for(r=h,u=D;t[r>>2]=t[(Nv(t[n+4>>2]|0)|0)>>2],t[u>>2]=t[n+8>>2],n=t[n>>2]|0,n;)r=r+4|0,u=u+4|0;ye=Nv(l)|0,n=sL(l)|0,r=e8(l)|0,u=aL(l)|0,ko(ye|0,n|0,h|0,D|0,r|0,u|0,cE(l)|0),gi(s|0)}while((e|0)!=0)}}while(0);if(e=t[(dE()|0)>>2]|0,e|0)do ye=e+4|0,N=pE(ye)|0,l=Sy(N)|0,s=Dy(N)|0,h=(wy(N)|0)+1|0,D=f_(N)|0,S=t8(ye)|0,N=sr(N)|0,M=l_(ye)|0,I=CE(ye)|0,so(0,l|0,s|0,h|0,D|0,S|0,N|0,M|0,I|0,xE(ye)|0),e=t[e>>2]|0;while((e|0)!=0);e=t[(kv()|0)>>2]|0;e:do if(e|0){t:for(;;){if(n=t[e+4>>2]|0,n|0?(K=t[(Nv(n)|0)>>2]|0,be=t[(bw(n)|0)>>2]|0,be|0):0){r=be;do{n=r+4|0,u=pE(n)|0;n:do if(u|0)switch(sr(u)|0){case 0:break t;case 4:case 3:case 2:{D=Sy(u)|0,S=Dy(u)|0,N=(wy(u)|0)+1|0,M=f_(u)|0,I=sr(u)|0,ye=l_(n)|0,so(K|0,D|0,S|0,N|0,M|0,0,I|0,ye|0,CE(n)|0,xE(n)|0);break n}case 1:{h=Sy(u)|0,D=Dy(u)|0,S=(wy(u)|0)+1|0,N=f_(u)|0,M=t8(n)|0,I=sr(u)|0,ye=l_(n)|0,so(K|0,h|0,D|0,S|0,N|0,M|0,I|0,ye|0,CE(n)|0,xE(n)|0);break n}case 5:{N=Sy(u)|0,M=Dy(u)|0,I=(wy(u)|0)+1|0,ye=f_(u)|0,so(K|0,N|0,M|0,I|0,ye|0,fL(u)|0,sr(u)|0,0,0,0);break n}default:break n}while(0);r=t[r>>2]|0}while((r|0)!=0)}if(e=t[e>>2]|0,!e)break e}$n()}while(0);Is(),m=Se}function rL(){return 11703}function iL(e){e=e|0,p[e+40>>0]=0}function uL(e){return e=e|0,(p[e+40>>0]|0)!=0|0}function oL(e,n){return e=e|0,n=n|0,n=cL(n)|0,e=t[n>>2]|0,t[n>>2]=t[e>>2],_t(e),t[n>>2]|0}function lL(e){e=e|0,p[e+40>>0]=1}function e8(e){return e=e|0,t[e+20>>2]|0}function sL(e){return e=e|0,t[e+8>>2]|0}function aL(e){return e=e|0,t[e+32>>2]|0}function f_(e){return e=e|0,t[e+4>>2]|0}function t8(e){return e=e|0,t[e+4>>2]|0}function CE(e){return e=e|0,t[e+8>>2]|0}function xE(e){return e=e|0,t[e+16>>2]|0}function fL(e){return e=e|0,t[e+20>>2]|0}function cL(e){return e=e|0,t[e>>2]|0}function c_(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0,Se=0,ye=0,Je=0,Ge=0,ft=0,Me=0,Pe=0,Zt=0;Zt=m,m=m+16|0,K=Zt;do if(e>>>0<245){if(N=e>>>0<11?16:e+11&-8,e=N>>>3,I=t[2783]|0,r=I>>>e,r&3|0)return n=(r&1^1)+e|0,e=11172+(n<<1<<2)|0,r=e+8|0,u=t[r>>2]|0,l=u+8|0,s=t[l>>2]|0,(e|0)==(s|0)?t[2783]=I&~(1<>2]=e,t[r>>2]=s),Pe=n<<3,t[u+4>>2]=Pe|3,Pe=u+Pe+4|0,t[Pe>>2]=t[Pe>>2]|1,Pe=l,m=Zt,Pe|0;if(M=t[2785]|0,N>>>0>M>>>0){if(r|0)return n=2<>>12&16,n=n>>>h,r=n>>>5&8,n=n>>>r,l=n>>>2&4,n=n>>>l,e=n>>>1&2,n=n>>>e,u=n>>>1&1,u=(r|h|l|e|u)+(n>>>u)|0,n=11172+(u<<1<<2)|0,e=n+8|0,l=t[e>>2]|0,h=l+8|0,r=t[h>>2]|0,(n|0)==(r|0)?(e=I&~(1<>2]=n,t[e>>2]=r,e=I),s=(u<<3)-N|0,t[l+4>>2]=N|3,u=l+N|0,t[u+4>>2]=s|1,t[u+s>>2]=s,M|0&&(l=t[2788]|0,n=M>>>3,r=11172+(n<<1<<2)|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=l,t[n+12>>2]=l,t[l+8>>2]=n,t[l+12>>2]=r),t[2785]=s,t[2788]=u,Pe=h,m=Zt,Pe|0;if(D=t[2784]|0,D){if(r=(D&0-D)+-1|0,h=r>>>12&16,r=r>>>h,s=r>>>5&8,r=r>>>s,S=r>>>2&4,r=r>>>S,u=r>>>1&2,r=r>>>u,e=r>>>1&1,e=t[11436+((s|h|S|u|e)+(r>>>e)<<2)>>2]|0,r=(t[e+4>>2]&-8)-N|0,u=t[e+16+(((t[e+16>>2]|0)==0&1)<<2)>>2]|0,!u)S=e,s=r;else{do h=(t[u+4>>2]&-8)-N|0,S=h>>>0>>0,r=S?h:r,e=S?u:e,u=t[u+16+(((t[u+16>>2]|0)==0&1)<<2)>>2]|0;while((u|0)!=0);S=e,s=r}if(h=S+N|0,S>>>0>>0){l=t[S+24>>2]|0,n=t[S+12>>2]|0;do if((n|0)==(S|0)){if(e=S+20|0,n=t[e>>2]|0,!n&&(e=S+16|0,n=t[e>>2]|0,!n)){r=0;break}for(;;){if(r=n+20|0,u=t[r>>2]|0,u|0){n=u,e=r;continue}if(r=n+16|0,u=t[r>>2]|0,u)n=u,e=r;else break}t[e>>2]=0,r=n}else r=t[S+8>>2]|0,t[r+12>>2]=n,t[n+8>>2]=r,r=n;while(0);do if(l|0){if(n=t[S+28>>2]|0,e=11436+(n<<2)|0,(S|0)==(t[e>>2]|0)){if(t[e>>2]=r,!r){t[2784]=D&~(1<>2]|0)!=(S|0)&1)<<2)>>2]=r,!r)break;t[r+24>>2]=l,n=t[S+16>>2]|0,n|0&&(t[r+16>>2]=n,t[n+24>>2]=r),n=t[S+20>>2]|0,n|0&&(t[r+20>>2]=n,t[n+24>>2]=r)}while(0);return s>>>0<16?(Pe=s+N|0,t[S+4>>2]=Pe|3,Pe=S+Pe+4|0,t[Pe>>2]=t[Pe>>2]|1):(t[S+4>>2]=N|3,t[h+4>>2]=s|1,t[h+s>>2]=s,M|0&&(u=t[2788]|0,n=M>>>3,r=11172+(n<<1<<2)|0,n=1<>2]|0):(t[2783]=I|n,n=r,e=r+8|0),t[e>>2]=u,t[n+12>>2]=u,t[u+8>>2]=n,t[u+12>>2]=r),t[2785]=s,t[2788]=h),Pe=S+8|0,m=Zt,Pe|0}else I=N}else I=N}else I=N}else if(e>>>0<=4294967231)if(e=e+11|0,N=e&-8,S=t[2784]|0,S){u=0-N|0,e=e>>>8,e?N>>>0>16777215?D=31:(I=(e+1048320|0)>>>16&8,Me=e<>>16&4,Me=Me<>>16&2,D=14-(M|I|D)+(Me<>>15)|0,D=N>>>(D+7|0)&1|D<<1):D=0,r=t[11436+(D<<2)>>2]|0;e:do if(!r)r=0,e=0,Me=57;else for(e=0,h=N<<((D|0)==31?0:25-(D>>>1)|0),s=0;;){if(l=(t[r+4>>2]&-8)-N|0,l>>>0>>0)if(l)e=r,u=l;else{e=r,u=0,l=r,Me=61;break e}if(l=t[r+20>>2]|0,r=t[r+16+(h>>>31<<2)>>2]|0,s=(l|0)==0|(l|0)==(r|0)?s:l,l=(r|0)==0,l){r=s,Me=57;break}else h=h<<((l^1)&1)}while(0);if((Me|0)==57){if((r|0)==0&(e|0)==0){if(e=2<>>12&16,I=I>>>h,s=I>>>5&8,I=I>>>s,D=I>>>2&4,I=I>>>D,M=I>>>1&2,I=I>>>M,r=I>>>1&1,e=0,r=t[11436+((s|h|D|M|r)+(I>>>r)<<2)>>2]|0}r?(l=r,Me=61):(D=e,h=u)}if((Me|0)==61)for(;;)if(Me=0,r=(t[l+4>>2]&-8)-N|0,I=r>>>0>>0,r=I?r:u,e=I?l:e,l=t[l+16+(((t[l+16>>2]|0)==0&1)<<2)>>2]|0,l)u=r,Me=61;else{D=e,h=r;break}if((D|0)!=0?h>>>0<((t[2785]|0)-N|0)>>>0:0){if(s=D+N|0,D>>>0>=s>>>0)return Pe=0,m=Zt,Pe|0;l=t[D+24>>2]|0,n=t[D+12>>2]|0;do if((n|0)==(D|0)){if(e=D+20|0,n=t[e>>2]|0,!n&&(e=D+16|0,n=t[e>>2]|0,!n)){n=0;break}for(;;){if(r=n+20|0,u=t[r>>2]|0,u|0){n=u,e=r;continue}if(r=n+16|0,u=t[r>>2]|0,u)n=u,e=r;else break}t[e>>2]=0}else Pe=t[D+8>>2]|0,t[Pe+12>>2]=n,t[n+8>>2]=Pe;while(0);do if(l){if(e=t[D+28>>2]|0,r=11436+(e<<2)|0,(D|0)==(t[r>>2]|0)){if(t[r>>2]=n,!n){u=S&~(1<>2]|0)!=(D|0)&1)<<2)>>2]=n,!n){u=S;break}t[n+24>>2]=l,e=t[D+16>>2]|0,e|0&&(t[n+16>>2]=e,t[e+24>>2]=n),e=t[D+20>>2]|0,e&&(t[n+20>>2]=e,t[e+24>>2]=n),u=S}else u=S;while(0);do if(h>>>0>=16){if(t[D+4>>2]=N|3,t[s+4>>2]=h|1,t[s+h>>2]=h,n=h>>>3,h>>>0<256){r=11172+(n<<1<<2)|0,e=t[2783]|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=s,t[n+12>>2]=s,t[s+8>>2]=n,t[s+12>>2]=r;break}if(n=h>>>8,n?h>>>0>16777215?n=31:(Me=(n+1048320|0)>>>16&8,Pe=n<>>16&4,Pe=Pe<>>16&2,n=14-(ft|Me|n)+(Pe<>>15)|0,n=h>>>(n+7|0)&1|n<<1):n=0,r=11436+(n<<2)|0,t[s+28>>2]=n,e=s+16|0,t[e+4>>2]=0,t[e>>2]=0,e=1<>2]=s,t[s+24>>2]=r,t[s+12>>2]=s,t[s+8>>2]=s;break}for(e=h<<((n|0)==31?0:25-(n>>>1)|0),r=t[r>>2]|0;;){if((t[r+4>>2]&-8|0)==(h|0)){Me=97;break}if(u=r+16+(e>>>31<<2)|0,n=t[u>>2]|0,n)e=e<<1,r=n;else{Me=96;break}}if((Me|0)==96){t[u>>2]=s,t[s+24>>2]=r,t[s+12>>2]=s,t[s+8>>2]=s;break}else if((Me|0)==97){Me=r+8|0,Pe=t[Me>>2]|0,t[Pe+12>>2]=s,t[Me>>2]=s,t[s+8>>2]=Pe,t[s+12>>2]=r,t[s+24>>2]=0;break}}else Pe=h+N|0,t[D+4>>2]=Pe|3,Pe=D+Pe+4|0,t[Pe>>2]=t[Pe>>2]|1;while(0);return Pe=D+8|0,m=Zt,Pe|0}else I=N}else I=N;else I=-1;while(0);if(r=t[2785]|0,r>>>0>=I>>>0)return n=r-I|0,e=t[2788]|0,n>>>0>15?(Pe=e+I|0,t[2788]=Pe,t[2785]=n,t[Pe+4>>2]=n|1,t[Pe+n>>2]=n,t[e+4>>2]=I|3):(t[2785]=0,t[2788]=0,t[e+4>>2]=r|3,Pe=e+r+4|0,t[Pe>>2]=t[Pe>>2]|1),Pe=e+8|0,m=Zt,Pe|0;if(h=t[2786]|0,h>>>0>I>>>0)return ft=h-I|0,t[2786]=ft,Pe=t[2789]|0,Me=Pe+I|0,t[2789]=Me,t[Me+4>>2]=ft|1,t[Pe+4>>2]=I|3,Pe=Pe+8|0,m=Zt,Pe|0;if(t[2901]|0?e=t[2903]|0:(t[2903]=4096,t[2902]=4096,t[2904]=-1,t[2905]=-1,t[2906]=0,t[2894]=0,e=K&-16^1431655768,t[K>>2]=e,t[2901]=e,e=4096),D=I+48|0,S=I+47|0,s=e+S|0,l=0-e|0,N=s&l,N>>>0<=I>>>0||(e=t[2893]|0,e|0?(M=t[2891]|0,K=M+N|0,K>>>0<=M>>>0|K>>>0>e>>>0):0))return Pe=0,m=Zt,Pe|0;e:do if(t[2894]&4)n=0,Me=133;else{r=t[2789]|0;t:do if(r){for(u=11580;e=t[u>>2]|0,!(e>>>0<=r>>>0?(ye=u+4|0,(e+(t[ye>>2]|0)|0)>>>0>r>>>0):0);)if(e=t[u+8>>2]|0,e)u=e;else{Me=118;break t}if(n=s-h&l,n>>>0<2147483647)if(e=t2(n|0)|0,(e|0)==((t[u>>2]|0)+(t[ye>>2]|0)|0)){if((e|0)!=(-1|0)){h=n,s=e,Me=135;break e}}else u=e,Me=126;else n=0}else Me=118;while(0);do if((Me|0)==118)if(r=t2(0)|0,(r|0)!=(-1|0)?(n=r,be=t[2902]|0,Se=be+-1|0,n=((Se&n|0)==0?0:(Se+n&0-be)-n|0)+N|0,be=t[2891]|0,Se=n+be|0,n>>>0>I>>>0&n>>>0<2147483647):0){if(ye=t[2893]|0,ye|0?Se>>>0<=be>>>0|Se>>>0>ye>>>0:0){n=0;break}if(e=t2(n|0)|0,(e|0)==(r|0)){h=n,s=r,Me=135;break e}else u=e,Me=126}else n=0;while(0);do if((Me|0)==126){if(r=0-n|0,!(D>>>0>n>>>0&(n>>>0<2147483647&(u|0)!=(-1|0))))if((u|0)==(-1|0)){n=0;break}else{h=n,s=u,Me=135;break e}if(e=t[2903]|0,e=S-n+e&0-e,e>>>0>=2147483647){h=n,s=u,Me=135;break e}if((t2(e|0)|0)==(-1|0)){t2(r|0)|0,n=0;break}else{h=e+n|0,s=u,Me=135;break e}}while(0);t[2894]=t[2894]|4,Me=133}while(0);if((((Me|0)==133?N>>>0<2147483647:0)?(ft=t2(N|0)|0,ye=t2(0)|0,Je=ye-ft|0,Ge=Je>>>0>(I+40|0)>>>0,!((ft|0)==(-1|0)|Ge^1|ft>>>0>>0&((ft|0)!=(-1|0)&(ye|0)!=(-1|0))^1)):0)&&(h=Ge?Je:n,s=ft,Me=135),(Me|0)==135){n=(t[2891]|0)+h|0,t[2891]=n,n>>>0>(t[2892]|0)>>>0&&(t[2892]=n),S=t[2789]|0;do if(S){for(n=11580;;){if(e=t[n>>2]|0,r=n+4|0,u=t[r>>2]|0,(s|0)==(e+u|0)){Me=145;break}if(l=t[n+8>>2]|0,l)n=l;else break}if(((Me|0)==145?(t[n+12>>2]&8|0)==0:0)?S>>>0>>0&S>>>0>=e>>>0:0){t[r>>2]=u+h,Pe=S+8|0,Pe=(Pe&7|0)==0?0:0-Pe&7,Me=S+Pe|0,Pe=(t[2786]|0)+(h-Pe)|0,t[2789]=Me,t[2786]=Pe,t[Me+4>>2]=Pe|1,t[Me+Pe+4>>2]=40,t[2790]=t[2905];break}for(s>>>0<(t[2787]|0)>>>0&&(t[2787]=s),r=s+h|0,n=11580;;){if((t[n>>2]|0)==(r|0)){Me=153;break}if(e=t[n+8>>2]|0,e)n=e;else break}if((Me|0)==153?(t[n+12>>2]&8|0)==0:0){t[n>>2]=s,M=n+4|0,t[M>>2]=(t[M>>2]|0)+h,M=s+8|0,M=s+((M&7|0)==0?0:0-M&7)|0,n=r+8|0,n=r+((n&7|0)==0?0:0-n&7)|0,N=M+I|0,D=n-M-I|0,t[M+4>>2]=I|3;do if((n|0)!=(S|0)){if((n|0)==(t[2788]|0)){Pe=(t[2785]|0)+D|0,t[2785]=Pe,t[2788]=N,t[N+4>>2]=Pe|1,t[N+Pe>>2]=Pe;break}if(e=t[n+4>>2]|0,(e&3|0)==1){h=e&-8,u=e>>>3;e:do if(e>>>0<256)if(e=t[n+8>>2]|0,r=t[n+12>>2]|0,(r|0)==(e|0)){t[2783]=t[2783]&~(1<>2]=r,t[r+8>>2]=e;break}else{s=t[n+24>>2]|0,e=t[n+12>>2]|0;do if((e|0)==(n|0)){if(u=n+16|0,r=u+4|0,e=t[r>>2]|0,!e)if(e=t[u>>2]|0,e)r=u;else{e=0;break}for(;;){if(u=e+20|0,l=t[u>>2]|0,l|0){e=l,r=u;continue}if(u=e+16|0,l=t[u>>2]|0,l)e=l,r=u;else break}t[r>>2]=0}else Pe=t[n+8>>2]|0,t[Pe+12>>2]=e,t[e+8>>2]=Pe;while(0);if(!s)break;r=t[n+28>>2]|0,u=11436+(r<<2)|0;do if((n|0)!=(t[u>>2]|0)){if(t[s+16+(((t[s+16>>2]|0)!=(n|0)&1)<<2)>>2]=e,!e)break e}else{if(t[u>>2]=e,e|0)break;t[2784]=t[2784]&~(1<>2]=s,r=n+16|0,u=t[r>>2]|0,u|0&&(t[e+16>>2]=u,t[u+24>>2]=e),r=t[r+4>>2]|0,!r)break;t[e+20>>2]=r,t[r+24>>2]=e}while(0);n=n+h|0,l=h+D|0}else l=D;if(n=n+4|0,t[n>>2]=t[n>>2]&-2,t[N+4>>2]=l|1,t[N+l>>2]=l,n=l>>>3,l>>>0<256){r=11172+(n<<1<<2)|0,e=t[2783]|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=N,t[n+12>>2]=N,t[N+8>>2]=n,t[N+12>>2]=r;break}n=l>>>8;do if(!n)n=0;else{if(l>>>0>16777215){n=31;break}Me=(n+1048320|0)>>>16&8,Pe=n<>>16&4,Pe=Pe<>>16&2,n=14-(ft|Me|n)+(Pe<>>15)|0,n=l>>>(n+7|0)&1|n<<1}while(0);if(u=11436+(n<<2)|0,t[N+28>>2]=n,e=N+16|0,t[e+4>>2]=0,t[e>>2]=0,e=t[2784]|0,r=1<>2]=N,t[N+24>>2]=u,t[N+12>>2]=N,t[N+8>>2]=N;break}for(e=l<<((n|0)==31?0:25-(n>>>1)|0),r=t[u>>2]|0;;){if((t[r+4>>2]&-8|0)==(l|0)){Me=194;break}if(u=r+16+(e>>>31<<2)|0,n=t[u>>2]|0,n)e=e<<1,r=n;else{Me=193;break}}if((Me|0)==193){t[u>>2]=N,t[N+24>>2]=r,t[N+12>>2]=N,t[N+8>>2]=N;break}else if((Me|0)==194){Me=r+8|0,Pe=t[Me>>2]|0,t[Pe+12>>2]=N,t[Me>>2]=N,t[N+8>>2]=Pe,t[N+12>>2]=r,t[N+24>>2]=0;break}}else Pe=(t[2786]|0)+D|0,t[2786]=Pe,t[2789]=N,t[N+4>>2]=Pe|1;while(0);return Pe=M+8|0,m=Zt,Pe|0}for(n=11580;e=t[n>>2]|0,!(e>>>0<=S>>>0?(Pe=e+(t[n+4>>2]|0)|0,Pe>>>0>S>>>0):0);)n=t[n+8>>2]|0;l=Pe+-47|0,e=l+8|0,e=l+((e&7|0)==0?0:0-e&7)|0,l=S+16|0,e=e>>>0>>0?S:e,n=e+8|0,r=s+8|0,r=(r&7|0)==0?0:0-r&7,Me=s+r|0,r=h+-40-r|0,t[2789]=Me,t[2786]=r,t[Me+4>>2]=r|1,t[Me+r+4>>2]=40,t[2790]=t[2905],r=e+4|0,t[r>>2]=27,t[n>>2]=t[2895],t[n+4>>2]=t[2896],t[n+8>>2]=t[2897],t[n+12>>2]=t[2898],t[2895]=s,t[2896]=h,t[2898]=0,t[2897]=n,n=e+24|0;do Me=n,n=n+4|0,t[n>>2]=7;while((Me+8|0)>>>0>>0);if((e|0)!=(S|0)){if(s=e-S|0,t[r>>2]=t[r>>2]&-2,t[S+4>>2]=s|1,t[e>>2]=s,n=s>>>3,s>>>0<256){r=11172+(n<<1<<2)|0,e=t[2783]|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=S,t[n+12>>2]=S,t[S+8>>2]=n,t[S+12>>2]=r;break}if(n=s>>>8,n?s>>>0>16777215?r=31:(Me=(n+1048320|0)>>>16&8,Pe=n<>>16&4,Pe=Pe<>>16&2,r=14-(ft|Me|r)+(Pe<>>15)|0,r=s>>>(r+7|0)&1|r<<1):r=0,u=11436+(r<<2)|0,t[S+28>>2]=r,t[S+20>>2]=0,t[l>>2]=0,n=t[2784]|0,e=1<>2]=S,t[S+24>>2]=u,t[S+12>>2]=S,t[S+8>>2]=S;break}for(e=s<<((r|0)==31?0:25-(r>>>1)|0),r=t[u>>2]|0;;){if((t[r+4>>2]&-8|0)==(s|0)){Me=216;break}if(u=r+16+(e>>>31<<2)|0,n=t[u>>2]|0,n)e=e<<1,r=n;else{Me=215;break}}if((Me|0)==215){t[u>>2]=S,t[S+24>>2]=r,t[S+12>>2]=S,t[S+8>>2]=S;break}else if((Me|0)==216){Me=r+8|0,Pe=t[Me>>2]|0,t[Pe+12>>2]=S,t[Me>>2]=S,t[S+8>>2]=Pe,t[S+12>>2]=r,t[S+24>>2]=0;break}}}else{Pe=t[2787]|0,(Pe|0)==0|s>>>0>>0&&(t[2787]=s),t[2895]=s,t[2896]=h,t[2898]=0,t[2792]=t[2901],t[2791]=-1,n=0;do Pe=11172+(n<<1<<2)|0,t[Pe+12>>2]=Pe,t[Pe+8>>2]=Pe,n=n+1|0;while((n|0)!=32);Pe=s+8|0,Pe=(Pe&7|0)==0?0:0-Pe&7,Me=s+Pe|0,Pe=h+-40-Pe|0,t[2789]=Me,t[2786]=Pe,t[Me+4>>2]=Pe|1,t[Me+Pe+4>>2]=40,t[2790]=t[2905]}while(0);if(n=t[2786]|0,n>>>0>I>>>0)return ft=n-I|0,t[2786]=ft,Pe=t[2789]|0,Me=Pe+I|0,t[2789]=Me,t[Me+4>>2]=ft|1,t[Pe+4>>2]=I|3,Pe=Pe+8|0,m=Zt,Pe|0}return t[(Fv()|0)>>2]=12,Pe=0,m=Zt,Pe|0}function d_(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0;if(!!e){r=e+-8|0,l=t[2787]|0,e=t[e+-4>>2]|0,n=e&-8,S=r+n|0;do if(e&1)D=r,h=r;else{if(u=t[r>>2]|0,!(e&3)||(h=r+(0-u)|0,s=u+n|0,h>>>0>>0))return;if((h|0)==(t[2788]|0)){if(e=S+4|0,n=t[e>>2]|0,(n&3|0)!=3){D=h,n=s;break}t[2785]=s,t[e>>2]=n&-2,t[h+4>>2]=s|1,t[h+s>>2]=s;return}if(r=u>>>3,u>>>0<256)if(e=t[h+8>>2]|0,n=t[h+12>>2]|0,(n|0)==(e|0)){t[2783]=t[2783]&~(1<>2]=n,t[n+8>>2]=e,D=h,n=s;break}l=t[h+24>>2]|0,e=t[h+12>>2]|0;do if((e|0)==(h|0)){if(r=h+16|0,n=r+4|0,e=t[n>>2]|0,!e)if(e=t[r>>2]|0,e)n=r;else{e=0;break}for(;;){if(r=e+20|0,u=t[r>>2]|0,u|0){e=u,n=r;continue}if(r=e+16|0,u=t[r>>2]|0,u)e=u,n=r;else break}t[n>>2]=0}else D=t[h+8>>2]|0,t[D+12>>2]=e,t[e+8>>2]=D;while(0);if(l){if(n=t[h+28>>2]|0,r=11436+(n<<2)|0,(h|0)==(t[r>>2]|0)){if(t[r>>2]=e,!e){t[2784]=t[2784]&~(1<>2]|0)!=(h|0)&1)<<2)>>2]=e,!e){D=h,n=s;break}t[e+24>>2]=l,n=h+16|0,r=t[n>>2]|0,r|0&&(t[e+16>>2]=r,t[r+24>>2]=e),n=t[n+4>>2]|0,n?(t[e+20>>2]=n,t[n+24>>2]=e,D=h,n=s):(D=h,n=s)}else D=h,n=s}while(0);if(!(h>>>0>=S>>>0)&&(e=S+4|0,u=t[e>>2]|0,!!(u&1))){if(u&2)t[e>>2]=u&-2,t[D+4>>2]=n|1,t[h+n>>2]=n,l=n;else{if(e=t[2788]|0,(S|0)==(t[2789]|0)){if(S=(t[2786]|0)+n|0,t[2786]=S,t[2789]=D,t[D+4>>2]=S|1,(D|0)!=(e|0))return;t[2788]=0,t[2785]=0;return}if((S|0)==(e|0)){S=(t[2785]|0)+n|0,t[2785]=S,t[2788]=h,t[D+4>>2]=S|1,t[h+S>>2]=S;return}l=(u&-8)+n|0,r=u>>>3;do if(u>>>0<256)if(n=t[S+8>>2]|0,e=t[S+12>>2]|0,(e|0)==(n|0)){t[2783]=t[2783]&~(1<>2]=e,t[e+8>>2]=n;break}else{s=t[S+24>>2]|0,e=t[S+12>>2]|0;do if((e|0)==(S|0)){if(r=S+16|0,n=r+4|0,e=t[n>>2]|0,!e)if(e=t[r>>2]|0,e)n=r;else{r=0;break}for(;;){if(r=e+20|0,u=t[r>>2]|0,u|0){e=u,n=r;continue}if(r=e+16|0,u=t[r>>2]|0,u)e=u,n=r;else break}t[n>>2]=0,r=e}else r=t[S+8>>2]|0,t[r+12>>2]=e,t[e+8>>2]=r,r=e;while(0);if(s|0){if(e=t[S+28>>2]|0,n=11436+(e<<2)|0,(S|0)==(t[n>>2]|0)){if(t[n>>2]=r,!r){t[2784]=t[2784]&~(1<>2]|0)!=(S|0)&1)<<2)>>2]=r,!r)break;t[r+24>>2]=s,e=S+16|0,n=t[e>>2]|0,n|0&&(t[r+16>>2]=n,t[n+24>>2]=r),e=t[e+4>>2]|0,e|0&&(t[r+20>>2]=e,t[e+24>>2]=r)}}while(0);if(t[D+4>>2]=l|1,t[h+l>>2]=l,(D|0)==(t[2788]|0)){t[2785]=l;return}}if(e=l>>>3,l>>>0<256){r=11172+(e<<1<<2)|0,n=t[2783]|0,e=1<>2]|0):(t[2783]=n|e,e=r,n=r+8|0),t[n>>2]=D,t[e+12>>2]=D,t[D+8>>2]=e,t[D+12>>2]=r;return}e=l>>>8,e?l>>>0>16777215?e=31:(h=(e+1048320|0)>>>16&8,S=e<>>16&4,S=S<>>16&2,e=14-(s|h|e)+(S<>>15)|0,e=l>>>(e+7|0)&1|e<<1):e=0,u=11436+(e<<2)|0,t[D+28>>2]=e,t[D+20>>2]=0,t[D+16>>2]=0,n=t[2784]|0,r=1<>>1)|0),r=t[u>>2]|0;;){if((t[r+4>>2]&-8|0)==(l|0)){e=73;break}if(u=r+16+(n>>>31<<2)|0,e=t[u>>2]|0,e)n=n<<1,r=e;else{e=72;break}}if((e|0)==72){t[u>>2]=D,t[D+24>>2]=r,t[D+12>>2]=D,t[D+8>>2]=D;break}else if((e|0)==73){h=r+8|0,S=t[h>>2]|0,t[S+12>>2]=D,t[h>>2]=D,t[D+8>>2]=S,t[D+12>>2]=r,t[D+24>>2]=0;break}}else t[2784]=n|r,t[u>>2]=D,t[D+24>>2]=u,t[D+12>>2]=D,t[D+8>>2]=D;while(0);if(S=(t[2791]|0)+-1|0,t[2791]=S,!S)e=11588;else return;for(;e=t[e>>2]|0,e;)e=e+8|0;t[2791]=-1}}}function dL(){return 11628}function pL(e){e=e|0;var n=0,r=0;return n=m,m=m+16|0,r=n,t[r>>2]=mL(t[e+60>>2]|0)|0,e=p_(Ou(6,r|0)|0)|0,m=n,e|0}function n8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0;I=m,m=m+48|0,N=I+16|0,s=I,l=I+32|0,D=e+28|0,u=t[D>>2]|0,t[l>>2]=u,S=e+20|0,u=(t[S>>2]|0)-u|0,t[l+4>>2]=u,t[l+8>>2]=n,t[l+12>>2]=r,u=u+r|0,h=e+60|0,t[s>>2]=t[h>>2],t[s+4>>2]=l,t[s+8>>2]=2,s=p_(v0(146,s|0)|0)|0;e:do if((u|0)!=(s|0)){for(n=2;!((s|0)<0);)if(u=u-s|0,be=t[l+4>>2]|0,K=s>>>0>be>>>0,l=K?l+8|0:l,n=(K<<31>>31)+n|0,be=s-(K?be:0)|0,t[l>>2]=(t[l>>2]|0)+be,K=l+4|0,t[K>>2]=(t[K>>2]|0)-be,t[N>>2]=t[h>>2],t[N+4>>2]=l,t[N+8>>2]=n,s=p_(v0(146,N|0)|0)|0,(u|0)==(s|0)){M=3;break e}t[e+16>>2]=0,t[D>>2]=0,t[S>>2]=0,t[e>>2]=t[e>>2]|32,(n|0)==2?r=0:r=r-(t[l+4>>2]|0)|0}else M=3;while(0);return(M|0)==3&&(be=t[e+44>>2]|0,t[e+16>>2]=be+(t[e+48>>2]|0),t[D>>2]=be,t[S>>2]=be),m=I,r|0}function hL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;return l=m,m=m+32|0,s=l,u=l+20|0,t[s>>2]=t[e+60>>2],t[s+4>>2]=0,t[s+8>>2]=n,t[s+12>>2]=u,t[s+16>>2]=r,(p_(Ni(140,s|0)|0)|0)<0?(t[u>>2]=-1,e=-1):e=t[u>>2]|0,m=l,e|0}function p_(e){return e=e|0,e>>>0>4294963200&&(t[(Fv()|0)>>2]=0-e,e=-1),e|0}function Fv(){return(vL()|0)+64|0}function vL(){return RE()|0}function RE(){return 2084}function mL(e){return e=e|0,e|0}function yL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;return l=m,m=m+32|0,u=l,t[e+36>>2]=1,((t[e>>2]&64|0)==0?(t[u>>2]=t[e+60>>2],t[u+4>>2]=21523,t[u+8>>2]=l+16,I0(54,u|0)|0):0)&&(p[e+75>>0]=-1),u=n8(e,n,r)|0,m=l,u|0}function r8(e,n){e=e|0,n=n|0;var r=0,u=0;if(r=p[e>>0]|0,u=p[n>>0]|0,r<<24>>24==0?1:r<<24>>24!=u<<24>>24)e=u;else{do e=e+1|0,n=n+1|0,r=p[e>>0]|0,u=p[n>>0]|0;while(!(r<<24>>24==0?1:r<<24>>24!=u<<24>>24));e=u}return(r&255)-(e&255)|0}function gL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;e:do if(!r)e=0;else{for(;u=p[e>>0]|0,l=p[n>>0]|0,u<<24>>24==l<<24>>24;)if(r=r+-1|0,r)e=e+1|0,n=n+1|0;else{e=0;break e}e=(u&255)-(l&255)|0}while(0);return e|0}function i8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0,Se=0,ye=0;ye=m,m=m+224|0,M=ye+120|0,I=ye+80|0,be=ye,Se=ye+136|0,u=I,l=u+40|0;do t[u>>2]=0,u=u+4|0;while((u|0)<(l|0));return t[M>>2]=t[r>>2],(AE(0,n,M,be,I)|0)<0?r=-1:((t[e+76>>2]|0)>-1?K=_L(e)|0:K=0,r=t[e>>2]|0,N=r&32,(p[e+74>>0]|0)<1&&(t[e>>2]=r&-33),u=e+48|0,t[u>>2]|0?r=AE(e,n,M,be,I)|0:(l=e+44|0,s=t[l>>2]|0,t[l>>2]=Se,h=e+28|0,t[h>>2]=Se,D=e+20|0,t[D>>2]=Se,t[u>>2]=80,S=e+16|0,t[S>>2]=Se+80,r=AE(e,n,M,be,I)|0,s&&(y_[t[e+36>>2]&7](e,0,0)|0,r=(t[D>>2]|0)==0?-1:r,t[l>>2]=s,t[u>>2]=0,t[S>>2]=0,t[h>>2]=0,t[D>>2]=0)),u=t[e>>2]|0,t[e>>2]=u|N,K|0&&EL(e),r=(u&32|0)==0?r:-1),m=ye,r|0}function AE(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0,Se=0,ye=0,Je=0,Ge=0,ft=0,Me=0,Pe=0,Zt=0,Br=0,In=0,gn=0,_r=0,Pr=0,Nn=0;Nn=m,m=m+64|0,In=Nn+16|0,gn=Nn,Zt=Nn+24|0,_r=Nn+8|0,Pr=Nn+20|0,t[In>>2]=n,ft=(e|0)!=0,Me=Zt+40|0,Pe=Me,Zt=Zt+39|0,Br=_r+4|0,h=0,s=0,M=0;e:for(;;){do if((s|0)>-1)if((h|0)>(2147483647-s|0)){t[(Fv()|0)>>2]=75,s=-1;break}else{s=h+s|0;break}while(0);if(h=p[n>>0]|0,h<<24>>24)D=n;else{Ge=87;break}t:for(;;){switch(h<<24>>24){case 37:{h=D,Ge=9;break t}case 0:{h=D;break t}default:}Je=D+1|0,t[In>>2]=Je,h=p[Je>>0]|0,D=Je}t:do if((Ge|0)==9)for(;;){if(Ge=0,(p[D+1>>0]|0)!=37)break t;if(h=h+1|0,D=D+2|0,t[In>>2]=D,(p[D>>0]|0)==37)Ge=9;else break}while(0);if(h=h-n|0,ft&&Go(e,n,h),h|0){n=D;continue}S=D+1|0,h=(p[S>>0]|0)+-48|0,h>>>0<10?(Je=(p[D+2>>0]|0)==36,ye=Je?h:-1,M=Je?1:M,S=Je?D+3|0:S):ye=-1,t[In>>2]=S,h=p[S>>0]|0,D=(h<<24>>24)+-32|0;t:do if(D>>>0<32)for(N=0,I=h;;){if(h=1<>2]=S,h=p[S>>0]|0,D=(h<<24>>24)+-32|0,D>>>0>=32)break;I=h}else N=0;while(0);if(h<<24>>24==42){if(D=S+1|0,h=(p[D>>0]|0)+-48|0,h>>>0<10?(p[S+2>>0]|0)==36:0)t[l+(h<<2)>>2]=10,h=t[u+((p[D>>0]|0)+-48<<3)>>2]|0,M=1,S=S+3|0;else{if(M|0){s=-1;break}ft?(M=(t[r>>2]|0)+(4-1)&~(4-1),h=t[M>>2]|0,t[r>>2]=M+4,M=0,S=D):(h=0,M=0,S=D)}t[In>>2]=S,Je=(h|0)<0,h=Je?0-h|0:h,N=Je?N|8192:N}else{if(h=u8(In)|0,(h|0)<0){s=-1;break}S=t[In>>2]|0}do if((p[S>>0]|0)==46){if((p[S+1>>0]|0)!=42){t[In>>2]=S+1,D=u8(In)|0,S=t[In>>2]|0;break}if(I=S+2|0,D=(p[I>>0]|0)+-48|0,D>>>0<10?(p[S+3>>0]|0)==36:0){t[l+(D<<2)>>2]=10,D=t[u+((p[I>>0]|0)+-48<<3)>>2]|0,S=S+4|0,t[In>>2]=S;break}if(M|0){s=-1;break e}ft?(Je=(t[r>>2]|0)+(4-1)&~(4-1),D=t[Je>>2]|0,t[r>>2]=Je+4):D=0,t[In>>2]=I,S=I}else D=-1;while(0);for(Se=0;;){if(((p[S>>0]|0)+-65|0)>>>0>57){s=-1;break e}if(Je=S+1|0,t[In>>2]=Je,I=p[(p[S>>0]|0)+-65+(5178+(Se*58|0))>>0]|0,K=I&255,(K+-1|0)>>>0<8)Se=K,S=Je;else break}if(!(I<<24>>24)){s=-1;break}be=(ye|0)>-1;do if(I<<24>>24==19)if(be){s=-1;break e}else Ge=49;else{if(be){t[l+(ye<<2)>>2]=K,be=u+(ye<<3)|0,ye=t[be+4>>2]|0,Ge=gn,t[Ge>>2]=t[be>>2],t[Ge+4>>2]=ye,Ge=49;break}if(!ft){s=0;break e}o8(gn,K,r)}while(0);if((Ge|0)==49?(Ge=0,!ft):0){h=0,n=Je;continue}S=p[S>>0]|0,S=(Se|0)!=0&(S&15|0)==3?S&-33:S,be=N&-65537,ye=(N&8192|0)==0?N:be;t:do switch(S|0){case 110:switch((Se&255)<<24>>24){case 0:{t[t[gn>>2]>>2]=s,h=0,n=Je;continue e}case 1:{t[t[gn>>2]>>2]=s,h=0,n=Je;continue e}case 2:{h=t[gn>>2]|0,t[h>>2]=s,t[h+4>>2]=((s|0)<0)<<31>>31,h=0,n=Je;continue e}case 3:{_[t[gn>>2]>>1]=s,h=0,n=Je;continue e}case 4:{p[t[gn>>2]>>0]=s,h=0,n=Je;continue e}case 6:{t[t[gn>>2]>>2]=s,h=0,n=Je;continue e}case 7:{h=t[gn>>2]|0,t[h>>2]=s,t[h+4>>2]=((s|0)<0)<<31>>31,h=0,n=Je;continue e}default:{h=0,n=Je;continue e}}case 112:{S=120,D=D>>>0>8?D:8,n=ye|8,Ge=61;break}case 88:case 120:{n=ye,Ge=61;break}case 111:{S=gn,n=t[S>>2]|0,S=t[S+4>>2]|0,K=wL(n,S,Me)|0,be=Pe-K|0,N=0,I=5642,D=(ye&8|0)==0|(D|0)>(be|0)?D:be+1|0,be=ye,Ge=67;break}case 105:case 100:if(S=gn,n=t[S>>2]|0,S=t[S+4>>2]|0,(S|0)<0){n=h_(0,0,n|0,S|0)|0,S=ut,N=gn,t[N>>2]=n,t[N+4>>2]=S,N=1,I=5642,Ge=66;break t}else{N=(ye&2049|0)!=0&1,I=(ye&2048|0)==0?(ye&1|0)==0?5642:5644:5643,Ge=66;break t}case 117:{S=gn,N=0,I=5642,n=t[S>>2]|0,S=t[S+4>>2]|0,Ge=66;break}case 99:{p[Zt>>0]=t[gn>>2],n=Zt,N=0,I=5642,K=Me,S=1,D=be;break}case 109:{S=SL(t[(Fv()|0)>>2]|0)|0,Ge=71;break}case 115:{S=t[gn>>2]|0,S=S|0?S:5652,Ge=71;break}case 67:{t[_r>>2]=t[gn>>2],t[Br>>2]=0,t[gn>>2]=_r,K=-1,S=_r,Ge=75;break}case 83:{n=t[gn>>2]|0,D?(K=D,S=n,Ge=75):(gl(e,32,h,0,ye),n=0,Ge=84);break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{h=CL(e,+U[gn>>3],h,D,ye,S)|0,n=Je;continue e}default:N=0,I=5642,K=Me,S=D,D=ye}while(0);t:do if((Ge|0)==61)ye=gn,Se=t[ye>>2]|0,ye=t[ye+4>>2]|0,K=DL(Se,ye,Me,S&32)|0,I=(n&8|0)==0|(Se|0)==0&(ye|0)==0,N=I?0:2,I=I?5642:5642+(S>>4)|0,be=n,n=Se,S=ye,Ge=67;else if((Ge|0)==66)K=Pv(n,S,Me)|0,be=ye,Ge=67;else if((Ge|0)==71)Ge=0,ye=TL(S,0,D)|0,Se=(ye|0)==0,n=S,N=0,I=5642,K=Se?S+D|0:ye,S=Se?D:ye-S|0,D=be;else if((Ge|0)==75){for(Ge=0,I=S,n=0,D=0;N=t[I>>2]|0,!(!N||(D=l8(Pr,N)|0,(D|0)<0|D>>>0>(K-n|0)>>>0));)if(n=D+n|0,K>>>0>n>>>0)I=I+4|0;else break;if((D|0)<0){s=-1;break e}if(gl(e,32,h,n,ye),!n)n=0,Ge=84;else for(N=0;;){if(D=t[S>>2]|0,!D){Ge=84;break t}if(D=l8(Pr,D)|0,N=D+N|0,(N|0)>(n|0)){Ge=84;break t}if(Go(e,Pr,D),N>>>0>=n>>>0){Ge=84;break}else S=S+4|0}}while(0);if((Ge|0)==67)Ge=0,S=(n|0)!=0|(S|0)!=0,ye=(D|0)!=0|S,S=((S^1)&1)+(Pe-K)|0,n=ye?K:Me,K=Me,S=ye?(D|0)>(S|0)?D:S:D,D=(D|0)>-1?be&-65537:be;else if((Ge|0)==84){Ge=0,gl(e,32,h,n,ye^8192),h=(h|0)>(n|0)?h:n,n=Je;continue}Se=K-n|0,be=(S|0)<(Se|0)?Se:S,ye=be+N|0,h=(h|0)<(ye|0)?ye:h,gl(e,32,h,ye,D),Go(e,I,N),gl(e,48,h,ye,D^65536),gl(e,48,be,Se,0),Go(e,n,Se),gl(e,32,h,ye,D^8192),n=Je}e:do if((Ge|0)==87&&!e)if(!M)s=0;else{for(s=1;n=t[l+(s<<2)>>2]|0,!!n;)if(o8(u+(s<<3)|0,n,r),s=s+1|0,(s|0)>=10){s=1;break e}for(;;){if(t[l+(s<<2)>>2]|0){s=-1;break e}if(s=s+1|0,(s|0)>=10){s=1;break}}}while(0);return m=Nn,s|0}function _L(e){return e=e|0,0}function EL(e){e=e|0}function Go(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]&32||FL(n,r,e)|0}function u8(e){e=e|0;var n=0,r=0,u=0;if(r=t[e>>2]|0,u=(p[r>>0]|0)+-48|0,u>>>0<10){n=0;do n=u+(n*10|0)|0,r=r+1|0,t[e>>2]=r,u=(p[r>>0]|0)+-48|0;while(u>>>0<10)}else n=0;return n|0}function o8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;e:do if(n>>>0<=20)do switch(n|0){case 9:{u=(t[r>>2]|0)+(4-1)&~(4-1),n=t[u>>2]|0,t[r>>2]=u+4,t[e>>2]=n;break e}case 10:{u=(t[r>>2]|0)+(4-1)&~(4-1),n=t[u>>2]|0,t[r>>2]=u+4,u=e,t[u>>2]=n,t[u+4>>2]=((n|0)<0)<<31>>31;break e}case 11:{u=(t[r>>2]|0)+(4-1)&~(4-1),n=t[u>>2]|0,t[r>>2]=u+4,u=e,t[u>>2]=n,t[u+4>>2]=0;break e}case 12:{u=(t[r>>2]|0)+(8-1)&~(8-1),n=u,l=t[n>>2]|0,n=t[n+4>>2]|0,t[r>>2]=u+8,u=e,t[u>>2]=l,t[u+4>>2]=n;break e}case 13:{l=(t[r>>2]|0)+(4-1)&~(4-1),u=t[l>>2]|0,t[r>>2]=l+4,u=(u&65535)<<16>>16,l=e,t[l>>2]=u,t[l+4>>2]=((u|0)<0)<<31>>31;break e}case 14:{l=(t[r>>2]|0)+(4-1)&~(4-1),u=t[l>>2]|0,t[r>>2]=l+4,l=e,t[l>>2]=u&65535,t[l+4>>2]=0;break e}case 15:{l=(t[r>>2]|0)+(4-1)&~(4-1),u=t[l>>2]|0,t[r>>2]=l+4,u=(u&255)<<24>>24,l=e,t[l>>2]=u,t[l+4>>2]=((u|0)<0)<<31>>31;break e}case 16:{l=(t[r>>2]|0)+(4-1)&~(4-1),u=t[l>>2]|0,t[r>>2]=l+4,l=e,t[l>>2]=u&255,t[l+4>>2]=0;break e}case 17:{l=(t[r>>2]|0)+(8-1)&~(8-1),s=+U[l>>3],t[r>>2]=l+8,U[e>>3]=s;break e}case 18:{l=(t[r>>2]|0)+(8-1)&~(8-1),s=+U[l>>3],t[r>>2]=l+8,U[e>>3]=s;break e}default:break e}while(0);while(0)}function DL(e,n,r,u){if(e=e|0,n=n|0,r=r|0,u=u|0,!((e|0)==0&(n|0)==0))do r=r+-1|0,p[r>>0]=k[5694+(e&15)>>0]|0|u,e=v_(e|0,n|0,4)|0,n=ut;while(!((e|0)==0&(n|0)==0));return r|0}function wL(e,n,r){if(e=e|0,n=n|0,r=r|0,!((e|0)==0&(n|0)==0))do r=r+-1|0,p[r>>0]=e&7|48,e=v_(e|0,n|0,3)|0,n=ut;while(!((e|0)==0&(n|0)==0));return r|0}function Pv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;if(n>>>0>0|(n|0)==0&e>>>0>4294967295){for(;u=NE(e|0,n|0,10,0)|0,r=r+-1|0,p[r>>0]=u&255|48,u=e,e=kE(e|0,n|0,10,0)|0,n>>>0>9|(n|0)==9&u>>>0>4294967295;)n=ut;n=e}else n=e;if(n)for(;r=r+-1|0,p[r>>0]=(n>>>0)%10|0|48,!(n>>>0<10);)n=(n>>>0)/10|0;return r|0}function SL(e){return e=e|0,ML(e,t[(OL()|0)+188>>2]|0)|0}function TL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;s=n&255,u=(r|0)!=0;e:do if(u&(e&3|0)!=0)for(l=n&255;;){if((p[e>>0]|0)==l<<24>>24){h=6;break e}if(e=e+1|0,r=r+-1|0,u=(r|0)!=0,!(u&(e&3|0)!=0)){h=5;break}}else h=5;while(0);(h|0)==5&&(u?h=6:r=0);e:do if((h|0)==6&&(l=n&255,(p[e>>0]|0)!=l<<24>>24)){u=lr(s,16843009)|0;t:do if(r>>>0>3){for(;s=t[e>>2]^u,!((s&-2139062144^-2139062144)&s+-16843009|0);)if(e=e+4|0,r=r+-4|0,r>>>0<=3){h=11;break t}}else h=11;while(0);if((h|0)==11&&!r){r=0;break}for(;;){if((p[e>>0]|0)==l<<24>>24)break e;if(e=e+1|0,r=r+-1|0,!r){r=0;break}}}while(0);return(r|0?e:0)|0}function gl(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0;if(h=m,m=m+256|0,s=h,(r|0)>(u|0)&(l&73728|0)==0){if(l=r-u|0,bv(s|0,n|0,(l>>>0<256?l:256)|0)|0,l>>>0>255){n=r-u|0;do Go(e,s,256),l=l+-256|0;while(l>>>0>255);l=n&255}Go(e,s,l)}m=h}function l8(e,n){return e=e|0,n=n|0,e?e=RL(e,n,0)|0:e=0,e|0}function CL(e,n,r,u,l,s){e=e|0,n=+n,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0,Se=0,ye=0,Je=0,Ge=0,ft=0,Me=0,Pe=0,Zt=0,Br=0,In=0,gn=0,_r=0,Pr=0,Nn=0,uu=0;uu=m,m=m+560|0,S=uu+8|0,Je=uu,Nn=uu+524|0,Pr=Nn,N=uu+512|0,t[Je>>2]=0,_r=N+12|0,s8(n)|0,(ut|0)<0?(n=-n,In=1,Br=5659):(In=(l&2049|0)!=0&1,Br=(l&2048|0)==0?(l&1|0)==0?5660:5665:5662),s8(n)|0,gn=ut&2146435072;do if(gn>>>0<2146435072|(gn|0)==2146435072&0<0){if(be=+xL(n,Je)*2,h=be!=0,h&&(t[Je>>2]=(t[Je>>2]|0)+-1),ft=s|32,(ft|0)==97){Se=s&32,K=(Se|0)==0?Br:Br+9|0,I=In|2,h=12-u|0;do if(u>>>0>11|(h|0)==0)n=be;else{n=8;do h=h+-1|0,n=n*16;while((h|0)!=0);if((p[K>>0]|0)==45){n=-(n+(-be-n));break}else{n=be+n-n;break}}while(0);D=t[Je>>2]|0,h=(D|0)<0?0-D|0:D,h=Pv(h,((h|0)<0)<<31>>31,_r)|0,(h|0)==(_r|0)&&(h=N+11|0,p[h>>0]=48),p[h+-1>>0]=(D>>31&2)+43,M=h+-2|0,p[M>>0]=s+15,N=(u|0)<1,S=(l&8|0)==0,h=Nn;do gn=~~n,D=h+1|0,p[h>>0]=k[5694+gn>>0]|Se,n=(n-+(gn|0))*16,((D-Pr|0)==1?!(S&(N&n==0)):0)?(p[D>>0]=46,h=h+2|0):h=D;while(n!=0);gn=h-Pr|0,Pr=_r-M|0,_r=(u|0)!=0&(gn+-2|0)<(u|0)?u+2|0:gn,h=Pr+I+_r|0,gl(e,32,r,h,l),Go(e,K,I),gl(e,48,r,h,l^65536),Go(e,Nn,gn),gl(e,48,_r-gn|0,0,0),Go(e,M,Pr),gl(e,32,r,h,l^8192);break}D=(u|0)<0?6:u,h?(h=(t[Je>>2]|0)+-28|0,t[Je>>2]=h,n=be*268435456):(n=be,h=t[Je>>2]|0),gn=(h|0)<0?S:S+288|0,S=gn;do Pe=~~n>>>0,t[S>>2]=Pe,S=S+4|0,n=(n-+(Pe>>>0))*1e9;while(n!=0);if((h|0)>0)for(N=gn,I=S;;){if(M=(h|0)<29?h:29,h=I+-4|0,h>>>0>=N>>>0){S=0;do Me=h8(t[h>>2]|0,0,M|0)|0,Me=ME(Me|0,ut|0,S|0,0)|0,Pe=ut,Ge=NE(Me|0,Pe|0,1e9,0)|0,t[h>>2]=Ge,S=kE(Me|0,Pe|0,1e9,0)|0,h=h+-4|0;while(h>>>0>=N>>>0);S&&(N=N+-4|0,t[N>>2]=S)}for(S=I;!(S>>>0<=N>>>0);)if(h=S+-4|0,!(t[h>>2]|0))S=h;else break;if(h=(t[Je>>2]|0)-M|0,t[Je>>2]=h,(h|0)>0)I=S;else break}else N=gn;if((h|0)<0){u=((D+25|0)/9|0)+1|0,ye=(ft|0)==102;do{if(Se=0-h|0,Se=(Se|0)<9?Se:9,N>>>0>>0){M=(1<>>Se,K=0,h=N;do Pe=t[h>>2]|0,t[h>>2]=(Pe>>>Se)+K,K=lr(Pe&M,I)|0,h=h+4|0;while(h>>>0>>0);h=(t[N>>2]|0)==0?N+4|0:N,K?(t[S>>2]=K,N=h,h=S+4|0):(N=h,h=S)}else N=(t[N>>2]|0)==0?N+4|0:N,h=S;S=ye?gn:N,S=(h-S>>2|0)>(u|0)?S+(u<<2)|0:h,h=(t[Je>>2]|0)+Se|0,t[Je>>2]=h}while((h|0)<0);h=N,u=S}else h=N,u=S;if(Pe=gn,h>>>0>>0){if(S=(Pe-h>>2)*9|0,M=t[h>>2]|0,M>>>0>=10){N=10;do N=N*10|0,S=S+1|0;while(M>>>0>=N>>>0)}}else S=0;if(ye=(ft|0)==103,Ge=(D|0)!=0,N=D-((ft|0)!=102?S:0)+((Ge&ye)<<31>>31)|0,(N|0)<(((u-Pe>>2)*9|0)+-9|0)){if(N=N+9216|0,Se=gn+4+(((N|0)/9|0)+-1024<<2)|0,N=((N|0)%9|0)+1|0,(N|0)<9){M=10;do M=M*10|0,N=N+1|0;while((N|0)!=9)}else M=10;if(I=t[Se>>2]|0,K=(I>>>0)%(M>>>0)|0,N=(Se+4|0)==(u|0),N&(K|0)==0)N=Se;else if(be=(((I>>>0)/(M>>>0)|0)&1|0)==0?9007199254740992:9007199254740994,Me=(M|0)/2|0,n=K>>>0>>0?.5:N&(K|0)==(Me|0)?1:1.5,In&&(Me=(p[Br>>0]|0)==45,n=Me?-n:n,be=Me?-be:be),N=I-K|0,t[Se>>2]=N,be+n!=be){if(Me=N+M|0,t[Se>>2]=Me,Me>>>0>999999999)for(S=Se;N=S+-4|0,t[S>>2]=0,N>>>0>>0&&(h=h+-4|0,t[h>>2]=0),Me=(t[N>>2]|0)+1|0,t[N>>2]=Me,Me>>>0>999999999;)S=N;else N=Se;if(S=(Pe-h>>2)*9|0,I=t[h>>2]|0,I>>>0>=10){M=10;do M=M*10|0,S=S+1|0;while(I>>>0>=M>>>0)}}else N=Se;N=N+4|0,N=u>>>0>N>>>0?N:u,Me=h}else N=u,Me=h;for(ft=N;;){if(ft>>>0<=Me>>>0){Je=0;break}if(h=ft+-4|0,!(t[h>>2]|0))ft=h;else{Je=1;break}}u=0-S|0;do if(ye)if(h=((Ge^1)&1)+D|0,(h|0)>(S|0)&(S|0)>-5?(M=s+-1|0,D=h+-1-S|0):(M=s+-2|0,D=h+-1|0),h=l&8,h)Se=h;else{if(Je?(Zt=t[ft+-4>>2]|0,(Zt|0)!=0):0)if((Zt>>>0)%10|0)N=0;else{N=0,h=10;do h=h*10|0,N=N+1|0;while(!((Zt>>>0)%(h>>>0)|0|0))}else N=9;if(h=((ft-Pe>>2)*9|0)+-9|0,(M|32|0)==102){Se=h-N|0,Se=(Se|0)>0?Se:0,D=(D|0)<(Se|0)?D:Se,Se=0;break}else{Se=h+S-N|0,Se=(Se|0)>0?Se:0,D=(D|0)<(Se|0)?D:Se,Se=0;break}}else M=s,Se=l&8;while(0);if(ye=D|Se,I=(ye|0)!=0&1,K=(M|32|0)==102,K)Ge=0,h=(S|0)>0?S:0;else{if(h=(S|0)<0?u:S,h=Pv(h,((h|0)<0)<<31>>31,_r)|0,N=_r,(N-h|0)<2)do h=h+-1|0,p[h>>0]=48;while((N-h|0)<2);p[h+-1>>0]=(S>>31&2)+43,h=h+-2|0,p[h>>0]=M,Ge=h,h=N-h|0}if(h=In+1+D+I+h|0,gl(e,32,r,h,l),Go(e,Br,In),gl(e,48,r,h,l^65536),K){M=Me>>>0>gn>>>0?gn:Me,Se=Nn+9|0,I=Se,K=Nn+8|0,N=M;do{if(S=Pv(t[N>>2]|0,0,Se)|0,(N|0)==(M|0))(S|0)==(Se|0)&&(p[K>>0]=48,S=K);else if(S>>>0>Nn>>>0){bv(Nn|0,48,S-Pr|0)|0;do S=S+-1|0;while(S>>>0>Nn>>>0)}Go(e,S,I-S|0),N=N+4|0}while(N>>>0<=gn>>>0);if(ye|0&&Go(e,5710,1),N>>>0>>0&(D|0)>0)for(;;){if(S=Pv(t[N>>2]|0,0,Se)|0,S>>>0>Nn>>>0){bv(Nn|0,48,S-Pr|0)|0;do S=S+-1|0;while(S>>>0>Nn>>>0)}if(Go(e,S,(D|0)<9?D:9),N=N+4|0,S=D+-9|0,N>>>0>>0&(D|0)>9)D=S;else{D=S;break}}gl(e,48,D+9|0,9,0)}else{if(ye=Je?ft:Me+4|0,(D|0)>-1){Je=Nn+9|0,Se=(Se|0)==0,u=Je,I=0-Pr|0,K=Nn+8|0,M=Me;do{S=Pv(t[M>>2]|0,0,Je)|0,(S|0)==(Je|0)&&(p[K>>0]=48,S=K);do if((M|0)==(Me|0)){if(N=S+1|0,Go(e,S,1),Se&(D|0)<1){S=N;break}Go(e,5710,1),S=N}else{if(S>>>0<=Nn>>>0)break;bv(Nn|0,48,S+I|0)|0;do S=S+-1|0;while(S>>>0>Nn>>>0)}while(0);Pr=u-S|0,Go(e,S,(D|0)>(Pr|0)?Pr:D),D=D-Pr|0,M=M+4|0}while(M>>>0>>0&(D|0)>-1)}gl(e,48,D+18|0,18,0),Go(e,Ge,_r-Ge|0)}gl(e,32,r,h,l^8192)}else Nn=(s&32|0)!=0,h=In+3|0,gl(e,32,r,h,l&-65537),Go(e,Br,In),Go(e,n!=n|!1?Nn?5686:5690:Nn?5678:5682,3),gl(e,32,r,h,l^8192);while(0);return m=uu,((h|0)<(r|0)?r:h)|0}function s8(e){e=+e;var n=0;return U[W>>3]=e,n=t[W>>2]|0,ut=t[W+4>>2]|0,n|0}function xL(e,n){return e=+e,n=n|0,+ +a8(e,n)}function a8(e,n){e=+e,n=n|0;var r=0,u=0,l=0;switch(U[W>>3]=e,r=t[W>>2]|0,u=t[W+4>>2]|0,l=v_(r|0,u|0,52)|0,l&2047){case 0:{e!=0?(e=+a8(e*18446744073709552e3,n),r=(t[n>>2]|0)+-64|0):r=0,t[n>>2]=r;break}case 2047:break;default:t[n>>2]=(l&2047)+-1022,t[W>>2]=r,t[W+4>>2]=u&-2146435073|1071644672,e=+U[W>>3]}return+e}function RL(e,n,r){e=e|0,n=n|0,r=r|0;do if(e){if(n>>>0<128){p[e>>0]=n,e=1;break}if(!(t[t[(AL()|0)+188>>2]>>2]|0))if((n&-128|0)==57216){p[e>>0]=n,e=1;break}else{t[(Fv()|0)>>2]=84,e=-1;break}if(n>>>0<2048){p[e>>0]=n>>>6|192,p[e+1>>0]=n&63|128,e=2;break}if(n>>>0<55296|(n&-8192|0)==57344){p[e>>0]=n>>>12|224,p[e+1>>0]=n>>>6&63|128,p[e+2>>0]=n&63|128,e=3;break}if((n+-65536|0)>>>0<1048576){p[e>>0]=n>>>18|240,p[e+1>>0]=n>>>12&63|128,p[e+2>>0]=n>>>6&63|128,p[e+3>>0]=n&63|128,e=4;break}else{t[(Fv()|0)>>2]=84,e=-1;break}}else e=1;while(0);return e|0}function AL(){return RE()|0}function OL(){return RE()|0}function ML(e,n){e=e|0,n=n|0;var r=0,u=0;for(u=0;;){if((k[5712+u>>0]|0)==(e|0)){e=2;break}if(r=u+1|0,(r|0)==87){r=5800,u=87,e=5;break}else u=r}if((e|0)==2&&(u?(r=5800,e=5):r=5800),(e|0)==5)for(;;){do e=r,r=r+1|0;while((p[e>>0]|0)!=0);if(u=u+-1|0,u)e=5;else break}return kL(r,t[n+20>>2]|0)|0}function kL(e,n){return e=e|0,n=n|0,NL(e,n)|0}function NL(e,n){return e=e|0,n=n|0,n?n=LL(t[n>>2]|0,t[n+4>>2]|0,e)|0:n=0,(n|0?n:e)|0}function LL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0;K=(t[e>>2]|0)+1794895138|0,s=Kp(t[e+8>>2]|0,K)|0,u=Kp(t[e+12>>2]|0,K)|0,l=Kp(t[e+16>>2]|0,K)|0;e:do if((s>>>0>>2>>>0?(I=n-(s<<2)|0,u>>>0>>0&l>>>0>>0):0)?((l|u)&3|0)==0:0){for(I=u>>>2,M=l>>>2,N=0;;){if(D=s>>>1,S=N+D|0,h=S<<1,l=h+I|0,u=Kp(t[e+(l<<2)>>2]|0,K)|0,l=Kp(t[e+(l+1<<2)>>2]|0,K)|0,!(l>>>0>>0&u>>>0<(n-l|0)>>>0)){u=0;break e}if(p[e+(l+u)>>0]|0){u=0;break e}if(u=r8(r,e+l|0)|0,!u)break;if(u=(u|0)<0,(s|0)==1){u=0;break e}else N=u?N:S,s=u?D:s-D|0}u=h+M|0,l=Kp(t[e+(u<<2)>>2]|0,K)|0,u=Kp(t[e+(u+1<<2)>>2]|0,K)|0,u>>>0>>0&l>>>0<(n-u|0)>>>0?u=(p[e+(u+l)>>0]|0)==0?e+u|0:0:u=0}else u=0;while(0);return u|0}function Kp(e,n){e=e|0,n=n|0;var r=0;return r=y8(e|0)|0,((n|0)==0?e:r)|0}function FL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=r+16|0,l=t[u>>2]|0,l?s=5:PL(r)|0?u=0:(l=t[u>>2]|0,s=5);e:do if((s|0)==5){if(D=r+20|0,h=t[D>>2]|0,u=h,(l-h|0)>>>0>>0){u=y_[t[r+36>>2]&7](r,e,n)|0;break}t:do if((p[r+75>>0]|0)>-1){for(h=n;;){if(!h){s=0,l=e;break t}if(l=h+-1|0,(p[e+l>>0]|0)==10)break;h=l}if(u=y_[t[r+36>>2]&7](r,e,h)|0,u>>>0>>0)break e;s=h,l=e+h|0,n=n-h|0,u=t[D>>2]|0}else s=0,l=e;while(0);gr(u|0,l|0,n|0)|0,t[D>>2]=(t[D>>2]|0)+n,u=s+n|0}while(0);return u|0}function PL(e){e=e|0;var n=0,r=0;return n=e+74|0,r=p[n>>0]|0,p[n>>0]=r+255|r,n=t[e>>2]|0,n&8?(t[e>>2]=n|32,e=-1):(t[e+8>>2]=0,t[e+4>>2]=0,r=t[e+44>>2]|0,t[e+28>>2]=r,t[e+20>>2]=r,t[e+16>>2]=r+(t[e+48>>2]|0),e=0),e|0}function Ru(e,n){e=w(e),n=w(n);var r=0,u=0;r=f8(e)|0;do if((r&2147483647)>>>0<=2139095040){if(u=f8(n)|0,(u&2147483647)>>>0<=2139095040)if((u^r|0)<0){e=(r|0)<0?n:e;break}else{e=e>2]=e,t[W>>2]|0|0}function Xp(e,n){e=w(e),n=w(n);var r=0,u=0;r=c8(e)|0;do if((r&2147483647)>>>0<=2139095040){if(u=c8(n)|0,(u&2147483647)>>>0<=2139095040)if((u^r|0)<0){e=(r|0)<0?e:n;break}else{e=e>2]=e,t[W>>2]|0|0}function OE(e,n){e=w(e),n=w(n);var r=0,u=0,l=0,s=0,h=0,D=0,S=0,N=0;s=(C[W>>2]=e,t[W>>2]|0),D=(C[W>>2]=n,t[W>>2]|0),r=s>>>23&255,h=D>>>23&255,S=s&-2147483648,l=D<<1;e:do if((l|0)!=0?!((r|0)==255|((IL(n)|0)&2147483647)>>>0>2139095040):0){if(u=s<<1,u>>>0<=l>>>0)return n=w(e*w(0)),w((u|0)==(l|0)?n:e);if(r)u=s&8388607|8388608;else{if(r=s<<9,(r|0)>-1){u=r,r=0;do r=r+-1|0,u=u<<1;while((u|0)>-1)}else r=0;u=s<<1-r}if(h)D=D&8388607|8388608;else{if(s=D<<9,(s|0)>-1){l=0;do l=l+-1|0,s=s<<1;while((s|0)>-1)}else l=0;h=l,D=D<<1-l}l=u-D|0,s=(l|0)>-1;t:do if((r|0)>(h|0)){for(;;){if(s)if(l)u=l;else break;if(u=u<<1,r=r+-1|0,l=u-D|0,s=(l|0)>-1,(r|0)<=(h|0))break t}n=w(e*w(0));break e}while(0);if(s)if(l)u=l;else{n=w(e*w(0));break}if(u>>>0<8388608)do u=u<<1,r=r+-1|0;while(u>>>0<8388608);(r|0)>0?r=u+-8388608|r<<23:r=u>>>(1-r|0),n=(t[W>>2]=r|S,w(C[W>>2]))}else N=3;while(0);return(N|0)==3&&(n=w(e*n),n=w(n/n)),w(n)}function IL(e){return e=w(e),C[W>>2]=e,t[W>>2]|0|0}function bL(e,n){return e=e|0,n=n|0,i8(t[582]|0,e,n)|0}function hi(e){e=e|0,$n()}function Iv(e){e=e|0}function BL(e,n){return e=e|0,n=n|0,0}function UL(e){return e=e|0,(d8(e+4|0)|0)==-1?(F1[t[(t[e>>2]|0)+8>>2]&127](e),e=1):e=0,e|0}function d8(e){e=e|0;var n=0;return n=t[e>>2]|0,t[e>>2]=n+-1,n+-1|0}function e2(e){e=e|0,UL(e)|0&&jL(e)}function jL(e){e=e|0;var n=0;n=e+8|0,((t[n>>2]|0)!=0?(d8(n)|0)!=-1:0)||F1[t[(t[e>>2]|0)+16>>2]&127](e)}function pn(e){e=e|0;var n=0;for(n=(e|0)==0?1:e;e=c_(n)|0,!(e|0);){if(e=HL()|0,!e){e=0;break}R8[e&0]()}return e|0}function p8(e){return e=e|0,pn(e)|0}function _t(e){e=e|0,d_(e)}function zL(e){e=e|0,(p[e+11>>0]|0)<0&&_t(t[e>>2]|0)}function HL(){var e=0;return e=t[2923]|0,t[2923]=e+0,e|0}function qL(){}function h_(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,u=n-u-(r>>>0>e>>>0|0)>>>0,ut=u,e-r>>>0|0|0}function ME(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,r=e+r>>>0,ut=n+u+(r>>>0>>0|0)>>>0,r|0|0}function bv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;if(s=e+r|0,n=n&255,(r|0)>=67){for(;e&3;)p[e>>0]=n,e=e+1|0;for(u=s&-4|0,l=u-64|0,h=n|n<<8|n<<16|n<<24;(e|0)<=(l|0);)t[e>>2]=h,t[e+4>>2]=h,t[e+8>>2]=h,t[e+12>>2]=h,t[e+16>>2]=h,t[e+20>>2]=h,t[e+24>>2]=h,t[e+28>>2]=h,t[e+32>>2]=h,t[e+36>>2]=h,t[e+40>>2]=h,t[e+44>>2]=h,t[e+48>>2]=h,t[e+52>>2]=h,t[e+56>>2]=h,t[e+60>>2]=h,e=e+64|0;for(;(e|0)<(u|0);)t[e>>2]=h,e=e+4|0}for(;(e|0)<(s|0);)p[e>>0]=n,e=e+1|0;return s-r|0}function h8(e,n,r){return e=e|0,n=n|0,r=r|0,(r|0)<32?(ut=n<>>32-r,e<>>r,e>>>r|(n&(1<>>r-32|0)}function gr(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;if((r|0)>=8192)return ai(e|0,n|0,r|0)|0;if(s=e|0,l=e+r|0,(e&3)==(n&3)){for(;e&3;){if(!r)return s|0;p[e>>0]=p[n>>0]|0,e=e+1|0,n=n+1|0,r=r-1|0}for(r=l&-4|0,u=r-64|0;(e|0)<=(u|0);)t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=t[n+8>>2],t[e+12>>2]=t[n+12>>2],t[e+16>>2]=t[n+16>>2],t[e+20>>2]=t[n+20>>2],t[e+24>>2]=t[n+24>>2],t[e+28>>2]=t[n+28>>2],t[e+32>>2]=t[n+32>>2],t[e+36>>2]=t[n+36>>2],t[e+40>>2]=t[n+40>>2],t[e+44>>2]=t[n+44>>2],t[e+48>>2]=t[n+48>>2],t[e+52>>2]=t[n+52>>2],t[e+56>>2]=t[n+56>>2],t[e+60>>2]=t[n+60>>2],e=e+64|0,n=n+64|0;for(;(e|0)<(r|0);)t[e>>2]=t[n>>2],e=e+4|0,n=n+4|0}else for(r=l-4|0;(e|0)<(r|0);)p[e>>0]=p[n>>0]|0,p[e+1>>0]=p[n+1>>0]|0,p[e+2>>0]=p[n+2>>0]|0,p[e+3>>0]=p[n+3>>0]|0,e=e+4|0,n=n+4|0;for(;(e|0)<(l|0);)p[e>>0]=p[n>>0]|0,e=e+1|0,n=n+1|0;return s|0}function v8(e){e=e|0;var n=0;return n=p[Ee+(e&255)>>0]|0,(n|0)<8?n|0:(n=p[Ee+(e>>8&255)>>0]|0,(n|0)<8?n+8|0:(n=p[Ee+(e>>16&255)>>0]|0,(n|0)<8?n+16|0:(p[Ee+(e>>>24)>>0]|0)+24|0))}function m8(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,N=0,M=0,I=0,K=0,be=0,Se=0;if(M=e,S=n,N=S,h=r,K=u,D=K,!N)return s=(l|0)!=0,D?s?(t[l>>2]=e|0,t[l+4>>2]=n&0,K=0,l=0,ut=K,l|0):(K=0,l=0,ut=K,l|0):(s&&(t[l>>2]=(M>>>0)%(h>>>0),t[l+4>>2]=0),K=0,l=(M>>>0)/(h>>>0)>>>0,ut=K,l|0);s=(D|0)==0;do if(h){if(!s){if(s=(Er(D|0)|0)-(Er(N|0)|0)|0,s>>>0<=31){I=s+1|0,D=31-s|0,n=s-31>>31,h=I,e=M>>>(I>>>0)&n|N<>>(I>>>0)&n,s=0,D=M<>2]=e|0,t[l+4>>2]=S|n&0,K=0,l=0,ut=K,l|0):(K=0,l=0,ut=K,l|0)}if(s=h-1|0,s&h|0){D=(Er(h|0)|0)+33-(Er(N|0)|0)|0,Se=64-D|0,I=32-D|0,S=I>>31,be=D-32|0,n=be>>31,h=D,e=I-1>>31&N>>>(be>>>0)|(N<>>(D>>>0))&n,n=n&N>>>(D>>>0),s=M<>>(be>>>0))&S|M<>31;break}return l|0&&(t[l>>2]=s&M,t[l+4>>2]=0),(h|0)==1?(be=S|n&0,Se=e|0|0,ut=be,Se|0):(Se=v8(h|0)|0,be=N>>>(Se>>>0)|0,Se=N<<32-Se|M>>>(Se>>>0)|0,ut=be,Se|0)}else{if(s)return l|0&&(t[l>>2]=(N>>>0)%(h>>>0),t[l+4>>2]=0),be=0,Se=(N>>>0)/(h>>>0)>>>0,ut=be,Se|0;if(!M)return l|0&&(t[l>>2]=0,t[l+4>>2]=(N>>>0)%(D>>>0)),be=0,Se=(N>>>0)/(D>>>0)>>>0,ut=be,Se|0;if(s=D-1|0,!(s&D))return l|0&&(t[l>>2]=e|0,t[l+4>>2]=s&N|n&0),be=0,Se=N>>>((v8(D|0)|0)>>>0),ut=be,Se|0;if(s=(Er(D|0)|0)-(Er(N|0)|0)|0,s>>>0<=30){n=s+1|0,D=31-s|0,h=n,e=N<>>(n>>>0),n=N>>>(n>>>0),s=0,D=M<>2]=e|0,t[l+4>>2]=S|n&0,be=0,Se=0,ut=be,Se|0):(be=0,Se=0,ut=be,Se|0)}while(0);if(!h)N=D,S=0,D=0;else{I=r|0|0,M=K|u&0,N=ME(I|0,M|0,-1,-1)|0,r=ut,S=D,D=0;do u=S,S=s>>>31|S<<1,s=D|s<<1,u=e<<1|u>>>31|0,K=e>>>31|n<<1|0,h_(N|0,r|0,u|0,K|0)|0,Se=ut,be=Se>>31|((Se|0)<0?-1:0)<<1,D=be&1,e=h_(u|0,K|0,be&I|0,(((Se|0)<0?-1:0)>>31|((Se|0)<0?-1:0)<<1)&M|0)|0,n=ut,h=h-1|0;while((h|0)!=0);N=S,S=0}return h=0,l|0&&(t[l>>2]=e,t[l+4>>2]=n),be=(s|0)>>>31|(N|h)<<1|(h<<1|s>>>31)&0|S,Se=(s<<1|0>>>31)&-2|D,ut=be,Se|0}function kE(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,m8(e,n,r,u,0)|0}function t2(e){e=e|0;var n=0,r=0;return r=e+15&-16|0,n=t[H>>2]|0,e=n+r|0,(r|0)>0&(e|0)<(n|0)|(e|0)<0?(fr()|0,Ql(12),-1):(t[H>>2]=e,((e|0)>(jr()|0)?(vr()|0)==0:0)?(t[H>>2]=n,Ql(12),-1):n|0)}function Ty(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;if((n|0)<(e|0)&(e|0)<(n+r|0)){for(u=e,n=n+r|0,e=e+r|0;(r|0)>0;)e=e-1|0,n=n-1|0,r=r-1|0,p[e>>0]=p[n>>0]|0;e=u}else gr(e,n,r)|0;return e|0}function NE(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;return s=m,m=m+16|0,l=s|0,m8(e,n,r,u,l)|0,m=s,ut=t[l+4>>2]|0,t[l>>2]|0|0}function y8(e){return e=e|0,(e&255)<<24|(e>>8&255)<<16|(e>>16&255)<<8|e>>>24|0}function WL(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,g8[e&1](n|0,r|0,u|0,l|0,s|0)}function VL(e,n,r){e=e|0,n=n|0,r=w(r),_8[e&1](n|0,w(r))}function YL(e,n,r){e=e|0,n=n|0,r=+r,E8[e&31](n|0,+r)}function KL(e,n,r,u){return e=e|0,n=n|0,r=w(r),u=w(u),w(D8[e&0](n|0,w(r),w(u)))}function XL(e,n){e=e|0,n=n|0,F1[e&127](n|0)}function QL(e,n,r){e=e|0,n=n|0,r=r|0,P1[e&31](n|0,r|0)}function JL(e,n){return e=e|0,n=n|0,Jp[e&31](n|0)|0}function ZL(e,n,r,u,l){e=e|0,n=n|0,r=+r,u=+u,l=l|0,w8[e&1](n|0,+r,+u,l|0)}function $L(e,n,r,u){e=e|0,n=n|0,r=+r,u=+u,LF[e&1](n|0,+r,+u)}function eF(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,y_[e&7](n|0,r|0,u|0)|0}function tF(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,+FF[e&1](n|0,r|0,u|0)}function nF(e,n){return e=e|0,n=n|0,+S8[e&15](n|0)}function rF(e,n,r){return e=e|0,n=n|0,r=+r,PF[e&1](n|0,+r)|0}function iF(e,n,r){return e=e|0,n=n|0,r=r|0,FE[e&15](n|0,r|0)|0}function uF(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=+u,l=+l,s=s|0,IF[e&1](n|0,r|0,+u,+l,s|0)}function oF(e,n,r,u,l,s,h){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,h=h|0,bF[e&1](n|0,r|0,u|0,l|0,s|0,h|0)}function lF(e,n,r){return e=e|0,n=n|0,r=r|0,+T8[e&7](n|0,r|0)}function sF(e){return e=e|0,g_[e&7]()|0}function aF(e,n,r,u,l,s){return e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,C8[e&1](n|0,r|0,u|0,l|0,s|0)|0}function fF(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=+l,BF[e&1](n|0,r|0,u|0,+l)}function cF(e,n,r,u,l,s,h){e=e|0,n=n|0,r=r|0,u=w(u),l=l|0,s=w(s),h=h|0,x8[e&1](n|0,r|0,w(u),l|0,w(s),h|0)}function dF(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,Ry[e&15](n|0,r|0,u|0)}function pF(e){e=e|0,R8[e&0]()}function hF(e,n,r,u){e=e|0,n=n|0,r=r|0,u=+u,A8[e&15](n|0,r|0,+u)}function vF(e,n,r){return e=e|0,n=+n,r=+r,UF[e&1](+n,+r)|0}function mF(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,PE[e&15](n|0,r|0,u|0,l|0)}function yF(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,jt(0)}function gF(e,n){e=e|0,n=w(n),jt(1)}function $s(e,n){e=e|0,n=+n,jt(2)}function _F(e,n,r){return e=e|0,n=w(n),r=w(r),jt(3),Tt}function Zn(e){e=e|0,jt(4)}function Cy(e,n){e=e|0,n=n|0,jt(5)}function Na(e){return e=e|0,jt(6),0}function EF(e,n,r,u){e=e|0,n=+n,r=+r,u=u|0,jt(7)}function DF(e,n,r){e=e|0,n=+n,r=+r,jt(8)}function wF(e,n,r){return e=e|0,n=n|0,r=r|0,jt(9),0}function SF(e,n,r){return e=e|0,n=n|0,r=r|0,jt(10),0}function Qp(e){return e=e|0,jt(11),0}function TF(e,n){return e=e|0,n=+n,jt(12),0}function xy(e,n){return e=e|0,n=n|0,jt(13),0}function CF(e,n,r,u,l){e=e|0,n=n|0,r=+r,u=+u,l=l|0,jt(14)}function xF(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,jt(15)}function LE(e,n){return e=e|0,n=n|0,jt(16),0}function RF(){return jt(17),0}function AF(e,n,r,u,l){return e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,jt(18),0}function OF(e,n,r,u){e=e|0,n=n|0,r=r|0,u=+u,jt(19)}function MF(e,n,r,u,l,s){e=e|0,n=n|0,r=w(r),u=u|0,l=w(l),s=s|0,jt(20)}function m_(e,n,r){e=e|0,n=n|0,r=r|0,jt(21)}function kF(){jt(22)}function Bv(e,n,r){e=e|0,n=n|0,r=+r,jt(23)}function NF(e,n){return e=+e,n=+n,jt(24),0}function Uv(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,jt(25)}var g8=[yF,RO],_8=[gF,n0],E8=[$s,ca,ws,Ss,ts,zo,Ef,ul,qa,r0,Df,qc,dc,Al,Ts,da,ud,pa,pc,$s,$s,$s,$s,$s,$s,$s,$s,$s,$s,$s,$s,$s],D8=[_F],F1=[Zn,Iv,cn,is,Eo,Uf,O1,Ul,n7,r7,i7,hO,vO,mO,IN,bN,BN,Le,fc,Ua,Gu,j0,hh,Sf,n1,Lf,Ea,Ah,fm,y1,g1,Xh,vp,Fd,Lm,T1,Ac,Wm,Ym,Sv,Rv,on,N4,q4,e_,Nt,xu,t0,m9,N9,J9,vR,MR,JR,lA,fA,RA,MA,YA,o7,a7,x7,W7,gd,CM,nk,yk,Nk,eN,vN,xN,ON,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn,Zn],P1=[Cy,E2,nd,Hc,xl,il,D2,qs,Rl,ja,za,Ha,Ol,Ue,lt,$t,Wn,si,ur,Wa,S2,mh,G4,J4,_R,AM,Z7,Hw,Cy,Cy,Cy,Cy],Jp=[Na,pL,_f,y,J,ce,mt,xt,kt,xr,cu,z0,Va,od,Kc,Ms,FR,O7,NM,Oa,Na,Na,Na,Na,Na,Na,Na,Na,Na,Na,Na,Na],w8=[EF,x2],LF=[DF,QA],y_=[wF,n8,hL,yL,zh,dv,E9,Ik],FF=[SF,lv],S8=[Qp,u0,Ve,ci,vh,sl,ha,R2,A2,hc,Qp,Qp,Qp,Qp,Qp,Qp],PF=[TF,iA],FE=[xy,BL,w2,cl,q2,_m,cp,Rp,Km,kr,Uo,Dk,xy,xy,xy,xy],IF=[CF,Sh],bF=[xF,iN],T8=[LE,Qi,O2,dd,Xc,vl,LE,LE],g_=[RF,Qc,ro,D0,hA,FA,p7,LN],C8=[AF,li],BF=[OF,sy],x8=[MF,ld],Ry=[m_,R,i0,Gr,Cu,v1,Ld,ar,dy,vo,QO,ok,_N,m_,m_,m_],R8=[kF],A8=[Bv,rd,mo,id,jo,Wc,qi,g,Up,I9,eA,Bv,Bv,Bv,Bv,Bv],UF=[NF,e7],PE=[Uv,Dp,Lc,tR,qR,EA,jA,E7,X7,BM,WN,Uv,Uv,Uv,Uv,Uv];return{_llvm_bswap_i32:y8,dynCall_idd:vF,dynCall_i:sF,_i64Subtract:h_,___udivdi3:kE,dynCall_vif:VL,setThrew:vs,dynCall_viii:dF,_bitshift64Lshr:v_,_bitshift64Shl:h8,dynCall_vi:XL,dynCall_viiddi:uF,dynCall_diii:tF,dynCall_iii:iF,_memset:bv,_sbrk:t2,_memcpy:gr,__GLOBAL__sub_I_Yoga_cpp:ru,dynCall_vii:QL,___uremdi3:NE,dynCall_vid:YL,stackAlloc:fo,_nbind_init:tL,getTempRet0:X,dynCall_di:nF,dynCall_iid:rF,setTempRet0:b0,_i64Add:ME,dynCall_fiff:KL,dynCall_iiii:eF,_emscripten_get_global_libc:dL,dynCall_viid:hF,dynCall_viiid:fF,dynCall_viififi:cF,dynCall_ii:JL,__GLOBAL__sub_I_Binding_cc:yM,dynCall_viiii:mF,dynCall_iiiiii:aF,stackSave:tl,dynCall_viiiii:WL,__GLOBAL__sub_I_nbind_cc:Ws,dynCall_vidd:$L,_free:d_,runPostSets:qL,dynCall_viiiiii:oF,establishStackSpace:ju,_memmove:Ty,stackRestore:Jl,_malloc:c_,__GLOBAL__sub_I_common_cc:b7,dynCall_viddi:ZL,dynCall_dii:lF,dynCall_v:pF}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer),_llvm_bswap_i32=Module._llvm_bswap_i32=asm._llvm_bswap_i32,getTempRet0=Module.getTempRet0=asm.getTempRet0,___udivdi3=Module.___udivdi3=asm.___udivdi3,setThrew=Module.setThrew=asm.setThrew,_bitshift64Lshr=Module._bitshift64Lshr=asm._bitshift64Lshr,_bitshift64Shl=Module._bitshift64Shl=asm._bitshift64Shl,_memset=Module._memset=asm._memset,_sbrk=Module._sbrk=asm._sbrk,_memcpy=Module._memcpy=asm._memcpy,stackAlloc=Module.stackAlloc=asm.stackAlloc,___uremdi3=Module.___uremdi3=asm.___uremdi3,_nbind_init=Module._nbind_init=asm._nbind_init,_i64Subtract=Module._i64Subtract=asm._i64Subtract,setTempRet0=Module.setTempRet0=asm.setTempRet0,_i64Add=Module._i64Add=asm._i64Add,_emscripten_get_global_libc=Module._emscripten_get_global_libc=asm._emscripten_get_global_libc,__GLOBAL__sub_I_Yoga_cpp=Module.__GLOBAL__sub_I_Yoga_cpp=asm.__GLOBAL__sub_I_Yoga_cpp,__GLOBAL__sub_I_Binding_cc=Module.__GLOBAL__sub_I_Binding_cc=asm.__GLOBAL__sub_I_Binding_cc,stackSave=Module.stackSave=asm.stackSave,__GLOBAL__sub_I_nbind_cc=Module.__GLOBAL__sub_I_nbind_cc=asm.__GLOBAL__sub_I_nbind_cc,_free=Module._free=asm._free,runPostSets=Module.runPostSets=asm.runPostSets,establishStackSpace=Module.establishStackSpace=asm.establishStackSpace,_memmove=Module._memmove=asm._memmove,stackRestore=Module.stackRestore=asm.stackRestore,_malloc=Module._malloc=asm._malloc,__GLOBAL__sub_I_common_cc=Module.__GLOBAL__sub_I_common_cc=asm.__GLOBAL__sub_I_common_cc,dynCall_viiiii=Module.dynCall_viiiii=asm.dynCall_viiiii,dynCall_vif=Module.dynCall_vif=asm.dynCall_vif,dynCall_vid=Module.dynCall_vid=asm.dynCall_vid,dynCall_fiff=Module.dynCall_fiff=asm.dynCall_fiff,dynCall_vi=Module.dynCall_vi=asm.dynCall_vi,dynCall_vii=Module.dynCall_vii=asm.dynCall_vii,dynCall_ii=Module.dynCall_ii=asm.dynCall_ii,dynCall_viddi=Module.dynCall_viddi=asm.dynCall_viddi,dynCall_vidd=Module.dynCall_vidd=asm.dynCall_vidd,dynCall_iiii=Module.dynCall_iiii=asm.dynCall_iiii,dynCall_diii=Module.dynCall_diii=asm.dynCall_diii,dynCall_di=Module.dynCall_di=asm.dynCall_di,dynCall_iid=Module.dynCall_iid=asm.dynCall_iid,dynCall_iii=Module.dynCall_iii=asm.dynCall_iii,dynCall_viiddi=Module.dynCall_viiddi=asm.dynCall_viiddi,dynCall_viiiiii=Module.dynCall_viiiiii=asm.dynCall_viiiiii,dynCall_dii=Module.dynCall_dii=asm.dynCall_dii,dynCall_i=Module.dynCall_i=asm.dynCall_i,dynCall_iiiiii=Module.dynCall_iiiiii=asm.dynCall_iiiiii,dynCall_viiid=Module.dynCall_viiid=asm.dynCall_viiid,dynCall_viififi=Module.dynCall_viififi=asm.dynCall_viififi,dynCall_viii=Module.dynCall_viii=asm.dynCall_viii,dynCall_v=Module.dynCall_v=asm.dynCall_v,dynCall_viid=Module.dynCall_viid=asm.dynCall_viid,dynCall_idd=Module.dynCall_idd=asm.dynCall_idd,dynCall_viiii=Module.dynCall_viiii=asm.dynCall_viiii;Runtime.stackAlloc=Module.stackAlloc,Runtime.stackSave=Module.stackSave,Runtime.stackRestore=Module.stackRestore,Runtime.establishStackSpace=Module.establishStackSpace,Runtime.setTempRet0=Module.setTempRet0,Runtime.getTempRet0=Module.getTempRet0,Module.asm=asm;function ExitStatus(i){this.name="ExitStatus",this.message="Program terminated with exit("+i+")",this.status=i}ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var initialStackTop,preloadStartTime=null,calledMain=!1;dependenciesFulfilled=function i(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=i)},Module.callMain=Module.callMain=function(o){o=o||[],ensureInitRuntime();var a=o.length+1;function p(){for(var O=0;O<4-1;O++)_.push(0)}var _=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];p();for(var t=0;t0||(preRun(),runDependencies>0)||Module.calledRun)return;function o(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(i),postRun()))}Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),o()},1)):o()}Module.run=Module.run=run;function exit(i,o){o&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,EXITSTATUS=i,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(i)),ENVIRONMENT_IS_NODE&&process.exit(i),Module.quit(i,new ExitStatus(i)))}Module.exit=Module.exit=exit;var abortDecorators=[];function abort(i){Module.onAbort&&Module.onAbort(i),i!==void 0?(Module.print(i),Module.printErr(i),i=JSON.stringify(i)):i="",ABORT=!0,EXITSTATUS=1;var o=` -If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,a="abort("+i+") at "+stackTrace()+o;throw abortDecorators&&abortDecorators.forEach(function(p){a=p(a,i)}),a}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var $p=tt((MH,WS)=>{"use strict";var kP=HS(),NP=qS(),gD=!1,_D=null;NP({},function(i,o){if(!gD){if(gD=!0,i)throw i;_D=o}});if(!gD)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");WS.exports=kP(_D.bind,_D.lib)});var GS=tt((kH,VS)=>{"use strict";VS.exports=({onlyFirst:i=!1}={})=>{let o=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(o,i?void 0:"g")}});var ED=tt((NH,YS)=>{"use strict";var LP=GS();YS.exports=i=>typeof i=="string"?i.replace(LP(),""):i});var wD=tt((LH,DD)=>{"use strict";var KS=i=>Number.isNaN(i)?!1:i>=4352&&(i<=4447||i===9001||i===9002||11904<=i&&i<=12871&&i!==12351||12880<=i&&i<=19903||19968<=i&&i<=42182||43360<=i&&i<=43388||44032<=i&&i<=55203||63744<=i&&i<=64255||65040<=i&&i<=65049||65072<=i&&i<=65131||65281<=i&&i<=65376||65504<=i&&i<=65510||110592<=i&&i<=110593||127488<=i&&i<=127569||131072<=i&&i<=262141);DD.exports=KS;DD.exports.default=KS});var QS=tt((FH,XS)=>{"use strict";XS.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var U_=tt((PH,SD)=>{"use strict";var FP=ED(),PP=wD(),IP=QS(),JS=i=>{if(i=i.replace(IP()," "),typeof i!="string"||i.length===0)return 0;i=FP(i);let o=0;for(let a=0;a=127&&p<=159||p>=768&&p<=879||(p>65535&&a++,o+=PP(p)?2:1)}return o};SD.exports=JS;SD.exports.default=JS});var CD=tt((IH,TD)=>{"use strict";var bP=U_(),ZS=i=>{let o=0;for(let a of i.split(` -`))o=Math.max(o,bP(a));return o};TD.exports=ZS;TD.exports.default=ZS});var $S=tt(Wy=>{"use strict";var BP=Wy&&Wy.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Wy,"__esModule",{value:!0});var UP=BP(CD()),xD={};Wy.default=i=>{if(i.length===0)return{width:0,height:0};if(xD[i])return xD[i];let o=UP.default(i),a=i.split(` -`).length;return xD[i]={width:o,height:a},{width:o,height:a}}});var eT=tt(Vy=>{"use strict";var jP=Vy&&Vy.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Vy,"__esModule",{value:!0});var Vi=jP($p()),zP=(i,o)=>{"position"in o&&i.setPositionType(o.position==="absolute"?Vi.default.POSITION_TYPE_ABSOLUTE:Vi.default.POSITION_TYPE_RELATIVE)},HP=(i,o)=>{"marginLeft"in o&&i.setMargin(Vi.default.EDGE_START,o.marginLeft||0),"marginRight"in o&&i.setMargin(Vi.default.EDGE_END,o.marginRight||0),"marginTop"in o&&i.setMargin(Vi.default.EDGE_TOP,o.marginTop||0),"marginBottom"in o&&i.setMargin(Vi.default.EDGE_BOTTOM,o.marginBottom||0)},qP=(i,o)=>{"paddingLeft"in o&&i.setPadding(Vi.default.EDGE_LEFT,o.paddingLeft||0),"paddingRight"in o&&i.setPadding(Vi.default.EDGE_RIGHT,o.paddingRight||0),"paddingTop"in o&&i.setPadding(Vi.default.EDGE_TOP,o.paddingTop||0),"paddingBottom"in o&&i.setPadding(Vi.default.EDGE_BOTTOM,o.paddingBottom||0)},WP=(i,o)=>{var a;"flexGrow"in o&&i.setFlexGrow((a=o.flexGrow)!==null&&a!==void 0?a:0),"flexShrink"in o&&i.setFlexShrink(typeof o.flexShrink=="number"?o.flexShrink:1),"flexDirection"in o&&(o.flexDirection==="row"&&i.setFlexDirection(Vi.default.FLEX_DIRECTION_ROW),o.flexDirection==="row-reverse"&&i.setFlexDirection(Vi.default.FLEX_DIRECTION_ROW_REVERSE),o.flexDirection==="column"&&i.setFlexDirection(Vi.default.FLEX_DIRECTION_COLUMN),o.flexDirection==="column-reverse"&&i.setFlexDirection(Vi.default.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in o&&(typeof o.flexBasis=="number"?i.setFlexBasis(o.flexBasis):typeof o.flexBasis=="string"?i.setFlexBasisPercent(Number.parseInt(o.flexBasis,10)):i.setFlexBasis(NaN)),"alignItems"in o&&((o.alignItems==="stretch"||!o.alignItems)&&i.setAlignItems(Vi.default.ALIGN_STRETCH),o.alignItems==="flex-start"&&i.setAlignItems(Vi.default.ALIGN_FLEX_START),o.alignItems==="center"&&i.setAlignItems(Vi.default.ALIGN_CENTER),o.alignItems==="flex-end"&&i.setAlignItems(Vi.default.ALIGN_FLEX_END)),"alignSelf"in o&&((o.alignSelf==="auto"||!o.alignSelf)&&i.setAlignSelf(Vi.default.ALIGN_AUTO),o.alignSelf==="flex-start"&&i.setAlignSelf(Vi.default.ALIGN_FLEX_START),o.alignSelf==="center"&&i.setAlignSelf(Vi.default.ALIGN_CENTER),o.alignSelf==="flex-end"&&i.setAlignSelf(Vi.default.ALIGN_FLEX_END)),"justifyContent"in o&&((o.justifyContent==="flex-start"||!o.justifyContent)&&i.setJustifyContent(Vi.default.JUSTIFY_FLEX_START),o.justifyContent==="center"&&i.setJustifyContent(Vi.default.JUSTIFY_CENTER),o.justifyContent==="flex-end"&&i.setJustifyContent(Vi.default.JUSTIFY_FLEX_END),o.justifyContent==="space-between"&&i.setJustifyContent(Vi.default.JUSTIFY_SPACE_BETWEEN),o.justifyContent==="space-around"&&i.setJustifyContent(Vi.default.JUSTIFY_SPACE_AROUND))},VP=(i,o)=>{var a,p;"width"in o&&(typeof o.width=="number"?i.setWidth(o.width):typeof o.width=="string"?i.setWidthPercent(Number.parseInt(o.width,10)):i.setWidthAuto()),"height"in o&&(typeof o.height=="number"?i.setHeight(o.height):typeof o.height=="string"?i.setHeightPercent(Number.parseInt(o.height,10)):i.setHeightAuto()),"minWidth"in o&&(typeof o.minWidth=="string"?i.setMinWidthPercent(Number.parseInt(o.minWidth,10)):i.setMinWidth((a=o.minWidth)!==null&&a!==void 0?a:0)),"minHeight"in o&&(typeof o.minHeight=="string"?i.setMinHeightPercent(Number.parseInt(o.minHeight,10)):i.setMinHeight((p=o.minHeight)!==null&&p!==void 0?p:0))},GP=(i,o)=>{"display"in o&&i.setDisplay(o.display==="flex"?Vi.default.DISPLAY_FLEX:Vi.default.DISPLAY_NONE)},YP=(i,o)=>{if("borderStyle"in o){let a=typeof o.borderStyle=="string"?1:0;i.setBorder(Vi.default.EDGE_TOP,a),i.setBorder(Vi.default.EDGE_BOTTOM,a),i.setBorder(Vi.default.EDGE_LEFT,a),i.setBorder(Vi.default.EDGE_RIGHT,a)}};Vy.default=(i,o={})=>{zP(i,o),HP(i,o),qP(i,o),WP(i,o),VP(i,o),GP(i,o),YP(i,o)}});var nT=tt((UH,tT)=>{"use strict";tT.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var RD=tt((jH,rT)=>{var Gy=nT(),iT={};for(let i of Object.keys(Gy))iT[Gy[i]]=i;var zn={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};rT.exports=zn;for(let i of Object.keys(zn)){if(!("channels"in zn[i]))throw new Error("missing channels property: "+i);if(!("labels"in zn[i]))throw new Error("missing channel labels property: "+i);if(zn[i].labels.length!==zn[i].channels)throw new Error("channel and label counts mismatch: "+i);let{channels:o,labels:a}=zn[i];delete zn[i].channels,delete zn[i].labels,Object.defineProperty(zn[i],"channels",{value:o}),Object.defineProperty(zn[i],"labels",{value:a})}zn.rgb.hsl=function(i){let o=i[0]/255,a=i[1]/255,p=i[2]/255,_=Math.min(o,a,p),t=Math.max(o,a,p),k=t-_,L,O;t===_?L=0:o===t?L=(a-p)/k:a===t?L=2+(p-o)/k:p===t&&(L=4+(o-a)/k),L=Math.min(L*60,360),L<0&&(L+=360);let C=(_+t)/2;return t===_?O=0:C<=.5?O=k/(t+_):O=k/(2-t-_),[L,O*100,C*100]};zn.rgb.hsv=function(i){let o,a,p,_,t,k=i[0]/255,L=i[1]/255,O=i[2]/255,C=Math.max(k,L,O),U=C-Math.min(k,L,O),H=function(W){return(C-W)/6/U+1/2};return U===0?(_=0,t=0):(t=U/C,o=H(k),a=H(L),p=H(O),k===C?_=p-a:L===C?_=1/3+o-p:O===C&&(_=2/3+a-o),_<0?_+=1:_>1&&(_-=1)),[_*360,t*100,C*100]};zn.rgb.hwb=function(i){let o=i[0],a=i[1],p=i[2],_=zn.rgb.hsl(i)[0],t=1/255*Math.min(o,Math.min(a,p));return p=1-1/255*Math.max(o,Math.max(a,p)),[_,t*100,p*100]};zn.rgb.cmyk=function(i){let o=i[0]/255,a=i[1]/255,p=i[2]/255,_=Math.min(1-o,1-a,1-p),t=(1-o-_)/(1-_)||0,k=(1-a-_)/(1-_)||0,L=(1-p-_)/(1-_)||0;return[t*100,k*100,L*100,_*100]};function KP(i,o){return(i[0]-o[0])**2+(i[1]-o[1])**2+(i[2]-o[2])**2}zn.rgb.keyword=function(i){let o=iT[i];if(o)return o;let a=Infinity,p;for(let _ of Object.keys(Gy)){let t=Gy[_],k=KP(i,t);k.04045?((o+.055)/1.055)**2.4:o/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92,p=p>.04045?((p+.055)/1.055)**2.4:p/12.92;let _=o*.4124+a*.3576+p*.1805,t=o*.2126+a*.7152+p*.0722,k=o*.0193+a*.1192+p*.9505;return[_*100,t*100,k*100]};zn.rgb.lab=function(i){let o=zn.rgb.xyz(i),a=o[0],p=o[1],_=o[2];a/=95.047,p/=100,_/=108.883,a=a>.008856?a**(1/3):7.787*a+16/116,p=p>.008856?p**(1/3):7.787*p+16/116,_=_>.008856?_**(1/3):7.787*_+16/116;let t=116*p-16,k=500*(a-p),L=200*(p-_);return[t,k,L]};zn.hsl.rgb=function(i){let o=i[0]/360,a=i[1]/100,p=i[2]/100,_,t,k;if(a===0)return k=p*255,[k,k,k];p<.5?_=p*(1+a):_=p+a-p*a;let L=2*p-_,O=[0,0,0];for(let C=0;C<3;C++)t=o+1/3*-(C-1),t<0&&t++,t>1&&t--,6*t<1?k=L+(_-L)*6*t:2*t<1?k=_:3*t<2?k=L+(_-L)*(2/3-t)*6:k=L,O[C]=k*255;return O};zn.hsl.hsv=function(i){let o=i[0],a=i[1]/100,p=i[2]/100,_=a,t=Math.max(p,.01);p*=2,a*=p<=1?p:2-p,_*=t<=1?t:2-t;let k=(p+a)/2,L=p===0?2*_/(t+_):2*a/(p+a);return[o,L*100,k*100]};zn.hsv.rgb=function(i){let o=i[0]/60,a=i[1]/100,p=i[2]/100,_=Math.floor(o)%6,t=o-Math.floor(o),k=255*p*(1-a),L=255*p*(1-a*t),O=255*p*(1-a*(1-t));switch(p*=255,_){case 0:return[p,O,k];case 1:return[L,p,k];case 2:return[k,p,O];case 3:return[k,L,p];case 4:return[O,k,p];case 5:return[p,k,L]}};zn.hsv.hsl=function(i){let o=i[0],a=i[1]/100,p=i[2]/100,_=Math.max(p,.01),t,k;k=(2-a)*p;let L=(2-a)*_;return t=a*_,t/=L<=1?L:2-L,t=t||0,k/=2,[o,t*100,k*100]};zn.hwb.rgb=function(i){let o=i[0]/360,a=i[1]/100,p=i[2]/100,_=a+p,t;_>1&&(a/=_,p/=_);let k=Math.floor(6*o),L=1-p;t=6*o-k,(k&1)!=0&&(t=1-t);let O=a+t*(L-a),C,U,H;switch(k){default:case 6:case 0:C=L,U=O,H=a;break;case 1:C=O,U=L,H=a;break;case 2:C=a,U=L,H=O;break;case 3:C=a,U=O,H=L;break;case 4:C=O,U=a,H=L;break;case 5:C=L,U=a,H=O;break}return[C*255,U*255,H*255]};zn.cmyk.rgb=function(i){let o=i[0]/100,a=i[1]/100,p=i[2]/100,_=i[3]/100,t=1-Math.min(1,o*(1-_)+_),k=1-Math.min(1,a*(1-_)+_),L=1-Math.min(1,p*(1-_)+_);return[t*255,k*255,L*255]};zn.xyz.rgb=function(i){let o=i[0]/100,a=i[1]/100,p=i[2]/100,_,t,k;return _=o*3.2406+a*-1.5372+p*-.4986,t=o*-.9689+a*1.8758+p*.0415,k=o*.0557+a*-.204+p*1.057,_=_>.0031308?1.055*_**(1/2.4)-.055:_*12.92,t=t>.0031308?1.055*t**(1/2.4)-.055:t*12.92,k=k>.0031308?1.055*k**(1/2.4)-.055:k*12.92,_=Math.min(Math.max(0,_),1),t=Math.min(Math.max(0,t),1),k=Math.min(Math.max(0,k),1),[_*255,t*255,k*255]};zn.xyz.lab=function(i){let o=i[0],a=i[1],p=i[2];o/=95.047,a/=100,p/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,p=p>.008856?p**(1/3):7.787*p+16/116;let _=116*a-16,t=500*(o-a),k=200*(a-p);return[_,t,k]};zn.lab.xyz=function(i){let o=i[0],a=i[1],p=i[2],_,t,k;t=(o+16)/116,_=a/500+t,k=t-p/200;let L=t**3,O=_**3,C=k**3;return t=L>.008856?L:(t-16/116)/7.787,_=O>.008856?O:(_-16/116)/7.787,k=C>.008856?C:(k-16/116)/7.787,_*=95.047,t*=100,k*=108.883,[_,t,k]};zn.lab.lch=function(i){let o=i[0],a=i[1],p=i[2],_;_=Math.atan2(p,a)*360/2/Math.PI,_<0&&(_+=360);let k=Math.sqrt(a*a+p*p);return[o,k,_]};zn.lch.lab=function(i){let o=i[0],a=i[1],_=i[2]/360*2*Math.PI,t=a*Math.cos(_),k=a*Math.sin(_);return[o,t,k]};zn.rgb.ansi16=function(i,o=null){let[a,p,_]=i,t=o===null?zn.rgb.hsv(i)[2]:o;if(t=Math.round(t/50),t===0)return 30;let k=30+(Math.round(_/255)<<2|Math.round(p/255)<<1|Math.round(a/255));return t===2&&(k+=60),k};zn.hsv.ansi16=function(i){return zn.rgb.ansi16(zn.hsv.rgb(i),i[2])};zn.rgb.ansi256=function(i){let o=i[0],a=i[1],p=i[2];return o===a&&a===p?o<8?16:o>248?231:Math.round((o-8)/247*24)+232:16+36*Math.round(o/255*5)+6*Math.round(a/255*5)+Math.round(p/255*5)};zn.ansi16.rgb=function(i){let o=i%10;if(o===0||o===7)return i>50&&(o+=3.5),o=o/10.5*255,[o,o,o];let a=(~~(i>50)+1)*.5,p=(o&1)*a*255,_=(o>>1&1)*a*255,t=(o>>2&1)*a*255;return[p,_,t]};zn.ansi256.rgb=function(i){if(i>=232){let t=(i-232)*10+8;return[t,t,t]}i-=16;let o,a=Math.floor(i/36)/5*255,p=Math.floor((o=i%36)/6)/5*255,_=o%6/5*255;return[a,p,_]};zn.rgb.hex=function(i){let a=(((Math.round(i[0])&255)<<16)+((Math.round(i[1])&255)<<8)+(Math.round(i[2])&255)).toString(16).toUpperCase();return"000000".substring(a.length)+a};zn.hex.rgb=function(i){let o=i.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!o)return[0,0,0];let a=o[0];o[0].length===3&&(a=a.split("").map(L=>L+L).join(""));let p=parseInt(a,16),_=p>>16&255,t=p>>8&255,k=p&255;return[_,t,k]};zn.rgb.hcg=function(i){let o=i[0]/255,a=i[1]/255,p=i[2]/255,_=Math.max(Math.max(o,a),p),t=Math.min(Math.min(o,a),p),k=_-t,L,O;return k<1?L=t/(1-k):L=0,k<=0?O=0:_===o?O=(a-p)/k%6:_===a?O=2+(p-o)/k:O=4+(o-a)/k,O/=6,O%=1,[O*360,k*100,L*100]};zn.hsl.hcg=function(i){let o=i[1]/100,a=i[2]/100,p=a<.5?2*o*a:2*o*(1-a),_=0;return p<1&&(_=(a-.5*p)/(1-p)),[i[0],p*100,_*100]};zn.hsv.hcg=function(i){let o=i[1]/100,a=i[2]/100,p=o*a,_=0;return p<1&&(_=(a-p)/(1-p)),[i[0],p*100,_*100]};zn.hcg.rgb=function(i){let o=i[0]/360,a=i[1]/100,p=i[2]/100;if(a===0)return[p*255,p*255,p*255];let _=[0,0,0],t=o%1*6,k=t%1,L=1-k,O=0;switch(Math.floor(t)){case 0:_[0]=1,_[1]=k,_[2]=0;break;case 1:_[0]=L,_[1]=1,_[2]=0;break;case 2:_[0]=0,_[1]=1,_[2]=k;break;case 3:_[0]=0,_[1]=L,_[2]=1;break;case 4:_[0]=k,_[1]=0,_[2]=1;break;default:_[0]=1,_[1]=0,_[2]=L}return O=(1-a)*p,[(a*_[0]+O)*255,(a*_[1]+O)*255,(a*_[2]+O)*255]};zn.hcg.hsv=function(i){let o=i[1]/100,a=i[2]/100,p=o+a*(1-o),_=0;return p>0&&(_=o/p),[i[0],_*100,p*100]};zn.hcg.hsl=function(i){let o=i[1]/100,p=i[2]/100*(1-o)+.5*o,_=0;return p>0&&p<.5?_=o/(2*p):p>=.5&&p<1&&(_=o/(2*(1-p))),[i[0],_*100,p*100]};zn.hcg.hwb=function(i){let o=i[1]/100,a=i[2]/100,p=o+a*(1-o);return[i[0],(p-o)*100,(1-p)*100]};zn.hwb.hcg=function(i){let o=i[1]/100,a=i[2]/100,p=1-a,_=p-o,t=0;return _<1&&(t=(p-_)/(1-_)),[i[0],_*100,t*100]};zn.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]};zn.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]};zn.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]};zn.gray.hsl=function(i){return[0,0,i[0]]};zn.gray.hsv=zn.gray.hsl;zn.gray.hwb=function(i){return[0,100,i[0]]};zn.gray.cmyk=function(i){return[0,0,0,i[0]]};zn.gray.lab=function(i){return[i[0],0,0]};zn.gray.hex=function(i){let o=Math.round(i[0]/100*255)&255,p=((o<<16)+(o<<8)+o).toString(16).toUpperCase();return"000000".substring(p.length)+p};zn.rgb.gray=function(i){return[(i[0]+i[1]+i[2])/3/255*100]}});var oT=tt((zH,uT)=>{var j_=RD();function XP(){let i={},o=Object.keys(j_);for(let a=o.length,p=0;p{var AD=RD(),$P=oT(),Yv={},eI=Object.keys(AD);function tI(i){let o=function(...a){let p=a[0];return p==null?p:(p.length>1&&(a=p),i(a))};return"conversion"in i&&(o.conversion=i.conversion),o}function nI(i){let o=function(...a){let p=a[0];if(p==null)return p;p.length>1&&(a=p);let _=i(a);if(typeof _=="object")for(let t=_.length,k=0;k{Yv[i]={},Object.defineProperty(Yv[i],"channels",{value:AD[i].channels}),Object.defineProperty(Yv[i],"labels",{value:AD[i].labels});let o=$P(i);Object.keys(o).forEach(p=>{let _=o[p];Yv[i][p]=nI(_),Yv[i][p].raw=tI(_)})});lT.exports=Yv});var H_=tt((qH,aT)=>{"use strict";var fT=(i,o)=>(...a)=>`[${i(...a)+o}m`,cT=(i,o)=>(...a)=>{let p=i(...a);return`[${38+o};5;${p}m`},dT=(i,o)=>(...a)=>{let p=i(...a);return`[${38+o};2;${p[0]};${p[1]};${p[2]}m`},z_=i=>i,pT=(i,o,a)=>[i,o,a],Kv=(i,o,a)=>{Object.defineProperty(i,o,{get:()=>{let p=a();return Object.defineProperty(i,o,{value:p,enumerable:!0,configurable:!0}),p},enumerable:!0,configurable:!0})},OD,Xv=(i,o,a,p)=>{OD===void 0&&(OD=sT());let _=p?10:0,t={};for(let[k,L]of Object.entries(OD)){let O=k==="ansi16"?"ansi":k;k===o?t[O]=i(a,_):typeof L=="object"&&(t[O]=i(L[o],_))}return t};function rI(){let i=new Map,o={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};o.color.gray=o.color.blackBright,o.bgColor.bgGray=o.bgColor.bgBlackBright,o.color.grey=o.color.blackBright,o.bgColor.bgGrey=o.bgColor.bgBlackBright;for(let[a,p]of Object.entries(o)){for(let[_,t]of Object.entries(p))o[_]={open:`[${t[0]}m`,close:`[${t[1]}m`},p[_]=o[_],i.set(t[0],t[1]);Object.defineProperty(o,a,{value:p,enumerable:!1})}return Object.defineProperty(o,"codes",{value:i,enumerable:!1}),o.color.close="",o.bgColor.close="",Kv(o.color,"ansi",()=>Xv(fT,"ansi16",z_,!1)),Kv(o.color,"ansi256",()=>Xv(cT,"ansi256",z_,!1)),Kv(o.color,"ansi16m",()=>Xv(dT,"rgb",pT,!1)),Kv(o.bgColor,"ansi",()=>Xv(fT,"ansi16",z_,!0)),Kv(o.bgColor,"ansi256",()=>Xv(cT,"ansi256",z_,!0)),Kv(o.bgColor,"ansi16m",()=>Xv(dT,"rgb",pT,!0)),o}Object.defineProperty(aT,"exports",{enumerable:!0,get:rI})});var mT=tt((WH,hT)=>{"use strict";var Yy=U_(),iI=ED(),uI=H_(),MD=new Set(["","\x9B"]),oI=39,vT=i=>`${MD.values().next().value}[${i}m`,lI=i=>i.split(" ").map(o=>Yy(o)),kD=(i,o,a)=>{let p=[...o],_=!1,t=Yy(iI(i[i.length-1]));for(let[k,L]of p.entries()){let O=Yy(L);if(t+O<=a?i[i.length-1]+=L:(i.push(L),t=0),MD.has(L))_=!0;else if(_&&L==="m"){_=!1;continue}_||(t+=O,t===a&&k0&&i.length>1&&(i[i.length-2]+=i.pop())},sI=i=>{let o=i.split(" "),a=o.length;for(;a>0&&!(Yy(o[a-1])>0);)a--;return a===o.length?i:o.slice(0,a).join(" ")+o.slice(a).join("")},aI=(i,o,a={})=>{if(a.trim!==!1&&i.trim()==="")return"";let p="",_="",t,k=lI(i),L=[""];for(let[O,C]of i.split(" ").entries()){a.trim!==!1&&(L[L.length-1]=L[L.length-1].trimLeft());let U=Yy(L[L.length-1]);if(O!==0&&(U>=o&&(a.wordWrap===!1||a.trim===!1)&&(L.push(""),U=0),(U>0||a.trim===!1)&&(L[L.length-1]+=" ",U++)),a.hard&&k[O]>o){let H=o-U,W=1+Math.floor((k[O]-H-1)/o);Math.floor((k[O]-1)/o)o&&U>0&&k[O]>0){if(a.wordWrap===!1&&Uo&&a.wordWrap===!1){kD(L,C,o);continue}L[L.length-1]+=C}a.trim!==!1&&(L=L.map(sI)),p=L.join(` -`);for(let[O,C]of[...p].entries()){if(_+=C,MD.has(C)){let H=parseFloat(/\d[^m]*/.exec(p.slice(O,O+4)));t=H===oI?null:H}let U=uI.codes.get(Number(t));t&&U&&(p[O+1]===` -`?_+=vT(U):C===` -`&&(_+=vT(t)))}return _};hT.exports=(i,o,a)=>String(i).normalize().replace(/\r\n/g,` -`).split(` -`).map(p=>aI(p,o,a)).join(` -`)});var _T=tt((VH,yT)=>{"use strict";var gT="[\uD800-\uDBFF][\uDC00-\uDFFF]",fI=i=>i&&i.exact?new RegExp(`^${gT}$`):new RegExp(gT,"g");yT.exports=fI});var ND=tt((GH,ET)=>{"use strict";var cI=wD(),dI=_T(),DT=H_(),wT=["","\x9B"],q_=i=>`${wT[0]}[${i}m`,ST=(i,o,a)=>{let p=[];i=[...i];for(let _ of i){let t=_;_.match(";")&&(_=_.split(";")[0][0]+"0");let k=DT.codes.get(parseInt(_,10));if(k){let L=i.indexOf(k.toString());L>=0?i.splice(L,1):p.push(q_(o?k:t))}else if(o){p.push(q_(0));break}else p.push(q_(t))}if(o&&(p=p.filter((_,t)=>p.indexOf(_)===t),a!==void 0)){let _=q_(DT.codes.get(parseInt(a,10)));p=p.reduce((t,k)=>k===_?[k,...t]:[...t,k],[])}return p.join("")};ET.exports=(i,o,a)=>{let p=[...i.normalize()],_=[];a=typeof a=="number"?a:p.length;let t=!1,k,L=0,O="";for(let[C,U]of p.entries()){let H=!1;if(wT.includes(U)){let W=/\d[^m]*/.exec(i.slice(C,C+18));k=W&&W.length>0?W[0]:void 0,Lo&&L<=a)O+=U;else if(L===o&&!t&&k!==void 0)O=ST(_);else if(L>=a){O+=ST(_,!0,k);break}}return O}});var CT=tt((YH,TT)=>{"use strict";var d2=ND(),pI=U_();function W_(i,o,a){if(i.charAt(o)===" ")return o;for(let p=1;p<=3;p++)if(a){if(i.charAt(o+p)===" ")return o+p}else if(i.charAt(o-p)===" ")return o-p;return o}TT.exports=(i,o,a)=>{a=Ht({position:"end",preferTruncationOnSpace:!1},a);let{position:p,space:_,preferTruncationOnSpace:t}=a,k="\u2026",L=1;if(typeof i!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof i}`);if(typeof o!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof o}`);if(o<1)return"";if(o===1)return k;let O=pI(i);if(O<=o)return i;if(p==="start"){if(t){let C=W_(i,O-o+1,!0);return k+d2(i,C,O).trim()}return _===!0&&(k+=" ",L=2),k+d2(i,O-o+L,O)}if(p==="middle"){_===!0&&(k=" "+k+" ",L=3);let C=Math.floor(o/2);if(t){let U=W_(i,C),H=W_(i,O-(o-C)+1,!0);return d2(i,0,U)+k+d2(i,H,O).trim()}return d2(i,0,C)+k+d2(i,O-(o-C)+L,O)}if(p==="end"){if(t){let C=W_(i,o-1);return d2(i,0,C)+k}return _===!0&&(k=" "+k,L=2),d2(i,0,o-L)+k}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${p}`)}});var FD=tt(Ky=>{"use strict";var xT=Ky&&Ky.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ky,"__esModule",{value:!0});var hI=xT(mT()),vI=xT(CT()),LD={};Ky.default=(i,o,a)=>{let p=i+String(o)+String(a);if(LD[p])return LD[p];let _=i;if(a==="wrap"&&(_=hI.default(i,o,{trim:!1,hard:!0})),a.startsWith("truncate")){let t="end";a==="truncate-middle"&&(t="middle"),a==="truncate-start"&&(t="start"),_=vI.default(i,o,{position:t})}return LD[p]=_,_}});var ID=tt(PD=>{"use strict";Object.defineProperty(PD,"__esModule",{value:!0});var RT=i=>{let o="";if(i.childNodes.length>0)for(let a of i.childNodes){let p="";a.nodeName==="#text"?p=a.nodeValue:((a.nodeName==="ink-text"||a.nodeName==="ink-virtual-text")&&(p=RT(a)),p.length>0&&typeof a.internal_transform=="function"&&(p=a.internal_transform(p))),o+=p}return o};PD.default=RT});var bD=tt(c0=>{"use strict";var Xy=c0&&c0.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(c0,"__esModule",{value:!0});c0.setTextNodeValue=c0.createTextNode=c0.setStyle=c0.setAttribute=c0.removeChildNode=c0.insertBeforeNode=c0.appendChildNode=c0.createNode=c0.TEXT_NAME=void 0;var mI=Xy($p()),AT=Xy($S()),yI=Xy(eT()),gI=Xy(FD()),_I=Xy(ID());c0.TEXT_NAME="#text";c0.createNode=i=>{var o;let a={nodeName:i,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:i==="ink-virtual-text"?void 0:mI.default.Node.create()};return i==="ink-text"&&((o=a.yogaNode)===null||o===void 0||o.setMeasureFunc(EI.bind(null,a))),a};c0.appendChildNode=(i,o)=>{var a;o.parentNode&&c0.removeChildNode(o.parentNode,o),o.parentNode=i,i.childNodes.push(o),o.yogaNode&&((a=i.yogaNode)===null||a===void 0||a.insertChild(o.yogaNode,i.yogaNode.getChildCount())),(i.nodeName==="ink-text"||i.nodeName==="ink-virtual-text")&&V_(i)};c0.insertBeforeNode=(i,o,a)=>{var p,_;o.parentNode&&c0.removeChildNode(o.parentNode,o),o.parentNode=i;let t=i.childNodes.indexOf(a);if(t>=0){i.childNodes.splice(t,0,o),o.yogaNode&&((p=i.yogaNode)===null||p===void 0||p.insertChild(o.yogaNode,t));return}i.childNodes.push(o),o.yogaNode&&((_=i.yogaNode)===null||_===void 0||_.insertChild(o.yogaNode,i.yogaNode.getChildCount())),(i.nodeName==="ink-text"||i.nodeName==="ink-virtual-text")&&V_(i)};c0.removeChildNode=(i,o)=>{var a,p;o.yogaNode&&((p=(a=o.parentNode)===null||a===void 0?void 0:a.yogaNode)===null||p===void 0||p.removeChild(o.yogaNode)),o.parentNode=null;let _=i.childNodes.indexOf(o);_>=0&&i.childNodes.splice(_,1),(i.nodeName==="ink-text"||i.nodeName==="ink-virtual-text")&&V_(i)};c0.setAttribute=(i,o,a)=>{i.attributes[o]=a};c0.setStyle=(i,o)=>{i.style=o,i.yogaNode&&yI.default(i.yogaNode,o)};c0.createTextNode=i=>{let o={nodeName:"#text",nodeValue:i,yogaNode:void 0,parentNode:null,style:{}};return c0.setTextNodeValue(o,i),o};var EI=function(i,o){var a,p;let _=i.nodeName==="#text"?i.nodeValue:_I.default(i),t=AT.default(_);if(t.width<=o||t.width>=1&&o>0&&o<1)return t;let k=(p=(a=i.style)===null||a===void 0?void 0:a.textWrap)!==null&&p!==void 0?p:"wrap",L=gI.default(_,o,k);return AT.default(L)},OT=i=>{var o;if(!(!i||!i.parentNode))return(o=i.yogaNode)!==null&&o!==void 0?o:OT(i.parentNode)},V_=i=>{let o=OT(i);o==null||o.markDirty()};c0.setTextNodeValue=(i,o)=>{typeof o!="string"&&(o=String(o)),i.nodeValue=o,V_(i)}});var eh=tt((JH,MT)=>{"use strict";MT.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),EMPTY_BUFFER:Buffer.alloc(0),NOOP:()=>{}}});var Qy=tt((ZH,BD)=>{"use strict";var{EMPTY_BUFFER:DI}=eh();function kT(i,o){if(i.length===0)return DI;if(i.length===1)return i[0];let a=Buffer.allocUnsafe(o),p=0;for(let _=0;_{"use strict";var IT=Symbol("kDone"),UD=Symbol("kRun"),bT=class{constructor(o){this[IT]=()=>{this.pending--,this[UD]()},this.concurrency=o||Infinity,this.jobs=[],this.pending=0}add(o){this.jobs.push(o),this[UD]()}[UD](){if(this.pending!==this.concurrency&&this.jobs.length){let o=this.jobs.shift();this.pending++,o(this[IT])}}};PT.exports=bT});var $y=tt((eq,UT)=>{"use strict";var Jy=require("zlib"),jT=Qy(),wI=BT(),{kStatusCode:zT,NOOP:SI}=eh(),TI=Buffer.from([0,0,255,255]),Y_=Symbol("permessage-deflate"),K1=Symbol("total-length"),Zy=Symbol("callback"),p2=Symbol("buffers"),jD=Symbol("error"),K_,HT=class{constructor(o,a,p){if(this._maxPayload=p|0,this._options=o||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!a,this._deflate=null,this._inflate=null,this.params=null,!K_){let _=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;K_=new wI(_)}}static get extensionName(){return"permessage-deflate"}offer(){let o={};return this._options.serverNoContextTakeover&&(o.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(o.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(o.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?o.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(o.client_max_window_bits=!0),o}accept(o){return o=this.normalizeParams(o),this.params=this._isServer?this.acceptAsServer(o):this.acceptAsClient(o),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let o=this._deflate[Zy];this._deflate.close(),this._deflate=null,o&&o(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(o){let a=this._options,p=o.find(_=>!(a.serverNoContextTakeover===!1&&_.server_no_context_takeover||_.server_max_window_bits&&(a.serverMaxWindowBits===!1||typeof a.serverMaxWindowBits=="number"&&a.serverMaxWindowBits>_.server_max_window_bits)||typeof a.clientMaxWindowBits=="number"&&!_.client_max_window_bits));if(!p)throw new Error("None of the extension offers can be accepted");return a.serverNoContextTakeover&&(p.server_no_context_takeover=!0),a.clientNoContextTakeover&&(p.client_no_context_takeover=!0),typeof a.serverMaxWindowBits=="number"&&(p.server_max_window_bits=a.serverMaxWindowBits),typeof a.clientMaxWindowBits=="number"?p.client_max_window_bits=a.clientMaxWindowBits:(p.client_max_window_bits===!0||a.clientMaxWindowBits===!1)&&delete p.client_max_window_bits,p}acceptAsClient(o){let a=o[0];if(this._options.clientNoContextTakeover===!1&&a.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!a.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(a.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&a.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return a}normalizeParams(o){return o.forEach(a=>{Object.keys(a).forEach(p=>{let _=a[p];if(_.length>1)throw new Error(`Parameter "${p}" must have only a single value`);if(_=_[0],p==="client_max_window_bits"){if(_!==!0){let t=+_;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${p}": ${_}`);_=t}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${p}": ${_}`)}else if(p==="server_max_window_bits"){let t=+_;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${p}": ${_}`);_=t}else if(p==="client_no_context_takeover"||p==="server_no_context_takeover"){if(_!==!0)throw new TypeError(`Invalid value for parameter "${p}": ${_}`)}else throw new Error(`Unknown parameter "${p}"`);a[p]=_})}),o}decompress(o,a,p){K_.add(_=>{this._decompress(o,a,(t,k)=>{_(),p(t,k)})})}compress(o,a,p){K_.add(_=>{this._compress(o,a,(t,k)=>{_(),p(t,k)})})}_decompress(o,a,p){let _=this._isServer?"client":"server";if(!this._inflate){let t=`${_}_max_window_bits`,k=typeof this.params[t]!="number"?Jy.Z_DEFAULT_WINDOWBITS:this.params[t];this._inflate=Jy.createInflateRaw(Zr(Ht({},this._options.zlibInflateOptions),{windowBits:k})),this._inflate[Y_]=this,this._inflate[K1]=0,this._inflate[p2]=[],this._inflate.on("error",xI),this._inflate.on("data",qT)}this._inflate[Zy]=p,this._inflate.write(o),a&&this._inflate.write(TI),this._inflate.flush(()=>{let t=this._inflate[jD];if(t){this._inflate.close(),this._inflate=null,p(t);return}let k=jT.concat(this._inflate[p2],this._inflate[K1]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[K1]=0,this._inflate[p2]=[],a&&this.params[`${_}_no_context_takeover`]&&this._inflate.reset()),p(null,k)})}_compress(o,a,p){let _=this._isServer?"server":"client";if(!this._deflate){let t=`${_}_max_window_bits`,k=typeof this.params[t]!="number"?Jy.Z_DEFAULT_WINDOWBITS:this.params[t];this._deflate=Jy.createDeflateRaw(Zr(Ht({},this._options.zlibDeflateOptions),{windowBits:k})),this._deflate[K1]=0,this._deflate[p2]=[],this._deflate.on("error",SI),this._deflate.on("data",CI)}this._deflate[Zy]=p,this._deflate.write(o),this._deflate.flush(Jy.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let t=jT.concat(this._deflate[p2],this._deflate[K1]);a&&(t=t.slice(0,t.length-4)),this._deflate[Zy]=null,this._deflate[K1]=0,this._deflate[p2]=[],a&&this.params[`${_}_no_context_takeover`]&&this._deflate.reset(),p(null,t)})}};UT.exports=HT;function CI(i){this[p2].push(i),this[K1]+=i.length}function qT(i){if(this[K1]+=i.length,this[Y_]._maxPayload<1||this[K1]<=this[Y_]._maxPayload){this[p2].push(i);return}this[jD]=new RangeError("Max payload size exceeded"),this[jD][zT]=1009,this.removeListener("data",qT),this.reset()}function xI(i){this[Y_]._inflate=null,i[zT]=1007,this[Zy](i)}});var HD=tt((tq,zD)=>{"use strict";function WT(i){return i>=1e3&&i<=1014&&i!==1004&&i!==1005&&i!==1006||i>=3e3&&i<=4999}function VT(i){let o=i.length,a=0;for(;a=o||(i[a+1]&192)!=128||(i[a+2]&192)!=128||i[a]===224&&(i[a+1]&224)==128||i[a]===237&&(i[a+1]&224)==160)return!1;a+=3}else if((i[a]&248)==240){if(a+3>=o||(i[a+1]&192)!=128||(i[a+2]&192)!=128||(i[a+3]&192)!=128||i[a]===240&&(i[a+1]&240)==128||i[a]===244&&i[a+1]>143||i[a]>244)return!1;a+=4}else return!1;return!0}try{let i=require("utf-8-validate");typeof i=="object"&&(i=i.Validation.isValidUTF8),zD.exports={isValidStatusCode:WT,isValidUTF8(o){return o.length<150?VT(o):i(o)}}}catch(i){zD.exports={isValidStatusCode:WT,isValidUTF8:VT}}});var VD=tt((nq,GT)=>{"use strict";var{Writable:RI}=require("stream"),YT=$y(),{BINARY_TYPES:AI,EMPTY_BUFFER:OI,kStatusCode:MI,kWebSocket:kI}=eh(),{concat:qD,toArrayBuffer:NI,unmask:LI}=Qy(),{isValidStatusCode:FI,isValidUTF8:KT}=HD(),eg=0,XT=1,QT=2,JT=3,WD=4,PI=5,ZT=class extends RI{constructor(o,a,p,_){super();this._binaryType=o||AI[0],this[kI]=void 0,this._extensions=a||{},this._isServer=!!p,this._maxPayload=_|0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=eg,this._loop=!1}_write(o,a,p){if(this._opcode===8&&this._state==eg)return p();this._bufferedBytes+=o.length,this._buffers.push(o),this.startLoop(p)}consume(o){if(this._bufferedBytes-=o,o===this._buffers[0].length)return this._buffers.shift();if(o=p.length?a.set(this._buffers.shift(),_):(a.set(new Uint8Array(p.buffer,p.byteOffset,o),_),this._buffers[0]=p.slice(o)),o-=p.length}while(o>0);return a}startLoop(o){let a;this._loop=!0;do switch(this._state){case eg:a=this.getInfo();break;case XT:a=this.getPayloadLength16();break;case QT:a=this.getPayloadLength64();break;case JT:this.getMask();break;case WD:a=this.getData(o);break;default:this._loop=!1;return}while(this._loop);o(a)}getInfo(){if(this._bufferedBytes<2){this._loop=!1;return}let o=this.consume(2);if((o[0]&48)!=0)return this._loop=!1,Yo(RangeError,"RSV2 and RSV3 must be clear",!0,1002);let a=(o[0]&64)==64;if(a&&!this._extensions[YT.extensionName])return this._loop=!1,Yo(RangeError,"RSV1 must be clear",!0,1002);if(this._fin=(o[0]&128)==128,this._opcode=o[0]&15,this._payloadLength=o[1]&127,this._opcode===0){if(a)return this._loop=!1,Yo(RangeError,"RSV1 must be clear",!0,1002);if(!this._fragmented)return this._loop=!1,Yo(RangeError,"invalid opcode 0",!0,1002);this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented)return this._loop=!1,Yo(RangeError,`invalid opcode ${this._opcode}`,!0,1002);this._compressed=a}else if(this._opcode>7&&this._opcode<11){if(!this._fin)return this._loop=!1,Yo(RangeError,"FIN must be set",!0,1002);if(a)return this._loop=!1,Yo(RangeError,"RSV1 must be clear",!0,1002);if(this._payloadLength>125)return this._loop=!1,Yo(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002)}else return this._loop=!1,Yo(RangeError,`invalid opcode ${this._opcode}`,!0,1002);if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(o[1]&128)==128,this._isServer){if(!this._masked)return this._loop=!1,Yo(RangeError,"MASK must be set",!0,1002)}else if(this._masked)return this._loop=!1,Yo(RangeError,"MASK must be clear",!0,1002);if(this._payloadLength===126)this._state=XT;else if(this._payloadLength===127)this._state=QT;else return this.haveLength()}getPayloadLength16(){if(this._bufferedBytes<2){this._loop=!1;return}return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength()}getPayloadLength64(){if(this._bufferedBytes<8){this._loop=!1;return}let o=this.consume(8),a=o.readUInt32BE(0);return a>Math.pow(2,53-32)-1?(this._loop=!1,Yo(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009)):(this._payloadLength=a*Math.pow(2,32)+o.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,Yo(RangeError,"Max payload size exceeded",!1,1009);this._masked?this._state=JT:this._state=WD}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=WD}getData(o){let a=OI;if(this._payloadLength){if(this._bufferedBytes7)return this.controlMessage(a);if(this._compressed){this._state=PI,this.decompress(a,o);return}return a.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(a)),this.dataMessage()}decompress(o,a){this._extensions[YT.extensionName].decompress(o,this._fin,(_,t)=>{if(_)return a(_);if(t.length){if(this._messageLength+=t.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return a(Yo(RangeError,"Max payload size exceeded",!1,1009));this._fragments.push(t)}let k=this.dataMessage();if(k)return a(k);this.startLoop(a)})}dataMessage(){if(this._fin){let o=this._messageLength,a=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let p;this._binaryType==="nodebuffer"?p=qD(a,o):this._binaryType==="arraybuffer"?p=NI(qD(a,o)):p=a,this.emit("message",p)}else{let p=qD(a,o);if(!KT(p))return this._loop=!1,Yo(Error,"invalid UTF-8 sequence",!0,1007);this.emit("message",p.toString())}}this._state=eg}controlMessage(o){if(this._opcode===8)if(this._loop=!1,o.length===0)this.emit("conclude",1005,""),this.end();else{if(o.length===1)return Yo(RangeError,"invalid payload length 1",!0,1002);{let a=o.readUInt16BE(0);if(!FI(a))return Yo(RangeError,`invalid status code ${a}`,!0,1002);let p=o.slice(2);if(!KT(p))return Yo(Error,"invalid UTF-8 sequence",!0,1007);this.emit("conclude",a,p.toString()),this.end()}}else this._opcode===9?this.emit("ping",o):this.emit("pong",o);this._state=eg}};GT.exports=ZT;function Yo(i,o,a,p){let _=new i(a?`Invalid WebSocket frame: ${o}`:o);return Error.captureStackTrace(_,Yo),_[MI]=p,_}});var GD=tt((rq,$T)=>{"use strict";var{randomFillSync:II}=require("crypto"),eC=$y(),{EMPTY_BUFFER:bI}=eh(),{isValidStatusCode:BI}=HD(),{mask:tC,toBuffer:X1}=Qy(),th=Buffer.alloc(4),Q1=class{constructor(o,a){this._extensions=a||{},this._socket=o,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(o,a){let p=a.mask&&a.readOnly,_=a.mask?6:2,t=o.length;o.length>=65536?(_+=8,t=127):o.length>125&&(_+=2,t=126);let k=Buffer.allocUnsafe(p?o.length+_:_);return k[0]=a.fin?a.opcode|128:a.opcode,a.rsv1&&(k[0]|=64),k[1]=t,t===126?k.writeUInt16BE(o.length,2):t===127&&(k.writeUInt32BE(0,2),k.writeUInt32BE(o.length,6)),a.mask?(II(th,0,4),k[1]|=128,k[_-4]=th[0],k[_-3]=th[1],k[_-2]=th[2],k[_-1]=th[3],p?(tC(o,th,k,_,o.length),[k]):(tC(o,th,o,0,o.length),[k,o])):[k,o]}close(o,a,p,_){let t;if(o===void 0)t=bI;else{if(typeof o!="number"||!BI(o))throw new TypeError("First argument must be a valid error code number");if(a===void 0||a==="")t=Buffer.allocUnsafe(2),t.writeUInt16BE(o,0);else{let k=Buffer.byteLength(a);if(k>123)throw new RangeError("The message must not be greater than 123 bytes");t=Buffer.allocUnsafe(2+k),t.writeUInt16BE(o,0),t.write(a,2)}}this._deflating?this.enqueue([this.doClose,t,p,_]):this.doClose(t,p,_)}doClose(o,a,p){this.sendFrame(Q1.frame(o,{fin:!0,rsv1:!1,opcode:8,mask:a,readOnly:!1}),p)}ping(o,a,p){let _=X1(o);if(_.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPing,_,a,X1.readOnly,p]):this.doPing(_,a,X1.readOnly,p)}doPing(o,a,p,_){this.sendFrame(Q1.frame(o,{fin:!0,rsv1:!1,opcode:9,mask:a,readOnly:p}),_)}pong(o,a,p){let _=X1(o);if(_.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPong,_,a,X1.readOnly,p]):this.doPong(_,a,X1.readOnly,p)}doPong(o,a,p,_){this.sendFrame(Q1.frame(o,{fin:!0,rsv1:!1,opcode:10,mask:a,readOnly:p}),_)}send(o,a,p){let _=X1(o),t=this._extensions[eC.extensionName],k=a.binary?2:1,L=a.compress;if(this._firstFragment?(this._firstFragment=!1,L&&t&&(L=_.length>=t._threshold),this._compress=L):(L=!1,k=0),a.fin&&(this._firstFragment=!0),t){let O={fin:a.fin,rsv1:L,opcode:k,mask:a.mask,readOnly:X1.readOnly};this._deflating?this.enqueue([this.dispatch,_,this._compress,O,p]):this.dispatch(_,this._compress,O,p)}else this.sendFrame(Q1.frame(_,{fin:a.fin,rsv1:!1,opcode:k,mask:a.mask,readOnly:X1.readOnly}),p)}dispatch(o,a,p,_){if(!a){this.sendFrame(Q1.frame(o,p),_);return}let t=this._extensions[eC.extensionName];this._bufferedBytes+=o.length,this._deflating=!0,t.compress(o,p.fin,(k,L)=>{if(this._socket.destroyed){let O=new Error("The socket was closed while data was being compressed");typeof _=="function"&&_(O);for(let C=0;C{"use strict";var tg=class{constructor(o,a){this.target=a,this.type=o}},rC=class extends tg{constructor(o,a){super("message",a);this.data=o}},iC=class extends tg{constructor(o,a,p){super("close",p);this.wasClean=p._closeFrameReceived&&p._closeFrameSent,this.reason=a,this.code=o}},uC=class extends tg{constructor(o){super("open",o)}},oC=class extends tg{constructor(o,a){super("error",a);this.message=o.message,this.error=o}},UI={addEventListener(i,o,a){if(typeof o!="function")return;function p(O){o.call(this,new rC(O,this))}function _(O,C){o.call(this,new iC(O,C,this))}function t(O){o.call(this,new oC(O,this))}function k(){o.call(this,new uC(this))}let L=a&&a.once?"once":"on";i==="message"?(p._listener=o,this[L](i,p)):i==="close"?(_._listener=o,this[L](i,_)):i==="error"?(t._listener=o,this[L](i,t)):i==="open"?(k._listener=o,this[L](i,k)):this[L](i,o)},removeEventListener(i,o){let a=this.listeners(i);for(let p=0;p{"use strict";var ng=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function jc(i,o,a){i[o]===void 0?i[o]=[a]:i[o].push(a)}function jI(i){let o=Object.create(null);if(i===void 0||i==="")return o;let a=Object.create(null),p=!1,_=!1,t=!1,k,L,O=-1,C=-1,U=0;for(;U{let a=i[o];return Array.isArray(a)||(a=[a]),a.map(p=>[o].concat(Object.keys(p).map(_=>{let t=p[_];return Array.isArray(t)||(t=[t]),t.map(k=>k===!0?_:`${_}=${k}`).join("; ")})).join("; ")).join(", ")}).join(", ")}sC.exports={format:zI,parse:jI}});var ZD=tt((oq,aC)=>{"use strict";var HI=require("events"),qI=require("https"),WI=require("http"),fC=require("net"),VI=require("tls"),{randomBytes:GI,createHash:YI}=require("crypto"),{URL:KD}=require("url"),h2=$y(),KI=VD(),XI=GD(),{BINARY_TYPES:cC,EMPTY_BUFFER:XD,GUID:QI,kStatusCode:JI,kWebSocket:ta,NOOP:dC}=eh(),{addEventListener:ZI,removeEventListener:$I}=lC(),{format:eb,parse:tb}=YD(),{toBuffer:nb}=Qy(),pC=["CONNECTING","OPEN","CLOSING","CLOSED"],QD=[8,13],rb=30*1e3,Gi=class extends HI{constructor(o,a,p){super();this._binaryType=cC[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage="",this._closeTimer=null,this._extensions={},this._protocol="",this._readyState=Gi.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,o!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,Array.isArray(a)?a=a.join(", "):typeof a=="object"&&a!==null&&(p=a,a=void 0),hC(this,o,a,p)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(o){!cC.includes(o)||(this._binaryType=o,this._receiver&&(this._receiver._binaryType=o))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(o,a,p){let _=new KI(this.binaryType,this._extensions,this._isServer,p);this._sender=new XI(o,this._extensions),this._receiver=_,this._socket=o,_[ta]=this,o[ta]=this,_.on("conclude",ib),_.on("drain",ub),_.on("error",ob),_.on("message",lb),_.on("ping",sb),_.on("pong",ab),o.setTimeout(0),o.setNoDelay(),a.length>0&&o.unshift(a),o.on("close",vC),o.on("data",X_),o.on("end",mC),o.on("error",yC),this._readyState=Gi.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=Gi.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[h2.extensionName]&&this._extensions[h2.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Gi.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(o,a){if(this.readyState!==Gi.CLOSED){if(this.readyState===Gi.CONNECTING){let p="WebSocket was closed before the connection was established";return J1(this,this._req,p)}if(this.readyState===Gi.CLOSING){this._closeFrameSent&&this._closeFrameReceived&&this._socket.end();return}this._readyState=Gi.CLOSING,this._sender.close(o,a,!this._isServer,p=>{p||(this._closeFrameSent=!0,this._closeFrameReceived&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),rb)}}ping(o,a,p){if(this.readyState===Gi.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof o=="function"?(p=o,o=a=void 0):typeof a=="function"&&(p=a,a=void 0),typeof o=="number"&&(o=o.toString()),this.readyState!==Gi.OPEN){JD(this,o,p);return}a===void 0&&(a=!this._isServer),this._sender.ping(o||XD,a,p)}pong(o,a,p){if(this.readyState===Gi.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof o=="function"?(p=o,o=a=void 0):typeof a=="function"&&(p=a,a=void 0),typeof o=="number"&&(o=o.toString()),this.readyState!==Gi.OPEN){JD(this,o,p);return}a===void 0&&(a=!this._isServer),this._sender.pong(o||XD,a,p)}send(o,a,p){if(this.readyState===Gi.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof a=="function"&&(p=a,a={}),typeof o=="number"&&(o=o.toString()),this.readyState!==Gi.OPEN){JD(this,o,p);return}let _=Ht({binary:typeof o!="string",mask:!this._isServer,compress:!0,fin:!0},a);this._extensions[h2.extensionName]||(_.compress=!1),this._sender.send(o||XD,_,p)}terminate(){if(this.readyState!==Gi.CLOSED){if(this.readyState===Gi.CONNECTING){let o="WebSocket was closed before the connection was established";return J1(this,this._req,o)}this._socket&&(this._readyState=Gi.CLOSING,this._socket.destroy())}}};pC.forEach((i,o)=>{let a={enumerable:!0,value:o};Object.defineProperty(Gi.prototype,i,a),Object.defineProperty(Gi,i,a)});["binaryType","bufferedAmount","extensions","protocol","readyState","url"].forEach(i=>{Object.defineProperty(Gi.prototype,i,{enumerable:!0})});["open","error","close","message"].forEach(i=>{Object.defineProperty(Gi.prototype,`on${i}`,{configurable:!0,enumerable:!0,get(){let o=this.listeners(i);for(let a=0;a{J1(i,W,"Opening handshake has timed out")}),W.on("error",ne=>{W===null||W.aborted||(W=i._req=null,i._readyState=Gi.CLOSING,i.emit("error",ne),i.emitClose())}),W.on("response",ne=>{let m=ne.headers.location,he=ne.statusCode;if(m&&_.followRedirects&&he>=300&&he<400){if(++i._redirects>_.maxRedirects){J1(i,W,"Maximum redirects exceeded");return}W.abort();let Ee=new KD(m,o);hC(i,Ee,a,p)}else i.emit("unexpected-response",W,ne)||J1(i,W,`Unexpected server response: ${ne.statusCode}`)}),W.on("upgrade",(ne,m,he)=>{if(i.emit("upgrade",ne),i.readyState!==Gi.CONNECTING)return;W=i._req=null;let Ee=YI("sha1").update(C+QI).digest("base64");if(ne.headers["sec-websocket-accept"]!==Ee){J1(i,m,"Invalid Sec-WebSocket-Accept header");return}let ve=ne.headers["sec-websocket-protocol"],se=(a||"").split(/, */),De;if(!a&&ve?De="Server sent a subprotocol but none was requested":a&&!ve?De="Server sent no subprotocol":ve&&!se.includes(ve)&&(De="Server sent an invalid subprotocol"),De){J1(i,m,De);return}if(ve&&(i._protocol=ve),H)try{let pe=tb(ne.headers["sec-websocket-extensions"]);pe[h2.extensionName]&&(H.accept(pe[h2.extensionName]),i._extensions[h2.extensionName]=H)}catch(pe){J1(i,m,"Invalid Sec-WebSocket-Extensions header");return}i.setSocket(m,he,_.maxPayload)})}function fb(i){return i.path=i.socketPath,fC.connect(i)}function cb(i){return i.path=void 0,!i.servername&&i.servername!==""&&(i.servername=fC.isIP(i.host)?"":i.host),VI.connect(i)}function J1(i,o,a){i._readyState=Gi.CLOSING;let p=new Error(a);Error.captureStackTrace(p,J1),o.setHeader?(o.abort(),o.socket&&!o.socket.destroyed&&o.socket.destroy(),o.once("abort",i.emitClose.bind(i)),i.emit("error",p)):(o.destroy(p),o.once("error",i.emit.bind(i,"error")),o.once("close",i.emitClose.bind(i)))}function JD(i,o,a){if(o){let p=nb(o).length;i._socket?i._sender._bufferedBytes+=p:i._bufferedAmount+=p}if(a){let p=new Error(`WebSocket is not open: readyState ${i.readyState} (${pC[i.readyState]})`);a(p)}}function ib(i,o){let a=this[ta];a._socket.removeListener("data",X_),a._socket.resume(),a._closeFrameReceived=!0,a._closeMessage=o,a._closeCode=i,i===1005?a.close():a.close(i,o)}function ub(){this[ta]._socket.resume()}function ob(i){let o=this[ta];o._socket.removeListener("data",X_),o._readyState=Gi.CLOSING,o._closeCode=i[JI],o.emit("error",i),o._socket.destroy()}function gC(){this[ta].emitClose()}function lb(i){this[ta].emit("message",i)}function sb(i){let o=this[ta];o.pong(i,!o._isServer,dC),o.emit("ping",i)}function ab(i){this[ta].emit("pong",i)}function vC(){let i=this[ta];this.removeListener("close",vC),this.removeListener("end",mC),i._readyState=Gi.CLOSING,i._socket.read(),i._receiver.end(),this.removeListener("data",X_),this[ta]=void 0,clearTimeout(i._closeTimer),i._receiver._writableState.finished||i._receiver._writableState.errorEmitted?i.emitClose():(i._receiver.on("error",gC),i._receiver.on("finish",gC))}function X_(i){this[ta]._receiver.write(i)||this.pause()}function mC(){let i=this[ta];i._readyState=Gi.CLOSING,i._receiver.end(),this.end()}function yC(){let i=this[ta];this.removeListener("error",yC),this.on("error",dC),i&&(i._readyState=Gi.CLOSING,this.destroy())}});var wC=tt((lq,_C)=>{"use strict";var{Duplex:db}=require("stream");function EC(i){i.emit("close")}function pb(){!this.destroyed&&this._writableState.finished&&this.destroy()}function DC(i){this.removeListener("error",DC),this.destroy(),this.listenerCount("error")===0&&this.emit("error",i)}function hb(i,o){let a=!0;function p(){a&&i._socket.resume()}i.readyState===i.CONNECTING?i.once("open",function(){i._receiver.removeAllListeners("drain"),i._receiver.on("drain",p)}):(i._receiver.removeAllListeners("drain"),i._receiver.on("drain",p));let _=new db(Zr(Ht({},o),{autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1}));return i.on("message",function(k){_.push(k)||(a=!1,i._socket.pause())}),i.once("error",function(k){_.destroyed||_.destroy(k)}),i.once("close",function(){_.destroyed||_.push(null)}),_._destroy=function(t,k){if(i.readyState===i.CLOSED){k(t),process.nextTick(EC,_);return}let L=!1;i.once("error",function(C){L=!0,k(C)}),i.once("close",function(){L||k(t),process.nextTick(EC,_)}),i.terminate()},_._final=function(t){if(i.readyState===i.CONNECTING){i.once("open",function(){_._final(t)});return}i._socket!==null&&(i._socket._writableState.finished?(t(),_._readableState.endEmitted&&_.destroy()):(i._socket.once("finish",function(){t()}),i.close()))},_._read=function(){i.readyState===i.OPEN&&!a&&(a=!0,i._receiver._writableState.needDrain||i._socket.resume())},_._write=function(t,k,L){if(i.readyState===i.CONNECTING){i.once("open",function(){_._write(t,k,L)});return}i.send(t,L)},_.on("end",pb),_.on("error",DC),_}_C.exports=hb});var CC=tt((sq,SC)=>{"use strict";var vb=require("events"),{createHash:mb}=require("crypto"),{createServer:yb,STATUS_CODES:$D}=require("http"),nh=$y(),gb=ZD(),{format:_b,parse:Eb}=YD(),{GUID:Db,kWebSocket:wb}=eh(),Sb=/^[+/0-9A-Za-z]{22}==$/,TC=class extends vb{constructor(o,a){super();if(o=Ht({maxPayload:100*1024*1024,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null},o),o.port==null&&!o.server&&!o.noServer)throw new TypeError('One of the "port", "server", or "noServer" options must be specified');if(o.port!=null?(this._server=yb((p,_)=>{let t=$D[426];_.writeHead(426,{"Content-Length":t.length,"Content-Type":"text/plain"}),_.end(t)}),this._server.listen(o.port,o.host,o.backlog,a)):o.server&&(this._server=o.server),this._server){let p=this.emit.bind(this,"connection");this._removeListeners=Tb(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(_,t,k)=>{this.handleUpgrade(_,t,k,p)}})}o.perMessageDeflate===!0&&(o.perMessageDeflate={}),o.clientTracking&&(this.clients=new Set),this.options=o}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(o){if(o&&this.once("close",o),this.clients)for(let p of this.clients)p.terminate();let a=this._server;if(a&&(this._removeListeners(),this._removeListeners=this._server=null,this.options.port!=null)){a.close(()=>this.emit("close"));return}process.nextTick(Cb,this)}shouldHandle(o){if(this.options.path){let a=o.url.indexOf("?");if((a!==-1?o.url.slice(0,a):o.url)!==this.options.path)return!1}return!0}handleUpgrade(o,a,p,_){a.on("error",e3);let t=o.headers["sec-websocket-key"]!==void 0?o.headers["sec-websocket-key"].trim():!1,k=+o.headers["sec-websocket-version"],L={};if(o.method!=="GET"||o.headers.upgrade.toLowerCase()!=="websocket"||!t||!Sb.test(t)||k!==8&&k!==13||!this.shouldHandle(o))return Q_(a,400);if(this.options.perMessageDeflate){let O=new nh(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let C=Eb(o.headers["sec-websocket-extensions"]);C[nh.extensionName]&&(O.accept(C[nh.extensionName]),L[nh.extensionName]=O)}catch(C){return Q_(a,400)}}if(this.options.verifyClient){let O={origin:o.headers[`${k===8?"sec-websocket-origin":"origin"}`],secure:!!(o.socket.authorized||o.socket.encrypted),req:o};if(this.options.verifyClient.length===2){this.options.verifyClient(O,(C,U,H,W)=>{if(!C)return Q_(a,U||401,H,W);this.completeUpgrade(t,L,o,a,p,_)});return}if(!this.options.verifyClient(O))return Q_(a,401)}this.completeUpgrade(t,L,o,a,p,_)}completeUpgrade(o,a,p,_,t,k){if(!_.readable||!_.writable)return _.destroy();if(_[wb])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");let L=mb("sha1").update(o+Db).digest("base64"),O=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${L}`],C=new gb(null),U=p.headers["sec-websocket-protocol"];if(U&&(U=U.split(",").map(xb),this.options.handleProtocols?U=this.options.handleProtocols(U,p):U=U[0],U&&(O.push(`Sec-WebSocket-Protocol: ${U}`),C._protocol=U)),a[nh.extensionName]){let H=a[nh.extensionName].params,W=_b({[nh.extensionName]:[H]});O.push(`Sec-WebSocket-Extensions: ${W}`),C._extensions=a}this.emit("headers",O,p),_.write(O.concat(`\r -`).join(`\r -`)),_.removeListener("error",e3),C.setSocket(_,t,this.options.maxPayload),this.clients&&(this.clients.add(C),C.on("close",()=>this.clients.delete(C))),k(C,p)}};SC.exports=TC;function Tb(i,o){for(let a of Object.keys(o))i.on(a,o[a]);return function(){for(let p of Object.keys(o))i.removeListener(p,o[p])}}function Cb(i){i.emit("close")}function e3(){this.destroy()}function Q_(i,o,a,p){i.writable&&(a=a||$D[o],p=Ht({Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(a)},p),i.write(`HTTP/1.1 ${o} ${$D[o]}\r -`+Object.keys(p).map(_=>`${_}: ${p[_]}`).join(`\r -`)+`\r -\r -`+a)),i.removeListener("error",e3),i.destroy()}function xb(i){return i.trim()}});var RC=tt((aq,xC)=>{"use strict";var rg=ZD();rg.createWebSocketStream=wC();rg.Server=CC();rg.Receiver=VD();rg.Sender=GD();xC.exports=rg});var AC=tt(J_=>{"use strict";var Rb=J_&&J_.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(J_,"__esModule",{value:!0});var Ab=Rb(RC()),ig=global;ig.WebSocket||(ig.WebSocket=Ab.default);ig.window||(ig.window=global);ig.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__=[{type:1,value:7,isEnabled:!0},{type:2,value:"InternalApp",isEnabled:!0,isValid:!0},{type:2,value:"InternalAppContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdoutContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStderrContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdinContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalFocusContext",isEnabled:!0,isValid:!0}]});var OC=tt((Z_,t3)=>{(function(i,o){typeof Z_=="object"&&typeof t3=="object"?t3.exports=o():typeof define=="function"&&define.amd?define([],o):typeof Z_=="object"?Z_.ReactDevToolsBackend=o():i.ReactDevToolsBackend=o()})(window,function(){return function(i){var o={};function a(p){if(o[p])return o[p].exports;var _=o[p]={i:p,l:!1,exports:{}};return i[p].call(_.exports,_,_.exports,a),_.l=!0,_.exports}return a.m=i,a.c=o,a.d=function(p,_,t){a.o(p,_)||Object.defineProperty(p,_,{enumerable:!0,get:t})},a.r=function(p){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(p,"__esModule",{value:!0})},a.t=function(p,_){if(1&_&&(p=a(p)),8&_||4&_&&typeof p=="object"&&p&&p.__esModule)return p;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:p}),2&_&&typeof p!="string")for(var k in p)a.d(t,k,function(L){return p[L]}.bind(null,k));return t},a.n=function(p){var _=p&&p.__esModule?function(){return p.default}:function(){return p};return a.d(_,"a",_),_},a.o=function(p,_){return Object.prototype.hasOwnProperty.call(p,_)},a.p="",a(a.s=20)}([function(i,o,a){"use strict";i.exports=a(12)},function(i,o,a){"use strict";var p=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function k(L){if(L==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(L)}i.exports=function(){try{if(!Object.assign)return!1;var L=new String("abc");if(L[5]="de",Object.getOwnPropertyNames(L)[0]==="5")return!1;for(var O={},C=0;C<10;C++)O["_"+String.fromCharCode(C)]=C;if(Object.getOwnPropertyNames(O).map(function(H){return O[H]}).join("")!=="0123456789")return!1;var U={};return"abcdefghijklmnopqrst".split("").forEach(function(H){U[H]=H}),Object.keys(Object.assign({},U)).join("")==="abcdefghijklmnopqrst"}catch(H){return!1}}()?Object.assign:function(L,O){for(var C,U,H=k(L),W=1;W=ie||nn<0||Jt&&Rt-We>=yt}function oe(){var Rt=Ee();if(xe(Rt))return ze(Rt);Xe=setTimeout(oe,function(nn){var an=ie-(nn-ut);return Jt?he(an,yt-(nn-We)):an}(Rt))}function ze(Rt){return Xe=void 0,rt&&je?Q(Rt):(je=qe=void 0,gt)}function ct(){var Rt=Ee(),nn=xe(Rt);if(je=arguments,qe=this,ut=Rt,nn){if(Xe===void 0)return fe(ut);if(Jt)return Xe=setTimeout(oe,ie),Q(ut)}return Xe===void 0&&(Xe=setTimeout(oe,ie)),gt}return ie=pe(ie)||0,se(Oe)&&(Ft=!!Oe.leading,yt=(Jt="maxWait"in Oe)?m(pe(Oe.maxWait)||0,ie):yt,rt="trailing"in Oe?!!Oe.trailing:rt),ct.cancel=function(){Xe!==void 0&&clearTimeout(Xe),We=0,je=ut=qe=Xe=void 0},ct.flush=function(){return Xe===void 0?gt:ze(Ee())},ct}function se(me){var ie=_(me);return!!me&&(ie=="object"||ie=="function")}function De(me){return _(me)=="symbol"||function(ie){return!!ie&&_(ie)=="object"}(me)&&ne.call(me)=="[object Symbol]"}function pe(me){if(typeof me=="number")return me;if(De(me))return NaN;if(se(me)){var ie=typeof me.valueOf=="function"?me.valueOf():me;me=se(ie)?ie+"":ie}if(typeof me!="string")return me===0?me:+me;me=me.replace(t,"");var Oe=L.test(me);return Oe||O.test(me)?C(me.slice(2),Oe?2:8):k.test(me)?NaN:+me}i.exports=function(me,ie,Oe){var je=!0,qe=!0;if(typeof me!="function")throw new TypeError("Expected a function");return se(Oe)&&(je="leading"in Oe?!!Oe.leading:je,qe="trailing"in Oe?!!Oe.trailing:qe),ve(me,ie,{leading:je,maxWait:ie,trailing:qe})}}).call(this,a(4))},function(i,o,a){(function(p){function _(Q){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(fe){return typeof fe}:function(fe){return fe&&typeof Symbol=="function"&&fe.constructor===Symbol&&fe!==Symbol.prototype?"symbol":typeof fe})(Q)}var t;o=i.exports=m,t=(p===void 0?"undefined":_(p))==="object"&&p.env&&p.env.NODE_DEBUG&&/\bsemver\b/i.test(p.env.NODE_DEBUG)?function(){var Q=Array.prototype.slice.call(arguments,0);Q.unshift("SEMVER"),console.log.apply(console,Q)}:function(){},o.SEMVER_SPEC_VERSION="2.0.0";var k=Number.MAX_SAFE_INTEGER||9007199254740991,L=o.re=[],O=o.src=[],C=o.tokens={},U=0;function H(Q){C[Q]=U++}H("NUMERICIDENTIFIER"),O[C.NUMERICIDENTIFIER]="0|[1-9]\\d*",H("NUMERICIDENTIFIERLOOSE"),O[C.NUMERICIDENTIFIERLOOSE]="[0-9]+",H("NONNUMERICIDENTIFIER"),O[C.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*",H("MAINVERSION"),O[C.MAINVERSION]="("+O[C.NUMERICIDENTIFIER]+")\\.("+O[C.NUMERICIDENTIFIER]+")\\.("+O[C.NUMERICIDENTIFIER]+")",H("MAINVERSIONLOOSE"),O[C.MAINVERSIONLOOSE]="("+O[C.NUMERICIDENTIFIERLOOSE]+")\\.("+O[C.NUMERICIDENTIFIERLOOSE]+")\\.("+O[C.NUMERICIDENTIFIERLOOSE]+")",H("PRERELEASEIDENTIFIER"),O[C.PRERELEASEIDENTIFIER]="(?:"+O[C.NUMERICIDENTIFIER]+"|"+O[C.NONNUMERICIDENTIFIER]+")",H("PRERELEASEIDENTIFIERLOOSE"),O[C.PRERELEASEIDENTIFIERLOOSE]="(?:"+O[C.NUMERICIDENTIFIERLOOSE]+"|"+O[C.NONNUMERICIDENTIFIER]+")",H("PRERELEASE"),O[C.PRERELEASE]="(?:-("+O[C.PRERELEASEIDENTIFIER]+"(?:\\."+O[C.PRERELEASEIDENTIFIER]+")*))",H("PRERELEASELOOSE"),O[C.PRERELEASELOOSE]="(?:-?("+O[C.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+O[C.PRERELEASEIDENTIFIERLOOSE]+")*))",H("BUILDIDENTIFIER"),O[C.BUILDIDENTIFIER]="[0-9A-Za-z-]+",H("BUILD"),O[C.BUILD]="(?:\\+("+O[C.BUILDIDENTIFIER]+"(?:\\."+O[C.BUILDIDENTIFIER]+")*))",H("FULL"),H("FULLPLAIN"),O[C.FULLPLAIN]="v?"+O[C.MAINVERSION]+O[C.PRERELEASE]+"?"+O[C.BUILD]+"?",O[C.FULL]="^"+O[C.FULLPLAIN]+"$",H("LOOSEPLAIN"),O[C.LOOSEPLAIN]="[v=\\s]*"+O[C.MAINVERSIONLOOSE]+O[C.PRERELEASELOOSE]+"?"+O[C.BUILD]+"?",H("LOOSE"),O[C.LOOSE]="^"+O[C.LOOSEPLAIN]+"$",H("GTLT"),O[C.GTLT]="((?:<|>)?=?)",H("XRANGEIDENTIFIERLOOSE"),O[C.XRANGEIDENTIFIERLOOSE]=O[C.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",H("XRANGEIDENTIFIER"),O[C.XRANGEIDENTIFIER]=O[C.NUMERICIDENTIFIER]+"|x|X|\\*",H("XRANGEPLAIN"),O[C.XRANGEPLAIN]="[v=\\s]*("+O[C.XRANGEIDENTIFIER]+")(?:\\.("+O[C.XRANGEIDENTIFIER]+")(?:\\.("+O[C.XRANGEIDENTIFIER]+")(?:"+O[C.PRERELEASE]+")?"+O[C.BUILD]+"?)?)?",H("XRANGEPLAINLOOSE"),O[C.XRANGEPLAINLOOSE]="[v=\\s]*("+O[C.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+O[C.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+O[C.XRANGEIDENTIFIERLOOSE]+")(?:"+O[C.PRERELEASELOOSE]+")?"+O[C.BUILD]+"?)?)?",H("XRANGE"),O[C.XRANGE]="^"+O[C.GTLT]+"\\s*"+O[C.XRANGEPLAIN]+"$",H("XRANGELOOSE"),O[C.XRANGELOOSE]="^"+O[C.GTLT]+"\\s*"+O[C.XRANGEPLAINLOOSE]+"$",H("COERCE"),O[C.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",H("COERCERTL"),L[C.COERCERTL]=new RegExp(O[C.COERCE],"g"),H("LONETILDE"),O[C.LONETILDE]="(?:~>?)",H("TILDETRIM"),O[C.TILDETRIM]="(\\s*)"+O[C.LONETILDE]+"\\s+",L[C.TILDETRIM]=new RegExp(O[C.TILDETRIM],"g"),H("TILDE"),O[C.TILDE]="^"+O[C.LONETILDE]+O[C.XRANGEPLAIN]+"$",H("TILDELOOSE"),O[C.TILDELOOSE]="^"+O[C.LONETILDE]+O[C.XRANGEPLAINLOOSE]+"$",H("LONECARET"),O[C.LONECARET]="(?:\\^)",H("CARETTRIM"),O[C.CARETTRIM]="(\\s*)"+O[C.LONECARET]+"\\s+",L[C.CARETTRIM]=new RegExp(O[C.CARETTRIM],"g"),H("CARET"),O[C.CARET]="^"+O[C.LONECARET]+O[C.XRANGEPLAIN]+"$",H("CARETLOOSE"),O[C.CARETLOOSE]="^"+O[C.LONECARET]+O[C.XRANGEPLAINLOOSE]+"$",H("COMPARATORLOOSE"),O[C.COMPARATORLOOSE]="^"+O[C.GTLT]+"\\s*("+O[C.LOOSEPLAIN]+")$|^$",H("COMPARATOR"),O[C.COMPARATOR]="^"+O[C.GTLT]+"\\s*("+O[C.FULLPLAIN]+")$|^$",H("COMPARATORTRIM"),O[C.COMPARATORTRIM]="(\\s*)"+O[C.GTLT]+"\\s*("+O[C.LOOSEPLAIN]+"|"+O[C.XRANGEPLAIN]+")",L[C.COMPARATORTRIM]=new RegExp(O[C.COMPARATORTRIM],"g"),H("HYPHENRANGE"),O[C.HYPHENRANGE]="^\\s*("+O[C.XRANGEPLAIN]+")\\s+-\\s+("+O[C.XRANGEPLAIN]+")\\s*$",H("HYPHENRANGELOOSE"),O[C.HYPHENRANGELOOSE]="^\\s*("+O[C.XRANGEPLAINLOOSE]+")\\s+-\\s+("+O[C.XRANGEPLAINLOOSE]+")\\s*$",H("STAR"),O[C.STAR]="(<|>)?=?\\s*\\*";for(var W=0;W256||!(fe.loose?L[C.LOOSE]:L[C.FULL]).test(Q))return null;try{return new m(Q,fe)}catch(xe){return null}}function m(Q,fe){if(fe&&_(fe)==="object"||(fe={loose:!!fe,includePrerelease:!1}),Q instanceof m){if(Q.loose===fe.loose)return Q;Q=Q.version}else if(typeof Q!="string")throw new TypeError("Invalid Version: "+Q);if(Q.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof m))return new m(Q,fe);t("SemVer",Q,fe),this.options=fe,this.loose=!!fe.loose;var xe=Q.trim().match(fe.loose?L[C.LOOSE]:L[C.FULL]);if(!xe)throw new TypeError("Invalid Version: "+Q);if(this.raw=Q,this.major=+xe[1],this.minor=+xe[2],this.patch=+xe[3],this.major>k||this.major<0)throw new TypeError("Invalid major version");if(this.minor>k||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>k||this.patch<0)throw new TypeError("Invalid patch version");xe[4]?this.prerelease=xe[4].split(".").map(function(oe){if(/^[0-9]+$/.test(oe)){var ze=+oe;if(ze>=0&&ze=0;)typeof this.prerelease[xe]=="number"&&(this.prerelease[xe]++,xe=-2);xe===-1&&this.prerelease.push(0)}fe&&(this.prerelease[0]===fe?isNaN(this.prerelease[1])&&(this.prerelease=[fe,0]):this.prerelease=[fe,0]);break;default:throw new Error("invalid increment argument: "+Q)}return this.format(),this.raw=this.version,this},o.inc=function(Q,fe,xe,oe){typeof xe=="string"&&(oe=xe,xe=void 0);try{return new m(Q,xe).inc(fe,oe).version}catch(ze){return null}},o.diff=function(Q,fe){if(pe(Q,fe))return null;var xe=ne(Q),oe=ne(fe),ze="";if(xe.prerelease.length||oe.prerelease.length){ze="pre";var ct="prerelease"}for(var Rt in xe)if((Rt==="major"||Rt==="minor"||Rt==="patch")&&xe[Rt]!==oe[Rt])return ze+Rt;return ct},o.compareIdentifiers=Ee;var he=/^[0-9]+$/;function Ee(Q,fe){var xe=he.test(Q),oe=he.test(fe);return xe&&oe&&(Q=+Q,fe=+fe),Q===fe?0:xe&&!oe?-1:oe&&!xe?1:Q0}function De(Q,fe,xe){return ve(Q,fe,xe)<0}function pe(Q,fe,xe){return ve(Q,fe,xe)===0}function me(Q,fe,xe){return ve(Q,fe,xe)!==0}function ie(Q,fe,xe){return ve(Q,fe,xe)>=0}function Oe(Q,fe,xe){return ve(Q,fe,xe)<=0}function je(Q,fe,xe,oe){switch(fe){case"===":return _(Q)==="object"&&(Q=Q.version),_(xe)==="object"&&(xe=xe.version),Q===xe;case"!==":return _(Q)==="object"&&(Q=Q.version),_(xe)==="object"&&(xe=xe.version),Q!==xe;case"":case"=":case"==":return pe(Q,xe,oe);case"!=":return me(Q,xe,oe);case">":return se(Q,xe,oe);case">=":return ie(Q,xe,oe);case"<":return De(Q,xe,oe);case"<=":return Oe(Q,xe,oe);default:throw new TypeError("Invalid operator: "+fe)}}function qe(Q,fe){if(fe&&_(fe)==="object"||(fe={loose:!!fe,includePrerelease:!1}),Q instanceof qe){if(Q.loose===!!fe.loose)return Q;Q=Q.value}if(!(this instanceof qe))return new qe(Q,fe);t("comparator",Q,fe),this.options=fe,this.loose=!!fe.loose,this.parse(Q),this.semver===yt?this.value="":this.value=this.operator+this.semver.version,t("comp",this)}o.rcompareIdentifiers=function(Q,fe){return Ee(fe,Q)},o.major=function(Q,fe){return new m(Q,fe).major},o.minor=function(Q,fe){return new m(Q,fe).minor},o.patch=function(Q,fe){return new m(Q,fe).patch},o.compare=ve,o.compareLoose=function(Q,fe){return ve(Q,fe,!0)},o.compareBuild=function(Q,fe,xe){var oe=new m(Q,xe),ze=new m(fe,xe);return oe.compare(ze)||oe.compareBuild(ze)},o.rcompare=function(Q,fe,xe){return ve(fe,Q,xe)},o.sort=function(Q,fe){return Q.sort(function(xe,oe){return o.compareBuild(xe,oe,fe)})},o.rsort=function(Q,fe){return Q.sort(function(xe,oe){return o.compareBuild(oe,xe,fe)})},o.gt=se,o.lt=De,o.eq=pe,o.neq=me,o.gte=ie,o.lte=Oe,o.cmp=je,o.Comparator=qe;var yt={};function gt(Q,fe){if(fe&&_(fe)==="object"||(fe={loose:!!fe,includePrerelease:!1}),Q instanceof gt)return Q.loose===!!fe.loose&&Q.includePrerelease===!!fe.includePrerelease?Q:new gt(Q.raw,fe);if(Q instanceof qe)return new gt(Q.value,fe);if(!(this instanceof gt))return new gt(Q,fe);if(this.options=fe,this.loose=!!fe.loose,this.includePrerelease=!!fe.includePrerelease,this.raw=Q,this.set=Q.split(/\s*\|\|\s*/).map(function(xe){return this.parseRange(xe.trim())},this).filter(function(xe){return xe.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+Q);this.format()}function Xe(Q,fe){for(var xe=!0,oe=Q.slice(),ze=oe.pop();xe&&oe.length;)xe=oe.every(function(ct){return ze.intersects(ct,fe)}),ze=oe.pop();return xe}function ut(Q){return!Q||Q.toLowerCase()==="x"||Q==="*"}function We(Q,fe,xe,oe,ze,ct,Rt,nn,an,Mn,lr,ln,Vt){return((fe=ut(xe)?"":ut(oe)?">="+xe+".0.0":ut(ze)?">="+xe+"."+oe+".0":">="+fe)+" "+(nn=ut(an)?"":ut(Mn)?"<"+(+an+1)+".0.0":ut(lr)?"<"+an+"."+(+Mn+1)+".0":ln?"<="+an+"."+Mn+"."+lr+"-"+ln:"<="+nn)).trim()}function Ft(Q,fe,xe){for(var oe=0;oe0){var ze=Q[oe].semver;if(ze.major===fe.major&&ze.minor===fe.minor&&ze.patch===fe.patch)return!0}return!1}return!0}function Jt(Q,fe,xe){try{fe=new gt(fe,xe)}catch(oe){return!1}return fe.test(Q)}function rt(Q,fe,xe,oe){var ze,ct,Rt,nn,an;switch(Q=new m(Q,oe),fe=new gt(fe,oe),xe){case">":ze=se,ct=Oe,Rt=De,nn=">",an=">=";break;case"<":ze=De,ct=ie,Rt=se,nn="<",an="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Jt(Q,fe,oe))return!1;for(var Mn=0;Mn=0.0.0")),ln=ln||Er,Vt=Vt||Er,ze(Er.semver,ln.semver,oe)?ln=Er:Rt(Er.semver,Vt.semver,oe)&&(Vt=Er)}),ln.operator===nn||ln.operator===an||(!Vt.operator||Vt.operator===nn)&&ct(Q,Vt.semver)||Vt.operator===an&&Rt(Q,Vt.semver))return!1}return!0}qe.prototype.parse=function(Q){var fe=this.options.loose?L[C.COMPARATORLOOSE]:L[C.COMPARATOR],xe=Q.match(fe);if(!xe)throw new TypeError("Invalid comparator: "+Q);this.operator=xe[1]!==void 0?xe[1]:"",this.operator==="="&&(this.operator=""),xe[2]?this.semver=new m(xe[2],this.options.loose):this.semver=yt},qe.prototype.toString=function(){return this.value},qe.prototype.test=function(Q){if(t("Comparator.test",Q,this.options.loose),this.semver===yt||Q===yt)return!0;if(typeof Q=="string")try{Q=new m(Q,this.options)}catch(fe){return!1}return je(Q,this.operator,this.semver,this.options)},qe.prototype.intersects=function(Q,fe){if(!(Q instanceof qe))throw new TypeError("a Comparator is required");var xe;if(fe&&_(fe)==="object"||(fe={loose:!!fe,includePrerelease:!1}),this.operator==="")return this.value===""||(xe=new gt(Q.value,fe),Jt(this.value,xe,fe));if(Q.operator==="")return Q.value===""||(xe=new gt(this.value,fe),Jt(Q.semver,xe,fe));var oe=!(this.operator!==">="&&this.operator!==">"||Q.operator!==">="&&Q.operator!==">"),ze=!(this.operator!=="<="&&this.operator!=="<"||Q.operator!=="<="&&Q.operator!=="<"),ct=this.semver.version===Q.semver.version,Rt=!(this.operator!==">="&&this.operator!=="<="||Q.operator!==">="&&Q.operator!=="<="),nn=je(this.semver,"<",Q.semver,fe)&&(this.operator===">="||this.operator===">")&&(Q.operator==="<="||Q.operator==="<"),an=je(this.semver,">",Q.semver,fe)&&(this.operator==="<="||this.operator==="<")&&(Q.operator===">="||Q.operator===">");return oe||ze||ct&&Rt||nn||an},o.Range=gt,gt.prototype.format=function(){return this.range=this.set.map(function(Q){return Q.join(" ").trim()}).join("||").trim(),this.range},gt.prototype.toString=function(){return this.range},gt.prototype.parseRange=function(Q){var fe=this.options.loose;Q=Q.trim();var xe=fe?L[C.HYPHENRANGELOOSE]:L[C.HYPHENRANGE];Q=Q.replace(xe,We),t("hyphen replace",Q),Q=Q.replace(L[C.COMPARATORTRIM],"$1$2$3"),t("comparator trim",Q,L[C.COMPARATORTRIM]),Q=(Q=(Q=Q.replace(L[C.TILDETRIM],"$1~")).replace(L[C.CARETTRIM],"$1^")).split(/\s+/).join(" ");var oe=fe?L[C.COMPARATORLOOSE]:L[C.COMPARATOR],ze=Q.split(" ").map(function(ct){return function(Rt,nn){return t("comp",Rt,nn),Rt=function(an,Mn){return an.trim().split(/\s+/).map(function(lr){return function(ln,Vt){t("caret",ln,Vt);var Er=Vt.loose?L[C.CARETLOOSE]:L[C.CARET];return ln.replace(Er,function(w,jt,Xn,vr,jr){var fr;return t("caret",ln,w,jt,Xn,vr,jr),ut(jt)?fr="":ut(Xn)?fr=">="+jt+".0.0 <"+(+jt+1)+".0.0":ut(vr)?fr=jt==="0"?">="+jt+"."+Xn+".0 <"+jt+"."+(+Xn+1)+".0":">="+jt+"."+Xn+".0 <"+(+jt+1)+".0.0":jr?(t("replaceCaret pr",jr),fr=jt==="0"?Xn==="0"?">="+jt+"."+Xn+"."+vr+"-"+jr+" <"+jt+"."+Xn+"."+(+vr+1):">="+jt+"."+Xn+"."+vr+"-"+jr+" <"+jt+"."+(+Xn+1)+".0":">="+jt+"."+Xn+"."+vr+"-"+jr+" <"+(+jt+1)+".0.0"):(t("no pr"),fr=jt==="0"?Xn==="0"?">="+jt+"."+Xn+"."+vr+" <"+jt+"."+Xn+"."+(+vr+1):">="+jt+"."+Xn+"."+vr+" <"+jt+"."+(+Xn+1)+".0":">="+jt+"."+Xn+"."+vr+" <"+(+jt+1)+".0.0"),t("caret return",fr),fr})}(lr,Mn)}).join(" ")}(Rt,nn),t("caret",Rt),Rt=function(an,Mn){return an.trim().split(/\s+/).map(function(lr){return function(ln,Vt){var Er=Vt.loose?L[C.TILDELOOSE]:L[C.TILDE];return ln.replace(Er,function(w,jt,Xn,vr,jr){var fr;return t("tilde",ln,w,jt,Xn,vr,jr),ut(jt)?fr="":ut(Xn)?fr=">="+jt+".0.0 <"+(+jt+1)+".0.0":ut(vr)?fr=">="+jt+"."+Xn+".0 <"+jt+"."+(+Xn+1)+".0":jr?(t("replaceTilde pr",jr),fr=">="+jt+"."+Xn+"."+vr+"-"+jr+" <"+jt+"."+(+Xn+1)+".0"):fr=">="+jt+"."+Xn+"."+vr+" <"+jt+"."+(+Xn+1)+".0",t("tilde return",fr),fr})}(lr,Mn)}).join(" ")}(Rt,nn),t("tildes",Rt),Rt=function(an,Mn){return t("replaceXRanges",an,Mn),an.split(/\s+/).map(function(lr){return function(ln,Vt){ln=ln.trim();var Er=Vt.loose?L[C.XRANGELOOSE]:L[C.XRANGE];return ln.replace(Er,function(w,jt,Xn,vr,jr,fr){t("xRange",ln,w,jt,Xn,vr,jr,fr);var zr=ut(Xn),Xt=zr||ut(vr),wu=Xt||ut(jr),d0=wu;return jt==="="&&d0&&(jt=""),fr=Vt.includePrerelease?"-0":"",zr?w=jt===">"||jt==="<"?"<0.0.0-0":"*":jt&&d0?(Xt&&(vr=0),jr=0,jt===">"?(jt=">=",Xt?(Xn=+Xn+1,vr=0,jr=0):(vr=+vr+1,jr=0)):jt==="<="&&(jt="<",Xt?Xn=+Xn+1:vr=+vr+1),w=jt+Xn+"."+vr+"."+jr+fr):Xt?w=">="+Xn+".0.0"+fr+" <"+(+Xn+1)+".0.0"+fr:wu&&(w=">="+Xn+"."+vr+".0"+fr+" <"+Xn+"."+(+vr+1)+".0"+fr),t("xRange return",w),w})}(lr,Mn)}).join(" ")}(Rt,nn),t("xrange",Rt),Rt=function(an,Mn){return t("replaceStars",an,Mn),an.trim().replace(L[C.STAR],"")}(Rt,nn),t("stars",Rt),Rt}(ct,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(ze=ze.filter(function(ct){return!!ct.match(oe)})),ze=ze.map(function(ct){return new qe(ct,this.options)},this)},gt.prototype.intersects=function(Q,fe){if(!(Q instanceof gt))throw new TypeError("a Range is required");return this.set.some(function(xe){return Xe(xe,fe)&&Q.set.some(function(oe){return Xe(oe,fe)&&xe.every(function(ze){return oe.every(function(ct){return ze.intersects(ct,fe)})})})})},o.toComparators=function(Q,fe){return new gt(Q,fe).set.map(function(xe){return xe.map(function(oe){return oe.value}).join(" ").trim().split(" ")})},gt.prototype.test=function(Q){if(!Q)return!1;if(typeof Q=="string")try{Q=new m(Q,this.options)}catch(xe){return!1}for(var fe=0;fe":ct.prerelease.length===0?ct.patch++:ct.prerelease.push(0),ct.raw=ct.format();case"":case">=":xe&&!se(xe,ct)||(xe=ct);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+ze.operator)}});return xe&&Q.test(xe)?xe:null},o.validRange=function(Q,fe){try{return new gt(Q,fe).range||"*"}catch(xe){return null}},o.ltr=function(Q,fe,xe){return rt(Q,fe,"<",xe)},o.gtr=function(Q,fe,xe){return rt(Q,fe,">",xe)},o.outside=rt,o.prerelease=function(Q,fe){var xe=ne(Q,fe);return xe&&xe.prerelease.length?xe.prerelease:null},o.intersects=function(Q,fe,xe){return Q=new gt(Q,xe),fe=new gt(fe,xe),Q.intersects(fe)},o.coerce=function(Q,fe){if(Q instanceof m)return Q;if(typeof Q=="number"&&(Q=String(Q)),typeof Q!="string")return null;var xe=null;if((fe=fe||{}).rtl){for(var oe;(oe=L[C.COERCERTL].exec(Q))&&(!xe||xe.index+xe[0].length!==Q.length);)xe&&oe.index+oe[0].length===xe.index+xe[0].length||(xe=oe),L[C.COERCERTL].lastIndex=oe.index+oe[1].length+oe[2].length;L[C.COERCERTL].lastIndex=-1}else xe=Q.match(L[C.COERCE]);return xe===null?null:ne(xe[2]+"."+(xe[3]||"0")+"."+(xe[4]||"0"),fe)}}).call(this,a(5))},function(i,o){function a(_){return(a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(_)}var p;p=function(){return this}();try{p=p||new Function("return this")()}catch(_){(typeof window=="undefined"?"undefined":a(window))==="object"&&(p=window)}i.exports=p},function(i,o){var a,p,_=i.exports={};function t(){throw new Error("setTimeout has not been defined")}function k(){throw new Error("clearTimeout has not been defined")}function L(Ee){if(a===setTimeout)return setTimeout(Ee,0);if((a===t||!a)&&setTimeout)return a=setTimeout,setTimeout(Ee,0);try{return a(Ee,0)}catch(ve){try{return a.call(null,Ee,0)}catch(se){return a.call(this,Ee,0)}}}(function(){try{a=typeof setTimeout=="function"?setTimeout:t}catch(Ee){a=t}try{p=typeof clearTimeout=="function"?clearTimeout:k}catch(Ee){p=k}})();var O,C=[],U=!1,H=-1;function W(){U&&O&&(U=!1,O.length?C=O.concat(C):H=-1,C.length&&ne())}function ne(){if(!U){var Ee=L(W);U=!0;for(var ve=C.length;ve;){for(O=C,C=[];++H1)for(var se=1;sethis[k])return me(this,this[m].get(Xe)),!1;var rt=this[m].get(Xe).value;return this[H]&&(this[W]||this[H](Xe,rt.value)),rt.now=Ft,rt.maxAge=We,rt.value=ut,this[L]+=Jt-rt.length,rt.length=Jt,this.get(Xe),pe(this),!0}var Q=new ie(Xe,ut,Jt,Ft,We);return Q.length>this[k]?(this[H]&&this[H](Xe,ut),!1):(this[L]+=Q.length,this[ne].unshift(Q),this[m].set(Xe,this[ne].head),pe(this),!0)}},{key:"has",value:function(Xe){if(!this[m].has(Xe))return!1;var ut=this[m].get(Xe).value;return!De(this,ut)}},{key:"get",value:function(Xe){return se(this,Xe,!0)}},{key:"peek",value:function(Xe){return se(this,Xe,!1)}},{key:"pop",value:function(){var Xe=this[ne].tail;return Xe?(me(this,Xe),Xe.value):null}},{key:"del",value:function(Xe){me(this,this[m].get(Xe))}},{key:"load",value:function(Xe){this.reset();for(var ut=Date.now(),We=Xe.length-1;We>=0;We--){var Ft=Xe[We],Jt=Ft.e||0;if(Jt===0)this.set(Ft.k,Ft.v);else{var rt=Jt-ut;rt>0&&this.set(Ft.k,Ft.v,rt)}}}},{key:"prune",value:function(){var Xe=this;this[m].forEach(function(ut,We){return se(Xe,We,!1)})}},{key:"max",set:function(Xe){if(typeof Xe!="number"||Xe<0)throw new TypeError("max must be a non-negative number");this[k]=Xe||1/0,pe(this)},get:function(){return this[k]}},{key:"allowStale",set:function(Xe){this[C]=!!Xe},get:function(){return this[C]}},{key:"maxAge",set:function(Xe){if(typeof Xe!="number")throw new TypeError("maxAge must be a non-negative number");this[U]=Xe,pe(this)},get:function(){return this[U]}},{key:"lengthCalculator",set:function(Xe){var ut=this;typeof Xe!="function"&&(Xe=Ee),Xe!==this[O]&&(this[O]=Xe,this[L]=0,this[ne].forEach(function(We){We.length=ut[O](We.value,We.key),ut[L]+=We.length})),pe(this)},get:function(){return this[O]}},{key:"length",get:function(){return this[L]}},{key:"itemCount",get:function(){return this[ne].length}}])&&_(qe.prototype,yt),gt&&_(qe,gt),je}(),se=function(je,qe,yt){var gt=je[m].get(qe);if(gt){var Xe=gt.value;if(De(je,Xe)){if(me(je,gt),!je[C])return}else yt&&(je[he]&&(gt.value.now=Date.now()),je[ne].unshiftNode(gt));return Xe.value}},De=function(je,qe){if(!qe||!qe.maxAge&&!je[U])return!1;var yt=Date.now()-qe.now;return qe.maxAge?yt>qe.maxAge:je[U]&&yt>je[U]},pe=function(je){if(je[L]>je[k])for(var qe=je[ne].tail;je[L]>je[k]&&qe!==null;){var yt=qe.prev;me(je,qe),qe=yt}},me=function(je,qe){if(qe){var yt=qe.value;je[H]&&je[H](yt.key,yt.value),je[L]-=yt.length,je[m].delete(yt.key),je[ne].removeNode(qe)}},ie=function je(qe,yt,gt,Xe,ut){p(this,je),this.key=qe,this.value=yt,this.length=gt,this.now=Xe,this.maxAge=ut||0},Oe=function(je,qe,yt,gt){var Xe=yt.value;De(je,Xe)&&(me(je,yt),je[C]||(Xe=void 0)),Xe&&qe.call(gt,Xe.value,Xe.key,je)};i.exports=ve},function(i,o,a){(function(p){function _(t){return(_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(k){return typeof k}:function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k})(t)}i.exports=function(){if(typeof document=="undefined"||!document.addEventListener)return null;var t,k,L,O={};return O.copy=function(){var C=!1,U=null,H=!1;function W(){C=!1,U=null,H&&window.getSelection().removeAllRanges(),H=!1}return document.addEventListener("copy",function(ne){if(C){for(var m in U)ne.clipboardData.setData(m,U[m]);ne.preventDefault()}}),function(ne){return new Promise(function(m,he){C=!0,typeof ne=="string"?U={"text/plain":ne}:ne instanceof Node?U={"text/html":new XMLSerializer().serializeToString(ne)}:ne instanceof Object?U=ne:he("Invalid data type. Must be string, DOM node, or an object mapping MIME types to strings."),function Ee(ve){try{if(document.execCommand("copy"))W(),m();else{if(ve)throw W(),new Error("Unable to copy. Perhaps it's not available in your browser?");(function(){var se=document.getSelection();if(!document.queryCommandEnabled("copy")&&se.isCollapsed){var De=document.createRange();De.selectNodeContents(document.body),se.removeAllRanges(),se.addRange(De),H=!0}})(),Ee(!0)}}catch(se){W(),he(se)}}(!1)})}}(),O.paste=(L=!1,document.addEventListener("paste",function(C){if(L){L=!1,C.preventDefault();var U=t;t=null,U(C.clipboardData.getData(k))}}),function(C){return new Promise(function(U,H){L=!0,t=U,k=C||"text/plain";try{document.execCommand("paste")||(L=!1,H(new Error("Unable to paste. Pasting only works in Internet Explorer at the moment.")))}catch(W){L=!1,H(new Error(W))}})}),typeof ClipboardEvent=="undefined"&&window.clipboardData!==void 0&&window.clipboardData.setData!==void 0&&(function(C){function U(pe,me){return function(){pe.apply(me,arguments)}}function H(pe){if(_(this)!="object")throw new TypeError("Promises must be constructed via new");if(typeof pe!="function")throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],ve(pe,U(ne,this),U(m,this))}function W(pe){var me=this;return this._state===null?void this._deferreds.push(pe):void se(function(){var ie=me._state?pe.onFulfilled:pe.onRejected;if(ie!==null){var Oe;try{Oe=ie(me._value)}catch(je){return void pe.reject(je)}pe.resolve(Oe)}else(me._state?pe.resolve:pe.reject)(me._value)})}function ne(pe){try{if(pe===this)throw new TypeError("A promise cannot be resolved with itself.");if(pe&&(_(pe)=="object"||typeof pe=="function")){var me=pe.then;if(typeof me=="function")return void ve(U(me,pe),U(ne,this),U(m,this))}this._state=!0,this._value=pe,he.call(this)}catch(ie){m.call(this,ie)}}function m(pe){this._state=!1,this._value=pe,he.call(this)}function he(){for(var pe=0,me=this._deferreds.length;me>pe;pe++)W.call(this,this._deferreds[pe]);this._deferreds=null}function Ee(pe,me,ie,Oe){this.onFulfilled=typeof pe=="function"?pe:null,this.onRejected=typeof me=="function"?me:null,this.resolve=ie,this.reject=Oe}function ve(pe,me,ie){var Oe=!1;try{pe(function(je){Oe||(Oe=!0,me(je))},function(je){Oe||(Oe=!0,ie(je))})}catch(je){if(Oe)return;Oe=!0,ie(je)}}var se=H.immediateFn||typeof p=="function"&&p||function(pe){setTimeout(pe,1)},De=Array.isArray||function(pe){return Object.prototype.toString.call(pe)==="[object Array]"};H.prototype.catch=function(pe){return this.then(null,pe)},H.prototype.then=function(pe,me){var ie=this;return new H(function(Oe,je){W.call(ie,new Ee(pe,me,Oe,je))})},H.all=function(){var pe=Array.prototype.slice.call(arguments.length===1&&De(arguments[0])?arguments[0]:arguments);return new H(function(me,ie){function Oe(yt,gt){try{if(gt&&(_(gt)=="object"||typeof gt=="function")){var Xe=gt.then;if(typeof Xe=="function")return void Xe.call(gt,function(ut){Oe(yt,ut)},ie)}pe[yt]=gt,--je==0&&me(pe)}catch(ut){ie(ut)}}if(pe.length===0)return me([]);for(var je=pe.length,qe=0;qeOe;Oe++)pe[Oe].then(me,ie)})},i.exports?i.exports=H:C.Promise||(C.Promise=H)}(this),O.copy=function(C){return new Promise(function(U,H){if(typeof C!="string"&&!("text/plain"in C))throw new Error("You must provide a text/plain type.");var W=typeof C=="string"?C:C["text/plain"];window.clipboardData.setData("Text",W)?U():H(new Error("Copying was rejected."))})},O.paste=function(){return new Promise(function(C,U){var H=window.clipboardData.getData("Text");H?C(H):U(new Error("Pasting was rejected."))})}),O}()}).call(this,a(13).setImmediate)},function(i,o,a){"use strict";i.exports=a(15)},function(i,o,a){"use strict";a.r(o),o.default=`:root { - /** - * IMPORTANT: When new theme variables are added below\u2013 also add them to SettingsContext updateThemeVariables() - */ - - /* Light theme */ - --light-color-attribute-name: #ef6632; - --light-color-attribute-name-not-editable: #23272f; - --light-color-attribute-name-inverted: rgba(255, 255, 255, 0.7); - --light-color-attribute-value: #1a1aa6; - --light-color-attribute-value-inverted: #ffffff; - --light-color-attribute-editable-value: #1a1aa6; - --light-color-background: #ffffff; - --light-color-background-hover: rgba(0, 136, 250, 0.1); - --light-color-background-inactive: #e5e5e5; - --light-color-background-invalid: #fff0f0; - --light-color-background-selected: #0088fa; - --light-color-button-background: #ffffff; - --light-color-button-background-focus: #ededed; - --light-color-button: #5f6673; - --light-color-button-disabled: #cfd1d5; - --light-color-button-active: #0088fa; - --light-color-button-focus: #23272f; - --light-color-button-hover: #23272f; - --light-color-border: #eeeeee; - --light-color-commit-did-not-render-fill: #cfd1d5; - --light-color-commit-did-not-render-fill-text: #000000; - --light-color-commit-did-not-render-pattern: #cfd1d5; - --light-color-commit-did-not-render-pattern-text: #333333; - --light-color-commit-gradient-0: #37afa9; - --light-color-commit-gradient-1: #63b19e; - --light-color-commit-gradient-2: #80b393; - --light-color-commit-gradient-3: #97b488; - --light-color-commit-gradient-4: #abb67d; - --light-color-commit-gradient-5: #beb771; - --light-color-commit-gradient-6: #cfb965; - --light-color-commit-gradient-7: #dfba57; - --light-color-commit-gradient-8: #efbb49; - --light-color-commit-gradient-9: #febc38; - --light-color-commit-gradient-text: #000000; - --light-color-component-name: #6a51b2; - --light-color-component-name-inverted: #ffffff; - --light-color-component-badge-background: rgba(0, 0, 0, 0.1); - --light-color-component-badge-background-inverted: rgba(255, 255, 255, 0.25); - --light-color-component-badge-count: #777d88; - --light-color-component-badge-count-inverted: rgba(255, 255, 255, 0.7); - --light-color-context-background: rgba(0,0,0,.9); - --light-color-context-background-hover: rgba(255, 255, 255, 0.1); - --light-color-context-background-selected: #178fb9; - --light-color-context-border: #3d424a; - --light-color-context-text: #ffffff; - --light-color-context-text-selected: #ffffff; - --light-color-dim: #777d88; - --light-color-dimmer: #cfd1d5; - --light-color-dimmest: #eff0f1; - --light-color-error-background: hsl(0, 100%, 97%); - --light-color-error-border: hsl(0, 100%, 92%); - --light-color-error-text: #ff0000; - --light-color-expand-collapse-toggle: #777d88; - --light-color-link: #0000ff; - --light-color-modal-background: rgba(255, 255, 255, 0.75); - --light-color-record-active: #fc3a4b; - --light-color-record-hover: #3578e5; - --light-color-record-inactive: #0088fa; - --light-color-scroll-thumb: #c2c2c2; - --light-color-scroll-track: #fafafa; - --light-color-search-match: yellow; - --light-color-search-match-current: #f7923b; - --light-color-selected-tree-highlight-active: rgba(0, 136, 250, 0.1); - --light-color-selected-tree-highlight-inactive: rgba(0, 0, 0, 0.05); - --light-color-shadow: rgba(0, 0, 0, 0.25); - --light-color-tab-selected-border: #0088fa; - --light-color-text: #000000; - --light-color-text-invalid: #ff0000; - --light-color-text-selected: #ffffff; - --light-color-toggle-background-invalid: #fc3a4b; - --light-color-toggle-background-on: #0088fa; - --light-color-toggle-background-off: #cfd1d5; - --light-color-toggle-text: #ffffff; - --light-color-tooltip-background: rgba(0, 0, 0, 0.9); - --light-color-tooltip-text: #ffffff; - - /* Dark theme */ - --dark-color-attribute-name: #9d87d2; - --dark-color-attribute-name-not-editable: #ededed; - --dark-color-attribute-name-inverted: #282828; - --dark-color-attribute-value: #cedae0; - --dark-color-attribute-value-inverted: #ffffff; - --dark-color-attribute-editable-value: yellow; - --dark-color-background: #282c34; - --dark-color-background-hover: rgba(255, 255, 255, 0.1); - --dark-color-background-inactive: #3d424a; - --dark-color-background-invalid: #5c0000; - --dark-color-background-selected: #178fb9; - --dark-color-button-background: #282c34; - --dark-color-button-background-focus: #3d424a; - --dark-color-button: #afb3b9; - --dark-color-button-active: #61dafb; - --dark-color-button-disabled: #4f5766; - --dark-color-button-focus: #a2e9fc; - --dark-color-button-hover: #ededed; - --dark-color-border: #3d424a; - --dark-color-commit-did-not-render-fill: #777d88; - --dark-color-commit-did-not-render-fill-text: #000000; - --dark-color-commit-did-not-render-pattern: #666c77; - --dark-color-commit-did-not-render-pattern-text: #ffffff; - --dark-color-commit-gradient-0: #37afa9; - --dark-color-commit-gradient-1: #63b19e; - --dark-color-commit-gradient-2: #80b393; - --dark-color-commit-gradient-3: #97b488; - --dark-color-commit-gradient-4: #abb67d; - --dark-color-commit-gradient-5: #beb771; - --dark-color-commit-gradient-6: #cfb965; - --dark-color-commit-gradient-7: #dfba57; - --dark-color-commit-gradient-8: #efbb49; - --dark-color-commit-gradient-9: #febc38; - --dark-color-commit-gradient-text: #000000; - --dark-color-component-name: #61dafb; - --dark-color-component-name-inverted: #282828; - --dark-color-component-badge-background: rgba(255, 255, 255, 0.25); - --dark-color-component-badge-background-inverted: rgba(0, 0, 0, 0.25); - --dark-color-component-badge-count: #8f949d; - --dark-color-component-badge-count-inverted: rgba(255, 255, 255, 0.7); - --dark-color-context-background: rgba(255,255,255,.9); - --dark-color-context-background-hover: rgba(0, 136, 250, 0.1); - --dark-color-context-background-selected: #0088fa; - --dark-color-context-border: #eeeeee; - --dark-color-context-text: #000000; - --dark-color-context-text-selected: #ffffff; - --dark-color-dim: #8f949d; - --dark-color-dimmer: #777d88; - --dark-color-dimmest: #4f5766; - --dark-color-error-background: #200; - --dark-color-error-border: #900; - --dark-color-error-text: #f55; - --dark-color-expand-collapse-toggle: #8f949d; - --dark-color-link: #61dafb; - --dark-color-modal-background: rgba(0, 0, 0, 0.75); - --dark-color-record-active: #fc3a4b; - --dark-color-record-hover: #a2e9fc; - --dark-color-record-inactive: #61dafb; - --dark-color-scroll-thumb: #afb3b9; - --dark-color-scroll-track: #313640; - --dark-color-search-match: yellow; - --dark-color-search-match-current: #f7923b; - --dark-color-selected-tree-highlight-active: rgba(23, 143, 185, 0.15); - --dark-color-selected-tree-highlight-inactive: rgba(255, 255, 255, 0.05); - --dark-color-shadow: rgba(0, 0, 0, 0.5); - --dark-color-tab-selected-border: #178fb9; - --dark-color-text: #ffffff; - --dark-color-text-invalid: #ff8080; - --dark-color-text-selected: #ffffff; - --dark-color-toggle-background-invalid: #fc3a4b; - --dark-color-toggle-background-on: #178fb9; - --dark-color-toggle-background-off: #777d88; - --dark-color-toggle-text: #ffffff; - --dark-color-tooltip-background: rgba(255, 255, 255, 0.9); - --dark-color-tooltip-text: #000000; - - /* Font smoothing */ - --light-font-smoothing: auto; - --dark-font-smoothing: antialiased; - --font-smoothing: auto; - - /* Compact density */ - --compact-font-size-monospace-small: 9px; - --compact-font-size-monospace-normal: 11px; - --compact-font-size-monospace-large: 15px; - --compact-font-size-sans-small: 10px; - --compact-font-size-sans-normal: 12px; - --compact-font-size-sans-large: 14px; - --compact-line-height-data: 18px; - --compact-root-font-size: 16px; - - /* Comfortable density */ - --comfortable-font-size-monospace-small: 10px; - --comfortable-font-size-monospace-normal: 13px; - --comfortable-font-size-monospace-large: 17px; - --comfortable-font-size-sans-small: 12px; - --comfortable-font-size-sans-normal: 14px; - --comfortable-font-size-sans-large: 16px; - --comfortable-line-height-data: 22px; - --comfortable-root-font-size: 20px; - - /* GitHub.com system fonts */ - --font-family-monospace: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, - Courier, monospace; - --font-family-sans: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, - Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; - - /* Constant values shared between JS and CSS */ - --interaction-commit-size: 10px; - --interaction-label-width: 200px; -} -`},function(i,o,a){"use strict";function p(O){var C=this;if(C instanceof p||(C=new p),C.tail=null,C.head=null,C.length=0,O&&typeof O.forEach=="function")O.forEach(function(W){C.push(W)});else if(arguments.length>0)for(var U=0,H=arguments.length;U1)U=C;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");H=this.head.next,U=this.head.value}for(var W=0;H!==null;W++)U=O(U,H.value,W),H=H.next;return U},p.prototype.reduceReverse=function(O,C){var U,H=this.tail;if(arguments.length>1)U=C;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");H=this.tail.prev,U=this.tail.value}for(var W=this.length-1;H!==null;W--)U=O(U,H.value,W),H=H.prev;return U},p.prototype.toArray=function(){for(var O=new Array(this.length),C=0,U=this.head;U!==null;C++)O[C]=U.value,U=U.next;return O},p.prototype.toArrayReverse=function(){for(var O=new Array(this.length),C=0,U=this.tail;U!==null;C++)O[C]=U.value,U=U.prev;return O},p.prototype.slice=function(O,C){(C=C||this.length)<0&&(C+=this.length),(O=O||0)<0&&(O+=this.length);var U=new p;if(Cthis.length&&(C=this.length);for(var H=0,W=this.head;W!==null&&Hthis.length&&(C=this.length);for(var H=this.length,W=this.tail;W!==null&&H>C;H--)W=W.prev;for(;W!==null&&H>O;H--,W=W.prev)U.push(W.value);return U},p.prototype.splice=function(O,C){O>this.length&&(O=this.length-1),O<0&&(O=this.length+O);for(var U=0,H=this.head;H!==null&&U=0&&(L._idleTimeoutId=setTimeout(function(){L._onTimeout&&L._onTimeout()},O))},a(14),o.setImmediate=typeof self!="undefined"&&self.setImmediate||p!==void 0&&p.setImmediate||this&&this.setImmediate,o.clearImmediate=typeof self!="undefined"&&self.clearImmediate||p!==void 0&&p.clearImmediate||this&&this.clearImmediate}).call(this,a(4))},function(i,o,a){(function(p,_){(function(t,k){"use strict";if(!t.setImmediate){var L,O,C,U,H,W=1,ne={},m=!1,he=t.document,Ee=Object.getPrototypeOf&&Object.getPrototypeOf(t);Ee=Ee&&Ee.setTimeout?Ee:t,{}.toString.call(t.process)==="[object process]"?L=function(De){_.nextTick(function(){se(De)})}:function(){if(t.postMessage&&!t.importScripts){var De=!0,pe=t.onmessage;return t.onmessage=function(){De=!1},t.postMessage("","*"),t.onmessage=pe,De}}()?(U="setImmediate$"+Math.random()+"$",H=function(De){De.source===t&&typeof De.data=="string"&&De.data.indexOf(U)===0&&se(+De.data.slice(U.length))},t.addEventListener?t.addEventListener("message",H,!1):t.attachEvent("onmessage",H),L=function(De){t.postMessage(U+De,"*")}):t.MessageChannel?((C=new MessageChannel).port1.onmessage=function(De){se(De.data)},L=function(De){C.port2.postMessage(De)}):he&&"onreadystatechange"in he.createElement("script")?(O=he.documentElement,L=function(De){var pe=he.createElement("script");pe.onreadystatechange=function(){se(De),pe.onreadystatechange=null,O.removeChild(pe),pe=null},O.appendChild(pe)}):L=function(De){setTimeout(se,0,De)},Ee.setImmediate=function(De){typeof De!="function"&&(De=new Function(""+De));for(var pe=new Array(arguments.length-1),me=0;mefe;fe++)if((Q=ve(rt,Ft,fe))!==-1){Ee=fe,Ft=Q;break e}Ft=-1}}e:{if(rt=Jt,(Q=W().get(We.primitive))!==void 0){for(fe=0;feFt-rt?null:Jt.slice(rt,Ft-1))!==null){if(Ft=0,qe!==null){for(;FtFt;qe--)yt=Xe.pop()}for(qe=Jt.length-Ft-1;1<=qe;qe--)Ft=[],yt.push({id:null,isStateEditable:!1,name:De(Jt[qe-1].functionName),value:void 0,subHooks:Ft}),Xe.push(yt),yt=Ft;qe=Jt}Ft=(Jt=We.primitive)==="Context"||Jt==="DebugValue"?null:gt++,yt.push({id:Ft,isStateEditable:Jt==="Reducer"||Jt==="State",name:Jt,value:We.value,subHooks:[]})}return function xe(oe,ze){for(var ct=[],Rt=0;Rt-1&&(ne=ne.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var m=ne.replace(/^\s+/,"").replace(/\(eval code/g,"("),he=m.match(/ (\((.+):(\d+):(\d+)\)$)/),Ee=(m=he?m.replace(he[0],""):m).split(/\s+/).slice(1),ve=this.extractLocation(he?he[1]:Ee.pop()),se=Ee.join(" ")||void 0,De=["eval",""].indexOf(ve[0])>-1?void 0:ve[0];return new O({functionName:se,fileName:De,lineNumber:ve[1],columnNumber:ve[2],source:ne})},this)},parseFFOrSafari:function(W){return W.stack.split(` -`).filter(function(ne){return!ne.match(H)},this).map(function(ne){if(ne.indexOf(" > eval")>-1&&(ne=ne.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),ne.indexOf("@")===-1&&ne.indexOf(":")===-1)return new O({functionName:ne});var m=/((.*".+"[^@]*)?[^@]*)(?:@)/,he=ne.match(m),Ee=he&&he[1]?he[1]:void 0,ve=this.extractLocation(ne.replace(m,""));return new O({functionName:Ee,fileName:ve[0],lineNumber:ve[1],columnNumber:ve[2],source:ne})},this)},parseOpera:function(W){return!W.stacktrace||W.message.indexOf(` -`)>-1&&W.message.split(` -`).length>W.stacktrace.split(` -`).length?this.parseOpera9(W):W.stack?this.parseOpera11(W):this.parseOpera10(W)},parseOpera9:function(W){for(var ne=/Line (\d+).*script (?:in )?(\S+)/i,m=W.message.split(` -`),he=[],Ee=2,ve=m.length;Ee/,"$2").replace(/\([^)]*\)/g,"")||void 0;ve.match(/\(([^)]*)\)/)&&(m=ve.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var De=m===void 0||m==="[arguments not available]"?void 0:m.split(",");return new O({functionName:se,args:De,fileName:Ee[0],lineNumber:Ee[1],columnNumber:Ee[2],source:ne})},this)}}})=="function"?p.apply(o,_):p)===void 0||(i.exports=t)})()},function(i,o,a){var p,_,t;(function(k,L){"use strict";_=[],(t=typeof(p=function(){function O(se){return se.charAt(0).toUpperCase()+se.substring(1)}function C(se){return function(){return this[se]}}var U=["isConstructor","isEval","isNative","isToplevel"],H=["columnNumber","lineNumber"],W=["fileName","functionName","source"],ne=U.concat(H,W,["args"]);function m(se){if(se)for(var De=0;De1?Re-1:0),ke=1;ke=0&&Re.splice(Z,1)}}}])&&p(z.prototype,G),$&&p(z,$),B}(),t=a(2),k=a.n(t);try{var L=a(9).default,O=function(B){var z=new RegExp("".concat(B,": ([0-9]+)")),G=L.match(z);return parseInt(G[1],10)};O("comfortable-line-height-data"),O("compact-line-height-data")}catch(B){}function C(B){try{return sessionStorage.getItem(B)}catch(z){return null}}function U(B){try{sessionStorage.removeItem(B)}catch(z){}}function H(B,z){try{return sessionStorage.setItem(B,z)}catch(G){}}var W=function(B,z){return B===z},ne=a(1),m=a.n(ne);function he(B){return B.ownerDocument?B.ownerDocument.defaultView:null}function Ee(B){var z=he(B);return z?z.frameElement:null}function ve(B){var z=pe(B);return se([B.getBoundingClientRect(),{top:z.borderTop,left:z.borderLeft,bottom:z.borderBottom,right:z.borderRight,width:0,height:0}])}function se(B){return B.reduce(function(z,G){return z==null?G:{top:z.top+G.top,left:z.left+G.left,width:z.width,height:z.height,bottom:z.bottom+G.bottom,right:z.right+G.right}})}function De(B,z){var G=Ee(B);if(G&&G!==z){for(var $=[B.getBoundingClientRect()],Te=G,ge=!1;Te;){var Re=ve(Te);if($.push(Re),Te=Ee(Te),ge)break;Te&&he(Te)===z&&(ge=!0)}return se($)}return B.getBoundingClientRect()}function pe(B){var z=window.getComputedStyle(B);return{borderLeft:parseInt(z.borderLeftWidth,10),borderRight:parseInt(z.borderRightWidth,10),borderTop:parseInt(z.borderTopWidth,10),borderBottom:parseInt(z.borderBottomWidth,10),marginLeft:parseInt(z.marginLeft,10),marginRight:parseInt(z.marginRight,10),marginTop:parseInt(z.marginTop,10),marginBottom:parseInt(z.marginBottom,10),paddingLeft:parseInt(z.paddingLeft,10),paddingRight:parseInt(z.paddingRight,10),paddingTop:parseInt(z.paddingTop,10),paddingBottom:parseInt(z.paddingBottom,10)}}function me(B,z){var G;if(typeof Symbol=="undefined"||B[Symbol.iterator]==null){if(Array.isArray(B)||(G=function(ke,Qe){if(!!ke){if(typeof ke=="string")return ie(ke,Qe);var ht=Object.prototype.toString.call(ke).slice(8,-1);if(ht==="Object"&&ke.constructor&&(ht=ke.constructor.name),ht==="Map"||ht==="Set")return Array.from(ke);if(ht==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ht))return ie(ke,Qe)}}(B))||z&&B&&typeof B.length=="number"){G&&(B=G);var $=0,Te=function(){};return{s:Te,n:function(){return $>=B.length?{done:!0}:{done:!1,value:B[$++]}},e:function(ke){throw ke},f:Te}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ge,Re=!0,Z=!1;return{s:function(){G=B[Symbol.iterator]()},n:function(){var ke=G.next();return Re=ke.done,ke},e:function(ke){Z=!0,ge=ke},f:function(){try{Re||G.return==null||G.return()}finally{if(Z)throw ge}}}}function ie(B,z){(z==null||z>B.length)&&(z=B.length);for(var G=0,$=new Array(z);GRe.left+Re.width&&(ue=Re.left+Re.width-ht-5),{style:{top:ke+="px",left:ue+="px"}}}(z,G,{width:$.width,height:$.height});m()(this.tip.style,Te.style)}}]),B}(),Xe=function(){function B(){Oe(this,B);var z=window.__REACT_DEVTOOLS_TARGET_WINDOW__||window;this.window=z;var G=window.__REACT_DEVTOOLS_TARGET_WINDOW__||window;this.tipBoundsWindow=G;var $=z.document;this.container=$.createElement("div"),this.container.style.zIndex="10000000",this.tip=new gt($,this.container),this.rects=[],$.body.appendChild(this.container)}return qe(B,[{key:"remove",value:function(){this.tip.remove(),this.rects.forEach(function(z){z.remove()}),this.rects.length=0,this.container.parentNode&&this.container.parentNode.removeChild(this.container)}},{key:"inspect",value:function(z,G){for(var $=this,Te=z.filter(function(Ct){return Ct.nodeType===Node.ELEMENT_NODE});this.rects.length>Te.length;)this.rects.pop().remove();if(Te.length!==0){for(;this.rects.length1&&arguments[1]!==void 0?arguments[1]:W,nt=void 0,Ct=[],Mt=void 0,It=!1,sn=function(Lt,Dn){return He(Lt,Ct[Dn])},rn=function(){for(var Lt=arguments.length,Dn=Array(Lt),dr=0;dr5&&arguments[5]!==void 0?arguments[5]:0,Z=Oo(B);switch(Z){case"html_element":return z.push($),{inspectable:!1,preview_short:ki(B,!1),preview_long:ki(B,!0),name:B.tagName,type:Z};case"function":return z.push($),{inspectable:!1,preview_short:ki(B,!1),preview_long:ki(B,!0),name:typeof B.name!="function"&&B.name?B.name:"function",type:Z};case"string":return B.length<=500?B:B.slice(0,500)+"...";case"bigint":case"symbol":return z.push($),{inspectable:!1,preview_short:ki(B,!1),preview_long:ki(B,!0),name:B.toString(),type:Z};case"react_element":return z.push($),{inspectable:!1,preview_short:ki(B,!1),preview_long:ki(B,!0),name:F0(B)||"Unknown",type:Z};case"array_buffer":case"data_view":return z.push($),{inspectable:!1,preview_short:ki(B,!1),preview_long:ki(B,!0),name:Z==="data_view"?"DataView":"ArrayBuffer",size:B.byteLength,type:Z};case"array":return ge=Te($),Re>=2&&!ge?d0(Z,!0,B,z,$):B.map(function(ht,ue){return Ro(ht,z,G,$.concat([ue]),Te,ge?1:Re+1)});case"html_all_collection":case"typed_array":case"iterator":if(ge=Te($),Re>=2&&!ge)return d0(Z,!0,B,z,$);var ke={unserializable:!0,type:Z,readonly:!0,size:Z==="typed_array"?B.length:void 0,preview_short:ki(B,!1),preview_long:ki(B,!0),name:B.constructor&&B.constructor.name!=="Object"?B.constructor.name:""};return Xt(B[Symbol.iterator])&&Array.from(B).forEach(function(ht,ue){return ke[ue]=Ro(ht,z,G,$.concat([ue]),Te,ge?1:Re+1)}),G.push($),ke;case"opaque_iterator":return z.push($),{inspectable:!1,preview_short:ki(B,!1),preview_long:ki(B,!0),name:B[Symbol.toStringTag],type:Z};case"date":case"regexp":return z.push($),{inspectable:!1,preview_short:ki(B,!1),preview_long:ki(B,!0),name:B.toString(),type:Z};case"object":if(ge=Te($),Re>=2&&!ge)return d0(Z,!0,B,z,$);var Qe={};return lu(B).forEach(function(ht){var ue=ht.toString();Qe[ue]=Ro(B[ht],z,G,$.concat([ue]),Te,ge?1:Re+1)}),Qe;case"infinity":case"nan":case"undefined":return z.push($),{type:Z};default:return B}}function Qo(B){return(Qo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(B)}function Fs(B){return function(z){if(Array.isArray(z))return Jo(z)}(B)||function(z){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(z))return Array.from(z)}(B)||function(z,G){if(!!z){if(typeof z=="string")return Jo(z,G);var $=Object.prototype.toString.call(z).slice(8,-1);if($==="Object"&&z.constructor&&($=z.constructor.name),$==="Map"||$==="Set")return Array.from(z);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return Jo(z,G)}}(B)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Jo(B,z){(z==null||z>B.length)&&(z=B.length);for(var G=0,$=new Array(z);Gz.toString()?1:z.toString()>B.toString()?-1:0}function lu(B){for(var z=[],G=B,$=function(){var Te=[].concat(Fs(Object.keys(G)),Fs(Object.getOwnPropertySymbols(G))),ge=Object.getOwnPropertyDescriptors(G);Te.forEach(function(Re){ge[Re].enumerable&&z.push(Re)}),G=Object.getPrototypeOf(G)};G!=null;)$();return z}function mi(B){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Anonymous",G=Zo.get(B);if(G!=null)return G;var $=z;return typeof B.displayName=="string"?$=B.displayName:typeof B.name=="string"&&B.name!==""&&($=B.name),Zo.set(B,$),$}var Dr=0;function $o(){return++Dr}function G0(B){var z=qt.get(B);if(z!==void 0)return z;for(var G=new Array(B.length),$=0;$1&&arguments[1]!==void 0?arguments[1]:50;return B.length>z?B.substr(0,z)+"\u2026":B}function ki(B,z){if(B!=null&&hasOwnProperty.call(B,wu.type))return z?B[wu.preview_long]:B[wu.preview_short];switch(Oo(B)){case"html_element":return"<".concat(su(B.tagName.toLowerCase())," />");case"function":return su("\u0192 ".concat(typeof B.name=="function"?"":B.name,"() {}"));case"string":return'"'.concat(B,'"');case"bigint":return su(B.toString()+"n");case"regexp":case"symbol":return su(B.toString());case"react_element":return"<".concat(su(F0(B)||"Unknown")," />");case"array_buffer":return"ArrayBuffer(".concat(B.byteLength,")");case"data_view":return"DataView(".concat(B.buffer.byteLength,")");case"array":if(z){for(var G="",$=0;$0&&(G+=", "),!((G+=ki(B[$],!1)).length>50));$++);return"[".concat(su(G),"]")}var Te=hasOwnProperty.call(B,wu.size)?B[wu.size]:B.length;return"Array(".concat(Te,")");case"typed_array":var ge="".concat(B.constructor.name,"(").concat(B.length,")");if(z){for(var Re="",Z=0;Z0&&(Re+=", "),!((Re+=B[Z]).length>50));Z++);return"".concat(ge," [").concat(su(Re),"]")}return ge;case"iterator":var ke=B.constructor.name;if(z){for(var Qe=Array.from(B),ht="",ue=0;ue0&&(ht+=", "),Array.isArray(He)){var nt=ki(He[0],!0),Ct=ki(He[1],!1);ht+="".concat(nt," => ").concat(Ct)}else ht+=ki(He,!1);if(ht.length>50)break}return"".concat(ke,"(").concat(B.size,") {").concat(su(ht),"}")}return"".concat(ke,"(").concat(B.size,")");case"opaque_iterator":return B[Symbol.toStringTag];case"date":return B.toString();case"object":if(z){for(var Mt=lu(B).sort(xi),It="",sn=0;sn0&&(It+=", "),(It+="".concat(rn.toString(),": ").concat(ki(B[rn],!1))).length>50)break}return"{".concat(su(It),"}")}return"{\u2026}";case"boolean":case"number":case"infinity":case"nan":case"null":case"undefined":return B;default:try{return su(""+B)}catch(Lt){return"unserializable"}}}var Ps=a(7);function Kl(B){return(Kl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(B)}function P0(B,z){var G=Object.keys(B);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(B);z&&($=$.filter(function(Te){return Object.getOwnPropertyDescriptor(B,Te).enumerable})),G.push.apply(G,$)}return G}function p0(B){for(var z=1;z2&&arguments[2]!==void 0?arguments[2]:[];if(B!==null){var $=[],Te=[],ge=Ro(B,$,Te,G,z);return{data:ge,cleaned:$,unserializable:Te}}return null}function K0(B){var z,G,$=(z=B,G=new Set,JSON.stringify(z,function(Re,Z){if(Kl(Z)==="object"&&Z!==null){if(G.has(Z))return;G.add(Z)}return typeof Z=="bigint"?Z.toString()+"n":Z})),Te=$===void 0?"undefined":$,ge=window.__REACT_DEVTOOLS_GLOBAL_HOOK__.clipboardCopyText;typeof ge=="function"?ge(Te).catch(function(Re){}):Object(Ps.copy)(Te)}function yi(B,z){var G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,$=z[G],Te=Array.isArray(B)?B.slice():p0({},B);return G+1===z.length?Array.isArray(Te)?Te.splice($,1):delete Te[$]:Te[$]=yi(B[$],z,G+1),Te}function en(B,z,G){var $=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,Te=z[$],ge=Array.isArray(B)?B.slice():p0({},B);if($+1===z.length){var Re=G[$];ge[Re]=ge[Te],Array.isArray(ge)?ge.splice(Te,1):delete ge[Te]}else ge[Te]=en(B[Te],z,G,$+1);return ge}function bn(B,z,G){var $=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;if($>=z.length)return G;var Te=z[$],ge=Array.isArray(B)?B.slice():p0({},B);return ge[Te]=bn(B[Te],z,G,$+1),ge}var Ai=a(8);function gi(B,z){var G=Object.keys(B);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(B);z&&($=$.filter(function(Te){return Object.getOwnPropertyDescriptor(B,Te).enumerable})),G.push.apply(G,$)}return G}function Wt(B){for(var z=1;z=B.length?{done:!0}:{done:!1,value:B[$++]}},e:function(ke){throw ke},f:Te}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ge,Re=!0,Z=!1;return{s:function(){G=B[Symbol.iterator]()},n:function(){var ke=G.next();return Re=ke.done,ke},e:function(ke){Z=!0,ge=ke},f:function(){try{Re||G.return==null||G.return()}finally{if(Z)throw ge}}}}function Xl(B,z){if(B){if(typeof B=="string")return Mo(B,z);var G=Object.prototype.toString.call(B).slice(8,-1);return G==="Object"&&B.constructor&&(G=B.constructor.name),G==="Map"||G==="Set"?Array.from(B):G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G)?Mo(B,z):void 0}}function Mo(B,z){(z==null||z>B.length)&&(z=B.length);for(var G=0,$=new Array(z);G0){var vt=ge(ae);if(vt!=null){var Qt,On=Yi(Po);try{for(On.s();!(Qt=On.n()).done;)if(Qt.value.test(vt))return!0}catch(ir){On.e(ir)}finally{On.f()}}}if(re!=null&&ys.size>0){var Sn,_n=re.fileName,Tn=Yi(ys);try{for(Tn.s();!(Sn=Tn.n()).done;)if(Sn.value.test(_n))return!0}catch(ir){Tn.e(ir)}finally{Tn.f()}}return!1}function Tu(ae){var re=ae.type;switch(ae.tag){case Ct:case Cr:return 1;case nt:case An:return 5;case rn:return 6;case Lt:return 11;case dr:return 7;case Dn:case er:case sn:return 9;case Nr:case Lr:return 8;case it:return 12;case Dt:return 13;default:switch(Re(re)){case 60111:case"Symbol(react.concurrent_mode)":case"Symbol(react.async_mode)":return 9;case 60109:case"Symbol(react.provider)":return 2;case 60110:case"Symbol(react.context)":return 2;case 60108:case"Symbol(react.strict_mode)":return 9;case 60114:case"Symbol(react.profiler)":return 10;default:return 9}}}function Ei(ae){if(Bo.has(ae))return ae;var re=ae.alternate;return re!=null&&Bo.has(re)?re:(Bo.add(ae),ae)}window.__REACT_DEVTOOLS_COMPONENT_FILTERS__!=null?gs(window.__REACT_DEVTOOLS_COMPONENT_FILTERS__):gs([{type:1,value:7,isEnabled:!0}]);var C0=new Map,Z0=new Map,Bo=new Set,la=new Map,$l=new Map,tu=-1;function ei(ae){if(!C0.has(ae)){var re=$o();C0.set(ae,re),Z0.set(re,ae)}return C0.get(ae)}function po(ae){switch(Tu(ae)){case 1:if(B0!==null){var re=ei(Ei(ae)),Fe=Ci(ae);Fe!==null&&B0.set(re,Fe)}}}var Bi={};function Ci(ae){switch(Tu(ae)){case 1:var re=ae.stateNode,Fe=Bi,Ae=Bi;return re!=null&&(re.constructor&&re.constructor.contextType!=null?Ae=re.context:(Fe=re.context)&&Object.keys(Fe).length===0&&(Fe=Bi)),[Fe,Ae];default:return null}}function mf(ae){switch(Tu(ae)){case 1:if(B0!==null){var re=ei(Ei(ae)),Fe=B0.has(re)?B0.get(re):null,Ae=Ci(ae);if(Fe==null||Ae==null)return null;var st=X0(Fe,2),vt=st[0],Qt=st[1],On=X0(Ae,2),Sn=On[0],_n=On[1];if(Sn!==Bi)return $0(vt,Sn);if(_n!==Bi)return Qt!==_n}}return null}function yf(ae,re){if(ae==null||re==null)return!1;if(re.hasOwnProperty("baseState")&&re.hasOwnProperty("memoizedState")&&re.hasOwnProperty("next")&&re.hasOwnProperty("queue"))for(;re!==null;){if(re.memoizedState!==ae.memoizedState)return!0;re=re.next,ae=ae.next}return!1}function $0(ae,re){if(ae==null||re==null||re.hasOwnProperty("baseState")&&re.hasOwnProperty("memoizedState")&&re.hasOwnProperty("next")&&re.hasOwnProperty("queue"))return null;var Fe,Ae=[],st=Yi(new Set([].concat(eu(Object.keys(ae)),eu(Object.keys(re)))));try{for(st.s();!(Fe=st.n()).done;){var vt=Fe.value;ae[vt]!==re[vt]&&Ae.push(vt)}}catch(Qt){st.e(Qt)}finally{st.f()}return Ae}function eo(ae,re){switch(re.tag){case Ct:case nt:case Mt:case Nr:case Lr:return(so(re)&ue)===ue;default:return ae.memoizedProps!==re.memoizedProps||ae.memoizedState!==re.memoizedState||ae.ref!==re.ref}}var Ce=[],et=[],Ye=[],Yt=[],Kt=new Map,pr=0,Wr=null;function xn(ae){Ce.push(ae)}function yu(ae){if(Ce.length!==0||et.length!==0||Ye.length!==0||Wr!==null||Pu){var re=et.length+Ye.length+(Wr===null?0:1),Fe=new Array(3+pr+(re>0?2+re:0)+Ce.length),Ae=0;if(Fe[Ae++]=z,Fe[Ae++]=tu,Fe[Ae++]=pr,Kt.forEach(function(On,Sn){Fe[Ae++]=Sn.length;for(var _n=G0(Sn),Tn=0;Tn<_n.length;Tn++)Fe[Ae+Tn]=_n[Tn];Ae+=Sn.length}),re>0){Fe[Ae++]=2,Fe[Ae++]=re;for(var st=et.length-1;st>=0;st--)Fe[Ae++]=et[st];for(var vt=0;vt0?ae.forEach(function(re){B.emit("operations",re)}):(Rr!==null&&(fu=!0),B.getFiberRoots(z).forEach(function(re){e0(tu=ei(Ei(re.current)),re.current),Pu&&re.memoizedInteractions!=null&&(rl={changeDescriptions:es?new Map:null,durations:[],commitTime:Ql()-Zu,interactions:Array.from(re.memoizedInteractions).map(function(Fe){return Wt(Wt({},Fe),{},{timestamp:Fe.timestamp-Zu})}),maxActualDuration:0,priorityLevel:null}),Jr(re.current,null,!1,!1),yu(),tu=-1}))},getBestMatchForTrackedPath:function(){if(Rr===null||to===null)return null;for(var ae=to;ae!==null&&Qu(ae);)ae=ae.return;return ae===null?null:{id:ei(Ei(ae)),isFullMatch:nu===Rr.length-1}},getDisplayNameForFiberID:function(ae){var re=Z0.get(ae);return re!=null?ge(re):null},getFiberIDForNative:function(ae){var re=arguments.length>1&&arguments[1]!==void 0&&arguments[1],Fe=G.findFiberByHostInstance(ae);if(Fe!=null){if(re)for(;Fe!==null&&Qu(Fe);)Fe=Fe.return;return ei(Ei(Fe))}return null},getInstanceAndStyle:function(ae){var re=null,Fe=null,Ae=Vu(ae);return Ae!==null&&(re=Ae.stateNode,Ae.memoizedProps!==null&&(Fe=Ae.memoizedProps.style)),{instance:re,style:Fe}},getOwnersList:function(ae){var re=Vu(ae);if(re==null)return null;var Fe=re._debugOwner,Ae=[{displayName:ge(re)||"Anonymous",id:ae,type:Tu(re)}];if(Fe)for(var st=Fe;st!==null;)Ae.unshift({displayName:ge(st)||"Anonymous",id:ei(Ei(st)),type:Tu(st)}),st=st._debugOwner||null;return Ae},getPathForElement:function(ae){var re=Z0.get(ae);if(re==null)return null;for(var Fe=[];re!==null;)Fe.push(E0(re)),re=re.return;return Fe.reverse(),Fe},getProfilingData:function(){var ae=[];if(_s===null)throw Error("getProfilingData() called before any profiling data was recorded");return _s.forEach(function(re,Fe){var Ae=[],st=[],vt=new Map,Qt=new Map,On=Cl!==null&&Cl.get(Fe)||"Unknown";O0!=null&&O0.forEach(function(Sn,_n){ho!=null&&ho.get(_n)===Fe&&st.push([_n,Sn])}),re.forEach(function(Sn,_n){var Tn=Sn.changeDescriptions,ir=Sn.durations,Bt=Sn.interactions,Fi=Sn.maxActualDuration,Ar=Sn.priorityLevel,mr=Sn.commitTime,Y=[];Bt.forEach(function(Di){vt.has(Di.id)||vt.set(Di.id,Di),Y.push(Di.id);var ru=Qt.get(Di.id);ru!=null?ru.push(_n):Qt.set(Di.id,[_n])});for(var ri=[],ii=[],Vr=0;Vr1?Kn.set(Tn,ir-1):Kn.delete(Tn),ni.delete(Sn)}(tu),ti(Fe,!1))}else e0(tu,Fe),Jr(Fe,null,!1,!1);if(Pu&&st){var On=_s.get(tu);On!=null?On.push(rl):_s.set(tu,[rl])}yu(),Io&&B.emit("traceUpdates",bo),tu=-1},handleCommitFiberUnmount:function(ae){ti(ae,!1)},inspectElement:function(ae,re){if(zi(ae)){if(re!=null){A0(re);var Fe=null;return re[0]==="hooks"&&(Fe="hooks"),{id:ae,type:"hydrated-path",path:re,value:Ri(Uu(Xi,re),Hi(null,Fe),re)}}return{id:ae,type:"no-change"}}if(Hs=!1,Xi!==null&&Xi.id===ae||(R0={}),(Xi=sa(ae))===null)return{id:ae,type:"not-found"};re!=null&&A0(re),function(st){var vt=st.hooks,Qt=st.id,On=st.props,Sn=Z0.get(Qt);if(Sn!=null){var _n=Sn.elementType,Tn=Sn.stateNode,ir=Sn.tag,Bt=Sn.type;switch(ir){case Ct:case Cr:case An:$.$r=Tn;break;case nt:$.$r={hooks:vt,props:On,type:Bt};break;case rn:$.$r={props:On,type:Bt.render};break;case Nr:case Lr:$.$r={props:On,type:_n!=null&&_n.type!=null?_n.type:Bt};break;default:$.$r=null}}else console.warn('Could not find Fiber with id "'.concat(Qt,'"'))}(Xi);var Ae=Wt({},Xi);return Ae.context=Ri(Ae.context,Hi("context",null)),Ae.hooks=Ri(Ae.hooks,Hi("hooks","hooks")),Ae.props=Ri(Ae.props,Hi("props",null)),Ae.state=Ri(Ae.state,Hi("state",null)),{id:ae,type:"full-data",value:Ae}},logElementToConsole:function(ae){var re=zi(ae)?Xi:sa(ae);if(re!==null){var Fe=typeof console.groupCollapsed=="function";Fe&&console.groupCollapsed("[Click to expand] %c<".concat(re.displayName||"Component"," />"),"color: var(--dom-tag-name-color); font-weight: normal;"),re.props!==null&&console.log("Props:",re.props),re.state!==null&&console.log("State:",re.state),re.hooks!==null&&console.log("Hooks:",re.hooks);var Ae=Tl(ae);Ae!==null&&console.log("Nodes:",Ae),re.source!==null&&console.log("Location:",re.source),(window.chrome||/firefox/i.test(navigator.userAgent))&&console.log("Right-click any value to save it as a global variable for further inspection."),Fe&&console.groupEnd()}else console.warn('Could not find Fiber with id "'.concat(ae,'"'))},prepareViewAttributeSource:function(ae,re){zi(ae)&&(window.$attribute=Uu(Xi,re))},prepareViewElementSource:function(ae){var re=Z0.get(ae);if(re!=null){var Fe=re.elementType,Ae=re.tag,st=re.type;switch(Ae){case Ct:case Cr:case An:case nt:$.$type=st;break;case rn:$.$type=st.render;break;case Nr:case Lr:$.$type=Fe!=null&&Fe.type!=null?Fe.type:st;break;default:$.$type=null}}else console.warn('Could not find Fiber with id "'.concat(ae,'"'))},overrideSuspense:function(ae,re){if(typeof Fo!="function"||typeof nl!="function")throw new Error("Expected overrideSuspense() to not get called for earlier React versions.");re?($u.add(ae),$u.size===1&&Fo(Es)):($u.delete(ae),$u.size===0&&Fo(gf));var Fe=Z0.get(ae);Fe!=null&&nl(Fe)},overrideValueAtPath:function(ae,re,Fe,Ae,st){var vt=Vu(re);if(vt!==null){var Qt=vt.stateNode;switch(ae){case"context":switch(Ae=Ae.slice(1),vt.tag){case Ct:Ae.length===0?Qt.context=st:Ao(Qt.context,Ae,st),Qt.forceUpdate()}break;case"hooks":typeof au=="function"&&au(vt,Fe,Ae,st);break;case"props":switch(vt.tag){case Ct:vt.pendingProps=bn(Qt.props,Ae,st),Qt.forceUpdate();break;default:typeof J0=="function"&&J0(vt,Ae,st)}break;case"state":switch(vt.tag){case Ct:Ao(Qt.state,Ae,st),Qt.forceUpdate()}}}},renamePath:function(ae,re,Fe,Ae,st){var vt=Vu(re);if(vt!==null){var Qt=vt.stateNode;switch(ae){case"context":switch(Ae=Ae.slice(1),st=st.slice(1),vt.tag){case Ct:Ae.length===0||Xr(Qt.context,Ae,st),Qt.forceUpdate()}break;case"hooks":typeof T0=="function"&&T0(vt,Fe,Ae,st);break;case"props":Qt===null?typeof _i=="function"&&_i(vt,Ae,st):(vt.pendingProps=en(Qt.props,Ae,st),Qt.forceUpdate());break;case"state":Xr(Qt.state,Ae,st),Qt.forceUpdate()}}},renderer:G,setTraceUpdatesEnabled:function(ae){Io=ae},setTrackedPath:Li,startProfiling:aa,stopProfiling:function(){Pu=!1,es=!1},storeAsGlobal:function(ae,re,Fe){if(zi(ae)){var Ae=Uu(Xi,re),st="$reactTemp".concat(Fe);window[st]=Ae,console.log(st),console.log(Ae)}},updateComponentFilters:function(ae){if(Pu)throw Error("Cannot modify filter preferences while profiling");B.getFiberRoots(z).forEach(function(re){tu=ei(Ei(re.current)),Wu(re.current),ti(re.current,!1),tu=-1}),gs(ae),Kn.clear(),B.getFiberRoots(z).forEach(function(re){e0(tu=ei(Ei(re.current)),re.current),Jr(re.current,null,!1,!1),yu(re),tu=-1})}}}var $n;function el(B){return(el=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(B)}function ao(B,z,G){if($n===void 0)try{throw Error()}catch(Te){var $=Te.stack.trim().match(/\n( *(at )?)/);$n=$&&$[1]||""}return` -`+$n+B}var I0=!1;function wl(B,z,G){if(!B||I0)return"";var $,Te=Error.prepareStackTrace;Error.prepareStackTrace=void 0,I0=!0;var ge=G.current;G.current=null;try{if(z){var Re=function(){throw Error()};if(Object.defineProperty(Re.prototype,"props",{set:function(){throw Error()}}),(typeof Reflect=="undefined"?"undefined":el(Reflect))==="object"&&Reflect.construct){try{Reflect.construct(Re,[])}catch(He){$=He}Reflect.construct(B,[],Re)}else{try{Re.call()}catch(He){$=He}B.call(Re.prototype)}}else{try{throw Error()}catch(He){$=He}B()}}catch(He){if(He&&$&&typeof He.stack=="string"){for(var Z=He.stack.split(` -`),ke=$.stack.split(` -`),Qe=Z.length-1,ht=ke.length-1;Qe>=1&&ht>=0&&Z[Qe]!==ke[ht];)ht--;for(;Qe>=1&&ht>=0;Qe--,ht--)if(Z[Qe]!==ke[ht]){if(Qe!==1||ht!==1)do if(Qe--,--ht<0||Z[Qe]!==ke[ht])return` -`+Z[Qe].replace(" at new "," at ");while(Qe>=1&&ht>=0);break}}}finally{I0=!1,Error.prepareStackTrace=Te,G.current=ge}var ue=B?B.displayName||B.name:"";return ue?ao(ue):""}function No(B,z,G,$){return wl(B,!1,$)}function wt(B,z,G){var $=B.HostComponent,Te=B.LazyComponent,ge=B.SuspenseComponent,Re=B.SuspenseListComponent,Z=B.FunctionComponent,ke=B.IndeterminateComponent,Qe=B.SimpleMemoComponent,ht=B.ForwardRef,ue=B.Block,He=B.ClassComponent;switch(z.tag){case $:return ao(z.type);case Te:return ao("Lazy");case ge:return ao("Suspense");case Re:return ao("SuspenseList");case Z:case ke:case Qe:return No(z.type,0,0,G);case ht:return No(z.type.render,0,0,G);case ue:return No(z.type._render,0,0,G);case He:return function(nt,Ct,Mt,It){return wl(nt,!0,It)}(z.type,0,0,G);default:return""}}function bt(B,z,G){try{var $="",Te=z;do $+=wt(B,Te,G),Te=Te.return;while(Te);return $}catch(ge){return` -Error generating stack: `+ge.message+` -`+ge.stack}}function Hn(B,z){var G;if(typeof Symbol=="undefined"||B[Symbol.iterator]==null){if(Array.isArray(B)||(G=function(ke,Qe){if(!!ke){if(typeof ke=="string")return qr(ke,Qe);var ht=Object.prototype.toString.call(ke).slice(8,-1);if(ht==="Object"&&ke.constructor&&(ht=ke.constructor.name),ht==="Map"||ht==="Set")return Array.from(ke);if(ht==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ht))return qr(ke,Qe)}}(B))||z&&B&&typeof B.length=="number"){G&&(B=G);var $=0,Te=function(){};return{s:Te,n:function(){return $>=B.length?{done:!0}:{done:!1,value:B[$++]}},e:function(ke){throw ke},f:Te}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ge,Re=!0,Z=!1;return{s:function(){G=B[Symbol.iterator]()},n:function(){var ke=G.next();return Re=ke.done,ke},e:function(ke){Z=!0,ge=ke},f:function(){try{Re||G.return==null||G.return()}finally{if(Z)throw ge}}}}function qr(B,z){(z==null||z>B.length)&&(z=B.length);for(var G=0,$=new Array(z);G0?Qe[Qe.length-1]:null,He=ue!==null&&(Qr.test(ue)||Ou.test(ue));if(!He){var nt,Ct=Hn(h0.values());try{for(Ct.s();!(nt=Ct.n()).done;){var Mt=nt.value,It=Mt.currentDispatcherRef,sn=Mt.getCurrentFiber,rn=Mt.workTagMap,Lt=sn();if(Lt!=null){var Dn=bt(rn,Lt,It);Dn!==""&&Qe.push(Dn);break}}}catch(dr){Ct.e(dr)}finally{Ct.f()}}}catch(dr){}ge.apply(void 0,Qe)};Re.__REACT_DEVTOOLS_ORIGINAL_METHOD__=ge,Ni[Te]=Re}catch(Z){}})}}function ju(B){return(ju=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(B)}function vs(B,z){for(var G=0;GB.length)&&(z=B.length);for(var G=0,$=new Array(z);G1?Z-1:0),Qe=1;Qe0?ue[ue.length-1]:0),ue.push(un),Z.set($e,Qe(Pt._topLevelWrapper));try{var fn=it.apply(this,Dt);return ue.pop(),fn}catch(wr){throw ue=[],wr}finally{if(ue.length===0){var Jn=Z.get($e);if(Jn===void 0)throw new Error("Expected to find root ID.");dr(Jn)}}},performUpdateIfNecessary:function(it,Dt){var $e=Dt[0];if(S0($e)===9)return it.apply(this,Dt);var Pt=Qe($e);ue.push(Pt);var un=Qn($e);try{var fn=it.apply(this,Dt),Jn=Qn($e);return ht(un,Jn)||Ct($e,Pt,Jn),ue.pop(),fn}catch(au){throw ue=[],au}finally{if(ue.length===0){var wr=Z.get($e);if(wr===void 0)throw new Error("Expected to find root ID.");dr(wr)}}},receiveComponent:function(it,Dt){var $e=Dt[0];if(S0($e)===9)return it.apply(this,Dt);var Pt=Qe($e);ue.push(Pt);var un=Qn($e);try{var fn=it.apply(this,Dt),Jn=Qn($e);return ht(un,Jn)||Ct($e,Pt,Jn),ue.pop(),fn}catch(au){throw ue=[],au}finally{if(ue.length===0){var wr=Z.get($e);if(wr===void 0)throw new Error("Expected to find root ID.");dr(wr)}}},unmountComponent:function(it,Dt){var $e=Dt[0];if(S0($e)===9)return it.apply(this,Dt);var Pt=Qe($e);ue.push(Pt);try{var un=it.apply(this,Dt);return ue.pop(),function(Jn,wr){rn.push(wr),ge.delete(wr)}(0,Pt),un}catch(Jn){throw ue=[],Jn}finally{if(ue.length===0){var fn=Z.get($e);if(fn===void 0)throw new Error("Expected to find root ID.");dr(fn)}}}}));var It=[],sn=new Map,rn=[],Lt=0,Dn=null;function dr(it){if(It.length!==0||rn.length!==0||Dn!==null){var Dt=rn.length+(Dn===null?0:1),$e=new Array(3+Lt+(Dt>0?2+Dt:0)+It.length),Pt=0;if($e[Pt++]=z,$e[Pt++]=it,$e[Pt++]=Lt,sn.forEach(function(Jn,wr){$e[Pt++]=wr.length;for(var au=G0(wr),Nu=0;Nu0){$e[Pt++]=2,$e[Pt++]=Dt;for(var un=0;un"),"color: var(--dom-tag-name-color); font-weight: normal;"),Dt.props!==null&&console.log("Props:",Dt.props),Dt.state!==null&&console.log("State:",Dt.state),Dt.context!==null&&console.log("Context:",Dt.context);var Pt=Te(it);Pt!==null&&console.log("Node:",Pt),(window.chrome||/firefox/i.test(navigator.userAgent))&&console.log("Right-click any value to save it as a global variable for further inspection."),$e&&console.groupEnd()}else console.warn('Could not find element with id "'.concat(it,'"'))},overrideSuspense:function(){throw new Error("overrideSuspense not supported by this renderer")},overrideValueAtPath:function(it,Dt,$e,Pt,un){var fn=ge.get(Dt);if(fn!=null){var Jn=fn._instance;if(Jn!=null)switch(it){case"context":Ao(Jn.context,Pt,un),m0(Jn);break;case"hooks":throw new Error("Hooks not supported by this renderer");case"props":var wr=fn._currentElement;fn._currentElement=Q0(Q0({},wr),{},{props:bn(wr.props,Pt,un)}),m0(Jn);break;case"state":Ao(Jn.state,Pt,un),m0(Jn)}}},renamePath:function(it,Dt,$e,Pt,un){var fn=ge.get(Dt);if(fn!=null){var Jn=fn._instance;if(Jn!=null)switch(it){case"context":Xr(Jn.context,Pt,un),m0(Jn);break;case"hooks":throw new Error("Hooks not supported by this renderer");case"props":var wr=fn._currentElement;fn._currentElement=Q0(Q0({},wr),{},{props:en(wr.props,Pt,un)}),m0(Jn);break;case"state":Xr(Jn.state,Pt,un),m0(Jn)}}},prepareViewAttributeSource:function(it,Dt){var $e=Lr(it);$e!==null&&(window.$attribute=Uu($e,Dt))},prepareViewElementSource:function(it){var Dt=ge.get(it);if(Dt!=null){var $e=Dt._currentElement;$e!=null?$.$type=$e.type:console.warn('Could not find element with id "'.concat(it,'"'))}else console.warn('Could not find instance with id "'.concat(it,'"'))},renderer:G,setTraceUpdatesEnabled:function(it){},setTrackedPath:function(it){},startProfiling:function(){},stopProfiling:function(){},storeAsGlobal:function(it,Dt,$e){var Pt=Lr(it);if(Pt!==null){var un=Uu(Pt,Dt),fn="$reactTemp".concat($e);window[fn]=un,console.log(fn),console.log(un)}},updateComponentFilters:function(it){}}}function fi(B,z){var G=!1,$={bottom:0,left:0,right:0,top:0},Te=z[B];if(Te!=null){for(var ge=0,Re=Object.keys($);ge0?"development":"production";var It=Function.prototype.toString;if(Mt.Mount&&Mt.Mount._renderNewRootComponent){var sn=It.call(Mt.Mount._renderNewRootComponent);return sn.indexOf("function")!==0?"production":sn.indexOf("storedMeasure")!==-1?"development":sn.indexOf("should be a pure function")!==-1?sn.indexOf("NODE_ENV")!==-1||sn.indexOf("development")!==-1||sn.indexOf("true")!==-1?"development":sn.indexOf("nextElement")!==-1||sn.indexOf("nextComponent")!==-1?"unminified":"development":sn.indexOf("nextElement")!==-1||sn.indexOf("nextComponent")!==-1?"unminified":"outdated"}}catch(rn){}return"production"}(ke);try{var ue=window.__REACT_DEVTOOLS_APPEND_COMPONENT_STACK__!==!1,He=window.__REACT_DEVTOOLS_BREAK_ON_CONSOLE_ERRORS__===!0;(ue||He)&&(fo(ke),Jl({appendComponentStack:ue,breakOnConsoleErrors:He}))}catch(Mt){}var nt=B.__REACT_DEVTOOLS_ATTACH__;if(typeof nt=="function"){var Ct=nt(Z,Qe,ke,B);Z.rendererInterfaces.set(Qe,Ct)}return Z.emit("renderer",{id:Qe,renderer:ke,reactBuildType:ht}),Qe},on:function(ke,Qe){ge[ke]||(ge[ke]=[]),ge[ke].push(Qe)},off:function(ke,Qe){if(ge[ke]){var ht=ge[ke].indexOf(Qe);ht!==-1&&ge[ke].splice(ht,1),ge[ke].length||delete ge[ke]}},sub:function(ke,Qe){return Z.on(ke,Qe),function(){return Z.off(ke,Qe)}},supportsFiber:!0,checkDCE:function(ke){try{Function.prototype.toString.call(ke).indexOf("^_^")>-1&&(G=!0,setTimeout(function(){throw new Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")}))}catch(Qe){}},onCommitFiberUnmount:function(ke,Qe){var ht=Te.get(ke);ht!=null&&ht.handleCommitFiberUnmount(Qe)},onCommitFiberRoot:function(ke,Qe,ht){var ue=Z.getFiberRoots(ke),He=Qe.current,nt=ue.has(Qe),Ct=He.memoizedState==null||He.memoizedState.element==null;nt||Ct?nt&&Ct&&ue.delete(Qe):ue.add(Qe);var Mt=Te.get(ke);Mt!=null&&Mt.handleCommitFiberRoot(Qe,ht)}};Object.defineProperty(B,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!1,enumerable:!1,get:function(){return Z}})})(window);var y0=window.__REACT_DEVTOOLS_GLOBAL_HOOK__,Us=[{type:1,value:7,isEnabled:!0}];function ji(B){if(y0!=null){var z=B||{},G=z.host,$=G===void 0?"localhost":G,Te=z.nativeStyleEditorValidAttributes,ge=z.useHttps,Re=ge!==void 0&&ge,Z=z.port,ke=Z===void 0?8097:Z,Qe=z.websocket,ht=z.resolveRNStyle,ue=ht===void 0?null:ht,He=z.isAppActive,nt=Re?"wss":"ws",Ct=null;if((He===void 0?function(){return!0}:He)()){var Mt=null,It=[],sn=nt+"://"+$+":"+ke,rn=Qe||new window.WebSocket(sn);rn.onclose=function(){Mt!==null&&Mt.emit("shutdown"),Lt()},rn.onerror=function(){Lt()},rn.onmessage=function(Dn){var dr;try{if(typeof Dn.data!="string")throw Error();dr=JSON.parse(Dn.data)}catch(er){return void console.error("[React DevTools] Failed to parse JSON: "+Dn.data)}It.forEach(function(er){try{er(dr)}catch(Cr){throw console.log("[React DevTools] Error calling listener",dr),console.log("error:",Cr),Cr}})},rn.onopen=function(){(Mt=new co({listen:function(An){return It.push(An),function(){var Nr=It.indexOf(An);Nr>=0&&It.splice(Nr,1)}},send:function(An,Nr,g0){rn.readyState===rn.OPEN?rn.send(JSON.stringify({event:An,payload:Nr})):(Mt!==null&&Mt.shutdown(),Lt())}})).addListener("inspectElement",function(An){var Nr=An.id,g0=An.rendererID,Lr=Dn.rendererInterfaces[g0];if(Lr!=null){var it=Lr.findNativeNodesForFiberID(Nr);it!=null&&it[0]!=null&&Dn.emit("showNativeHighlight",it[0])}}),Mt.addListener("updateComponentFilters",function(An){Us=An}),window.__REACT_DEVTOOLS_COMPONENT_FILTERS__==null&&Mt.send("overrideComponentFilters",Us);var Dn=new Yn(Mt);if(Dn.addListener("shutdown",function(){y0.emit("shutdown")}),function(An,Nr,g0){if(An==null)return function(){};var Lr=[An.sub("renderer-attached",function($e){var Pt=$e.id,un=($e.renderer,$e.rendererInterface);Nr.setRendererInterface(Pt,un),un.flushInitialOperations()}),An.sub("unsupported-renderer-version",function($e){Nr.onUnsupportedRenderer($e)}),An.sub("operations",Nr.onHookOperations),An.sub("traceUpdates",Nr.onTraceUpdates)],it=function($e,Pt){var un=An.rendererInterfaces.get($e);un==null&&(typeof Pt.findFiberByHostInstance=="function"?un=Is(An,$e,Pt,g0):Pt.ComponentTree&&(un=ac(An,$e,Pt,g0)),un!=null&&An.rendererInterfaces.set($e,un)),un!=null?An.emit("renderer-attached",{id:$e,renderer:Pt,rendererInterface:un}):An.emit("unsupported-renderer-version",$e)};An.renderers.forEach(function($e,Pt){it(Pt,$e)}),Lr.push(An.sub("renderer",function($e){var Pt=$e.id,un=$e.renderer;it(Pt,un)})),An.emit("react-devtools",Nr),An.reactDevtoolsAgent=Nr;var Dt=function(){Lr.forEach(function($e){return $e()}),An.rendererInterfaces.forEach(function($e){$e.cleanup()}),An.reactDevtoolsAgent=null};Nr.addListener("shutdown",Dt),Lr.push(function(){Nr.removeListener("shutdown",Dt)})}(y0,Dn,window),ue!=null||y0.resolveRNStyle!=null)oa(Mt,Dn,ue||y0.resolveRNStyle,Te||y0.nativeStyleEditorValidAttributes||null);else{var dr,er,Cr=function(){Mt!==null&&oa(Mt,Dn,dr,er)};y0.hasOwnProperty("resolveRNStyle")||Object.defineProperty(y0,"resolveRNStyle",{enumerable:!1,get:function(){return dr},set:function(An){dr=An,Cr()}}),y0.hasOwnProperty("nativeStyleEditorValidAttributes")||Object.defineProperty(y0,"nativeStyleEditorValidAttributes",{enumerable:!1,get:function(){return er},set:function(An){er=An,Cr()}})}}}else Lt()}function Lt(){Ct===null&&(Ct=setTimeout(function(){return ji(B)},2e3))}}}])})});var kC=tt(MC=>{"use strict";Object.defineProperty(MC,"__esModule",{value:!0});AC();var Ob=OC();Ob.connectToDevTools()});var IC=tt(ug=>{"use strict";var NC=ug&&ug.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ug,"__esModule",{value:!0});var LC=b_(),Mb=NC(IS()),FC=NC($p()),ps=bD();process.env.DEV==="true"&&kC();var PC=i=>{i==null||i.unsetMeasureFunc(),i==null||i.freeRecursive()};ug.default=Mb.default({schedulePassiveEffects:LC.unstable_scheduleCallback,cancelPassiveEffects:LC.unstable_cancelCallback,now:Date.now,getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>{},resetAfterCommit:i=>{if(i.isStaticDirty){i.isStaticDirty=!1,typeof i.onImmediateRender=="function"&&i.onImmediateRender();return}typeof i.onRender=="function"&&i.onRender()},getChildHostContext:(i,o)=>{let a=i.isInsideText,p=o==="ink-text"||o==="ink-virtual-text";return a===p?i:{isInsideText:p}},shouldSetTextContent:()=>!1,createInstance:(i,o,a,p)=>{if(p.isInsideText&&i==="ink-box")throw new Error(" can\u2019t be nested inside component");let _=i==="ink-text"&&p.isInsideText?"ink-virtual-text":i,t=ps.createNode(_);for(let[k,L]of Object.entries(o))k!=="children"&&(k==="style"?ps.setStyle(t,L):k==="internal_transform"?t.internal_transform=L:k==="internal_static"?t.internal_static=!0:ps.setAttribute(t,k,L));return t},createTextInstance:(i,o,a)=>{if(!a.isInsideText)throw new Error(`Text string "${i}" must be rendered inside component`);return ps.createTextNode(i)},resetTextContent:()=>{},hideTextInstance:i=>{ps.setTextNodeValue(i,"")},unhideTextInstance:(i,o)=>{ps.setTextNodeValue(i,o)},getPublicInstance:i=>i,hideInstance:i=>{var o;(o=i.yogaNode)===null||o===void 0||o.setDisplay(FC.default.DISPLAY_NONE)},unhideInstance:i=>{var o;(o=i.yogaNode)===null||o===void 0||o.setDisplay(FC.default.DISPLAY_FLEX)},appendInitialChild:ps.appendChildNode,appendChild:ps.appendChildNode,insertBefore:ps.insertBeforeNode,finalizeInitialChildren:(i,o,a,p)=>(i.internal_static&&(p.isStaticDirty=!0,p.staticNode=i),!1),supportsMutation:!0,appendChildToContainer:ps.appendChildNode,insertInContainerBefore:ps.insertBeforeNode,removeChildFromContainer:(i,o)=>{ps.removeChildNode(i,o),PC(o.yogaNode)},prepareUpdate:(i,o,a,p,_)=>{i.internal_static&&(_.isStaticDirty=!0);let t={},k=Object.keys(p);for(let L of k)if(p[L]!==a[L]){if(L==="style"&&typeof p.style=="object"&&typeof a.style=="object"){let C=p.style,U=a.style,H=Object.keys(C);for(let W of H){if(W==="borderStyle"||W==="borderColor"){if(typeof t.style!="object"){let ne={};t.style=ne}t.style.borderStyle=C.borderStyle,t.style.borderColor=C.borderColor}if(C[W]!==U[W]){if(typeof t.style!="object"){let ne={};t.style=ne}t.style[W]=C[W]}}continue}t[L]=p[L]}return t},commitUpdate:(i,o)=>{for(let[a,p]of Object.entries(o))a!=="children"&&(a==="style"?ps.setStyle(i,p):a==="internal_transform"?i.internal_transform=p:a==="internal_static"?i.internal_static=!0:ps.setAttribute(i,a,p))},commitTextUpdate:(i,o,a)=>{ps.setTextNodeValue(i,a)},removeChild:(i,o)=>{ps.removeChildNode(i,o),PC(o.yogaNode)}})});var BC=tt((pq,bC)=>{"use strict";bC.exports=(i,o=1,a)=>{if(a=Ht({indent:" ",includeEmptyLines:!1},a),typeof i!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof i}\``);if(typeof o!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof o}\``);if(typeof a.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof a.indent}\``);if(o===0)return i;let p=a.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return i.replace(p,a.indent.repeat(o))}});var UC=tt(og=>{"use strict";var kb=og&&og.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(og,"__esModule",{value:!0});var $_=kb($p());og.default=i=>i.getComputedWidth()-i.getComputedPadding($_.default.EDGE_LEFT)-i.getComputedPadding($_.default.EDGE_RIGHT)-i.getComputedBorder($_.default.EDGE_LEFT)-i.getComputedBorder($_.default.EDGE_RIGHT)});var zC=tt((vq,jC)=>{jC.exports={single:{topLeft:"\u250C",topRight:"\u2510",bottomRight:"\u2518",bottomLeft:"\u2514",vertical:"\u2502",horizontal:"\u2500"},double:{topLeft:"\u2554",topRight:"\u2557",bottomRight:"\u255D",bottomLeft:"\u255A",vertical:"\u2551",horizontal:"\u2550"},round:{topLeft:"\u256D",topRight:"\u256E",bottomRight:"\u256F",bottomLeft:"\u2570",vertical:"\u2502",horizontal:"\u2500"},bold:{topLeft:"\u250F",topRight:"\u2513",bottomRight:"\u251B",bottomLeft:"\u2517",vertical:"\u2503",horizontal:"\u2501"},singleDouble:{topLeft:"\u2553",topRight:"\u2556",bottomRight:"\u255C",bottomLeft:"\u2559",vertical:"\u2551",horizontal:"\u2500"},doubleSingle:{topLeft:"\u2552",topRight:"\u2555",bottomRight:"\u255B",bottomLeft:"\u2558",vertical:"\u2502",horizontal:"\u2550"},classic:{topLeft:"+",topRight:"+",bottomRight:"+",bottomLeft:"+",vertical:"|",horizontal:"-"}}});var qC=tt((mq,n3)=>{"use strict";var HC=zC();n3.exports=HC;n3.exports.default=HC});var VC=tt((yq,WC)=>{"use strict";WC.exports=(i,o=process.argv)=>{let a=i.startsWith("-")?"":i.length===1?"-":"--",p=o.indexOf(a+i),_=o.indexOf("--");return p!==-1&&(_===-1||p<_)}});var KC=tt((gq,GC)=>{"use strict";var Nb=require("os"),YC=require("tty"),df=VC(),{env:Ko}=process,v2;df("no-color")||df("no-colors")||df("color=false")||df("color=never")?v2=0:(df("color")||df("colors")||df("color=true")||df("color=always"))&&(v2=1);"FORCE_COLOR"in Ko&&(Ko.FORCE_COLOR==="true"?v2=1:Ko.FORCE_COLOR==="false"?v2=0:v2=Ko.FORCE_COLOR.length===0?1:Math.min(parseInt(Ko.FORCE_COLOR,10),3));function r3(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function i3(i,o){if(v2===0)return 0;if(df("color=16m")||df("color=full")||df("color=truecolor"))return 3;if(df("color=256"))return 2;if(i&&!o&&v2===void 0)return 0;let a=v2||0;if(Ko.TERM==="dumb")return a;if(process.platform==="win32"){let p=Nb.release().split(".");return Number(p[0])>=10&&Number(p[2])>=10586?Number(p[2])>=14931?3:2:1}if("CI"in Ko)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(p=>p in Ko)||Ko.CI_NAME==="codeship"?1:a;if("TEAMCITY_VERSION"in Ko)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ko.TEAMCITY_VERSION)?1:0;if("GITHUB_ACTIONS"in Ko)return 1;if(Ko.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ko){let p=parseInt((Ko.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ko.TERM_PROGRAM){case"iTerm.app":return p>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ko.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ko.TERM)||"COLORTERM"in Ko?1:a}function Lb(i){let o=i3(i,i&&i.isTTY);return r3(o)}GC.exports={supportsColor:Lb,stdout:r3(i3(!0,YC.isatty(1))),stderr:r3(i3(!0,YC.isatty(2)))}});var QC=tt((_q,XC)=>{"use strict";var Fb=(i,o,a)=>{let p=i.indexOf(o);if(p===-1)return i;let _=o.length,t=0,k="";do k+=i.substr(t,p-t)+o+a,t=p+_,p=i.indexOf(o,t);while(p!==-1);return k+=i.substr(t),k},Pb=(i,o,a,p)=>{let _=0,t="";do{let k=i[p-1]==="\r";t+=i.substr(_,(k?p-1:p)-_)+o+(k?`\r -`:` -`)+a,_=p+1,p=i.indexOf(` -`,_)}while(p!==-1);return t+=i.substr(_),t};XC.exports={stringReplaceAll:Fb,stringEncaseCRLFWithFirstIndex:Pb}});var t6=tt((Eq,JC)=>{"use strict";var Ib=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,ZC=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,bb=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Bb=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,Ub=new Map([["n",` -`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a","\x07"]]);function $C(i){let o=i[0]==="u",a=i[1]==="{";return o&&!a&&i.length===5||i[0]==="x"&&i.length===3?String.fromCharCode(parseInt(i.slice(1),16)):o&&a?String.fromCodePoint(parseInt(i.slice(2,-1),16)):Ub.get(i)||i}function jb(i,o){let a=[],p=o.trim().split(/\s*,\s*/g),_;for(let t of p){let k=Number(t);if(!Number.isNaN(k))a.push(k);else if(_=t.match(bb))a.push(_[2].replace(Bb,(L,O,C)=>O?$C(O):C));else throw new Error(`Invalid Chalk template style argument: ${t} (in style '${i}')`)}return a}function zb(i){ZC.lastIndex=0;let o=[],a;for(;(a=ZC.exec(i))!==null;){let p=a[1];if(a[2]){let _=jb(p,a[2]);o.push([p].concat(_))}else o.push([p])}return o}function e6(i,o){let a={};for(let _ of o)for(let t of _.styles)a[t[0]]=_.inverse?null:t.slice(1);let p=i;for(let[_,t]of Object.entries(a))if(!!Array.isArray(t)){if(!(_ in p))throw new Error(`Unknown Chalk style: ${_}`);p=t.length>0?p[_](...t):p[_]}return p}JC.exports=(i,o)=>{let a=[],p=[],_=[];if(o.replace(Ib,(t,k,L,O,C,U)=>{if(k)_.push($C(k));else if(O){let H=_.join("");_=[],p.push(a.length===0?H:e6(i,a)(H)),a.push({inverse:L,styles:zb(O)})}else if(C){if(a.length===0)throw new Error("Found extraneous } in Chalk template literal");p.push(e6(i,a)(_.join(""))),_=[],a.pop()}else _.push(U)}),p.push(_.join("")),a.length>0){let t=`Chalk template literal is missing ${a.length} closing bracket${a.length===1?"":"s"} (\`}\`)`;throw new Error(t)}return p.join("")}});var i4=tt((Dq,n6)=>{"use strict";var lg=H_(),{stdout:u3,stderr:o3}=KC(),{stringReplaceAll:Hb,stringEncaseCRLFWithFirstIndex:qb}=QC(),{isArray:e4}=Array,r6=["ansi","ansi","ansi256","ansi16m"],Qv=Object.create(null),Wb=(i,o={})=>{if(o.level&&!(Number.isInteger(o.level)&&o.level>=0&&o.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let a=u3?u3.level:0;i.level=o.level===void 0?a:o.level},i6=class{constructor(o){return u6(o)}},u6=i=>{let o={};return Wb(o,i),o.template=(...a)=>o6(o.template,...a),Object.setPrototypeOf(o,t4.prototype),Object.setPrototypeOf(o.template,o),o.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},o.template.Instance=i6,o.template};function t4(i){return u6(i)}for(let[i,o]of Object.entries(lg))Qv[i]={get(){let a=n4(this,l3(o.open,o.close,this._styler),this._isEmpty);return Object.defineProperty(this,i,{value:a}),a}};Qv.visible={get(){let i=n4(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:i}),i}};var l6=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let i of l6)Qv[i]={get(){let{level:o}=this;return function(...a){let p=l3(lg.color[r6[o]][i](...a),lg.color.close,this._styler);return n4(this,p,this._isEmpty)}}};for(let i of l6){let o="bg"+i[0].toUpperCase()+i.slice(1);Qv[o]={get(){let{level:a}=this;return function(...p){let _=l3(lg.bgColor[r6[a]][i](...p),lg.bgColor.close,this._styler);return n4(this,_,this._isEmpty)}}}}var Vb=Object.defineProperties(()=>{},Zr(Ht({},Qv),{level:{enumerable:!0,get(){return this._generator.level},set(i){this._generator.level=i}}})),l3=(i,o,a)=>{let p,_;return a===void 0?(p=i,_=o):(p=a.openAll+i,_=o+a.closeAll),{open:i,close:o,openAll:p,closeAll:_,parent:a}},n4=(i,o,a)=>{let p=(..._)=>e4(_[0])&&e4(_[0].raw)?s6(p,o6(p,..._)):s6(p,_.length===1?""+_[0]:_.join(" "));return Object.setPrototypeOf(p,Vb),p._generator=i,p._styler=o,p._isEmpty=a,p},s6=(i,o)=>{if(i.level<=0||!o)return i._isEmpty?"":o;let a=i._styler;if(a===void 0)return o;let{openAll:p,closeAll:_}=a;if(o.indexOf("")!==-1)for(;a!==void 0;)o=Hb(o,a.close,a.open),a=a.parent;let t=o.indexOf(` -`);return t!==-1&&(o=qb(o,_,p,t)),p+o+_},s3,o6=(i,...o)=>{let[a]=o;if(!e4(a)||!e4(a.raw))return o.join(" ");let p=o.slice(1),_=[a.raw[0]];for(let t=1;t{"use strict";var Gb=sg&&sg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(sg,"__esModule",{value:!0});var ag=Gb(i4()),Yb=/^(rgb|hsl|hsv|hwb)\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,Kb=/^(ansi|ansi256)\(\s?(\d+)\s?\)$/,u4=(i,o)=>o==="foreground"?i:"bg"+i[0].toUpperCase()+i.slice(1);sg.default=(i,o,a)=>{if(!o)return i;if(o in ag.default){let _=u4(o,a);return ag.default[_](i)}if(o.startsWith("#")){let _=u4("hex",a);return ag.default[_](o)(i)}if(o.startsWith("ansi")){let _=Kb.exec(o);if(!_)return i;let t=u4(_[1],a),k=Number(_[2]);return ag.default[t](k)(i)}if(o.startsWith("rgb")||o.startsWith("hsl")||o.startsWith("hsv")||o.startsWith("hwb")){let _=Yb.exec(o);if(!_)return i;let t=u4(_[1],a),k=Number(_[2]),L=Number(_[3]),O=Number(_[4]);return ag.default[t](k,L,O)(i)}return i}});var f6=tt(fg=>{"use strict";var a6=fg&&fg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(fg,"__esModule",{value:!0});var Xb=a6(qC()),f3=a6(a3());fg.default=(i,o,a,p)=>{if(typeof a.style.borderStyle=="string"){let _=a.yogaNode.getComputedWidth(),t=a.yogaNode.getComputedHeight(),k=a.style.borderColor,L=Xb.default[a.style.borderStyle],O=f3.default(L.topLeft+L.horizontal.repeat(_-2)+L.topRight,k,"foreground"),C=(f3.default(L.vertical,k,"foreground")+` -`).repeat(t-2),U=f3.default(L.bottomLeft+L.horizontal.repeat(_-2)+L.bottomRight,k,"foreground");p.write(i,o,O,{transformers:[]}),p.write(i,o+1,C,{transformers:[]}),p.write(i+_-1,o+1,C,{transformers:[]}),p.write(i,o+t-1,U,{transformers:[]})}}});var d6=tt(cg=>{"use strict";var rh=cg&&cg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(cg,"__esModule",{value:!0});var Qb=rh($p()),Jb=rh(CD()),Zb=rh(BC()),$b=rh(FD()),eB=rh(UC()),tB=rh(ID()),nB=rh(f6()),rB=(i,o)=>{var a;let p=(a=i.childNodes[0])===null||a===void 0?void 0:a.yogaNode;if(p){let _=p.getComputedLeft(),t=p.getComputedTop();o=` -`.repeat(t)+Zb.default(o,_)}return o},c6=(i,o,a)=>{var p;let{offsetX:_=0,offsetY:t=0,transformers:k=[],skipStaticElements:L}=a;if(L&&i.internal_static)return;let{yogaNode:O}=i;if(O){if(O.getDisplay()===Qb.default.DISPLAY_NONE)return;let C=_+O.getComputedLeft(),U=t+O.getComputedTop(),H=k;if(typeof i.internal_transform=="function"&&(H=[i.internal_transform,...k]),i.nodeName==="ink-text"){let W=tB.default(i);if(W.length>0){let ne=Jb.default(W),m=eB.default(O);if(ne>m){let he=(p=i.style.textWrap)!==null&&p!==void 0?p:"wrap";W=$b.default(W,m,he)}W=rB(i,W),o.write(C,U,W,{transformers:H})}return}if(i.nodeName==="ink-box"&&nB.default(C,U,i,o),i.nodeName==="ink-root"||i.nodeName==="ink-box")for(let W of i.childNodes)c6(W,o,{offsetX:C,offsetY:U,transformers:H,skipStaticElements:L})}};cg.default=c6});var h6=tt((Cq,p6)=>{"use strict";p6.exports=i=>{i=Object.assign({onlyFirst:!1},i);let o=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(o,i.onlyFirst?void 0:"g")}});var m6=tt((xq,c3)=>{"use strict";var iB=h6(),v6=i=>typeof i=="string"?i.replace(iB(),""):i;c3.exports=v6;c3.exports.default=v6});var _6=tt((Rq,y6)=>{"use strict";var g6="[\uD800-\uDBFF][\uDC00-\uDFFF]";y6.exports=i=>i&&i.exact?new RegExp(`^${g6}$`):new RegExp(g6,"g")});var D6=tt((Aq,d3)=>{"use strict";var uB=m6(),oB=_6(),E6=i=>uB(i).replace(oB()," ").length;d3.exports=E6;d3.exports.default=E6});var C6=tt(dg=>{"use strict";var w6=dg&&dg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(dg,"__esModule",{value:!0});var S6=w6(ND()),lB=w6(D6()),T6=class{constructor(o){this.writes=[];let{width:a,height:p}=o;this.width=a,this.height=p}write(o,a,p,_){let{transformers:t}=_;!p||this.writes.push({x:o,y:a,text:p,transformers:t})}get(){let o=[];for(let p=0;pp.trimRight()).join(` -`),height:o.length}}};dg.default=T6});var A6=tt(pg=>{"use strict";var p3=pg&&pg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(pg,"__esModule",{value:!0});var sB=p3($p()),x6=p3(d6()),R6=p3(C6());pg.default=(i,o)=>{var a;if(i.yogaNode.setWidth(o),i.yogaNode){i.yogaNode.calculateLayout(void 0,void 0,sB.default.DIRECTION_LTR);let p=new R6.default({width:i.yogaNode.getComputedWidth(),height:i.yogaNode.getComputedHeight()});x6.default(i,p,{skipStaticElements:!0});let _;((a=i.staticNode)===null||a===void 0?void 0:a.yogaNode)&&(_=new R6.default({width:i.staticNode.yogaNode.getComputedWidth(),height:i.staticNode.yogaNode.getComputedHeight()}),x6.default(i.staticNode,_,{skipStaticElements:!1}));let{output:t,height:k}=p.get();return{output:t,outputHeight:k,staticOutput:_?`${_.get().output} -`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var N6=tt((kq,O6)=>{"use strict";var M6=require("stream"),k6=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],h3={},aB=i=>{let o=new M6.PassThrough,a=new M6.PassThrough;o.write=_=>i("stdout",_),a.write=_=>i("stderr",_);let p=new console.Console(o,a);for(let _ of k6)h3[_]=console[_],console[_]=p[_];return()=>{for(let _ of k6)console[_]=h3[_];h3={}}};O6.exports=aB});var m3=tt(v3=>{"use strict";Object.defineProperty(v3,"__esModule",{value:!0});v3.default=new WeakMap});var g3=tt(y3=>{"use strict";Object.defineProperty(y3,"__esModule",{value:!0});var fB=Mi(),L6=fB.createContext({exit:()=>{}});L6.displayName="InternalAppContext";y3.default=L6});var E3=tt(_3=>{"use strict";Object.defineProperty(_3,"__esModule",{value:!0});var cB=Mi(),F6=cB.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});F6.displayName="InternalStdinContext";_3.default=F6});var w3=tt(D3=>{"use strict";Object.defineProperty(D3,"__esModule",{value:!0});var dB=Mi(),P6=dB.createContext({stdout:void 0,write:()=>{}});P6.displayName="InternalStdoutContext";D3.default=P6});var T3=tt(S3=>{"use strict";Object.defineProperty(S3,"__esModule",{value:!0});var pB=Mi(),I6=pB.createContext({stderr:void 0,write:()=>{}});I6.displayName="InternalStderrContext";S3.default=I6});var o4=tt(C3=>{"use strict";Object.defineProperty(C3,"__esModule",{value:!0});var hB=Mi(),b6=hB.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{}});b6.displayName="InternalFocusContext";C3.default=b6});var U6=tt((Bq,B6)=>{"use strict";var vB=/[|\\{}()[\]^$+*?.-]/g;B6.exports=i=>{if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(vB,"\\$&")}});var q6=tt((Uq,j6)=>{"use strict";var mB=U6(),z6=[].concat(require("module").builtinModules,"bootstrap_node","node").map(i=>new RegExp(`(?:\\(${i}\\.js:\\d+:\\d+\\)$|^\\s*at ${i}\\.js:\\d+:\\d+$)`));z6.push(/\(internal\/[^:]+:\d+:\d+\)$/,/\s*at internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var l4=class{constructor(o){o=Ht({ignoredPackages:[]},o),"internals"in o||(o.internals=l4.nodeInternals()),"cwd"in o||(o.cwd=process.cwd()),this._cwd=o.cwd.replace(/\\/g,"/"),this._internals=[].concat(o.internals,yB(o.ignoredPackages)),this._wrapCallSite=o.wrapCallSite||!1}static nodeInternals(){return[...z6]}clean(o,a=0){a=" ".repeat(a),Array.isArray(o)||(o=o.split(` -`)),!/^\s*at /.test(o[0])&&/^\s*at /.test(o[1])&&(o=o.slice(1));let p=!1,_=null,t=[];return o.forEach(k=>{if(k=k.replace(/\\/g,"/"),this._internals.some(O=>O.test(k)))return;let L=/^\s*at /.test(k);p?k=k.trimEnd().replace(/^(\s+)at /,"$1"):(k=k.trim(),L&&(k=k.slice(3))),k=k.replace(`${this._cwd}/`,""),k&&(L?(_&&(t.push(_),_=null),t.push(k)):(p=!0,_=k))}),t.map(k=>`${a}${k} -`).join("")}captureString(o,a=this.captureString){typeof o=="function"&&(a=o,o=Infinity);let{stackTraceLimit:p}=Error;o&&(Error.stackTraceLimit=o);let _={};Error.captureStackTrace(_,a);let{stack:t}=_;return Error.stackTraceLimit=p,this.clean(t)}capture(o,a=this.capture){typeof o=="function"&&(a=o,o=Infinity);let{prepareStackTrace:p,stackTraceLimit:_}=Error;Error.prepareStackTrace=(L,O)=>this._wrapCallSite?O.map(this._wrapCallSite):O,o&&(Error.stackTraceLimit=o);let t={};Error.captureStackTrace(t,a);let{stack:k}=t;return Object.assign(Error,{prepareStackTrace:p,stackTraceLimit:_}),k}at(o=this.at){let[a]=this.capture(1,o);if(!a)return{};let p={line:a.getLineNumber(),column:a.getColumnNumber()};H6(p,a.getFileName(),this._cwd),a.isConstructor()&&(p.constructor=!0),a.isEval()&&(p.evalOrigin=a.getEvalOrigin()),a.isNative()&&(p.native=!0);let _;try{_=a.getTypeName()}catch(L){}_&&_!=="Object"&&_!=="[object Object]"&&(p.type=_);let t=a.getFunctionName();t&&(p.function=t);let k=a.getMethodName();return k&&t!==k&&(p.method=k),p}parseLine(o){let a=o&&o.match(gB);if(!a)return null;let p=a[1]==="new",_=a[2],t=a[3],k=a[4],L=Number(a[5]),O=Number(a[6]),C=a[7],U=a[8],H=a[9],W=a[10]==="native",ne=a[11]===")",m,he={};if(U&&(he.line=Number(U)),H&&(he.column=Number(H)),ne&&C){let Ee=0;for(let ve=C.length-1;ve>0;ve--)if(C.charAt(ve)===")")Ee++;else if(C.charAt(ve)==="("&&C.charAt(ve-1)===" "&&(Ee--,Ee===-1&&C.charAt(ve-1)===" ")){let se=C.slice(0,ve-1);C=C.slice(ve+1),_+=` (${se}`;break}}if(_){let Ee=_.match(_B);Ee&&(_=Ee[1],m=Ee[2])}return H6(he,C,this._cwd),p&&(he.constructor=!0),t&&(he.evalOrigin=t,he.evalLine=L,he.evalColumn=O,he.evalFile=k&&k.replace(/\\/g,"/")),W&&(he.native=!0),_&&(he.function=_),m&&_!==m&&(he.method=m),he}};function H6(i,o,a){o&&(o=o.replace(/\\/g,"/"),o.startsWith(`${a}/`)&&(o=o.slice(a.length+1)),i.file=o)}function yB(i){if(i.length===0)return[];let o=i.map(a=>mB(a));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${o.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var gB=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),_B=/^(.*?) \[as (.*?)\]$/;j6.exports=l4});var V6=tt((jq,W6)=>{"use strict";W6.exports=(i,o)=>i.replace(/^\t+/gm,a=>" ".repeat(a.length*(o||2)))});var Y6=tt((zq,G6)=>{"use strict";var EB=V6(),DB=(i,o)=>{let a=[],p=i-o,_=i+o;for(let t=p;t<=_;t++)a.push(t);return a};G6.exports=(i,o,a)=>{if(typeof i!="string")throw new TypeError("Source code is missing.");if(!o||o<1)throw new TypeError("Line number must start from `1`.");if(i=EB(i).split(/\r?\n/),!(o>i.length))return a=Ht({around:3},a),DB(o,a.around).filter(p=>i[p-1]!==void 0).map(p=>({line:p,value:i[p-1]}))}});var s4=tt(nc=>{"use strict";var wB=nc&&nc.__createBinding||(Object.create?function(i,o,a,p){p===void 0&&(p=a),Object.defineProperty(i,p,{enumerable:!0,get:function(){return o[a]}})}:function(i,o,a,p){p===void 0&&(p=a),i[p]=o[a]}),SB=nc&&nc.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),TB=nc&&nc.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var a in i)a!=="default"&&Object.hasOwnProperty.call(i,a)&&wB(o,i,a);return SB(o,i),o},CB=nc&&nc.__rest||function(i,o){var a={};for(var p in i)Object.prototype.hasOwnProperty.call(i,p)&&o.indexOf(p)<0&&(a[p]=i[p]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _=0,p=Object.getOwnPropertySymbols(i);_{var{children:a}=i,p=CB(i,["children"]);let _=Object.assign(Object.assign({},p),{marginLeft:p.marginLeft||p.marginX||p.margin||0,marginRight:p.marginRight||p.marginX||p.margin||0,marginTop:p.marginTop||p.marginY||p.margin||0,marginBottom:p.marginBottom||p.marginY||p.margin||0,paddingLeft:p.paddingLeft||p.paddingX||p.padding||0,paddingRight:p.paddingRight||p.paddingX||p.padding||0,paddingTop:p.paddingTop||p.paddingY||p.padding||0,paddingBottom:p.paddingBottom||p.paddingY||p.padding||0});return K6.default.createElement("ink-box",{ref:o,style:_},a)});x3.displayName="Box";x3.defaultProps={flexDirection:"row",flexGrow:0,flexShrink:1};nc.default=x3});var O3=tt(hg=>{"use strict";var R3=hg&&hg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(hg,"__esModule",{value:!0});var xB=R3(Mi()),Jv=R3(i4()),X6=R3(a3()),A3=({color:i,backgroundColor:o,dimColor:a,bold:p,italic:_,underline:t,strikethrough:k,inverse:L,wrap:O,children:C})=>{if(C==null)return null;let U=H=>(a&&(H=Jv.default.dim(H)),i&&(H=X6.default(H,i,"foreground")),o&&(H=X6.default(H,o,"background")),p&&(H=Jv.default.bold(H)),_&&(H=Jv.default.italic(H)),t&&(H=Jv.default.underline(H)),k&&(H=Jv.default.strikethrough(H)),L&&(H=Jv.default.inverse(H)),H);return xB.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row",textWrap:O},internal_transform:U},C)};A3.displayName="Text";A3.defaultProps={dimColor:!1,bold:!1,italic:!1,underline:!1,strikethrough:!1,wrap:"wrap"};hg.default=A3});var $6=tt(rc=>{"use strict";var RB=rc&&rc.__createBinding||(Object.create?function(i,o,a,p){p===void 0&&(p=a),Object.defineProperty(i,p,{enumerable:!0,get:function(){return o[a]}})}:function(i,o,a,p){p===void 0&&(p=a),i[p]=o[a]}),AB=rc&&rc.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),OB=rc&&rc.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var a in i)a!=="default"&&Object.hasOwnProperty.call(i,a)&&RB(o,i,a);return AB(o,i),o},vg=rc&&rc.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(rc,"__esModule",{value:!0});var Q6=OB(require("fs")),Xo=vg(Mi()),J6=vg(q6()),MB=vg(Y6()),Z1=vg(s4()),zc=vg(O3()),Z6=new J6.default({cwd:process.cwd(),internals:J6.default.nodeInternals()}),kB=({error:i})=>{let o=i.stack?i.stack.split(` -`).slice(1):void 0,a=o?Z6.parseLine(o[0]):void 0,p,_=0;if((a==null?void 0:a.file)&&(a==null?void 0:a.line)&&Q6.existsSync(a.file)){let t=Q6.readFileSync(a.file,"utf8");if(p=MB.default(t,a.line),p)for(let{line:k}of p)_=Math.max(_,String(k).length)}return Xo.default.createElement(Z1.default,{flexDirection:"column",padding:1},Xo.default.createElement(Z1.default,null,Xo.default.createElement(zc.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),Xo.default.createElement(zc.default,null," ",i.message)),a&&Xo.default.createElement(Z1.default,{marginTop:1},Xo.default.createElement(zc.default,{dimColor:!0},a.file,":",a.line,":",a.column)),a&&p&&Xo.default.createElement(Z1.default,{marginTop:1,flexDirection:"column"},p.map(({line:t,value:k})=>Xo.default.createElement(Z1.default,{key:t},Xo.default.createElement(Z1.default,{width:_+1},Xo.default.createElement(zc.default,{dimColor:t!==a.line,backgroundColor:t===a.line?"red":void 0,color:t===a.line?"white":void 0},String(t).padStart(_," "),":")),Xo.default.createElement(zc.default,{key:t,backgroundColor:t===a.line?"red":void 0,color:t===a.line?"white":void 0}," "+k)))),i.stack&&Xo.default.createElement(Z1.default,{marginTop:1,flexDirection:"column"},i.stack.split(` -`).slice(1).map(t=>{let k=Z6.parseLine(t);return k?Xo.default.createElement(Z1.default,{key:t},Xo.default.createElement(zc.default,{dimColor:!0},"- "),Xo.default.createElement(zc.default,{dimColor:!0,bold:!0},k.function),Xo.default.createElement(zc.default,{dimColor:!0,color:"gray"}," ","(",k.file,":",k.line,":",k.column,")")):Xo.default.createElement(Z1.default,{key:t},Xo.default.createElement(zc.default,{dimColor:!0},"- "),Xo.default.createElement(zc.default,{dimColor:!0,bold:!0},t))})))};rc.default=kB});var tx=tt(ic=>{"use strict";var NB=ic&&ic.__createBinding||(Object.create?function(i,o,a,p){p===void 0&&(p=a),Object.defineProperty(i,p,{enumerable:!0,get:function(){return o[a]}})}:function(i,o,a,p){p===void 0&&(p=a),i[p]=o[a]}),LB=ic&&ic.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),FB=ic&&ic.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var a in i)a!=="default"&&Object.hasOwnProperty.call(i,a)&&NB(o,i,a);return LB(o,i),o},ih=ic&&ic.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ic,"__esModule",{value:!0});var uh=FB(Mi()),ex=ih(nD()),PB=ih(g3()),IB=ih(E3()),bB=ih(w3()),BB=ih(T3()),UB=ih(o4()),jB=ih($6()),zB=" ",HB="",qB="",M3=class extends uh.PureComponent{constructor(){super(...arguments);this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=o=>{let{stdin:a}=this.props;if(!this.isRawModeSupported())throw a===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default. -Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink. -Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(a.setEncoding("utf8"),o){this.rawModeEnabledCount===0&&(a.addListener("data",this.handleInput),a.resume(),a.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount==0&&(a.setRawMode(!1),a.removeListener("data",this.handleInput),a.pause())},this.handleInput=o=>{o===""&&this.props.exitOnCtrlC&&this.handleExit(),o===qB&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(o===zB&&this.focusNext(),o===HB&&this.focusPrevious())},this.handleExit=o=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(o)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focusNext=()=>{this.setState(o=>{let a=o.focusables[0].id;return{activeFocusId:this.findNextFocusable(o)||a}})},this.focusPrevious=()=>{this.setState(o=>{let a=o.focusables[o.focusables.length-1].id;return{activeFocusId:this.findPreviousFocusable(o)||a}})},this.addFocusable=(o,{autoFocus:a})=>{this.setState(p=>{let _=p.activeFocusId;return!_&&a&&(_=o),{activeFocusId:_,focusables:[...p.focusables,{id:o,isActive:!0}]}})},this.removeFocusable=o=>{this.setState(a=>({activeFocusId:a.activeFocusId===o?void 0:a.activeFocusId,focusables:a.focusables.filter(p=>p.id!==o)}))},this.activateFocusable=o=>{this.setState(a=>({focusables:a.focusables.map(p=>p.id!==o?p:{id:o,isActive:!0})}))},this.deactivateFocusable=o=>{this.setState(a=>({activeFocusId:a.activeFocusId===o?void 0:a.activeFocusId,focusables:a.focusables.map(p=>p.id!==o?p:{id:o,isActive:!1})}))},this.findNextFocusable=o=>{let a=o.focusables.findIndex(p=>p.id===o.activeFocusId);for(let p=a+1;p{let a=o.focusables.findIndex(p=>p.id===o.activeFocusId);for(let p=a-1;p>=0;p--)if(o.focusables[p].isActive)return o.focusables[p].id}}static getDerivedStateFromError(o){return{error:o}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return uh.default.createElement(PB.default.Provider,{value:{exit:this.handleExit}},uh.default.createElement(IB.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},uh.default.createElement(bB.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},uh.default.createElement(BB.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},uh.default.createElement(UB.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious}},this.state.error?uh.default.createElement(jB.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){ex.default.hide(this.props.stdout)}componentWillUnmount(){ex.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(o){this.handleExit(o)}};ic.default=M3;M3.displayName="InternalApp"});var ux=tt(uc=>{"use strict";var WB=uc&&uc.__createBinding||(Object.create?function(i,o,a,p){p===void 0&&(p=a),Object.defineProperty(i,p,{enumerable:!0,get:function(){return o[a]}})}:function(i,o,a,p){p===void 0&&(p=a),i[p]=o[a]}),VB=uc&&uc.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),GB=uc&&uc.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var a in i)a!=="default"&&Object.hasOwnProperty.call(i,a)&&WB(o,i,a);return VB(o,i),o},oc=uc&&uc.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(uc,"__esModule",{value:!0});var YB=oc(Mi()),nx=Z8(),KB=oc(dS()),XB=oc(QE()),QB=oc(_S()),JB=oc(DS()),a4=oc(IC()),ZB=oc(A6()),$B=oc(tD()),eU=oc(N6()),tU=GB(bD()),nU=oc(m3()),rU=oc(tx()),Zv=process.env.CI==="false"?!1:QB.default,rx=()=>{},ix=class{constructor(o){this.resolveExitPromise=()=>{},this.rejectExitPromise=()=>{},this.unsubscribeExit=()=>{},this.onRender=()=>{if(this.isUnmounted)return;let{output:a,outputHeight:p,staticOutput:_}=ZB.default(this.rootNode,this.options.stdout.columns||80),t=_&&_!==` -`;if(this.options.debug){t&&(this.fullStaticOutput+=_),this.options.stdout.write(this.fullStaticOutput+a);return}if(Zv){t&&this.options.stdout.write(_),this.lastOutput=a;return}if(t&&(this.fullStaticOutput+=_),p>=this.options.stdout.rows){this.options.stdout.write(XB.default.clearTerminal+this.fullStaticOutput+a),this.lastOutput=a;return}t&&(this.log.clear(),this.options.stdout.write(_),this.log(a)),!t&&a!==this.lastOutput&&this.throttledLog(a),this.lastOutput=a},JB.default(this),this.options=o,this.rootNode=tU.createNode("ink-root"),this.rootNode.onRender=o.debug?this.onRender:nx.throttle(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=KB.default.create(o.stdout),this.throttledLog=o.debug?this.log:nx.throttle(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=a4.default.createContainer(this.rootNode,!1,!1),this.unsubscribeExit=$B.default(this.unmount,{alwaysLast:!1}),process.env.DEV==="true"&&a4.default.injectIntoDevTools({bundleType:0,version:"16.13.1",rendererPackageName:"ink"}),o.patchConsole&&this.patchConsole(),Zv||(o.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{o.stdout.off("resize",this.onRender)})}render(o){let a=YB.default.createElement(rU.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},o);a4.default.updateContainer(a,this.container,null,rx)}writeToStdout(o){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(o+this.fullStaticOutput+this.lastOutput);return}if(Zv){this.options.stdout.write(o);return}this.log.clear(),this.options.stdout.write(o),this.log(this.lastOutput)}}writeToStderr(o){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(o),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(Zv){this.options.stderr.write(o);return}this.log.clear(),this.options.stderr.write(o),this.log(this.lastOutput)}}unmount(o){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole=="function"&&this.restoreConsole(),typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),Zv?this.options.stdout.write(this.lastOutput+` -`):this.options.debug||this.log.done(),this.isUnmounted=!0,a4.default.updateContainer(null,this.container,null,rx),nU.default.delete(this.options.stdout),o instanceof Error?this.rejectExitPromise(o):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((o,a)=>{this.resolveExitPromise=o,this.rejectExitPromise=a})),this.exitPromise}clear(){!Zv&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=eU.default((o,a)=>{o==="stdout"&&this.writeToStdout(a),o==="stderr"&&(a.startsWith("The above error occurred")||this.writeToStderr(a))}))}};uc.default=ix});var lx=tt(mg=>{"use strict";var ox=mg&&mg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(mg,"__esModule",{value:!0});var iU=ox(ux()),f4=ox(m3()),uU=require("stream"),sU=(i,o)=>{let a=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},oU(o)),p=lU(a.stdout,()=>new iU.default(a));return p.render(i),{rerender:p.render,unmount:()=>p.unmount(),waitUntilExit:p.waitUntilExit,cleanup:()=>f4.default.delete(a.stdout),clear:p.clear}};mg.default=sU;var oU=(i={})=>i instanceof uU.Stream?{stdout:i,stdin:process.stdin}:i,lU=(i,o)=>{let a;return f4.default.has(i)?a=f4.default.get(i):(a=o(),f4.default.set(i,a)),a}});var ax=tt($1=>{"use strict";var aU=$1&&$1.__createBinding||(Object.create?function(i,o,a,p){p===void 0&&(p=a),Object.defineProperty(i,p,{enumerable:!0,get:function(){return o[a]}})}:function(i,o,a,p){p===void 0&&(p=a),i[p]=o[a]}),fU=$1&&$1.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),cU=$1&&$1.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var a in i)a!=="default"&&Object.hasOwnProperty.call(i,a)&&aU(o,i,a);return fU(o,i),o};Object.defineProperty($1,"__esModule",{value:!0});var yg=cU(Mi()),sx=i=>{let{items:o,children:a,style:p}=i,[_,t]=yg.useState(0),k=yg.useMemo(()=>o.slice(_),[o,_]);yg.useLayoutEffect(()=>{t(o.length)},[o.length]);let L=k.map((C,U)=>a(C,_+U)),O=yg.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},p),[p]);return yg.default.createElement("ink-box",{internal_static:!0,style:O},L)};sx.displayName="Static";$1.default=sx});var cx=tt(gg=>{"use strict";var dU=gg&&gg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(gg,"__esModule",{value:!0});var pU=dU(Mi()),fx=({children:i,transform:o})=>i==null?null:pU.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:o},i);fx.displayName="Transform";gg.default=fx});var px=tt(_g=>{"use strict";var hU=_g&&_g.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(_g,"__esModule",{value:!0});var vU=hU(Mi()),dx=({count:i=1})=>vU.default.createElement("ink-text",null,` -`.repeat(i));dx.displayName="Newline";_g.default=dx});var mx=tt(Eg=>{"use strict";var hx=Eg&&Eg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Eg,"__esModule",{value:!0});var mU=hx(Mi()),yU=hx(s4()),vx=()=>mU.default.createElement(yU.default,{flexGrow:1});vx.displayName="Spacer";Eg.default=vx});var c4=tt(Dg=>{"use strict";var gU=Dg&&Dg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Dg,"__esModule",{value:!0});var _U=Mi(),EU=gU(E3()),DU=()=>_U.useContext(EU.default);Dg.default=DU});var gx=tt(wg=>{"use strict";var wU=wg&&wg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(wg,"__esModule",{value:!0});var yx=Mi(),SU=wU(c4()),TU=(i,o={})=>{let{stdin:a,setRawMode:p,internal_exitOnCtrlC:_}=SU.default();yx.useEffect(()=>{if(o.isActive!==!1)return p(!0),()=>{p(!1)}},[o.isActive,p]),yx.useEffect(()=>{if(o.isActive===!1)return;let t=k=>{let L=String(k),O={upArrow:L==="",downArrow:L==="",leftArrow:L==="",rightArrow:L==="",pageDown:L==="[6~",pageUp:L==="[5~",return:L==="\r",escape:L==="",ctrl:!1,shift:!1,tab:L===" "||L==="",backspace:L==="\b",delete:L==="\x7F"||L==="[3~",meta:!1};L<=""&&!O.return&&(L=String.fromCharCode(L.charCodeAt(0)+"a".charCodeAt(0)-1),O.ctrl=!0),L.startsWith("")&&(L=L.slice(1),O.meta=!0);let C=L>="A"&&L<="Z",U=L>="\u0410"&&L<="\u042F";L.length===1&&(C||U)&&(O.shift=!0),O.tab&&L==="[Z"&&(O.shift=!0),(O.tab||O.backspace||O.delete)&&(L=""),(!(L==="c"&&O.ctrl)||!_)&&i(L,O)};return a==null||a.on("data",t),()=>{a==null||a.off("data",t)}},[o.isActive,a,_,i])};wg.default=TU});var _x=tt(Sg=>{"use strict";var CU=Sg&&Sg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Sg,"__esModule",{value:!0});var xU=Mi(),RU=CU(g3()),AU=()=>xU.useContext(RU.default);Sg.default=AU});var Ex=tt(Tg=>{"use strict";var OU=Tg&&Tg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Tg,"__esModule",{value:!0});var MU=Mi(),kU=OU(w3()),NU=()=>MU.useContext(kU.default);Tg.default=NU});var Dx=tt(Cg=>{"use strict";var LU=Cg&&Cg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Cg,"__esModule",{value:!0});var FU=Mi(),PU=LU(T3()),IU=()=>FU.useContext(PU.default);Cg.default=IU});var Sx=tt(xg=>{"use strict";var wx=xg&&xg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(xg,"__esModule",{value:!0});var Rg=Mi(),bU=wx(o4()),BU=wx(c4()),UU=({isActive:i=!0,autoFocus:o=!1}={})=>{let{isRawModeSupported:a,setRawMode:p}=BU.default(),{activeId:_,add:t,remove:k,activate:L,deactivate:O}=Rg.useContext(bU.default),C=Rg.useMemo(()=>Math.random().toString().slice(2,7),[]);return Rg.useEffect(()=>(t(C,{autoFocus:o}),()=>{k(C)}),[C,o]),Rg.useEffect(()=>{i?L(C):O(C)},[i,C]),Rg.useEffect(()=>{if(!(!a||!i))return p(!0),()=>{p(!1)}},[i]),{isFocused:Boolean(C)&&_===C}};xg.default=UU});var Tx=tt(Ag=>{"use strict";var jU=Ag&&Ag.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ag,"__esModule",{value:!0});var zU=Mi(),HU=jU(o4()),qU=()=>{let i=zU.useContext(HU.default);return{enableFocus:i.enableFocus,disableFocus:i.disableFocus,focusNext:i.focusNext,focusPrevious:i.focusPrevious}};Ag.default=qU});var Cx=tt(k3=>{"use strict";Object.defineProperty(k3,"__esModule",{value:!0});k3.default=i=>{var o,a,p,_;return{width:(a=(o=i.yogaNode)===null||o===void 0?void 0:o.getComputedWidth())!==null&&a!==void 0?a:0,height:(_=(p=i.yogaNode)===null||p===void 0?void 0:p.getComputedHeight())!==null&&_!==void 0?_:0}}});var lc=tt(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});var WU=lx();Object.defineProperty(Yl,"render",{enumerable:!0,get:function(){return WU.default}});var VU=s4();Object.defineProperty(Yl,"Box",{enumerable:!0,get:function(){return VU.default}});var GU=O3();Object.defineProperty(Yl,"Text",{enumerable:!0,get:function(){return GU.default}});var YU=ax();Object.defineProperty(Yl,"Static",{enumerable:!0,get:function(){return YU.default}});var KU=cx();Object.defineProperty(Yl,"Transform",{enumerable:!0,get:function(){return KU.default}});var XU=px();Object.defineProperty(Yl,"Newline",{enumerable:!0,get:function(){return XU.default}});var QU=mx();Object.defineProperty(Yl,"Spacer",{enumerable:!0,get:function(){return QU.default}});var JU=gx();Object.defineProperty(Yl,"useInput",{enumerable:!0,get:function(){return JU.default}});var ZU=_x();Object.defineProperty(Yl,"useApp",{enumerable:!0,get:function(){return ZU.default}});var $U=c4();Object.defineProperty(Yl,"useStdin",{enumerable:!0,get:function(){return $U.default}});var ej=Ex();Object.defineProperty(Yl,"useStdout",{enumerable:!0,get:function(){return ej.default}});var tj=Dx();Object.defineProperty(Yl,"useStderr",{enumerable:!0,get:function(){return tj.default}});var nj=Sx();Object.defineProperty(Yl,"useFocus",{enumerable:!0,get:function(){return nj.default}});var rj=Tx();Object.defineProperty(Yl,"useFocusManager",{enumerable:!0,get:function(){return rj.default}});var ij=Cx();Object.defineProperty(Yl,"measureElement",{enumerable:!0,get:function(){return ij.default}})});var Px=tt(Og=>{"use strict";Object.defineProperty(Og,"__esModule",{value:!0});Og.UncontrolledTextInput=void 0;var Nx=Mi(),F3=Mi(),Lx=lc(),sh=i4(),Fx=({value:i,placeholder:o="",focus:a=!0,mask:p,highlightPastedText:_=!1,showCursor:t=!0,onChange:k,onSubmit:L})=>{let[{cursorOffset:O,cursorWidth:C},U]=F3.useState({cursorOffset:(i||"").length,cursorWidth:0});F3.useEffect(()=>{U(he=>{if(!a||!t)return he;let Ee=i||"";return he.cursorOffset>Ee.length-1?{cursorOffset:Ee.length,cursorWidth:0}:he})},[i,a,t]);let H=_?C:0,W=p?p.repeat(i.length):i,ne=W,m=o?sh.grey(o):void 0;if(t&&a){m=o.length>0?sh.inverse(o[0])+sh.grey(o.slice(1)):sh.inverse(" "),ne=W.length>0?"":sh.inverse(" ");let he=0;for(let Ee of W)he>=O-H&&he<=O?ne+=sh.inverse(Ee):ne+=Ee,he++;W.length>0&&O===W.length&&(ne+=sh.inverse(" "))}return Lx.useInput((he,Ee)=>{if(Ee.upArrow||Ee.downArrow||Ee.ctrl&&he==="c"||Ee.tab||Ee.shift&&Ee.tab)return;if(Ee.return){L&&L(i);return}let ve=O,se=i,De=0;Ee.leftArrow?t&&ve--:Ee.rightArrow?t&&ve++:Ee.backspace||Ee.delete?O>0&&(se=i.slice(0,O-1)+i.slice(O,i.length),ve--):(se=i.slice(0,O)+he+i.slice(O,i.length),ve+=he.length,he.length>1&&(De=he.length)),O<0&&(ve=0),O>i.length&&(ve=i.length),U({cursorOffset:ve,cursorWidth:De}),se!==i&&k(se)},{isActive:a}),Nx.createElement(Lx.Text,null,o?W.length>0?ne:m:ne)};Og.default=Fx;Og.UncontrolledTextInput=i=>{let[o,a]=F3.useState("");return Nx.createElement(Fx,Object.assign({},i,{value:o,onChange:a}))}});var bx=tt(E4=>{"use strict";Object.defineProperty(E4,"__esModule",{value:!0});function Mg(i){let o=[...i.caches],a=o.shift();return a===void 0?Ix():{get(p,_,t={miss:()=>Promise.resolve()}){return a.get(p,_,t).catch(()=>Mg({caches:o}).get(p,_,t))},set(p,_){return a.set(p,_).catch(()=>Mg({caches:o}).set(p,_))},delete(p){return a.delete(p).catch(()=>Mg({caches:o}).delete(p))},clear(){return a.clear().catch(()=>Mg({caches:o}).clear())}}}function Ix(){return{get(i,o,a={miss:()=>Promise.resolve()}){return o().then(_=>Promise.all([_,a.miss(_)])).then(([_])=>_)},set(i,o){return Promise.resolve(o)},delete(i){return Promise.resolve()},clear(){return Promise.resolve()}}}E4.createFallbackableCache=Mg;E4.createNullCache=Ix});var Ux=tt((CW,Bx)=>{Bx.exports=bx()});var jx=tt(P3=>{"use strict";Object.defineProperty(P3,"__esModule",{value:!0});function uj(i={serializable:!0}){let o={};return{get(a,p,_={miss:()=>Promise.resolve()}){let t=JSON.stringify(a);if(t in o)return Promise.resolve(i.serializable?JSON.parse(o[t]):o[t]);let k=p(),L=_&&_.miss||(()=>Promise.resolve());return k.then(O=>L(O)).then(()=>k)},set(a,p){return o[JSON.stringify(a)]=i.serializable?JSON.stringify(p):p,Promise.resolve(p)},delete(a){return delete o[JSON.stringify(a)],Promise.resolve()},clear(){return o={},Promise.resolve()}}}P3.createInMemoryCache=uj});var Hx=tt((RW,zx)=>{zx.exports=jx()});var Wx=tt(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});function oj(i,o,a){let p={"x-algolia-api-key":a,"x-algolia-application-id":o};return{headers(){return i===I3.WithinHeaders?p:{}},queryParameters(){return i===I3.WithinQueryParameters?p:{}}}}function lj(i){let o=0,a=()=>(o++,new Promise(p=>{setTimeout(()=>{p(i(a))},Math.min(100*o,1e3))}));return i(a)}function qx(i,o=(a,p)=>Promise.resolve()){return Object.assign(i,{wait(a){return qx(i.then(p=>Promise.all([o(p,a),p])).then(p=>p[1]))}})}function sj(i){let o=i.length-1;for(o;o>0;o--){let a=Math.floor(Math.random()*(o+1)),p=i[o];i[o]=i[a],i[a]=p}return i}function aj(i,o){return Object.keys(o!==void 0?o:{}).forEach(a=>{i[a]=o[a](i)}),i}function fj(i,...o){let a=0;return i.replace(/%s/g,()=>encodeURIComponent(o[a++]))}var cj="4.2.0",dj=i=>()=>i.transporter.requester.destroy(),I3={WithinQueryParameters:0,WithinHeaders:1};sc.AuthMode=I3;sc.addMethods=aj;sc.createAuth=oj;sc.createRetryablePromise=lj;sc.createWaitablePromise=qx;sc.destroy=dj;sc.encode=fj;sc.shuffle=sj;sc.version=cj});var kg=tt((OW,Vx)=>{Vx.exports=Wx()});var Gx=tt(b3=>{"use strict";Object.defineProperty(b3,"__esModule",{value:!0});var pj={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};b3.MethodEnum=pj});var Ng=tt((kW,Yx)=>{Yx.exports=Gx()});var s5=tt(V0=>{"use strict";Object.defineProperty(V0,"__esModule",{value:!0});var Kx=Ng();function B3(i,o){let a=i||{},p=a.data||{};return Object.keys(a).forEach(_=>{["timeout","headers","queryParameters","data","cacheable"].indexOf(_)===-1&&(p[_]=a[_])}),{data:Object.entries(p).length>0?p:void 0,timeout:a.timeout||o,headers:a.headers||{},queryParameters:a.queryParameters||{},cacheable:a.cacheable}}var D4={Read:1,Write:2,Any:3},$v={Up:1,Down:2,Timeouted:3},Xx=2*60*1e3;function U3(i,o=$v.Up){return Zr(Ht({},i),{status:o,lastUpdate:Date.now()})}function Qx(i){return i.status===$v.Up||Date.now()-i.lastUpdate>Xx}function Jx(i){return i.status===$v.Timeouted&&Date.now()-i.lastUpdate<=Xx}function j3(i){return{protocol:i.protocol||"https",url:i.url,accept:i.accept||D4.Any}}function hj(i,o){return Promise.all(o.map(a=>i.get(a,()=>Promise.resolve(U3(a))))).then(a=>{let p=a.filter(L=>Qx(L)),_=a.filter(L=>Jx(L)),t=[...p,..._],k=t.length>0?t.map(L=>j3(L)):o;return{getTimeout(L,O){return(_.length===0&&L===0?1:_.length+3+L)*O},statelessHosts:k}})}var vj=({isTimedOut:i,status:o})=>!i&&~~o==0,mj=i=>{let o=i.status;return i.isTimedOut||vj(i)||~~(o/100)!=2&&~~(o/100)!=4},yj=({status:i})=>~~(i/100)==2,gj=(i,o)=>mj(i)?o.onRetry(i):yj(i)?o.onSucess(i):o.onFail(i);function i5(i,o,a,p){let _=[],t=t5(a,p),k=n5(i,p),L=a.method,O=a.method!==Kx.MethodEnum.Get?{}:Ht(Ht({},a.data),p.data),C=Ht(Ht(Ht({"x-algolia-agent":i.userAgent.value},i.queryParameters),O),p.queryParameters),U=0,H=(W,ne)=>{let m=W.pop();if(m===void 0)throw r5(z3(_));let he={data:t,headers:k,method:L,url:e5(m,a.path,C),connectTimeout:ne(U,i.timeouts.connect),responseTimeout:ne(U,p.timeout)},Ee=se=>{let De={request:he,response:se,host:m,triesLeft:W.length};return _.push(De),De},ve={onSucess:se=>Zx(se),onRetry(se){let De=Ee(se);return se.isTimedOut&&U++,Promise.all([i.logger.info("Retryable failure",H3(De)),i.hostsCache.set(m,U3(m,se.isTimedOut?$v.Timeouted:$v.Down))]).then(()=>H(W,ne))},onFail(se){throw Ee(se),$x(se,z3(_))}};return i.requester.send(he).then(se=>gj(se,ve))};return hj(i.hostsCache,o).then(W=>H([...W.statelessHosts].reverse(),W.getTimeout))}function _j(i){let{hostsCache:o,logger:a,requester:p,requestsCache:_,responsesCache:t,timeouts:k,userAgent:L,hosts:O,queryParameters:C,headers:U}=i,H={hostsCache:o,logger:a,requester:p,requestsCache:_,responsesCache:t,timeouts:k,userAgent:L,headers:U,queryParameters:C,hosts:O.map(W=>j3(W)),read(W,ne){let m=B3(ne,H.timeouts.read),he=()=>i5(H,H.hosts.filter(se=>(se.accept&D4.Read)!=0),W,m);if((m.cacheable!==void 0?m.cacheable:W.cacheable)!==!0)return he();let ve={request:W,mappedRequestOptions:m,transporter:{queryParameters:H.queryParameters,headers:H.headers}};return H.responsesCache.get(ve,()=>H.requestsCache.get(ve,()=>H.requestsCache.set(ve,he()).then(se=>Promise.all([H.requestsCache.delete(ve),se]),se=>Promise.all([H.requestsCache.delete(ve),Promise.reject(se)])).then(([se,De])=>De)),{miss:se=>H.responsesCache.set(ve,se)})},write(W,ne){return i5(H,H.hosts.filter(m=>(m.accept&D4.Write)!=0),W,B3(ne,H.timeouts.write))}};return H}function Ej(i){let o={value:`Algolia for JavaScript (${i})`,add(a){let p=`; ${a.segment}${a.version!==void 0?` (${a.version})`:""}`;return o.value.indexOf(p)===-1&&(o.value=`${o.value}${p}`),o}};return o}function Zx(i){try{return JSON.parse(i.content)}catch(o){throw u5(o.message,i)}}function $x({content:i,status:o},a){let p=i;try{p=JSON.parse(i).message}catch(_){}return o5(p,o,a)}function Dj(i,...o){let a=0;return i.replace(/%s/g,()=>encodeURIComponent(o[a++]))}function e5(i,o,a){let p=l5(a),_=`${i.protocol}://${i.url}/${o.charAt(0)==="/"?o.substr(1):o}`;return p.length&&(_+=`?${p}`),_}function l5(i){let o=a=>Object.prototype.toString.call(a)==="[object Object]"||Object.prototype.toString.call(a)==="[object Array]";return Object.keys(i).map(a=>Dj("%s=%s",a,o(i[a])?JSON.stringify(i[a]):i[a])).join("&")}function t5(i,o){if(i.method===Kx.MethodEnum.Get||i.data===void 0&&o.data===void 0)return;let a=Array.isArray(i.data)?i.data:Ht(Ht({},i.data),o.data);return JSON.stringify(a)}function n5(i,o){let a=Ht(Ht({},i.headers),o.headers),p={};return Object.keys(a).forEach(_=>{let t=a[_];p[_.toLowerCase()]=t}),p}function z3(i){return i.map(o=>H3(o))}function H3(i){let o=i.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return Zr(Ht({},i),{request:Zr(Ht({},i.request),{headers:Ht(Ht({},i.request.headers),o)})})}function o5(i,o,a){return{name:"ApiError",message:i,status:o,transporterStackTrace:a}}function u5(i,o){return{name:"DeserializationError",message:i,response:o}}function r5(i){return{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:i}}V0.CallEnum=D4;V0.HostStatusEnum=$v;V0.createApiError=o5;V0.createDeserializationError=u5;V0.createMappedRequestOptions=B3;V0.createRetryError=r5;V0.createStatefulHost=U3;V0.createStatelessHost=j3;V0.createTransporter=_j;V0.createUserAgent=Ej;V0.deserializeFailure=$x;V0.deserializeSuccess=Zx;V0.isStatefulHostTimeouted=Jx;V0.isStatefulHostUp=Qx;V0.serializeData=t5;V0.serializeHeaders=n5;V0.serializeQueryParameters=l5;V0.serializeUrl=e5;V0.stackFrameWithoutCredentials=H3;V0.stackTraceWithoutCredentials=z3});var Lg=tt((LW,a5)=>{a5.exports=s5()});var f5=tt(g2=>{"use strict";Object.defineProperty(g2,"__esModule",{value:!0});var em=kg(),wj=Lg(),Fg=Ng(),Sj=i=>{let o=i.region||"us",a=em.createAuth(em.AuthMode.WithinHeaders,i.appId,i.apiKey),p=wj.createTransporter(Zr(Ht({hosts:[{url:`analytics.${o}.algolia.com`}]},i),{headers:Ht(Zr(Ht({},a.headers()),{"content-type":"application/json"}),i.headers),queryParameters:Ht(Ht({},a.queryParameters()),i.queryParameters)})),_=i.appId;return em.addMethods({appId:_,transporter:p},i.methods)},Tj=i=>(o,a)=>i.transporter.write({method:Fg.MethodEnum.Post,path:"2/abtests",data:o},a),Cj=i=>(o,a)=>i.transporter.write({method:Fg.MethodEnum.Delete,path:em.encode("2/abtests/%s",o)},a),xj=i=>(o,a)=>i.transporter.read({method:Fg.MethodEnum.Get,path:em.encode("2/abtests/%s",o)},a),Rj=i=>o=>i.transporter.read({method:Fg.MethodEnum.Get,path:"2/abtests"},o),Aj=i=>(o,a)=>i.transporter.write({method:Fg.MethodEnum.Post,path:em.encode("2/abtests/%s/stop",o)},a);g2.addABTest=Tj;g2.createAnalyticsClient=Sj;g2.deleteABTest=Cj;g2.getABTest=xj;g2.getABTests=Rj;g2.stopABTest=Aj});var d5=tt((PW,c5)=>{c5.exports=f5()});var h5=tt(Pg=>{"use strict";Object.defineProperty(Pg,"__esModule",{value:!0});var q3=kg(),Oj=Lg(),p5=Ng(),Mj=i=>{let o=i.region||"us",a=q3.createAuth(q3.AuthMode.WithinHeaders,i.appId,i.apiKey),p=Oj.createTransporter(Zr(Ht({hosts:[{url:`recommendation.${o}.algolia.com`}]},i),{headers:Ht(Zr(Ht({},a.headers()),{"content-type":"application/json"}),i.headers),queryParameters:Ht(Ht({},a.queryParameters()),i.queryParameters)}));return q3.addMethods({appId:i.appId,transporter:p},i.methods)},kj=i=>o=>i.transporter.read({method:p5.MethodEnum.Get,path:"1/strategies/personalization"},o),Nj=i=>(o,a)=>i.transporter.write({method:p5.MethodEnum.Post,path:"1/strategies/personalization",data:o},a);Pg.createRecommendationClient=Mj;Pg.getPersonalizationStrategy=kj;Pg.setPersonalizationStrategy=Nj});var m5=tt((bW,v5)=>{v5.exports=h5()});var O5=tt(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});var Ln=kg(),ra=Lg(),Ur=Ng(),Lj=require("crypto");function w4(i){let o=a=>i.request(a).then(p=>{if(i.batch!==void 0&&i.batch(p.hits),!i.shouldStop(p))return p.cursor?o({cursor:p.cursor}):o({page:(a.page||0)+1})});return o({})}var Fj=i=>{let o=i.appId,a=Ln.createAuth(i.authMode!==void 0?i.authMode:Ln.AuthMode.WithinHeaders,o,i.apiKey),p=ra.createTransporter(Zr(Ht({hosts:[{url:`${o}-dsn.algolia.net`,accept:ra.CallEnum.Read},{url:`${o}.algolia.net`,accept:ra.CallEnum.Write}].concat(Ln.shuffle([{url:`${o}-1.algolianet.com`},{url:`${o}-2.algolianet.com`},{url:`${o}-3.algolianet.com`}]))},i),{headers:Ht(Zr(Ht({},a.headers()),{"content-type":"application/x-www-form-urlencoded"}),i.headers),queryParameters:Ht(Ht({},a.queryParameters()),i.queryParameters)})),_={transporter:p,appId:o,addAlgoliaAgent(t,k){p.userAgent.add({segment:t,version:k})},clearCache(){return Promise.all([p.requestsCache.clear(),p.responsesCache.clear()]).then(()=>{})}};return Ln.addMethods(_,i.methods)};function y5(){return{name:"MissingObjectIDError",message:"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option."}}function g5(){return{name:"ObjectNotFoundError",message:"Object not found."}}function _5(){return{name:"ValidUntilNotFoundError",message:"ValidUntil not found in given secured api key."}}var Pj=i=>(o,a)=>{let L=a||{},{queryParameters:p}=L,_=Dl(L,["queryParameters"]),t=Ht({acl:o},p!==void 0?{queryParameters:p}:{}),k=(O,C)=>Ln.createRetryablePromise(U=>Ig(i)(O.key,C).catch(H=>{if(H.status!==404)throw H;return U()}));return Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:"1/keys",data:t},_),k)},Ij=i=>(o,a,p)=>{let _=ra.createMappedRequestOptions(p);return _.queryParameters["X-Algolia-User-ID"]=o,i.transporter.write({method:Ur.MethodEnum.Post,path:"1/clusters/mapping",data:{cluster:a}},_)},bj=i=>(o,a,p)=>i.transporter.write({method:Ur.MethodEnum.Post,path:"1/clusters/mapping/batch",data:{users:o,cluster:a}},p),S4=i=>(o,a,p)=>{let _=(t,k)=>bg(i)(o,{methods:{waitTask:Co}}).waitTask(t.taskID,k);return Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/operation",o),data:{operation:"copy",destination:a}},p),_)},Bj=i=>(o,a,p)=>S4(i)(o,a,Zr(Ht({},p),{scope:[T4.Rules]})),Uj=i=>(o,a,p)=>S4(i)(o,a,Zr(Ht({},p),{scope:[T4.Settings]})),jj=i=>(o,a,p)=>S4(i)(o,a,Zr(Ht({},p),{scope:[T4.Synonyms]})),zj=i=>(o,a)=>{let p=(_,t)=>Ln.createRetryablePromise(k=>Ig(i)(o,t).then(k).catch(L=>{if(L.status!==404)throw L}));return Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Delete,path:Ln.encode("1/keys/%s",o)},a),p)},Hj=()=>(i,o)=>{let a=ra.serializeQueryParameters(o),p=Lj.createHmac("sha256",i).update(a).digest("hex");return Buffer.from(p+a).toString("base64")},Ig=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Get,path:Ln.encode("1/keys/%s",o)},a),qj=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:"1/logs"},o),Wj=()=>i=>{let o=Buffer.from(i,"base64").toString("ascii"),a=/validUntil=(\d+)/,p=o.match(a);if(p===null)throw _5();return parseInt(p[1],10)-Math.round(new Date().getTime()/1e3)},Vj=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:"1/clusters/mapping/top"},o),Gj=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Get,path:Ln.encode("1/clusters/mapping/%s",o)},a),Yj=i=>o=>{let _=o||{},{retrieveMappings:a}=_,p=Dl(_,["retrieveMappings"]);return a===!0&&(p.getClusters=!0),i.transporter.read({method:Ur.MethodEnum.Get,path:"1/clusters/mapping/pending"},p)},bg=i=>(o,a={})=>{let p={transporter:i.transporter,appId:i.appId,indexName:o};return Ln.addMethods(p,a.methods)},Kj=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:"1/keys"},o),Xj=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:"1/clusters"},o),Qj=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:"1/indexes"},o),Jj=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:"1/clusters/mapping"},o),Zj=i=>(o,a,p)=>{let _=(t,k)=>bg(i)(o,{methods:{waitTask:Co}}).waitTask(t.taskID,k);return Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/operation",o),data:{operation:"move",destination:a}},p),_)},$j=i=>(o,a)=>{let p=(_,t)=>Promise.all(Object.keys(_.taskID).map(k=>bg(i)(k,{methods:{waitTask:Co}}).waitTask(_.taskID[k],t)));return Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:"1/indexes/*/batch",data:{requests:o}},a),p)},ez=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:o}},a),tz=i=>(o,a)=>{let p=o.map(_=>Zr(Ht({},_),{params:ra.serializeQueryParameters(_.params||{})}));return i.transporter.read({method:Ur.MethodEnum.Post,path:"1/indexes/*/queries",data:{requests:p},cacheable:!0},a)},nz=i=>(o,a)=>Promise.all(o.map(p=>{let L=p.params,{facetName:_,facetQuery:t}=L,k=Dl(L,["facetName","facetQuery"]);return bg(i)(p.indexName,{methods:{searchForFacetValues:E5}}).searchForFacetValues(_,t,Ht(Ht({},a),k))})),rz=i=>(o,a)=>{let p=ra.createMappedRequestOptions(a);return p.queryParameters["X-Algolia-User-ID"]=o,i.transporter.write({method:Ur.MethodEnum.Delete,path:"1/clusters/mapping"},p)},iz=i=>(o,a)=>{let p=(_,t)=>Ln.createRetryablePromise(k=>Ig(i)(o,t).catch(L=>{if(L.status!==404)throw L;return k()}));return Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/keys/%s/restore",o)},a),p)},uz=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Post,path:"1/clusters/mapping/search",data:{query:o}},a),oz=i=>(o,a)=>{let p=Object.assign({},a),U=a||{},{queryParameters:_}=U,t=Dl(U,["queryParameters"]),k=_?{queryParameters:_}:{},L=["acl","indexes","referers","restrictSources","queryParameters","description","maxQueriesPerIPPerHour","maxHitsPerQuery"],O=H=>Object.keys(p).filter(W=>L.indexOf(W)!==-1).every(W=>H[W]===p[W]),C=(H,W)=>Ln.createRetryablePromise(ne=>Ig(i)(o,W).then(m=>O(m)?Promise.resolve():ne()));return Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Put,path:Ln.encode("1/keys/%s",o),data:k},t),C)},D5=i=>(o,a)=>{let p=(_,t)=>Co(i)(_.taskID,t);return Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/batch",i.indexName),data:{requests:o}},a),p)},lz=i=>o=>w4(Zr(Ht({},o),{shouldStop:a=>a.cursor===void 0,request:a=>i.transporter.read({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/browse",i.indexName),data:a},o)})),sz=i=>o=>{let a=Ht({hitsPerPage:1e3},o);return w4(Zr(Ht({},a),{shouldStop:p=>p.hits.lengthZr(Ht({},_),{hits:_.hits.map(t=>(delete t._highlightResult,t))}))}}))},az=i=>o=>{let a=Ht({hitsPerPage:1e3},o);return w4(Zr(Ht({},a),{shouldStop:p=>p.hits.lengthZr(Ht({},_),{hits:_.hits.map(t=>(delete t._highlightResult,t))}))}}))},C4=i=>(o,a,p)=>{let O=p||{},{batchSize:_}=O,t=Dl(O,["batchSize"]),k={taskIDs:[],objectIDs:[]},L=(C=0)=>{let U=[],H;for(H=C;H({action:a,body:W})),t).then(W=>(k.objectIDs=k.objectIDs.concat(W.objectIDs),k.taskIDs.push(W.taskID),H++,L(H)))};return Ln.createWaitablePromise(L(),(C,U)=>Promise.all(C.taskIDs.map(H=>Co(i)(H,U))))},fz=i=>o=>Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/clear",i.indexName)},o),(a,p)=>Co(i)(a.taskID,p)),cz=i=>o=>{let t=o||{},{forwardToReplicas:a}=t,p=Dl(t,["forwardToReplicas"]),_=ra.createMappedRequestOptions(p);return a&&(_.queryParameters.forwardToReplicas=1),Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/rules/clear",i.indexName)},_),(k,L)=>Co(i)(k.taskID,L))},dz=i=>o=>{let t=o||{},{forwardToReplicas:a}=t,p=Dl(t,["forwardToReplicas"]),_=ra.createMappedRequestOptions(p);return a&&(_.queryParameters.forwardToReplicas=1),Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/synonyms/clear",i.indexName)},_),(k,L)=>Co(i)(k.taskID,L))},pz=i=>(o,a)=>Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/deleteByQuery",i.indexName),data:o},a),(p,_)=>Co(i)(p.taskID,_)),hz=i=>o=>Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Delete,path:Ln.encode("1/indexes/%s",i.indexName)},o),(a,p)=>Co(i)(a.taskID,p)),vz=i=>(o,a)=>Ln.createWaitablePromise(T5(i)([o],a).then(p=>({taskID:p.taskIDs[0]})),(p,_)=>Co(i)(p.taskID,_)),T5=i=>(o,a)=>{let p=o.map(_=>({objectID:_}));return C4(i)(p,ah.DeleteObject,a)},mz=i=>(o,a)=>{let k=a||{},{forwardToReplicas:p}=k,_=Dl(k,["forwardToReplicas"]),t=ra.createMappedRequestOptions(_);return p&&(t.queryParameters.forwardToReplicas=1),Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Delete,path:Ln.encode("1/indexes/%s/rules/%s",i.indexName,o)},t),(L,O)=>Co(i)(L.taskID,O))},yz=i=>(o,a)=>{let k=a||{},{forwardToReplicas:p}=k,_=Dl(k,["forwardToReplicas"]),t=ra.createMappedRequestOptions(_);return p&&(t.queryParameters.forwardToReplicas=1),Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Delete,path:Ln.encode("1/indexes/%s/synonyms/%s",i.indexName,o)},t),(L,O)=>Co(i)(L.taskID,O))},gz=i=>o=>C5(i)(o).then(()=>!0).catch(a=>{if(a.status!==404)throw a;return!1}),_z=i=>(o,a)=>{let O=a||{},{query:p,paginate:_}=O,t=Dl(O,["query","paginate"]),k=0,L=()=>x5(i)(p||"",Zr(Ht({},t),{page:k})).then(C=>{for(let[U,H]of Object.entries(C.hits))if(o(H))return{object:H,position:parseInt(U,10),page:k};if(k++,_===!1||k>=C.nbPages)throw g5();return L()});return L()},Ez=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Get,path:Ln.encode("1/indexes/%s/%s",i.indexName,o)},a),Dz=()=>(i,o)=>{for(let[a,p]of Object.entries(i.hits))if(p.objectID===o)return parseInt(a,10);return-1},wz=i=>(o,a)=>{let k=a||{},{attributesToRetrieve:p}=k,_=Dl(k,["attributesToRetrieve"]),t=o.map(L=>Ht({indexName:i.indexName,objectID:L},p?{attributesToRetrieve:p}:{}));return i.transporter.read({method:Ur.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:t}},_)},Sz=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Get,path:Ln.encode("1/indexes/%s/rules/%s",i.indexName,o)},a),C5=i=>o=>i.transporter.read({method:Ur.MethodEnum.Get,path:Ln.encode("1/indexes/%s/settings",i.indexName),data:{getVersion:2}},o),Tz=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Get,path:Ln.encode("1/indexes/%s/synonyms/%s",i.indexName,o)},a),R5=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Get,path:Ln.encode("1/indexes/%s/task/%s",i.indexName,o.toString())},a),Cz=i=>(o,a)=>Ln.createWaitablePromise(A5(i)([o],a).then(p=>({objectID:p.objectIDs[0],taskID:p.taskIDs[0]})),(p,_)=>Co(i)(p.taskID,_)),A5=i=>(o,a)=>{let k=a||{},{createIfNotExists:p}=k,_=Dl(k,["createIfNotExists"]),t=p?ah.PartialUpdateObject:ah.PartialUpdateObjectNoCreate;return C4(i)(o,t,_)},xz=i=>(o,a)=>{let m=a||{},{safe:p,autoGenerateObjectIDIfNotExist:_,batchSize:t}=m,k=Dl(m,["safe","autoGenerateObjectIDIfNotExist","batchSize"]),L=(he,Ee,ve,se)=>Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/operation",he),data:{operation:ve,destination:Ee}},se),(De,pe)=>Co(i)(De.taskID,pe)),O=Math.random().toString(36).substring(7),C=`${i.indexName}_tmp_${O}`,U=W3({appId:i.appId,transporter:i.transporter,indexName:C}),H=[],W=L(i.indexName,C,"copy",Zr(Ht({},k),{scope:["settings","synonyms","rules"]}));H.push(W);let ne=(p?W.wait(k):W).then(()=>{let he=U(o,Zr(Ht({},k),{autoGenerateObjectIDIfNotExist:_,batchSize:t}));return H.push(he),p?he.wait(k):he}).then(()=>{let he=L(C,i.indexName,"move",k);return H.push(he),p?he.wait(k):he}).then(()=>Promise.all(H)).then(([he,Ee,ve])=>({objectIDs:Ee.objectIDs,taskIDs:[he.taskID,...Ee.taskIDs,ve.taskID]}));return Ln.createWaitablePromise(ne,(he,Ee)=>Promise.all(H.map(ve=>ve.wait(Ee))))},Rz=i=>(o,a)=>V3(i)(o,Zr(Ht({},a),{clearExistingRules:!0})),Az=i=>(o,a)=>G3(i)(o,Zr(Ht({},a),{replaceExistingSynonyms:!0})),Oz=i=>(o,a)=>Ln.createWaitablePromise(W3(i)([o],a).then(p=>({objectID:p.objectIDs[0],taskID:p.taskIDs[0]})),(p,_)=>Co(i)(p.taskID,_)),W3=i=>(o,a)=>{let k=a||{},{autoGenerateObjectIDIfNotExist:p}=k,_=Dl(k,["autoGenerateObjectIDIfNotExist"]),t=p?ah.AddObject:ah.UpdateObject;if(t===ah.UpdateObject){for(let L of o)if(L.objectID===void 0)return Ln.createWaitablePromise(Promise.reject(y5()))}return C4(i)(o,t,_)},Mz=i=>(o,a)=>V3(i)([o],a),V3=i=>(o,a)=>{let L=a||{},{forwardToReplicas:p,clearExistingRules:_}=L,t=Dl(L,["forwardToReplicas","clearExistingRules"]),k=ra.createMappedRequestOptions(t);return p&&(k.queryParameters.forwardToReplicas=1),_&&(k.queryParameters.clearExistingRules=1),Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/rules/batch",i.indexName),data:o},k),(O,C)=>Co(i)(O.taskID,C))},kz=i=>(o,a)=>G3(i)([o],a),G3=i=>(o,a)=>{let L=a||{},{forwardToReplicas:p,replaceExistingSynonyms:_}=L,t=Dl(L,["forwardToReplicas","replaceExistingSynonyms"]),k=ra.createMappedRequestOptions(t);return p&&(k.queryParameters.forwardToReplicas=1),_&&(k.queryParameters.replaceExistingSynonyms=1),Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/synonyms/batch",i.indexName),data:o},k),(O,C)=>Co(i)(O.taskID,C))},x5=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/query",i.indexName),data:{query:o},cacheable:!0},a),E5=i=>(o,a,p)=>i.transporter.read({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/facets/%s/query",i.indexName,o),data:{facetQuery:a},cacheable:!0},p),w5=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/rules/search",i.indexName),data:{query:o}},a),S5=i=>(o,a)=>i.transporter.read({method:Ur.MethodEnum.Post,path:Ln.encode("1/indexes/%s/synonyms/search",i.indexName),data:{query:o}},a),Nz=i=>(o,a)=>{let k=a||{},{forwardToReplicas:p}=k,_=Dl(k,["forwardToReplicas"]),t=ra.createMappedRequestOptions(_);return p&&(t.queryParameters.forwardToReplicas=1),Ln.createWaitablePromise(i.transporter.write({method:Ur.MethodEnum.Put,path:Ln.encode("1/indexes/%s/settings",i.indexName),data:o},t),(L,O)=>Co(i)(L.taskID,O))},Co=i=>(o,a)=>Ln.createRetryablePromise(p=>R5(i)(o,a).then(_=>_.status!=="published"?p():void 0)),Lz={AddObject:"addObject",Analytics:"analytics",Browser:"browse",DeleteIndex:"deleteIndex",DeleteObject:"deleteObject",EditSettings:"editSettings",ListIndexes:"listIndexes",Logs:"logs",Recommendation:"recommendation",Search:"search",SeeUnretrievableAttributes:"seeUnretrievableAttributes",Settings:"settings",Usage:"usage"},ah={AddObject:"addObject",UpdateObject:"updateObject",PartialUpdateObject:"partialUpdateObject",PartialUpdateObjectNoCreate:"partialUpdateObjectNoCreate",DeleteObject:"deleteObject"},T4={Settings:"settings",Synonyms:"synonyms",Rules:"rules"},Fz={None:"none",StopIfEnoughMatches:"stopIfEnoughMatches"},Pz={Synonym:"synonym",OneWaySynonym:"oneWaySynonym",AltCorrection1:"altCorrection1",AltCorrection2:"altCorrection2",Placeholder:"placeholder"};tn.ApiKeyACLEnum=Lz;tn.BatchActionEnum=ah;tn.ScopeEnum=T4;tn.StrategyEnum=Fz;tn.SynonymEnum=Pz;tn.addApiKey=Pj;tn.assignUserID=Ij;tn.assignUserIDs=bj;tn.batch=D5;tn.browseObjects=lz;tn.browseRules=sz;tn.browseSynonyms=az;tn.chunkedBatch=C4;tn.clearObjects=fz;tn.clearRules=cz;tn.clearSynonyms=dz;tn.copyIndex=S4;tn.copyRules=Bj;tn.copySettings=Uj;tn.copySynonyms=jj;tn.createBrowsablePromise=w4;tn.createMissingObjectIDError=y5;tn.createObjectNotFoundError=g5;tn.createSearchClient=Fj;tn.createValidUntilNotFoundError=_5;tn.deleteApiKey=zj;tn.deleteBy=pz;tn.deleteIndex=hz;tn.deleteObject=vz;tn.deleteObjects=T5;tn.deleteRule=mz;tn.deleteSynonym=yz;tn.exists=gz;tn.findObject=_z;tn.generateSecuredApiKey=Hj;tn.getApiKey=Ig;tn.getLogs=qj;tn.getObject=Ez;tn.getObjectPosition=Dz;tn.getObjects=wz;tn.getRule=Sz;tn.getSecuredApiKeyRemainingValidity=Wj;tn.getSettings=C5;tn.getSynonym=Tz;tn.getTask=R5;tn.getTopUserIDs=Vj;tn.getUserID=Gj;tn.hasPendingMappings=Yj;tn.initIndex=bg;tn.listApiKeys=Kj;tn.listClusters=Xj;tn.listIndices=Qj;tn.listUserIDs=Jj;tn.moveIndex=Zj;tn.multipleBatch=$j;tn.multipleGetObjects=ez;tn.multipleQueries=tz;tn.multipleSearchForFacetValues=nz;tn.partialUpdateObject=Cz;tn.partialUpdateObjects=A5;tn.removeUserID=rz;tn.replaceAllObjects=xz;tn.replaceAllRules=Rz;tn.replaceAllSynonyms=Az;tn.restoreApiKey=iz;tn.saveObject=Oz;tn.saveObjects=W3;tn.saveRule=Mz;tn.saveRules=V3;tn.saveSynonym=kz;tn.saveSynonyms=G3;tn.search=x5;tn.searchForFacetValues=E5;tn.searchRules=w5;tn.searchSynonyms=S5;tn.searchUserIDs=uz;tn.setSettings=Nz;tn.updateApiKey=oz;tn.waitTask=Co});var k5=tt((UW,M5)=>{M5.exports=O5()});var N5=tt(x4=>{"use strict";Object.defineProperty(x4,"__esModule",{value:!0});function Iz(){return{debug(i,o){return Promise.resolve()},info(i,o){return Promise.resolve()},error(i,o){return Promise.resolve()}}}var bz={Debug:1,Info:2,Error:3};x4.LogLevelEnum=bz;x4.createNullLogger=Iz});var F5=tt((zW,L5)=>{L5.exports=N5()});var b5=tt(Y3=>{"use strict";Object.defineProperty(Y3,"__esModule",{value:!0});var P5=require("http"),I5=require("https"),Bz=require("url");function Uz(){let i={keepAlive:!0},o=new P5.Agent(i),a=new I5.Agent(i);return{send(p){return new Promise(_=>{let t=Bz.parse(p.url),k=t.query===null?t.pathname:`${t.pathname}?${t.query}`,L=Ht({agent:t.protocol==="https:"?a:o,hostname:t.hostname,path:k,method:p.method,headers:p.headers},t.port!==void 0?{port:t.port||""}:{}),O=(t.protocol==="https:"?I5:P5).request(L,W=>{let ne="";W.on("data",m=>ne+=m),W.on("end",()=>{clearTimeout(U),clearTimeout(H),_({status:W.statusCode||0,content:ne,isTimedOut:!1})})}),C=(W,ne)=>setTimeout(()=>{O.abort(),_({status:0,content:ne,isTimedOut:!0})},W*1e3),U=C(p.connectTimeout,"Connection timeout"),H;O.on("error",W=>{clearTimeout(U),clearTimeout(H),_({status:0,content:W.message,isTimedOut:!1})}),O.once("response",()=>{clearTimeout(U),H=C(p.responseTimeout,"Socket timeout")}),p.data!==void 0&&O.write(p.data),O.end()})},destroy(){return o.destroy(),a.destroy(),Promise.resolve()}}}Y3.createNodeHttpRequester=Uz});var U5=tt((qW,B5)=>{B5.exports=b5()});var q5=tt((WW,j5)=>{"use strict";var z5=Ux(),jz=Hx(),tm=d5(),K3=kg(),X3=m5(),wn=k5(),zz=F5(),Hz=U5(),qz=Lg();function H5(i,o,a){let p={appId:i,apiKey:o,timeouts:{connect:2,read:5,write:30},requester:Hz.createNodeHttpRequester(),logger:zz.createNullLogger(),responsesCache:z5.createNullCache(),requestsCache:z5.createNullCache(),hostsCache:jz.createInMemoryCache(),userAgent:qz.createUserAgent(K3.version).add({segment:"Node.js",version:process.versions.node})};return wn.createSearchClient(Zr(Ht(Ht({},p),a),{methods:{search:wn.multipleQueries,searchForFacetValues:wn.multipleSearchForFacetValues,multipleBatch:wn.multipleBatch,multipleGetObjects:wn.multipleGetObjects,multipleQueries:wn.multipleQueries,copyIndex:wn.copyIndex,copySettings:wn.copySettings,copyRules:wn.copyRules,copySynonyms:wn.copySynonyms,moveIndex:wn.moveIndex,listIndices:wn.listIndices,getLogs:wn.getLogs,listClusters:wn.listClusters,multipleSearchForFacetValues:wn.multipleSearchForFacetValues,getApiKey:wn.getApiKey,addApiKey:wn.addApiKey,listApiKeys:wn.listApiKeys,updateApiKey:wn.updateApiKey,deleteApiKey:wn.deleteApiKey,restoreApiKey:wn.restoreApiKey,assignUserID:wn.assignUserID,assignUserIDs:wn.assignUserIDs,getUserID:wn.getUserID,searchUserIDs:wn.searchUserIDs,listUserIDs:wn.listUserIDs,getTopUserIDs:wn.getTopUserIDs,removeUserID:wn.removeUserID,hasPendingMappings:wn.hasPendingMappings,generateSecuredApiKey:wn.generateSecuredApiKey,getSecuredApiKeyRemainingValidity:wn.getSecuredApiKeyRemainingValidity,destroy:K3.destroy,initIndex:_=>t=>wn.initIndex(_)(t,{methods:{batch:wn.batch,delete:wn.deleteIndex,getObject:wn.getObject,getObjects:wn.getObjects,saveObject:wn.saveObject,saveObjects:wn.saveObjects,search:wn.search,searchForFacetValues:wn.searchForFacetValues,waitTask:wn.waitTask,setSettings:wn.setSettings,getSettings:wn.getSettings,partialUpdateObject:wn.partialUpdateObject,partialUpdateObjects:wn.partialUpdateObjects,deleteObject:wn.deleteObject,deleteObjects:wn.deleteObjects,deleteBy:wn.deleteBy,clearObjects:wn.clearObjects,browseObjects:wn.browseObjects,getObjectPosition:wn.getObjectPosition,findObject:wn.findObject,exists:wn.exists,saveSynonym:wn.saveSynonym,saveSynonyms:wn.saveSynonyms,getSynonym:wn.getSynonym,searchSynonyms:wn.searchSynonyms,browseSynonyms:wn.browseSynonyms,deleteSynonym:wn.deleteSynonym,clearSynonyms:wn.clearSynonyms,replaceAllObjects:wn.replaceAllObjects,replaceAllSynonyms:wn.replaceAllSynonyms,searchRules:wn.searchRules,getRule:wn.getRule,deleteRule:wn.deleteRule,saveRule:wn.saveRule,saveRules:wn.saveRules,replaceAllRules:wn.replaceAllRules,browseRules:wn.browseRules,clearRules:wn.clearRules}}),initAnalytics:()=>_=>tm.createAnalyticsClient(Zr(Ht(Ht({},p),_),{methods:{addABTest:tm.addABTest,getABTest:tm.getABTest,getABTests:tm.getABTests,stopABTest:tm.stopABTest,deleteABTest:tm.deleteABTest}})),initRecommendation:()=>_=>X3.createRecommendationClient(Zr(Ht(Ht({},p),_),{methods:{getPersonalizationStrategy:X3.getPersonalizationStrategy,setPersonalizationStrategy:X3.setPersonalizationStrategy}}))}}))}H5.version=K3.version;j5.exports=H5});var V5=tt((VW,Q3)=>{var W5=q5();Q3.exports=W5;Q3.exports.default=W5});var Jz={};YF(Jz,{default:()=>$z});var Y5=vu(require("@yarnpkg/cli")),fh=vu(require("@yarnpkg/core"));var xx=vu(lc()),oh=vu(Mi()),d4=(0,oh.memo)(({active:i})=>{let o=(0,oh.useMemo)(()=>i?"\u25C9":"\u25EF",[i]),a=(0,oh.useMemo)(()=>i?"green":"yellow",[i]);return oh.default.createElement(xx.Text,{color:a},o)});var y2=vu(lc()),na=vu(Mi());var Rx=vu(lc()),p4=vu(Mi());function m2({active:i},o,a){let{stdin:p}=(0,Rx.useStdin)(),_=(0,p4.useCallback)((t,k)=>o(t,k),a);(0,p4.useEffect)(()=>{if(!(!i||!p))return p.on("keypress",_),()=>{p.off("keypress",_)}},[i,_,p])}var h4;(function(a){a.BEFORE="before",a.AFTER="after"})(h4||(h4={}));var Ax=function({active:i},o,a){m2({active:i},(p,_)=>{_.name==="tab"&&(_.shift?o(h4.BEFORE):o(h4.AFTER))},a)};var v4=function(i,o,{active:a,minus:p,plus:_,set:t,loop:k=!0}){m2({active:a},(L,O)=>{let C=o.indexOf(i);switch(O.name){case p:{let U=C-1;if(k){t(o[(o.length+U)%o.length]);return}if(U<0)return;t(o[U])}break;case _:{let U=C+1;if(k){t(o[U%o.length]);return}if(U>=o.length)return;t(o[U])}break}},[o,i,_,t,k])};var m4=({active:i=!0,children:o=[],radius:a=10,size:p=1,loop:_=!0,onFocusRequest:t,willReachEnd:k})=>{let L=Ee=>{if(Ee.key===null)throw new Error("Expected all children to have a key");return Ee.key},O=na.default.Children.map(o,Ee=>L(Ee)),C=O[0],[U,H]=(0,na.useState)(C),W=O.indexOf(U);(0,na.useEffect)(()=>{O.includes(U)||H(C)},[o]),(0,na.useEffect)(()=>{k&&W>=O.length-2&&k()},[W]),Ax({active:i&&!!t},Ee=>{t==null||t(Ee)},[t]),v4(U,O,{active:i,minus:"up",plus:"down",set:H,loop:_});let ne=W-a,m=W+a;m>O.length&&(ne-=m-O.length,m=O.length),ne<0&&(m+=-ne,ne=0),m>=O.length&&(m=O.length-1);let he=[];for(let Ee=ne;Ee<=m;++Ee){let ve=O[Ee],se=i&&ve===U;he.push(na.default.createElement(y2.Box,{key:ve,height:p},na.default.createElement(y2.Box,{marginLeft:1,marginRight:1},na.default.createElement(y2.Text,null,se?na.default.createElement(y2.Text,{color:"cyan",bold:!0},">"):" ")),na.default.createElement(y2.Box,null,na.default.cloneElement(o[Ee],{active:se}))))}return na.default.createElement(y2.Box,{flexDirection:"column",width:"100%"},he)};var y4=vu(Mi());var Ox=vu(lc()),ed=vu(Mi()),Mx=vu(require("readline")),N3=ed.default.createContext(null),kx=({children:i})=>{let{stdin:o,setRawMode:a}=(0,Ox.useStdin)();(0,ed.useEffect)(()=>{a&&a(!0),o&&(0,Mx.emitKeypressEvents)(o)},[o,a]);let[p,_]=(0,ed.useState)(new Map),t=(0,ed.useMemo)(()=>({getAll:()=>p,get:k=>p.get(k),set:(k,L)=>_(new Map([...p,[k,L]]))}),[p,_]);return ed.default.createElement(N3.Provider,{value:t,children:i})};function lh(i,o){let a=(0,y4.useContext)(N3);if(a===null)throw new Error("Expected this hook to run with a ministore context attached");if(typeof i=="undefined")return a.getAll();let p=(0,y4.useCallback)(t=>{a.set(i,t)},[i,a.set]),_=a.get(i);return typeof _=="undefined"&&(_=o),[_,p]}var g4=vu(lc()),L3=vu(Mi());async function _4(i,o,{stdin:a,stdout:p,stderr:_}={}){let t,k=O=>{let{exit:C}=(0,g4.useApp)();m2({active:!0},(U,H)=>{H.name==="return"&&(t=O,C())},[C,O])},{waitUntilExit:L}=(0,g4.render)(L3.default.createElement(kx,null,L3.default.createElement(i,Zr(Ht({},o),{useSubmit:k}))),{stdin:a,stdout:p,stderr:_});return await L(),t}var K5=vu(require("clipanion")),X5=vu(Px()),or=vu(lc()),En=vu(Mi());var G5=vu(V5()),J3={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},Wz=(0,G5.default)(J3.appId,J3.apiKey).initIndex(J3.indexName),Z3=async(i,o=0)=>await Wz.search(i,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:o,hitsPerPage:10});var Bg=["regular","dev","peer"],Ug=class extends Y5.BaseCommand{async execute(){let o=await fh.Configuration.find(this.context.cwd,this.context.plugins),a=()=>En.default.createElement(or.Box,{flexDirection:"row"},En.default.createElement(or.Box,{flexDirection:"column",width:48},En.default.createElement(or.Box,null,En.default.createElement(or.Text,null,"Press ",En.default.createElement(or.Text,{bold:!0,color:"cyanBright"},""),"/",En.default.createElement(or.Text,{bold:!0,color:"cyanBright"},"")," to move between packages.")),En.default.createElement(or.Box,null,En.default.createElement(or.Text,null,"Press ",En.default.createElement(or.Text,{bold:!0,color:"cyanBright"},"")," to select a package.")),En.default.createElement(or.Box,null,En.default.createElement(or.Text,null,"Press ",En.default.createElement(or.Text,{bold:!0,color:"cyanBright"},"")," again to change the target."))),En.default.createElement(or.Box,{flexDirection:"column"},En.default.createElement(or.Box,{marginLeft:1},En.default.createElement(or.Text,null,"Press ",En.default.createElement(or.Text,{bold:!0,color:"cyanBright"},"")," to install the selected packages.")),En.default.createElement(or.Box,{marginLeft:1},En.default.createElement(or.Text,null,"Press ",En.default.createElement(or.Text,{bold:!0,color:"cyanBright"},"")," to abort.")))),p=()=>En.default.createElement(En.default.Fragment,null,En.default.createElement(or.Box,{width:15},En.default.createElement(or.Text,{bold:!0,underline:!0,color:"gray"},"Owner")),En.default.createElement(or.Box,{width:11},En.default.createElement(or.Text,{bold:!0,underline:!0,color:"gray"},"Version")),En.default.createElement(or.Box,{width:10},En.default.createElement(or.Text,{bold:!0,underline:!0,color:"gray"},"Downloads"))),_=()=>En.default.createElement(or.Box,{width:17},En.default.createElement(or.Text,{bold:!0,underline:!0,color:"gray"},"Target")),t=({hit:ne,active:m})=>{let[he,Ee]=lh(ne.name,null);m2({active:m},(De,pe)=>{if(pe.name!=="space")return;if(!he){Ee(Bg[0]);return}let me=Bg.indexOf(he)+1;me===Bg.length?Ee(null):Ee(Bg[me])},[he,Ee]);let ve=fh.structUtils.parseIdent(ne.name),se=fh.structUtils.prettyIdent(o,ve);return En.default.createElement(or.Box,null,En.default.createElement(or.Box,{width:45},En.default.createElement(or.Text,{bold:!0,wrap:"wrap"},se)),En.default.createElement(or.Box,{width:14,marginLeft:1},En.default.createElement(or.Text,{bold:!0,wrap:"truncate"},ne.owner.name)),En.default.createElement(or.Box,{width:10,marginLeft:1},En.default.createElement(or.Text,{italic:!0,wrap:"truncate"},ne.version)),En.default.createElement(or.Box,{width:16,marginLeft:1},En.default.createElement(or.Text,null,ne.humanDownloadsLast30Days)))},k=({name:ne,active:m})=>{let[he]=lh(ne,null),Ee=fh.structUtils.parseIdent(ne);return En.default.createElement(or.Box,null,En.default.createElement(or.Box,{width:47},En.default.createElement(or.Text,{bold:!0}," - ",fh.structUtils.prettyIdent(o,Ee))),Bg.map(ve=>En.default.createElement(or.Box,{key:ve,width:14,marginLeft:1},En.default.createElement(or.Text,null," ",En.default.createElement(d4,{active:he===ve})," ",En.default.createElement(or.Text,{bold:!0},ve)))))},L=()=>En.default.createElement(or.Box,{marginTop:1},En.default.createElement(or.Text,null,"Powered by Algolia.")),C=await _4(({useSubmit:ne})=>{let m=lh();ne(m);let he=Array.from(m.keys()).filter(qe=>m.get(qe)!==null),[Ee,ve]=(0,En.useState)(""),[se,De]=(0,En.useState)(0),[pe,me]=(0,En.useState)([]),ie=qe=>{qe.match(/\t| /)||ve(qe)},Oe=async()=>{De(0);let qe=await Z3(Ee);qe.query===Ee&&me(qe.hits)},je=async()=>{let qe=await Z3(Ee,se+1);qe.query===Ee&&qe.page-1===se&&(De(qe.page),me([...pe,...qe.hits]))};return(0,En.useEffect)(()=>{Ee?Oe():me([])},[Ee]),En.default.createElement(or.Box,{flexDirection:"column"},En.default.createElement(a,null),En.default.createElement(or.Box,{flexDirection:"row",marginTop:1},En.default.createElement(or.Text,{bold:!0},"Search: "),En.default.createElement(or.Box,{width:41},En.default.createElement(X5.default,{value:Ee,onChange:ie,placeholder:"i.e. babel, webpack, react...",showCursor:!1})),En.default.createElement(p,null)),pe.length?En.default.createElement(m4,{radius:2,loop:!1,children:pe.map(qe=>En.default.createElement(t,{key:qe.name,hit:qe,active:!1})),willReachEnd:je}):En.default.createElement(or.Text,{color:"gray"},"Start typing..."),En.default.createElement(or.Box,{flexDirection:"row",marginTop:1},En.default.createElement(or.Box,{width:49},En.default.createElement(or.Text,{bold:!0},"Selected:")),En.default.createElement(_,null)),he.length?he.map(qe=>En.default.createElement(k,{key:qe,name:qe,active:!1})):En.default.createElement(or.Text,{color:"gray"},"No selected packages..."),En.default.createElement(L,null))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof C=="undefined")return 1;let U=Array.from(C.keys()).filter(ne=>C.get(ne)==="regular"),H=Array.from(C.keys()).filter(ne=>C.get(ne)==="dev"),W=Array.from(C.keys()).filter(ne=>C.get(ne)==="peer");return U.length&&await this.cli.run(["add",...U]),H.length&&await this.cli.run(["add","--dev",...H]),W&&await this.cli.run(["add","--peer",...W]),0}};Ug.paths=[["search"]],Ug.usage=K5.Command.Usage({category:"Interactive commands",description:"open the search interface",details:` - This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry. - `,examples:[["Open the search window","yarn search"]]});var Q5=Ug;var O4=vu(require("@yarnpkg/cli")),xo=vu(require("@yarnpkg/core"));var jg=vu(lc()),_2=vu(Mi());var J5=vu(lc()),Z5=vu(Mi()),R4=({length:i,active:o})=>{if(i===0)return null;let a=i>1?` ${"-".repeat(i-1)}`:" ";return Z5.default.createElement(J5.Text,{dimColor:!o},a)};var $5=function({active:i,skewer:o,options:a,value:p,onChange:_,sizes:t=[]}){let k=a.filter(({label:O})=>!!O).map(({value:O})=>O),L=a.findIndex(O=>O.value===p&&O.label!="");return v4(p,k,{active:i,minus:"left",plus:"right",set:_}),_2.default.createElement(_2.default.Fragment,null,a.map(({label:O},C)=>{let U=C===L,H=t[C]-1||0,W=O.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,""),ne=Math.max(0,H-W.length-2);return O?_2.default.createElement(jg.Box,{key:O,width:H,marginLeft:1},_2.default.createElement(jg.Text,{wrap:"truncate"},_2.default.createElement(d4,{active:U})," ",O),o?_2.default.createElement(R4,{active:i,length:ne}):null):_2.default.createElement(jg.Box,{key:`spacer-${C}`,width:H,marginLeft:1})}))};var i9=vu(require("@yarnpkg/plugin-essentials")),M4=vu(require("clipanion"));function td(){}td.prototype={diff:function(o,a){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},_=p.callback;typeof p=="function"&&(_=p,p={}),this.options=p;var t=this;function k(he){return _?(setTimeout(function(){_(void 0,he)},0),!0):he}o=this.castInput(o),a=this.castInput(a),o=this.removeEmpty(this.tokenize(o)),a=this.removeEmpty(this.tokenize(a));var L=a.length,O=o.length,C=1,U=L+O;p.maxEditLength&&(U=Math.min(U,p.maxEditLength));var H=[{newPos:-1,components:[]}],W=this.extractCommon(H[0],a,o,0);if(H[0].newPos+1>=L&&W+1>=O)return k([{value:this.join(a),count:a.length}]);function ne(){for(var he=-1*C;he<=C;he+=2){var Ee=void 0,ve=H[he-1],se=H[he+1],De=(se?se.newPos:0)-he;ve&&(H[he-1]=void 0);var pe=ve&&ve.newPos+1=L&&De+1>=O)return k(Vz(t,Ee.components,a,o,t.useLongestToken));H[he]=Ee}C++}if(_)(function he(){setTimeout(function(){if(C>U)return _();ne()||he()},0)})();else for(;C<=U;){var m=ne();if(m)return m}},pushComponent:function(o,a,p){var _=o[o.length-1];_&&_.added===a&&_.removed===p?o[o.length-1]={count:_.count+1,added:a,removed:p}:o.push({count:1,added:a,removed:p})},extractCommon:function(o,a,p,_){for(var t=a.length,k=p.length,L=o.newPos,O=L-_,C=0;L+1ne.length?he:ne}),C.value=i.join(U)}else C.value=i.join(a.slice(L,L+C.count));L+=C.count,C.added||(O+=C.count)}}var W=o[k-1];return k>1&&typeof W.value=="string"&&(W.added||W.removed)&&i.equals("",W.value)&&(o[k-2].value+=W.value,o.pop()),o}function Gz(i){return{newPos:i.newPos,components:i.components.slice(0)}}var aV=new td;function Yz(i,o){if(typeof i=="function")o.callback=i;else if(i)for(var a in i)i.hasOwnProperty(a)&&(o[a]=i[a]);return o}var e9=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,t9=/\S/,$3=new td;$3.equals=function(i,o){return this.options.ignoreCase&&(i=i.toLowerCase(),o=o.toLowerCase()),i===o||this.options.ignoreWhitespace&&!t9.test(i)&&!t9.test(o)};$3.tokenize=function(i){for(var o=i.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),a=0;a=?)?)([0-9]+)(\.[0-9]+)(\.[0-9]+)((?:-\S+)?)$/,l9=(i,o)=>i.length>0?[i.slice(0,o)].concat(l9(i.slice(o),o)):[],Hg=class extends O4.BaseCommand{async execute(){if(!this.context.stdout.isTTY)throw new M4.UsageError("This command can only be run in a TTY environment");let o=await xo.Configuration.find(this.context.cwd,this.context.plugins),{project:a,workspace:p}=await xo.Project.find(o,this.context.cwd),_=await xo.Cache.find(o);if(!p)throw new O4.WorkspaceRequiredError(a.cwd,this.context.cwd);await a.restoreInstallState({restoreResolutions:!1});let t=this.context.stdout.rows-7,k=(se,De)=>{let pe=n9(se,De),me="";for(let ie of pe)ie.added?me+=xo.formatUtils.pretty(o,ie.value,"green"):ie.removed||(me+=ie.value);return me},L=(se,De)=>{if(se===De)return De;let pe=xo.structUtils.parseRange(se),me=xo.structUtils.parseRange(De),ie=pe.selector.match(o9),Oe=me.selector.match(o9);if(!ie||!Oe)return k(se,De);let je=["gray","red","yellow","green","magenta"],qe=null,yt="";for(let gt=1;gt{let me=await i9.suggestUtils.fetchDescriptorFrom(se,pe,{project:a,cache:_,preserveModifier:De,workspace:p});return me!==null?me.range:se.range},C=async se=>{let De=u9.default.valid(se.range)?`^${se.range}`:se.range,[pe,me]=await Promise.all([O(se,se.range,De).catch(()=>null),O(se,se.range,"latest").catch(()=>null)]),ie=[{value:null,label:se.range}];return pe&&pe!==se.range?ie.push({value:pe,label:L(se.range,pe)}):ie.push({value:null,label:""}),me&&me!==pe&&me!==se.range?ie.push({value:me,label:L(se.range,me)}):ie.push({value:null,label:""}),ie},U=()=>Tr.default.createElement(bi.Box,{flexDirection:"row"},Tr.default.createElement(bi.Box,{flexDirection:"column",width:49},Tr.default.createElement(bi.Box,{marginLeft:1},Tr.default.createElement(bi.Text,null,"Press ",Tr.default.createElement(bi.Text,{bold:!0,color:"cyanBright"},""),"/",Tr.default.createElement(bi.Text,{bold:!0,color:"cyanBright"},"")," to select packages.")),Tr.default.createElement(bi.Box,{marginLeft:1},Tr.default.createElement(bi.Text,null,"Press ",Tr.default.createElement(bi.Text,{bold:!0,color:"cyanBright"},""),"/",Tr.default.createElement(bi.Text,{bold:!0,color:"cyanBright"},"")," to select versions."))),Tr.default.createElement(bi.Box,{flexDirection:"column"},Tr.default.createElement(bi.Box,{marginLeft:1},Tr.default.createElement(bi.Text,null,"Press ",Tr.default.createElement(bi.Text,{bold:!0,color:"cyanBright"},"")," to install.")),Tr.default.createElement(bi.Box,{marginLeft:1},Tr.default.createElement(bi.Text,null,"Press ",Tr.default.createElement(bi.Text,{bold:!0,color:"cyanBright"},"")," to abort.")))),H=()=>Tr.default.createElement(bi.Box,{flexDirection:"row",paddingTop:1,paddingBottom:1},Tr.default.createElement(bi.Box,{width:50},Tr.default.createElement(bi.Text,{bold:!0},Tr.default.createElement(bi.Text,{color:"greenBright"},"?")," Pick the packages you want to upgrade.")),Tr.default.createElement(bi.Box,{width:17},Tr.default.createElement(bi.Text,{bold:!0,underline:!0,color:"gray"},"Current")),Tr.default.createElement(bi.Box,{width:17},Tr.default.createElement(bi.Text,{bold:!0,underline:!0,color:"gray"},"Range")),Tr.default.createElement(bi.Box,{width:17},Tr.default.createElement(bi.Text,{bold:!0,underline:!0,color:"gray"},"Latest"))),W=({active:se,descriptor:De,suggestions:pe})=>{let[me,ie]=lh(De.descriptorHash,null),Oe=xo.structUtils.stringifyIdent(De),je=Math.max(0,45-Oe.length);return Tr.default.createElement(Tr.default.Fragment,null,Tr.default.createElement(bi.Box,null,Tr.default.createElement(bi.Box,{width:45},Tr.default.createElement(bi.Text,{bold:!0},xo.structUtils.prettyIdent(o,De)),Tr.default.createElement(R4,{active:se,length:je})),Tr.default.createElement($5,{active:se,options:pe,value:me,skewer:!0,onChange:ie,sizes:[17,17,17]})))},ne=({dependencies:se})=>{let[De,pe]=(0,Tr.useState)(se.map(()=>null)),me=(0,Tr.useRef)(!0),ie=async Oe=>{let je=await C(Oe);return je.filter(qe=>qe.label!=="").length<=1?null:{descriptor:Oe,suggestions:je}};return(0,Tr.useEffect)(()=>()=>{me.current=!1},[]),(0,Tr.useEffect)(()=>{let Oe=Math.trunc(t*1.75),je=se.slice(0,Oe),qe=se.slice(Oe),yt=l9(qe,t),gt=je.map(ie).reduce(async(Xe,ut)=>{await Xe;let We=await ut;We!==null&&(!me.current||pe(Ft=>{let Jt=Ft.findIndex(Q=>Q===null),rt=[...Ft];return rt[Jt]=We,rt}))},Promise.resolve());yt.reduce((Xe,ut)=>Promise.all(ut.map(We=>Promise.resolve().then(()=>ie(We)))).then(async We=>{We=We.filter(Ft=>Ft!==null),await Xe,me.current&&pe(Ft=>{let Jt=Ft.findIndex(rt=>rt===null);return Ft.slice(0,Jt).concat(We).concat(Ft.slice(Jt+We.length))})}),gt).then(()=>{me.current&&pe(Xe=>Xe.filter(ut=>ut!==null))})},[]),De.length?Tr.default.createElement(m4,{radius:t>>1,children:De.map((Oe,je)=>Oe!==null?Tr.default.createElement(W,{key:je,active:!1,descriptor:Oe.descriptor,suggestions:Oe.suggestions}):Tr.default.createElement(bi.Text,{key:je},"Loading..."))}):Tr.default.createElement(bi.Text,null,"No upgrades found")},he=await _4(({useSubmit:se})=>{se(lh());let De=new Map;for(let me of a.workspaces)for(let ie of["dependencies","devDependencies"])for(let Oe of me.manifest[ie].values())a.tryWorkspaceByDescriptor(Oe)===null&&De.set(Oe.descriptorHash,Oe);let pe=xo.miscUtils.sortMap(De.values(),me=>xo.structUtils.stringifyDescriptor(me));return Tr.default.createElement(bi.Box,{flexDirection:"column"},Tr.default.createElement(U,null),Tr.default.createElement(H,null),Tr.default.createElement(ne,{dependencies:pe}))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof he=="undefined")return 1;let Ee=!1;for(let se of a.workspaces)for(let De of["dependencies","devDependencies"]){let pe=se.manifest[De];for(let me of pe.values()){let ie=he.get(me.descriptorHash);typeof ie!="undefined"&&ie!==null&&(pe.set(me.identHash,xo.structUtils.makeDescriptor(me,ie)),Ee=!0)}}return Ee?(await xo.StreamReport.start({configuration:o,stdout:this.context.stdout,includeLogs:!this.context.quiet},async se=>{await a.install({cache:_,report:se})})).exitCode():0}};Hg.paths=[["upgrade-interactive"]],Hg.usage=M4.Command.Usage({category:"Interactive commands",description:"open the upgrade interface",details:` - This command opens a fullscreen terminal interface where you can see any out of date packages used by your application, their status compared to the latest versions available on the remote registry, and select packages to upgrade. - `,examples:[["Open the upgrade window","yarn upgrade-interactive"]]});var s9=Hg;var Zz={commands:[Q5,s9]},$z=Zz;return Jz;})(); -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ -/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ -/** @license React v0.0.0-experimental-51a3aa6af - * react-debug-tools.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.0.0-experimental-51a3aa6af - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.0.0-experimental-51a3aa6af - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.18.0 - * scheduler-tracing.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.18.0 - * scheduler-tracing.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.18.0 - * scheduler.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.18.0 - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.24.0 - * react-reconciler.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.24.0 - * react-reconciler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v16.13.1 - * react.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v16.13.1 - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -return plugin; -} -}; diff --git a/.yarn/plugins/@yarnpkg/plugin-stage.cjs b/.yarn/plugins/@yarnpkg/plugin-stage.cjs deleted file mode 100644 index 8e80618e..00000000 --- a/.yarn/plugins/@yarnpkg/plugin-stage.cjs +++ /dev/null @@ -1,14 +0,0 @@ -/* eslint-disable */ -//prettier-ignore -module.exports = { -name: "@yarnpkg/plugin-stage", -factory: function (require) { -var plugin=(()=>{var N=Object.create,x=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var W=Object.getPrototypeOf,J=Object.prototype.hasOwnProperty;var K=t=>x(t,"__esModule",{value:!0});var Z=(t,e)=>{for(var s in e)x(t,s,{get:e[s],enumerable:!0})},q=(t,e,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of _(e))!J.call(t,a)&&a!=="default"&&x(t,a,{get:()=>e[a],enumerable:!(s=G(e,a))||s.enumerable});return t},w=t=>q(K(x(t!=null?N(W(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var ot={};Z(ot,{default:()=>ct});var V=w(require("@yarnpkg/cli")),D=w(require("@yarnpkg/core")),y=w(require("@yarnpkg/fslib")),p=w(require("clipanion"));var l=w(require("@yarnpkg/core")),d=w(require("@yarnpkg/fslib"));var f=w(require("@yarnpkg/fslib")),i;(function(r){r[r.CREATE=0]="CREATE",r[r.DELETE=1]="DELETE",r[r.ADD=2]="ADD",r[r.REMOVE=3]="REMOVE",r[r.MODIFY=4]="MODIFY"})(i||(i={}));async function v(t,{marker:e}){do if(!f.xfs.existsSync(f.ppath.join(t,e)))t=f.ppath.dirname(t);else return t;while(t!=="/");return null}function L(t,{roots:e,names:s}){if(s.has(f.ppath.basename(t)))return!0;do if(!e.has(t))t=f.ppath.dirname(t);else return!0;while(t!=="/");return!1}function $(t){let e=[],s=[t];for(;s.length>0;){let a=s.pop(),n=f.xfs.readdirSync(a);for(let r of n){let m=f.ppath.resolve(a,r);f.xfs.lstatSync(m).isDirectory()?s.push(m):e.push(m)}}return e}function T(t,e){let s=0,a=0;for(let n of t)n!=="wip"&&(e.test(n)?s+=1:a+=1);return s>=a}function I(t){let e=T(t,/^(\w\(\w+\):\s*)?\w+s/),s=T(t,/^(\w\(\w+\):\s*)?[A-Z]/),a=T(t,/^\w\(\w+\):/);return{useThirdPerson:e,useUpperCase:s,useComponent:a}}function z(t){return t.useComponent?"chore(yarn): ":""}var Q=new Map([[0,"create"],[1,"delete"],[2,"add"],[3,"remove"],[4,"update"]]);function H(t,e){let s=z(t),a=[],n=e.slice().sort((r,m)=>r[0]-m[0]);for(;n.length>0;){let[r,m]=n.shift(),h=Q.get(r);t.useUpperCase&&a.length===0&&(h=`${h[0].toUpperCase()}${h.slice(1)}`),t.useThirdPerson&&(h+="s");let o=[m];for(;n.length>0&&n[0][0]===r;){let[,c]=n.shift();o.push(c)}o.sort();let g=o.shift();o.length===1?g+=" (and one other)":o.length>1&&(g+=` (and ${o.length} others)`),a.push(`${h} ${g}`)}return`${s}${a.join(", ")}`}var X="Commit generated via `yarn stage`",tt=11;async function j(t){let{code:e,stdout:s}=await l.execUtils.execvp("git",["log","-1","--pretty=format:%H"],{cwd:t});return e===0?s.trim():null}async function et(t,e){let s=[],a=e.filter(g=>d.ppath.basename(g.path)==="package.json");for(let{action:g,path:c}of a){let P=d.ppath.relative(t,c);if(g===i.MODIFY){let u=await j(t),{stdout:b}=await l.execUtils.execvp("git",["show",`${u}:${P}`],{cwd:t,strict:!0}),A=await l.Manifest.fromText(b),M=await l.Manifest.fromFile(c),F=new Map([...M.dependencies,...M.devDependencies]),R=new Map([...A.dependencies,...A.devDependencies]);for(let[C,U]of R){let S=l.structUtils.stringifyIdent(U),k=F.get(C);k?k.range!==U.range&&s.push([i.MODIFY,`${S} to ${k.range}`]):s.push([i.REMOVE,S])}for(let[C,U]of F)R.has(C)||s.push([i.ADD,l.structUtils.stringifyIdent(U)])}else if(g===i.CREATE){let u=await l.Manifest.fromFile(c);u.name?s.push([i.CREATE,l.structUtils.stringifyIdent(u.name)]):s.push([i.CREATE,"a package"])}else if(g===i.DELETE){let u=await j(t),{stdout:b}=await l.execUtils.execvp("git",["show",`${u}:${P}`],{cwd:t,strict:!0}),A=await l.Manifest.fromText(b);A.name?s.push([i.DELETE,l.structUtils.stringifyIdent(A.name)]):s.push([i.DELETE,"a package"])}else throw new Error("Assertion failed: Unsupported action type")}let{code:n,stdout:r}=await l.execUtils.execvp("git",["log",`-${tt}`,"--pretty=format:%s"],{cwd:t}),m=n===0?r.split(/\n/g).filter(g=>g!==""):[],h=I(m);return H(h,s)}var st={[i.CREATE]:[" A ","?? "],[i.MODIFY]:[" M "],[i.DELETE]:[" D "]},at={[i.CREATE]:["A "],[i.MODIFY]:["M "],[i.DELETE]:["D "]},Y={async findRoot(t){return await v(t,{marker:".git"})},async filterChanges(t,e,s,a){let{stdout:n}=await l.execUtils.execvp("git",["status","-s"],{cwd:t,strict:!0}),r=n.toString().split(/\n/g),m=(a==null?void 0:a.staged)?at:st;return[].concat(...r.map(o=>{if(o==="")return[];let g=o.slice(0,3),c=d.ppath.resolve(t,o.slice(3));if(!(a==null?void 0:a.staged)&&g==="?? "&&o.endsWith("/"))return $(c).map(P=>({action:i.CREATE,path:P}));{let u=[i.CREATE,i.MODIFY,i.DELETE].find(b=>m[b].includes(g));return u!==void 0?[{action:u,path:c}]:[]}})).filter(o=>L(o.path,{roots:e,names:s}))},async genCommitMessage(t,e){return await et(t,e)},async makeStage(t,e){let s=e.map(a=>d.npath.fromPortablePath(a.path));await l.execUtils.execvp("git",["add","--",...s],{cwd:t,strict:!0})},async makeCommit(t,e,s){let a=e.map(n=>d.npath.fromPortablePath(n.path));await l.execUtils.execvp("git",["add","-N","--",...a],{cwd:t,strict:!0}),await l.execUtils.execvp("git",["commit","-m",`${s} - -${X} -`,"--",...a],{cwd:t,strict:!0})},async makeReset(t,e){let s=e.map(a=>d.npath.fromPortablePath(a.path));await l.execUtils.execvp("git",["reset","HEAD","--",...s],{cwd:t,strict:!0})}};var O={async findRoot(t){return await v(t,{marker:".hg"})},async filterChanges(t,e,s){return[]},async genCommitMessage(t,e){return""},async makeStage(t,e){},async makeCommit(t,e,s){},async makeReset(t,e){},async makeUpdate(t,e){}};var it=[Y,O],E=class extends V.BaseCommand{constructor(){super(...arguments);this.commit=p.Option.Boolean("-c,--commit",!1,{description:"Commit the staged files"});this.reset=p.Option.Boolean("-r,--reset",!1,{description:"Remove all files from the staging area"});this.dryRun=p.Option.Boolean("-n,--dry-run",!1,{description:"Print the commit message and the list of modified files without staging / committing"});this.update=p.Option.Boolean("-u,--update",!1,{hidden:!0})}async execute(){let e=await D.Configuration.find(this.context.cwd,this.context.plugins),{project:s}=await D.Project.find(e,this.context.cwd),{driver:a,root:n}=await nt(s.cwd),r=[e.get("cacheFolder"),e.get("globalFolder"),e.get("virtualFolder"),e.get("yarnPath")];await e.triggerHook(c=>c.populateYarnPaths,s,c=>{r.push(c)});let m=new Set;for(let c of r)for(let P of rt(n,c))m.add(P);let h=new Set([e.get("rcFilename"),e.get("lockfileFilename"),"package.json"]),o=await a.filterChanges(n,m,h),g=await a.genCommitMessage(n,o);if(this.dryRun)if(this.commit)this.context.stdout.write(`${g} -`);else for(let c of o)this.context.stdout.write(`${y.npath.fromPortablePath(c.path)} -`);else if(this.reset){let c=await a.filterChanges(n,m,h,{staged:!0});c.length===0?this.context.stdout.write("No staged changes found!"):await a.makeReset(n,c)}else o.length===0?this.context.stdout.write("No changes found!"):this.commit?await a.makeCommit(n,o,g):(await a.makeStage(n,o),this.context.stdout.write(g))}};E.paths=[["stage"]],E.usage=p.Command.Usage({description:"add all yarn files to your vcs",details:"\n This command will add to your staging area the files belonging to Yarn (typically any modified `package.json` and `.yarnrc.yml` files, but also linker-generated files, cache data, etc). It will take your ignore list into account, so the cache files won't be added if the cache is ignored in a `.gitignore` file (assuming you use Git).\n\n Running `--reset` will instead remove them from the staging area (the changes will still be there, but won't be committed until you stage them back).\n\n Since the staging area is a non-existent concept in Mercurial, Yarn will always create a new commit when running this command on Mercurial repositories. You can get this behavior when using Git by using the `--commit` flag which will directly create a commit.\n ",examples:[["Adds all modified project files to the staging area","yarn stage"],["Creates a new commit containing all modified project files","yarn stage --commit"]]});var B=E;async function nt(t){let e=null,s=null;for(let a of it)if((s=await a.findRoot(t))!==null){e=a;break}if(e===null||s===null)throw new p.UsageError("No stage driver has been found for your current project");return{driver:e,root:s}}function rt(t,e){let s=[];if(e===null)return s;for(;;){(e===t||e.startsWith(`${t}/`))&&s.push(e);let a;try{a=y.xfs.statSync(e)}catch(n){break}if(a.isSymbolicLink())e=y.ppath.resolve(y.ppath.dirname(e),y.xfs.readlinkSync(e));else break}return s}var lt={commands:[B]},ct=lt;return ot;})(); -return plugin; -} -}; diff --git a/.yarn/plugins/@yarnpkg/plugin-version.cjs b/.yarn/plugins/@yarnpkg/plugin-version.cjs deleted file mode 100644 index 7f3bbd81..00000000 --- a/.yarn/plugins/@yarnpkg/plugin-version.cjs +++ /dev/null @@ -1,550 +0,0 @@ -/* eslint-disable */ -//prettier-ignore -module.exports = { -name: "@yarnpkg/plugin-version", -factory: function (require) { -var plugin=(()=>{var ZB=Object.create,zy=Object.defineProperty,$B=Object.defineProperties,eU=Object.getOwnPropertyDescriptor,tU=Object.getOwnPropertyDescriptors,nU=Object.getOwnPropertyNames,uS=Object.getOwnPropertySymbols,rU=Object.getPrototypeOf,oS=Object.prototype.hasOwnProperty,iU=Object.prototype.propertyIsEnumerable;var lS=(i,o,f)=>o in i?zy(i,o,{enumerable:!0,configurable:!0,writable:!0,value:f}):i[o]=f,E0=(i,o)=>{for(var f in o||(o={}))oS.call(o,f)&&lS(i,f,o[f]);if(uS)for(var f of uS(o))iU.call(o,f)&&lS(i,f,o[f]);return i},Gf=(i,o)=>$B(i,tU(o)),uU=i=>zy(i,"__esModule",{value:!0});var ce=(i,o)=>()=>(o||i((o={exports:{}}).exports,o),o.exports),sS=(i,o)=>{for(var f in o)zy(i,f,{get:o[f],enumerable:!0})},oU=(i,o,f)=>{if(o&&typeof o=="object"||typeof o=="function")for(let p of nU(o))!oS.call(i,p)&&p!=="default"&&zy(i,p,{get:()=>o[p],enumerable:!(f=eU(o,p))||f.enumerable});return i},Mi=i=>oU(uU(zy(i!=null?ZB(rU(i)):{},"default",i&&i.__esModule&&"default"in i?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i);var eD=ce((F$,aS)=>{function lU(i,o){for(var f=-1,p=i==null?0:i.length,E=Array(p);++f{function sU(){this.__data__=[],this.size=0}fS.exports=sU});var tD=ce((P$,dS)=>{function aU(i,o){return i===o||i!==i&&o!==o}dS.exports=aU});var qy=ce((I$,pS)=>{var fU=tD();function cU(i,o){for(var f=i.length;f--;)if(fU(i[f][0],o))return f;return-1}pS.exports=cU});var vS=ce((B$,hS)=>{var dU=qy(),pU=Array.prototype,hU=pU.splice;function vU(i){var o=this.__data__,f=dU(o,i);if(f<0)return!1;var p=o.length-1;return f==p?o.pop():hU.call(o,f,1),--this.size,!0}hS.exports=vU});var yS=ce((U$,mS)=>{var mU=qy();function yU(i){var o=this.__data__,f=mU(o,i);return f<0?void 0:o[f][1]}mS.exports=yU});var _S=ce((j$,gS)=>{var gU=qy();function _U(i){return gU(this.__data__,i)>-1}gS.exports=_U});var DS=ce((z$,ES)=>{var EU=qy();function DU(i,o){var f=this.__data__,p=EU(f,i);return p<0?(++this.size,f.push([i,o])):f[p][1]=o,this}ES.exports=DU});var Hy=ce((q$,wS)=>{var wU=cS(),SU=vS(),TU=yS(),CU=_S(),xU=DS();function jv(i){var o=-1,f=i==null?0:i.length;for(this.clear();++o{var AU=Hy();function RU(){this.__data__=new AU,this.size=0}SS.exports=RU});var xS=ce((W$,CS)=>{function OU(i){var o=this.__data__,f=o.delete(i);return this.size=o.size,f}CS.exports=OU});var RS=ce((V$,AS)=>{function kU(i){return this.__data__.get(i)}AS.exports=kU});var kS=ce((G$,OS)=>{function MU(i){return this.__data__.has(i)}OS.exports=MU});var nD=ce((Y$,MS)=>{var NU=typeof global=="object"&&global&&global.Object===Object&&global;MS.exports=NU});var Yf=ce((K$,NS)=>{var LU=nD(),FU=typeof self=="object"&&self&&self.Object===Object&&self,bU=LU||FU||Function("return this")();NS.exports=bU});var zv=ce((X$,LS)=>{var PU=Yf(),IU=PU.Symbol;LS.exports=IU});var BS=ce((Q$,bS)=>{var PS=zv(),IS=Object.prototype,BU=IS.hasOwnProperty,UU=IS.toString,Wy=PS?PS.toStringTag:void 0;function jU(i){var o=BU.call(i,Wy),f=i[Wy];try{i[Wy]=void 0;var p=!0}catch(t){}var E=UU.call(i);return p&&(o?i[Wy]=f:delete i[Wy]),E}bS.exports=jU});var jS=ce((J$,US)=>{var zU=Object.prototype,qU=zU.toString;function HU(i){return qU.call(i)}US.exports=HU});var Qp=ce((Z$,zS)=>{var qS=zv(),WU=BS(),VU=jS(),GU="[object Null]",YU="[object Undefined]",HS=qS?qS.toStringTag:void 0;function KU(i){return i==null?i===void 0?YU:GU:HS&&HS in Object(i)?WU(i):VU(i)}zS.exports=KU});var qv=ce(($$,WS)=>{function XU(i){var o=typeof i;return i!=null&&(o=="object"||o=="function")}WS.exports=XU});var rD=ce((eee,VS)=>{var QU=Qp(),JU=qv(),ZU="[object AsyncFunction]",$U="[object Function]",ej="[object GeneratorFunction]",tj="[object Proxy]";function nj(i){if(!JU(i))return!1;var o=QU(i);return o==$U||o==ej||o==ZU||o==tj}VS.exports=nj});var YS=ce((tee,GS)=>{var rj=Yf(),ij=rj["__core-js_shared__"];GS.exports=ij});var QS=ce((nee,KS)=>{var iD=YS(),XS=function(){var i=/[^.]+$/.exec(iD&&iD.keys&&iD.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function uj(i){return!!XS&&XS in i}KS.exports=uj});var uD=ce((ree,JS)=>{var oj=Function.prototype,lj=oj.toString;function sj(i){if(i!=null){try{return lj.call(i)}catch(o){}try{return i+""}catch(o){}}return""}JS.exports=sj});var $S=ce((iee,ZS)=>{var aj=rD(),fj=QS(),cj=qv(),dj=uD(),pj=/[\\^$.*+?()[\]{}|]/g,hj=/^\[object .+?Constructor\]$/,vj=Function.prototype,mj=Object.prototype,yj=vj.toString,gj=mj.hasOwnProperty,_j=RegExp("^"+yj.call(gj).replace(pj,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ej(i){if(!cj(i)||fj(i))return!1;var o=aj(i)?_j:hj;return o.test(dj(i))}ZS.exports=Ej});var tT=ce((uee,eT)=>{function Dj(i,o){return i==null?void 0:i[o]}eT.exports=Dj});var sd=ce((oee,nT)=>{var wj=$S(),Sj=tT();function Tj(i,o){var f=Sj(i,o);return wj(f)?f:void 0}nT.exports=Tj});var L_=ce((lee,rT)=>{var Cj=sd(),xj=Yf(),Aj=Cj(xj,"Map");rT.exports=Aj});var Vy=ce((see,iT)=>{var Rj=sd(),Oj=Rj(Object,"create");iT.exports=Oj});var lT=ce((aee,uT)=>{var oT=Vy();function kj(){this.__data__=oT?oT(null):{},this.size=0}uT.exports=kj});var aT=ce((fee,sT)=>{function Mj(i){var o=this.has(i)&&delete this.__data__[i];return this.size-=o?1:0,o}sT.exports=Mj});var cT=ce((cee,fT)=>{var Nj=Vy(),Lj="__lodash_hash_undefined__",Fj=Object.prototype,bj=Fj.hasOwnProperty;function Pj(i){var o=this.__data__;if(Nj){var f=o[i];return f===Lj?void 0:f}return bj.call(o,i)?o[i]:void 0}fT.exports=Pj});var pT=ce((dee,dT)=>{var Ij=Vy(),Bj=Object.prototype,Uj=Bj.hasOwnProperty;function jj(i){var o=this.__data__;return Ij?o[i]!==void 0:Uj.call(o,i)}dT.exports=jj});var vT=ce((pee,hT)=>{var zj=Vy(),qj="__lodash_hash_undefined__";function Hj(i,o){var f=this.__data__;return this.size+=this.has(i)?0:1,f[i]=zj&&o===void 0?qj:o,this}hT.exports=Hj});var yT=ce((hee,mT)=>{var Wj=lT(),Vj=aT(),Gj=cT(),Yj=pT(),Kj=vT();function Hv(i){var o=-1,f=i==null?0:i.length;for(this.clear();++o{var _T=yT(),Xj=Hy(),Qj=L_();function Jj(){this.size=0,this.__data__={hash:new _T,map:new(Qj||Xj),string:new _T}}gT.exports=Jj});var wT=ce((mee,DT)=>{function Zj(i){var o=typeof i;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?i!=="__proto__":i===null}DT.exports=Zj});var Gy=ce((yee,ST)=>{var $j=wT();function ez(i,o){var f=i.__data__;return $j(o)?f[typeof o=="string"?"string":"hash"]:f.map}ST.exports=ez});var CT=ce((gee,TT)=>{var tz=Gy();function nz(i){var o=tz(this,i).delete(i);return this.size-=o?1:0,o}TT.exports=nz});var AT=ce((_ee,xT)=>{var rz=Gy();function iz(i){return rz(this,i).get(i)}xT.exports=iz});var OT=ce((Eee,RT)=>{var uz=Gy();function oz(i){return uz(this,i).has(i)}RT.exports=oz});var MT=ce((Dee,kT)=>{var lz=Gy();function sz(i,o){var f=lz(this,i),p=f.size;return f.set(i,o),this.size+=f.size==p?0:1,this}kT.exports=sz});var oD=ce((wee,NT)=>{var az=ET(),fz=CT(),cz=AT(),dz=OT(),pz=MT();function Wv(i){var o=-1,f=i==null?0:i.length;for(this.clear();++o{var hz=Hy(),vz=L_(),mz=oD(),yz=200;function gz(i,o){var f=this.__data__;if(f instanceof hz){var p=f.__data__;if(!vz||p.length{var _z=Hy(),Ez=TS(),Dz=xS(),wz=RS(),Sz=kS(),Tz=FT();function Vv(i){var o=this.__data__=new _z(i);this.size=o.size}Vv.prototype.clear=Ez;Vv.prototype.delete=Dz;Vv.prototype.get=wz;Vv.prototype.has=Sz;Vv.prototype.set=Tz;bT.exports=Vv});var BT=ce((Cee,IT)=>{function Cz(i,o){for(var f=-1,p=i==null?0:i.length;++f{var xz=sd(),Az=function(){try{var i=xz(Object,"defineProperty");return i({},"",{}),i}catch(o){}}();UT.exports=Az});var sD=ce((Aee,jT)=>{var zT=lD();function Rz(i,o,f){o=="__proto__"&&zT?zT(i,o,{configurable:!0,enumerable:!0,value:f,writable:!0}):i[o]=f}jT.exports=Rz});var aD=ce((Ree,qT)=>{var Oz=sD(),kz=tD(),Mz=Object.prototype,Nz=Mz.hasOwnProperty;function Lz(i,o,f){var p=i[o];(!(Nz.call(i,o)&&kz(p,f))||f===void 0&&!(o in i))&&Oz(i,o,f)}qT.exports=Lz});var Gv=ce((Oee,HT)=>{var Fz=aD(),bz=sD();function Pz(i,o,f,p){var E=!f;f||(f={});for(var t=-1,k=o.length;++t{function Iz(i,o){for(var f=-1,p=Array(i);++f{function Bz(i){return i!=null&&typeof i=="object"}GT.exports=Bz});var KT=ce((Nee,YT)=>{var Uz=Qp(),jz=ad(),zz="[object Arguments]";function qz(i){return jz(i)&&Uz(i)==zz}YT.exports=qz});var fD=ce((Lee,XT)=>{var QT=KT(),Hz=ad(),JT=Object.prototype,Wz=JT.hasOwnProperty,Vz=JT.propertyIsEnumerable,Gz=QT(function(){return arguments}())?QT:function(i){return Hz(i)&&Wz.call(i,"callee")&&!Vz.call(i,"callee")};XT.exports=Gz});var fd=ce((Fee,ZT)=>{var Yz=Array.isArray;ZT.exports=Yz});var eC=ce((bee,$T)=>{function Kz(){return!1}$T.exports=Kz});var cD=ce((Yy,Yv)=>{var Xz=Yf(),Qz=eC(),tC=typeof Yy=="object"&&Yy&&!Yy.nodeType&&Yy,nC=tC&&typeof Yv=="object"&&Yv&&!Yv.nodeType&&Yv,Jz=nC&&nC.exports===tC,rC=Jz?Xz.Buffer:void 0,Zz=rC?rC.isBuffer:void 0,$z=Zz||Qz;Yv.exports=$z});var uC=ce((Pee,iC)=>{var eq=9007199254740991,tq=/^(?:0|[1-9]\d*)$/;function nq(i,o){var f=typeof i;return o=o==null?eq:o,!!o&&(f=="number"||f!="symbol"&&tq.test(i))&&i>-1&&i%1==0&&i{var rq=9007199254740991;function iq(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=rq}oC.exports=iq});var sC=ce((Bee,lC)=>{var uq=Qp(),oq=dD(),lq=ad(),sq="[object Arguments]",aq="[object Array]",fq="[object Boolean]",cq="[object Date]",dq="[object Error]",pq="[object Function]",hq="[object Map]",vq="[object Number]",mq="[object Object]",yq="[object RegExp]",gq="[object Set]",_q="[object String]",Eq="[object WeakMap]",Dq="[object ArrayBuffer]",wq="[object DataView]",Sq="[object Float32Array]",Tq="[object Float64Array]",Cq="[object Int8Array]",xq="[object Int16Array]",Aq="[object Int32Array]",Rq="[object Uint8Array]",Oq="[object Uint8ClampedArray]",kq="[object Uint16Array]",Mq="[object Uint32Array]",o0={};o0[Sq]=o0[Tq]=o0[Cq]=o0[xq]=o0[Aq]=o0[Rq]=o0[Oq]=o0[kq]=o0[Mq]=!0;o0[sq]=o0[aq]=o0[Dq]=o0[fq]=o0[wq]=o0[cq]=o0[dq]=o0[pq]=o0[hq]=o0[vq]=o0[mq]=o0[yq]=o0[gq]=o0[_q]=o0[Eq]=!1;function Nq(i){return lq(i)&&oq(i.length)&&!!o0[uq(i)]}lC.exports=Nq});var F_=ce((Uee,aC)=>{function Lq(i){return function(o){return i(o)}}aC.exports=Lq});var b_=ce((Ky,Kv)=>{var Fq=nD(),fC=typeof Ky=="object"&&Ky&&!Ky.nodeType&&Ky,Xy=fC&&typeof Kv=="object"&&Kv&&!Kv.nodeType&&Kv,bq=Xy&&Xy.exports===fC,pD=bq&&Fq.process,Pq=function(){try{var i=Xy&&Xy.require&&Xy.require("util").types;return i||pD&&pD.binding&&pD.binding("util")}catch(o){}}();Kv.exports=Pq});var hC=ce((jee,cC)=>{var Iq=sC(),Bq=F_(),dC=b_(),pC=dC&&dC.isTypedArray,Uq=pC?Bq(pC):Iq;cC.exports=Uq});var hD=ce((zee,vC)=>{var jq=VT(),zq=fD(),qq=fd(),Hq=cD(),Wq=uC(),Vq=hC(),Gq=Object.prototype,Yq=Gq.hasOwnProperty;function Kq(i,o){var f=qq(i),p=!f&&zq(i),E=!f&&!p&&Hq(i),t=!f&&!p&&!E&&Vq(i),k=f||p||E||t,L=k?jq(i.length,String):[],N=L.length;for(var C in i)(o||Yq.call(i,C))&&!(k&&(C=="length"||E&&(C=="offset"||C=="parent")||t&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||Wq(C,N)))&&L.push(C);return L}vC.exports=Kq});var P_=ce((qee,mC)=>{var Xq=Object.prototype;function Qq(i){var o=i&&i.constructor,f=typeof o=="function"&&o.prototype||Xq;return i===f}mC.exports=Qq});var vD=ce((Hee,yC)=>{function Jq(i,o){return function(f){return i(o(f))}}yC.exports=Jq});var _C=ce((Wee,gC)=>{var Zq=vD(),$q=Zq(Object.keys,Object);gC.exports=$q});var DC=ce((Vee,EC)=>{var eH=P_(),tH=_C(),nH=Object.prototype,rH=nH.hasOwnProperty;function iH(i){if(!eH(i))return tH(i);var o=[];for(var f in Object(i))rH.call(i,f)&&f!="constructor"&&o.push(f);return o}EC.exports=iH});var mD=ce((Gee,wC)=>{var uH=rD(),oH=dD();function lH(i){return i!=null&&oH(i.length)&&!uH(i)}wC.exports=lH});var I_=ce((Yee,SC)=>{var sH=hD(),aH=DC(),fH=mD();function cH(i){return fH(i)?sH(i):aH(i)}SC.exports=cH});var CC=ce((Kee,TC)=>{var dH=Gv(),pH=I_();function hH(i,o){return i&&dH(o,pH(o),i)}TC.exports=hH});var AC=ce((Xee,xC)=>{function vH(i){var o=[];if(i!=null)for(var f in Object(i))o.push(f);return o}xC.exports=vH});var OC=ce((Qee,RC)=>{var mH=qv(),yH=P_(),gH=AC(),_H=Object.prototype,EH=_H.hasOwnProperty;function DH(i){if(!mH(i))return gH(i);var o=yH(i),f=[];for(var p in i)p=="constructor"&&(o||!EH.call(i,p))||f.push(p);return f}RC.exports=DH});var B_=ce((Jee,kC)=>{var wH=hD(),SH=OC(),TH=mD();function CH(i){return TH(i)?wH(i,!0):SH(i)}kC.exports=CH});var NC=ce((Zee,MC)=>{var xH=Gv(),AH=B_();function RH(i,o){return i&&xH(o,AH(o),i)}MC.exports=RH});var IC=ce((Qy,Xv)=>{var OH=Yf(),LC=typeof Qy=="object"&&Qy&&!Qy.nodeType&&Qy,FC=LC&&typeof Xv=="object"&&Xv&&!Xv.nodeType&&Xv,kH=FC&&FC.exports===LC,bC=kH?OH.Buffer:void 0,PC=bC?bC.allocUnsafe:void 0;function MH(i,o){if(o)return i.slice();var f=i.length,p=PC?PC(f):new i.constructor(f);return i.copy(p),p}Xv.exports=MH});var UC=ce(($ee,BC)=>{function NH(i,o){var f=-1,p=i.length;for(o||(o=Array(p));++f{function LH(i,o){for(var f=-1,p=i==null?0:i.length,E=0,t=[];++f{function FH(){return[]}qC.exports=FH});var U_=ce((nte,HC)=>{var bH=zC(),PH=yD(),IH=Object.prototype,BH=IH.propertyIsEnumerable,WC=Object.getOwnPropertySymbols,UH=WC?function(i){return i==null?[]:(i=Object(i),bH(WC(i),function(o){return BH.call(i,o)}))}:PH;HC.exports=UH});var GC=ce((rte,VC)=>{var jH=Gv(),zH=U_();function qH(i,o){return jH(i,zH(i),o)}VC.exports=qH});var j_=ce((ite,YC)=>{function HH(i,o){for(var f=-1,p=o.length,E=i.length;++f{var WH=vD(),VH=WH(Object.getPrototypeOf,Object);KC.exports=VH});var gD=ce((ote,XC)=>{var GH=j_(),YH=z_(),KH=U_(),XH=yD(),QH=Object.getOwnPropertySymbols,JH=QH?function(i){for(var o=[];i;)GH(o,KH(i)),i=YH(i);return o}:XH;XC.exports=JH});var JC=ce((lte,QC)=>{var ZH=Gv(),$H=gD();function eW(i,o){return ZH(i,$H(i),o)}QC.exports=eW});var _D=ce((ste,ZC)=>{var tW=j_(),nW=fd();function rW(i,o,f){var p=o(i);return nW(i)?p:tW(p,f(i))}ZC.exports=rW});var e6=ce((ate,$C)=>{var iW=_D(),uW=U_(),oW=I_();function lW(i){return iW(i,oW,uW)}$C.exports=lW});var ED=ce((fte,t6)=>{var sW=_D(),aW=gD(),fW=B_();function cW(i){return sW(i,fW,aW)}t6.exports=cW});var r6=ce((cte,n6)=>{var dW=sd(),pW=Yf(),hW=dW(pW,"DataView");n6.exports=hW});var u6=ce((dte,i6)=>{var vW=sd(),mW=Yf(),yW=vW(mW,"Promise");i6.exports=yW});var l6=ce((pte,o6)=>{var gW=sd(),_W=Yf(),EW=gW(_W,"Set");o6.exports=EW});var a6=ce((hte,s6)=>{var DW=sd(),wW=Yf(),SW=DW(wW,"WeakMap");s6.exports=SW});var q_=ce((vte,f6)=>{var DD=r6(),wD=L_(),SD=u6(),TD=l6(),CD=a6(),c6=Qp(),Qv=uD(),d6="[object Map]",TW="[object Object]",p6="[object Promise]",h6="[object Set]",v6="[object WeakMap]",m6="[object DataView]",CW=Qv(DD),xW=Qv(wD),AW=Qv(SD),RW=Qv(TD),OW=Qv(CD),Jp=c6;(DD&&Jp(new DD(new ArrayBuffer(1)))!=m6||wD&&Jp(new wD)!=d6||SD&&Jp(SD.resolve())!=p6||TD&&Jp(new TD)!=h6||CD&&Jp(new CD)!=v6)&&(Jp=function(i){var o=c6(i),f=o==TW?i.constructor:void 0,p=f?Qv(f):"";if(p)switch(p){case CW:return m6;case xW:return d6;case AW:return p6;case RW:return h6;case OW:return v6}return o});f6.exports=Jp});var g6=ce((mte,y6)=>{var kW=Object.prototype,MW=kW.hasOwnProperty;function NW(i){var o=i.length,f=new i.constructor(o);return o&&typeof i[0]=="string"&&MW.call(i,"index")&&(f.index=i.index,f.input=i.input),f}y6.exports=NW});var E6=ce((yte,_6)=>{var LW=Yf(),FW=LW.Uint8Array;_6.exports=FW});var H_=ce((gte,D6)=>{var w6=E6();function bW(i){var o=new i.constructor(i.byteLength);return new w6(o).set(new w6(i)),o}D6.exports=bW});var T6=ce((_te,S6)=>{var PW=H_();function IW(i,o){var f=o?PW(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.byteLength)}S6.exports=IW});var x6=ce((Ete,C6)=>{var BW=/\w*$/;function UW(i){var o=new i.constructor(i.source,BW.exec(i));return o.lastIndex=i.lastIndex,o}C6.exports=UW});var M6=ce((Dte,A6)=>{var R6=zv(),O6=R6?R6.prototype:void 0,k6=O6?O6.valueOf:void 0;function jW(i){return k6?Object(k6.call(i)):{}}A6.exports=jW});var L6=ce((wte,N6)=>{var zW=H_();function qW(i,o){var f=o?zW(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.length)}N6.exports=qW});var b6=ce((Ste,F6)=>{var HW=H_(),WW=T6(),VW=x6(),GW=M6(),YW=L6(),KW="[object Boolean]",XW="[object Date]",QW="[object Map]",JW="[object Number]",ZW="[object RegExp]",$W="[object Set]",eV="[object String]",tV="[object Symbol]",nV="[object ArrayBuffer]",rV="[object DataView]",iV="[object Float32Array]",uV="[object Float64Array]",oV="[object Int8Array]",lV="[object Int16Array]",sV="[object Int32Array]",aV="[object Uint8Array]",fV="[object Uint8ClampedArray]",cV="[object Uint16Array]",dV="[object Uint32Array]";function pV(i,o,f){var p=i.constructor;switch(o){case nV:return HW(i);case KW:case XW:return new p(+i);case rV:return WW(i,f);case iV:case uV:case oV:case lV:case sV:case aV:case fV:case cV:case dV:return YW(i,f);case QW:return new p;case JW:case eV:return new p(i);case ZW:return VW(i);case $W:return new p;case tV:return GW(i)}}F6.exports=pV});var B6=ce((Tte,P6)=>{var hV=qv(),I6=Object.create,vV=function(){function i(){}return function(o){if(!hV(o))return{};if(I6)return I6(o);i.prototype=o;var f=new i;return i.prototype=void 0,f}}();P6.exports=vV});var j6=ce((Cte,U6)=>{var mV=B6(),yV=z_(),gV=P_();function _V(i){return typeof i.constructor=="function"&&!gV(i)?mV(yV(i)):{}}U6.exports=_V});var q6=ce((xte,z6)=>{var EV=q_(),DV=ad(),wV="[object Map]";function SV(i){return DV(i)&&EV(i)==wV}z6.exports=SV});var G6=ce((Ate,H6)=>{var TV=q6(),CV=F_(),W6=b_(),V6=W6&&W6.isMap,xV=V6?CV(V6):TV;H6.exports=xV});var K6=ce((Rte,Y6)=>{var AV=q_(),RV=ad(),OV="[object Set]";function kV(i){return RV(i)&&AV(i)==OV}Y6.exports=kV});var Z6=ce((Ote,X6)=>{var MV=K6(),NV=F_(),Q6=b_(),J6=Q6&&Q6.isSet,LV=J6?NV(J6):MV;X6.exports=LV});var rx=ce((kte,$6)=>{var FV=PT(),bV=BT(),PV=aD(),IV=CC(),BV=NC(),UV=IC(),jV=UC(),zV=GC(),qV=JC(),HV=e6(),WV=ED(),VV=q_(),GV=g6(),YV=b6(),KV=j6(),XV=fd(),QV=cD(),JV=G6(),ZV=qv(),$V=Z6(),eG=I_(),tG=B_(),nG=1,rG=2,iG=4,ex="[object Arguments]",uG="[object Array]",oG="[object Boolean]",lG="[object Date]",sG="[object Error]",tx="[object Function]",aG="[object GeneratorFunction]",fG="[object Map]",cG="[object Number]",nx="[object Object]",dG="[object RegExp]",pG="[object Set]",hG="[object String]",vG="[object Symbol]",mG="[object WeakMap]",yG="[object ArrayBuffer]",gG="[object DataView]",_G="[object Float32Array]",EG="[object Float64Array]",DG="[object Int8Array]",wG="[object Int16Array]",SG="[object Int32Array]",TG="[object Uint8Array]",CG="[object Uint8ClampedArray]",xG="[object Uint16Array]",AG="[object Uint32Array]",Wu={};Wu[ex]=Wu[uG]=Wu[yG]=Wu[gG]=Wu[oG]=Wu[lG]=Wu[_G]=Wu[EG]=Wu[DG]=Wu[wG]=Wu[SG]=Wu[fG]=Wu[cG]=Wu[nx]=Wu[dG]=Wu[pG]=Wu[hG]=Wu[vG]=Wu[TG]=Wu[CG]=Wu[xG]=Wu[AG]=!0;Wu[sG]=Wu[tx]=Wu[mG]=!1;function W_(i,o,f,p,E,t){var k,L=o&nG,N=o&rG,C=o&iG;if(f&&(k=E?f(i,p,E,t):f(i)),k!==void 0)return k;if(!ZV(i))return i;var U=XV(i);if(U){if(k=GV(i),!L)return jV(i,k)}else{var q=VV(i),W=q==tx||q==aG;if(QV(i))return UV(i,L);if(q==nx||q==ex||W&&!E){if(k=N||W?{}:KV(i),!L)return N?qV(i,BV(k,i)):zV(i,IV(k,i))}else{if(!Wu[q])return E?i:{};k=YV(i,q,L)}}t||(t=new FV);var ne=t.get(i);if(ne)return ne;t.set(i,k),$V(i)?i.forEach(function(Se){k.add(W_(Se,o,f,Se,i,t))}):JV(i)&&i.forEach(function(Se,he){k.set(he,W_(Se,o,f,he,i,t))});var m=C?N?WV:HV:N?tG:eG,we=U?void 0:m(i);return bV(we||i,function(Se,he){we&&(he=Se,Se=i[he]),PV(k,he,W_(Se,o,f,he,i,t))}),k}$6.exports=W_});var V_=ce((Mte,ix)=>{var RG=Qp(),OG=ad(),kG="[object Symbol]";function MG(i){return typeof i=="symbol"||OG(i)&&RG(i)==kG}ix.exports=MG});var ox=ce((Nte,ux)=>{var NG=fd(),LG=V_(),FG=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bG=/^\w*$/;function PG(i,o){if(NG(i))return!1;var f=typeof i;return f=="number"||f=="symbol"||f=="boolean"||i==null||LG(i)?!0:bG.test(i)||!FG.test(i)||o!=null&&i in Object(o)}ux.exports=PG});var ax=ce((Lte,lx)=>{var sx=oD(),IG="Expected a function";function xD(i,o){if(typeof i!="function"||o!=null&&typeof o!="function")throw new TypeError(IG);var f=function(){var p=arguments,E=o?o.apply(this,p):p[0],t=f.cache;if(t.has(E))return t.get(E);var k=i.apply(this,p);return f.cache=t.set(E,k)||t,k};return f.cache=new(xD.Cache||sx),f}xD.Cache=sx;lx.exports=xD});var cx=ce((Fte,fx)=>{var BG=ax(),UG=500;function jG(i){var o=BG(i,function(p){return f.size===UG&&f.clear(),p}),f=o.cache;return o}fx.exports=jG});var px=ce((bte,dx)=>{var zG=cx(),qG=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,HG=/\\(\\)?/g,WG=zG(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(qG,function(f,p,E,t){o.push(E?t.replace(HG,"$1"):p||f)}),o});dx.exports=WG});var _x=ce((Pte,hx)=>{var vx=zv(),VG=eD(),GG=fd(),YG=V_(),KG=1/0,mx=vx?vx.prototype:void 0,yx=mx?mx.toString:void 0;function gx(i){if(typeof i=="string")return i;if(GG(i))return VG(i,gx)+"";if(YG(i))return yx?yx.call(i):"";var o=i+"";return o=="0"&&1/i==-KG?"-0":o}hx.exports=gx});var Dx=ce((Ite,Ex)=>{var XG=_x();function QG(i){return i==null?"":XG(i)}Ex.exports=QG});var G_=ce((Bte,wx)=>{var JG=fd(),ZG=ox(),$G=px(),eY=Dx();function tY(i,o){return JG(i)?i:ZG(i,o)?[i]:$G(eY(i))}wx.exports=tY});var Tx=ce((Ute,Sx)=>{function nY(i){var o=i==null?0:i.length;return o?i[o-1]:void 0}Sx.exports=nY});var AD=ce((jte,Cx)=>{var rY=V_(),iY=1/0;function uY(i){if(typeof i=="string"||rY(i))return i;var o=i+"";return o=="0"&&1/i==-iY?"-0":o}Cx.exports=uY});var Ax=ce((zte,xx)=>{var oY=G_(),lY=AD();function sY(i,o){o=oY(o,i);for(var f=0,p=o.length;i!=null&&f{function aY(i,o,f){var p=-1,E=i.length;o<0&&(o=-o>E?0:E+o),f=f>E?E:f,f<0&&(f+=E),E=o>f?0:f-o>>>0,o>>>=0;for(var t=Array(E);++p{var fY=Ax(),cY=Ox();function dY(i,o){return o.length<2?i:fY(i,cY(o,0,-1))}kx.exports=dY});var Lx=ce((Wte,Nx)=>{var pY=G_(),hY=Tx(),vY=Mx(),mY=AD();function yY(i,o){return o=pY(o,i),i=vY(i,o),i==null||delete i[mY(hY(o))]}Nx.exports=yY});var Px=ce((Vte,Fx)=>{var gY=Qp(),_Y=z_(),EY=ad(),DY="[object Object]",wY=Function.prototype,SY=Object.prototype,bx=wY.toString,TY=SY.hasOwnProperty,CY=bx.call(Object);function xY(i){if(!EY(i)||gY(i)!=DY)return!1;var o=_Y(i);if(o===null)return!0;var f=TY.call(o,"constructor")&&o.constructor;return typeof f=="function"&&f instanceof f&&bx.call(f)==CY}Fx.exports=xY});var Bx=ce((Gte,Ix)=>{var AY=Px();function RY(i){return AY(i)?void 0:i}Ix.exports=RY});var qx=ce((Yte,Ux)=>{var jx=zv(),OY=fD(),kY=fd(),zx=jx?jx.isConcatSpreadable:void 0;function MY(i){return kY(i)||OY(i)||!!(zx&&i&&i[zx])}Ux.exports=MY});var Vx=ce((Kte,Hx)=>{var NY=j_(),LY=qx();function Wx(i,o,f,p,E){var t=-1,k=i.length;for(f||(f=LY),E||(E=[]);++t0&&f(L)?o>1?Wx(L,o-1,f,p,E):NY(E,L):p||(E[E.length]=L)}return E}Hx.exports=Wx});var Yx=ce((Xte,Gx)=>{var FY=Vx();function bY(i){var o=i==null?0:i.length;return o?FY(i,1):[]}Gx.exports=bY});var Xx=ce((Qte,Kx)=>{function PY(i,o,f){switch(f.length){case 0:return i.call(o);case 1:return i.call(o,f[0]);case 2:return i.call(o,f[0],f[1]);case 3:return i.call(o,f[0],f[1],f[2])}return i.apply(o,f)}Kx.exports=PY});var Zx=ce((Jte,Qx)=>{var IY=Xx(),Jx=Math.max;function BY(i,o,f){return o=Jx(o===void 0?i.length-1:o,0),function(){for(var p=arguments,E=-1,t=Jx(p.length-o,0),k=Array(t);++E{function UY(i){return function(){return i}}$x.exports=UY});var n5=ce(($te,t5)=>{function jY(i){return i}t5.exports=jY});var u5=ce((ene,r5)=>{var zY=e5(),i5=lD(),qY=n5(),HY=i5?function(i,o){return i5(i,"toString",{configurable:!0,enumerable:!1,value:zY(o),writable:!0})}:qY;r5.exports=HY});var l5=ce((tne,o5)=>{var WY=800,VY=16,GY=Date.now;function YY(i){var o=0,f=0;return function(){var p=GY(),E=VY-(p-f);if(f=p,E>0){if(++o>=WY)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}o5.exports=YY});var a5=ce((nne,s5)=>{var KY=u5(),XY=l5(),QY=XY(KY);s5.exports=QY});var c5=ce((rne,f5)=>{var JY=Yx(),ZY=Zx(),$Y=a5();function eK(i){return $Y(ZY(i,void 0,JY),i+"")}f5.exports=eK});var p5=ce((ine,d5)=>{var tK=eD(),nK=rx(),rK=Lx(),iK=G_(),uK=Gv(),oK=Bx(),lK=c5(),sK=ED(),aK=1,fK=2,cK=4,dK=lK(function(i,o){var f={};if(i==null)return f;var p=!1;o=tK(o,function(t){return t=iK(t,i),p||(p=t.length>1),t}),uK(i,sK(i),f),p&&(f=nK(f,aK|fK|cK,oK));for(var E=o.length;E--;)rK(f,o[E]);return f});d5.exports=dK});var eg=ce((vne,y5)=>{"use strict";var g5=Object.getOwnPropertySymbols,_K=Object.prototype.hasOwnProperty,EK=Object.prototype.propertyIsEnumerable;function DK(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function wK(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},f=0;f<10;f++)o["_"+String.fromCharCode(f)]=f;var p=Object.getOwnPropertyNames(o).map(function(t){return o[t]});if(p.join("")!=="0123456789")return!1;var E={};return"abcdefghijklmnopqrst".split("").forEach(function(t){E[t]=t}),Object.keys(Object.assign({},E)).join("")==="abcdefghijklmnopqrst"}catch(t){return!1}}y5.exports=wK()?Object.assign:function(i,o){for(var f,p=DK(i),E,t=1;t{"use strict";var LD=eg(),Kf=typeof Symbol=="function"&&Symbol.for,tg=Kf?Symbol.for("react.element"):60103,SK=Kf?Symbol.for("react.portal"):60106,TK=Kf?Symbol.for("react.fragment"):60107,CK=Kf?Symbol.for("react.strict_mode"):60108,xK=Kf?Symbol.for("react.profiler"):60114,AK=Kf?Symbol.for("react.provider"):60109,RK=Kf?Symbol.for("react.context"):60110,OK=Kf?Symbol.for("react.forward_ref"):60112,kK=Kf?Symbol.for("react.suspense"):60113,MK=Kf?Symbol.for("react.memo"):60115,NK=Kf?Symbol.for("react.lazy"):60116,_5=typeof Symbol=="function"&&Symbol.iterator;function ng(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,f=1;fJ_.length&&J_.push(i)}function BD(i,o,f,p){var E=typeof i;(E==="undefined"||E==="boolean")&&(i=null);var t=!1;if(i===null)t=!0;else switch(E){case"string":case"number":t=!0;break;case"object":switch(i.$$typeof){case tg:case SK:t=!0}}if(t)return f(p,i,o===""?"."+UD(i,0):o),1;if(t=0,o=o===""?".":o+":",Array.isArray(i))for(var k=0;k{"use strict";var BK="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";M5.exports=BK});var HD=ce((gne,L5)=>{"use strict";var qD=function(){};process.env.NODE_ENV!=="production"&&(F5=N5(),Z_={},b5=Function.call.bind(Object.prototype.hasOwnProperty),qD=function(i){var o="Warning: "+i;typeof console!="undefined"&&console.error(o);try{throw new Error(o)}catch(f){}});var F5,Z_,b5;function P5(i,o,f,p,E){if(process.env.NODE_ENV!=="production"){for(var t in i)if(b5(i,t)){var k;try{if(typeof i[t]!="function"){var L=Error((p||"React class")+": "+f+" type `"+t+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[t]+"`.");throw L.name="Invariant Violation",L}k=i[t](o,t,p,f,null,F5)}catch(C){k=C}if(k&&!(k instanceof Error)&&qD((p||"React class")+": type specification of "+f+" `"+t+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof k+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),k instanceof Error&&!(k.message in Z_)){Z_[k.message]=!0;var N=E?E():"";qD("Failed "+f+" type: "+k.message+(N!=null?N:""))}}}}P5.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(Z_={})};L5.exports=P5});var I5=ce(pu=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";var i=eg(),o=HD(),f="16.13.1",p=typeof Symbol=="function"&&Symbol.for,E=p?Symbol.for("react.element"):60103,t=p?Symbol.for("react.portal"):60106,k=p?Symbol.for("react.fragment"):60107,L=p?Symbol.for("react.strict_mode"):60108,N=p?Symbol.for("react.profiler"):60114,C=p?Symbol.for("react.provider"):60109,U=p?Symbol.for("react.context"):60110,q=p?Symbol.for("react.concurrent_mode"):60111,W=p?Symbol.for("react.forward_ref"):60112,ne=p?Symbol.for("react.suspense"):60113,m=p?Symbol.for("react.suspense_list"):60120,we=p?Symbol.for("react.memo"):60115,Se=p?Symbol.for("react.lazy"):60116,he=p?Symbol.for("react.block"):60121,ge=p?Symbol.for("react.fundamental"):60117,ze=p?Symbol.for("react.responder"):60118,pe=p?Symbol.for("react.scope"):60119,Oe=typeof Symbol=="function"&&Symbol.iterator,le="@@iterator";function Ue(X){if(X===null||typeof X!="object")return null;var _e=Oe&&X[Oe]||X[le];return typeof _e=="function"?_e:null}var Ge={current:null},rt={suspense:null},wt={current:null},xt=/^(.*)[\\\/]/;function $e(X,_e,Ne){var Me="";if(_e){var dt=_e.fileName,Hn=dt.replace(xt,"");if(/^index\./.test(Hn)){var Dn=dt.match(xt);if(Dn){var or=Dn[1];if(or){var mi=or.replace(xt,"");Hn=mi+"/"+Hn}}}Me=" (at "+Hn+":"+_e.lineNumber+")"}else Ne&&(Me=" (created by "+Ne+")");return` - in `+(X||"Unknown")+Me}var ft=1;function Ke(X){return X._status===ft?X._result:null}function jt(X,_e,Ne){var Me=_e.displayName||_e.name||"";return X.displayName||(Me!==""?Ne+"("+Me+")":Ne)}function $t(X){if(X==null)return null;if(typeof X.tag=="number"&&ct("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof X=="function")return X.displayName||X.name||null;if(typeof X=="string")return X;switch(X){case k:return"Fragment";case t:return"Portal";case N:return"Profiler";case L:return"StrictMode";case ne:return"Suspense";case m:return"SuspenseList"}if(typeof X=="object")switch(X.$$typeof){case U:return"Context.Consumer";case C:return"Context.Provider";case W:return jt(X,X.render,"ForwardRef");case we:return $t(X.type);case he:return $t(X.render);case Se:{var _e=X,Ne=Ke(_e);if(Ne)return $t(Ne);break}}return null}var at={},Q=null;function ae(X){Q=X}at.getCurrentStack=null,at.getStackAddendum=function(){var X="";if(Q){var _e=$t(Q.type),Ne=Q._owner;X+=$e(_e,Q._source,Ne&&$t(Ne.type))}var Me=at.getCurrentStack;return Me&&(X+=Me()||""),X};var Ce={current:!1},ue={ReactCurrentDispatcher:Ge,ReactCurrentBatchConfig:rt,ReactCurrentOwner:wt,IsSomeRendererActing:Ce,assign:i};i(ue,{ReactDebugCurrentFrame:at,ReactComponentTreeHook:{}});function je(X){{for(var _e=arguments.length,Ne=new Array(_e>1?_e-1:0),Me=1;Me<_e;Me++)Ne[Me-1]=arguments[Me];At("warn",X,Ne)}}function ct(X){{for(var _e=arguments.length,Ne=new Array(_e>1?_e-1:0),Me=1;Me<_e;Me++)Ne[Me-1]=arguments[Me];At("error",X,Ne)}}function At(X,_e,Ne){{var Me=Ne.length>0&&typeof Ne[Ne.length-1]=="string"&&Ne[Ne.length-1].indexOf(` - in`)===0;if(!Me){var dt=ue.ReactDebugCurrentFrame,Hn=dt.getStackAddendum();Hn!==""&&(_e+="%s",Ne=Ne.concat([Hn]))}var Dn=Ne.map(function(Su){return""+Su});Dn.unshift("Warning: "+_e),Function.prototype.apply.call(console[X],console,Dn);try{var or=0,mi="Warning: "+_e.replace(/%s/g,function(){return Ne[or++]});throw new Error(mi)}catch(Su){}}}var en={};function ln(X,_e){{var Ne=X.constructor,Me=Ne&&(Ne.displayName||Ne.name)||"ReactClass",dt=Me+"."+_e;if(en[dt])return;ct("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",_e,Me),en[dt]=!0}}var An={isMounted:function(X){return!1},enqueueForceUpdate:function(X,_e,Ne){ln(X,"forceUpdate")},enqueueReplaceState:function(X,_e,Ne,Me){ln(X,"replaceState")},enqueueSetState:function(X,_e,Ne,Me){ln(X,"setState")}},nr={};Object.freeze(nr);function un(X,_e,Ne){this.props=X,this.context=_e,this.refs=nr,this.updater=Ne||An}un.prototype.isReactComponent={},un.prototype.setState=function(X,_e){if(!(typeof X=="object"||typeof X=="function"||X==null))throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,X,_e,"setState")},un.prototype.forceUpdate=function(X){this.updater.enqueueForceUpdate(this,X,"forceUpdate")};{var Wt={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},vr=function(X,_e){Object.defineProperty(un.prototype,X,{get:function(){je("%s(...) is deprecated in plain JavaScript React classes. %s",_e[0],_e[1])}})};for(var w in Wt)Wt.hasOwnProperty(w)&&vr(w,Wt[w])}function Ut(){}Ut.prototype=un.prototype;function Vn(X,_e,Ne){this.props=X,this.context=_e,this.refs=nr,this.updater=Ne||An}var fr=Vn.prototype=new Ut;fr.constructor=Vn,i(fr,un.prototype),fr.isPureReactComponent=!0;function Fr(){var X={current:null};return Object.seal(X),X}var ur=Object.prototype.hasOwnProperty,br={key:!0,ref:!0,__self:!0,__source:!0},Kt,vu,a0;a0={};function So(X){if(ur.call(X,"ref")){var _e=Object.getOwnPropertyDescriptor(X,"ref").get;if(_e&&_e.isReactWarning)return!1}return X.ref!==void 0}function Go(X){if(ur.call(X,"key")){var _e=Object.getOwnPropertyDescriptor(X,"key").get;if(_e&&_e.isReactWarning)return!1}return X.key!==void 0}function Os(X,_e){var Ne=function(){Kt||(Kt=!0,ct("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",_e))};Ne.isReactWarning=!0,Object.defineProperty(X,"key",{get:Ne,configurable:!0})}function Yo(X,_e){var Ne=function(){vu||(vu=!0,ct("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)",_e))};Ne.isReactWarning=!0,Object.defineProperty(X,"ref",{get:Ne,configurable:!0})}function Ko(X){if(typeof X.ref=="string"&&wt.current&&X.__self&&wt.current.stateNode!==X.__self){var _e=$t(wt.current.type);a0[_e]||(ct('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref',$t(wt.current.type),X.ref),a0[_e]=!0)}}var qt=function(X,_e,Ne,Me,dt,Hn,Dn){var or={$$typeof:E,type:X,key:_e,ref:Ne,props:Dn,_owner:Hn};return or._store={},Object.defineProperty(or._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(or,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Me}),Object.defineProperty(or,"_source",{configurable:!1,enumerable:!1,writable:!1,value:dt}),Object.freeze&&(Object.freeze(or.props),Object.freeze(or)),or};function _i(X,_e,Ne){var Me,dt={},Hn=null,Dn=null,or=null,mi=null;if(_e!=null){So(_e)&&(Dn=_e.ref,Ko(_e)),Go(_e)&&(Hn=""+_e.key),or=_e.__self===void 0?null:_e.__self,mi=_e.__source===void 0?null:_e.__source;for(Me in _e)ur.call(_e,Me)&&!br.hasOwnProperty(Me)&&(dt[Me]=_e[Me])}var Su=arguments.length-2;if(Su===1)dt.children=Ne;else if(Su>1){for(var bu=Array(Su),Pu=0;Pu1){for(var mu=Array(Pu),yi=0;yi is not supported and will be removed in a future major release. Did you mean to render instead?")),Ne.Provider},set:function(Dn){Ne.Provider=Dn}},_currentValue:{get:function(){return Ne._currentValue},set:function(Dn){Ne._currentValue=Dn}},_currentValue2:{get:function(){return Ne._currentValue2},set:function(Dn){Ne._currentValue2=Dn}},_threadCount:{get:function(){return Ne._threadCount},set:function(Dn){Ne._threadCount=Dn}},Consumer:{get:function(){return Me||(Me=!0,ct("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),Ne.Consumer}}}),Ne.Consumer=Hn}return Ne._currentRenderer=null,Ne._currentRenderer2=null,Ne}function Ht(X){var _e={$$typeof:Se,_ctor:X,_status:-1,_result:null};{var Ne,Me;Object.defineProperties(_e,{defaultProps:{configurable:!0,get:function(){return Ne},set:function(dt){ct("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),Ne=dt,Object.defineProperty(_e,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return Me},set:function(dt){ct("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),Me=dt,Object.defineProperty(_e,"propTypes",{enumerable:!0})}}})}return _e}function Du(X){return X!=null&&X.$$typeof===we?ct("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof X!="function"?ct("forwardRef requires a render function but was given %s.",X===null?"null":typeof X):X.length!==0&&X.length!==2&&ct("forwardRef render functions accept exactly two parameters: props and ref. %s",X.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),X!=null&&(X.defaultProps!=null||X.propTypes!=null)&&ct("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:W,render:X}}function Yi(X){return typeof X=="string"||typeof X=="function"||X===k||X===q||X===N||X===L||X===ne||X===m||typeof X=="object"&&X!==null&&(X.$$typeof===Se||X.$$typeof===we||X.$$typeof===C||X.$$typeof===U||X.$$typeof===W||X.$$typeof===ge||X.$$typeof===ze||X.$$typeof===pe||X.$$typeof===he)}function Y0(X,_e){return Yi(X)||ct("memo: The first argument must be a component. Instead received: %s",X===null?"null":typeof X),{$$typeof:we,type:X,compare:_e===void 0?null:_e}}function Ui(){var X=Ge.current;if(X===null)throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: -1. You might have mismatching versions of React and the renderer (such as React DOM) -2. You might be breaking the Rules of Hooks -3. You might have more than one copy of React in the same app -See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.`);return X}function Wl(X,_e){var Ne=Ui();if(_e!==void 0&&ct("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",_e,typeof _e=="number"&&Array.isArray(arguments[2])?` - -Did you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://fb.me/rules-of-hooks`:""),X._context!==void 0){var Me=X._context;Me.Consumer===X?ct("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):Me.Provider===X&&ct("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return Ne.useContext(X,_e)}function xo(X){var _e=Ui();return _e.useState(X)}function ni(X,_e,Ne){var Me=Ui();return Me.useReducer(X,_e,Ne)}function oo(X){var _e=Ui();return _e.useRef(X)}function Vl(X,_e){var Ne=Ui();return Ne.useEffect(X,_e)}function Ao(X,_e){var Ne=Ui();return Ne.useLayoutEffect(X,_e)}function Ms(X,_e){var Ne=Ui();return Ne.useCallback(X,_e)}function Xn(X,_e){var Ne=Ui();return Ne.useMemo(X,_e)}function Qo(X,_e,Ne){var Me=Ui();return Me.useImperativeHandle(X,_e,Ne)}function lo(X,_e){{var Ne=Ui();return Ne.useDebugValue(X,_e)}}var b0;b0=!1;function yl(){if(wt.current){var X=$t(wt.current.type);if(X)return` - -Check the render method of \``+X+"`."}return""}function Ro(X){if(X!==void 0){var _e=X.fileName.replace(/^.*[\\\/]/,""),Ne=X.lineNumber;return` - -Check your code at `+_e+":"+Ne+"."}return""}function Et(X){return X!=null?Ro(X.__source):""}var Pt={};function Bn(X){var _e=yl();if(!_e){var Ne=typeof X=="string"?X:X.displayName||X.name;Ne&&(_e=` - -Check the top-level render call using <`+Ne+">.")}return _e}function Ir(X,_e){if(!(!X._store||X._store.validated||X.key!=null)){X._store.validated=!0;var Ne=Bn(_e);if(!Pt[Ne]){Pt[Ne]=!0;var Me="";X&&X._owner&&X._owner!==wt.current&&(Me=" It was passed a child from "+$t(X._owner.type)+"."),ae(X),ct('Each child in a list should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.',Ne,Me),ae(null)}}}function ji(X,_e){if(typeof X=="object"){if(Array.isArray(X))for(var Ne=0;Ne",dt=" Did you accidentally export a JSX literal instead of a component?"):Dn=typeof X,ct("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Dn,dt)}var or=_i.apply(this,arguments);if(or==null)return or;if(Me)for(var mi=2;mi{"use strict";process.env.NODE_ENV==="production"?WD.exports=k5():WD.exports=I5()});var B5=ce((nm,rg)=>{(function(){var i,o="4.17.21",f=200,p="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",E="Expected a function",t="Invalid `variable` option passed into `_.template`",k="__lodash_hash_undefined__",L=500,N="__lodash_placeholder__",C=1,U=2,q=4,W=1,ne=2,m=1,we=2,Se=4,he=8,ge=16,ze=32,pe=64,Oe=128,le=256,Ue=512,Ge=30,rt="...",wt=800,xt=16,$e=1,ft=2,Ke=3,jt=1/0,$t=9007199254740991,at=17976931348623157e292,Q=0/0,ae=4294967295,Ce=ae-1,ue=ae>>>1,je=[["ary",Oe],["bind",m],["bindKey",we],["curry",he],["curryRight",ge],["flip",Ue],["partial",ze],["partialRight",pe],["rearg",le]],ct="[object Arguments]",At="[object Array]",en="[object AsyncFunction]",ln="[object Boolean]",An="[object Date]",nr="[object DOMException]",un="[object Error]",Wt="[object Function]",vr="[object GeneratorFunction]",w="[object Map]",Ut="[object Number]",Vn="[object Null]",fr="[object Object]",Fr="[object Promise]",ur="[object Proxy]",br="[object RegExp]",Kt="[object Set]",vu="[object String]",a0="[object Symbol]",So="[object Undefined]",Go="[object WeakMap]",Os="[object WeakSet]",Yo="[object ArrayBuffer]",Ko="[object DataView]",qt="[object Float32Array]",_i="[object Float64Array]",eu="[object Int8Array]",ai="[object Int16Array]",mr="[object Int32Array]",Xo="[object Uint8Array]",W0="[object Uint8ClampedArray]",Lu="[object Uint16Array]",V0="[object Uint32Array]",Hr=/\b__p \+= '';/g,To=/\b(__p \+=) '' \+/g,Co=/(__e\(.*?\)|\b__t\)) \+\n'';/g,L0=/&(?:amp|lt|gt|quot|#39);/g,tu=/[&<>"']/g,Si=RegExp(L0.source),ks=RegExp(tu.source),Hl=/<%-([\s\S]+?)%>/g,F0=/<%([\s\S]+?)%>/g,f0=/<%=([\s\S]+?)%>/g,Pr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ei=/^\w*$/,G0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fi=/[\\^$.*+?()[\]{}|]/g,Zt=RegExp(fi.source),Ln=/^\s+/,Di=/\s/,ci=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ht=/\{\n\/\* \[wrapped with (.+)\] \*/,Du=/,? & /,Yi=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Y0=/[()=,{}\[\]\/\s]/,Ui=/\\(\\)?/g,Wl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,xo=/\w*$/,ni=/^[-+]0x[0-9a-f]+$/i,oo=/^0b[01]+$/i,Vl=/^\[object .+?Constructor\]$/,Ao=/^0o[0-7]+$/i,Ms=/^(?:0|[1-9]\d*)$/,Xn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qo=/($^)/,lo=/['\n\r\u2028\u2029\\]/g,b0="\\ud800-\\udfff",yl="\\u0300-\\u036f",Ro="\\ufe20-\\ufe2f",Et="\\u20d0-\\u20ff",Pt=yl+Ro+Et,Bn="\\u2700-\\u27bf",Ir="a-z\\xdf-\\xf6\\xf8-\\xff",ji="\\xac\\xb1\\xd7\\xf7",Wr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",wu="\\u2000-\\u206f",c0=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ti="A-Z\\xc0-\\xd6\\xd8-\\xde",d0="\\ufe0e\\ufe0f",as=ji+Wr+wu+c0,St="['\u2019]",so="["+b0+"]",Jo="["+as+"]",Gl="["+Pt+"]",Fu="\\d+",fs="["+Bn+"]",P0="["+Ir+"]",X="[^"+b0+as+Fu+Bn+Ir+Ti+"]",_e="\\ud83c[\\udffb-\\udfff]",Ne="(?:"+Gl+"|"+_e+")",Me="[^"+b0+"]",dt="(?:\\ud83c[\\udde6-\\uddff]){2}",Hn="[\\ud800-\\udbff][\\udc00-\\udfff]",Dn="["+Ti+"]",or="\\u200d",mi="(?:"+P0+"|"+X+")",Su="(?:"+Dn+"|"+X+")",bu="(?:"+St+"(?:d|ll|m|re|s|t|ve))?",Pu="(?:"+St+"(?:D|LL|M|RE|S|T|VE))?",mu=Ne+"?",yi="["+d0+"]?",Oo="(?:"+or+"(?:"+[Me,dt,Hn].join("|")+")"+yi+mu+")*",Tu="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ao="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Iu=yi+mu+Oo,Oa="(?:"+[fs,dt,Hn].join("|")+")"+Iu,p0="(?:"+[Me+Gl+"?",Gl,dt,Hn,so].join("|")+")",Zs=RegExp(St,"g"),K0=RegExp(Gl,"g"),$s=RegExp(_e+"(?="+_e+")|"+p0+Iu,"g"),ka=RegExp([Dn+"?"+P0+"+"+bu+"(?="+[Jo,Dn,"$"].join("|")+")",Su+"+"+Pu+"(?="+[Jo,Dn+mi,"$"].join("|")+")",Dn+"?"+mi+"+"+bu,Dn+"+"+Pu,ao,Tu,Fu,Oa].join("|"),"g"),cs=RegExp("["+or+b0+Pt+d0+"]"),w0=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Gn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ic=-1,ri={};ri[qt]=ri[_i]=ri[eu]=ri[ai]=ri[mr]=ri[Xo]=ri[W0]=ri[Lu]=ri[V0]=!0,ri[ct]=ri[At]=ri[Yo]=ri[ln]=ri[Ko]=ri[An]=ri[un]=ri[Wt]=ri[w]=ri[Ut]=ri[fr]=ri[br]=ri[Kt]=ri[vu]=ri[Go]=!1;var Gr={};Gr[ct]=Gr[At]=Gr[Yo]=Gr[Ko]=Gr[ln]=Gr[An]=Gr[qt]=Gr[_i]=Gr[eu]=Gr[ai]=Gr[mr]=Gr[w]=Gr[Ut]=Gr[fr]=Gr[br]=Gr[Kt]=Gr[vu]=Gr[a0]=Gr[Xo]=Gr[W0]=Gr[Lu]=Gr[V0]=!0,Gr[un]=Gr[Wt]=Gr[Go]=!1;var Yl={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},ea={"&":"&","<":"<",">":">",'"':""","'":"'"},lf={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ns={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ma=parseFloat,Ls=parseInt,h0=typeof global=="object"&&global&&global.Object===Object&&global,Fs=typeof self=="object"&&self&&self.Object===Object&&self,Ni=h0||Fs||Function("return this")(),B=typeof nm=="object"&&nm&&!nm.nodeType&&nm,z=B&&typeof rg=="object"&&rg&&!rg.nodeType&&rg,G=z&&z.exports===B,$=G&&h0.process,De=function(){try{var Te=z&&z.require&&z.require("util").types;return Te||$&&$.binding&&$.binding("util")}catch(et){}}(),me=De&&De.isArrayBuffer,xe=De&&De.isDate,Z=De&&De.isMap,ke=De&&De.isRegExp,Xe=De&&De.isSet,ht=De&&De.isTypedArray;function ie(Te,et,Ve){switch(Ve.length){case 0:return Te.call(et);case 1:return Te.call(et,Ve[0]);case 2:return Te.call(et,Ve[0],Ve[1]);case 3:return Te.call(et,Ve[0],Ve[1],Ve[2])}return Te.apply(et,Ve)}function qe(Te,et,Ve,Gt){for(var Yt=-1,sr=Te==null?0:Te.length;++Yt-1}function tn(Te,et,Ve){for(var Gt=-1,Yt=Te==null?0:Te.length;++Gt-1;);return Ve}function gl(Te,et){for(var Ve=Te.length;Ve--&&_t(et,Te[Ve],0)>-1;);return Ve}function af(Te,et){for(var Ve=Te.length,Gt=0;Ve--;)Te[Ve]===et&&++Gt;return Gt}var Mo=Yn(Yl),ds=Yn(ea);function bs(Te){return"\\"+Ns[Te]}function No(Te,et){return Te==null?i:Te[et]}function Lo(Te){return cs.test(Te)}function ps(Te){return w0.test(Te)}function Vu(Te){for(var et,Ve=[];!(et=Te.next()).done;)Ve.push(et.value);return Ve}function yu(Te){var et=-1,Ve=Array(Te.size);return Te.forEach(function(Gt,Yt){Ve[++et]=[Yt,Gt]}),Ve}function pi(Te,et){return function(Ve){return Te(et(Ve))}}function T0(Te,et){for(var Ve=-1,Gt=Te.length,Yt=0,sr=[];++Ve-1}function ia(d,v){var x=this.__data__,b=Ql(x,d);return b<0?(++this.size,x.push([d,v])):x[b][1]=v,this}to.prototype.clear=Na,to.prototype.delete=pf,to.prototype.get=uc,to.prototype.has=ms,to.prototype.set=ia;function B0(d){var v=-1,x=d==null?0:d.length;for(this.clear();++v=v?d:v)),d}function U0(d,v,x,b,H,ee){var de,ye=v&C,be=v&U,gt=v&q;if(x&&(de=H?x(d,b,H,ee):x(d)),de!==i)return de;if(!ku(d))return d;var Dt=Jn(d);if(Dt){if(de=Es(d),!ye)return Ji(d,de)}else{var Rt=Ou(d),rn=Rt==Wt||Rt==vr;if(Gs(d))return fc(d,ye);if(Rt==fr||Rt==ct||rn&&!H){if(de=be||rn?{}:vc(d),!ye)return be?Jl(d,tl(de,d)):t0(d,hf(de,d))}else{if(!Gr[Rt])return H?d:{};de=Dh(d,Rt,ye)}}ee||(ee=new el);var Rn=ee.get(d);if(Rn)return Rn;ee.set(d,de),L2(d)?d.forEach(function(ir){de.add(U0(ir,v,x,ir,d,ee))}):gp(d)&&d.forEach(function(ir,Zr){de.set(Zr,U0(ir,v,x,Zr,d,ee))});var $n=gt?be?rr:$c:be?fn:M0,Nr=Dt?i:$n(d);return tt(Nr||d,function(ir,Zr){Nr&&(Zr=ir,ir=d[Zr]),gs(de,Zr,U0(ir,v,x,Zr,d,ee))}),de}function vf(d){var v=M0(d);return function(x){return jc(x,d,v)}}function jc(d,v,x){var b=x.length;if(d==null)return!b;for(d=wn(d);b--;){var H=x[b],ee=v[H],de=d[H];if(de===i&&!(H in d)||!ee(de))return!1}return!0}function lc(d,v,x){if(typeof d!="function")throw new Kr(E);return Wa(function(){d.apply(i,x)},v)}function Sl(d,v,x,b){var H=-1,ee=on,de=!0,ye=d.length,be=[],gt=v.length;if(!ye)return be;x&&(v=Lt(v,di(x))),b?(ee=tn,de=!1):v.length>=f&&(ee=Zo,de=!1,v=new ho(v));e:for(;++HH?0:H+x),b=b===i||b>H?H:Cr(b),b<0&&(b+=H),b=x>b?0:Ep(b);x0&&x(ye)?v>1?bi(ye,v-1,x,b,H):gn(H,ye):b||(H[H.length]=ye)}return H}var g=dc(),y=dc(!0);function A(d,v){return d&&g(d,v,M0)}function F(d,v){return d&&y(d,v,M0)}function I(d,v){return bt(v,function(x){return Ea(d[x])})}function J(d,v){v=Us(v,d);for(var x=0,b=v.length;d!=null&&xv}function Mt(d,v){return d!=null&&ei.call(d,v)}function Er(d,v){return d!=null&&v in wn(d)}function $u(d,v,x){return d>=Wn(v,x)&&d=120&&Dt.length>=120)?new ho(de&&Dt):i}Dt=d[0];var Rt=-1,rn=ye[0];e:for(;++Rt-1;)ye!==d&&R0.call(ye,be,1),R0.call(d,be,1);return d}function u2(d,v){for(var x=d?v.length:0,b=x-1;x--;){var H=v[x];if(x==b||H!==ee){var ee=H;go(H)?R0.call(d,H,1):Cd(d,H)}}return d}function o2(d,v){return d+vs(y0()*(v-d+1))}function wd(d,v,x,b){for(var H=-1,ee=Xr(Ku((v-d)/(x||1)),0),de=Ve(ee);ee--;)de[b?ee:++H]=d,d+=x;return de}function Hc(d,v){var x="";if(!d||v<1||v>$t)return x;do v%2&&(x+=d),v=vs(v/2),v&&(d+=d);while(v);return x}function Mr(d,v){return r1(Nd(d,v,r0),d+"")}function l2(d){return ba(Ac(d))}function s2(d,v){var x=Ac(d);return yc(x,Zu(v,0,x.length))}function ja(d,v,x,b){if(!ku(d))return d;v=Us(v,d);for(var H=-1,ee=v.length,de=ee-1,ye=d;ye!=null&&++HH?0:H+v),x=x>H?H:x,x<0&&(x+=H),H=v>x?0:x-v>>>0,v>>>=0;for(var ee=Ve(H);++b>>1,de=d[ee];de!==null&&!Nl(de)&&(x?de<=v:de=f){var gt=v?null:mm(d);if(gt)return Q0(gt);de=!1,H=Zo,be=new ho}else be=v?[]:ye;e:for(;++b=b?d:rl(d,v,x)}var Kc=hs||function(d){return Ni.clearTimeout(d)};function fc(d,v){if(v)return d.slice();var x=d.length,b=Fi?Fi(x):new d.constructor(x);return d.copy(b),b}function cc(d){var v=new d.constructor(d.byteLength);return new A0(v).set(new A0(d)),v}function f2(d,v){var x=v?cc(d.buffer):d.buffer;return new d.constructor(x,d.byteOffset,d.byteLength)}function yh(d){var v=new d.constructor(d.source,xo.exec(d));return v.lastIndex=d.lastIndex,v}function gf(d){return Sr?wn(Sr.call(d)):{}}function Xc(d,v){var x=v?cc(d.buffer):d.buffer;return new d.constructor(x,d.byteOffset,d.length)}function gh(d,v){if(d!==v){var x=d!==i,b=d===null,H=d===d,ee=Nl(d),de=v!==i,ye=v===null,be=v===v,gt=Nl(v);if(!ye&&!gt&&!ee&&d>v||ee&&de&&be&&!ye&&!gt||b&&de&&be||!x&&be||!H)return 1;if(!b&&!ee&&!gt&&d=ye)return be;var gt=x[b];return be*(gt=="desc"?-1:1)}}return d.index-v.index}function js(d,v,x,b){for(var H=-1,ee=d.length,de=x.length,ye=-1,be=v.length,gt=Xr(ee-de,0),Dt=Ve(be+gt),Rt=!b;++ye1?x[H-1]:i,de=H>2?x[2]:i;for(ee=d.length>3&&typeof ee=="function"?(H--,ee):i,de&&io(x[0],x[1],de)&&(ee=H<3?i:ee,H=1),v=wn(v);++b-1?H[ee?v[de]:de]:i}}function Jc(d){return ol(function(v){var x=v.length,b=x,H=Ur.prototype.thru;for(d&&v.reverse();b--;){var ee=v[b];if(typeof ee!="function")throw new Kr(E);if(H&&!de&&Bo(ee)=="wrapper")var de=new Ur([],!0)}for(b=de?b:x;++b1&&ui.reverse(),Dt&&beye))return!1;var gt=ee.get(d),Dt=ee.get(v);if(gt&&Dt)return gt==v&&Dt==d;var Rt=-1,rn=!0,Rn=x&ne?new ho:i;for(ee.set(d,v),ee.set(v,d);++Rt1?"& ":"")+v[b],v=v.join(x>2?", ":" "),d.replace(ci,`{ -/* [wrapped with `+v+`] */ -`)}function $l(d){return Jn(d)||sl(d)||!!(co&&d&&d[co])}function go(d,v){var x=typeof d;return v=v==null?$t:v,!!v&&(x=="number"||x!="symbol"&&Ms.test(d))&&d>-1&&d%1==0&&d0){if(++v>=wt)return arguments[0]}else v=0;return d.apply(i,arguments)}}function yc(d,v){var x=-1,b=d.length,H=b-1;for(v=v===i?b:v;++x1?d[v-1]:i;return x=typeof x=="function"?(d.pop(),x):i,E2(d,x)});function Bh(d){var v=Y(d);return v.__chain__=!0,v}function Uh(d,v){return v(d),d}function h1(d,v){return v(d)}var Qd=ol(function(d){var v=d.length,x=v?d[0]:0,b=this.__wrapped__,H=function(ee){return Ia(ee,d)};return v>1||this.__actions__.length||!(b instanceof lt)||!go(x)?this.thru(H):(b=b.slice(x,+x+(v?1:0)),b.__actions__.push({func:h1,args:[H],thisArg:i}),new Ur(b,this.__chain__).thru(function(ee){return v&&!ee.length&&ee.push(i),ee}))});function jh(){return Bh(this)}function Jd(){return new Ur(this.value(),this.__chain__)}function zh(){this.__values__===i&&(this.__values__=lv(this.value()));var d=this.__index__>=this.__values__.length,v=d?i:this.__values__[this.__index__++];return{done:d,value:v}}function Cm(){return this}function xm(d){for(var v,x=this;x instanceof Jr;){var b=Fd(x);b.__index__=0,b.__values__=i,v?H.__wrapped__=b:v=b;var H=b;x=x.__wrapped__}return H.__wrapped__=d,v}function Of(){var d=this.__wrapped__;if(d instanceof lt){var v=d;return this.__actions__.length&&(v=new lt(this)),v=v.reverse(),v.__actions__.push({func:h1,args:[Hd],thisArg:i}),new Ur(v,this.__chain__)}return this.thru(Hd)}function kf(){return mh(this.__wrapped__,this.__actions__)}var D2=za(function(d,v,x){ei.call(d,x)?++d[x]:ju(d,x,1)});function Am(d,v,x){var b=Jn(d)?kt:n2;return x&&io(d,v,x)&&(v=i),b(d,zn(v,3))}function Zd(d,v){var x=Jn(d)?bt:zc;return x(d,zn(v,3))}var w2=xl(Bd),$d=xl(u1);function qh(d,v){return bi(v1(d,v),1)}function ep(d,v){return bi(v1(d,v),jt)}function Hh(d,v,x){return x=x===i?1:Cr(x),bi(v1(d,v),x)}function Wh(d,v){var x=Jn(d)?tt:_s;return x(d,zn(v,3))}function tp(d,v){var x=Jn(d)?Tt:oa;return x(d,zn(v,3))}var Rm=za(function(d,v,x){ei.call(d,x)?d[x].push(v):ju(d,x,[v])});function Om(d,v,x,b){d=al(d)?d:Ac(d),x=x&&!b?Cr(x):0;var H=d.length;return x<0&&(x=Xr(H+x,0)),_1(d)?x<=H&&d.indexOf(v,x)>-1:!!H&&_t(d,v,x)>-1}var km=Mr(function(d,v,x){var b=-1,H=typeof v=="function",ee=al(d)?Ve(d.length):[];return _s(d,function(de){ee[++b]=H?ie(v,de,x):Tl(de,v,x)}),ee}),Vh=za(function(d,v,x){ju(d,x,v)});function v1(d,v){var x=Jn(d)?Lt:Ed;return x(d,zn(v,3))}function Mm(d,v,x,b){return d==null?[]:(Jn(v)||(v=v==null?[]:[v]),x=b?i:x,Jn(x)||(x=x==null?[]:[x]),vo(d,v,x))}var np=za(function(d,v,x){d[x?0:1].push(v)},function(){return[[],[]]});function rp(d,v,x){var b=Jn(d)?lr:yr,H=arguments.length<3;return b(d,zn(v,4),x,H,_s)}function Nm(d,v,x){var b=Jn(d)?Qn:yr,H=arguments.length<3;return b(d,zn(v,4),x,H,oa)}function Lm(d,v){var x=Jn(d)?bt:zc;return x(d,C2(zn(v,3)))}function Gh(d){var v=Jn(d)?ba:l2;return v(d)}function Fm(d,v,x){(x?io(d,v,x):v===i)?v=1:v=Cr(v);var b=Jn(d)?Pa:s2;return b(d,v)}function bm(d){var v=Jn(d)?ua:nl;return v(d)}function ip(d){if(d==null)return 0;if(al(d))return _1(d)?Ki(d):d.length;var v=Ou(d);return v==w||v==Kt?d.size:Ba(d).length}function up(d,v,x){var b=Jn(d)?_r:hh;return x&&io(d,v,x)&&(v=i),b(d,zn(v,3))}var ya=Mr(function(d,v){if(d==null)return[];var x=v.length;return x>1&&io(d,v[0],v[1])?v=[]:x>2&&io(v[0],v[1],v[2])&&(v=[v[0]]),vo(d,bi(v,1),[])}),m1=ra||function(){return Ni.Date.now()};function op(d,v){if(typeof v!="function")throw new Kr(E);return d=Cr(d),function(){if(--d<1)return v.apply(this,arguments)}}function Yh(d,v,x){return v=x?i:v,v=d&&v==null?d.length:v,dn(d,Oe,i,i,i,i,v)}function S2(d,v){var x;if(typeof v!="function")throw new Kr(E);return d=Cr(d),function(){return--d>0&&(x=v.apply(this,arguments)),d<=1&&(v=i),x}}var y1=Mr(function(d,v,x){var b=m;if(x.length){var H=T0(x,dr(y1));b|=ze}return dn(d,b,v,x,H)}),Kh=Mr(function(d,v,x){var b=m|we;if(x.length){var H=T0(x,dr(Kh));b|=ze}return dn(v,b,d,x,H)});function lp(d,v,x){v=x?i:v;var b=dn(d,he,i,i,i,i,i,v);return b.placeholder=lp.placeholder,b}function Xh(d,v,x){v=x?i:v;var b=dn(d,ge,i,i,i,i,i,v);return b.placeholder=Xh.placeholder,b}function sp(d,v,x){var b,H,ee,de,ye,be,gt=0,Dt=!1,Rt=!1,rn=!0;if(typeof d!="function")throw new Kr(E);v=fl(v)||0,ku(x)&&(Dt=!!x.leading,Rt="maxWait"in x,ee=Rt?Xr(fl(x.maxWait)||0,v):ee,rn="trailing"in x?!!x.trailing:rn);function Rn(i0){var Ts=b,wo=H;return b=H=i,gt=i0,de=d.apply(wo,Ts),de}function $n(i0){return gt=i0,ye=Wa(Zr,v),Dt?Rn(i0):de}function Nr(i0){var Ts=i0-be,wo=i0-gt,Rv=v-Ts;return Rt?Wn(Rv,ee-wo):Rv}function ir(i0){var Ts=i0-be,wo=i0-gt;return be===i||Ts>=v||Ts<0||Rt&&wo>=ee}function Zr(){var i0=m1();if(ir(i0))return ui(i0);ye=Wa(Zr,Nr(i0))}function ui(i0){return ye=i,rn&&b?Rn(i0):(b=H=i,de)}function bl(){ye!==i&&Kc(ye),gt=0,b=be=H=ye=i}function Wi(){return ye===i?de:ui(m1())}function uo(){var i0=m1(),Ts=ir(i0);if(b=arguments,H=this,be=i0,Ts){if(ye===i)return $n(be);if(Rt)return Kc(ye),ye=Wa(Zr,v),Rn(be)}return ye===i&&(ye=Wa(Zr,v)),de}return uo.cancel=bl,uo.flush=Wi,uo}var Qh=Mr(function(d,v){return lc(d,1,v)}),Jh=Mr(function(d,v,x){return lc(d,fl(v)||0,x)});function ap(d){return dn(d,Ue)}function T2(d,v){if(typeof d!="function"||v!=null&&typeof v!="function")throw new Kr(E);var x=function(){var b=arguments,H=v?v.apply(this,b):b[0],ee=x.cache;if(ee.has(H))return ee.get(H);var de=d.apply(this,b);return x.cache=ee.set(H,de)||ee,de};return x.cache=new(T2.Cache||B0),x}T2.Cache=B0;function C2(d){if(typeof d!="function")throw new Kr(E);return function(){var v=arguments;switch(v.length){case 0:return!d.call(this);case 1:return!d.call(this,v[0]);case 2:return!d.call(this,v[0],v[1]);case 3:return!d.call(this,v[0],v[1],v[2])}return!d.apply(this,v)}}function z0(d){return S2(2,d)}var x2=Rd(function(d,v){v=v.length==1&&Jn(v[0])?Lt(v[0],di(zn())):Lt(bi(v,1),di(zn()));var x=v.length;return Mr(function(b){for(var H=-1,ee=Wn(b.length,x);++H=v}),sl=e0(function(){return arguments}())?e0:function(d){return zu(d)&&ei.call(d,"callee")&&!I0.call(d,"callee")},Jn=Ve.isArray,Vs=me?di(me):He;function al(d){return d!=null&&M2(d.length)&&!Ea(d)}function n0(d){return zu(d)&&al(d)}function ev(d){return d===!0||d===!1||zu(d)&&mt(d)==ln}var Gs=$0||Ip,hp=xe?di(xe):Be;function jm(d){return zu(d)&&d.nodeType===1&&!Ec(d)}function tv(d){if(d==null)return!0;if(al(d)&&(Jn(d)||typeof d=="string"||typeof d.splice=="function"||Gs(d)||Da(d)||sl(d)))return!d.length;var v=Ou(d);if(v==w||v==Kt)return!d.size;if(xf(d))return!Ba(d).length;for(var x in d)if(ei.call(d,x))return!1;return!0}function vp(d,v){return ut(d,v)}function zm(d,v,x){x=typeof x=="function"?x:i;var b=x?x(d,v):i;return b===i?ut(d,v,i,x):!!b}function mp(d){if(!zu(d))return!1;var v=mt(d);return v==un||v==nr||typeof d.message=="string"&&typeof d.name=="string"&&!Ec(d)}function _c(d){return typeof d=="number"&&Xi(d)}function Ea(d){if(!ku(d))return!1;var v=mt(d);return v==Wt||v==vr||v==en||v==ur}function yp(d){return typeof d=="number"&&d==Cr(d)}function M2(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=$t}function ku(d){var v=typeof d;return d!=null&&(v=="object"||v=="function")}function zu(d){return d!=null&&typeof d=="object"}var gp=Z?di(Z):jn;function _p(d,v){return d===v||ti(d,v,Pn(v))}function nv(d,v,x){return x=typeof x=="function"?x:i,ti(d,v,Pn(v),x)}function qm(d){return rv(d)&&d!=+d}function Hm(d){if(Al(d))throw new Yt(p);return tr(d)}function Wm(d){return d===null}function N2(d){return d==null}function rv(d){return typeof d=="number"||zu(d)&&mt(d)==Ut}function Ec(d){if(!zu(d)||mt(d)!=fr)return!1;var v=$o(d);if(v===null)return!0;var x=ei.call(v,"constructor")&&v.constructor;return typeof x=="function"&&x instanceof x&&Au.call(x)==na}var g1=ke?di(ke):ii;function Vm(d){return yp(d)&&d>=-$t&&d<=$t}var L2=Xe?di(Xe):qi;function _1(d){return typeof d=="string"||!Jn(d)&&zu(d)&&mt(d)==vu}function Nl(d){return typeof d=="symbol"||zu(d)&&mt(d)==a0}var Da=ht?di(ht):jr;function iv(d){return d===i}function Gm(d){return zu(d)&&Ou(d)==Go}function uv(d){return zu(d)&&mt(d)==Os}var ov=p2(r2),Ym=p2(function(d,v){return d<=v});function lv(d){if(!d)return[];if(al(d))return _1(d)?Yr(d):Ji(d);if(Ru&&d[Ru])return Vu(d[Ru]());var v=Ou(d),x=v==w?yu:v==Kt?Q0:Ac;return x(d)}function wa(d){if(!d)return d===0?d:0;if(d=fl(d),d===jt||d===-jt){var v=d<0?-1:1;return v*at}return d===d?d:0}function Cr(d){var v=wa(d),x=v%1;return v===v?x?v-x:v:0}function Ep(d){return d?Zu(Cr(d),0,ae):0}function fl(d){if(typeof d=="number")return d;if(Nl(d))return Q;if(ku(d)){var v=typeof d.valueOf=="function"?d.valueOf():d;d=ku(v)?v+"":v}if(typeof d!="string")return d===0?d:+d;d=xu(d);var x=oo.test(d);return x||Ao.test(d)?Ls(d.slice(2),x?2:8):ni.test(d)?Q:+d}function cu(d){return O0(d,fn(d))}function E1(d){return d?Zu(Cr(d),-$t,$t):d===0?d:0}function ki(d){return d==null?"":il(d)}var Dp=no(function(d,v){if(xf(v)||al(v)){O0(v,M0(v),d);return}for(var x in v)ei.call(v,x)&&gs(d,x,v[x])}),F2=no(function(d,v){O0(v,fn(v),d)}),Do=no(function(d,v,x,b){O0(v,fn(v),d,b)}),Ss=no(function(d,v,x,b){O0(v,M0(v),d,b)}),Mf=ol(Ia);function b2(d,v){var x=Qr(d);return v==null?x:hf(x,v)}var wp=Mr(function(d,v){d=wn(d);var x=-1,b=v.length,H=b>2?v[2]:i;for(H&&io(v[0],v[1],H)&&(b=1);++x1),ee}),O0(d,rr(d),x),b&&(x=U0(x,C|U|q,ym));for(var H=v.length;H--;)Cd(x,v[H]);return x});function T1(d,v){return Ka(d,C2(zn(v)))}var Cp=ol(function(d,v){return d==null?{}:dh(d,v)});function Ka(d,v){if(d==null)return{};var x=Lt(rr(d),function(b){return[b]});return v=zn(v),ph(d,x,function(b,H){return v(b,H[0])})}function Km(d,v,x){v=Us(v,d);var b=-1,H=v.length;for(H||(H=1,d=i);++bv){var b=d;d=v,v=b}if(x||d%1||v%1){var H=y0();return Wn(d+H*(v-d+Ma("1e-"+((H+"").length-1))),v)}return o2(d,v)}var q2=_f(function(d,v,x){return v=v.toLowerCase(),d+(x?Uo(v):v)});function Uo(d){return Rp(ki(d).toLowerCase())}function H2(d){return d=ki(d),d&&d.replace(Xn,Mo).replace(K0,"")}function Qm(d,v,x){d=ki(d),v=il(v);var b=d.length;x=x===i?b:Zu(Cr(x),0,b);var H=x;return x-=v.length,x>=0&&d.slice(x,H)==v}function A1(d){return d=ki(d),d&&ks.test(d)?d.replace(tu,ds):d}function Jm(d){return d=ki(d),d&&Zt.test(d)?d.replace(fi,"\\$&"):d}var Zm=_f(function(d,v,x){return d+(x?"-":"")+v.toLowerCase()}),av=_f(function(d,v,x){return d+(x?" ":"")+v.toLowerCase()}),$m=_h("toLowerCase");function fv(d,v,x){d=ki(d),v=Cr(v);var b=v?Ki(d):0;if(!v||b>=v)return d;var H=(v-b)/2;return da(vs(H),x)+d+da(Ku(H),x)}function ey(d,v,x){d=ki(d),v=Cr(v);var b=v?Ki(d):0;return v&&b>>0,x?(d=ki(d),d&&(typeof v=="string"||v!=null&&!g1(v))&&(v=il(v),!v&&Lo(d))?aa(Yr(d),0,x):d.split(v,x)):[]}var bf=_f(function(d,v,x){return d+(x?" ":"")+Rp(v)});function dv(d,v,x){return d=ki(d),x=x==null?0:Zu(Cr(x),0,d.length),v=il(v),d.slice(x,x+v.length)==v}function pv(d,v,x){var b=Y.templateSettings;x&&io(d,v,x)&&(v=i),d=ki(d),v=Do({},v,b,Df);var H=Do({},v.imports,b.imports,Df),ee=M0(H),de=ko(H,ee),ye,be,gt=0,Dt=v.interpolate||Qo,Rt="__p += '",rn=fu((v.escape||Qo).source+"|"+Dt.source+"|"+(Dt===f0?Wl:Qo).source+"|"+(v.evaluate||Qo).source+"|$","g"),Rn="//# sourceURL="+(ei.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ic+"]")+` -`;d.replace(rn,function(ir,Zr,ui,bl,Wi,uo){return ui||(ui=bl),Rt+=d.slice(gt,uo).replace(lo,bs),Zr&&(ye=!0,Rt+=`' + -__e(`+Zr+`) + -'`),Wi&&(be=!0,Rt+=`'; -`+Wi+`; -__p += '`),ui&&(Rt+=`' + -((__t = (`+ui+`)) == null ? '' : __t) + -'`),gt=uo+ir.length,ir}),Rt+=`'; -`;var $n=ei.call(v,"variable")&&v.variable;if(!$n)Rt=`with (obj) { -`+Rt+` -} -`;else if(Y0.test($n))throw new Yt(t);Rt=(be?Rt.replace(Hr,""):Rt).replace(To,"$1").replace(Co,"$1;"),Rt="function("+($n||"obj")+`) { -`+($n?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(ye?", __e = _.escape":"")+(be?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+Rt+`return __p -}`;var Nr=_v(function(){return sr(ee,Rn+"return "+Rt).apply(i,de)});if(Nr.source=Rt,mp(Nr))throw Nr;return Nr}function hv(d){return ki(d).toLowerCase()}function W2(d){return ki(d).toUpperCase()}function V2(d,v,x){if(d=ki(d),d&&(x||v===i))return xu(d);if(!d||!(v=il(v)))return d;var b=Yr(d),H=Yr(v),ee=sf(b,H),de=gl(b,H)+1;return aa(b,ee,de).join("")}function Ap(d,v,x){if(d=ki(d),d&&(x||v===i))return d.slice(0,fo(d)+1);if(!d||!(v=il(v)))return d;var b=Yr(d),H=gl(b,Yr(v))+1;return aa(b,0,H).join("")}function vv(d,v,x){if(d=ki(d),d&&(x||v===i))return d.replace(Ln,"");if(!d||!(v=il(v)))return d;var b=Yr(d),H=sf(b,Yr(v));return aa(b,H).join("")}function G2(d,v){var x=Ge,b=rt;if(ku(v)){var H="separator"in v?v.separator:H;x="length"in v?Cr(v.length):x,b="omission"in v?il(v.omission):b}d=ki(d);var ee=d.length;if(Lo(d)){var de=Yr(d);ee=de.length}if(x>=ee)return d;var ye=x-Ki(b);if(ye<1)return b;var be=de?aa(de,0,ye).join(""):d.slice(0,ye);if(H===i)return be+b;if(de&&(ye+=be.length-ye),g1(H)){if(d.slice(ye).search(H)){var gt,Dt=be;for(H.global||(H=fu(H.source,ki(xo.exec(H))+"g")),H.lastIndex=0;gt=H.exec(Dt);)var Rt=gt.index;be=be.slice(0,Rt===i?ye:Rt)}}else if(d.indexOf(il(H),ye)!=ye){var rn=be.lastIndexOf(H);rn>-1&&(be=be.slice(0,rn))}return be+b}function mv(d){return d=ki(d),d&&Si.test(d)?d.replace(L0,Oi):d}var yv=_f(function(d,v,x){return d+(x?" ":"")+v.toUpperCase()}),Rp=_h("toUpperCase");function gv(d,v,x){return d=ki(d),v=x?i:v,v===i?ps(d)?cf(d):v0(d):d.match(v)||[]}var _v=Mr(function(d,v){try{return ie(d,i,v)}catch(x){return mp(x)?x:new Yt(x)}}),uy=ol(function(d,v){return tt(v,function(x){x=Rl(x),ju(d,x,y1(d[x],d))}),d});function Ev(d){var v=d==null?0:d.length,x=zn();return d=v?Lt(d,function(b){if(typeof b[1]!="function")throw new Kr(E);return[x(b[0]),b[1]]}):[],Mr(function(b){for(var H=-1;++H$t)return[];var x=ae,b=Wn(d,ae);v=zn(v),d-=ae;for(var H=S0(b,v);++x0||v<0)?new lt(x):(d<0?x=x.takeRight(-d):d&&(x=x.drop(d)),v!==i&&(v=Cr(v),x=v<0?x.dropRight(-v):x.take(v-d)),x)},lt.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},lt.prototype.toArray=function(){return this.take(ae)},A(lt.prototype,function(d,v){var x=/^(?:filter|find|map|reject)|While$/.test(v),b=/^(?:head|last)$/.test(v),H=Y[b?"take"+(v=="last"?"Right":""):v],ee=b||/^find/.test(v);!H||(Y.prototype[v]=function(){var de=this.__wrapped__,ye=b?[1]:arguments,be=de instanceof lt,gt=ye[0],Dt=be||Jn(de),Rt=function(Zr){var ui=H.apply(Y,gn([Zr],ye));return b&&rn?ui[0]:ui};Dt&&x&&typeof gt=="function"&>.length!=1&&(be=Dt=!1);var rn=this.__chain__,Rn=!!this.__actions__.length,$n=ee&&!rn,Nr=be&&!Rn;if(!ee&&Dt){de=Nr?de:new lt(this);var ir=d.apply(de,ye);return ir.__actions__.push({func:h1,args:[Rt],thisArg:i}),new Ur(ir,rn)}return $n&&Nr?d.apply(this,ye):(ir=this.thru(Rt),$n?b?ir.value()[0]:ir.value():ir)})}),tt(["pop","push","shift","sort","splice","unshift"],function(d){var v=Vr[d],x=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",b=/^(?:pop|shift)$/.test(d);Y.prototype[d]=function(){var H=arguments;if(b&&!this.__chain__){var ee=this.value();return v.apply(Jn(ee)?ee:[],H)}return this[x](function(de){return v.apply(Jn(de)?de:[],H)})}}),A(lt.prototype,function(d,v){var x=Y[v];if(x){var b=x.name+"";ei.call(xn,b)||(xn[b]=[]),xn[b].push({name:v,func:x})}}),xn[ca(i,we).name]=[{name:"wrapper",func:i}],lt.prototype.clone=hi,lt.prototype.reverse=Qi,lt.prototype.value=g0,Y.prototype.at=Qd,Y.prototype.chain=jh,Y.prototype.commit=Jd,Y.prototype.next=zh,Y.prototype.plant=xm,Y.prototype.reverse=Of,Y.prototype.toJSON=Y.prototype.valueOf=Y.prototype.value=kf,Y.prototype.first=Y.prototype.head,Ru&&(Y.prototype[Ru]=Cm),Y},Z0=J0();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Ni._=Z0,define(function(){return Z0})):z?((z.exports=Z0)._=Z0,B._=Z0):Ni._=Z0}).call(nm)});var GD=ce((Dne,VD)=>{"use strict";var Ai=VD.exports;VD.exports.default=Ai;var hu="[",ig="]",rm="\x07",$_=";",U5=process.env.TERM_PROGRAM==="Apple_Terminal";Ai.cursorTo=(i,o)=>{if(typeof i!="number")throw new TypeError("The `x` argument is required");return typeof o!="number"?hu+(i+1)+"G":hu+(o+1)+";"+(i+1)+"H"};Ai.cursorMove=(i,o)=>{if(typeof i!="number")throw new TypeError("The `x` argument is required");let f="";return i<0?f+=hu+-i+"D":i>0&&(f+=hu+i+"C"),o<0?f+=hu+-o+"A":o>0&&(f+=hu+o+"B"),f};Ai.cursorUp=(i=1)=>hu+i+"A";Ai.cursorDown=(i=1)=>hu+i+"B";Ai.cursorForward=(i=1)=>hu+i+"C";Ai.cursorBackward=(i=1)=>hu+i+"D";Ai.cursorLeft=hu+"G";Ai.cursorSavePosition=U5?"7":hu+"s";Ai.cursorRestorePosition=U5?"8":hu+"u";Ai.cursorGetPosition=hu+"6n";Ai.cursorNextLine=hu+"E";Ai.cursorPrevLine=hu+"F";Ai.cursorHide=hu+"?25l";Ai.cursorShow=hu+"?25h";Ai.eraseLines=i=>{let o="";for(let f=0;f[ig,"8",$_,$_,o,rm,i,ig,"8",$_,$_,rm].join("");Ai.image=(i,o={})=>{let f=`${ig}1337;File=inline=1`;return o.width&&(f+=`;width=${o.width}`),o.height&&(f+=`;height=${o.height}`),o.preserveAspectRatio===!1&&(f+=";preserveAspectRatio=0"),f+":"+i.toString("base64")+rm};Ai.iTerm={setCwd:(i=process.cwd())=>`${ig}50;CurrentDir=${i}${rm}`,annotation:(i,o={})=>{let f=`${ig}1337;`,p=typeof o.x!="undefined",E=typeof o.y!="undefined";if((p||E)&&!(p&&E&&typeof o.length!="undefined"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return i=i.replace(/\|/g,""),f+=o.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",o.length>0?f+=(p?[i,o.length,o.x,o.y]:[o.length,i]).join("|"):f+=i,f+rm}}});var z5=ce((wne,YD)=>{"use strict";var j5=(i,o)=>{for(let f of Reflect.ownKeys(o))Object.defineProperty(i,f,Object.getOwnPropertyDescriptor(o,f));return i};YD.exports=j5;YD.exports.default=j5});var H5=ce((Sne,e4)=>{"use strict";var UK=z5(),t4=new WeakMap,q5=(i,o={})=>{if(typeof i!="function")throw new TypeError("Expected a function");let f,p=!1,E=0,t=i.displayName||i.name||"",k=function(...L){if(t4.set(k,++E),p){if(o.throw===!0)throw new Error(`Function \`${t}\` can only be called once`);return f}return p=!0,f=i.apply(this,L),i=null,f};return UK(k,i),t4.set(k,E),k};e4.exports=q5;e4.exports.default=q5;e4.exports.callCount=i=>{if(!t4.has(i))throw new Error(`The given function \`${i.name}\` is not wrapped by the \`onetime\` package`);return t4.get(i)}});var W5=ce((Tne,n4)=>{n4.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&n4.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&n4.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var JD=ce((Cne,ug)=>{var jK=require("assert"),og=W5(),zK=/^win/i.test(process.platform),r4=require("events");typeof r4!="function"&&(r4=r4.EventEmitter);var zl;process.__signal_exit_emitter__?zl=process.__signal_exit_emitter__:(zl=process.__signal_exit_emitter__=new r4,zl.count=0,zl.emitted={});zl.infinite||(zl.setMaxListeners(Infinity),zl.infinite=!0);ug.exports=function(i,o){jK.equal(typeof i,"function","a callback must be provided for exit handler"),lg===!1&&V5();var f="exit";o&&o.alwaysLast&&(f="afterexit");var p=function(){zl.removeListener(f,i),zl.listeners("exit").length===0&&zl.listeners("afterexit").length===0&&KD()};return zl.on(f,i),p};ug.exports.unload=KD;function KD(){!lg||(lg=!1,og.forEach(function(i){try{process.removeListener(i,XD[i])}catch(o){}}),process.emit=QD,process.reallyExit=G5,zl.count-=1)}function im(i,o,f){zl.emitted[i]||(zl.emitted[i]=!0,zl.emit(i,o,f))}var XD={};og.forEach(function(i){XD[i]=function(){var f=process.listeners(i);f.length===zl.count&&(KD(),im("exit",null,i),im("afterexit",null,i),zK&&i==="SIGHUP"&&(i="SIGINT"),process.kill(process.pid,i))}});ug.exports.signals=function(){return og};ug.exports.load=V5;var lg=!1;function V5(){lg||(lg=!0,zl.count+=1,og=og.filter(function(i){try{return process.on(i,XD[i]),!0}catch(o){return!1}}),process.emit=HK,process.reallyExit=qK)}var G5=process.reallyExit;function qK(i){process.exitCode=i||0,im("exit",process.exitCode,null),im("afterexit",process.exitCode,null),G5.call(process,process.exitCode)}var QD=process.emit;function HK(i,o){if(i==="exit"){o!==void 0&&(process.exitCode=o);var f=QD.apply(this,arguments);return im("exit",process.exitCode,null),im("afterexit",process.exitCode,null),f}else return QD.apply(this,arguments)}});var K5=ce((xne,Y5)=>{"use strict";var WK=H5(),VK=JD();Y5.exports=WK(()=>{VK(()=>{process.stderr.write("[?25h")},{alwaysLast:!0})})});var ZD=ce(um=>{"use strict";var GK=K5(),i4=!1;um.show=(i=process.stderr)=>{!i.isTTY||(i4=!1,i.write("[?25h"))};um.hide=(i=process.stderr)=>{!i.isTTY||(GK(),i4=!0,i.write("[?25l"))};um.toggle=(i,o)=>{i!==void 0&&(i4=i),i4?um.show(o):um.hide(o)}});var Z5=ce(sg=>{"use strict";var X5=sg&&sg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(sg,"__esModule",{value:!0});var Q5=X5(GD()),J5=X5(ZD()),YK=(i,{showCursor:o=!1}={})=>{let f=0,p="",E=!1,t=k=>{!o&&!E&&(J5.default.hide(),E=!0);let L=k+` -`;L!==p&&(p=L,i.write(Q5.default.eraseLines(f)+L),f=L.split(` -`).length)};return t.clear=()=>{i.write(Q5.default.eraseLines(f)),p="",f=0},t.done=()=>{p="",f=0,o||(J5.default.show(),E=!1)},t};sg.default={create:YK}});var e9=ce((One,$5)=>{$5.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY_BUILD_BASE",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}}]});var r9=ce(Ra=>{"use strict";var t9=e9(),bc=process.env;Object.defineProperty(Ra,"_vendors",{value:t9.map(function(i){return i.constant})});Ra.name=null;Ra.isPR=null;t9.forEach(function(i){var o=Array.isArray(i.env)?i.env:[i.env],f=o.every(function(p){return n9(p)});if(Ra[i.constant]=f,f)switch(Ra.name=i.name,typeof i.pr){case"string":Ra.isPR=!!bc[i.pr];break;case"object":"env"in i.pr?Ra.isPR=i.pr.env in bc&&bc[i.pr.env]!==i.pr.ne:"any"in i.pr?Ra.isPR=i.pr.any.some(function(p){return!!bc[p]}):Ra.isPR=n9(i.pr);break;default:Ra.isPR=null}});Ra.isCI=!!(bc.CI||bc.CONTINUOUS_INTEGRATION||bc.BUILD_NUMBER||bc.RUN_ID||Ra.name);function n9(i){return typeof i=="string"?!!bc[i]:Object.keys(i).every(function(o){return bc[o]===i[o]})}});var u9=ce((Mne,i9)=>{"use strict";i9.exports=r9().isCI});var l9=ce((Nne,o9)=>{"use strict";var KK=i=>{let o=new Set;do for(let f of Reflect.ownKeys(i))o.add([i,f]);while((i=Reflect.getPrototypeOf(i))&&i!==Object.prototype);return o};o9.exports=(i,{include:o,exclude:f}={})=>{let p=E=>{let t=k=>typeof k=="string"?E===k:k.test(E);return o?o.some(t):f?!f.some(t):!0};for(let[E,t]of KK(i.constructor.prototype)){if(t==="constructor"||!p(t))continue;let k=Reflect.getOwnPropertyDescriptor(E,t);k&&typeof k.value=="function"&&(i[t]=i[t].bind(i))}return i}});var h9=ce($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});var om,ag,u4,o4,$D;typeof window=="undefined"||typeof MessageChannel!="function"?(lm=null,ew=null,tw=function(){if(lm!==null)try{var i=$i.unstable_now();lm(!0,i),lm=null}catch(o){throw setTimeout(tw,0),o}},s9=Date.now(),$i.unstable_now=function(){return Date.now()-s9},om=function(i){lm!==null?setTimeout(om,0,i):(lm=i,setTimeout(tw,0))},ag=function(i,o){ew=setTimeout(i,o)},u4=function(){clearTimeout(ew)},o4=function(){return!1},$D=$i.unstable_forceFrameRate=function(){}):(l4=window.performance,nw=window.Date,a9=window.setTimeout,f9=window.clearTimeout,typeof console!="undefined"&&(c9=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),typeof c9!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),typeof l4=="object"&&typeof l4.now=="function"?$i.unstable_now=function(){return l4.now()}:(d9=nw.now(),$i.unstable_now=function(){return nw.now()-d9}),fg=!1,cg=null,s4=-1,rw=5,iw=0,o4=function(){return $i.unstable_now()>=iw},$D=function(){},$i.unstable_forceFrameRate=function(i){0>i||125f4(k,f))N!==void 0&&0>f4(N,k)?(i[p]=N,i[L]=f,p=L):(i[p]=k,i[t]=f,p=t);else if(N!==void 0&&0>f4(N,f))i[p]=N,i[L]=f,p=L;else break e}}return o}return null}function f4(i,o){var f=i.sortIndex-o.sortIndex;return f!==0?f:i.id-o.id}var Xf=[],dd=[],XK=1,Rs=null,ls=3,d4=!1,$p=!1,dg=!1;function p4(i){for(var o=uf(dd);o!==null;){if(o.callback===null)c4(dd);else if(o.startTime<=i)c4(dd),o.sortIndex=o.expirationTime,ow(Xf,o);else break;o=uf(dd)}}function lw(i){if(dg=!1,p4(i),!$p)if(uf(Xf)!==null)$p=!0,om(sw);else{var o=uf(dd);o!==null&&ag(lw,o.startTime-i)}}function sw(i,o){$p=!1,dg&&(dg=!1,u4()),d4=!0;var f=ls;try{for(p4(o),Rs=uf(Xf);Rs!==null&&(!(Rs.expirationTime>o)||i&&!o4());){var p=Rs.callback;if(p!==null){Rs.callback=null,ls=Rs.priorityLevel;var E=p(Rs.expirationTime<=o);o=$i.unstable_now(),typeof E=="function"?Rs.callback=E:Rs===uf(Xf)&&c4(Xf),p4(o)}else c4(Xf);Rs=uf(Xf)}if(Rs!==null)var t=!0;else{var k=uf(dd);k!==null&&ag(lw,k.startTime-o),t=!1}return t}finally{Rs=null,ls=f,d4=!1}}function p9(i){switch(i){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var QK=$D;$i.unstable_ImmediatePriority=1;$i.unstable_UserBlockingPriority=2;$i.unstable_NormalPriority=3;$i.unstable_IdlePriority=5;$i.unstable_LowPriority=4;$i.unstable_runWithPriority=function(i,o){switch(i){case 1:case 2:case 3:case 4:case 5:break;default:i=3}var f=ls;ls=i;try{return o()}finally{ls=f}};$i.unstable_next=function(i){switch(ls){case 1:case 2:case 3:var o=3;break;default:o=ls}var f=ls;ls=o;try{return i()}finally{ls=f}};$i.unstable_scheduleCallback=function(i,o,f){var p=$i.unstable_now();if(typeof f=="object"&&f!==null){var E=f.delay;E=typeof E=="number"&&0p?(i.sortIndex=E,ow(dd,i),uf(Xf)===null&&i===uf(dd)&&(dg?u4():dg=!0,ag(lw,E-p))):(i.sortIndex=f,ow(Xf,i),$p||d4||($p=!0,om(sw))),i};$i.unstable_cancelCallback=function(i){i.callback=null};$i.unstable_wrapCallback=function(i){var o=ls;return function(){var f=ls;ls=o;try{return i.apply(this,arguments)}finally{ls=f}}};$i.unstable_getCurrentPriorityLevel=function(){return ls};$i.unstable_shouldYield=function(){var i=$i.unstable_now();p4(i);var o=uf(Xf);return o!==Rs&&Rs!==null&&o!==null&&o.callback!==null&&o.startTime<=i&&o.expirationTime{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";Object.defineProperty(Ri,"__esModule",{value:!0});var i=!1,o=!1,f=!0,p,E,t,k,L;if(typeof window=="undefined"||typeof MessageChannel!="function"){var N=null,C=null,U=function(){if(N!==null)try{var Et=Ri.unstable_now(),Pt=!0;N(Pt,Et),N=null}catch(Bn){throw setTimeout(U,0),Bn}},q=Date.now();Ri.unstable_now=function(){return Date.now()-q},p=function(Et){N!==null?setTimeout(p,0,Et):(N=Et,setTimeout(U,0))},E=function(Et,Pt){C=setTimeout(Et,Pt)},t=function(){clearTimeout(C)},k=function(){return!1},L=Ri.unstable_forceFrameRate=function(){}}else{var W=window.performance,ne=window.Date,m=window.setTimeout,we=window.clearTimeout;if(typeof console!="undefined"){var Se=window.requestAnimationFrame,he=window.cancelAnimationFrame;typeof Se!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),typeof he!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if(typeof W=="object"&&typeof W.now=="function")Ri.unstable_now=function(){return W.now()};else{var ge=ne.now();Ri.unstable_now=function(){return ne.now()-ge}}var ze=!1,pe=null,Oe=-1,le=5,Ue=0,Ge=300,rt=!1;if(o&&navigator!==void 0&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0){var wt=navigator.scheduling;k=function(){var Et=Ri.unstable_now();return Et>=Ue?rt||wt.isInputPending()?!0:Et>=Ge:!1},L=function(){rt=!0}}else k=function(){return Ri.unstable_now()>=Ue},L=function(){};Ri.unstable_forceFrameRate=function(Et){if(Et<0||Et>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported");return}Et>0?le=Math.floor(1e3/Et):le=5};var xt=function(){if(pe!==null){var Et=Ri.unstable_now();Ue=Et+le;var Pt=!0;try{var Bn=pe(Pt,Et);Bn?ft.postMessage(null):(ze=!1,pe=null)}catch(Ir){throw ft.postMessage(null),Ir}}else ze=!1;rt=!1},$e=new MessageChannel,ft=$e.port2;$e.port1.onmessage=xt,p=function(Et){pe=Et,ze||(ze=!0,ft.postMessage(null))},E=function(Et,Pt){Oe=m(function(){Et(Ri.unstable_now())},Pt)},t=function(){we(Oe),Oe=-1}}function Ke(Et,Pt){var Bn=Et.length;Et.push(Pt),at(Et,Pt,Bn)}function jt(Et){var Pt=Et[0];return Pt===void 0?null:Pt}function $t(Et){var Pt=Et[0];if(Pt!==void 0){var Bn=Et.pop();return Bn!==Pt&&(Et[0]=Bn,Q(Et,Bn,0)),Pt}else return null}function at(Et,Pt,Bn){for(var Ir=Bn;;){var ji=Math.floor((Ir-1)/2),Wr=Et[ji];if(Wr!==void 0&&ae(Wr,Pt)>0)Et[ji]=Pt,Et[Ir]=Wr,Ir=ji;else return}}function Q(Et,Pt,Bn){for(var Ir=Bn,ji=Et.length;Irur){if(ur*=2,ur>Fr){console.error("Scheduler Profiling: Event log exceeded maximum size. Don't forget to call `stopLoggingProfilingEvents()`."),mr();return}var Bn=new Int32Array(ur*4);Bn.set(Kt),br=Bn.buffer,Kt=Bn}Kt.set(Et,Pt)}}function ai(){ur=fr,br=new ArrayBuffer(ur*4),Kt=new Int32Array(br),vu=0}function mr(){var Et=br;return ur=0,br=null,Kt=null,vu=0,Et}function Xo(Et,Pt){f&&(Wt[Vn]++,Kt!==null&&eu([a0,Pt*1e3,Et.id,Et.priorityLevel]))}function W0(Et,Pt){f&&(Wt[vr]=Ce,Wt[w]=0,Wt[Vn]--,Kt!==null&&eu([So,Pt*1e3,Et.id]))}function Lu(Et,Pt){f&&(Wt[Vn]--,Kt!==null&&eu([Os,Pt*1e3,Et.id]))}function V0(Et,Pt){f&&(Wt[vr]=Ce,Wt[w]=0,Wt[Vn]--,Kt!==null&&eu([Go,Pt*1e3,Et.id]))}function Hr(Et,Pt){f&&(ln++,Wt[vr]=Et.priorityLevel,Wt[w]=Et.id,Wt[Ut]=ln,Kt!==null&&eu([Yo,Pt*1e3,Et.id,ln]))}function To(Et,Pt){f&&(Wt[vr]=Ce,Wt[w]=0,Wt[Ut]=0,Kt!==null&&eu([Ko,Pt*1e3,Et.id,ln]))}function Co(Et){f&&(An++,Kt!==null&&eu([qt,Et*1e3,An]))}function L0(Et){f&&Kt!==null&&eu([_i,Et*1e3,An])}var tu=1073741823,Si=-1,ks=250,Hl=5e3,F0=1e4,f0=tu,Pr=[],Ei=[],G0=1,fi=!1,Zt=null,Ln=ct,Di=!1,ci=!1,Ht=!1;function Du(Et){for(var Pt=jt(Ei);Pt!==null;){if(Pt.callback===null)$t(Ei);else if(Pt.startTime<=Et)$t(Ei),Pt.sortIndex=Pt.expirationTime,Ke(Pr,Pt),f&&(Xo(Pt,Et),Pt.isQueued=!0);else return;Pt=jt(Ei)}}function Yi(Et){if(Ht=!1,Du(Et),!ci)if(jt(Pr)!==null)ci=!0,p(Y0);else{var Pt=jt(Ei);Pt!==null&&E(Yi,Pt.startTime-Et)}}function Y0(Et,Pt){f&&L0(Pt),ci=!1,Ht&&(Ht=!1,t()),Di=!0;var Bn=Ln;try{if(f)try{return Ui(Et,Pt)}catch(Wr){if(Zt!==null){var Ir=Ri.unstable_now();V0(Zt,Ir),Zt.isQueued=!1}throw Wr}else return Ui(Et,Pt)}finally{if(Zt=null,Ln=Bn,Di=!1,f){var ji=Ri.unstable_now();Co(ji)}}}function Ui(Et,Pt){var Bn=Pt;for(Du(Bn),Zt=jt(Pr);Zt!==null&&!(i&&fi)&&!(Zt.expirationTime>Bn&&(!Et||k()));){var Ir=Zt.callback;if(Ir!==null){Zt.callback=null,Ln=Zt.priorityLevel;var ji=Zt.expirationTime<=Bn;Hr(Zt,Bn);var Wr=Ir(ji);Bn=Ri.unstable_now(),typeof Wr=="function"?(Zt.callback=Wr,To(Zt,Bn)):(f&&(W0(Zt,Bn),Zt.isQueued=!1),Zt===jt(Pr)&&$t(Pr)),Du(Bn)}else $t(Pr);Zt=jt(Pr)}if(Zt!==null)return!0;var wu=jt(Ei);return wu!==null&&E(Yi,wu.startTime-Bn),!1}function Wl(Et,Pt){switch(Et){case ue:case je:case ct:case At:case en:break;default:Et=ct}var Bn=Ln;Ln=Et;try{return Pt()}finally{Ln=Bn}}function xo(Et){var Pt;switch(Ln){case ue:case je:case ct:Pt=ct;break;default:Pt=Ln;break}var Bn=Ln;Ln=Pt;try{return Et()}finally{Ln=Bn}}function ni(Et){var Pt=Ln;return function(){var Bn=Ln;Ln=Pt;try{return Et.apply(this,arguments)}finally{Ln=Bn}}}function oo(Et){switch(Et){case ue:return Si;case je:return ks;case en:return f0;case At:return F0;case ct:default:return Hl}}function Vl(Et,Pt,Bn){var Ir=Ri.unstable_now(),ji,Wr;if(typeof Bn=="object"&&Bn!==null){var wu=Bn.delay;typeof wu=="number"&&wu>0?ji=Ir+wu:ji=Ir,Wr=typeof Bn.timeout=="number"?Bn.timeout:oo(Et)}else Wr=oo(Et),ji=Ir;var c0=ji+Wr,Ti={id:G0++,callback:Pt,priorityLevel:Et,startTime:ji,expirationTime:c0,sortIndex:-1};return f&&(Ti.isQueued=!1),ji>Ir?(Ti.sortIndex=ji,Ke(Ei,Ti),jt(Pr)===null&&Ti===jt(Ei)&&(Ht?t():Ht=!0,E(Yi,ji-Ir))):(Ti.sortIndex=c0,Ke(Pr,Ti),f&&(Xo(Ti,Ir),Ti.isQueued=!0),!ci&&!Di&&(ci=!0,p(Y0))),Ti}function Ao(){fi=!0}function Ms(){fi=!1,!ci&&!Di&&(ci=!0,p(Y0))}function Xn(){return jt(Pr)}function Qo(Et){if(f&&Et.isQueued){var Pt=Ri.unstable_now();Lu(Et,Pt),Et.isQueued=!1}Et.callback=null}function lo(){return Ln}function b0(){var Et=Ri.unstable_now();Du(Et);var Pt=jt(Pr);return Pt!==Zt&&Zt!==null&&Pt!==null&&Pt.callback!==null&&Pt.startTime<=Et&&Pt.expirationTime{"use strict";process.env.NODE_ENV==="production"?aw.exports=h9():aw.exports=v9()});var m9=ce((Pne,pg)=>{pg.exports=function i(o){"use strict";var f=eg(),p=su(),E=h4();function t(g){for(var y="https://reactjs.org/docs/error-decoder.html?invariant="+g,A=1;AG0||(g.current=Ei[G0],Ei[G0]=null,G0--)}function Zt(g,y){G0++,Ei[G0]=g.current,g.current=y}var Ln={},Di={current:Ln},ci={current:!1},Ht=Ln;function Du(g,y){var A=g.type.contextTypes;if(!A)return Ln;var F=g.stateNode;if(F&&F.__reactInternalMemoizedUnmaskedChildContext===y)return F.__reactInternalMemoizedMaskedChildContext;var I={},J;for(J in A)I[J]=y[J];return F&&(g=g.stateNode,g.__reactInternalMemoizedUnmaskedChildContext=y,g.__reactInternalMemoizedMaskedChildContext=I),I}function Yi(g){return g=g.childContextTypes,g!=null}function Y0(g){fi(ci,g),fi(Di,g)}function Ui(g){fi(ci,g),fi(Di,g)}function Wl(g,y,A){if(Di.current!==Ln)throw Error(t(168));Zt(Di,y,g),Zt(ci,A,g)}function xo(g,y,A){var F=g.stateNode;if(g=y.childContextTypes,typeof F.getChildContext!="function")return A;F=F.getChildContext();for(var I in F)if(!(I in g))throw Error(t(108,Ge(y)||"Unknown",I));return f({},A,{},F)}function ni(g){var y=g.stateNode;return y=y&&y.__reactInternalMemoizedMergedChildContext||Ln,Ht=Di.current,Zt(Di,y,g),Zt(ci,ci.current,g),!0}function oo(g,y,A){var F=g.stateNode;if(!F)throw Error(t(169));A?(y=xo(g,y,Ht),F.__reactInternalMemoizedMergedChildContext=y,fi(ci,g),fi(Di,g),Zt(Di,y,g)):fi(ci,g),Zt(ci,A,g)}var Vl=E.unstable_runWithPriority,Ao=E.unstable_scheduleCallback,Ms=E.unstable_cancelCallback,Xn=E.unstable_shouldYield,Qo=E.unstable_requestPaint,lo=E.unstable_now,b0=E.unstable_getCurrentPriorityLevel,yl=E.unstable_ImmediatePriority,Ro=E.unstable_UserBlockingPriority,Et=E.unstable_NormalPriority,Pt=E.unstable_LowPriority,Bn=E.unstable_IdlePriority,Ir={},ji=Qo!==void 0?Qo:function(){},Wr=null,wu=null,c0=!1,Ti=lo(),d0=1e4>Ti?lo:function(){return lo()-Ti};function as(){switch(b0()){case yl:return 99;case Ro:return 98;case Et:return 97;case Pt:return 96;case Bn:return 95;default:throw Error(t(332))}}function St(g){switch(g){case 99:return yl;case 98:return Ro;case 97:return Et;case 96:return Pt;case 95:return Bn;default:throw Error(t(332))}}function so(g,y){return g=St(g),Vl(g,y)}function Jo(g,y,A){return g=St(g),Ao(g,y,A)}function Gl(g){return Wr===null?(Wr=[g],wu=Ao(yl,fs)):Wr.push(g),Ir}function Fu(){if(wu!==null){var g=wu;wu=null,Ms(g)}fs()}function fs(){if(!c0&&Wr!==null){c0=!0;var g=0;try{var y=Wr;so(99,function(){for(;g=y&&(fo=!0),g.firstContext=null)}function Tu(g,y){if(Su!==g&&y!==!1&&y!==0)if((typeof y!="number"||y===1073741823)&&(Su=g,y=1073741823),y={context:g,observedBits:y,next:null},mi===null){if(or===null)throw Error(t(308));mi=y,or.dependencies={expirationTime:0,firstContext:y,responders:null}}else mi=mi.next=y;return un?g._currentValue:g._currentValue2}var ao=!1;function Iu(g){return{baseState:g,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Oa(g){return{baseState:g.baseState,firstUpdate:g.firstUpdate,lastUpdate:g.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function p0(g,y){return{expirationTime:g,suspenseConfig:y,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Zs(g,y){g.lastUpdate===null?g.firstUpdate=g.lastUpdate=y:(g.lastUpdate.next=y,g.lastUpdate=y)}function K0(g,y){var A=g.alternate;if(A===null){var F=g.updateQueue,I=null;F===null&&(F=g.updateQueue=Iu(g.memoizedState))}else F=g.updateQueue,I=A.updateQueue,F===null?I===null?(F=g.updateQueue=Iu(g.memoizedState),I=A.updateQueue=Iu(A.memoizedState)):F=g.updateQueue=Oa(I):I===null&&(I=A.updateQueue=Oa(F));I===null||F===I?Zs(F,y):F.lastUpdate===null||I.lastUpdate===null?(Zs(F,y),Zs(I,y)):(Zs(F,y),I.lastUpdate=y)}function $s(g,y){var A=g.updateQueue;A=A===null?g.updateQueue=Iu(g.memoizedState):ka(g,A),A.lastCapturedUpdate===null?A.firstCapturedUpdate=A.lastCapturedUpdate=y:(A.lastCapturedUpdate.next=y,A.lastCapturedUpdate=y)}function ka(g,y){var A=g.alternate;return A!==null&&y===A.updateQueue&&(y=g.updateQueue=Oa(y)),y}function cs(g,y,A,F,I,J){switch(A.tag){case 1:return g=A.payload,typeof g=="function"?g.call(J,F,I):g;case 3:g.effectTag=g.effectTag&-4097|64;case 0:if(g=A.payload,I=typeof g=="function"?g.call(J,F,I):g,I==null)break;return f({},F,I);case 2:ao=!0}return F}function w0(g,y,A,F,I){ao=!1,y=ka(g,y);for(var J=y.baseState,fe=null,mt=0,Ct=y.firstUpdate,Mt=J;Ct!==null;){var Er=Ct.expirationTime;Erii?(qi=tr,tr=null):qi=tr.sibling;var jr=iu(He,tr,ut[ii],Jt);if(jr===null){tr===null&&(tr=qi);break}g&&tr&&jr.alternate===null&&y(He,tr),Be=J(jr,Be,ii),ti===null?jn=jr:ti.sibling=jr,ti=jr,tr=qi}if(ii===ut.length)return A(He,tr),jn;if(tr===null){for(;iiii?(qi=tr,tr=null):qi=tr.sibling;var gu=iu(He,tr,jr.value,Jt);if(gu===null){tr===null&&(tr=qi);break}g&&tr&&gu.alternate===null&&y(He,tr),Be=J(gu,Be,ii),ti===null?jn=gu:ti.sibling=gu,ti=gu,tr=qi}if(jr.done)return A(He,tr),jn;if(tr===null){for(;!jr.done;ii++,jr=ut.next())jr=$u(He,jr.value,Jt),jr!==null&&(Be=J(jr,Be,ii),ti===null?jn=jr:ti.sibling=jr,ti=jr);return jn}for(tr=F(He,tr);!jr.done;ii++,jr=ut.next())jr=j0(tr,He,ii,jr.value,Jt),jr!==null&&(g&&jr.alternate!==null&&tr.delete(jr.key===null?ii:jr.key),Be=J(jr,Be,ii),ti===null?jn=jr:ti.sibling=jr,ti=jr);return g&&tr.forEach(function(Ba){return y(He,Ba)}),jn}return function(He,Be,ut,Jt){var jn=typeof ut=="object"&&ut!==null&&ut.type===U&&ut.key===null;jn&&(ut=ut.props.children);var ti=typeof ut=="object"&&ut!==null;if(ti)switch(ut.$$typeof){case N:e:{for(ti=ut.key,jn=Be;jn!==null;){if(jn.key===ti)if(jn.tag===7?ut.type===U:jn.elementType===ut.type){A(He,jn.sibling),Be=I(jn,ut.type===U?ut.props.children:ut.props,Jt),Be.ref=Fs(He,jn,ut),Be.return=He,He=Be;break e}else{A(He,jn);break}else y(He,jn);jn=jn.sibling}ut.type===U?(Be=Zu(ut.props.children,He.mode,Jt,ut.key),Be.return=He,He=Be):(Jt=Ia(ut.type,ut.key,ut.props,null,He.mode,Jt),Jt.ref=Fs(He,Be,ut),Jt.return=He,He=Jt)}return fe(He);case C:e:{for(jn=ut.key;Be!==null;){if(Be.key===jn)if(Be.tag===4&&Be.stateNode.containerInfo===ut.containerInfo&&Be.stateNode.implementation===ut.implementation){A(He,Be.sibling),Be=I(Be,ut.children||[],Jt),Be.return=He,He=Be;break e}else{A(He,Be);break}else y(He,Be);Be=Be.sibling}Be=vf(ut,He.mode,Jt),Be.return=He,He=Be}return fe(He)}if(typeof ut=="string"||typeof ut=="number")return ut=""+ut,Be!==null&&Be.tag===6?(A(He,Be.sibling),Be=I(Be,ut,Jt),Be.return=He,He=Be):(A(He,Be),Be=U0(ut,He.mode,Jt),Be.return=He,He=Be),fe(He);if(h0(ut))return Tl(He,Be,ut,Jt);if(le(ut))return e0(He,Be,ut,Jt);if(ti&&Ni(He,ut),typeof ut=="undefined"&&!jn)switch(He.tag){case 1:case 0:throw He=He.type,Error(t(152,He.displayName||He.name||"Component"))}return A(He,Be)}}var z=B(!0),G=B(!1),$={},De={current:$},me={current:$},xe={current:$};function Z(g){if(g===$)throw Error(t(174));return g}function ke(g,y){Zt(xe,y,g),Zt(me,g,g),Zt(De,$,g),y=jt(y),fi(De,g),Zt(De,y,g)}function Xe(g){fi(De,g),fi(me,g),fi(xe,g)}function ht(g){var y=Z(xe.current),A=Z(De.current);y=$t(A,g.type,y),A!==y&&(Zt(me,g,g),Zt(De,y,g))}function ie(g){me.current===g&&(fi(De,g),fi(me,g))}var qe={current:0};function tt(g){for(var y=g;y!==null;){if(y.tag===13){var A=y.memoizedState;if(A!==null&&(A=A.dehydrated,A===null||Hr(A)||To(A)))return y}else if(y.tag===19&&y.memoizedProps.revealOrder!==void 0){if((y.effectTag&64)!=0)return y}else if(y.child!==null){y.child.return=y,y=y.child;continue}if(y===g)break;for(;y.sibling===null;){if(y.return===null||y.return===g)return null;y=y.return}y.sibling.return=y.return,y=y.sibling}return null}function Tt(g,y){return{responder:g,props:y}}var kt=k.ReactCurrentDispatcher,bt=k.ReactCurrentBatchConfig,on=0,tn=null,Lt=null,gn=null,lr=null,Qn=null,_r=null,Cn=0,Ar=null,v0=0,Rr=!1,nt=null,_t=0;function Ze(){throw Error(t(321))}function Ft(g,y){if(y===null)return!1;for(var A=0;ACn&&(Cn=Er,La(Cn))):(oc(Er,Ct.suspenseConfig),J=Ct.eagerReducer===g?Ct.eagerState:g(J,Ct.action)),fe=Ct,Ct=Ct.next}while(Ct!==null&&Ct!==F);Mt||(mt=fe,I=J),Ne(J,y.memoizedState)||(fo=!0),y.memoizedState=J,y.baseUpdate=mt,y.baseState=I,A.lastRenderedState=J}return[y.memoizedState,A.dispatch]}function S0(g){var y=Yn();return typeof g=="function"&&(g=g()),y.memoizedState=y.baseState=g,g=y.queue={last:null,dispatch:null,lastRenderedReducer:nu,lastRenderedState:g},g=g.dispatch=bs.bind(null,tn,g),[y.memoizedState,g]}function X0(g){return Cu(nu,g)}function xu(g,y,A,F){return g={tag:g,create:y,destroy:A,deps:F,next:null},Ar===null?(Ar={lastEffect:null},Ar.lastEffect=g.next=g):(y=Ar.lastEffect,y===null?Ar.lastEffect=g.next=g:(A=y.next,y.next=g,g.next=A,Ar.lastEffect=g)),g}function di(g,y,A,F){var I=Yn();v0|=g,I.memoizedState=xu(y,A,void 0,F===void 0?null:F)}function ko(g,y,A,F){var I=yr();F=F===void 0?null:F;var J=void 0;if(Lt!==null){var fe=Lt.memoizedState;if(J=fe.destroy,F!==null&&Ft(F,fe.deps)){xu(0,A,J,F);return}}v0|=g,I.memoizedState=xu(y,A,J,F)}function Zo(g,y){return di(516,192,g,y)}function sf(g,y){return ko(516,192,g,y)}function gl(g,y){if(typeof y=="function")return g=g(),y(g),function(){y(null)};if(y!=null)return g=g(),y.current=g,function(){y.current=null}}function af(){}function Mo(g,y){return Yn().memoizedState=[g,y===void 0?null:y],g}function ds(g,y){var A=yr();y=y===void 0?null:y;var F=A.memoizedState;return F!==null&&y!==null&&Ft(y,F[1])?F[0]:(A.memoizedState=[g,y],g)}function bs(g,y,A){if(!(25>_t))throw Error(t(301));var F=g.alternate;if(g===tn||F!==null&&F===tn)if(Rr=!0,g={expirationTime:on,suspenseConfig:null,action:A,eagerReducer:null,eagerState:null,next:null},nt===null&&(nt=new Map),A=nt.get(y),A===void 0)nt.set(y,g);else{for(y=A;y.next!==null;)y=y.next;y.next=g}else{var I=g0(),J=ri.suspense;I=bn(I,g,J),J={expirationTime:I,suspenseConfig:J,action:A,eagerReducer:null,eagerState:null,next:null};var fe=y.last;if(fe===null)J.next=J;else{var mt=fe.next;mt!==null&&(J.next=mt),fe.next=J}if(y.last=J,g.expirationTime===0&&(F===null||F.expirationTime===0)&&(F=y.lastRenderedReducer,F!==null))try{var Ct=y.lastRenderedState,Mt=F(Ct,A);if(J.eagerReducer=F,J.eagerState=Mt,Ne(Mt,Ct))return}catch(Er){}finally{}Qu(g,I)}}var No={readContext:Tu,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useLayoutEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useResponder:Ze,useDeferredValue:Ze,useTransition:Ze},Lo={readContext:Tu,useCallback:Mo,useContext:Tu,useEffect:Zo,useImperativeHandle:function(g,y,A){return A=A!=null?A.concat([g]):null,di(4,36,gl.bind(null,y,g),A)},useLayoutEffect:function(g,y){return di(4,36,g,y)},useMemo:function(g,y){var A=Yn();return y=y===void 0?null:y,g=g(),A.memoizedState=[g,y],g},useReducer:function(g,y,A){var F=Yn();return y=A!==void 0?A(y):y,F.memoizedState=F.baseState=y,g=F.queue={last:null,dispatch:null,lastRenderedReducer:g,lastRenderedState:y},g=g.dispatch=bs.bind(null,tn,g),[F.memoizedState,g]},useRef:function(g){var y=Yn();return g={current:g},y.memoizedState=g},useState:S0,useDebugValue:af,useResponder:Tt,useDeferredValue:function(g,y){var A=S0(g),F=A[0],I=A[1];return Zo(function(){E.unstable_next(function(){var J=bt.suspense;bt.suspense=y===void 0?null:y;try{I(g)}finally{bt.suspense=J}})},[g,y]),F},useTransition:function(g){var y=S0(!1),A=y[0],F=y[1];return[Mo(function(I){F(!0),E.unstable_next(function(){var J=bt.suspense;bt.suspense=g===void 0?null:g;try{F(!1),I()}finally{bt.suspense=J}})},[g,A]),A]}},ps={readContext:Tu,useCallback:ds,useContext:Tu,useEffect:sf,useImperativeHandle:function(g,y,A){return A=A!=null?A.concat([g]):null,ko(4,36,gl.bind(null,y,g),A)},useLayoutEffect:function(g,y){return ko(4,36,g,y)},useMemo:function(g,y){var A=yr();y=y===void 0?null:y;var F=A.memoizedState;return F!==null&&y!==null&&Ft(y,F[1])?F[0]:(g=g(),A.memoizedState=[g,y],g)},useReducer:Cu,useRef:function(){return yr().memoizedState},useState:X0,useDebugValue:af,useResponder:Tt,useDeferredValue:function(g,y){var A=X0(g),F=A[0],I=A[1];return sf(function(){E.unstable_next(function(){var J=bt.suspense;bt.suspense=y===void 0?null:y;try{I(g)}finally{bt.suspense=J}})},[g,y]),F},useTransition:function(g){var y=X0(!1),A=y[0],F=y[1];return[ds(function(I){F(!0),E.unstable_next(function(){var J=bt.suspense;bt.suspense=g===void 0?null:g;try{F(!1),I()}finally{bt.suspense=J}})},[g,A]),A]}},Vu=null,yu=null,pi=!1;function T0(g,y){var A=Io(5,null,null,0);A.elementType="DELETED",A.type="DELETED",A.stateNode=y,A.return=g,A.effectTag=8,g.lastEffect!==null?(g.lastEffect.nextEffect=A,g.lastEffect=A):g.firstEffect=g.lastEffect=A}function Q0(g,y){switch(g.tag){case 5:return y=Lu(y,g.type,g.pendingProps),y!==null?(g.stateNode=y,!0):!1;case 6:return y=V0(y,g.pendingProps),y!==null?(g.stateNode=y,!0):!1;case 13:return!1;default:return!1}}function Fo(g){if(pi){var y=yu;if(y){var A=y;if(!Q0(g,y)){if(y=Co(A),!y||!Q0(g,y)){g.effectTag=g.effectTag&-1025|2,pi=!1,Vu=g;return}T0(Vu,A)}Vu=g,yu=L0(y)}else g.effectTag=g.effectTag&-1025|2,pi=!1,Vu=g}}function ta(g){for(g=g.return;g!==null&&g.tag!==5&&g.tag!==3&&g.tag!==13;)g=g.return;Vu=g}function Kl(g){if(!w||g!==Vu)return!1;if(!pi)return ta(g),pi=!0,!1;var y=g.type;if(g.tag!==5||y!=="head"&&y!=="body"&&!ct(y,g.memoizedProps))for(y=yu;y;)T0(g,y),y=Co(y);if(ta(g),g.tag===13){if(!w)throw Error(t(316));if(g=g.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(t(317));yu=ks(g)}else yu=Vu?Co(g.stateNode):null;return!0}function Ki(){w&&(yu=Vu=null,pi=!1)}var Yr=k.ReactCurrentOwner,fo=!1;function Oi(g,y,A,F){y.child=g===null?G(y,null,A,F):z(y,g.child,A,F)}function gi(g,y,A,F,I){A=A.render;var J=y.ref;return Oo(y,I),F=nn(g,y,A,F,J,I),g!==null&&!fo?(y.updateQueue=g.updateQueue,y.effectTag&=-517,g.expirationTime<=I&&(g.expirationTime=0),fu(g,y,I)):(y.effectTag|=1,Oi(g,y,F,I),y.child)}function ff(g,y,A,F,I,J){if(g===null){var fe=A.type;return typeof fe=="function"&&!hf(fe)&&fe.defaultProps===void 0&&A.compare===null&&A.defaultProps===void 0?(y.tag=15,y.type=fe,cf(g,y,fe,F,I,J)):(g=Ia(A.type,null,F,null,y.mode,J),g.ref=y.ref,g.return=y,y.child=g)}return fe=g.child,Iy)&&Ur.set(g,y)))}}function eo(g,y){g.expirationTimeg?y:g)}function Ju(g){if(g.lastExpiredTime!==0)g.callbackExpirationTime=1073741823,g.callbackPriority=99,g.callbackNode=Gl(to.bind(null,g));else{var y=po(g),A=g.callbackNode;if(y===0)A!==null&&(g.callbackNode=null,g.callbackExpirationTime=0,g.callbackPriority=90);else{var F=g0();if(y===1073741823?F=99:y===1||y===2?F=95:(F=10*(1073741821-y)-10*(1073741821-F),F=0>=F?99:250>=F?98:5250>=F?97:95),A!==null){var I=g.callbackPriority;if(g.callbackExpirationTime===y&&I>=F)return;A!==Ir&&Ms(A)}g.callbackExpirationTime=y,g.callbackPriority=F,y=y===1073741823?Gl(to.bind(null,g)):Jo(F,bo.bind(null,g),{timeout:10*(1073741821-y)-d0()}),g.callbackNode=y}}}function bo(g,y){if(Qi=0,y)return y=g0(),oa(g,y),Ju(g),null;var A=po(g);if(A!==0){if(y=g.callbackNode,(kn&(Xi|ru))!==wr)throw Error(t(327));if(Bs(),g===se&&A===Le||ms(g,A),re!==null){var F=kn;kn|=Xi;var I=B0(g);do try{$1();break}catch(mt){ia(g,mt)}while(1);if(bu(),kn=F,Ku.current=I,Ae===Xr)throw y=ot,ms(g,A),Sl(g,A),Ju(g),y;if(re===null)switch(I=g.finishedWork=g.current.alternate,g.finishedExpirationTime=A,F=Ae,se=null,F){case Ci:case Xr:throw Error(t(345));case Wn:oa(g,2=A){g.lastPingedTime=A,ms(g,A);break}}if(J=po(g),J!==0&&J!==A)break;if(F!==0&&F!==A){g.lastPingedTime=F;break}g.timeoutHandle=ln(Dl.bind(null,g),I);break}Dl(g);break;case m0:if(Sl(g,A),F=g.lastSuspendedTime,A===F&&(g.nextKnownPendingLevel=Uc(I)),yn&&(I=g.lastPingedTime,I===0||I>=A)){g.lastPingedTime=A,ms(g,A);break}if(I=po(g),I!==0&&I!==A)break;if(F!==0&&F!==A){g.lastPingedTime=F;break}if(Xt!==1073741823?F=10*(1073741821-Xt)-d0():vt===1073741823?F=0:(F=10*(1073741821-vt)-5e3,I=d0(),A=10*(1073741821-A)-I,F=I-F,0>F&&(F=0),F=(120>F?120:480>F?480:1080>F?1080:1920>F?1920:3e3>F?3e3:4320>F?4320:1960*df(F/1960))-F,A=F?F=0:(I=fe.busyDelayMs|0,J=d0()-(10*(1073741821-J)-(fe.timeoutMs|0||5e3)),F=J<=I?0:I+F-J),10 component higher in the tree to provide a loading indicator or placeholder to display.`+Pr(I))}Ae!==y0&&(Ae=Wn),J=_l(J,I),Ct=F;do{switch(Ct.tag){case 3:fe=J,Ct.effectTag|=4096,Ct.expirationTime=y;var Be=hs(Ct,fe,y);$s(Ct,Be);break e;case 1:fe=J;var ut=Ct.type,Jt=Ct.stateNode;if((Ct.effectTag&64)==0&&(typeof ut.getDerivedStateFromError=="function"||Jt!==null&&typeof Jt.componentDidCatch=="function"&&(cr===null||!cr.has(Jt)))){Ct.effectTag|=4096,Ct.expirationTime=y;var jn=ra(Ct,fe,y);$s(Ct,jn);break e}}Ct=Ct.return}while(Ct!==null)}re=ho(re)}catch(ti){y=ti;continue}break}while(1)}function B0(){var g=Ku.current;return Ku.current=No,g===null?No:g}function oc(g,y){g_n&&(_n=g)}function gd(){for(;re!==null;)re=e2(re)}function $1(){for(;re!==null&&!Xn();)re=e2(re)}function e2(g){var y=Pa(g.alternate,g,Le);return g.memoizedProps=g.pendingProps,y===null&&(y=ho(g)),vs.current=null,y}function ho(g){re=g;do{var y=re.alternate;if(g=re.return,(re.effectTag&2048)==0){e:{var A=y;y=re;var F=Le,I=y.pendingProps;switch(y.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:Yi(y.type)&&Y0(y);break;case 3:Xe(y),Ui(y),I=y.stateNode,I.pendingContext&&(I.context=I.pendingContext,I.pendingContext=null),(A===null||A.child===null)&&Kl(y)&&Gu(y),Vr(y);break;case 5:ie(y);var J=Z(xe.current);if(F=y.type,A!==null&&y.stateNode!=null)Bu(A,y,F,I,J),A.ref!==y.ref&&(y.effectTag|=128);else if(I){if(A=Z(De.current),Kl(y)){if(I=y,!w)throw Error(t(175));A=tu(I.stateNode,I.type,I.memoizedProps,J,A,I),I.updateQueue=A,A=A!==null,A&&Gu(y)}else{var fe=ae(F,I,J,A,y);Kr(fe,y,!1,!1),y.stateNode=fe,ue(fe,F,I,J,A)&&Gu(y)}y.ref!==null&&(y.effectTag|=128)}else if(y.stateNode===null)throw Error(t(166));break;case 6:if(A&&y.stateNode!=null)Sn(A,y,A.memoizedProps,I);else{if(typeof I!="string"&&y.stateNode===null)throw Error(t(166));if(A=Z(xe.current),J=Z(De.current),Kl(y)){if(A=y,!w)throw Error(t(176));(A=Si(A.stateNode,A.memoizedProps,A))&&Gu(y)}else y.stateNode=en(I,A,J,y)}break;case 11:break;case 13:if(fi(qe,y),I=y.memoizedState,(y.effectTag&64)!=0){y.expirationTime=F;break e}I=I!==null,J=!1,A===null?y.memoizedProps.fallback!==void 0&&Kl(y):(F=A.memoizedState,J=F!==null,I||F===null||(F=A.child.sibling,F!==null&&(fe=y.firstEffect,fe!==null?(y.firstEffect=F,F.nextEffect=fe):(y.firstEffect=y.lastEffect=F,F.nextEffect=null),F.effectTag=8))),I&&!J&&(y.mode&2)!=0&&(A===null&&y.memoizedProps.unstable_avoidThisFallback!==!0||(qe.current&1)!=0?Ae===Ci&&(Ae=Xu):((Ae===Ci||Ae===Xu)&&(Ae=m0),_n!==0&&se!==null&&(Sl(se,Le),_s(se,_n)))),vr&&I&&(y.effectTag|=4),Wt&&(I||J)&&(y.effectTag|=4);break;case 7:break;case 8:break;case 12:break;case 4:Xe(y),Vr(y);break;case 10:mu(y);break;case 9:break;case 14:break;case 17:Yi(y.type)&&Y0(y);break;case 19:if(fi(qe,y),I=y.memoizedState,I===null)break;if(J=(y.effectTag&64)!=0,fe=I.rendering,fe===null){if(J)Au(I,!1);else if(Ae!==Ci||A!==null&&(A.effectTag&64)!=0)for(A=y.child;A!==null;){if(fe=tt(A),fe!==null){for(y.effectTag|=64,Au(I,!1),A=fe.updateQueue,A!==null&&(y.updateQueue=A,y.effectTag|=4),I.lastEffect===null&&(y.firstEffect=null),y.lastEffect=I.lastEffect,A=F,I=y.child;I!==null;)J=I,F=A,J.effectTag&=2,J.nextEffect=null,J.firstEffect=null,J.lastEffect=null,fe=J.alternate,fe===null?(J.childExpirationTime=0,J.expirationTime=F,J.child=null,J.memoizedProps=null,J.memoizedState=null,J.updateQueue=null,J.dependencies=null):(J.childExpirationTime=fe.childExpirationTime,J.expirationTime=fe.expirationTime,J.child=fe.child,J.memoizedProps=fe.memoizedProps,J.memoizedState=fe.memoizedState,J.updateQueue=fe.updateQueue,F=fe.dependencies,J.dependencies=F===null?null:{expirationTime:F.expirationTime,firstContext:F.firstContext,responders:F.responders}),I=I.sibling;Zt(qe,qe.current&1|2,y),y=y.child;break e}A=A.sibling}}else{if(!J)if(A=tt(fe),A!==null){if(y.effectTag|=64,J=!0,A=A.updateQueue,A!==null&&(y.updateQueue=A,y.effectTag|=4),Au(I,!0),I.tail===null&&I.tailMode==="hidden"&&!fe.alternate){y=y.lastEffect=I.lastEffect,y!==null&&(y.nextEffect=null);break}}else d0()>I.tailExpiration&&1I&&(I=F),fe>I&&(I=fe),J=J.sibling;A.childExpirationTime=I}if(y!==null)return y;g!==null&&(g.effectTag&2048)==0&&(g.firstEffect===null&&(g.firstEffect=re.firstEffect),re.lastEffect!==null&&(g.lastEffect!==null&&(g.lastEffect.nextEffect=re.firstEffect),g.lastEffect=re.lastEffect),1g?y:g}function Dl(g){var y=as();return so(99,el.bind(null,g,y)),null}function el(g,y){do Bs();while(Qr!==null);if((kn&(Xi|ru))!==wr)throw Error(t(327));var A=g.finishedWork,F=g.finishedExpirationTime;if(A===null)return null;if(g.finishedWork=null,g.finishedExpirationTime=0,A===g.current)throw Error(t(177));g.callbackNode=null,g.callbackExpirationTime=0,g.callbackPriority=90,g.nextKnownPendingLevel=0;var I=Uc(A);if(g.firstPendingTime=I,F<=g.lastSuspendedTime?g.firstSuspendedTime=g.lastSuspendedTime=g.nextKnownPendingLevel=0:F<=g.firstSuspendedTime&&(g.firstSuspendedTime=F-1),F<=g.lastPingedTime&&(g.lastPingedTime=0),F<=g.lastExpiredTime&&(g.lastExpiredTime=0),g===se&&(re=se=null,Le=0),1=A?Yt(g,y,A):(Zt(qe,qe.current&1,y),y=fu(g,y,A),y!==null?y.sibling:null);Zt(qe,qe.current&1,y);break;case 19:if(F=y.childExpirationTime>=A,(g.effectTag&64)!=0){if(F)return wn(g,y,A);y.effectTag|=64}if(I=y.memoizedState,I!==null&&(I.rendering=null,I.tail=null),Zt(qe,qe.current,y),!F)return null}return fu(g,y,A)}fo=!1}}else fo=!1;switch(y.expirationTime=0,y.tag){case 2:if(F=y.type,g!==null&&(g.alternate=null,y.alternate=null,y.effectTag|=2),g=y.pendingProps,I=Du(y,Di.current),Oo(y,A),I=nn(null,y,F,g,I,A),y.effectTag|=1,typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0){if(y.tag=1,sn(),Yi(F)){var J=!0;ni(y)}else J=!1;y.memoizedState=I.state!==null&&I.state!==void 0?I.state:null;var fe=F.getDerivedStateFromProps;typeof fe=="function"&&Yl(y,F,fe,g),I.updater=ea,y.stateNode=I,I._reactInternalFiber=y,Ls(y,F,g,A),y=et(null,y,F,!0,J,A)}else y.tag=0,Oi(null,y,I,A),y=y.child;return y;case 16:if(I=y.elementType,g!==null&&(g.alternate=null,y.alternate=null,y.effectTag|=2),g=y.pendingProps,Ue(I),I._status!==1)throw I._result;switch(I=I._result,y.type=I,J=y.tag=tl(I),g=Hn(I,g),J){case 0:y=Z0(null,y,I,g,A);break;case 1:y=Te(null,y,I,g,A);break;case 11:y=gi(null,y,I,g,A);break;case 14:y=ff(null,y,I,Hn(I.type,g),F,A);break;default:throw Error(t(306,I,""))}return y;case 0:return F=y.type,I=y.pendingProps,I=y.elementType===F?I:Hn(F,I),Z0(g,y,F,I,A);case 1:return F=y.type,I=y.pendingProps,I=y.elementType===F?I:Hn(F,I),Te(g,y,F,I,A);case 3:if(Ve(y),F=y.updateQueue,F===null)throw Error(t(282));if(I=y.memoizedState,I=I!==null?I.element:null,w0(y,F,y.pendingProps,null,A),F=y.memoizedState.element,F===I)Ki(),y=fu(g,y,A);else{if((I=y.stateNode.hydrate)&&(w?(yu=L0(y.stateNode.containerInfo),Vu=y,I=pi=!0):I=!1),I)for(A=G(y,null,F,A),y.child=A;A;)A.effectTag=A.effectTag&-3|1024,A=A.sibling;else Oi(g,y,F,A),Ki();y=y.child}return y;case 5:return ht(y),g===null&&Fo(y),F=y.type,I=y.pendingProps,J=g!==null?g.memoizedProps:null,fe=I.children,ct(F,I)?fe=null:J!==null&&ct(F,J)&&(y.effectTag|=16),J0(g,y),y.mode&4&&A!==1&&At(F,I)?(y.expirationTime=y.childExpirationTime=1,y=null):(Oi(g,y,fe,A),y=y.child),y;case 6:return g===null&&Fo(y),null;case 13:return Yt(g,y,A);case 4:return ke(y,y.stateNode.containerInfo),F=y.pendingProps,g===null?y.child=z(y,null,F,A):Oi(g,y,F,A),y.child;case 11:return F=y.type,I=y.pendingProps,I=y.elementType===F?I:Hn(F,I),gi(g,y,F,I,A);case 7:return Oi(g,y,y.pendingProps,A),y.child;case 8:return Oi(g,y,y.pendingProps.children,A),y.child;case 12:return Oi(g,y,y.pendingProps.children,A),y.child;case 10:e:{if(F=y.type._context,I=y.pendingProps,fe=y.memoizedProps,J=I.value,Pu(y,J),fe!==null){var mt=fe.value;if(J=Ne(mt,J)?0:(typeof F._calculateChangedBits=="function"?F._calculateChangedBits(mt,J):1073741823)|0,J===0){if(fe.children===I.children&&!ci.current){y=fu(g,y,A);break e}}else for(mt=y.child,mt!==null&&(mt.return=y);mt!==null;){var Ct=mt.dependencies;if(Ct!==null){fe=mt.child;for(var Mt=Ct.firstContext;Mt!==null;){if(Mt.context===F&&(Mt.observedBits&J)!=0){mt.tag===1&&(Mt=p0(A,null),Mt.tag=2,K0(mt,Mt)),mt.expirationTime=y&&g<=y}function Sl(g,y){var A=g.firstSuspendedTime,F=g.lastSuspendedTime;Ay||A===0)&&(g.lastSuspendedTime=y),y<=g.lastPingedTime&&(g.lastPingedTime=0),y<=g.lastExpiredTime&&(g.lastExpiredTime=0)}function _s(g,y){y>g.firstPendingTime&&(g.firstPendingTime=y);var A=g.firstSuspendedTime;A!==0&&(y>=A?g.firstSuspendedTime=g.lastSuspendedTime=g.nextKnownPendingLevel=0:y>=g.lastSuspendedTime&&(g.lastSuspendedTime=y+1),y>g.nextKnownPendingLevel&&(g.nextKnownPendingLevel=y))}function oa(g,y){var A=g.lastExpiredTime;(A===0||A>y)&&(g.lastExpiredTime=y)}function n2(g){var y=g._reactInternalFiber;if(y===void 0)throw typeof g.render=="function"?Error(t(188)):Error(t(268,Object.keys(g)));return g=$e(y),g===null?null:g.stateNode}function la(g,y){g=g.memoizedState,g!==null&&g.dehydrated!==null&&g.retryTime{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var JK=0;Qf.__interactionsRef=null;Qf.__subscriberRef=null;Qf.unstable_clear=function(i){return i()};Qf.unstable_getCurrent=function(){return null};Qf.unstable_getThreadID=function(){return++JK};Qf.unstable_trace=function(i,o,f){return f()};Qf.unstable_wrap=function(i){return i};Qf.unstable_subscribe=function(){};Qf.unstable_unsubscribe=function(){}});var g9=ce(au=>{"use strict";process.env.NODE_ENV!=="production"&&function(){"use strict";Object.defineProperty(au,"__esModule",{value:!0});var i=!0,o=0,f=0,p=0;au.__interactionsRef=null,au.__subscriberRef=null,i&&(au.__interactionsRef={current:new Set},au.__subscriberRef={current:null});function E(ge){if(!i)return ge();var ze=au.__interactionsRef.current;au.__interactionsRef.current=new Set;try{return ge()}finally{au.__interactionsRef.current=ze}}function t(){return i?au.__interactionsRef.current:null}function k(){return++p}function L(ge,ze,pe){var Oe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:o;if(!i)return pe();var le={__count:1,id:f++,name:ge,timestamp:ze},Ue=au.__interactionsRef.current,Ge=new Set(Ue);Ge.add(le),au.__interactionsRef.current=Ge;var rt=au.__subscriberRef.current,wt;try{rt!==null&&rt.onInteractionTraced(le)}finally{try{rt!==null&&rt.onWorkStarted(Ge,Oe)}finally{try{wt=pe()}finally{au.__interactionsRef.current=Ue;try{rt!==null&&rt.onWorkStopped(Ge,Oe)}finally{le.__count--,rt!==null&&le.__count===0&&rt.onInteractionScheduledWorkCompleted(le)}}}}return wt}function N(ge){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o;if(!i)return ge;var pe=au.__interactionsRef.current,Oe=au.__subscriberRef.current;Oe!==null&&Oe.onWorkScheduled(pe,ze),pe.forEach(function(Ge){Ge.__count++});var le=!1;function Ue(){var Ge=au.__interactionsRef.current;au.__interactionsRef.current=pe,Oe=au.__subscriberRef.current;try{var rt;try{Oe!==null&&Oe.onWorkStarted(pe,ze)}finally{try{rt=ge.apply(void 0,arguments)}finally{au.__interactionsRef.current=Ge,Oe!==null&&Oe.onWorkStopped(pe,ze)}}return rt}finally{le||(le=!0,pe.forEach(function(wt){wt.__count--,Oe!==null&&wt.__count===0&&Oe.onInteractionScheduledWorkCompleted(wt)}))}}return Ue.cancel=function(){Oe=au.__subscriberRef.current;try{Oe!==null&&Oe.onWorkCanceled(pe,ze)}finally{pe.forEach(function(rt){rt.__count--,Oe&&rt.__count===0&&Oe.onInteractionScheduledWorkCompleted(rt)})}},Ue}var C=null;i&&(C=new Set);function U(ge){i&&(C.add(ge),C.size===1&&(au.__subscriberRef.current={onInteractionScheduledWorkCompleted:ne,onInteractionTraced:W,onWorkCanceled:he,onWorkScheduled:m,onWorkStarted:we,onWorkStopped:Se}))}function q(ge){i&&(C.delete(ge),C.size===0&&(au.__subscriberRef.current=null))}function W(ge){var ze=!1,pe=null;if(C.forEach(function(Oe){try{Oe.onInteractionTraced(ge)}catch(le){ze||(ze=!0,pe=le)}}),ze)throw pe}function ne(ge){var ze=!1,pe=null;if(C.forEach(function(Oe){try{Oe.onInteractionScheduledWorkCompleted(ge)}catch(le){ze||(ze=!0,pe=le)}}),ze)throw pe}function m(ge,ze){var pe=!1,Oe=null;if(C.forEach(function(le){try{le.onWorkScheduled(ge,ze)}catch(Ue){pe||(pe=!0,Oe=Ue)}}),pe)throw Oe}function we(ge,ze){var pe=!1,Oe=null;if(C.forEach(function(le){try{le.onWorkStarted(ge,ze)}catch(Ue){pe||(pe=!0,Oe=Ue)}}),pe)throw Oe}function Se(ge,ze){var pe=!1,Oe=null;if(C.forEach(function(le){try{le.onWorkStopped(ge,ze)}catch(Ue){pe||(pe=!0,Oe=Ue)}}),pe)throw Oe}function he(ge,ze){var pe=!1,Oe=null;if(C.forEach(function(le){try{le.onWorkCanceled(ge,ze)}catch(Ue){pe||(pe=!0,Oe=Ue)}}),pe)throw Oe}au.unstable_clear=E,au.unstable_getCurrent=t,au.unstable_getThreadID=k,au.unstable_trace=L,au.unstable_wrap=N,au.unstable_subscribe=U,au.unstable_unsubscribe=q}()});var _9=ce((Une,fw)=>{"use strict";process.env.NODE_ENV==="production"?fw.exports=y9():fw.exports=g9()});var E9=ce((jne,hg)=>{"use strict";process.env.NODE_ENV!=="production"&&(hg.exports=function i(o){"use strict";var f=eg(),p=su(),E=HD(),t=h4(),k=_9(),L=0,N=1,C=2,U=3,q=4,W=5,ne=6,m=7,we=8,Se=9,he=10,ge=11,ze=12,pe=13,Oe=14,le=15,Ue=16,Ge=17,rt=18,wt=19,xt=20,$e=21,ft=function(){};ft=function(a,c){for(var _=arguments.length,T=new Array(_>2?_-2:0),R=2;R<_;R++)T[R-2]=arguments[R];if(c===void 0)throw new Error("`warningWithoutStack(condition, format, ...args)` requires a warning message argument");if(T.length>8)throw new Error("warningWithoutStack() currently supports at most 8 arguments.");if(!a){if(typeof console!="undefined"){var j=T.map(function(oe){return""+oe});j.unshift("Warning: "+c),Function.prototype.apply.call(console.error,console,j)}try{var V=0,te="Warning: "+c.replace(/%s/g,function(){return T[V++]});throw new Error(te)}catch(oe){}}};var Ke=ft;function jt(a){return a._reactInternalFiber}function $t(a,c){a._reactInternalFiber=c}var at=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;at.hasOwnProperty("ReactCurrentDispatcher")||(at.ReactCurrentDispatcher={current:null}),at.hasOwnProperty("ReactCurrentBatchConfig")||(at.ReactCurrentBatchConfig={suspense:null});var Q=typeof Symbol=="function"&&Symbol.for,ae=Q?Symbol.for("react.element"):60103,Ce=Q?Symbol.for("react.portal"):60106,ue=Q?Symbol.for("react.fragment"):60107,je=Q?Symbol.for("react.strict_mode"):60108,ct=Q?Symbol.for("react.profiler"):60114,At=Q?Symbol.for("react.provider"):60109,en=Q?Symbol.for("react.context"):60110,ln=Q?Symbol.for("react.concurrent_mode"):60111,An=Q?Symbol.for("react.forward_ref"):60112,nr=Q?Symbol.for("react.suspense"):60113,un=Q?Symbol.for("react.suspense_list"):60120,Wt=Q?Symbol.for("react.memo"):60115,vr=Q?Symbol.for("react.lazy"):60116,w=Q?Symbol.for("react.fundamental"):60117,Ut=Q?Symbol.for("react.responder"):60118,Vn=Q?Symbol.for("react.scope"):60119,fr=typeof Symbol=="function"&&Symbol.iterator,Fr="@@iterator";function ur(a){if(a===null||typeof a!="object")return null;var c=fr&&a[fr]||a[Fr];return typeof c=="function"?c:null}var br=Ke;br=function(a,c){if(!a){for(var _=at.ReactDebugCurrentFrame,T=_.getStackAddendum(),R=arguments.length,j=new Array(R>2?R-2:0),V=2;V import('./MyComponent'))`,T),a._status=So,a._result=R}},function(T){a._status===a0&&(a._status=Go,a._result=T)})}}function Ko(a,c,_){var T=c.displayName||c.name||"";return a.displayName||(T!==""?_+"("+T+")":_)}function qt(a){if(a==null)return null;if(typeof a.tag=="number"&&Ke(!1,"Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case ue:return"Fragment";case Ce:return"Portal";case ct:return"Profiler";case je:return"StrictMode";case nr:return"Suspense";case un:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case en:return"Context.Consumer";case At:return"Context.Provider";case An:return Ko(a,a.render,"ForwardRef");case Wt:return qt(a.type);case vr:{var c=a,_=Os(c);if(_)return qt(_);break}}return null}var _i=0,eu=1,ai=2,mr=4,Xo=6,W0=8,Lu=16,V0=32,Hr=64,To=128,Co=256,L0=512,tu=1024,Si=1028,ks=932,Hl=2047,F0=2048,f0=4096,Pr=!0,Ei=!0,G0=!0,fi=!0,Zt=!0,Ln=!0,Di=!1,ci=!1,Ht=!1,Du=!1,Yi=!1,Y0=!0,Ui=!1,Wl=!1,xo=!1,ni=!1,oo=!1,Vl=at.ReactCurrentOwner;function Ao(a){var c=a,_=a;if(a.alternate)for(;c.return;)c=c.return;else{var T=c;do c=T,(c.effectTag&(ai|tu))!==_i&&(_=c.return),T=c.return;while(T)}return c.tag===U?_:null}function Ms(a){return Ao(a)===a}function Xn(a){{var c=Vl.current;if(c!==null&&c.tag===N){var _=c,T=_.stateNode;T._warnedAboutRefsInRender||Ke(!1,"%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",qt(_.type)||"A component"),T._warnedAboutRefsInRender=!0}}var R=jt(a);return R?Ao(R)===R:!1}function Qo(a){if(Ao(a)!==a)throw Error("Unable to find node on an unmounted component.")}function lo(a){var c=a.alternate;if(!c){var _=Ao(a);if(_===null)throw Error("Unable to find node on an unmounted component.");return _!==a?null:a}for(var T=a,R=c;;){var j=T.return;if(j===null)break;var V=j.alternate;if(V===null){var te=j.return;if(te!==null){T=R=te;continue}break}if(j.child===V.child){for(var oe=j.child;oe;){if(oe===T)return Qo(j),a;if(oe===R)return Qo(j),c;oe=oe.sibling}throw Error("Unable to find node on an unmounted component.")}if(T.return!==R.return)T=j,R=V;else{for(var Ie=!1,Ye=j.child;Ye;){if(Ye===T){Ie=!0,T=j,R=V;break}if(Ye===R){Ie=!0,R=j,T=V;break}Ye=Ye.sibling}if(!Ie){for(Ye=V.child;Ye;){if(Ye===T){Ie=!0,T=V,R=j;break}if(Ye===R){Ie=!0,R=V,T=j;break}Ye=Ye.sibling}if(!Ie)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(T.alternate!==R)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(T.tag!==U)throw Error("Unable to find node on an unmounted component.");return T.stateNode.current===T?a:c}function b0(a){var c=lo(a);if(!c)return null;for(var _=c;;){if(_.tag===W||_.tag===ne)return _;if(_.child){_.child.return=_,_=_.child;continue}if(_===c)return null;for(;!_.sibling;){if(!_.return||_.return===c)return null;_=_.return}_.sibling.return=_.return,_=_.sibling}return null}function yl(a){var c=lo(a);if(!c)return null;for(var _=c;;){if(_.tag===W||_.tag===ne||Ht&&_.tag===xt)return _;if(_.child&&_.tag!==q){_.child.return=_,_=_.child;continue}if(_===c)return null;for(;!_.sibling;){if(!_.return||_.return===c)return null;_=_.return}_.sibling.return=_.return,_=_.sibling}return null}var Ro=o.getPublicInstance,Et=o.getRootHostContext,Pt=o.getChildHostContext,Bn=o.prepareForCommit,Ir=o.resetAfterCommit,ji=o.createInstance,Wr=o.appendInitialChild,wu=o.finalizeInitialChildren,c0=o.prepareUpdate,Ti=o.shouldSetTextContent,d0=o.shouldDeprioritizeSubtree,as=o.createTextInstance,St=o.setTimeout,so=o.clearTimeout,Jo=o.noTimeout,Gl=o.now,Fu=o.isPrimaryRenderer,fs=o.warnsIfNotActing,P0=o.supportsMutation,X=o.supportsPersistence,_e=o.supportsHydration,Ne=o.mountResponderInstance,Me=o.unmountResponderInstance,dt=o.getFundamentalComponentInstance,Hn=o.mountFundamentalComponent,Dn=o.shouldUpdateFundamentalComponent,or=o.getInstanceFromNode,mi=o.appendChild,Su=o.appendChildToContainer,bu=o.commitTextUpdate,Pu=o.commitMount,mu=o.commitUpdate,yi=o.insertBefore,Oo=o.insertInContainerBefore,Tu=o.removeChild,ao=o.removeChildFromContainer,Iu=o.resetTextContent,Oa=o.hideInstance,p0=o.hideTextInstance,Zs=o.unhideInstance,K0=o.unhideTextInstance,$s=o.updateFundamentalComponent,ka=o.unmountFundamentalComponent,cs=o.cloneInstance,w0=o.createContainerChildSet,Gn=o.appendChildToContainerChildSet,ic=o.finalizeContainerChildren,ri=o.replaceContainerChildren,Gr=o.cloneHiddenInstance,Yl=o.cloneHiddenTextInstance,ea=o.cloneInstance,lf=o.canHydrateInstance,Ns=o.canHydrateTextInstance,Ma=o.canHydrateSuspenseInstance,Ls=o.isSuspenseInstancePending,h0=o.isSuspenseInstanceFallback,Fs=o.registerSuspenseInstanceRetry,Ni=o.getNextHydratableSibling,B=o.getFirstHydratableChild,z=o.hydrateInstance,G=o.hydrateTextInstance,$=o.hydrateSuspenseInstance,De=o.getNextHydratableInstanceAfterSuspenseInstance,me=o.commitHydratedContainer,xe=o.commitHydratedSuspenseInstance,Z=o.clearSuspenseBoundary,ke=o.clearSuspenseBoundaryFromContainer,Xe=o.didNotMatchHydratedContainerTextInstance,ht=o.didNotMatchHydratedTextInstance,ie=o.didNotHydrateContainerInstance,qe=o.didNotHydrateInstance,tt=o.didNotFindHydratableContainerInstance,Tt=o.didNotFindHydratableContainerTextInstance,kt=o.didNotFindHydratableContainerSuspenseInstance,bt=o.didNotFindHydratableInstance,on=o.didNotFindHydratableTextInstance,tn=o.didNotFindHydratableSuspenseInstance,Lt=/^(.*)[\\\/]/,gn=function(a,c,_){var T="";if(c){var R=c.fileName,j=R.replace(Lt,"");if(/^index\./.test(j)){var V=R.match(Lt);if(V){var te=V[1];if(te){var oe=te.replace(Lt,"");j=oe+"/"+j}}}T=" (at "+j+":"+c.lineNumber+")"}else _&&(T=" (created by "+_+")");return` - in `+(a||"Unknown")+T},lr=at.ReactDebugCurrentFrame;function Qn(a){switch(a.tag){case U:case q:case ne:case m:case he:case Se:return"";default:var c=a._debugOwner,_=a._debugSource,T=qt(a.type),R=null;return c&&(R=qt(c.type)),gn(T,_,R)}}function _r(a){var c="",_=a;do c+=Qn(_),_=_.return;while(_);return c}var Cn=null,Ar=null;function v0(){{if(Cn===null)return null;var a=Cn._debugOwner;if(a!==null&&typeof a!="undefined")return qt(a.type)}return null}function Rr(){return Cn===null?"":_r(Cn)}function nt(){lr.getCurrentStack=null,Cn=null,Ar=null}function _t(a){lr.getCurrentStack=Rr,Cn=a,Ar=null}function Ze(a){Ar=a}var Ft="\u269B",nn="\u26D4",sn=typeof performance!="undefined"&&typeof performance.mark=="function"&&typeof performance.clearMarks=="function"&&typeof performance.measure=="function"&&typeof performance.clearMeasures=="function",Yn=null,yr=null,nu=null,Cu=!1,S0=!1,X0=!1,xu=0,di=0,ko=new Set,Zo=function(a){return Ft+" "+a},sf=function(a,c){var _=c?nn+" ":Ft+" ",T=c?" Warning: "+c:"";return""+_+a+T},gl=function(a){performance.mark(Zo(a))},af=function(a){performance.clearMarks(Zo(a))},Mo=function(a,c,_){var T=Zo(c),R=sf(a,_);try{performance.measure(R,T)}catch(j){}performance.clearMarks(T),performance.clearMeasures(R)},ds=function(a,c){return a+" (#"+c+")"},bs=function(a,c,_){return _===null?a+" ["+(c?"update":"mount")+"]":a+"."+_},No=function(a,c){var _=qt(a.type)||"Unknown",T=a._debugID,R=a.alternate!==null,j=bs(_,R,c);if(Cu&&ko.has(j))return!1;ko.add(j);var V=ds(j,T);return gl(V),!0},Lo=function(a,c){var _=qt(a.type)||"Unknown",T=a._debugID,R=a.alternate!==null,j=bs(_,R,c),V=ds(j,T);af(V)},ps=function(a,c,_){var T=qt(a.type)||"Unknown",R=a._debugID,j=a.alternate!==null,V=bs(T,j,c),te=ds(V,R);Mo(V,te,_)},Vu=function(a){switch(a.tag){case U:case W:case ne:case q:case m:case he:case Se:case we:return!0;default:return!1}},yu=function(){yr!==null&&nu!==null&&Lo(nu,yr),nu=null,yr=null,X0=!1},pi=function(){for(var a=Yn;a;)a._debugIsCurrentlyTiming&&ps(a,null,null),a=a.return},T0=function(a){a.return!==null&&T0(a.return),a._debugIsCurrentlyTiming&&No(a,null)},Q0=function(){Yn!==null&&T0(Yn)};function Fo(){Pr&&di++}function ta(){Pr&&(Cu&&(S0=!0),yr!==null&&yr!=="componentWillMount"&&yr!=="componentWillReceiveProps"&&(X0=!0))}function Kl(a){if(Pr){if(!sn||Vu(a)||(Yn=a,!No(a,null)))return;a._debugIsCurrentlyTiming=!0}}function Ki(a){if(Pr){if(!sn||Vu(a))return;a._debugIsCurrentlyTiming=!1,Lo(a,null)}}function Yr(a){if(Pr){if(!sn||Vu(a)||(Yn=a.return,!a._debugIsCurrentlyTiming))return;a._debugIsCurrentlyTiming=!1,ps(a,null,null)}}function fo(a){if(Pr){if(!sn||Vu(a)||(Yn=a.return,!a._debugIsCurrentlyTiming))return;a._debugIsCurrentlyTiming=!1;var c=a.tag===pe?"Rendering was suspended":"An error was thrown inside this error boundary";ps(a,null,c)}}function Oi(a,c){if(Pr){if(!sn||(yu(),!No(a,c)))return;nu=a,yr=c}}function gi(){if(Pr){if(!sn)return;if(yr!==null&&nu!==null){var a=X0?"Scheduled a cascading update":null;ps(nu,yr,a)}yr=null,nu=null}}function ff(a){if(Pr){if(Yn=a,!sn)return;xu=0,gl("(React Tree Reconciliation)"),Q0()}}function cf(a,c){if(Pr){if(!sn)return;var _=null;if(a!==null)if(a.tag===U)_="A top-level update interrupted the previous render";else{var T=qt(a.type)||"Unknown";_="An update to "+T+" interrupted the previous render"}else xu>1&&(_="There were cascading updates");xu=0;var R=c?"(React Tree Reconciliation: Completed Root)":"(React Tree Reconciliation: Yielded)";pi(),Mo(R,"(React Tree Reconciliation)",_)}}function J0(){if(Pr){if(!sn)return;Cu=!0,S0=!1,ko.clear(),gl("(Committing Changes)")}}function Z0(){if(Pr){if(!sn)return;var a=null;S0?a="Lifecycle hook scheduled a cascading update":xu>0&&(a="Caused by a cascading update in earlier commit"),S0=!1,xu++,Cu=!1,ko.clear(),Mo("(Committing Changes)","(Committing Changes)",a)}}function Te(){if(Pr){if(!sn)return;di=0,gl("(Committing Snapshot Effects)")}}function et(){if(Pr){if(!sn)return;var a=di;di=0,Mo("(Committing Snapshot Effects: "+a+" Total)","(Committing Snapshot Effects)",null)}}function Ve(){if(Pr){if(!sn)return;di=0,gl("(Committing Host Effects)")}}function Gt(){if(Pr){if(!sn)return;var a=di;di=0,Mo("(Committing Host Effects: "+a+" Total)","(Committing Host Effects)",null)}}function Yt(){if(Pr){if(!sn)return;di=0,gl("(Calling Lifecycle Methods)")}}function sr(){if(Pr){if(!sn)return;var a=di;di=0,Mo("(Calling Lifecycle Methods: "+a+" Total)","(Calling Lifecycle Methods)",null)}}var Br=[],wn;wn=[];var fu=-1;function Gu(a){return{current:a}}function Kr(a,c){if(fu<0){Ke(!1,"Unexpected pop.");return}c!==wn[fu]&&Ke(!1,"Unexpected Fiber popped."),a.current=Br[fu],Br[fu]=null,wn[fu]=null,fu--}function Vr(a,c,_){fu++,Br[fu]=a.current,wn[fu]=_,a.current=c}var Bu;Bu={};var Sn={};Object.freeze(Sn);var C0=Gu(Sn),Au=Gu(!1),ei=Sn;function _l(a,c,_){return ni?Sn:_&&zi(c)?ei:C0.current}function Ps(a,c,_){if(!ni){var T=a.stateNode;T.__reactInternalMemoizedUnmaskedChildContext=c,T.__reactInternalMemoizedMaskedChildContext=_}}function Uu(a,c){if(ni)return Sn;var _=a.type,T=_.contextTypes;if(!T)return Sn;var R=a.stateNode;if(R&&R.__reactInternalMemoizedUnmaskedChildContext===c)return R.__reactInternalMemoizedMaskedChildContext;var j={};for(var V in T)j[V]=c[V];{var te=qt(_)||"Unknown";E(T,j,"context",te,Rr)}return R&&Ps(a,c,j),j}function na(){return ni?!1:Au.current}function zi(a){if(ni)return!1;var c=a.childContextTypes;return c!=null}function Is(a){ni||(Kr(Au,a),Kr(C0,a))}function x0(a){ni||(Kr(Au,a),Kr(C0,a))}function Li(a,c,_){if(!ni){if(C0.current!==Sn)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");Vr(C0,c,a),Vr(Au,_,a)}}function A0(a,c,_){if(ni)return _;var T=a.stateNode,R=c.childContextTypes;if(typeof T.getChildContext!="function"){{var j=qt(c)||"Unknown";Bu[j]||(Bu[j]=!0,Ke(!1,"%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",j,j))}return _}var V;Ze("getChildContext"),Oi(a,"getChildContext"),V=T.getChildContext(),gi(),Ze(null);for(var te in V)if(!(te in R))throw Error((qt(c)||"Unknown")+'.getChildContext(): key "'+te+'" is not defined in childContextTypes.');{var oe=qt(c)||"Unknown";E(R,V,"child context",oe,Rr)}return f({},_,{},V)}function Fi(a){if(ni)return!1;var c=a.stateNode,_=c&&c.__reactInternalMemoizedMergedChildContext||Sn;return ei=C0.current,Vr(C0,_,a),Vr(Au,Au.current,a),!0}function $o(a,c,_){if(!ni){var T=a.stateNode;if(!T)throw Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(_){var R=A0(a,c,ei);T.__reactInternalMemoizedMergedChildContext=R,Kr(Au,a),Kr(C0,a),Vr(C0,R,a),Vr(Au,_,a)}else Kr(Au,a),Vr(Au,_,a)}}function El(a){if(ni)return Sn;if(!(Ms(a)&&a.tag===N))throw Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var c=a;do{switch(c.tag){case U:return c.stateNode.context;case N:{var _=c.type;if(zi(_))return c.stateNode.__reactInternalMemoizedMergedChildContext;break}}c=c.return}while(c!==null);throw Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}var I0=1,R0=2,co=t.unstable_runWithPriority,Ru=t.unstable_scheduleCallback,Yu=t.unstable_cancelCallback,Xl=t.unstable_shouldYield,hs=t.unstable_requestPaint,ra=t.unstable_now,df=t.unstable_getCurrentPriorityLevel,Ku=t.unstable_ImmediatePriority,vs=t.unstable_UserBlockingPriority,wr=t.unstable_NormalPriority,$0=t.unstable_LowPriority,Xi=t.unstable_IdlePriority;if(Ln&&!(k.__interactionsRef!=null&&k.__interactionsRef.current!=null))throw Error("It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling");var ru={},Ci=99,Xr=98,Wn=97,Xu=96,m0=95,y0=90,kn=Xl,se=hs!==void 0?hs:function(){},re=null,Le=null,Ae=!1,ot=ra(),vt=ot<1e4?ra:function(){return ra()-ot};function Xt(){switch(df()){case Ku:return Ci;case vs:return Xr;case wr:return Wn;case $0:return Xu;case Xi:return m0;default:throw Error("Unknown priority level.")}}function xn(a){switch(a){case Ci:return Ku;case Xr:return vs;case Wn:return wr;case Xu:return $0;case m0:return Xi;default:throw Error("Unknown priority level.")}}function _n(a,c){var _=xn(a);return co(_,c)}function yn(a,c,_){var T=xn(a);return Ru(T,c,_)}function En(a){return re===null?(re=[a],Le=Ru(Ku,xi)):re.push(a),ru}function er(a){a!==ru&&Yu(a)}function It(){if(Le!==null){var a=Le;Le=null,Yu(a)}xi()}function xi(){if(!Ae&&re!==null){Ae=!0;var a=0;try{var c=!0,_=re;_n(Ci,function(){for(;a<_.length;a++){var T=_[a];do T=T(c);while(T!==null)}}),re=null}catch(T){throw re!==null&&(re=re.slice(a+1)),Ru(Ku,It),T}finally{Ae=!1}}}var Sr=0,cr=1,Y=2,Qr=4,Jr=8,Ur=1073741823,lt=0,hi=1,Qi=2,g0=3,bn=Ur,Qu=bn-1,eo=10,po=Qu-1;function Ju(a){return po-(a/eo|0)}function bo(a){return(po-a)*eo}function to(a,c){return((a/c|0)+1)*c}function Na(a,c,_){return po-to(po-a+c/eo,_/eo)}var pf=5e3,uc=250;function ms(a){return Na(a,pf,uc)}function ia(a,c){return Na(a,c,uc)}var B0=500,oc=100;function La(a){return Na(a,B0,oc)}function gd(a){return g0++}function $1(a,c){if(c===bn)return Ci;if(c===hi||c===Qi)return m0;var _=bo(c)-bo(a);return _<=0?Ci:_<=B0+oc?Xr:_<=pf+uc?Wn:m0}function e2(a,c){return a===c&&(a!==0||1/a==1/c)||a!==a&&c!==c}var ho=typeof Object.is=="function"?Object.is:e2,Uc=Object.prototype.hasOwnProperty;function Dl(a,c){if(ho(a,c))return!0;if(typeof a!="object"||a===null||typeof c!="object"||c===null)return!1;var _=Object.keys(a),T=Object.keys(c);if(_.length!==T.length)return!1;for(var R=0;R<_.length;R++)if(!Uc.call(c,_[R])||!ho(a[_[R]],c[_[R]]))return!1;return!0}var el=function(){};{var _d=function(a){for(var c=arguments.length,_=new Array(c>1?c-1:0),T=1;T2?_-2:0),R=2;R<_;R++)T[R-2]=arguments[R];_d.apply(void 0,[c].concat(T))}}}var Bs=el,wl={recordUnsafeLifecycleWarnings:function(a,c){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(a,c){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var t2=function(a){for(var c=null,_=a;_!==null;)_.mode&cr&&(c=_),_=_.return;return c},Po=function(a){var c=[];return a.forEach(function(_){c.push(_)}),c.sort().join(", ")},Fa=[],ba=[],Pa=[],ua=[],ys=[],gs=[],Ql=new Set;wl.recordUnsafeLifecycleWarnings=function(a,c){Ql.has(a.type)||(typeof c.componentWillMount=="function"&&c.componentWillMount.__suppressDeprecationWarning!==!0&&Fa.push(a),a.mode&cr&&typeof c.UNSAFE_componentWillMount=="function"&&ba.push(a),typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&Pa.push(a),a.mode&cr&&typeof c.UNSAFE_componentWillReceiveProps=="function"&&ua.push(a),typeof c.componentWillUpdate=="function"&&c.componentWillUpdate.__suppressDeprecationWarning!==!0&&ys.push(a),a.mode&cr&&typeof c.UNSAFE_componentWillUpdate=="function"&&gs.push(a))},wl.flushPendingUnsafeLifecycleWarnings=function(){var a=new Set;Fa.length>0&&(Fa.forEach(function(Nt){a.add(qt(Nt.type)||"Component"),Ql.add(Nt.type)}),Fa=[]);var c=new Set;ba.length>0&&(ba.forEach(function(Nt){c.add(qt(Nt.type)||"Component"),Ql.add(Nt.type)}),ba=[]);var _=new Set;Pa.length>0&&(Pa.forEach(function(Nt){_.add(qt(Nt.type)||"Component"),Ql.add(Nt.type)}),Pa=[]);var T=new Set;ua.length>0&&(ua.forEach(function(Nt){T.add(qt(Nt.type)||"Component"),Ql.add(Nt.type)}),ua=[]);var R=new Set;ys.length>0&&(ys.forEach(function(Nt){R.add(qt(Nt.type)||"Component"),Ql.add(Nt.type)}),ys=[]);var j=new Set;if(gs.length>0&&(gs.forEach(function(Nt){j.add(qt(Nt.type)||"Component"),Ql.add(Nt.type)}),gs=[]),c.size>0){var V=Po(c);Ke(!1,`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move code with side effects to componentDidMount, and set initial state in the constructor. - -Please update the following components: %s`,V)}if(T.size>0){var te=Po(T);Ke(!1,`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move data fetching code or side effects to componentDidUpdate. -* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state - -Please update the following components: %s`,te)}if(j.size>0){var oe=Po(j);Ke(!1,`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move data fetching code or side effects to componentDidUpdate. - -Please update the following components: %s`,oe)}if(a.size>0){var Ie=Po(a);Bs(!1,`componentWillMount has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move code with side effects to componentDidMount, and set initial state in the constructor. -* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. - -Please update the following components: %s`,Ie)}if(_.size>0){var Ye=Po(_);Bs(!1,`componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move data fetching code or side effects to componentDidUpdate. -* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state -* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. - -Please update the following components: %s`,Ye)}if(R.size>0){var pt=Po(R);Bs(!1,`componentWillUpdate has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details. - -* Move data fetching code or side effects to componentDidUpdate. -* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder. - -Please update the following components: %s`,pt)}};var Io=new Map,hf=new Set;wl.recordLegacyContextWarning=function(a,c){var _=t2(a);if(_===null){Ke(!1,"Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(!hf.has(a.type)){var T=Io.get(_);(a.type.contextTypes!=null||a.type.childContextTypes!=null||c!==null&&typeof c.getChildContext=="function")&&(T===void 0&&(T=[],Io.set(_,T)),T.push(a))}},wl.flushLegacyContextWarning=function(){Io.forEach(function(a,c){var _=new Set;a.forEach(function(j){_.add(qt(j.type)||"Component"),hf.add(j.type)});var T=Po(_),R=_r(c);Ke(!1,`Legacy context API has been detected within a strict-mode tree. - -The old API will be supported in all 16.x releases, but applications using it should migrate to the new version. - -Please update the following components: %s - -Learn more about this warning here: https://fb.me/react-legacy-context%s`,T,R)})},wl.discardPendingWarnings=function(){Fa=[],ba=[],Pa=[],ua=[],ys=[],gs=[],Io=new Map}}var tl=null,ju=null,Ia=function(a){tl=a};function Zu(a){{if(tl===null)return a;var c=tl(a);return c===void 0?a:c.current}}function U0(a){return Zu(a)}function vf(a){{if(tl===null)return a;var c=tl(a);if(c===void 0){if(a!=null&&typeof a.render=="function"){var _=Zu(a.render);if(a.render!==_){var T={$$typeof:An,render:_};return a.displayName!==void 0&&(T.displayName=a.displayName),T}}return a}return c.current}}function jc(a,c){{if(tl===null)return!1;var _=a.elementType,T=c.type,R=!1,j=typeof T=="object"&&T!==null?T.$$typeof:null;switch(a.tag){case N:{typeof T=="function"&&(R=!0);break}case L:{(typeof T=="function"||j===vr)&&(R=!0);break}case ge:{(j===An||j===vr)&&(R=!0);break}case Oe:case le:{(j===Wt||j===vr)&&(R=!0);break}default:return!1}if(R){var V=tl(_);if(V!==void 0&&V===tl(T))return!0}return!1}}function lc(a){{if(tl===null||typeof WeakSet!="function")return;ju===null&&(ju=new WeakSet),ju.add(a)}}var Sl=function(a,c){{if(tl===null)return;var _=c.staleFamilies,T=c.updatedFamilies;Xa(),xp(function(){oa(a.current,T,_)})}},_s=function(a,c){{if(a.context!==Sn)return;Xa(),fv(function(){l_(c,a,null,null)})}};function oa(a,c,_){{var T=a.alternate,R=a.child,j=a.sibling,V=a.tag,te=a.type,oe=null;switch(V){case L:case le:case N:oe=te;break;case ge:oe=te.render;break;default:break}if(tl===null)throw new Error("Expected resolveFamily to be set during hot reload.");var Ie=!1,Ye=!1;if(oe!==null){var pt=tl(oe);pt!==void 0&&(_.has(pt)?Ye=!0:c.has(pt)&&(V===N?Ye=!0:Ie=!0))}ju!==null&&(ju.has(a)||T!==null&&ju.has(T))&&(Ye=!0),Ye&&(a._debugNeedsRemount=!0),(Ye||Ie)&&dl(a,bn),R!==null&&!Ye&&oa(R,c,_),j!==null&&oa(j,c,_)}}var n2=function(a,c){{var _=new Set,T=new Set(c.map(function(R){return R.current}));return la(a.current,T,_),_}};function la(a,c,_){{var T=a.child,R=a.sibling,j=a.tag,V=a.type,te=null;switch(j){case L:case le:case N:te=V;break;case ge:te=V.render;break;default:break}var oe=!1;te!==null&&c.has(te)&&(oe=!0),oe?sc(a,_):T!==null&&la(T,c,_),R!==null&&la(R,c,_)}}function sc(a,c){{var _=zc(a,c);if(_)return;for(var T=a;;){switch(T.tag){case W:c.add(T.stateNode);return;case q:c.add(T.stateNode.containerInfo);return;case U:c.add(T.stateNode.containerInfo);return}if(T.return===null)throw new Error("Expected to reach root first.");T=T.return}}}function zc(a,c){for(var _=a,T=!1;;){if(_.tag===W)T=!0,c.add(_.stateNode);else if(_.child!==null){_.child.return=_,_=_.child;continue}if(_===a)return T;for(;_.sibling===null;){if(_.return===null||_.return===a)return T;_=_.return}_.sibling.return=_.return,_=_.sibling}return!1}function bi(a,c){if(a&&a.defaultProps){var _=f({},c),T=a.defaultProps;for(var R in T)_[R]===void 0&&(_[R]=T[R]);return _}return c}function g(a){if(Yo(a),a._status!==So)throw a._result;return a._result}var y=Gu(null),A;A={};var F=null,I=null,J=null,fe=!1;function mt(){F=null,I=null,J=null,fe=!1}function Ct(){fe=!0}function Mt(){fe=!1}function Er(a,c){var _=a.type._context;Fu?(Vr(y,_._currentValue,a),_._currentValue=c,_._currentRenderer===void 0||_._currentRenderer===null||_._currentRenderer===A||Ke(!1,"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),_._currentRenderer=A):(Vr(y,_._currentValue2,a),_._currentValue2=c,_._currentRenderer2===void 0||_._currentRenderer2===null||_._currentRenderer2===A||Ke(!1,"Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),_._currentRenderer2=A)}function $u(a){var c=y.current;Kr(y,a);var _=a.type._context;Fu?_._currentValue=c:_._currentValue2=c}function iu(a,c,_){if(ho(_,c))return 0;var T=typeof a._calculateChangedBits=="function"?a._calculateChangedBits(_,c):Ur;return(T&Ur)!==T&&Kt(!1,"calculateChangedBits: Expected the return value to be a 31-bit integer. Instead received: %s",T),T|0}function j0(a,c){for(var _=a;_!==null;){var T=_.alternate;if(_.childExpirationTime=c&&up(),_.firstContext=null)}}function He(a,c){if(fe&&Kt(!1,"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),J!==a){if(!(c===!1||c===0)){var _;typeof c!="number"||c===Ur?(J=a,_=Ur):_=c;var T={context:a,observedBits:_,next:null};if(I===null){if(F===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");I=T,F.dependencies={expirationTime:lt,firstContext:T,responders:null}}else I=I.next=T}}return Fu?a._currentValue:a._currentValue2}var Be=0,ut=1,Jt=2,jn=3,ti=!1,tr,ii;tr=!1,ii=null;function qi(a){var c={baseState:a,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null};return c}function jr(a){var c={baseState:a.baseState,firstUpdate:a.firstUpdate,lastUpdate:a.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null};return c}function gu(a,c){var _={expirationTime:a,suspenseConfig:c,tag:Be,payload:null,callback:null,next:null,nextEffect:null};return _.priority=Xt(),_}function Ba(a,c){a.lastUpdate===null?a.firstUpdate=a.lastUpdate=c:(a.lastUpdate.next=c,a.lastUpdate=c)}function Ua(a,c){var _=a.alternate,T,R;_===null?(T=a.updateQueue,R=null,T===null&&(T=a.updateQueue=qi(a.memoizedState))):(T=a.updateQueue,R=_.updateQueue,T===null?R===null?(T=a.updateQueue=qi(a.memoizedState),R=_.updateQueue=qi(_.memoizedState)):T=a.updateQueue=jr(R):R===null&&(R=_.updateQueue=jr(T))),R===null||T===R?Ba(T,c):T.lastUpdate===null||R.lastUpdate===null?(Ba(T,c),Ba(R,c)):(Ba(T,c),R.lastUpdate=c),a.tag===N&&(ii===T||R!==null&&ii===R)&&!tr&&(Ke(!1,"An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),tr=!0)}function r2(a,c){var _=a.updateQueue;_===null?_=a.updateQueue=qi(a.memoizedState):_=Ed(a,_),_.lastCapturedUpdate===null?_.firstCapturedUpdate=_.lastCapturedUpdate=c:(_.lastCapturedUpdate.next=c,_.lastCapturedUpdate=c)}function Ed(a,c){var _=a.alternate;return _!==null&&c===_.updateQueue&&(c=a.updateQueue=jr(c)),c}function Dd(a,c,_,T,R,j){switch(_.tag){case ut:{var V=_.payload;if(typeof V=="function"){Ct(),Ei&&a.mode&cr&&V.call(j,T,R);var te=V.call(j,T,R);return Mt(),te}return V}case jn:a.effectTag=a.effectTag&~f0|Hr;case Be:{var oe=_.payload,Ie;return typeof oe=="function"?(Ct(),Ei&&a.mode&cr&&oe.call(j,T,R),Ie=oe.call(j,T,R),Mt()):Ie=oe,Ie==null?T:f({},T,Ie)}case Jt:return ti=!0,T}return T}function mf(a,c,_,T,R){ti=!1,c=Ed(a,c),ii=c;for(var j=c.baseState,V=null,te=lt,oe=c.firstUpdate,Ie=j;oe!==null;){var Ye=oe.expirationTime;if(Ye from render. Or maybe you meant to call this function rather than return it."))}function yh(a){function c(it,Ot){if(!!a){var Je=it.lastEffect;Je!==null?(Je.nextEffect=Ot,it.lastEffect=Ot):it.firstEffect=it.lastEffect=Ot,Ot.nextEffect=null,Ot.effectTag=W0}}function _(it,Ot){if(!a)return null;for(var Je=Ot;Je!==null;)c(it,Je),Je=Je.sibling;return null}function T(it,Ot){for(var Je=new Map,Bt=Ot;Bt!==null;)Bt.key!==null?Je.set(Bt.key,Bt):Je.set(Bt.index,Bt),Bt=Bt.sibling;return Je}function R(it,Ot,Je){var Bt=wo(it,Ot,Je);return Bt.index=0,Bt.sibling=null,Bt}function j(it,Ot,Je){if(it.index=Je,!a)return Ot;var Bt=it.alternate;if(Bt!==null){var Mn=Bt.index;return Mnqr?(_u=ar,ar=null):_u=ar.sibling;var _0=Nt(it,ar,Je[qr],Bt);if(_0===null){ar===null&&(ar=_u);break}a&&ar&&_0.alternate===null&&c(it,ar),ou=j(_0,ou,qr),qu===null?oi=_0:qu.sibling=_0,qu=_0,ar=_u}if(qr===Je.length)return _(it,ar),oi;if(ar===null){for(;qrH0?(Cs=_u,_u=null):Cs=_u.sibling;var pl=Nt(it,_u,Hu.value,Bt);if(pl===null){_u===null&&(_u=Cs);break}a&&_u&&pl.alternate===null&&c(it,_u),_0=j(pl,_0,H0),qr===null?ou=pl:qr.sibling=pl,qr=pl,_u=Cs}if(Hu.done)return _(it,_u),ou;if(_u===null){for(;!Hu.done;H0++,Hu=ar.next()){var Ja=pt(it,Hu.value,Bt);Ja!==null&&(_0=j(Ja,_0,H0),qr===null?ou=Ja:qr.sibling=Ja,qr=Ja)}return ou}for(var jo=T(it,_u);!Hu.done;H0++,Hu=ar.next()){var xs=Vt(jo,it,H0,Hu.value,Bt);xs!==null&&(a&&xs.alternate!==null&&jo.delete(xs.key===null?H0:xs.key),_0=j(xs,_0,H0),qr===null?ou=xs:qr.sibling=xs,qr=xs)}return a&&jo.forEach(function(X2){return c(it,X2)}),ou}function $r(it,Ot,Je,Bt){if(Ot!==null&&Ot.tag===ne){_(it,Ot.sibling);var Mn=R(Ot,Je,Bt);return Mn.return=it,Mn}_(it,Ot);var pn=Cy(Je,it.mode,Bt);return pn.return=it,pn}function wi(it,Ot,Je,Bt){for(var Mn=Je.key,pn=Ot;pn!==null;){if(pn.key===Mn)if(pn.tag===m?Je.type===ue:pn.elementType===Je.type||jc(pn,Je)){_(it,pn.sibling);var Pi=R(pn,Je.type===ue?Je.props.children:Je.props,Bt);return Pi.ref=fc(it,pn,Je),Pi.return=it,Pi._debugSource=Je._source,Pi._debugOwner=Je._owner,Pi}else{_(it,pn);break}else c(it,pn);pn=pn.sibling}if(Je.type===ue){var oi=Qa(Je.props.children,it.mode,Bt,Je.key);return oi.return=it,oi}else{var qu=Ty(Je,it.mode,Bt);return qu.ref=fc(it,Ot,Je),qu.return=it,qu}}function N0(it,Ot,Je,Bt){for(var Mn=Je.key,pn=Ot;pn!==null;){if(pn.key===Mn)if(pn.tag===q&&pn.stateNode.containerInfo===Je.containerInfo&&pn.stateNode.implementation===Je.implementation){_(it,pn.sibling);var Pi=R(pn,Je.children||[],Bt);return Pi.return=it,Pi}else{_(it,pn);break}else c(it,pn);pn=pn.sibling}var oi=xy(Je,it.mode,Bt);return oi.return=it,oi}function Vi(it,Ot,Je,Bt){var Mn=typeof Je=="object"&&Je!==null&&Je.type===ue&&Je.key===null;Mn&&(Je=Je.props.children);var pn=typeof Je=="object"&&Je!==null;if(pn)switch(Je.$$typeof){case ae:return V(wi(it,Ot,Je,Bt));case Ce:return V(N0(it,Ot,Je,Bt))}if(typeof Je=="string"||typeof Je=="number")return V($r(it,Ot,""+Je,Bt));if(Kc(Je))return vn(it,Ot,Je,Bt);if(ur(Je))return xr(it,Ot,Je,Bt);if(pn&&cc(it,Je),typeof Je=="function"&&f2(),typeof Je=="undefined"&&!Mn)switch(it.tag){case N:{var Pi=it.stateNode;if(Pi.render._isMockFunction)break}case L:{var oi=it.type;throw Error((oi.displayName||oi.name||"Component")+"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.")}}return _(it,Ot)}return Vi}var gf=yh(!0),Xc=yh(!1);function gh(a,c){if(!(a===null||c.child===a.child))throw Error("Resuming work not yet implemented.");if(c.child!==null){var _=c.child,T=wo(_,_.pendingProps,_.expirationTime);for(c.child=T,T.return=c;_.sibling!==null;)_=_.sibling,T=T.sibling=wo(_,_.pendingProps,_.expirationTime),T.return=c;T.sibling=null}}function vm(a,c){for(var _=a.child;_!==null;)Rv(_,c),_=_.sibling}var js={},fa=Gu(js),Ji=Gu(js),O0=Gu(js);function t0(a){if(a===js)throw Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return a}function Jl(){var a=t0(O0.current);return a}function za(a,c){Vr(O0,c,a),Vr(Ji,a,a),Vr(fa,js,a);var _=Et(c);Kr(fa,a),Vr(fa,_,a)}function no(a){Kr(fa,a),Kr(Ji,a),Kr(O0,a)}function ul(){var a=t0(fa.current);return a}function dc(a){var c=t0(O0.current),_=t0(fa.current),T=Pt(_,a.type,c);_!==T&&(Vr(Ji,a,a),Vr(fa,T,a))}function Od(a){Ji.current===a&&(Kr(fa,a),Kr(Ji,a))}var _h=0,_f=1,Ef=1,Qc=2,xl=Gu(_h);function Jc(a,c){return(a&c)!=0}function ca(a){return a&_f}function c2(a,c){return a&_f|c}function d2(a,c){return a|c}function Or(a,c){Vr(xl,c,a)}function da(a){Kr(xl,a)}function kd(a,c){var _=a.memoizedState;if(_!==null)return _.dehydrated!==null;var T=a.memoizedProps;return T.fallback===void 0?!1:T.unstable_avoidThisFallback!==!0?!0:!c}function Zc(a){for(var c=a;c!==null;){if(c.tag===pe){var _=c.memoizedState;if(_!==null){var T=_.dehydrated;if(T===null||Ls(T)||h0(T))return c}}else if(c.tag===wt&&c.memoizedProps.revealOrder!==void 0){var R=(c.effectTag&Hr)!==_i;if(R)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===a)return null;for(;c.sibling===null;){if(c.return===null||c.return===a)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var p2={},vi=Array.isArray;function Md(a,c,_,T){return{fiber:T,props:c,responder:a,rootEventTypes:null,state:_}}function mm(a,c,_,T,R){var j=p2,V=a.getInitialState;V!==null&&(j=V(c));var te=Md(a,c,j,_);if(!R)for(var oe=_;oe!==null;){var Ie=oe.tag;if(Ie===W){R=oe.stateNode;break}else if(Ie===U){R=oe.stateNode.containerInfo;break}oe=oe.return}Ne(a,te,c,j,R),T.set(a,te)}function h2(a,c,_,T,R){var j,V;if(a&&(j=a.responder,V=a.props),!(j&&j.$$typeof===Ut))throw Error("An invalid value was used as an event listener. Expect one or many event listeners created via React.unstable_useResponder().");var te=V;if(_.has(j)){Kt(!1,'Duplicate event responder "%s" found in event listeners. Event listeners passed to elements cannot use the same event responder more than once.',j.displayName);return}_.add(j);var oe=T.get(j);oe===void 0?mm(j,te,c,T,R):(oe.props=te,oe.fiber=c)}function dn(a,c,_){var T=new Set,R=c.dependencies;if(a!=null){R===null&&(R=c.dependencies={expirationTime:lt,firstContext:null,responders:new Map});var j=R.responders;if(j===null&&(j=new Map),vi(a))for(var V=0,te=a.length;V0){var j=R.dispatch;if(Es!==null){var V=Es.get(R);if(V!==void 0){Es.delete(R);var te=T.memoizedState,oe=V;do{var Ie=oe.action;te=a(te,Ie),oe=oe.next}while(oe!==null);return ho(te,T.memoizedState)||up(),T.memoizedState=te,T.baseUpdate===R.last&&(T.baseState=te),R.lastRenderedState=te,[te,j]}}return[T.memoizedState,j]}var Ye=R.last,pt=T.baseUpdate,Nt=T.baseState,Vt;if(pt!==null?(Ye!==null&&(Ye.next=null),Vt=pt.next):Vt=Ye!==null?Ye.next:null,Vt!==null){var zt=Nt,vn=null,xr=null,$r=pt,wi=Vt,N0=!1;do{var Vi=wi.expirationTime;if(ViOu&&(Ou=Vi,G2(Ou));else if(vv(Vi,wi.suspenseConfig),wi.eagerReducer===a)zt=wi.eagerState;else{var it=wi.action;zt=a(zt,it)}$r=wi,wi=wi.next}while(wi!==null&&wi!==Vt);N0||(xr=$r,vn=zt),ho(zt,T.memoizedState)||up(),T.memoizedState=zt,T.baseUpdate=xr,T.baseState=vn,R.lastRenderedState=zt}var Ot=R.dispatch;return[T.memoizedState,Ot]}function Rf(a){var c=mc();typeof a=="function"&&(a=a()),c.memoizedState=c.baseState=a;var _=c.queue={last:null,dispatch:null,lastRenderedReducer:Nd,lastRenderedState:a},T=_.dispatch=u1.bind(null,ll,_);return[c.memoizedState,T]}function n1(a){return t1(Nd,a)}function Wa(a,c,_,T){var R={tag:a,create:c,destroy:_,deps:T,next:null};if(Zl===null)Zl=Ha(),Zl.lastEffect=R.next=R;else{var j=Zl.lastEffect;if(j===null)Zl.lastEffect=R.next=R;else{var V=j.next;j.next=R,R.next=V,Zl.lastEffect=R}}return R}function r1(a){var c=mc(),_={current:a};return Object.seal(_),c.memoizedState=_,_}function Ld(a){var c=e1();return c.memoizedState}function g2(a,c,_,T){var R=mc(),j=T===void 0?null:T;Tf|=a,R.memoizedState=Wa(c,_,void 0,j)}function yc(a,c,_,T){var R=e1(),j=T===void 0?null:T,V=void 0;if(Pn!==null){var te=Pn.memoizedState;if(V=te.destroy,j!==null){var oe=te.deps;if(xf(j,oe)){Wa(wf,_,V,j);return}}}Tf|=a,R.memoizedState=Wa(c,_,V,j)}function i1(a,c){return typeof jest!="undefined"&&Av(ll),g2(mr|L0,rr|$c,a,c)}function Rl(a,c){return typeof jest!="undefined"&&Av(ll),yc(mr|L0,rr|$c,a,c)}function pa(a,c){return g2(mr,Sf|ol,a,c)}function wh(a,c){return yc(mr,Sf|ol,a,c)}function Fd(a,c){if(typeof c=="function"){var _=c,T=a();return _(T),function(){_(null)}}else if(c!=null){var R=c;R.hasOwnProperty("current")||Kt(!1,"Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(R).join(", ")+"}");var j=a();return R.current=j,function(){R.current=null}}}function bd(a,c,_){typeof c!="function"&&Kt(!1,"Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",c!==null?typeof c:"null");var T=_!=null?_.concat([a]):null;return g2(mr,Sf|ol,Fd.bind(null,c,a),T)}function Sh(a,c,_){typeof c!="function"&&Kt(!1,"Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",c!==null?typeof c:"null");var T=_!=null?_.concat([a]):null;return yc(mr,Sf|ol,Fd.bind(null,c,a),T)}function _2(a,c){}var Th=_2;function Ol(a,c){var _=mc(),T=c===void 0?null:c;return _.memoizedState=[a,T],a}function es(a,c){var _=e1(),T=c===void 0?null:c,R=_.memoizedState;if(R!==null&&T!==null){var j=R[1];if(xf(T,j))return R[0]}return _.memoizedState=[a,T],a}function Ds(a,c){var _=mc(),T=c===void 0?null:c,R=a();return _.memoizedState=[R,T],R}function zs(a,c){var _=e1(),T=c===void 0?null:c,R=_.memoizedState;if(R!==null&&T!==null){var j=R[1];if(xf(T,j))return R[0]}var V=a();return _.memoizedState=[V,T],V}function Pd(a,c){var _=Rf(a),T=_[0],R=_[1];return i1(function(){t.unstable_next(function(){var j=Bo.suspense;Bo.suspense=c===void 0?null:c;try{R(a)}finally{Bo.suspense=j}})},[a,c]),T}function Ch(a,c){var _=n1(a),T=_[0],R=_[1];return Rl(function(){t.unstable_next(function(){var j=Bo.suspense;Bo.suspense=c===void 0?null:c;try{R(a)}finally{Bo.suspense=j}})},[a,c]),T}function Id(a){var c=Rf(!1),_=c[0],T=c[1],R=Ol(function(j){T(!0),t.unstable_next(function(){var V=Bo.suspense;Bo.suspense=a===void 0?null:a;try{T(!1),j()}finally{Bo.suspense=V}})},[a,_]);return[R,_]}function Bd(a){var c=n1(!1),_=c[0],T=c[1],R=es(function(j){T(!0),t.unstable_next(function(){var V=Bo.suspense;Bo.suspense=a===void 0?null:a;try{T(!1),j()}finally{Bo.suspense=V}})},[a,_]);return[R,_]}function u1(a,c,_){if(!(vc=0){var _=l1()-s1;a.actualDuration+=_,c&&(a.selfBaseDuration=_),s1=-1}}var Ml=null,Ga=null,ha=!1;function qd(){ha&&Kt(!1,"We should not be hydrating here. This is a bug in React. Please file a bug.")}function Hd(a){if(!_e)return!1;var c=a.stateNode.containerInfo;return Ga=B(c),Ml=a,ha=!0,!0}function Em(a,c){return _e?(Ga=Ni(c),Gd(a),ha=!0,!0):!1}function Wd(a,c){switch(a.tag){case U:ie(a.stateNode.containerInfo,c);break;case W:qe(a.type,a.memoizedProps,a.stateNode,c);break}var _=eE();_.stateNode=c,_.return=a,_.effectTag=W0,a.lastEffect!==null?(a.lastEffect.nextEffect=_,a.lastEffect=_):a.firstEffect=a.lastEffect=_}function Mh(a,c){switch(c.effectTag=c.effectTag&~tu|ai,a.tag){case U:{var _=a.stateNode.containerInfo;switch(c.tag){case W:var T=c.type,R=c.pendingProps;tt(_,T,R);break;case ne:var j=c.pendingProps;Tt(_,j);break;case pe:kt(_);break}break}case W:{var V=a.type,te=a.memoizedProps,oe=a.stateNode;switch(c.tag){case W:var Ie=c.type,Ye=c.pendingProps;bt(V,te,oe,Ie,Ye);break;case ne:var pt=c.pendingProps;on(V,te,oe,pt);break;case pe:tn(V,te,oe);break}break}default:return}}function Nh(a,c){switch(a.tag){case W:{var _=a.type,T=a.pendingProps,R=lf(c,_,T);return R!==null?(a.stateNode=R,!0):!1}case ne:{var j=a.pendingProps,V=Ns(c,j);return V!==null?(a.stateNode=V,!0):!1}case pe:{if(Di){var te=Ma(c);if(te!==null){var oe={dehydrated:te,retryTime:hi};a.memoizedState=oe;var Ie=tE(te);return Ie.return=a,a.child=Ie,!0}}return!1}default:return!1}}function Vd(a){if(!!ha){var c=Ga;if(!c){Mh(Ml,a),ha=!1,Ml=a;return}var _=c;if(!Nh(a,c)){if(c=Ni(_),!c||!Nh(a,c)){Mh(Ml,a),ha=!1,Ml=a;return}Wd(Ml,_)}Ml=a,Ga=B(c)}}function Dm(a,c,_){if(!_e)throw Error("Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var T=a.stateNode,R=z(T,a.type,a.memoizedProps,c,_,a);return a.updateQueue=R,R!==null}function wm(a){if(!_e)throw Error("Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var c=a.stateNode,_=a.memoizedProps,T=G(c,_,a);if(T){var R=Ml;if(R!==null)switch(R.tag){case U:{var j=R.stateNode.containerInfo;Xe(j,c,_);break}case W:{var V=R.type,te=R.memoizedProps,oe=R.stateNode;ht(V,te,oe,c,_);break}}}return T}function Lh(a){if(!_e)throw Error("Expected prepareToHydrateHostSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var c=a.memoizedState,_=c!==null?c.dehydrated:null;if(!_)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");$(_,a)}function Sm(a){if(!_e)throw Error("Expected skipPastDehydratedSuspenseInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");var c=a.memoizedState,_=c!==null?c.dehydrated:null;if(!_)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return De(_)}function Gd(a){for(var c=a.return;c!==null&&c.tag!==W&&c.tag!==U&&c.tag!==pe;)c=c.return;Ml=c}function f1(a){if(!_e||a!==Ml)return!1;if(!ha)return Gd(a),ha=!0,!1;var c=a.type;if(a.tag!==W||c!=="head"&&c!=="body"&&!Ti(c,a.memoizedProps))for(var _=Ga;_;)Wd(a,_),_=Ni(_);return Gd(a),a.tag===pe?Ga=Sm(a):Ga=Ml?Ni(a.stateNode):null,!0}function c1(){!_e||(Ml=null,Ga=null,ha=!1)}var d1=at.ReactCurrentOwner,va=!1,Yd,qs,Hs,Ws,Kd,ma,p1,E2,gc,Xd;Yd={},qs={},Hs={},Ws={},Kd={},ma=!1,p1=!1,E2={},gc={},Xd={};function _o(a,c,_,T){a===null?c.child=Xc(c,null,_,T):c.child=gf(c,a.child,_,T)}function Fh(a,c,_,T){c.child=gf(c,a.child,null,T),c.child=gf(c,null,_,T)}function bh(a,c,_,T,R){if(c.type!==c.elementType){var j=_.propTypes;j&&E(j,T,"prop",qt(_),Rr)}var V=_.render,te=c.ref,oe;return e0(c,R),d1.current=c,Ze("render"),oe=Af(a,c,V,T,te,R),Ei&&c.mode&cr&&c.memoizedState!==null&&(oe=Af(a,c,V,T,te,R)),Ze(null),a!==null&&!va?(v2(a,c,R),ya(a,c,R)):(c.effectTag|=eu,_o(a,c,oe,R),c.child)}function Ph(a,c,_,T,R,j){if(a===null){var V=_.type;if(i0(V)&&_.compare===null&&_.defaultProps===void 0){var te=V;return te=Zu(V),c.tag=le,c.type=te,Zd(c,V),Ih(a,c,te,T,R,j)}{var oe=V.propTypes;oe&&E(oe,T,"prop",qt(V),Rr)}var Ie=Sy(_.type,null,T,null,c.mode,j);return Ie.ref=c.ref,Ie.return=c,c.child=Ie,Ie}{var Ye=_.type,pt=Ye.propTypes;pt&&E(pt,T,"prop",qt(Ye),Rr)}var Nt=a.child;if(R component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",oe,oe),Yd[oe]=!0)}c.mode&cr&&wl.recordLegacyContextWarning(c,null),d1.current=c,te=Af(null,c,_,R,j,T)}if(c.effectTag|=eu,typeof te=="object"&&te!==null&&typeof te.render=="function"&&te.$$typeof===void 0){{var Ie=qt(_)||"Unknown";qs[Ie]||(Ke(!1,"The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",Ie,Ie,Ie),qs[Ie]=!0)}c.tag=N,m2();var Ye=!1;zi(_)?(Ye=!0,Fi(c)):Ye=!1,c.memoizedState=te.state!==null&&te.state!==void 0?te.state:null;var pt=_.getDerivedStateFromProps;return typeof pt=="function"&&yf(c,_,pt,R),il(c,te),ac(c,_,R,T),Jd(null,c,_,!0,Ye,T)}else return c.tag=L,ni&&_.contextTypes&&Ke(!1,"%s uses the legacy contextTypes API which is no longer supported. Use React.createContext() with React.useContext() instead.",qt(_)||"Unknown"),Ei&&c.mode&cr&&c.memoizedState!==null&&(te=Af(null,c,_,R,j,T)),_o(null,c,te,T),Zd(c,_),c.child}function Zd(a,c){if(c&&c.childContextTypes&&Ke(!1,"%s(...): childContextTypes cannot be defined on a function component.",c.displayName||c.name||"Component"),a.ref!==null){var _="",T=v0();T&&(_+=` - -Check the render method of \``+T+"`.");var R=T||a._debugID||"",j=a._debugSource;j&&(R=j.fileName+":"+j.lineNumber),Kd[R]||(Kd[R]=!0,Kt(!1,"Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",_))}if(Wl&&c.defaultProps!==void 0){var V=qt(c)||"Unknown";Xd[V]||(Ke(!1,"%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",V),Xd[V]=!0)}if(typeof c.getDerivedStateFromProps=="function"){var te=qt(c)||"Unknown";Ws[te]||(Ke(!1,"%s: Function components do not support getDerivedStateFromProps.",te),Ws[te]=!0)}if(typeof c.contextType=="object"&&c.contextType!==null){var oe=qt(c)||"Unknown";Hs[oe]||(Ke(!1,"%s: Function components do not support contextType.",oe),Hs[oe]=!0)}}var w2={dehydrated:null,retryTime:lt};function $d(a,c,_){return Jc(a,Qc)&&(c===null||c.memoizedState!==null)}function qh(a,c,_){var T=c.mode,R=c.pendingProps;a_(c)&&(c.effectTag|=Hr);var j=xl.current,V=!1,te=(c.effectTag&Hr)!==_i;if(te||$d(j,a,c)?(V=!0,c.effectTag&=~Hr):(a===null||a.memoizedState!==null)&&R.fallback!==void 0&&R.unstable_avoidThisFallback!==!0&&(j=d2(j,Ef)),j=ca(j),Or(c,j),"maxDuration"in R&&(p1||(p1=!0,Kt(!1,"maxDuration has been removed from React. Remove the maxDuration prop."))),a===null){if(R.fallback!==void 0&&(Vd(c),Di)){var oe=c.memoizedState;if(oe!==null){var Ie=oe.dehydrated;if(Ie!==null)return Hh(c,Ie,_)}}if(V){var Ye=R.fallback,pt=Qa(null,T,lt,null);if(pt.return=c,(c.mode&Y)===Sr){var Nt=c.memoizedState,Vt=Nt!==null?c.child.child:c.child;pt.child=Vt;for(var zt=Vt;zt!==null;)zt.return=pt,zt=zt.sibling}var vn=Qa(Ye,T,_,null);return vn.return=c,pt.sibling=vn,c.memoizedState=w2,c.child=pt,vn}else{var xr=R.children;return c.memoizedState=null,c.child=Xc(c,null,xr,_)}}else{var $r=a.memoizedState;if($r!==null){if(Di){var wi=$r.dehydrated;if(wi!==null)if(te){if(c.memoizedState!==null)return c.child=a.child,c.effectTag|=Hr,null;var N0=R.fallback,Vi=Qa(null,T,lt,null);if(Vi.return=c,Vi.child=null,(c.mode&Y)===Sr)for(var it=Vi.child=c.child;it!==null;)it.return=Vi,it=it.sibling;else gf(c,a.child,null,_);if(Zt&&c.mode&Jr){for(var Ot=0,Je=Vi.child;Je!==null;)Ot+=Je.treeBaseDuration,Je=Je.sibling;Vi.treeBaseDuration=Ot}var Bt=Qa(N0,T,_,null);return Bt.return=c,Vi.sibling=Bt,Bt.effectTag|=ai,Vi.childExpirationTime=lt,c.memoizedState=w2,c.child=Vi,Bt}else return Wh(a,c,wi,$r,_)}var Mn=a.child,pn=Mn.sibling;if(V){var Pi=R.fallback,oi=wo(Mn,Mn.pendingProps,lt);if(oi.return=c,(c.mode&Y)===Sr){var qu=c.memoizedState,ar=qu!==null?c.child.child:c.child;if(ar!==Mn.child){oi.child=ar;for(var ou=ar;ou!==null;)ou.return=oi,ou=ou.sibling}}if(Zt&&c.mode&Jr){for(var qr=0,_u=oi.child;_u!==null;)qr+=_u.treeBaseDuration,_u=_u.sibling;oi.treeBaseDuration=qr}var _0=wo(pn,Pi,pn.expirationTime);return _0.return=c,oi.sibling=_0,oi.childExpirationTime=lt,c.memoizedState=w2,c.child=oi,_0}else{var H0=R.children,Cs=Mn.child,Hu=gf(c,Cs,H0,_);return c.memoizedState=null,c.child=Hu}}else{var pl=a.child;if(V){var Ja=R.fallback,jo=Qa(null,T,lt,null);if(jo.return=c,jo.child=pl,pl!==null&&(pl.return=jo),(c.mode&Y)===Sr){var xs=c.memoizedState,X2=xs!==null?c.child.child:c.child;jo.child=X2;for(var Uf=X2;Uf!==null;)Uf.return=jo,Uf=Uf.sibling}if(Zt&&c.mode&Jr){for(var Rc=0,Pl=jo.child;Pl!==null;)Rc+=Pl.treeBaseDuration,Pl=Pl.sibling;jo.treeBaseDuration=Rc}var zo=Qa(Ja,T,_,null);return zo.return=c,jo.sibling=zo,zo.effectTag|=ai,jo.childExpirationTime=lt,c.memoizedState=w2,c.child=jo,zo}else{c.memoizedState=null;var O1=R.children;return c.child=gf(c,pl,O1,_)}}}}function ep(a,c,_){c.memoizedState=null;var T=c.pendingProps,R=T.children;return _o(a,c,R,_),c.child}function Hh(a,c,_){if((a.mode&Y)===Sr)Kt(!1,"Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOM.createBlockingRoot(container, { hydrate: true }).render(element) or remove the Suspense components from the server rendered components."),a.expirationTime=bn;else if(h0(c)){var T=Fl(),R=ms(T);Ln&&x(R),a.expirationTime=R}else a.expirationTime=hi,Ln&&x(hi);return null}function Wh(a,c,_,T,R){if(qd(),(c.mode&Y)===Sr||h0(_))return ep(a,c,R);var j=a.childExpirationTime>=R;if(va||j){if(R. Use lowercase "%s" instead.',a,a.toLowerCase());break}case"forward":case"backward":{Kt(!1,'"%s" is not a valid value for revealOrder on . React uses the -s suffix in the spelling. Use "%ss" instead.',a,a.toLowerCase());break}default:Kt(!1,'"%s" is not a supported revealOrder on . Did you mean "together", "forwards" or "backwards"?',a);break}else Kt(!1,'%s is not a supported value for revealOrder on . Did you mean "together", "forwards" or "backwards"?',a)}function Vh(a,c){a!==void 0&&!gc[a]&&(a!=="collapsed"&&a!=="hidden"?(gc[a]=!0,Kt(!1,'"%s" is not a supported value for tail on . Did you mean "collapsed" or "hidden"?',a)):c!=="forwards"&&c!=="backwards"&&(gc[a]=!0,Kt(!1,' is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',a)))}function v1(a,c){{var _=Array.isArray(a),T=!_&&typeof ur(a)=="function";if(_||T){var R=_?"array":"iterable";return Kt(!1,"A nested %s was passed to row #%s in . Wrap it in an additional SuspenseList to configure its revealOrder: ... {%s} ... ",R,c,R),!1}}return!0}function Mm(a,c){if((c==="forwards"||c==="backwards")&&a!==void 0&&a!==null&&a!==!1)if(Array.isArray(a)){for(var _=0;_. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',c)}}function np(a,c,_,T,R,j){var V=a.memoizedState;V===null?a.memoizedState={isBackwards:c,rendering:null,last:T,tail:_,tailExpiration:0,tailMode:R,lastEffect:j}:(V.isBackwards=c,V.rendering=null,V.last=T,V.tail=_,V.tailExpiration=0,V.tailMode=R,V.lastEffect=j)}function rp(a,c,_){var T=c.pendingProps,R=T.revealOrder,j=T.tail,V=T.children;km(R),Vh(j,R),Mm(V,R),_o(a,c,V,_);var te=xl.current,oe=Jc(te,Qc);if(oe)te=c2(te,Qc),c.effectTag|=Hr;else{var Ie=a!==null&&(a.effectTag&Hr)!==_i;Ie&&Rm(c,c.child,_),te=ca(te)}if(Or(c,te),(c.mode&Y)===Sr)c.memoizedState=null;else switch(R){case"forwards":{var Ye=Om(c.child),pt;Ye===null?(pt=c.child,c.child=null):(pt=Ye.sibling,Ye.sibling=null),np(c,!1,pt,Ye,j,c.lastEffect);break}case"backwards":{var Nt=null,Vt=c.child;for(c.child=null;Vt!==null;){var zt=Vt.alternate;if(zt!==null&&Zc(zt)===null){c.child=Vt;break}var vn=Vt.sibling;Vt.sibling=Nt,Nt=Vt,Vt=vn}np(c,!0,Nt,null,j,c.lastEffect);break}case"together":{np(c,!1,null,null,void 0,c.lastEffect);break}default:c.memoizedState=null}return c.child}function Nm(a,c,_){za(c,c.stateNode.containerInfo);var T=c.pendingProps;return a===null?c.child=gf(c,null,T,_):_o(a,c,T,_),c.child}function Lm(a,c,_){var T=c.type,R=T._context,j=c.pendingProps,V=c.memoizedProps,te=j.value;{var oe=c.type.propTypes;oe&&E(oe,j,"prop","Context.Provider",Rr)}if(Er(c,te),V!==null){var Ie=V.value,Ye=iu(R,te,Ie);if(Ye===0){if(V.children===j.children&&!na())return ya(a,c,_)}else Tl(c,R,Ye,_)}var pt=j.children;return _o(a,c,pt,_),c.child}var Gh=!1;function Fm(a,c,_){var T=c.type;T._context===void 0?T!==T.Consumer&&(Gh||(Gh=!0,Kt(!1,"Rendering directly is not supported and will be removed in a future major release. Did you mean to render instead?"))):T=T._context;var R=c.pendingProps,j=R.children;typeof j!="function"&&Ke(!1,"A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),e0(c,_);var V=He(T,R.unstable_observedBits),te;return d1.current=c,Ze("render"),te=j(V),Ze(null),c.effectTag|=eu,_o(a,c,te,_),c.child}function bm(a,c,_){var T=c.type.impl;if(T.reconcileChildren===!1)return null;var R=c.pendingProps,j=R.children;return _o(a,c,j,_),c.child}function ip(a,c,_){var T=c.pendingProps,R=T.children;return _o(a,c,R,_),c.child}function up(){va=!0}function ya(a,c,_){Ki(c),a!==null&&(c.dependencies=a.dependencies),Zt&&kh(c);var T=c.expirationTime;T!==lt&&G2(T);var R=c.childExpirationTime;return R<_?null:(gh(a,c),c.child)}function m1(a,c,_){{var T=c.return;if(T===null)throw new Error("Cannot swap the root fiber.");if(a.alternate=null,c.alternate=null,_.index=c.index,_.sibling=c.sibling,_.return=c.return,_.ref=c.ref,c===T.child)T.child=_;else{var R=T.child;if(R===null)throw new Error("Expected parent to have a child.");for(;R.sibling!==c;)if(R=R.sibling,R===null)throw new Error("Expected to find the previous sibling.");R.sibling=_}var j=T.lastEffect;return j!==null?(j.nextEffect=a,T.lastEffect=a):T.firstEffect=T.lastEffect=a,a.nextEffect=null,a.effectTag=W0,_.effectTag|=ai,_}}function op(a,c,_){var T=c.expirationTime;if(c._debugNeedsRemount&&a!==null)return m1(a,c,Sy(c.type,c.key,c.pendingProps,c._debugOwner||null,c.mode,c.expirationTime));if(a!==null){var R=a.memoizedProps,j=c.pendingProps;if(R!==j||na()||c.type!==a.type)va=!0;else if(T<_){switch(va=!1,c.tag){case U:zh(c),c1();break;case W:if(dc(c),c.mode&Qr&&_!==hi&&d0(c.type,j))return Ln&&x(hi),c.expirationTime=c.childExpirationTime=hi,null;break;case N:{var V=c.type;zi(V)&&Fi(c);break}case q:za(c,c.stateNode.containerInfo);break;case he:{var te=c.memoizedProps.value;Er(c,te);break}case ze:if(Zt){var oe=c.childExpirationTime>=_;oe&&(c.effectTag|=mr)}break;case pe:{var Ie=c.memoizedState;if(Ie!==null){if(Di&&Ie.dehydrated!==null){Or(c,ca(xl.current)),c.effectTag|=Hr;break}var Ye=c.child,pt=Ye.childExpirationTime;if(pt!==lt&&pt>=_)return qh(a,c,_);Or(c,ca(xl.current));var Nt=ya(a,c,_);return Nt!==null?Nt.sibling:null}else Or(c,ca(xl.current));break}case wt:{var Vt=(a.effectTag&Hr)!==_i,zt=c.childExpirationTime>=_;if(Vt){if(zt)return rp(a,c,_);c.effectTag|=Hr}var vn=c.memoizedState;if(vn!==null&&(vn.rendering=null,vn.tail=null),Or(c,xl.current),zt)break;return null}}return ya(a,c,_)}else va=!1}else va=!1;switch(c.expirationTime=lt,c.tag){case C:return Am(a,c,c.type,_);case Ue:{var xr=c.elementType;return kf(a,c,xr,T,_)}case L:{var $r=c.type,wi=c.pendingProps,N0=c.elementType===$r?wi:bi($r,wi);return Qd(a,c,$r,N0,_)}case N:{var Vi=c.type,it=c.pendingProps,Ot=c.elementType===Vi?it:bi(Vi,it);return jh(a,c,Vi,Ot,_)}case U:return Cm(a,c,_);case W:return xm(a,c,_);case ne:return Of(a,c);case pe:return qh(a,c,_);case q:return Nm(a,c,_);case ge:{var Je=c.type,Bt=c.pendingProps,Mn=c.elementType===Je?Bt:bi(Je,Bt);return bh(a,c,Je,Mn,_)}case m:return Tm(a,c,_);case we:return Bh(a,c,_);case ze:return Uh(a,c,_);case he:return Lm(a,c,_);case Se:return Fm(a,c,_);case Oe:{var pn=c.type,Pi=c.pendingProps,oi=bi(pn,Pi);if(c.type!==c.elementType){var qu=pn.propTypes;qu&&E(qu,oi,"prop",qt(pn),Rr)}return oi=bi(pn.type,oi),Ph(a,c,pn,oi,T,_)}case le:return Ih(a,c,c.type,c.pendingProps,T,_);case Ge:{var ar=c.type,ou=c.pendingProps,qr=c.elementType===ar?ou:bi(ar,ou);return D2(a,c,ar,qr,_)}case wt:return rp(a,c,_);case xt:{if(Ht)return bm(a,c,_);break}case $e:{if(Du)return ip(a,c,_);break}}throw Error("Unknown unit of work tag ("+c.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Yh(a,c,_,T){return{currentFiber:a,impl:_,instance:null,prevProps:null,props:c,state:T}}function S2(a){return a.tag===pe&&a.memoizedState!==null}function y1(a){return a.child.sibling.child}var Kh={};function lp(a,c,_){if(Du){if(a.tag===W){var T=a.type,R=a.memoizedProps,j=a.stateNode,V=Ro(j);V!==null&&c(T,R||Kh,V)===!0&&_.push(V)}var te=a.child;S2(a)&&(te=y1(a)),te!==null&&sp(te,c,_)}}function Xh(a,c){if(Du){if(a.tag===W){var _=a.type,T=a.memoizedProps,R=a.stateNode,j=Ro(R);if(j!==null&&c(_,T,j)===!0)return j}var V=a.child;if(S2(a)&&(V=y1(a)),V!==null)return Qh(V,c)}return null}function sp(a,c,_){for(var T=a;T!==null;)lp(T,c,_),T=T.sibling}function Qh(a,c){for(var _=a;_!==null;){var T=Xh(_,c);if(T!==null)return T;_=_.sibling}return null}function Jh(a,c,_){if(T2(a,c))_.push(a.stateNode.methods);else{var T=a.child;S2(a)&&(T=y1(a)),T!==null&&ap(T,c,_)}}function ap(a,c,_){for(var T=a;T!==null;)Jh(T,c,_),T=T.sibling}function T2(a,c){return a.tag===$e&&a.type===c&&a.stateNode!==null}function C2(a,c){return{getChildren:function(){var _=c.fiber,T=_.child,R=[];return T!==null&&ap(T,a,R),R.length===0?null:R},getChildrenFromRoot:function(){for(var _=c.fiber,T=_;T!==null;){var R=T.return;if(R===null||(T=R,T.tag===$e&&T.type===a))break}var j=[];return ap(T.child,a,j),j.length===0?null:j},getParent:function(){for(var _=c.fiber.return;_!==null;){if(_.tag===$e&&_.type===a)return _.stateNode.methods;_=_.return}return null},getProps:function(){var _=c.fiber;return _.memoizedProps},queryAllNodes:function(_){var T=c.fiber,R=T.child,j=[];return R!==null&&sp(R,_,j),j.length===0?null:j},queryFirstNode:function(_){var T=c.fiber,R=T.child;return R!==null?Qh(R,_):null},containsNode:function(_){for(var T=or(_);T!==null;){if(T.tag===$e&&T.type===a&&T.stateNode===c)return!0;T=T.return}return!1}}}function z0(a){a.effectTag|=mr}function x2(a){a.effectTag|=To}var ga,Ya,A2,R2;if(P0)ga=function(a,c,_,T){for(var R=c.child;R!==null;){if(R.tag===W||R.tag===ne)Wr(a,R.stateNode);else if(Ht&&R.tag===xt)Wr(a,R.stateNode.instance);else if(R.tag!==q){if(R.child!==null){R.child.return=R,R=R.child;continue}}if(R===c)return;for(;R.sibling===null;){if(R.return===null||R.return===c)return;R=R.return}R.sibling.return=R.return,R=R.sibling}},Ya=function(a){},A2=function(a,c,_,T,R){var j=a.memoizedProps;if(j!==T){var V=c.stateNode,te=ul(),oe=c0(V,_,j,T,R,te);c.updateQueue=oe,oe&&z0(c)}},R2=function(a,c,_,T){_!==T&&z0(c)};else if(X){ga=function(a,c,_,T){for(var R=c.child;R!==null;){e:if(R.tag===W){var j=R.stateNode;if(_&&T){var V=R.memoizedProps,te=R.type;j=Gr(j,te,V,R)}Wr(a,j)}else if(R.tag===ne){var oe=R.stateNode;if(_&&T){var Ie=R.memoizedProps;oe=Yl(oe,Ie,R)}Wr(a,oe)}else if(Ht&&R.tag===xt){var Ye=R.stateNode.instance;if(_&&T){var pt=R.memoizedProps,Nt=R.type;Ye=Gr(Ye,Nt,pt,R)}Wr(a,Ye)}else if(R.tag!==q){if(R.tag===pe){if((R.effectTag&mr)!==_i){var Vt=R.memoizedState!==null;if(Vt){var zt=R.child;if(zt!==null){zt.child!==null&&(zt.child.return=zt,ga(a,zt,!0,Vt));var vn=zt.sibling;if(vn!==null){vn.return=R,R=vn;continue}}}}if(R.child!==null){R.child.return=R,R=R.child;continue}}else if(R.child!==null){R.child.return=R,R=R.child;continue}}if(R=R,R===c)return;for(;R.sibling===null;){if(R.return===null||R.return===c)return;R=R.return}R.sibling.return=R.return,R=R.sibling}};var fp=function(a,c,_,T){for(var R=c.child;R!==null;){e:if(R.tag===W){var j=R.stateNode;if(_&&T){var V=R.memoizedProps,te=R.type;j=Gr(j,te,V,R)}Gn(a,j)}else if(R.tag===ne){var oe=R.stateNode;if(_&&T){var Ie=R.memoizedProps;oe=Yl(oe,Ie,R)}Gn(a,oe)}else if(Ht&&R.tag===xt){var Ye=R.stateNode.instance;if(_&&T){var pt=R.memoizedProps,Nt=R.type;Ye=Gr(Ye,Nt,pt,R)}Gn(a,Ye)}else if(R.tag!==q){if(R.tag===pe){if((R.effectTag&mr)!==_i){var Vt=R.memoizedState!==null;if(Vt){var zt=R.child;if(zt!==null){zt.child!==null&&(zt.child.return=zt,fp(a,zt,!0,Vt));var vn=zt.sibling;if(vn!==null){vn.return=R,R=vn;continue}}}}if(R.child!==null){R.child.return=R,R=R.child;continue}}else if(R.child!==null){R.child.return=R,R=R.child;continue}}if(R=R,R===c)return;for(;R.sibling===null;){if(R.return===null||R.return===c)return;R=R.return}R.sibling.return=R.return,R=R.sibling}};Ya=function(a){var c=a.stateNode,_=a.firstEffect===null;if(!_){var T=c.containerInfo,R=w0(T);fp(R,a,!1,!1),c.pendingChildren=R,z0(a),ic(T,R)}},A2=function(a,c,_,T,R){var j=a.stateNode,V=a.memoizedProps,te=c.firstEffect===null;if(te&&V===T){c.stateNode=j;return}var oe=c.stateNode,Ie=ul(),Ye=null;if(V!==T&&(Ye=c0(oe,_,V,T,R,Ie)),te&&Ye===null){c.stateNode=j;return}var pt=cs(j,Ye,_,V,T,c,te,oe);wu(pt,_,T,R,Ie)&&z0(c),c.stateNode=pt,te?z0(c):ga(pt,c,!1,!1)},R2=function(a,c,_,T){if(_!==T){var R=Jl(),j=ul();c.stateNode=as(T,R,j,c),z0(c)}}}else Ya=function(a){},A2=function(a,c,_,T,R){},R2=function(a,c,_,T){};function O2(a,c){switch(a.tailMode){case"hidden":{for(var _=a.tail,T=null;_!==null;)_.alternate!==null&&(T=_),_=_.sibling;T===null?a.tail=null:T.sibling=null;break}case"collapsed":{for(var R=a.tail,j=null;R!==null;)R.alternate!==null&&(j=R),R=R.sibling;j===null?!c&&a.tail!==null?a.tail.sibling=null:a.tail=null:j.sibling=null;break}}}function Zh(a,c,_){var T=c.pendingProps;switch(c.tag){case C:break;case Ue:break;case le:case L:break;case N:{var R=c.type;zi(R)&&Is(c);break}case U:{no(c),x0(c);var j=c.stateNode;if(j.pendingContext&&(j.context=j.pendingContext,j.pendingContext=null),a===null||a.child===null){var V=f1(c);V&&z0(c)}Ya(c);break}case W:{Od(c);var te=Jl(),oe=c.type;if(a!==null&&c.stateNode!=null){if(A2(a,c,oe,T,te),ci){var Ie=a.memoizedProps.listeners,Ye=T.listeners;Ie!==Ye&&z0(c)}a.ref!==c.ref&&x2(c)}else{if(!T){if(c.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");break}var pt=ul(),Nt=f1(c);if(Nt){if(Dm(c,te,pt)&&z0(c),ci){var Vt=T.listeners;Vt!=null&&dn(Vt,c,te)}}else{var zt=ji(oe,T,te,pt,c);if(ga(zt,c,!1,!1),c.stateNode=zt,ci){var vn=T.listeners;vn!=null&&dn(vn,c,te)}wu(zt,oe,T,te,pt)&&z0(c)}c.ref!==null&&x2(c)}break}case ne:{var xr=T;if(a&&c.stateNode!=null){var $r=a.memoizedProps;R2(a,c,$r,xr)}else{if(typeof xr!="string"&&c.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");var wi=Jl(),N0=ul(),Vi=f1(c);Vi?wm(c)&&z0(c):c.stateNode=as(xr,wi,N0,c)}break}case ge:break;case pe:{da(c);var it=c.memoizedState;if(Di&&it!==null&&it.dehydrated!==null)if(a===null){var Ot=f1(c);if(!Ot)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");return Lh(c),Ln&&x(hi),null}else return c1(),(c.effectTag&Hr)===_i&&(c.memoizedState=null),c.effectTag|=mr,null;if((c.effectTag&Hr)!==_i)return c.expirationTime=_,c;var Je=it!==null,Bt=!1;if(a===null)c.memoizedProps.fallback!==void 0&&f1(c);else{var Mn=a.memoizedState;if(Bt=Mn!==null,!Je&&Mn!==null){var pn=a.child.sibling;if(pn!==null){var Pi=c.firstEffect;Pi!==null?(c.firstEffect=pn,pn.nextEffect=Pi):(c.firstEffect=c.lastEffect=pn,pn.nextEffect=null),pn.effectTag=W0}}}if(Je&&!Bt&&(c.mode&Y)!==Sr){var oi=a===null&&c.memoizedProps.unstable_avoidThisFallback!==!0;oi||Jc(xl.current,Ef)?mv():yv()}X&&Je&&(c.effectTag|=mr),P0&&(Je||Bt)&&(c.effectTag|=mr),Ui&&c.updateQueue!==null&&c.memoizedProps.suspenseCallback!=null&&(c.effectTag|=mr);break}case m:break;case we:break;case ze:break;case q:no(c),Ya(c);break;case he:$u(c);break;case Se:break;case Oe:break;case Ge:{var qu=c.type;zi(qu)&&Is(c);break}case wt:{da(c);var ar=c.memoizedState;if(ar===null)break;var ou=(c.effectTag&Hr)!==_i,qr=ar.rendering;if(qr===null)if(ou)O2(ar,!1);else{var _u=gv()&&(a===null||(a.effectTag&Hr)===_i);if(!_u)for(var _0=c.child;_0!==null;){var H0=Zc(_0);if(H0!==null){ou=!0,c.effectTag|=Hr,O2(ar,!1);var Cs=H0.updateQueue;return Cs!==null&&(c.updateQueue=Cs,c.effectTag|=mr),ar.lastEffect===null&&(c.firstEffect=null),c.lastEffect=ar.lastEffect,vm(c,_),Or(c,c2(xl.current,Qc)),c.child}_0=_0.sibling}}else{if(!ou){var Hu=Zc(qr);if(Hu!==null){c.effectTag|=Hr,ou=!0;var pl=Hu.updateQueue;if(pl!==null&&(c.updateQueue=pl,c.effectTag|=mr),O2(ar,!0),ar.tail===null&&ar.tailMode==="hidden"&&!qr.alternate){var Ja=c.lastEffect=ar.lastEffect;return Ja!==null&&(Ja.nextEffect=null),null}}else if(vt()>ar.tailExpiration&&_>hi){c.effectTag|=Hr,ou=!0,O2(ar,!1);var jo=_-1;c.expirationTime=c.childExpirationTime=jo,Ln&&x(jo)}}if(ar.isBackwards)qr.sibling=c.child,c.child=qr;else{var xs=ar.last;xs!==null?xs.sibling=qr:c.child=qr,ar.last=qr}}if(ar.tail!==null){if(ar.tailExpiration===0){var X2=500;ar.tailExpiration=vt()+X2}var Uf=ar.tail;ar.rendering=Uf,ar.tail=Uf.sibling,ar.lastEffect=c.lastEffect,Uf.sibling=null;var Rc=xl.current;return ou?Rc=c2(Rc,Qc):Rc=ca(Rc),Or(c,Rc),Uf}break}case xt:{if(Ht){var Pl=c.type.impl,zo=c.stateNode;if(zo===null){var O1=Pl.getInitialState,m_;O1!==void 0&&(m_=O1(T)),zo=c.stateNode=Yh(c,T,Pl,m_||{});var y_=dt(zo);if(zo.instance=y_,Pl.reconcileChildren===!1)return null;ga(y_,c,!1,!1),Hn(zo)}else{var yE=zo.props;if(zo.prevProps=yE,zo.props=T,zo.currentFiber=c,X){var g_=ea(zo);zo.instance=g_,ga(g_,c,!1,!1)}var gE=Dn(zo);gE&&z0(c)}}break}case $e:{if(Du)if(a===null){var _E=c.type,Ly={fiber:c,methods:null};if(c.stateNode=Ly,Ly.methods=C2(_E,Ly),ci){var __=T.listeners;if(__!=null){var EE=Jl();dn(__,c,EE)}}c.ref!==null&&(x2(c),z0(c))}else{if(ci){var DE=a.memoizedProps.listeners,wE=T.listeners;(DE!==wE||c.ref!==null)&&z0(c)}else c.ref!==null&&z0(c);a.ref!==c.ref&&x2(c)}break}default:throw Error("Unknown unit of work tag ("+c.tag+"). This error is likely caused by a bug in React. Please file an issue.")}return null}function Pm(a,c){switch(a.tag){case N:{var _=a.type;zi(_)&&Is(a);var T=a.effectTag;return T&f0?(a.effectTag=T&~f0|Hr,a):null}case U:{no(a),x0(a);var R=a.effectTag;if((R&Hr)!==_i)throw Error("The root failed to unmount after an error. This is likely a bug in React. Please file an issue.");return a.effectTag=R&~f0|Hr,a}case W:return Od(a),null;case pe:{if(da(a),Di){var j=a.memoizedState;if(j!==null&&j.dehydrated!==null){if(a.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");c1()}}var V=a.effectTag;return V&f0?(a.effectTag=V&~f0|Hr,a):null}case wt:return da(a),null;case q:return no(a),null;case he:return $u(a),null;default:return null}}function $h(a){switch(a.tag){case N:{var c=a.type.childContextTypes;c!=null&&Is(a);break}case U:{no(a),x0(a);break}case W:{Od(a);break}case q:no(a);break;case pe:da(a);break;case wt:da(a);break;case he:$u(a);break;default:break}}function cp(a,c){return{value:a,source:c,stack:_r(c)}}var dp=function(a,c,_,T,R,j,V,te,oe){var Ie=Array.prototype.slice.call(arguments,3);try{c.apply(_,Ie)}catch(Ye){this.onError(Ye)}};if(typeof window!="undefined"&&typeof window.dispatchEvent=="function"&&typeof document!="undefined"&&typeof document.createEvent=="function"){var pp=document.createElement("react"),Im=function(a,c,_,T,R,j,V,te,oe){if(typeof document=="undefined")throw Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var Ie=document.createEvent("Event"),Ye=!0,pt=window.event,Nt=Object.getOwnPropertyDescriptor(window,"event"),Vt=Array.prototype.slice.call(arguments,3);function zt(){pp.removeEventListener(N0,zt,!1),typeof window.event!="undefined"&&window.hasOwnProperty("event")&&(window.event=pt),c.apply(_,Vt),Ye=!1}var vn,xr=!1,$r=!1;function wi(Vi){if(vn=Vi.error,xr=!0,vn===null&&Vi.colno===0&&Vi.lineno===0&&($r=!0),Vi.defaultPrevented&&vn!=null&&typeof vn=="object")try{vn._suppressLogging=!0}catch(it){}}var N0="react-"+(a||"invokeguardedcallback");window.addEventListener("error",wi),pp.addEventListener(N0,zt,!1),Ie.initEvent(N0,!1,!1),pp.dispatchEvent(Ie),Nt&&Object.defineProperty(window,"event",Nt),Ye&&(xr?$r&&(vn=new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://fb.me/react-crossorigin-error for more information.")):vn=new Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`),this.onError(vn)),window.removeEventListener("error",wi)};dp=Im}var Bm=dp,Eo=!1,k2=null,Um={onError:function(a){Eo=!0,k2=a}};function sl(a,c,_,T,R,j,V,te,oe){Eo=!1,k2=null,Bm.apply(Um,arguments)}function Jn(){return Eo}function Vs(){if(Eo){var a=k2;return Eo=!1,k2=null,a}else throw Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}function al(a){return!0}function n0(a){var c=al(a);if(c!==!1){var _=a.error;{var T=a.componentName,R=a.componentStack,j=a.errorBoundaryName,V=a.errorBoundaryFound,te=a.willRetry;if(_!=null&&_._suppressLogging){if(V&&te)return;console.error(_)}var oe=T?"The above error occurred in the <"+T+"> component:":"The above error occurred in one of your React components:",Ie;V&&j?te?Ie="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+j+"."):Ie="This error was initially handled by the error boundary "+j+`. -Recreating the tree from scratch failed so React will unmount the tree.`:Ie=`Consider adding an error boundary to your tree to customize error handling behavior. -Visit https://fb.me/react-error-boundaries to learn more about error boundaries.`;var Ye=""+oe+R+` - -`+(""+Ie);console.error(Ye)}}}var ev=null;ev=new Set;var Gs=typeof WeakSet=="function"?WeakSet:Set;function hp(a,c){var _=c.source,T=c.stack;T===null&&_!==null&&(T=_r(_));var R={componentName:_!==null?qt(_.type):null,componentStack:T!==null?T:"",error:c.value,errorBoundary:null,errorBoundaryName:null,errorBoundaryFound:!1,willRetry:!1};a!==null&&a.tag===N&&(R.errorBoundary=a.stateNode,R.errorBoundaryName=qt(a.type),R.errorBoundaryFound=!0,R.willRetry=!0);try{n0(R)}catch(j){setTimeout(function(){throw j})}}var jm=function(a,c){Oi(a,"componentWillUnmount"),c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount(),gi()};function tv(a,c){if(sl(null,jm,null,a,c),Jn()){var _=Vs();Pf(a,_)}}function vp(a){var c=a.ref;if(c!==null)if(typeof c=="function"){if(sl(null,c,null,null),Jn()){var _=Vs();Pf(a,_)}}else c.current=null}function zm(a,c){if(sl(null,c,null),Jn()){var _=Vs();Pf(a,_)}}function mp(a,c){switch(c.tag){case L:case ge:case le:{_c(ym,wf,c);return}case N:{if(c.effectTag&Co&&a!==null){var _=a.memoizedProps,T=a.memoizedState;Oi(c,"getSnapshotBeforeUpdate");var R=c.stateNode;c.type===c.elementType&&!ma&&(R.props!==c.memoizedProps&&Kt(!1,"Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(c.type)||"instance"),R.state!==c.memoizedState&&Kt(!1,"Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(c.type)||"instance"));var j=R.getSnapshotBeforeUpdate(c.elementType===c.type?_:bi(c.type,_),T);{var V=ev;j===void 0&&!V.has(c.type)&&(V.add(c.type),Ke(!1,"%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",qt(c.type)))}R.__reactInternalSnapshotBeforeUpdate=j,gi()}return}case U:case W:case ne:case q:case Ge:return;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function _c(a,c,_){var T=_.updateQueue,R=T!==null?T.lastEffect:null;if(R!==null){var j=R.next,V=j;do{if((V.tag&a)!==wf){var te=V.destroy;V.destroy=void 0,te!==void 0&&te()}if((V.tag&c)!==wf){var oe=V.create;V.destroy=oe();{var Ie=V.destroy;if(Ie!==void 0&&typeof Ie!="function"){var Ye=void 0;Ie===null?Ye=" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof Ie.then=="function"?Ye=` - -It looks like you wrote useEffect(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately: - -useEffect(() => { - async function fetchData() { - // You can await here - const response = await MyAPI.getData(someId); - // ... - } - fetchData(); -}, [someId]); // Or [] if effect doesn't need props or state - -Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching`:Ye=" You returned: "+Ie,Ke(!1,"An effect function must not return anything besides a function, which is used for clean-up.%s%s",Ye,_r(_))}}}V=V.next}while(V!==j)}}function Ea(a){if((a.effectTag&L0)!==_i)switch(a.tag){case L:case ge:case le:{_c(rr,wf,a),_c(wf,$c,a);break}default:break}}function yp(a,c,_,T){switch(_.tag){case L:case ge:case le:{_c(gm,ol,_);break}case N:{var R=_.stateNode;if(_.effectTag&mr)if(c===null)Oi(_,"componentDidMount"),_.type===_.elementType&&!ma&&(R.props!==_.memoizedProps&&Kt(!1,"Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(_.type)||"instance"),R.state!==_.memoizedState&&Kt(!1,"Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(_.type)||"instance")),R.componentDidMount(),gi();else{var j=_.elementType===_.type?c.memoizedProps:bi(_.type,c.memoizedProps),V=c.memoizedState;Oi(_,"componentDidUpdate"),_.type===_.elementType&&!ma&&(R.props!==_.memoizedProps&&Kt(!1,"Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(_.type)||"instance"),R.state!==_.memoizedState&&Kt(!1,"Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(_.type)||"instance")),R.componentDidUpdate(j,V,R.__reactInternalSnapshotBeforeUpdate),gi()}var te=_.updateQueue;te!==null&&(_.type===_.elementType&&!ma&&(R.props!==_.memoizedProps&&Kt(!1,"Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(_.type)||"instance"),R.state!==_.memoizedState&&Kt(!1,"Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",qt(_.type)||"instance")),vo(_,te,R,T));return}case U:{var oe=_.updateQueue;if(oe!==null){var Ie=null;if(_.child!==null)switch(_.child.tag){case W:Ie=Ro(_.child.stateNode);break;case N:Ie=_.child.stateNode;break}vo(_,oe,Ie,T)}return}case W:{var Ye=_.stateNode;if(c===null&&_.effectTag&mr){var pt=_.type,Nt=_.memoizedProps;Pu(Ye,pt,Nt,_)}return}case ne:return;case q:return;case ze:{if(Zt){var Vt=_.memoizedProps.onRender;typeof Vt=="function"&&(Ln?Vt(_.memoizedProps.id,c===null?"mount":"update",_.actualDuration,_.treeBaseDuration,_.actualStartTime,kl(),a.memoizedInteractions):Vt(_.memoizedProps.id,c===null?"mount":"update",_.actualDuration,_.treeBaseDuration,_.actualStartTime,kl()))}return}case pe:{Nl(a,_);return}case wt:case Ge:case xt:case $e:return;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function M2(a,c){if(P0)for(var _=a;;){if(_.tag===W){var T=_.stateNode;c?Oa(T):Zs(_.stateNode,_.memoizedProps)}else if(_.tag===ne){var R=_.stateNode;c?p0(R):K0(R,_.memoizedProps)}else if(_.tag===pe&&_.memoizedState!==null&&_.memoizedState.dehydrated===null){var j=_.child.sibling;j.return=_,_=j;continue}else if(_.child!==null){_.child.return=_,_=_.child;continue}if(_===a)return;for(;_.sibling===null;){if(_.return===null||_.return===a)return;_=_.return}_.sibling.return=_.return,_=_.sibling}}function ku(a){var c=a.ref;if(c!==null){var _=a.stateNode,T;switch(a.tag){case W:T=Ro(_);break;default:T=_}Du&&a.tag===$e&&(T=_.methods),typeof c=="function"?c(T):(c.hasOwnProperty("current")||Ke(!1,"Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().%s",qt(a.type),_r(a)),c.current=T)}}function zu(a){var c=a.ref;c!==null&&(typeof c=="function"?c(null):c.current=null)}function gp(a,c,_){switch(Rn(c),c.tag){case L:case ge:case Oe:case le:{var T=c.updateQueue;if(T!==null){var R=T.lastEffect;if(R!==null){var j=R.next,V=_>Wn?Wn:_;_n(V,function(){var $r=j;do{var wi=$r.destroy;wi!==void 0&&zm(c,wi),$r=$r.next}while($r!==j)})}}break}case N:{vp(c);var te=c.stateNode;typeof te.componentWillUnmount=="function"&&tv(c,te);return}case W:{if(ci){var oe=c.dependencies;if(oe!==null){var Ie=oe.responders;if(Ie!==null){for(var Ye=Array.from(Ie.values()),pt=0,Nt=Ye.length;pt component higher in the tree to provide a loading indicator or placeholder to display.`+_r(_))}Rp(),T=cp(T,_);var Nt=c;do{switch(Nt.tag){case U:{var Vt=T;Nt.effectTag|=f0,Nt.expirationTime=R;var zt=uv(Nt,Vt,R);r2(Nt,zt);return}case N:var vn=T,xr=Nt.type,$r=Nt.stateNode;if((Nt.effectTag&Hr)===_i&&(typeof xr.getDerivedStateFromError=="function"||$r!==null&&typeof $r.componentDidCatch=="function"&&!Lp($r))){Nt.effectTag|=f0,Nt.expirationTime=R;var wi=ov(Nt,vn,R);r2(Nt,wi);return}break;default:break}Nt=Nt.return}while(Nt!==null)}var wa=Math.ceil,Cr=at.ReactCurrentDispatcher,Ep=at.ReactCurrentOwner,fl=at.IsSomeRendererActing,cu=0,E1=1,ki=2,Dp=4,F2=8,Do=16,Ss=32,Mf=0,b2=1,wp=2,D1=3,w1=4,Sp=5,Zn=cu,cl=null,qn=null,q0=lt,k0=Mf,P2=null,Ll=bn,S1=bn,Dc=null,wc=lt,I2=!1,Tp=0,M0=500,fn=null,B2=!1,U2=null,Sc=null,Tc=!1,Cc=null,T1=y0,Cp=lt,Ka=null,Km=50,xc=0,j2=null,sv=50,C1=0,Nf=null,Lf=null,x1=lt;function Fl(){return(Zn&(Do|Ss))!==cu?Ju(vt()):(x1!==lt||(x1=Ju(vt())),x1)}function Ac(){return Ju(vt())}function Ff(a,c,_){var T=c.mode;if((T&Y)===Sr)return bn;var R=Xt();if((T&Qr)===Sr)return R===Ci?bn:Qu;if((Zn&Do)!==cu)return q0;var j;if(_!==null)j=ia(a,_.timeoutMs|0||pf);else switch(R){case Ci:j=bn;break;case Xr:j=La(a);break;case Wn:case Xu:j=ms(a);break;case m0:j=Qi;break;default:throw Error("Expected a valid priority level")}return cl!==null&&j===q0&&(j-=1),j}function Xm(a,c){hy(),gy(a);var _=z2(a,c);if(_===null){my(a);return}Up(a,c),ta();var T=Xt();if(c===bn?(Zn&F2)!==cu&&(Zn&(Do|Ss))===cu?(H(_,c),A1(_)):(Uo(_),H(_,c),Zn===cu&&It()):(Uo(_),H(_,c)),(Zn&Dp)!==cu&&(T===Xr||T===Ci))if(Ka===null)Ka=new Map([[_,c]]);else{var R=Ka.get(_);(R===void 0||R>c)&&Ka.set(_,c)}}var dl=Xm;function z2(a,c){a.expirationTimeR?T:R}function Uo(a){var c=a.lastExpiredTime;if(c!==lt){a.callbackExpirationTime=bn,a.callbackPriority=Ci,a.callbackNode=En(A1.bind(null,a));return}var _=q2(a),T=a.callbackNode;if(_===lt){T!==null&&(a.callbackNode=null,a.callbackExpirationTime=lt,a.callbackPriority=y0);return}var R=Fl(),j=$1(R,_);if(T!==null){var V=a.callbackPriority,te=a.callbackExpirationTime;if(te===_&&V>=j)return;er(T)}a.callbackExpirationTime=_,a.callbackPriority=j;var oe;_===bn?oe=En(A1.bind(null,a)):oo?oe=yn(j,H2.bind(null,a)):oe=yn(j,H2.bind(null,a),{timeout:bo(_)-vt()}),a.callbackNode=oe}function H2(a,c){if(x1=lt,c){var _=Fl();return qp(a,_),Uo(a),null}var T=q2(a);if(T!==lt){var R=a.callbackNode;if((Zn&(Do|Ss))!==cu)throw Error("Should not already be working.");if(Xa(),(a!==cl||T!==q0)&&(bf(a,T),ee(a,T)),qn!==null){var j=Zn;Zn|=Do;var V=pv(a),te=W2(a);ff(qn);do try{oy();break}catch(Ye){dv(a,Ye)}while(!0);if(mt(),Zn=j,hv(V),Ln&&V2(te),k0===b2){var oe=P2;throw Bp(),bf(a,T),Bf(a,T),Uo(a),oe}if(qn!==null)Bp();else{Tv();var Ie=a.finishedWork=a.current.alternate;a.finishedExpirationTime=T,Qm(a,Ie,k0,T)}if(Uo(a),a.callbackNode===R)return H2.bind(null,a)}}return null}function Qm(a,c,_,T){switch(cl=null,_){case Mf:case b2:throw Error("Root did not complete. This is a bug in React.");case wp:{qp(a,T>Qi?Qi:T);break}case D1:{Bf(a,T);var R=a.lastSuspendedTime;T===R&&(a.nextKnownPendingLevel=Op(c)),d();var j=Ll===bn;if(j&&!(Y0&&If.current)){var V=Tp+M0-vt();if(V>10){if(I2){var te=a.lastPingedTime;if(te===lt||te>=T){a.lastPingedTime=T,bf(a,T);break}}var oe=q2(a);if(oe!==lt&&oe!==T)break;if(R!==lt&&R!==T){a.lastPingedTime=R;break}a.timeoutHandle=St(r0.bind(null,a),V);break}}r0(a);break}case w1:{Bf(a,T);var Ie=a.lastSuspendedTime;if(T===Ie&&(a.nextKnownPendingLevel=Op(c)),d(),!(Y0&&If.current)){if(I2){var Ye=a.lastPingedTime;if(Ye===lt||Ye>=T){a.lastPingedTime=T,bf(a,T);break}}var pt=q2(a);if(pt!==lt&&pt!==T)break;if(Ie!==lt&&Ie!==T){a.lastPingedTime=Ie;break}var Nt;if(S1!==bn)Nt=bo(S1)-vt();else if(Ll===bn)Nt=0;else{var Vt=_v(Ll),zt=vt(),vn=bo(T)-zt,xr=zt-Vt;xr<0&&(xr=0),Nt=Pp(xr)-xr,vn10){a.timeoutHandle=St(r0.bind(null,a),Nt);break}}r0(a);break}case Sp:{if(!(Y0&&If.current)&&Ll!==bn&&Dc!==null){var $r=Ip(Ll,T,Dc);if($r>10){Bf(a,T),a.timeoutHandle=St(r0.bind(null,a),$r);break}}r0(a);break}default:throw Error("Unknown root exit status.")}}function A1(a){var c=a.lastExpiredTime,_=c!==lt?c:bn;if(a.finishedExpirationTime===_)r0(a);else{if((Zn&(Do|Ss))!==cu)throw Error("Should not already be working.");if(Xa(),(a!==cl||_!==q0)&&(bf(a,_),ee(a,_)),qn!==null){var T=Zn;Zn|=Do;var R=pv(a),j=W2(a);ff(qn);do try{Ev();break}catch(te){dv(a,te)}while(!0);if(mt(),Zn=T,hv(R),Ln&&V2(j),k0===b2){var V=P2;throw Bp(),bf(a,_),Bf(a,_),Uo(a),V}if(qn!==null)throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");Tv(),a.finishedWork=a.current.alternate,a.finishedExpirationTime=_,Jm(a,k0,_),Uo(a)}}return null}function Jm(a,c,_){cl=null,(c===D1||c===w1)&&d(),r0(a)}function Zm(a,c){qp(a,c),Uo(a),(Zn&(Do|Ss))===cu&&It()}function av(){if((Zn&(E1|Do|Ss))!==cu){(Zn&Do)!==cu&&Kt(!1,"unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering.");return}ey(),Xa()}function $m(a){return _n(Wn,a)}function fv(a,c,_,T){return _n(Ci,a.bind(null,c,_,T))}function ey(){if(Ka!==null){var a=Ka;Ka=null,a.forEach(function(c,_){qp(_,c),Uo(_)}),It()}}function ty(a,c){var _=Zn;Zn|=E1;try{return a(c)}finally{Zn=_,Zn===cu&&It()}}function ny(a,c){var _=Zn;Zn|=ki;try{return a(c)}finally{Zn=_,Zn===cu&&It()}}function cv(a,c,_,T){var R=Zn;Zn|=Dp;try{return _n(Xr,a.bind(null,c,_,T))}finally{Zn=R,Zn===cu&&It()}}function ry(a,c){var _=Zn;Zn&=~E1,Zn|=F2;try{return a(c)}finally{Zn=_,Zn===cu&&It()}}function xp(a,c){if((Zn&(Do|Ss))!==cu)throw Error("flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.");var _=Zn;Zn|=E1;try{return _n(Ci,a.bind(null,c))}finally{Zn=_,It()}}function iy(a){var c=Zn;Zn|=E1;try{_n(Ci,a)}finally{Zn=c,Zn===cu&&It()}}function bf(a,c){a.finishedWork=null,a.finishedExpirationTime=lt;var _=a.timeoutHandle;if(_!==Jo&&(a.timeoutHandle=Jo,so(_)),qn!==null)for(var T=qn.return;T!==null;)$h(T),T=T.return;cl=a,qn=wo(a.current,null,c),q0=c,k0=Mf,P2=null,Ll=bn,S1=bn,Dc=null,wc=lt,I2=!1,Ln&&(Lf=null),wl.discardPendingWarnings(),Ys=null}function dv(a,c){do{try{if(mt(),m2(),nt(),qn===null||qn.return===null)return k0=b2,P2=c,null;Zt&&qn.mode&Jr&&a1(qn,!0),lv(a,qn.return,qn,c,q0),qn=Dv(qn)}catch(_){c=_;continue}return}while(!0)}function pv(a){var c=Cr.current;return Cr.current=o1,c===null?o1:c}function hv(a){Cr.current=a}function W2(a){if(Ln){var c=k.__interactionsRef.current;return k.__interactionsRef.current=a.memoizedInteractions,c}return null}function V2(a){Ln&&(k.__interactionsRef.current=a)}function Ap(){Tp=vt()}function vv(a,c){aQi&&(Ll=a),c!==null&&aQi&&(S1=a,Dc=c)}function G2(a){a>wc&&(wc=a)}function mv(){k0===Mf&&(k0=D1)}function yv(){(k0===Mf||k0===D1)&&(k0=w1),wc!==lt&&cl!==null&&(Bf(cl,q0),o_(cl,wc))}function Rp(){k0!==Sp&&(k0=wp)}function gv(){return k0===Mf}function _v(a){var c=bo(a);return c-pf}function uy(a,c){var _=bo(a);return _-(c.timeoutMs|0||pf)}function Ev(){for(;qn!==null;)qn=Y2(qn)}function oy(){for(;qn!==null&&!kn();)qn=Y2(qn)}function Y2(a){var c=a.alternate;Kl(a),_t(a);var _;return Zt&&(a.mode&Jr)!==Sr?(zd(a),_=R1(c,a,q0),a1(a,!0)):_=R1(c,a,q0),nt(),a.memoizedProps=a.pendingProps,_===null&&(_=Dv(a)),Ep.current=null,_}function Dv(a){qn=a;do{var c=qn.alternate,_=qn.return;if((qn.effectTag&F0)===_i){_t(qn);var T=void 0;if(!Zt||(qn.mode&Jr)===Sr?T=Zh(c,qn,q0):(zd(qn),T=Zh(c,qn,q0),a1(qn,!1)),Yr(qn),nt(),ly(qn),T!==null)return T;if(_!==null&&(_.effectTag&F0)===_i){_.firstEffect===null&&(_.firstEffect=qn.firstEffect),qn.lastEffect!==null&&(_.lastEffect!==null&&(_.lastEffect.nextEffect=qn.firstEffect),_.lastEffect=qn.lastEffect);var R=qn.effectTag;R>eu&&(_.lastEffect!==null?_.lastEffect.nextEffect=qn:_.firstEffect=qn,_.lastEffect=qn)}}else{var j=Pm(qn,q0);if(Zt&&(qn.mode&Jr)!==Sr){a1(qn,!1);for(var V=qn.actualDuration,te=qn.child;te!==null;)V+=te.actualDuration,te=te.sibling;qn.actualDuration=V}if(j!==null)return fo(qn),j.effectTag&=Hl,j;Yr(qn),_!==null&&(_.firstEffect=_.lastEffect=null,_.effectTag|=F0)}var oe=qn.sibling;if(oe!==null)return oe;qn=_}while(qn!==null);return k0===Mf&&(k0=Sp),null}function Op(a){var c=a.expirationTime,_=a.childExpirationTime;return c>_?c:_}function ly(a){if(!(q0!==hi&&a.childExpirationTime===hi)){var c=lt;if(Zt&&(a.mode&Jr)!==Sr){for(var _=a.actualDuration,T=a.selfBaseDuration,R=a.alternate===null||a.child!==a.alternate.child,j=a.child;j!==null;){var V=j.expirationTime,te=j.childExpirationTime;V>c&&(c=V),te>c&&(c=te),R&&(_+=j.actualDuration),T+=j.treeBaseDuration,j=j.sibling}a.actualDuration=_,a.treeBaseDuration=T}else for(var oe=a.child;oe!==null;){var Ie=oe.expirationTime,Ye=oe.childExpirationTime;Ie>c&&(c=Ie),Ye>c&&(c=Ye),oe=oe.sibling}a.childExpirationTime=c}}function r0(a){var c=Xt();return _n(Ci,kp.bind(null,a,c)),null}function kp(a,c){do Xa();while(Cc!==null);if(vy(),(Zn&(Do|Ss))!==cu)throw Error("Should not already be working.");var _=a.finishedWork,T=a.finishedExpirationTime;if(_===null)return null;if(a.finishedWork=null,a.finishedExpirationTime=lt,_===a.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");a.callbackNode=null,a.callbackExpirationTime=lt,a.callbackPriority=y0,a.nextKnownPendingLevel=lt,J0();var R=Op(_);iE(a,T,R),a===cl&&(cl=null,qn=null,q0=lt);var j;if(_.effectTag>eu?_.lastEffect!==null?(_.lastEffect.nextEffect=_,j=_.firstEffect):j=_:j=_.firstEffect,j!==null){var V=Zn;Zn|=Ss;var te=W2(a);Ep.current=null,Te(),Bn(a.containerInfo),fn=j;do if(sl(null,sy,null),Jn()){if(fn===null)throw Error("Should be working on an effect.");var oe=Vs();Pf(fn,oe),fn=fn.nextEffect}while(fn!==null);et(),Zt&&Oh(),Ve(),fn=j;do if(sl(null,ay,null,a,c),Jn()){if(fn===null)throw Error("Should be working on an effect.");var Ie=Vs();Pf(fn,Ie),fn=fn.nextEffect}while(fn!==null);Gt(),Ir(a.containerInfo),a.current=_,Yt(),fn=j;do if(sl(null,Mp,null,a,T),Jn()){if(fn===null)throw Error("Should be working on an effect.");var Ye=Vs();Pf(fn,Ye),fn=fn.nextEffect}while(fn!==null);sr(),fn=null,se(),Ln&&V2(te),Zn=V}else a.current=_,Te(),et(),Zt&&Oh(),Ve(),Gt(),Yt(),sr();Z0();var pt=Tc;if(Tc)Tc=!1,Cc=a,Cp=T,T1=c;else for(fn=j;fn!==null;){var Nt=fn.nextEffect;fn.nextEffect=null,fn=Nt}var Vt=a.firstPendingTime;if(Vt!==lt){if(Ln){if(Lf!==null){var zt=Lf;Lf=null;for(var vn=0;vnWn?Wn:T1;return T1=y0,_n(a,Np)}}function Np(){if(Cc===null)return!1;var a=Cc,c=Cp;if(Cc=null,Cp=lt,(Zn&(Do|Ss))!==cu)throw Error("Cannot flush passive effects while already rendering.");var _=Zn;Zn|=Ss;for(var T=W2(a),R=a.current.firstEffect;R!==null;){{if(_t(R),sl(null,Ea,null,R),Jn()){if(R===null)throw Error("Should be working on an effect.");var j=Vs();Pf(R,j)}nt()}var V=R.nextEffect;R.nextEffect=null,R=V}return Ln&&(V2(T),de(a,c)),Zn=_,It(),C1=Cc===null?0:C1+1,!0}function Lp(a){return Sc!==null&&Sc.has(a)}function Fp(a){Sc===null?Sc=new Set([a]):Sc.add(a)}function fy(a){B2||(B2=!0,U2=a)}var cy=fy;function wv(a,c,_){var T=cp(_,c),R=uv(a,T,bn);Ua(a,R);var j=z2(a,bn);j!==null&&(Uo(j),H(j,bn))}function Pf(a,c){if(a.tag===U){wv(a,a,c);return}for(var _=a.return;_!==null;){if(_.tag===U){wv(_,a,c);return}else if(_.tag===N){var T=_.type,R=_.stateNode;if(typeof T.getDerivedStateFromError=="function"||typeof R.componentDidCatch=="function"&&!Lp(R)){var j=cp(c,a),V=ov(_,j,bn);Ua(_,V);var te=z2(_,bn);te!==null&&(Uo(te),H(te,bn));return}}_=_.return}}function bp(a,c,_){var T=a.pingCache;if(T!==null&&T.delete(c),cl===a&&q0===_){k0===w1||k0===D1&&Ll===bn&&vt()-TpKm)throw xc=0,j2=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");C1>sv&&(C1=0,Kt(!1,"Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render."))}function vy(){wl.flushLegacyContextWarning(),fi&&wl.flushPendingUnsafeLifecycleWarnings()}function Tv(){var a=!0;cf(Nf,a),Nf=null}function Bp(){var a=!1;cf(Nf,a),Nf=null}function Up(a,c){Pr&&cl!==null&&c>q0&&(Nf=a)}var K2=null;function my(a){{var c=a.tag;if(c!==U&&c!==N&&c!==L&&c!==ge&&c!==Oe&&c!==le)return;var _=qt(a.type)||"ReactComponent";if(K2!==null){if(K2.has(_))return;K2.add(_)}else K2=new Set([_]);Ke(!1,"Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in %s.%s",c===N?"the componentWillUnmount method":"a useEffect cleanup function",_r(a))}}var R1;if(G0){var yy=null;R1=function(a,c,_){var T=i_(yy,c);try{return op(a,c,_)}catch(j){if(j!==null&&typeof j=="object"&&typeof j.then=="function")throw j;if(mt(),m2(),$h(c),i_(c,T),Zt&&c.mode&Jr&&zd(c),sl(null,op,null,a,c,_),Jn()){var R=Vs();throw R}else throw j}}}else R1=op;var Cv=!1,xv=!1;function gy(a){if(a.tag===N)switch(Ar){case"getChildContext":if(xv)return;Ke(!1,"setState(...): Cannot call setState() inside getChildContext()"),xv=!0;break;case"render":if(Cv)return;Ke(!1,"Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),Cv=!0;break}}var If={current:!1};function jp(a){fs===!0&&fl.current===!0&&If.current!==!0&&Ke(!1,`It looks like you're using the wrong act() around your test interactions. -Be sure to use the matching version of act() corresponding to your renderer: - -// for react-dom: -import {act} from 'react-dom/test-utils'; -// ... -act(() => ...); - -// for react-test-renderer: -import TestRenderer from 'react-test-renderer'; -const {act} = TestRenderer; -// ... -act(() => ...);%s`,_r(a))}function Av(a){fs===!0&&(a.mode&cr)!==Sr&&fl.current===!1&&If.current===!1&&Ke(!1,`An update to %s ran an effect, but was not wrapped in act(...). - -When testing, code that causes React state updates should be wrapped into act(...): - -act(() => { - /* fire events that update state */ -}); -/* assert on the output */ - -This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act%s`,qt(a.type),_r(a))}function _y(a){fs===!0&&Zn===cu&&fl.current===!1&&If.current===!1&&Ke(!1,`An update to %s inside a test was not wrapped in act(...). - -When testing, code that causes React state updates should be wrapped into act(...): - -act(() => { - /* fire events that update state */ -}); -/* assert on the output */ - -This ensures that you're testing the behavior the user would see in the browser. Learn more at https://fb.me/react-wrap-tests-with-act%s`,qt(a.type),_r(a))}var Ey=_y,zp=!1;function Dy(a){zp===!1&&t.unstable_flushAllWithoutAsserting===void 0&&(a.mode&Y||a.mode&Qr?(zp=!0,Ke(!1,`In Concurrent or Sync modes, the "scheduler" module needs to be mocked to guarantee consistent behaviour across tests and browsers. For example, with jest: -jest.mock('scheduler', () => require('scheduler/unstable_mock')); - -For more info, visit https://fb.me/react-mock-scheduler`)):Yi===!0&&(zp=!0,Ke(!1,`Starting from React v17, the "scheduler" module will need to be mocked to guarantee consistent behaviour across tests and browsers. For example, with jest: -jest.mock('scheduler', () => require('scheduler/unstable_mock')); - -For more info, visit https://fb.me/react-mock-scheduler`)))}var Ys=null;function wy(a){{var c=Xt();if((a.mode&Qr)!==_i&&(c===Xr||c===Ci))for(var _=a;_!==null;){var T=_.alternate;if(T!==null)switch(_.tag){case N:var R=T.updateQueue;if(R!==null)for(var j=R.firstUpdate;j!==null;){var V=j.priority;if(V===Xr||V===Ci){Ys===null?Ys=new Set([qt(_.type)]):Ys.add(qt(_.type));break}j=j.next}break;case L:case ge:case le:if(_.memoizedState!==null&&_.memoizedState.baseUpdate!==null)for(var te=_.memoizedState.baseUpdate;te!==null;){var oe=te.priority;if(oe===Xr||oe===Ci){Ys===null?Ys=new Set([qt(_.type)]):Ys.add(qt(_.type));break}if(te.next===_.memoizedState.baseUpdate)break;te=te.next}break;default:break}_=_.return}}}function d(){if(Ys!==null){var a=[];Ys.forEach(function(c){return a.push(c)}),Ys=null,a.length>0&&Ke(!1,`%s triggered a user-blocking update that suspended. - -The fix is to split the update into multiple parts: a user-blocking update to provide immediate feedback, and another update that triggers the bulk of the changes. - -Refer to the documentation for useTransition to learn how to implement this pattern.`,a.sort().join(", "))}}function v(a,c){return c*1e3+a.interactionThreadID}function x(a){!Ln||(Lf===null?Lf=[a]:Lf.push(a))}function b(a,c,_){if(!!Ln&&_.size>0){var T=a.pendingInteractionMap,R=T.get(c);R!=null?_.forEach(function(te){R.has(te)||te.__count++,R.add(te)}):(T.set(c,new Set(_)),_.forEach(function(te){te.__count++}));var j=k.__subscriberRef.current;if(j!==null){var V=v(a,c);j.onWorkScheduled(_,V)}}}function H(a,c){!Ln||b(a,c,k.__interactionsRef.current)}function ee(a,c){if(!!Ln){var _=new Set;if(a.pendingInteractionMap.forEach(function(j,V){V>=c&&j.forEach(function(te){return _.add(te)})}),a.memoizedInteractions=_,_.size>0){var T=k.__subscriberRef.current;if(T!==null){var R=v(a,c);try{T.onWorkStarted(_,R)}catch(j){yn(Ci,function(){throw j})}}}}}function de(a,c){if(!!Ln){var _=a.firstPendingTime,T;try{if(T=k.__subscriberRef.current,T!==null&&a.memoizedInteractions.size>0){var R=v(a,c);T.onWorkStopped(a.memoizedInteractions,R)}}catch(V){yn(Ci,function(){throw V})}finally{var j=a.pendingInteractionMap;j.forEach(function(V,te){te>_&&(j.delete(te),V.forEach(function(oe){if(oe.__count--,T!==null&&oe.__count===0)try{T.onInteractionScheduledWorkCompleted(oe)}catch(Ie){yn(Ci,function(){throw Ie})}}))})}}}var ye=null,be=null,gt=!1,Dt=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined";function Rt(a){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined")return!1;var c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(c.isDisabled)return!0;if(!c.supportsFiber)return Ke(!1,"The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://fb.me/react-devtools"),!0;try{var _=c.inject(a);ye=function(T,R){try{var j=(T.current.effectTag&Hr)===Hr;if(Zt){var V=Ac(),te=$1(V,R);c.onCommitFiberRoot(_,T,te,j)}else c.onCommitFiberRoot(_,T,void 0,j)}catch(oe){gt||(gt=!0,Ke(!1,"React DevTools encountered an error: %s",oe))}},be=function(T){try{c.onCommitFiberUnmount(_,T)}catch(R){gt||(gt=!0,Ke(!1,"React DevTools encountered an error: %s",R))}}}catch(T){Ke(!1,"React DevTools encountered an error: %s.",T)}return!0}function rn(a,c){typeof ye=="function"&&ye(a,c)}function Rn(a){typeof be=="function"&&be(a)}var $n;{$n=!1;try{var Nr=Object.preventExtensions({}),ir=new Map([[Nr,null]]),Zr=new Set([Nr]);ir.set(0,0),Zr.add(0)}catch(a){$n=!0}}var ui=1;function bl(a,c,_,T){this.tag=a,this.key=_,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=c,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=T,this.effectTag=_i,this.nextEffect=null,this.firstEffect=null,this.lastEffect=null,this.expirationTime=lt,this.childExpirationTime=lt,this.alternate=null,Zt&&(this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0),Pr&&(this._debugID=ui++,this._debugIsCurrentlyTiming=!1),this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!$n&&typeof Object.preventExtensions=="function"&&Object.preventExtensions(this)}var Wi=function(a,c,_,T){return new bl(a,c,_,T)};function uo(a){var c=a.prototype;return!!(c&&c.isReactComponent)}function i0(a){return typeof a=="function"&&!uo(a)&&a.defaultProps===void 0}function Ts(a){if(typeof a=="function")return uo(a)?N:L;if(a!=null){var c=a.$$typeof;if(c===An)return ge;if(c===Wt)return Oe}return C}function wo(a,c,_){var T=a.alternate;T===null?(T=Wi(a.tag,c,a.key,a.mode),T.elementType=a.elementType,T.type=a.type,T.stateNode=a.stateNode,T._debugID=a._debugID,T._debugSource=a._debugSource,T._debugOwner=a._debugOwner,T._debugHookTypes=a._debugHookTypes,T.alternate=a,a.alternate=T):(T.pendingProps=c,T.effectTag=_i,T.nextEffect=null,T.firstEffect=null,T.lastEffect=null,Zt&&(T.actualDuration=0,T.actualStartTime=-1)),T.childExpirationTime=a.childExpirationTime,T.expirationTime=a.expirationTime,T.child=a.child,T.memoizedProps=a.memoizedProps,T.memoizedState=a.memoizedState,T.updateQueue=a.updateQueue;var R=a.dependencies;switch(T.dependencies=R===null?null:{expirationTime:R.expirationTime,firstContext:R.firstContext,responders:R.responders},T.sibling=a.sibling,T.index=a.index,T.ref=a.ref,Zt&&(T.selfBaseDuration=a.selfBaseDuration,T.treeBaseDuration=a.treeBaseDuration),T._debugNeedsRemount=a._debugNeedsRemount,T.tag){case C:case L:case le:T.type=Zu(a.type);break;case N:T.type=U0(a.type);break;case ge:T.type=vf(a.type);break;default:break}return T}function Rv(a,c){a.effectTag&=ai,a.nextEffect=null,a.firstEffect=null,a.lastEffect=null;var _=a.alternate;if(_===null)a.childExpirationTime=lt,a.expirationTime=c,a.child=null,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,Zt&&(a.selfBaseDuration=0,a.treeBaseDuration=0);else{a.childExpirationTime=_.childExpirationTime,a.expirationTime=_.expirationTime,a.child=_.child,a.memoizedProps=_.memoizedProps,a.memoizedState=_.memoizedState,a.updateQueue=_.updateQueue;var T=_.dependencies;a.dependencies=T===null?null:{expirationTime:T.expirationTime,firstContext:T.firstContext,responders:T.responders},Zt&&(a.selfBaseDuration=_.selfBaseDuration,a.treeBaseDuration=_.treeBaseDuration)}return a}function X4(a){var c;return a===R0?c=Qr|Y|cr:a===I0?c=Y|cr:c=Sr,Zt&&Dt&&(c|=Jr),Wi(U,null,null,c)}function Sy(a,c,_,T,R,j){var V,te=C,oe=a;if(typeof a=="function")uo(a)?(te=N,oe=U0(oe)):oe=Zu(oe);else if(typeof a=="string")te=W;else{e:switch(a){case ue:return Qa(_.children,R,j,c);case ln:te=we,R|=Qr|Y|cr;break;case je:te=we,R|=cr;break;case ct:return J4(_,R,j,c);case nr:return Z4(_,R,j,c);case un:return $4(_,R,j,c);default:{if(typeof a=="object"&&a!==null)switch(a.$$typeof){case At:te=he;break e;case en:te=Se;break e;case An:te=ge,oe=vf(oe);break e;case Wt:te=Oe;break e;case vr:te=Ue,oe=null;break e;case w:if(Ht)return r_(a,_,R,j,c);break;case Vn:if(Du)return Q4(a,_,R,j,c)}var Ie="";{(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(Ie+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ye=T?qt(T.type):null;Ye&&(Ie+=` - -Check the render method of \``+Ye+"`.")}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(a==null?a:typeof a)+"."+Ie)}}}return V=Wi(te,_,c,R),V.elementType=a,V.type=oe,V.expirationTime=j,V}function Ty(a,c,_){var T=null;T=a._owner;var R=a.type,j=a.key,V=a.props,te=Sy(R,j,V,T,c,_);return te._debugSource=a._source,te._debugOwner=a._owner,te}function Qa(a,c,_,T){var R=Wi(m,a,T,c);return R.expirationTime=_,R}function r_(a,c,_,T,R){var j=Wi(xt,c,R,_);return j.elementType=a,j.type=a,j.expirationTime=T,j}function Q4(a,c,_,T,R){var j=Wi($e,c,R,_);return j.type=a,j.elementType=a,j.expirationTime=T,j}function J4(a,c,_,T){(typeof a.id!="string"||typeof a.onRender!="function")&&Ke(!1,'Profiler must specify an "id" string and "onRender" function as props');var R=Wi(ze,a,T,c|Jr);return R.elementType=ct,R.type=ct,R.expirationTime=_,R}function Z4(a,c,_,T){var R=Wi(pe,a,T,c);return R.type=nr,R.elementType=nr,R.expirationTime=_,R}function $4(a,c,_,T){var R=Wi(wt,a,T,c);return R.type=un,R.elementType=un,R.expirationTime=_,R}function Cy(a,c,_){var T=Wi(ne,a,null,c);return T.expirationTime=_,T}function eE(){var a=Wi(W,null,null,Sr);return a.elementType="DELETED",a.type="DELETED",a}function tE(a){var c=Wi(rt,null,null,Sr);return c.stateNode=a,c}function xy(a,c,_){var T=a.children!==null?a.children:[],R=Wi(q,T,a.key,c);return R.expirationTime=_,R.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},R}function i_(a,c){return a===null&&(a=Wi(C,null,null,Sr)),a.tag=c.tag,a.key=c.key,a.elementType=c.elementType,a.type=c.type,a.stateNode=c.stateNode,a.return=c.return,a.child=c.child,a.sibling=c.sibling,a.index=c.index,a.ref=c.ref,a.pendingProps=c.pendingProps,a.memoizedProps=c.memoizedProps,a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.dependencies=c.dependencies,a.mode=c.mode,a.effectTag=c.effectTag,a.nextEffect=c.nextEffect,a.firstEffect=c.firstEffect,a.lastEffect=c.lastEffect,a.expirationTime=c.expirationTime,a.childExpirationTime=c.childExpirationTime,a.alternate=c.alternate,Zt&&(a.actualDuration=c.actualDuration,a.actualStartTime=c.actualStartTime,a.selfBaseDuration=c.selfBaseDuration,a.treeBaseDuration=c.treeBaseDuration),a._debugID=c._debugID,a._debugSource=c._debugSource,a._debugOwner=c._debugOwner,a._debugIsCurrentlyTiming=c._debugIsCurrentlyTiming,a._debugNeedsRemount=c._debugNeedsRemount,a._debugHookTypes=c._debugHookTypes,a}function nE(a,c,_){this.tag=c,this.current=null,this.containerInfo=a,this.pendingChildren=null,this.pingCache=null,this.finishedExpirationTime=lt,this.finishedWork=null,this.timeoutHandle=Jo,this.context=null,this.pendingContext=null,this.hydrate=_,this.callbackNode=null,this.callbackPriority=y0,this.firstPendingTime=lt,this.firstSuspendedTime=lt,this.lastSuspendedTime=lt,this.nextKnownPendingLevel=lt,this.lastPingedTime=lt,this.lastExpiredTime=lt,Ln&&(this.interactionThreadID=k.unstable_getThreadID(),this.memoizedInteractions=new Set,this.pendingInteractionMap=new Map),Ui&&(this.hydrationCallbacks=null)}function rE(a,c,_,T){var R=new nE(a,c,_);Ui&&(R.hydrationCallbacks=T);var j=X4(c);return R.current=j,j.stateNode=R,R}function u_(a,c){var _=a.firstSuspendedTime,T=a.lastSuspendedTime;return _!==lt&&_>=c&&T<=c}function Bf(a,c){var _=a.firstSuspendedTime,T=a.lastSuspendedTime;_c||_===lt)&&(a.lastSuspendedTime=c),c<=a.lastPingedTime&&(a.lastPingedTime=lt),c<=a.lastExpiredTime&&(a.lastExpiredTime=lt)}function o_(a,c){var _=a.firstPendingTime;c>_&&(a.firstPendingTime=c);var T=a.firstSuspendedTime;T!==lt&&(c>=T?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=lt:c>=a.lastSuspendedTime&&(a.lastSuspendedTime=c+1),c>a.nextKnownPendingLevel&&(a.nextKnownPendingLevel=c))}function iE(a,c,_){a.firstPendingTime=_,c<=a.lastSuspendedTime?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=lt:c<=a.firstSuspendedTime&&(a.firstSuspendedTime=c-1),c<=a.lastPingedTime&&(a.lastPingedTime=lt),c<=a.lastExpiredTime&&(a.lastExpiredTime=lt)}function qp(a,c){var _=a.lastExpiredTime;(_===lt||_>c)&&(a.lastExpiredTime=c)}var uE={debugTool:null},Ov=uE,Ay,Ry;Ay=!1,Ry={};function oE(a){if(!a)return Sn;var c=jt(a),_=El(c);if(c.tag===N){var T=c.type;if(zi(T))return A0(c,T,_)}return _}function Oy(a){var c=jt(a);if(c===void 0)throw typeof a.render=="function"?Error("Unable to find node on an unmounted component."):Error("Argument appears to not be a ReactComponent. Keys: "+Object.keys(a));var _=b0(c);return _===null?null:_.stateNode}function lE(a,c){{var _=jt(a);if(_===void 0)throw typeof a.render=="function"?Error("Unable to find node on an unmounted component."):Error("Argument appears to not be a ReactComponent. Keys: "+Object.keys(a));var T=b0(_);if(T===null)return null;if(T.mode&cr){var R=qt(_.type)||"Component";Ry[R]||(Ry[R]=!0,_.mode&cr?Ke(!1,"%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node%s",c,c,R,_r(T)):Ke(!1,"%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://fb.me/react-strict-mode-find-node%s",c,c,R,_r(T)))}return T.stateNode}return Oy(a)}function sE(a,c,_,T){return rE(a,c,_,T)}function l_(a,c,_,T){var R=c.current,j=Fl();typeof jest!="undefined"&&(Dy(R),jp(R));var V=mo(),te=Ff(j,R,V);Ov.debugTool&&(R.alternate===null?Ov.debugTool.onMountContainer(c):a===null?Ov.debugTool.onUnmountContainer(c):Ov.debugTool.onUpdateContainer(c));var oe=oE(_);c.context===null?c.context=oe:c.pendingContext=oe,Ar==="render"&&Cn!==null&&!Ay&&(Ay=!0,Ke(!1,`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate. - -Check the render method of %s.`,qt(Cn.type)||"Unknown"));var Ie=gu(te,V);return Ie.payload={element:a},T=T===void 0?null:T,T!==null&&(typeof T!="function"&&Ke(!1,"render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",T),Ie.callback=T),Ua(R,Ie),dl(R,te),te}function aE(a){var c=a.current;if(!c.child)return null;switch(c.child.tag){case W:return Ro(c.child.stateNode);default:return c.child.stateNode}}function fE(a){switch(a.tag){case U:var c=a.stateNode;c.hydrate&&Zm(c,c.firstPendingTime);break;case pe:xp(function(){return dl(a,bn)});var _=La(Fl());kv(a,_);break}}function s_(a,c){var _=a.memoizedState;_!==null&&_.dehydrated!==null&&_.retryTime=c.length)return T;var R=c[_],j=Array.isArray(a)?a.slice():f({},a);return j[R]=Ny(a[R],c,_+1,T),j},h_=function(a,c,_){return Ny(a,c,0,_)};f_=function(a,c,_,T){for(var R=a.memoizedState;R!==null&&c>0;)R=R.next,c--;if(R!==null){var j=h_(R.memoizedState,_,T);R.memoizedState=j,R.baseState=j,a.memoizedProps=f({},a.memoizedProps),dl(a,bn)}},c_=function(a,c,_){a.pendingProps=h_(a.memoizedProps,c,_),a.alternate&&(a.alternate.pendingProps=a.pendingProps),dl(a,bn)},d_=function(a){dl(a,bn)},p_=function(a){My=a}}function hE(a){var c=a.findFiberByHostInstance,_=at.ReactCurrentDispatcher;return Rt(f({},a,{overrideHookState:f_,overrideProps:c_,setSuspenseHandler:p_,scheduleUpdate:d_,currentDispatcherRef:_,findHostInstanceByFiber:function(T){var R=b0(T);return R===null?null:R.stateNode},findFiberByHostInstance:function(T){return c?c(T):null},findHostInstancesForRefresh:n2,scheduleRefresh:Sl,scheduleRoot:_s,setRefreshHandler:Ia,getCurrentFiber:function(){return Cn}}))}var v_=Object.freeze({createContainer:sE,updateContainer:l_,batchedEventUpdates:ny,batchedUpdates:ty,unbatchedUpdates:ry,deferredUpdates:$m,syncUpdates:fv,discreteUpdates:cv,flushDiscreteUpdates:av,flushControlled:iy,flushSync:xp,flushPassiveEffects:Xa,IsThisRendererActing:If,getPublicRootInstance:aE,attemptSynchronousHydration:fE,attemptUserBlockingHydration:cE,attemptContinuousHydration:ky,attemptHydrationAtCurrentPriority:dE,findHostInstance:Oy,findHostInstanceWithWarning:lE,findHostInstanceWithNoPortals:pE,shouldSuspend:a_,injectIntoDevTools:hE}),vE=v_.default||v_;hg.exports=vE;var mE=hg.exports;return hg.exports=i,mE})});var D9=ce((zne,cw)=>{"use strict";process.env.NODE_ENV==="production"?cw.exports=m9():cw.exports=E9()});var S9=ce((qne,w9)=>{"use strict";var ZK={ALIGN_COUNT:8,ALIGN_AUTO:0,ALIGN_FLEX_START:1,ALIGN_CENTER:2,ALIGN_FLEX_END:3,ALIGN_STRETCH:4,ALIGN_BASELINE:5,ALIGN_SPACE_BETWEEN:6,ALIGN_SPACE_AROUND:7,DIMENSION_COUNT:2,DIMENSION_WIDTH:0,DIMENSION_HEIGHT:1,DIRECTION_COUNT:3,DIRECTION_INHERIT:0,DIRECTION_LTR:1,DIRECTION_RTL:2,DISPLAY_COUNT:2,DISPLAY_FLEX:0,DISPLAY_NONE:1,EDGE_COUNT:9,EDGE_LEFT:0,EDGE_TOP:1,EDGE_RIGHT:2,EDGE_BOTTOM:3,EDGE_START:4,EDGE_END:5,EDGE_HORIZONTAL:6,EDGE_VERTICAL:7,EDGE_ALL:8,EXPERIMENTAL_FEATURE_COUNT:1,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:0,FLEX_DIRECTION_COUNT:4,FLEX_DIRECTION_COLUMN:0,FLEX_DIRECTION_COLUMN_REVERSE:1,FLEX_DIRECTION_ROW:2,FLEX_DIRECTION_ROW_REVERSE:3,JUSTIFY_COUNT:6,JUSTIFY_FLEX_START:0,JUSTIFY_CENTER:1,JUSTIFY_FLEX_END:2,JUSTIFY_SPACE_BETWEEN:3,JUSTIFY_SPACE_AROUND:4,JUSTIFY_SPACE_EVENLY:5,LOG_LEVEL_COUNT:6,LOG_LEVEL_ERROR:0,LOG_LEVEL_WARN:1,LOG_LEVEL_INFO:2,LOG_LEVEL_DEBUG:3,LOG_LEVEL_VERBOSE:4,LOG_LEVEL_FATAL:5,MEASURE_MODE_COUNT:3,MEASURE_MODE_UNDEFINED:0,MEASURE_MODE_EXACTLY:1,MEASURE_MODE_AT_MOST:2,NODE_TYPE_COUNT:2,NODE_TYPE_DEFAULT:0,NODE_TYPE_TEXT:1,OVERFLOW_COUNT:3,OVERFLOW_VISIBLE:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2,POSITION_TYPE_COUNT:2,POSITION_TYPE_RELATIVE:0,POSITION_TYPE_ABSOLUTE:1,PRINT_OPTIONS_COUNT:3,PRINT_OPTIONS_LAYOUT:1,PRINT_OPTIONS_STYLE:2,PRINT_OPTIONS_CHILDREN:4,UNIT_COUNT:4,UNIT_UNDEFINED:0,UNIT_POINT:1,UNIT_PERCENT:2,UNIT_AUTO:3,WRAP_COUNT:3,WRAP_NO_WRAP:0,WRAP_WRAP:1,WRAP_WRAP_REVERSE:2};w9.exports=ZK});var A9=ce((Hne,T9)=>{"use strict";var $K=Object.assign||function(i){for(var o=1;o"}}]),i}(),C9=function(){v4(i,null,[{key:"fromJS",value:function(f){var p=f.width,E=f.height;return new i(p,E)}}]);function i(o,f){pw(this,i),this.width=o,this.height=f}return v4(i,[{key:"fromJS",value:function(f){f(this.width,this.height)}},{key:"toString",value:function(){return""}}]),i}(),x9=function(){function i(o,f){pw(this,i),this.unit=o,this.value=f}return v4(i,[{key:"fromJS",value:function(f){f(this.unit,this.value)}},{key:"toString",value:function(){switch(this.unit){case Jf.UNIT_POINT:return String(this.value);case Jf.UNIT_PERCENT:return this.value+"%";case Jf.UNIT_AUTO:return"auto";default:return this.value+"?"}}},{key:"valueOf",value:function(){return this.value}}]),i}();T9.exports=function(i,o){function f(k,L,N){var C=k[L];k[L]=function(){for(var U=arguments.length,q=Array(U),W=0;W1?q-1:0),ne=1;ne1&&arguments[1]!==void 0?arguments[1]:NaN,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Jf.DIRECTION_LTR;return k.call(this,L,N,C)}),$K({Config:o.Config,Node:o.Node,Layout:i("Layout",eX),Size:i("Size",C9),Value:i("Value",x9),getInstanceCount:function(){return o.getInstanceCount.apply(o,arguments)}},Jf)}});var R9=ce((exports,module)=>{(function(i,o){typeof define=="function"&&define.amd?define([],function(){return o}):typeof module=="object"&&module.exports?module.exports=o:(i.nbind=i.nbind||{}).init=o})(exports,function(Module,cb){typeof Module=="function"&&(cb=Module,Module={}),Module.onRuntimeInitialized=function(i,o){return function(){i&&i.apply(this,arguments);try{Module.ccall("nbind_init")}catch(f){o(f);return}o(null,{bind:Module._nbind_value,reflect:Module.NBind.reflect,queryType:Module.NBind.queryType,toggleLightGC:Module.toggleLightGC,lib:Module})}}(Module.onRuntimeInitialized,cb);var Module;Module||(Module=(typeof Module!="undefined"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(Module.ENVIRONMENT)if(Module.ENVIRONMENT==="WEB")ENVIRONMENT_IS_WEB=!0;else if(Module.ENVIRONMENT==="WORKER")ENVIRONMENT_IS_WORKER=!0;else if(Module.ENVIRONMENT==="NODE")ENVIRONMENT_IS_NODE=!0;else if(Module.ENVIRONMENT==="SHELL")ENVIRONMENT_IS_SHELL=!0;else throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");else ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof require=="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn);var nodeFS,nodePath;Module.read=function(o,f){nodeFS||(nodeFS={}("")),nodePath||(nodePath={}("")),o=nodePath.normalize(o);var p=nodeFS.readFileSync(o);return f?p:p.toString()},Module.readBinary=function(o){var f=Module.read(o,!0);return f.buffer||(f=new Uint8Array(f)),assert(f.buffer),f},Module.load=function(o){globalEval(read(o))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),typeof module!="undefined"&&(module.exports=Module),Module.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr!="undefined"&&(Module.printErr=printErr),typeof read!="undefined"?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(o){if(typeof readbuffer=="function")return new Uint8Array(readbuffer(o));var f=read(o,"binary");return assert(typeof f=="object"),f},typeof scriptArgs!="undefined"?Module.arguments=scriptArgs:typeof arguments!="undefined"&&(Module.arguments=arguments),typeof quit=="function"&&(Module.quit=function(i,o){quit(i)});else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(Module.read=function(o){var f=new XMLHttpRequest;return f.open("GET",o,!1),f.send(null),f.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(o){var f=new XMLHttpRequest;return f.open("GET",o,!1),f.responseType="arraybuffer",f.send(null),new Uint8Array(f.response)}),Module.readAsync=function(o,f,p){var E=new XMLHttpRequest;E.open("GET",o,!0),E.responseType="arraybuffer",E.onload=function(){E.status==200||E.status==0&&E.response?f(E.response):p()},E.onerror=p,E.send(null)},typeof arguments!="undefined"&&(Module.arguments=arguments),typeof console!="undefined")Module.print||(Module.print=function(o){console.log(o)}),Module.printErr||(Module.printErr=function(o){console.warn(o)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump!="undefined"?function(i){dump(i)}:function(i){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle=="undefined"&&(Module.setWindowTitle=function(i){document.title=i})}else throw"Unknown runtime environment. Where are we?";function globalEval(i){eval.call(null,i)}!Module.load&&Module.read&&(Module.load=function(o){globalEval(Module.read(o))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.quit||(Module.quit=function(i,o){throw o}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[];for(var key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(i){return tempRet0=i,i},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(i){STACKTOP=i},getNativeTypeSize:function(i){switch(i){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(i[i.length-1]==="*")return Runtime.QUANTUM_SIZE;if(i[0]==="i"){var o=parseInt(i.substr(1));return assert(o%8==0),o/8}else return 0}}},getNativeFieldSize:function(i){return Math.max(Runtime.getNativeTypeSize(i),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(i,o){return o==="double"||o==="i64"?i&7&&(assert((i&7)==4),i+=4):assert((i&3)==0),i},getAlignSize:function(i,o,f){return!f&&(i=="i64"||i=="double")?8:i?Math.min(o||(i?Runtime.getNativeFieldSize(i):0),Runtime.QUANTUM_SIZE):Math.min(o,8)},dynCall:function(i,o,f){return f&&f.length?Module["dynCall_"+i].apply(null,[o].concat(f)):Module["dynCall_"+i].call(null,o)},functionPointers:[],addFunction:function(i){for(var o=0;o>2],f=(o+i+15|0)&-16;if(HEAP32[DYNAMICTOP_PTR>>2]=f,f>=TOTAL_MEMORY){var p=enlargeMemory();if(!p)return HEAP32[DYNAMICTOP_PTR>>2]=o,0}return o},alignMemory:function(i,o){var f=i=Math.ceil(i/(o||16))*(o||16);return f},makeBigInt:function(i,o,f){var p=f?+(i>>>0)+ +(o>>>0)*4294967296:+(i>>>0)+ +(o|0)*4294967296;return p},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=0,EXITSTATUS=0;function assert(i,o){i||abort("Assertion failed: "+o)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(i){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}var cwrap,ccall;(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(i){var o=Runtime.stackAlloc(i.length);return writeArrayToMemory(i,o),o},stringToC:function(i){var o=0;if(i!=null&&i!==0){var f=(i.length<<2)+1;o=Runtime.stackAlloc(f),stringToUTF8(i,o,f)}return o}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(o,f,p,E,t){var k=getCFunc(o),L=[],N=0;if(E)for(var C=0;C>0]=o;break;case"i8":HEAP8[i>>0]=o;break;case"i16":HEAP16[i>>1]=o;break;case"i32":HEAP32[i>>2]=o;break;case"i64":tempI64=[o>>>0,(tempDouble=o,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[i>>2]=tempI64[0],HEAP32[i+4>>2]=tempI64[1];break;case"float":HEAPF32[i>>2]=o;break;case"double":HEAPF64[i>>3]=o;break;default:abort("invalid type for setValue: "+f)}}Module.setValue=setValue;function getValue(i,o,f){switch(o=o||"i8",o.charAt(o.length-1)==="*"&&(o="i32"),o){case"i1":return HEAP8[i>>0];case"i8":return HEAP8[i>>0];case"i16":return HEAP16[i>>1];case"i32":return HEAP32[i>>2];case"i64":return HEAP32[i>>2];case"float":return HEAPF32[i>>2];case"double":return HEAPF64[i>>3];default:abort("invalid type for setValue: "+o)}return null}Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE;function allocate(i,o,f,p){var E,t;typeof i=="number"?(E=!0,t=i):(E=!1,t=i.length);var k=typeof o=="string"?o:null,L;if(f==ALLOC_NONE?L=p:L=[typeof _malloc=="function"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][f===void 0?ALLOC_STATIC:f](Math.max(t,k?1:o.length)),E){var p=L,N;for(assert((L&3)==0),N=L+(t&~3);p>2]=0;for(N=L+t;p>0]=0;return L}if(k==="i8")return i.subarray||i.slice?HEAPU8.set(i,L):HEAPU8.set(new Uint8Array(i),L),L;for(var C=0,U,q,W;C>0],f|=p,!(p==0&&!o||(E++,o&&E==o)););o||(o=E);var t="";if(f<128){for(var k=1024,L;o>0;)L=String.fromCharCode.apply(String,HEAPU8.subarray(i,i+Math.min(o,k))),t=t?t+L:L,i+=k,o-=k;return t}return Module.UTF8ToString(i)}Module.Pointer_stringify=Pointer_stringify;function AsciiToString(i){for(var o="";;){var f=HEAP8[i++>>0];if(!f)return o;o+=String.fromCharCode(f)}}Module.AsciiToString=AsciiToString;function stringToAscii(i,o){return writeAsciiToMemory(i,o,!1)}Module.stringToAscii=stringToAscii;var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(i,o){for(var f=o;i[f];)++f;if(f-o>16&&i.subarray&&UTF8Decoder)return UTF8Decoder.decode(i.subarray(o,f));for(var p,E,t,k,L,N,C="";;){if(p=i[o++],!p)return C;if(!(p&128)){C+=String.fromCharCode(p);continue}if(E=i[o++]&63,(p&224)==192){C+=String.fromCharCode((p&31)<<6|E);continue}if(t=i[o++]&63,(p&240)==224?p=(p&15)<<12|E<<6|t:(k=i[o++]&63,(p&248)==240?p=(p&7)<<18|E<<12|t<<6|k:(L=i[o++]&63,(p&252)==248?p=(p&3)<<24|E<<18|t<<12|k<<6|L:(N=i[o++]&63,p=(p&1)<<30|E<<24|t<<18|k<<12|L<<6|N))),p<65536)C+=String.fromCharCode(p);else{var U=p-65536;C+=String.fromCharCode(55296|U>>10,56320|U&1023)}}}Module.UTF8ArrayToString=UTF8ArrayToString;function UTF8ToString(i){return UTF8ArrayToString(HEAPU8,i)}Module.UTF8ToString=UTF8ToString;function stringToUTF8Array(i,o,f,p){if(!(p>0))return 0;for(var E=f,t=f+p-1,k=0;k=55296&&L<=57343&&(L=65536+((L&1023)<<10)|i.charCodeAt(++k)&1023),L<=127){if(f>=t)break;o[f++]=L}else if(L<=2047){if(f+1>=t)break;o[f++]=192|L>>6,o[f++]=128|L&63}else if(L<=65535){if(f+2>=t)break;o[f++]=224|L>>12,o[f++]=128|L>>6&63,o[f++]=128|L&63}else if(L<=2097151){if(f+3>=t)break;o[f++]=240|L>>18,o[f++]=128|L>>12&63,o[f++]=128|L>>6&63,o[f++]=128|L&63}else if(L<=67108863){if(f+4>=t)break;o[f++]=248|L>>24,o[f++]=128|L>>18&63,o[f++]=128|L>>12&63,o[f++]=128|L>>6&63,o[f++]=128|L&63}else{if(f+5>=t)break;o[f++]=252|L>>30,o[f++]=128|L>>24&63,o[f++]=128|L>>18&63,o[f++]=128|L>>12&63,o[f++]=128|L>>6&63,o[f++]=128|L&63}}return o[f]=0,f-E}Module.stringToUTF8Array=stringToUTF8Array;function stringToUTF8(i,o,f){return stringToUTF8Array(i,HEAPU8,o,f)}Module.stringToUTF8=stringToUTF8;function lengthBytesUTF8(i){for(var o=0,f=0;f=55296&&p<=57343&&(p=65536+((p&1023)<<10)|i.charCodeAt(++f)&1023),p<=127?++o:p<=2047?o+=2:p<=65535?o+=3:p<=2097151?o+=4:p<=67108863?o+=5:o+=6}return o}Module.lengthBytesUTF8=lengthBytesUTF8;var UTF16Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf-16le"):void 0;function demangle(i){var o=Module.___cxa_demangle||Module.__cxa_demangle;if(o){try{var f=i.substr(1),p=lengthBytesUTF8(f)+1,E=_malloc(p);stringToUTF8(f,E,p);var t=_malloc(4),k=o(E,0,0,t);if(getValue(t,"i32")===0&&k)return Pointer_stringify(k)}catch(L){}finally{E&&_free(E),t&&_free(t),k&&_free(k)}return i}return Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),i}function demangleAll(i){var o=/__Z[\w\d_]+/g;return i.replace(o,function(f){var p=demangle(f);return f===p?f:f+" ["+p+"]"})}function jsStackTrace(){var i=new Error;if(!i.stack){try{throw new Error(0)}catch(o){i=o}if(!i.stack)return"(no stack trace available)"}return i.stack.toString()}function stackTrace(){var i=jsStackTrace();return Module.extraStackTrace&&(i+=` -`+Module.extraStackTrace()),demangleAll(i)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY0;){var o=i.shift();if(typeof o=="function"){o();continue}var f=o.func;typeof f=="number"?o.arg===void 0?Module.dynCall_v(f):Module.dynCall_vi(f,o.arg):f(o.arg===void 0?null:o.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(i){__ATPRERUN__.unshift(i)}Module.addOnPreRun=addOnPreRun;function addOnInit(i){__ATINIT__.unshift(i)}Module.addOnInit=addOnInit;function addOnPreMain(i){__ATMAIN__.unshift(i)}Module.addOnPreMain=addOnPreMain;function addOnExit(i){__ATEXIT__.unshift(i)}Module.addOnExit=addOnExit;function addOnPostRun(i){__ATPOSTRUN__.unshift(i)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(i,o,f){var p=f>0?f:lengthBytesUTF8(i)+1,E=new Array(p),t=stringToUTF8Array(i,E,0,E.length);return o&&(E.length=t),E}Module.intArrayFromString=intArrayFromString;function intArrayToString(i){for(var o=[],f=0;f255&&(p&=255),o.push(String.fromCharCode(p))}return o.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(i,o,f){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var p,E;f&&(E=o+lengthBytesUTF8(i),p=HEAP8[E]),stringToUTF8(i,o,Infinity),f&&(HEAP8[E]=p)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(i,o){HEAP8.set(i,o)}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(i,o,f){for(var p=0;p>0]=i.charCodeAt(p);f||(HEAP8[o>>0]=0)}if(Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function(o,f){var p=o>>>16,E=o&65535,t=f>>>16,k=f&65535;return E*k+(p*k+E*t<<16)|0}),Math.imul=Math.imul,!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(i){return froundBuffer[0]=i,froundBuffer[0]}}Math.fround=Math.fround,Math.clz32||(Math.clz32=function(i){i=i>>>0;for(var o=0;o<32;o++)if(i&1<<31-o)return o;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(i){return i<0?Math.ceil(i):Math.floor(i)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_round=Math.round,Math_min=Math.min,Math_clz32=Math.clz32,Math_trunc=Math.trunc,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(i){return i}function addRunDependency(i){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}Module.addRunDependency=addRunDependency;function removeRunDependency(i){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var o=dependenciesFulfilled;dependenciesFulfilled=null,o()}}Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={};var ASM_CONSTS=[function(i,o,f,p,E,t,k,L){return _nbind.callbackSignatureList[i].apply(this,arguments)}];function _emscripten_asm_const_iiiiiiii(i,o,f,p,E,t,k,L){return ASM_CONSTS[i](o,f,p,E,t,k,L)}function _emscripten_asm_const_iiiii(i,o,f,p,E){return ASM_CONSTS[i](o,f,p,E)}function _emscripten_asm_const_iiidddddd(i,o,f,p,E,t,k,L,N){return ASM_CONSTS[i](o,f,p,E,t,k,L,N)}function _emscripten_asm_const_iiididi(i,o,f,p,E,t,k){return ASM_CONSTS[i](o,f,p,E,t,k)}function _emscripten_asm_const_iiii(i,o,f,p){return ASM_CONSTS[i](o,f,p)}function _emscripten_asm_const_iiiid(i,o,f,p,E){return ASM_CONSTS[i](o,f,p,E)}function _emscripten_asm_const_iiiiii(i,o,f,p,E,t){return ASM_CONSTS[i](o,f,p,E,t)}STATIC_BASE=Runtime.GLOBAL_BASE,STATICTOP=STATIC_BASE+12800,__ATINIT__.push({func:function(){__GLOBAL__sub_I_Yoga_cpp()}},{func:function(){__GLOBAL__sub_I_nbind_cc()}},{func:function(){__GLOBAL__sub_I_common_cc()}},{func:function(){__GLOBAL__sub_I_Binding_cc()}}),allocate([0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,192,127,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,128,191,0,0,128,191,0,0,192,127,0,0,0,0,0,0,0,0,0,0,128,63,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,190,12,0,0,200,12,0,0,208,12,0,0,216,12,0,0,230,12,0,0,242,12,0,0,1,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,0,0,192,127,3,0,0,0,180,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,182,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,183,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,184,45,0,0,185,45,0,0,181,45,0,0,181,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,148,4,0,0,3,0,0,0,187,45,0,0,164,4,0,0,188,45,0,0,2,0,0,0,189,45,0,0,164,4,0,0,188,45,0,0,185,45,0,0,164,4,0,0,185,45,0,0,164,4,0,0,188,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,5,0,0,0,6,0,0,0,1,0,0,0,7,0,0,0,183,45,0,0,182,45,0,0,181,45,0,0,190,45,0,0,190,45,0,0,182,45,0,0,182,45,0,0,185,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,185,45,0,0,48,5,0,0,3,0,0,0,56,5,0,0,1,0,0,0,189,45,0,0,185,45,0,0,164,4,0,0,76,5,0,0,2,0,0,0,191,45,0,0,186,45,0,0,182,45,0,0,185,45,0,0,192,45,0,0,185,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,76,5,0,0,76,5,0,0,136,5,0,0,182,45,0,0,181,45,0,0,2,0,0,0,190,45,0,0,136,5,0,0,56,19,0,0,156,5,0,0,2,0,0,0,184,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,8,0,0,0,9,0,0,0,1,0,0,0,10,0,0,0,204,5,0,0,181,45,0,0,181,45,0,0,2,0,0,0,180,45,0,0,204,5,0,0,2,0,0,0,195,45,0,0,236,5,0,0,97,19,0,0,198,45,0,0,211,45,0,0,212,45,0,0,213,45,0,0,214,45,0,0,215,45,0,0,188,45,0,0,182,45,0,0,216,45,0,0,217,45,0,0,218,45,0,0,219,45,0,0,192,45,0,0,181,45,0,0,0,0,0,0,185,45,0,0,110,19,0,0,186,45,0,0,115,19,0,0,221,45,0,0,120,19,0,0,148,4,0,0,132,19,0,0,96,6,0,0,145,19,0,0,222,45,0,0,164,19,0,0,223,45,0,0,173,19,0,0,0,0,0,0,3,0,0,0,104,6,0,0,1,0,0,0,187,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,11,0,0,0,12,0,0,0,1,0,0,0,13,0,0,0,185,45,0,0,224,45,0,0,164,6,0,0,188,45,0,0,172,6,0,0,180,6,0,0,2,0,0,0,188,6,0,0,7,0,0,0,224,45,0,0,7,0,0,0,164,6,0,0,1,0,0,0,213,45,0,0,185,45,0,0,224,45,0,0,172,6,0,0,185,45,0,0,224,45,0,0,164,6,0,0,185,45,0,0,224,45,0,0,211,45,0,0,211,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,172,6,0,0,222,45,0,0,211,45,0,0,224,45,0,0,188,45,0,0,222,45,0,0,211,45,0,0,40,7,0,0,188,45,0,0,2,0,0,0,224,45,0,0,185,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,188,45,0,0,222,45,0,0,224,45,0,0,148,4,0,0,185,45,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,148,4,0,0,185,45,0,0,164,6,0,0,148,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,14,0,0,0,15,0,0,0,1,0,0,0,16,0,0,0,148,7,0,0,2,0,0,0,225,45,0,0,183,45,0,0,188,45,0,0,168,7,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,234,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,148,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,9,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,242,45,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,110,111,100,101,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,119,104,105,99,104,32,115,116,105,108,108,32,104,97,115,32,99,104,105,108,100,114,101,110,32,97,116,116,97,99,104,101,100,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,115,116,105,108,108,32,97,116,116,97,99,104,101,100,32,116,111,32,97,32,112,97,114,101,110,116,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,99,111,110,102,105,103,0,67,97,110,110,111,116,32,115,101,116,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,67,104,105,108,100,32,97,108,114,101,97,100,121,32,104,97,115,32,97,32,112,97,114,101,110,116,44,32,105,116,32,109,117,115,116,32,98,101,32,114,101,109,111,118,101,100,32,102,105,114,115,116,46,0,67,97,110,110,111,116,32,97,100,100,32,99,104,105,108,100,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,79,110,108,121,32,108,101,97,102,32,110,111,100,101,115,32,119,105,116,104,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,115,104,111,117,108,100,32,109,97,110,117,97,108,108,121,32,109,97,114,107,32,116,104,101,109,115,101,108,118,101,115,32,97,115,32,100,105,114,116,121,0,67,97,110,110,111,116,32,103,101,116,32,108,97,121,111,117,116,32,112,114,111,112,101,114,116,105,101,115,32,111,102,32,109,117,108,116,105,45,101,100,103,101,32,115,104,111,114,116,104,97,110,100,115,0,37,115,37,100,46,123,91,115,107,105,112,112,101,100,93,32,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,61,62,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,37,115,37,100,46,123,37,115,0,42,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,37,115,10,0,37,115,37,100,46,125,37,115,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,79,117,116,32,111,102,32,99,97,99,104,101,32,101,110,116,114,105,101,115,33,10,0,83,99,97,108,101,32,102,97,99,116,111,114,32,115,104,111,117,108,100,32,110,111,116,32,98,101,32,108,101,115,115,32,116,104,97,110,32,122,101,114,111,0,105,110,105,116,105,97,108,0,37,115,10,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,85,78,68,69,70,73,78,69,68,0,69,88,65,67,84,76,89,0,65,84,95,77,79,83,84,0,76,65,89,95,85,78,68,69,70,73,78,69,68,0,76,65,89,95,69,88,65,67,84,76,89,0,76,65,89,95,65,84,95,77,79,83,84,0,97,118,97,105,108,97,98,108,101,87,105,100,116,104,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,119,105,100,116,104,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,97,118,97,105,108,97,98,108,101,72,101,105,103,104,116,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,104,101,105,103,104,116,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,102,108,101,120,0,115,116,114,101,116,99,104,0,109,117,108,116,105,108,105,110,101,45,115,116,114,101,116,99,104,0,69,120,112,101,99,116,101,100,32,110,111,100,101,32,116,111,32,104,97,118,101,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,0,109,101,97,115,117,114,101,0,69,120,112,101,99,116,32,99,117,115,116,111,109,32,98,97,115,101,108,105,110,101,32,102,117,110,99,116,105,111,110,32,116,111,32,110,111,116,32,114,101,116,117,114,110,32,78,97,78,0,97,98,115,45,109,101,97,115,117,114,101,0,97,98,115,45,108,97,121,111,117,116,0,78,111,100,101,0,99,114,101,97,116,101,68,101,102,97,117,108,116,0,99,114,101,97,116,101,87,105,116,104,67,111,110,102,105,103,0,100,101,115,116,114,111,121,0,114,101,115,101,116,0,99,111,112,121,83,116,121,108,101,0,115,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,115,101,116,80,111,115,105,116,105,111,110,0,115,101,116,80,111,115,105,116,105,111,110,80,101,114,99,101,110,116,0,115,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,115,101,116,65,108,105,103,110,73,116,101,109,115,0,115,101,116,65,108,105,103,110,83,101,108,102,0,115,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,115,101,116,70,108,101,120,87,114,97,112,0,115,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,115,101,116,77,97,114,103,105,110,0,115,101,116,77,97,114,103,105,110,80,101,114,99,101,110,116,0,115,101,116,77,97,114,103,105,110,65,117,116,111,0,115,101,116,79,118,101,114,102,108,111,119,0,115,101,116,68,105,115,112,108,97,121,0,115,101,116,70,108,101,120,0,115,101,116,70,108,101,120,66,97,115,105,115,0,115,101,116,70,108,101,120,66,97,115,105,115,80,101,114,99,101,110,116,0,115,101,116,70,108,101,120,71,114,111,119,0,115,101,116,70,108,101,120,83,104,114,105,110,107,0,115,101,116,87,105,100,116,104,0,115,101,116,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,87,105,100,116,104,65,117,116,111,0,115,101,116,72,101,105,103,104,116,0,115,101,116,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,72,101,105,103,104,116,65,117,116,111,0,115,101,116,77,105,110,87,105,100,116,104,0,115,101,116,77,105,110,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,105,110,72,101,105,103,104,116,0,115,101,116,77,105,110,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,77,97,120,87,105,100,116,104,0,115,101,116,77,97,120,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,97,120,72,101,105,103,104,116,0,115,101,116,77,97,120,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,65,115,112,101,99,116,82,97,116,105,111,0,115,101,116,66,111,114,100,101,114,0,115,101,116,80,97,100,100,105,110,103,0,115,101,116,80,97,100,100,105,110,103,80,101,114,99,101,110,116,0,103,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,103,101,116,80,111,115,105,116,105,111,110,0,103,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,103,101,116,65,108,105,103,110,73,116,101,109,115,0,103,101,116,65,108,105,103,110,83,101,108,102,0,103,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,103,101,116,70,108,101,120,87,114,97,112,0,103,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,103,101,116,77,97,114,103,105,110,0,103,101,116,70,108,101,120,66,97,115,105,115,0,103,101,116,70,108,101,120,71,114,111,119,0,103,101,116,70,108,101,120,83,104,114,105,110,107,0,103,101,116,87,105,100,116,104,0,103,101,116,72,101,105,103,104,116,0,103,101,116,77,105,110,87,105,100,116,104,0,103,101,116,77,105,110,72,101,105,103,104,116,0,103,101,116,77,97,120,87,105,100,116,104,0,103,101,116,77,97,120,72,101,105,103,104,116,0,103,101,116,65,115,112,101,99,116,82,97,116,105,111,0,103,101,116,66,111,114,100,101,114,0,103,101,116,79,118,101,114,102,108,111,119,0,103,101,116,68,105,115,112,108,97,121,0,103,101,116,80,97,100,100,105,110,103,0,105,110,115,101,114,116,67,104,105,108,100,0,114,101,109,111,118,101,67,104,105,108,100,0,103,101,116,67,104,105,108,100,67,111,117,110,116,0,103,101,116,80,97,114,101,110,116,0,103,101,116,67,104,105,108,100,0,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,117,110,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,109,97,114,107,68,105,114,116,121,0,105,115,68,105,114,116,121,0,99,97,108,99,117,108,97,116,101,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,76,101,102,116,0,103,101,116,67,111,109,112,117,116,101,100,82,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,84,111,112,0,103,101,116,67,111,109,112,117,116,101,100,66,111,116,116,111,109,0,103,101,116,67,111,109,112,117,116,101,100,87,105,100,116,104,0,103,101,116,67,111,109,112,117,116,101,100,72,101,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,77,97,114,103,105,110,0,103,101,116,67,111,109,112,117,116,101,100,66,111,114,100,101,114,0,103,101,116,67,111,109,112,117,116,101,100,80,97,100,100,105,110,103,0,67,111,110,102,105,103,0,99,114,101,97,116,101,0,115,101,116,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,115,101,116,80,111,105,110,116,83,99,97,108,101,70,97,99,116,111,114,0,105,115,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,86,97,108,117,101,0,76,97,121,111,117,116,0,83,105,122,101,0,103,101,116,73,110,115,116,97,110,99,101,67,111,117,110,116,0,73,110,116,54,52,0,1,1,1,2,2,4,4,4,4,8,8,4,8,118,111,105,100,0,98,111,111,108,0,115,116,100,58,58,115,116,114,105,110,103,0,99,98,70,117,110,99,116,105,111,110,32,38,0,99,111,110,115,116,32,99,98,70,117,110,99,116,105,111,110,32,38,0,69,120,116,101,114,110,97,108,0,66,117,102,102,101,114,0,78,66,105,110,100,73,68,0,78,66,105,110,100,0,98,105,110,100,95,118,97,108,117,101,0,114,101,102,108,101,99,116,0,113,117,101,114,121,84,121,112,101,0,108,97,108,108,111,99,0,108,114,101,115,101,116,0,123,114,101,116,117,114,110,40,95,110,98,105,110,100,46,99,97,108,108,98,97,99,107,83,105,103,110,97,116,117,114,101,76,105,115,116,91,36,48,93,46,97,112,112,108,121,40,116,104,105,115,44,97,114,103,117,109,101,110,116,115,41,41,59,125,0,95,110,98,105,110,100,95,110,101,119,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;STATICTOP+=16;function _atexit(i,o){__ATEXIT__.unshift({func:i,arg:o})}function ___cxa_atexit(){return _atexit.apply(null,arguments)}function _abort(){Module.abort()}function __ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj(){Module.printErr("missing function: _ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj"),abort(-1)}function __decorate(i,o,f,p){var E=arguments.length,t=E<3?o:p===null?p=Object.getOwnPropertyDescriptor(o,f):p,k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(i,o,f,p);else for(var L=i.length-1;L>=0;L--)(k=i[L])&&(t=(E<3?k(t):E>3?k(o,f,t):k(o,f))||t);return E>3&&t&&Object.defineProperty(o,f,t),t}function _defineHidden(i){return function(o,f){Object.defineProperty(o,f,{configurable:!1,enumerable:!1,value:i,writable:!0})}}var _nbind={};function __nbind_free_external(i){_nbind.externalList[i].dereference(i)}function __nbind_reference_external(i){_nbind.externalList[i].reference()}function _llvm_stackrestore(i){var o=_llvm_stacksave,f=o.LLVM_SAVEDSTACKS[i];o.LLVM_SAVEDSTACKS.splice(i,1),Runtime.stackRestore(f)}function __nbind_register_pool(i,o,f,p){_nbind.Pool.pageSize=i,_nbind.Pool.usedPtr=o/4,_nbind.Pool.rootPtr=f,_nbind.Pool.pagePtr=p/4,HEAP32[o/4]=16909060,HEAP8[o]==1&&(_nbind.bigEndian=!0),HEAP32[o/4]=0,_nbind.makeTypeKindTbl=(t={},t[1024]=_nbind.PrimitiveType,t[64]=_nbind.Int64Type,t[2048]=_nbind.BindClass,t[3072]=_nbind.BindClassPtr,t[4096]=_nbind.SharedClassPtr,t[5120]=_nbind.ArrayType,t[6144]=_nbind.ArrayType,t[7168]=_nbind.CStringType,t[9216]=_nbind.CallbackType,t[10240]=_nbind.BindType,t),_nbind.makeTypeNameTbl={Buffer:_nbind.BufferType,External:_nbind.ExternalType,Int64:_nbind.Int64Type,_nbind_new:_nbind.CreateValueType,bool:_nbind.BooleanType,"cbFunction &":_nbind.CallbackType,"const cbFunction &":_nbind.CallbackType,"const std::string &":_nbind.StringType,"std::string":_nbind.StringType},Module.toggleLightGC=_nbind.toggleLightGC,_nbind.callUpcast=Module.dynCall_ii;var E=_nbind.makeType(_nbind.constructType,{flags:2048,id:0,name:""});E.proto=Module,_nbind.BindClass.list.push(E);var t}function _emscripten_set_main_loop_timing(i,o){if(Browser.mainLoop.timingMode=i,Browser.mainLoop.timingValue=o,!Browser.mainLoop.func)return 1;if(i==0)Browser.mainLoop.scheduler=function(){var k=Math.max(0,Browser.mainLoop.tickStartTime+o-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,k)},Browser.mainLoop.method="timeout";else if(i==1)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method="rAF";else if(i==2){if(!window.setImmediate){let t=function(k){k.source===window&&k.data===p&&(k.stopPropagation(),f.shift()())};var E=t,f=[],p="setimmediate";window.addEventListener("message",t,!0),window.setImmediate=function(L){f.push(L),ENVIRONMENT_IS_WORKER?(Module.setImmediates===void 0&&(Module.setImmediates=[]),Module.setImmediates.push(L),window.postMessage({target:p})):window.postMessage(p,"*")}}Browser.mainLoop.scheduler=function(){window.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method="immediate"}return 0}function _emscripten_get_now(){abort()}function _emscripten_set_main_loop(i,o,f,p,E){Module.noExitRuntime=!0,assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Browser.mainLoop.func=i,Browser.mainLoop.arg=p;var t;typeof p!="undefined"?t=function(){Module.dynCall_vi(i,p)}:t=function(){Module.dynCall_v(i)};var k=Browser.mainLoop.currentlyRunningMainloop;if(Browser.mainLoop.runner=function(){if(!ABORT){if(Browser.mainLoop.queue.length>0){var N=Date.now(),C=Browser.mainLoop.queue.shift();if(C.func(C.arg),Browser.mainLoop.remainingBlockers){var U=Browser.mainLoop.remainingBlockers,q=U%1==0?U-1:Math.floor(U);C.counted?Browser.mainLoop.remainingBlockers=q:(q=q+.5,Browser.mainLoop.remainingBlockers=(8*U+q)/9)}if(console.log('main loop blocker "'+C.name+'" took '+(Date.now()-N)+" ms"),Browser.mainLoop.updateStatus(),k1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else Browser.mainLoop.timingMode==0&&(Browser.mainLoop.tickStartTime=_emscripten_get_now());Browser.mainLoop.method==="timeout"&&Module.ctx&&(Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),Browser.mainLoop.method=""),Browser.mainLoop.runIter(t),!(k0?_emscripten_set_main_loop_timing(0,1e3/o):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),f)throw"SimulateInfiniteLoop"}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var i=Browser.mainLoop.timingMode,o=Browser.mainLoop.timingValue,f=Browser.mainLoop.func;Browser.mainLoop.func=null,_emscripten_set_main_loop(f,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(i,o),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var i=Module.statusMessage||"Please wait...",o=Browser.mainLoop.remainingBlockers,f=Browser.mainLoop.expectedBlockers;o?o=6;){var rt=le>>Ue-6&63;Ue-=6,Oe+=ze[rt]}return Ue==2?(Oe+=ze[(le&3)<<4],Oe+=pe+pe):Ue==4&&(Oe+=ze[(le&15)<<2],Oe+=pe),Oe}m.src="data:audio/x-"+k.substr(-3)+";base64,"+he(t),U(m)},m.src=ne,Browser.safeSetTimeout(function(){U(m)},1e4)}else return q()},Module.preloadPlugins.push(o);function f(){Browser.pointerLock=document.pointerLockElement===Module.canvas||document.mozPointerLockElement===Module.canvas||document.webkitPointerLockElement===Module.canvas||document.msPointerLockElement===Module.canvas}var p=Module.canvas;p&&(p.requestPointerLock=p.requestPointerLock||p.mozRequestPointerLock||p.webkitRequestPointerLock||p.msRequestPointerLock||function(){},p.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},p.exitPointerLock=p.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",f,!1),document.addEventListener("mozpointerlockchange",f,!1),document.addEventListener("webkitpointerlockchange",f,!1),document.addEventListener("mspointerlockchange",f,!1),Module.elementPointerLock&&p.addEventListener("click",function(E){!Browser.pointerLock&&Module.canvas.requestPointerLock&&(Module.canvas.requestPointerLock(),E.preventDefault())},!1))},createContext:function(i,o,f,p){if(o&&Module.ctx&&i==Module.canvas)return Module.ctx;var E,t;if(o){var k={antialias:!1,alpha:!1};if(p)for(var L in p)k[L]=p[L];t=GL.createContext(i,k),t&&(E=GL.getContext(t).GLctx)}else E=i.getContext("2d");return E?(f&&(o||assert(typeof GLctx=="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=E,o&&GL.makeContextCurrent(t),Module.useWebGL=o,Browser.moduleContextCreatedCallbacks.forEach(function(N){N()}),Browser.init()),E):null},destroyContext:function(i,o,f){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(i,o,f){Browser.lockPointer=i,Browser.resizeCanvas=o,Browser.vrDevice=f,typeof Browser.lockPointer=="undefined"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas=="undefined"&&(Browser.resizeCanvas=!1),typeof Browser.vrDevice=="undefined"&&(Browser.vrDevice=null);var p=Module.canvas;function E(){Browser.isFullscreen=!1;var k=p.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===k?(p.exitFullscreen=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){},p.exitFullscreen=p.exitFullscreen.bind(document),Browser.lockPointer&&p.requestPointerLock(),Browser.isFullscreen=!0,Browser.resizeCanvas&&Browser.setFullscreenCanvasSize()):(k.parentNode.insertBefore(p,k),k.parentNode.removeChild(k),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullscreen),Module.onFullscreen&&Module.onFullscreen(Browser.isFullscreen),Browser.updateCanvasDimensions(p)}Browser.fullscreenHandlersInstalled||(Browser.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",E,!1),document.addEventListener("mozfullscreenchange",E,!1),document.addEventListener("webkitfullscreenchange",E,!1),document.addEventListener("MSFullscreenChange",E,!1));var t=document.createElement("div");p.parentNode.insertBefore(t,p),t.appendChild(p),t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||(t.webkitRequestFullscreen?function(){t.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(t.webkitRequestFullScreen?function(){t.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),f?t.requestFullscreen({vrDisplay:f}):t.requestFullscreen()},requestFullScreen:function(i,o,f){return Module.printErr("Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead."),Browser.requestFullScreen=function(p,E,t){return Browser.requestFullscreen(p,E,t)},Browser.requestFullscreen(i,o,f)},nextRAF:0,fakeRequestAnimationFrame:function(i){var o=Date.now();if(Browser.nextRAF===0)Browser.nextRAF=o+1e3/60;else for(;o+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var f=Math.max(Browser.nextRAF-o,0);setTimeout(i,f)},requestAnimationFrame:function(o){typeof window=="undefined"?Browser.fakeRequestAnimationFrame(o):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(o))},safeCallback:function(i){return function(){if(!ABORT)return i.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,Browser.queuedAsyncCallbacks.length>0){var i=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[],i.forEach(function(o){o()})}},safeRequestAnimationFrame:function(i){return Browser.requestAnimationFrame(function(){ABORT||(Browser.allowAsyncCallbacks?i():Browser.queuedAsyncCallbacks.push(i))})},safeSetTimeout:function(i,o){return Module.noExitRuntime=!0,setTimeout(function(){ABORT||(Browser.allowAsyncCallbacks?i():Browser.queuedAsyncCallbacks.push(i))},o)},safeSetInterval:function(i,o){return Module.noExitRuntime=!0,setInterval(function(){ABORT||Browser.allowAsyncCallbacks&&i()},o)},getMimetype:function(i){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[i.substr(i.lastIndexOf(".")+1)]},getUserMedia:function(i){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(i)},getMovementX:function(i){return i.movementX||i.mozMovementX||i.webkitMovementX||0},getMovementY:function(i){return i.movementY||i.mozMovementY||i.webkitMovementY||0},getMouseWheelDelta:function(i){var o=0;switch(i.type){case"DOMMouseScroll":o=i.detail;break;case"mousewheel":o=i.wheelDelta;break;case"wheel":o=i.deltaY;break;default:throw"unrecognized mouse wheel event: "+i.type}return o},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(i){if(Browser.pointerLock)i.type!="mousemove"&&"mozMovementX"in i?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(i),Browser.mouseMovementY=Browser.getMovementY(i)),typeof SDL!="undefined"?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var o=Module.canvas.getBoundingClientRect(),f=Module.canvas.width,p=Module.canvas.height,E=typeof window.scrollX!="undefined"?window.scrollX:window.pageXOffset,t=typeof window.scrollY!="undefined"?window.scrollY:window.pageYOffset;if(i.type==="touchstart"||i.type==="touchend"||i.type==="touchmove"){var k=i.touch;if(k===void 0)return;var L=k.pageX-(E+o.left),N=k.pageY-(t+o.top);L=L*(f/o.width),N=N*(p/o.height);var C={x:L,y:N};if(i.type==="touchstart")Browser.lastTouches[k.identifier]=C,Browser.touches[k.identifier]=C;else if(i.type==="touchend"||i.type==="touchmove"){var U=Browser.touches[k.identifier];U||(U=C),Browser.lastTouches[k.identifier]=U,Browser.touches[k.identifier]=C}return}var q=i.pageX-(E+o.left),W=i.pageY-(t+o.top);q=q*(f/o.width),W=W*(p/o.height),Browser.mouseMovementX=q-Browser.mouseX,Browser.mouseMovementY=W-Browser.mouseY,Browser.mouseX=q,Browser.mouseY=W}},asyncLoad:function(i,o,f,p){var E=p?"":getUniqueRunDependency("al "+i);Module.readAsync(i,function(t){assert(t,'Loading data file "'+i+'" failed (no arrayBuffer).'),o(new Uint8Array(t)),E&&removeRunDependency(E)},function(t){if(f)f();else throw'Loading data file "'+i+'" failed.'}),E&&addRunDependency(E)},resizeListeners:[],updateResizeListeners:function(){var i=Module.canvas;Browser.resizeListeners.forEach(function(o){o(i.width,i.height)})},setCanvasSize:function(i,o,f){var p=Module.canvas;Browser.updateCanvasDimensions(p,i,o),f||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!="undefined"){var i=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];i=i|8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=i}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var i=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];i=i&~8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=i}Browser.updateResizeListeners()},updateCanvasDimensions:function(i,o,f){o&&f?(i.widthNative=o,i.heightNative=f):(o=i.widthNative,f=i.heightNative);var p=o,E=f;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(p/E>2];return o},getStr:function(){var i=Pointer_stringify(SYSCALLS.get());return i},get64:function(){var i=SYSCALLS.get(),o=SYSCALLS.get();return i>=0?assert(o===0):assert(o===-1),i},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall6(i,o){SYSCALLS.varargs=o;try{var f=SYSCALLS.getStreamFromFD();return FS.close(f),0}catch(p){return(typeof FS=="undefined"||!(p instanceof FS.ErrnoError))&&abort(p),-p.errno}}function ___syscall54(i,o){SYSCALLS.varargs=o;try{return 0}catch(f){return(typeof FS=="undefined"||!(f instanceof FS.ErrnoError))&&abort(f),-f.errno}}function _typeModule(i){var o=[[0,1,"X"],[1,1,"const X"],[128,1,"X *"],[256,1,"X &"],[384,1,"X &&"],[512,1,"std::shared_ptr"],[640,1,"std::unique_ptr"],[5120,1,"std::vector"],[6144,2,"std::array"],[9216,-1,"std::function"]];function f(N,C,U,q,W,ne){if(C==1){var m=q&896;(m==128||m==256||m==384)&&(N="X const")}var we;return ne?we=U.replace("X",N).replace("Y",W):we=N.replace("X",U).replace("Y",W),we.replace(/([*&]) (?=[*&])/g,"$1")}function p(N,C,U,q,W){throw new Error(N+" type "+U.replace("X",C+"?")+(q?" with flag "+q:"")+" in "+W)}function E(N,C,U,q,W,ne,m,we){ne===void 0&&(ne="X"),we===void 0&&(we=1);var Se=U(N);if(Se)return Se;var he=q(N),ge=he.placeholderFlag,ze=o[ge];m&&ze&&(ne=f(m[2],m[0],ne,ze[0],"?",!0));var pe;ge==0&&(pe="Unbound"),ge>=10&&(pe="Corrupt"),we>20&&(pe="Deeply nested"),pe&&p(pe,N,ne,ge,W||"?");var Oe=he.paramList[0],le=E(Oe,C,U,q,W,ne,ze,we+1),Ue,Ge={flags:ze[0],id:N,name:"",paramList:[le]},rt=[],wt="?";switch(he.placeholderFlag){case 1:Ue=le.spec;break;case 2:if((le.flags&15360)==1024&&le.spec.ptrSize==1){Ge.flags=7168;break}case 3:case 6:case 5:Ue=le.spec,(le.flags&15360)!=2048;break;case 8:wt=""+he.paramList[1],Ge.paramList.push(he.paramList[1]);break;case 9:for(var xt=0,$e=he.paramList[1];xt<$e.length;xt++){var ft=$e[xt],Ke=E(ft,C,U,q,W,ne,ze,we+1);rt.push(Ke.name),Ge.paramList.push(Ke)}wt=rt.join(", ");break;default:break}if(Ge.name=f(ze[2],ze[0],le.name,le.flags,wt),Ue){for(var jt=0,$t=Object.keys(Ue);jt<$t.length;jt++){var at=$t[jt];Ge[at]=Ge[at]||Ue[at]}Ge.flags|=Ue.flags}return t(C,Ge)}function t(N,C){var U=C.flags,q=U&896,W=U&15360;return!C.name&&W==1024&&(C.ptrSize==1?C.name=(U&16?"":(U&8?"un":"")+"signed ")+"char":C.name=(U&8?"u":"")+(U&32?"float":"int")+(C.ptrSize*8+"_t")),C.ptrSize==8&&!(U&32)&&(W=64),W==2048&&(q==512||q==640?W=4096:q&&(W=3072)),N(W,C)}var k=function(){function N(C){this.id=C.id,this.name=C.name,this.flags=C.flags,this.spec=C}return N.prototype.toString=function(){return this.name},N}(),L={Type:k,getComplexType:E,makeType:t,structureList:o};return i.output=L,i.output||L}function __nbind_register_type(i,o){var f=_nbind.readAsciiString(o),p={flags:10240,id:i,name:f};_nbind.makeType(_nbind.constructType,p)}function __nbind_register_callback_signature(i,o){var f=_nbind.readTypeIdList(i,o),p=_nbind.callbackSignatureList.length;return _nbind.callbackSignatureList[p]=_nbind.makeJSCaller(f),p}function __extends(i,o){for(var f in o)o.hasOwnProperty(f)&&(i[f]=o[f]);function p(){this.constructor=i}p.prototype=o.prototype,i.prototype=new p}function __nbind_register_class(i,o,f,p,E,t,k){var L=_nbind.readAsciiString(k),N=_nbind.readPolicyList(o),C=HEAPU32.subarray(i/4,i/4+2),U={flags:2048|(N.Value?2:0),id:C[0],name:L},q=_nbind.makeType(_nbind.constructType,U);q.ptrType=_nbind.getComplexType(C[1],_nbind.constructType,_nbind.getType,_nbind.queryType),q.destroy=_nbind.makeMethodCaller(q.ptrType,{boundID:U.id,flags:0,name:"destroy",num:0,ptr:t,title:q.name+".free",typeList:["void","uint32_t","uint32_t"]}),E&&(q.superIdList=Array.prototype.slice.call(HEAPU32.subarray(f/4,f/4+E)),q.upcastList=Array.prototype.slice.call(HEAPU32.subarray(p/4,p/4+E))),Module[q.name]=q.makeBound(N),_nbind.BindClass.list.push(q)}function _removeAccessorPrefix(i){var o=/^[Gg]et_?([A-Z]?([A-Z]?))/;return i.replace(o,function(f,p,E){return E?p:p.toLowerCase()})}function __nbind_register_function(i,o,f,p,E,t,k,L,N,C){var U=_nbind.getType(i),q=_nbind.readPolicyList(o),W=_nbind.readTypeIdList(f,p),ne;if(k==5)ne=[{direct:E,name:"__nbindConstructor",ptr:0,title:U.name+" constructor",typeList:["uint32_t"].concat(W.slice(1))},{direct:t,name:"__nbindValueConstructor",ptr:0,title:U.name+" value constructor",typeList:["void","uint32_t"].concat(W.slice(1))}];else{var m=_nbind.readAsciiString(L),we=(U.name&&U.name+".")+m;(k==3||k==4)&&(m=_removeAccessorPrefix(m)),ne=[{boundID:i,direct:t,name:m,ptr:E,title:we,typeList:W}]}for(var Se=0,he=ne;Se>2]=i),i}function _llvm_stacksave(){var i=_llvm_stacksave;return i.LLVM_SAVEDSTACKS||(i.LLVM_SAVEDSTACKS=[]),i.LLVM_SAVEDSTACKS.push(Runtime.stackSave()),i.LLVM_SAVEDSTACKS.length-1}function ___syscall140(i,o){SYSCALLS.varargs=o;try{var f=SYSCALLS.getStreamFromFD(),p=SYSCALLS.get(),E=SYSCALLS.get(),t=SYSCALLS.get(),k=SYSCALLS.get(),L=E;return FS.llseek(f,L,k),HEAP32[t>>2]=f.position,f.getdents&&L===0&&k===0&&(f.getdents=null),0}catch(N){return(typeof FS=="undefined"||!(N instanceof FS.ErrnoError))&&abort(N),-N.errno}}function ___syscall146(i,o){SYSCALLS.varargs=o;try{var f=SYSCALLS.get(),p=SYSCALLS.get(),E=SYSCALLS.get(),t=0;___syscall146.buffer||(___syscall146.buffers=[null,[],[]],___syscall146.printChar=function(U,q){var W=___syscall146.buffers[U];assert(W),q===0||q===10?((U===1?Module.print:Module.printErr)(UTF8ArrayToString(W,0)),W.length=0):W.push(q)});for(var k=0;k>2],N=HEAP32[p+(k*8+4)>>2],C=0;Ci.pageSize/2||o>i.pageSize-f){var p=_nbind.typeNameTbl.NBind.proto;return p.lalloc(o)}else return HEAPU32[i.usedPtr]=f+o,i.rootPtr+f},i.lreset=function(o,f){var p=HEAPU32[i.pagePtr];if(p){var E=_nbind.typeNameTbl.NBind.proto;E.lreset(o,f)}else HEAPU32[i.usedPtr]=o},i}();_nbind.Pool=Pool;function constructType(i,o){var f=i==10240?_nbind.makeTypeNameTbl[o.name]||_nbind.BindType:_nbind.makeTypeKindTbl[i],p=new f(o);return typeIdTbl[o.id]=p,_nbind.typeNameTbl[o.name]=p,p}_nbind.constructType=constructType;function getType(i){return typeIdTbl[i]}_nbind.getType=getType;function queryType(i){var o=HEAPU8[i],f=_nbind.structureList[o][1];i/=4,f<0&&(++i,f=HEAPU32[i]+1);var p=Array.prototype.slice.call(HEAPU32.subarray(i+1,i+1+f));return o==9&&(p=[p[0],p.slice(1)]),{paramList:p,placeholderFlag:o}}_nbind.queryType=queryType;function getTypes(i,o){return i.map(function(f){return typeof f=="number"?_nbind.getComplexType(f,constructType,getType,queryType,o):_nbind.typeNameTbl[f]})}_nbind.getTypes=getTypes;function readTypeIdList(i,o){return Array.prototype.slice.call(HEAPU32,i/4,i/4+o)}_nbind.readTypeIdList=readTypeIdList;function readAsciiString(i){for(var o=i;HEAPU8[o++];);return String.fromCharCode.apply("",HEAPU8.subarray(i,o-1))}_nbind.readAsciiString=readAsciiString;function readPolicyList(i){var o={};if(i)for(;;){var f=HEAPU32[i/4];if(!f)break;o[readAsciiString(f)]=!0,i+=4}return o}_nbind.readPolicyList=readPolicyList;function getDynCall(i,o){var f={float32_t:"d",float64_t:"d",int64_t:"d",uint64_t:"d",void:"v"},p=i.map(function(t){return f[t.name]||"i"}).join(""),E=Module["dynCall_"+p];if(!E)throw new Error("dynCall_"+p+" not found for "+o+"("+i.map(function(t){return t.name}).join(", ")+")");return E}_nbind.getDynCall=getDynCall;function addMethod(i,o,f,p){var E=i[o];i.hasOwnProperty(o)&&E?((E.arity||E.arity===0)&&(E=_nbind.makeOverloader(E,E.arity),i[o]=E),E.addMethod(f,p)):(f.arity=p,i[o]=f)}_nbind.addMethod=addMethod;function throwError(i){throw new Error(i)}_nbind.throwError=throwError,_nbind.bigEndian=!1,_a=_typeModule(_typeModule),_nbind.Type=_a.Type,_nbind.makeType=_a.makeType,_nbind.getComplexType=_a.getComplexType,_nbind.structureList=_a.structureList;var BindType=function(i){__extends(o,i);function o(){var f=i!==null&&i.apply(this,arguments)||this;return f.heap=HEAPU32,f.ptrSize=4,f}return o.prototype.needsWireRead=function(f){return!!this.wireRead||!!this.makeWireRead},o.prototype.needsWireWrite=function(f){return!!this.wireWrite||!!this.makeWireWrite},o}(_nbind.Type);_nbind.BindType=BindType;var PrimitiveType=function(i){__extends(o,i);function o(f){var p=i.call(this,f)||this,E=f.flags&32?{32:HEAPF32,64:HEAPF64}:f.flags&8?{8:HEAPU8,16:HEAPU16,32:HEAPU32}:{8:HEAP8,16:HEAP16,32:HEAP32};return p.heap=E[f.ptrSize*8],p.ptrSize=f.ptrSize,p}return o.prototype.needsWireWrite=function(f){return!!f&&!!f.Strict},o.prototype.makeWireWrite=function(f,p){return p&&p.Strict&&function(E){if(typeof E=="number")return E;throw new Error("Type mismatch")}},o}(BindType);_nbind.PrimitiveType=PrimitiveType;function pushCString(i,o){if(i==null){if(o&&o.Nullable)return 0;throw new Error("Type mismatch")}if(o&&o.Strict){if(typeof i!="string")throw new Error("Type mismatch")}else i=i.toString();var f=Module.lengthBytesUTF8(i)+1,p=_nbind.Pool.lalloc(f);return Module.stringToUTF8Array(i,HEAPU8,p,f),p}_nbind.pushCString=pushCString;function popCString(i){return i===0?null:Module.Pointer_stringify(i)}_nbind.popCString=popCString;var CStringType=function(i){__extends(o,i);function o(){var f=i!==null&&i.apply(this,arguments)||this;return f.wireRead=popCString,f.wireWrite=pushCString,f.readResources=[_nbind.resources.pool],f.writeResources=[_nbind.resources.pool],f}return o.prototype.makeWireWrite=function(f,p){return function(E){return pushCString(E,p)}},o}(BindType);_nbind.CStringType=CStringType;var BooleanType=function(i){__extends(o,i);function o(){var f=i!==null&&i.apply(this,arguments)||this;return f.wireRead=function(p){return!!p},f}return o.prototype.needsWireWrite=function(f){return!!f&&!!f.Strict},o.prototype.makeWireRead=function(f){return"!!("+f+")"},o.prototype.makeWireWrite=function(f,p){return p&&p.Strict&&function(E){if(typeof E=="boolean")return E;throw new Error("Type mismatch")}||f},o}(BindType);_nbind.BooleanType=BooleanType;var Wrapper=function(){function i(){}return i.prototype.persist=function(){this.__nbindState|=1},i}();_nbind.Wrapper=Wrapper;function makeBound(i,o){var f=function(p){__extends(E,p);function E(t,k,L,N){var C=p.call(this)||this;if(!(C instanceof E))return new(Function.prototype.bind.apply(E,Array.prototype.concat.apply([null],arguments)));var U=k,q=L,W=N;if(t!==_nbind.ptrMarker){var ne=C.__nbindConstructor.apply(C,arguments);U=4096|512,W=HEAPU32[ne/4],q=HEAPU32[ne/4+1]}var m={configurable:!0,enumerable:!1,value:null,writable:!1},we={__nbindFlags:U,__nbindPtr:q};W&&(we.__nbindShared=W,_nbind.mark(C));for(var Se=0,he=Object.keys(we);Se>=1;var f=_nbind.valueList[i];return _nbind.valueList[i]=firstFreeValue,firstFreeValue=i,f}else{if(o)return _nbind.popShared(i,o);throw new Error("Invalid value slot "+i)}}_nbind.popValue=popValue;var valueBase=18446744073709552e3;function push64(i){return typeof i=="number"?i:pushValue(i)*4096+valueBase}function pop64(i){return i=3?k=Buffer.from(t):k=new Buffer(t),k.copy(p)}else getBuffer(p).set(t)}}_nbind.commitBuffer=commitBuffer;var dirtyList=[],gcTimer=0;function sweep(){for(var i=0,o=dirtyList;i>2]=DYNAMIC_BASE,staticSealed=!0;function invoke_viiiii(i,o,f,p,E,t){try{Module.dynCall_viiiii(i,o,f,p,E,t)}catch(k){if(typeof k!="number"&&k!=="longjmp")throw k;Module.setThrew(1,0)}}function invoke_vif(i,o,f){try{Module.dynCall_vif(i,o,f)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_vid(i,o,f){try{Module.dynCall_vid(i,o,f)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_fiff(i,o,f,p){try{return Module.dynCall_fiff(i,o,f,p)}catch(E){if(typeof E!="number"&&E!=="longjmp")throw E;Module.setThrew(1,0)}}function invoke_vi(i,o){try{Module.dynCall_vi(i,o)}catch(f){if(typeof f!="number"&&f!=="longjmp")throw f;Module.setThrew(1,0)}}function invoke_vii(i,o,f){try{Module.dynCall_vii(i,o,f)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_ii(i,o){try{return Module.dynCall_ii(i,o)}catch(f){if(typeof f!="number"&&f!=="longjmp")throw f;Module.setThrew(1,0)}}function invoke_viddi(i,o,f,p,E){try{Module.dynCall_viddi(i,o,f,p,E)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;Module.setThrew(1,0)}}function invoke_vidd(i,o,f,p){try{Module.dynCall_vidd(i,o,f,p)}catch(E){if(typeof E!="number"&&E!=="longjmp")throw E;Module.setThrew(1,0)}}function invoke_iiii(i,o,f,p){try{return Module.dynCall_iiii(i,o,f,p)}catch(E){if(typeof E!="number"&&E!=="longjmp")throw E;Module.setThrew(1,0)}}function invoke_diii(i,o,f,p){try{return Module.dynCall_diii(i,o,f,p)}catch(E){if(typeof E!="number"&&E!=="longjmp")throw E;Module.setThrew(1,0)}}function invoke_di(i,o){try{return Module.dynCall_di(i,o)}catch(f){if(typeof f!="number"&&f!=="longjmp")throw f;Module.setThrew(1,0)}}function invoke_iid(i,o,f){try{return Module.dynCall_iid(i,o,f)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_iii(i,o,f){try{return Module.dynCall_iii(i,o,f)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_viiddi(i,o,f,p,E,t){try{Module.dynCall_viiddi(i,o,f,p,E,t)}catch(k){if(typeof k!="number"&&k!=="longjmp")throw k;Module.setThrew(1,0)}}function invoke_viiiiii(i,o,f,p,E,t,k){try{Module.dynCall_viiiiii(i,o,f,p,E,t,k)}catch(L){if(typeof L!="number"&&L!=="longjmp")throw L;Module.setThrew(1,0)}}function invoke_dii(i,o,f){try{return Module.dynCall_dii(i,o,f)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_i(i){try{return Module.dynCall_i(i)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_iiiiii(i,o,f,p,E,t){try{return Module.dynCall_iiiiii(i,o,f,p,E,t)}catch(k){if(typeof k!="number"&&k!=="longjmp")throw k;Module.setThrew(1,0)}}function invoke_viiid(i,o,f,p,E){try{Module.dynCall_viiid(i,o,f,p,E)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;Module.setThrew(1,0)}}function invoke_viififi(i,o,f,p,E,t,k){try{Module.dynCall_viififi(i,o,f,p,E,t,k)}catch(L){if(typeof L!="number"&&L!=="longjmp")throw L;Module.setThrew(1,0)}}function invoke_viii(i,o,f,p){try{Module.dynCall_viii(i,o,f,p)}catch(E){if(typeof E!="number"&&E!=="longjmp")throw E;Module.setThrew(1,0)}}function invoke_v(i){try{Module.dynCall_v(i)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_viid(i,o,f,p){try{Module.dynCall_viid(i,o,f,p)}catch(E){if(typeof E!="number"&&E!=="longjmp")throw E;Module.setThrew(1,0)}}function invoke_idd(i,o,f){try{return Module.dynCall_idd(i,o,f)}catch(p){if(typeof p!="number"&&p!=="longjmp")throw p;Module.setThrew(1,0)}}function invoke_viiii(i,o,f,p,E){try{Module.dynCall_viiii(i,o,f,p,E)}catch(t){if(typeof t!="number"&&t!=="longjmp")throw t;Module.setThrew(1,0)}}Module.asmGlobalArg={Math,Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Float32Array,Float64Array,NaN:NaN,Infinity:Infinity},Module.asmLibraryArg={abort,assert,enlargeMemory,getTotalMemory,abortOnCannotGrowMemory,invoke_viiiii,invoke_vif,invoke_vid,invoke_fiff,invoke_vi,invoke_vii,invoke_ii,invoke_viddi,invoke_vidd,invoke_iiii,invoke_diii,invoke_di,invoke_iid,invoke_iii,invoke_viiddi,invoke_viiiiii,invoke_dii,invoke_i,invoke_iiiiii,invoke_viiid,invoke_viififi,invoke_viii,invoke_v,invoke_viid,invoke_idd,invoke_viiii,_emscripten_asm_const_iiiii,_emscripten_asm_const_iiidddddd,_emscripten_asm_const_iiiid,__nbind_reference_external,_emscripten_asm_const_iiiiiiii,_removeAccessorPrefix,_typeModule,__nbind_register_pool,__decorate,_llvm_stackrestore,___cxa_atexit,__extends,__nbind_get_value_object,__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,_emscripten_set_main_loop_timing,__nbind_register_primitive,__nbind_register_type,_emscripten_memcpy_big,__nbind_register_function,___setErrNo,__nbind_register_class,__nbind_finish,_abort,_nbind_value,_llvm_stacksave,___syscall54,_defineHidden,_emscripten_set_main_loop,_emscripten_get_now,__nbind_register_callback_signature,_emscripten_asm_const_iiiiii,__nbind_free_external,_emscripten_asm_const_iiii,_emscripten_asm_const_iiididi,___syscall6,_atexit,___syscall140,___syscall146,DYNAMICTOP_PTR,tempDoublePtr,ABORT,STACKTOP,STACK_MAX,cttz_i8,___dso_handle};var asm=function(i,o,f){var p=new i.Int8Array(f),E=new i.Int16Array(f),t=new i.Int32Array(f),k=new i.Uint8Array(f),L=new i.Uint16Array(f),N=new i.Uint32Array(f),C=new i.Float32Array(f),U=new i.Float64Array(f),q=o.DYNAMICTOP_PTR|0,W=o.tempDoublePtr|0,ne=o.ABORT|0,m=o.STACKTOP|0,we=o.STACK_MAX|0,Se=o.cttz_i8|0,he=o.___dso_handle|0,ge=0,ze=0,pe=0,Oe=0,le=i.NaN,Ue=i.Infinity,Ge=0,rt=0,wt=0,xt=0,$e=0,ft=0,Ke=i.Math.floor,jt=i.Math.abs,$t=i.Math.sqrt,at=i.Math.pow,Q=i.Math.cos,ae=i.Math.sin,Ce=i.Math.tan,ue=i.Math.acos,je=i.Math.asin,ct=i.Math.atan,At=i.Math.atan2,en=i.Math.exp,ln=i.Math.log,An=i.Math.ceil,nr=i.Math.imul,un=i.Math.min,Wt=i.Math.max,vr=i.Math.clz32,w=i.Math.fround,Ut=o.abort,Vn=o.assert,fr=o.enlargeMemory,Fr=o.getTotalMemory,ur=o.abortOnCannotGrowMemory,br=o.invoke_viiiii,Kt=o.invoke_vif,vu=o.invoke_vid,a0=o.invoke_fiff,So=o.invoke_vi,Go=o.invoke_vii,Os=o.invoke_ii,Yo=o.invoke_viddi,Ko=o.invoke_vidd,qt=o.invoke_iiii,_i=o.invoke_diii,eu=o.invoke_di,ai=o.invoke_iid,mr=o.invoke_iii,Xo=o.invoke_viiddi,W0=o.invoke_viiiiii,Lu=o.invoke_dii,V0=o.invoke_i,Hr=o.invoke_iiiiii,To=o.invoke_viiid,Co=o.invoke_viififi,L0=o.invoke_viii,tu=o.invoke_v,Si=o.invoke_viid,ks=o.invoke_idd,Hl=o.invoke_viiii,F0=o._emscripten_asm_const_iiiii,f0=o._emscripten_asm_const_iiidddddd,Pr=o._emscripten_asm_const_iiiid,Ei=o.__nbind_reference_external,G0=o._emscripten_asm_const_iiiiiiii,fi=o._removeAccessorPrefix,Zt=o._typeModule,Ln=o.__nbind_register_pool,Di=o.__decorate,ci=o._llvm_stackrestore,Ht=o.___cxa_atexit,Du=o.__extends,Yi=o.__nbind_get_value_object,Y0=o.__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,Ui=o._emscripten_set_main_loop_timing,Wl=o.__nbind_register_primitive,xo=o.__nbind_register_type,ni=o._emscripten_memcpy_big,oo=o.__nbind_register_function,Vl=o.___setErrNo,Ao=o.__nbind_register_class,Ms=o.__nbind_finish,Xn=o._abort,Qo=o._nbind_value,lo=o._llvm_stacksave,b0=o.___syscall54,yl=o._defineHidden,Ro=o._emscripten_set_main_loop,Et=o._emscripten_get_now,Pt=o.__nbind_register_callback_signature,Bn=o._emscripten_asm_const_iiiiii,Ir=o.__nbind_free_external,ji=o._emscripten_asm_const_iiii,Wr=o._emscripten_asm_const_iiididi,wu=o.___syscall6,c0=o._atexit,Ti=o.___syscall140,d0=o.___syscall146,as=w(0);let St=w(0);function so(e){e=e|0;var n=0;return n=m,m=m+e|0,m=m+15&-16,n|0}function Jo(){return m|0}function Gl(e){e=e|0,m=e}function Fu(e,n){e=e|0,n=n|0,m=e,we=n}function fs(e,n){e=e|0,n=n|0,ge||(ge=e,ze=n)}function P0(e){e=e|0,ft=e}function X(){return ft|0}function _e(){var e=0,n=0;pr(8104,8,400)|0,pr(8504,408,540)|0,e=9044,n=e+44|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));p[9088]=0,p[9089]=1,t[2273]=0,t[2274]=948,t[2275]=948,Ht(17,8104,he|0)|0}function Ne(e){e=e|0,ic(e+948|0)}function Me(e){return e=w(e),((cr(e)|0)&2147483647)>>>0>2139095040|0}function dt(e,n,r){e=e|0,n=n|0,r=r|0;e:do if(t[e+(n<<3)+4>>2]|0)e=e+(n<<3)|0;else{if((n|2|0)==3?t[e+60>>2]|0:0){e=e+56|0;break}switch(n|0){case 0:case 2:case 4:case 5:{if(t[e+52>>2]|0){e=e+48|0;break e}break}default:}if(t[e+68>>2]|0){e=e+64|0;break}else{e=(n|1|0)==5?948:r;break}}while(0);return e|0}function Hn(e){e=e|0;var n=0;return n=C_(1e3)|0,Dn(e,(n|0)!=0,2456),t[2276]=(t[2276]|0)+1,pr(n|0,8104,1e3)|0,p[e+2>>0]|0&&(t[n+4>>2]=2,t[n+12>>2]=4),t[n+976>>2]=e,n|0}function Dn(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;l=m,m=m+16|0,u=l,n||(t[u>>2]=r,_l(e,5,3197,u)),m=l}function or(){return Hn(956)|0}function mi(e){e=e|0;var n=0;return n=cn(1e3)|0,Su(n,e),Dn(t[e+976>>2]|0,1,2456),t[2276]=(t[2276]|0)+1,t[n+944>>2]=0,n|0}function Su(e,n){e=e|0,n=n|0;var r=0;pr(e|0,n|0,948)|0,na(e+948|0,n+948|0),r=e+960|0,e=n+960|0,n=r+40|0;do t[r>>2]=t[e>>2],r=r+4|0,e=e+4|0;while((r|0)<(n|0))}function bu(e){e=e|0;var n=0,r=0,u=0,l=0;if(n=e+944|0,r=t[n>>2]|0,r|0&&(Pu(r+948|0,e)|0,t[n>>2]=0),r=mu(e)|0,r|0){n=0;do t[(yi(e,n)|0)+944>>2]=0,n=n+1|0;while((n|0)!=(r|0))}r=e+948|0,u=t[r>>2]|0,l=e+952|0,n=t[l>>2]|0,(n|0)!=(u|0)&&(t[l>>2]=n+(~((n+-4-u|0)>>>2)<<2)),Oo(r),x_(e),t[2276]=(t[2276]|0)+-1}function Pu(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0;u=t[e>>2]|0,D=e+4|0,r=t[D>>2]|0,s=r;e:do if((u|0)==(r|0))l=u,h=4;else for(e=u;;){if((t[e>>2]|0)==(n|0)){l=e,h=4;break e}if(e=e+4|0,(e|0)==(r|0)){e=0;break}}while(0);return(h|0)==4&&((l|0)!=(r|0)?(u=l+4|0,e=s-u|0,n=e>>2,n&&(Iy(l|0,u|0,e|0)|0,r=t[D>>2]|0),e=l+(n<<2)|0,(r|0)==(e|0)||(t[D>>2]=r+(~((r+-4-e|0)>>>2)<<2)),e=1):e=0),e|0}function mu(e){return e=e|0,(t[e+952>>2]|0)-(t[e+948>>2]|0)>>2|0}function yi(e,n){e=e|0,n=n|0;var r=0;return r=t[e+948>>2]|0,(t[e+952>>2]|0)-r>>2>>>0>n>>>0?e=t[r+(n<<2)>>2]|0:e=0,e|0}function Oo(e){e=e|0;var n=0,r=0,u=0,l=0;u=m,m=m+32|0,n=u,l=t[e>>2]|0,r=(t[e+4>>2]|0)-l|0,((t[e+8>>2]|0)-l|0)>>>0>r>>>0&&(l=r>>2,Y(n,l,l,e+8|0),Qr(e,n),Jr(n)),m=u}function Tu(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0;M=mu(e)|0;do if(M|0){if((t[(yi(e,0)|0)+944>>2]|0)==(e|0)){if(!(Pu(e+948|0,n)|0))break;pr(n+400|0,8504,540)|0,t[n+944>>2]=0,Gn(e);break}h=t[(t[e+976>>2]|0)+12>>2]|0,D=e+948|0,S=(h|0)==0,r=0,s=0;do u=t[(t[D>>2]|0)+(s<<2)>>2]|0,(u|0)==(n|0)?Gn(e):(l=mi(u)|0,t[(t[D>>2]|0)+(r<<2)>>2]=l,t[l+944>>2]=e,S||$E[h&15](u,l,e,r),r=r+1|0),s=s+1|0;while((s|0)!=(M|0));if(r>>>0>>0){S=e+948|0,D=e+952|0,h=r,r=t[D>>2]|0;do s=(t[S>>2]|0)+(h<<2)|0,u=s+4|0,l=r-u|0,n=l>>2,n&&(Iy(s|0,u|0,l|0)|0,r=t[D>>2]|0),l=r,u=s+(n<<2)|0,(l|0)!=(u|0)&&(r=l+(~((l+-4-u|0)>>>2)<<2)|0,t[D>>2]=r),h=h+1|0;while((h|0)!=(M|0))}}while(0)}function ao(e){e=e|0;var n=0,r=0,u=0,l=0;Iu(e,(mu(e)|0)==0,2491),Iu(e,(t[e+944>>2]|0)==0,2545),n=e+948|0,r=t[n>>2]|0,u=e+952|0,l=t[u>>2]|0,(l|0)!=(r|0)&&(t[u>>2]=l+(~((l+-4-r|0)>>>2)<<2)),Oo(n),n=e+976|0,r=t[n>>2]|0,pr(e|0,8104,1e3)|0,p[r+2>>0]|0&&(t[e+4>>2]=2,t[e+12>>2]=4),t[n>>2]=r}function Iu(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;l=m,m=m+16|0,u=l,n||(t[u>>2]=r,sr(e,5,3197,u)),m=l}function Oa(){return t[2276]|0}function p0(){var e=0;return e=C_(20)|0,Zs((e|0)!=0,2592),t[2277]=(t[2277]|0)+1,t[e>>2]=t[239],t[e+4>>2]=t[240],t[e+8>>2]=t[241],t[e+12>>2]=t[242],t[e+16>>2]=t[243],e|0}function Zs(e,n){e=e|0,n=n|0;var r=0,u=0;u=m,m=m+16|0,r=u,e||(t[r>>2]=n,sr(0,5,3197,r)),m=u}function K0(e){e=e|0,x_(e),t[2277]=(t[2277]|0)+-1}function $s(e,n){e=e|0,n=n|0;var r=0;n?(Iu(e,(mu(e)|0)==0,2629),r=1):(r=0,n=0),t[e+964>>2]=n,t[e+988>>2]=r}function ka(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,s=u+8|0,l=u+4|0,h=u,t[l>>2]=n,Iu(e,(t[n+944>>2]|0)==0,2709),Iu(e,(t[e+964>>2]|0)==0,2763),cs(e),n=e+948|0,t[h>>2]=(t[n>>2]|0)+(r<<2),t[s>>2]=t[h>>2],w0(n,s,l)|0,t[(t[l>>2]|0)+944>>2]=e,Gn(e),m=u}function cs(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0;if(r=mu(e)|0,r|0?(t[(yi(e,0)|0)+944>>2]|0)!=(e|0):0){u=t[(t[e+976>>2]|0)+12>>2]|0,l=e+948|0,s=(u|0)==0,n=0;do h=t[(t[l>>2]|0)+(n<<2)>>2]|0,D=mi(h)|0,t[(t[l>>2]|0)+(n<<2)>>2]=D,t[D+944>>2]=e,s||$E[u&15](h,D,e,n),n=n+1|0;while((n|0)!=(r|0))}}function w0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0,Ee=0,ve=0,Qe=0,We=0;Qe=m,m=m+64|0,P=Qe+52|0,D=Qe+48|0,K=Qe+28|0,Pe=Qe+24|0,Ee=Qe+20|0,ve=Qe,u=t[e>>2]|0,s=u,n=u+((t[n>>2]|0)-s>>2<<2)|0,u=e+4|0,l=t[u>>2]|0,h=e+8|0;do if(l>>>0<(t[h>>2]|0)>>>0){if((n|0)==(l|0)){t[n>>2]=t[r>>2],t[u>>2]=(t[u>>2]|0)+4;break}Ur(e,n,l,n+4|0),n>>>0<=r>>>0&&(r=(t[u>>2]|0)>>>0>r>>>0?r+4|0:r),t[n>>2]=t[r>>2]}else{u=(l-s>>2)+1|0,l=x0(e)|0,l>>>0>>0&&li(e),O=t[e>>2]|0,M=(t[h>>2]|0)-O|0,s=M>>1,Y(ve,M>>2>>>0>>1>>>0?s>>>0>>0?u:s:l,n-O>>2,e+8|0),O=ve+8|0,u=t[O>>2]|0,s=ve+12|0,M=t[s>>2]|0,h=M,S=u;do if((u|0)==(M|0)){if(M=ve+4|0,u=t[M>>2]|0,We=t[ve>>2]|0,l=We,u>>>0<=We>>>0){u=h-l>>1,u=(u|0)==0?1:u,Y(K,u,u>>>2,t[ve+16>>2]|0),t[Pe>>2]=t[M>>2],t[Ee>>2]=t[O>>2],t[D>>2]=t[Pe>>2],t[P>>2]=t[Ee>>2],hi(K,D,P),u=t[ve>>2]|0,t[ve>>2]=t[K>>2],t[K>>2]=u,u=K+4|0,We=t[M>>2]|0,t[M>>2]=t[u>>2],t[u>>2]=We,u=K+8|0,We=t[O>>2]|0,t[O>>2]=t[u>>2],t[u>>2]=We,u=K+12|0,We=t[s>>2]|0,t[s>>2]=t[u>>2],t[u>>2]=We,Jr(K),u=t[O>>2]|0;break}s=u,h=((s-l>>2)+1|0)/-2|0,D=u+(h<<2)|0,l=S-s|0,s=l>>2,s&&(Iy(D|0,u|0,l|0)|0,u=t[M>>2]|0),We=D+(s<<2)|0,t[O>>2]=We,t[M>>2]=u+(h<<2),u=We}while(0);t[u>>2]=t[r>>2],t[O>>2]=(t[O>>2]|0)+4,n=lt(e,ve,n)|0,Jr(ve)}while(0);return m=Qe,n|0}function Gn(e){e=e|0;var n=0;do{if(n=e+984|0,p[n>>0]|0)break;p[n>>0]=1,C[e+504>>2]=w(le),e=t[e+944>>2]|0}while((e|0)!=0)}function ic(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-4-u|0)>>>2)<<2)),yt(r))}function ri(e){return e=e|0,t[e+944>>2]|0}function Gr(e){e=e|0,Iu(e,(t[e+964>>2]|0)!=0,2832),Gn(e)}function Yl(e){return e=e|0,(p[e+984>>0]|0)!=0|0}function ea(e,n){e=e|0,n=n|0,MI(e,n,400)|0&&(pr(e|0,n|0,400)|0,Gn(e))}function lf(e){e=e|0;var n=St;return n=w(C[e+44>>2]),e=Me(n)|0,w(e?w(0):n)}function Ns(e){e=e|0;var n=St;return n=w(C[e+48>>2]),Me(n)|0&&(n=p[(t[e+976>>2]|0)+2>>0]|0?w(1):w(0)),w(n)}function Ma(e,n){e=e|0,n=n|0,t[e+980>>2]=n}function Ls(e){return e=e|0,t[e+980>>2]|0}function h0(e,n){e=e|0,n=n|0;var r=0;r=e+4|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Gn(e))}function Fs(e){return e=e|0,t[e+4>>2]|0}function Ni(e,n){e=e|0,n=n|0;var r=0;r=e+8|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Gn(e))}function B(e){return e=e|0,t[e+8>>2]|0}function z(e,n){e=e|0,n=n|0;var r=0;r=e+12|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Gn(e))}function G(e){return e=e|0,t[e+12>>2]|0}function $(e,n){e=e|0,n=n|0;var r=0;r=e+16|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Gn(e))}function De(e){return e=e|0,t[e+16>>2]|0}function me(e,n){e=e|0,n=n|0;var r=0;r=e+20|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Gn(e))}function xe(e){return e=e|0,t[e+20>>2]|0}function Z(e,n){e=e|0,n=n|0;var r=0;r=e+24|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Gn(e))}function ke(e){return e=e|0,t[e+24>>2]|0}function Xe(e,n){e=e|0,n=n|0;var r=0;r=e+28|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Gn(e))}function ht(e){return e=e|0,t[e+28>>2]|0}function ie(e,n){e=e|0,n=n|0;var r=0;r=e+32|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Gn(e))}function qe(e){return e=e|0,t[e+32>>2]|0}function tt(e,n){e=e|0,n=n|0;var r=0;r=e+36|0,(t[r>>2]|0)!=(n|0)&&(t[r>>2]=n,Gn(e))}function Tt(e){return e=e|0,t[e+36>>2]|0}function kt(e,n){e=e|0,n=w(n);var r=0;r=e+40|0,w(C[r>>2])!=n&&(C[r>>2]=n,Gn(e))}function bt(e,n){e=e|0,n=w(n);var r=0;r=e+44|0,w(C[r>>2])!=n&&(C[r>>2]=n,Gn(e))}function on(e,n){e=e|0,n=w(n);var r=0;r=e+48|0,w(C[r>>2])!=n&&(C[r>>2]=n,Gn(e))}function tn(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=(s^1)&1,u=e+52|0,l=e+56|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function Lt(e,n){e=e|0,n=w(n);var r=0,u=0;u=e+52|0,r=e+56|0,(w(C[u>>2])==n?(t[r>>2]|0)==2:0)||(C[u>>2]=n,u=Me(n)|0,t[r>>2]=u?3:2,Gn(e))}function gn(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+52|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function lr(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Me(r)|0,u=(s^1)&1,l=e+132+(n<<3)|0,n=e+132+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Gn(e))}function Qn(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Me(r)|0,u=s?0:2,l=e+132+(n<<3)|0,n=e+132+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Gn(e))}function _r(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=n+132+(r<<3)|0,n=t[u+4>>2]|0,r=e,t[r>>2]=t[u>>2],t[r+4>>2]=n}function Cn(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Me(r)|0,u=(s^1)&1,l=e+60+(n<<3)|0,n=e+60+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Gn(e))}function Ar(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Me(r)|0,u=s?0:2,l=e+60+(n<<3)|0,n=e+60+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Gn(e))}function v0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=n+60+(r<<3)|0,n=t[u+4>>2]|0,r=e,t[r>>2]=t[u>>2],t[r+4>>2]=n}function Rr(e,n){e=e|0,n=n|0;var r=0;r=e+60+(n<<3)+4|0,(t[r>>2]|0)!=3&&(C[e+60+(n<<3)>>2]=w(le),t[r>>2]=3,Gn(e))}function nt(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Me(r)|0,u=(s^1)&1,l=e+204+(n<<3)|0,n=e+204+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Gn(e))}function _t(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Me(r)|0,u=s?0:2,l=e+204+(n<<3)|0,n=e+204+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Gn(e))}function Ze(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=n+204+(r<<3)|0,n=t[u+4>>2]|0,r=e,t[r>>2]=t[u>>2],t[r+4>>2]=n}function Ft(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0,s=0;s=Me(r)|0,u=(s^1)&1,l=e+276+(n<<3)|0,n=e+276+(n<<3)+4|0,(s|w(C[l>>2])==r?(t[n>>2]|0)==(u|0):0)||(C[l>>2]=r,t[n>>2]=u,Gn(e))}function nn(e,n){return e=e|0,n=n|0,w(C[e+276+(n<<3)>>2])}function sn(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=(s^1)&1,u=e+348|0,l=e+352|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function Yn(e,n){e=e|0,n=w(n);var r=0,u=0;u=e+348|0,r=e+352|0,(w(C[u>>2])==n?(t[r>>2]|0)==2:0)||(C[u>>2]=n,u=Me(n)|0,t[r>>2]=u?3:2,Gn(e))}function yr(e){e=e|0;var n=0;n=e+352|0,(t[n>>2]|0)!=3&&(C[e+348>>2]=w(le),t[n>>2]=3,Gn(e))}function nu(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+348|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function Cu(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=(s^1)&1,u=e+356|0,l=e+360|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function S0(e,n){e=e|0,n=w(n);var r=0,u=0;u=e+356|0,r=e+360|0,(w(C[u>>2])==n?(t[r>>2]|0)==2:0)||(C[u>>2]=n,u=Me(n)|0,t[r>>2]=u?3:2,Gn(e))}function X0(e){e=e|0;var n=0;n=e+360|0,(t[n>>2]|0)!=3&&(C[e+356>>2]=w(le),t[n>>2]=3,Gn(e))}function xu(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+356|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function di(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=(s^1)&1,u=e+364|0,l=e+368|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function ko(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=s?0:2,u=e+364|0,l=e+368|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function Zo(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+364|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function sf(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=(s^1)&1,u=e+372|0,l=e+376|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function gl(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=s?0:2,u=e+372|0,l=e+376|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function af(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+372|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function Mo(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=(s^1)&1,u=e+380|0,l=e+384|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function ds(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=s?0:2,u=e+380|0,l=e+384|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function bs(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+380|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function No(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=(s^1)&1,u=e+388|0,l=e+392|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function Lo(e,n){e=e|0,n=w(n);var r=0,u=0,l=0,s=0;s=Me(n)|0,r=s?0:2,u=e+388|0,l=e+392|0,(s|w(C[u>>2])==n?(t[l>>2]|0)==(r|0):0)||(C[u>>2]=n,t[l>>2]=r,Gn(e))}function ps(e,n){e=e|0,n=n|0;var r=0,u=0;u=n+388|0,r=t[u+4>>2]|0,n=e,t[n>>2]=t[u>>2],t[n+4>>2]=r}function Vu(e,n){e=e|0,n=w(n);var r=0;r=e+396|0,w(C[r>>2])!=n&&(C[r>>2]=n,Gn(e))}function yu(e){return e=e|0,w(C[e+396>>2])}function pi(e){return e=e|0,w(C[e+400>>2])}function T0(e){return e=e|0,w(C[e+404>>2])}function Q0(e){return e=e|0,w(C[e+408>>2])}function Fo(e){return e=e|0,w(C[e+412>>2])}function ta(e){return e=e|0,w(C[e+416>>2])}function Kl(e){return e=e|0,w(C[e+420>>2])}function Ki(e,n){switch(e=e|0,n=n|0,Iu(e,(n|0)<6,2918),n|0){case 0:{n=(t[e+496>>2]|0)==2?5:4;break}case 2:{n=(t[e+496>>2]|0)==2?4:5;break}default:}return w(C[e+424+(n<<2)>>2])}function Yr(e,n){switch(e=e|0,n=n|0,Iu(e,(n|0)<6,2918),n|0){case 0:{n=(t[e+496>>2]|0)==2?5:4;break}case 2:{n=(t[e+496>>2]|0)==2?4:5;break}default:}return w(C[e+448+(n<<2)>>2])}function fo(e,n){switch(e=e|0,n=n|0,Iu(e,(n|0)<6,2918),n|0){case 0:{n=(t[e+496>>2]|0)==2?5:4;break}case 2:{n=(t[e+496>>2]|0)==2?4:5;break}default:}return w(C[e+472+(n<<2)>>2])}function Oi(e,n){e=e|0,n=n|0;var r=0,u=St;return r=t[e+4>>2]|0,(r|0)==(t[n+4>>2]|0)?r?(u=w(C[e>>2]),e=w(jt(w(u-w(C[n>>2]))))>2]=0,t[u+4>>2]=0,t[u+8>>2]=0,Y0(u|0,e|0,n|0,0),sr(e,3,(p[u+11>>0]|0)<0?t[u>>2]|0:u,r),eB(u),m=r}function J0(e,n,r,u){e=w(e),n=w(n),r=r|0,u=u|0;var l=St;e=w(e*n),l=w(YE(e,w(1)));do if(gi(l,w(0))|0)e=w(e-l);else{if(e=w(e-l),gi(l,w(1))|0){e=w(e+w(1));break}if(r){e=w(e+w(1));break}u||(l>w(.5)?l=w(1):(u=gi(l,w(.5))|0,l=w(u?1:0)),e=w(e+l))}while(0);return w(e/n)}function Z0(e,n,r,u,l,s,h,D,S,M,O,P,K){e=e|0,n=w(n),r=r|0,u=w(u),l=l|0,s=w(s),h=h|0,D=w(D),S=w(S),M=w(M),O=w(O),P=w(P),K=K|0;var Pe=0,Ee=St,ve=St,Qe=St,We=St,st=St,Re=St;return S>2]),Ee!=w(0)):0)?(Qe=w(J0(n,Ee,0,0)),We=w(J0(u,Ee,0,0)),ve=w(J0(s,Ee,0,0)),Ee=w(J0(D,Ee,0,0))):(ve=s,Qe=n,Ee=D,We=u),(l|0)==(e|0)?Pe=gi(ve,Qe)|0:Pe=0,(h|0)==(r|0)?K=gi(Ee,We)|0:K=0,((Pe?0:(st=w(n-O),!(Te(e,st,S)|0)))?!(et(e,st,l,S)|0):0)?Pe=Ve(e,st,l,s,S)|0:Pe=1,((K?0:(Re=w(u-P),!(Te(r,Re,M)|0)))?!(et(r,Re,h,M)|0):0)?K=Ve(r,Re,h,D,M)|0:K=1,K=Pe&K),K|0}function Te(e,n,r){return e=e|0,n=w(n),r=w(r),(e|0)==1?e=gi(n,r)|0:e=0,e|0}function et(e,n,r,u){return e=e|0,n=w(n),r=r|0,u=w(u),(e|0)==2&(r|0)==0?n>=u?e=1:e=gi(n,u)|0:e=0,e|0}function Ve(e,n,r,u,l){return e=e|0,n=w(n),r=r|0,u=w(u),l=w(l),(e|0)==2&(r|0)==2&u>n?l<=n?e=1:e=gi(n,l)|0:e=0,e|0}function Gt(e,n,r,u,l,s,h,D,S,M,O){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=s|0,h=w(h),D=w(D),S=S|0,M=M|0,O=O|0;var P=0,K=0,Pe=0,Ee=0,ve=St,Qe=St,We=0,st=0,Re=0,Fe=0,Qt=0,Lr=0,Nn=0,mn=0,hr=0,kr=0,On=0,Zi=St,ts=St,ns=St,rs=0,Xs=0;On=m,m=m+160|0,mn=On+152|0,Nn=On+120|0,Lr=On+104|0,Re=On+72|0,Ee=On+56|0,Qt=On+8|0,st=On,Fe=(t[2279]|0)+1|0,t[2279]=Fe,hr=e+984|0,((p[hr>>0]|0)!=0?(t[e+512>>2]|0)!=(t[2278]|0):0)?We=4:(t[e+516>>2]|0)==(u|0)?kr=0:We=4,(We|0)==4&&(t[e+520>>2]=0,t[e+924>>2]=-1,t[e+928>>2]=-1,C[e+932>>2]=w(-1),C[e+936>>2]=w(-1),kr=1);e:do if(t[e+964>>2]|0)if(ve=w(Yt(e,2,h)),Qe=w(Yt(e,0,h)),P=e+916|0,ns=w(C[P>>2]),ts=w(C[e+920>>2]),Zi=w(C[e+932>>2]),Z0(l,n,s,r,t[e+924>>2]|0,ns,t[e+928>>2]|0,ts,Zi,w(C[e+936>>2]),ve,Qe,O)|0)We=22;else if(Pe=t[e+520>>2]|0,!Pe)We=21;else for(K=0;;){if(P=e+524+(K*24|0)|0,Zi=w(C[P>>2]),ts=w(C[e+524+(K*24|0)+4>>2]),ns=w(C[e+524+(K*24|0)+16>>2]),Z0(l,n,s,r,t[e+524+(K*24|0)+8>>2]|0,Zi,t[e+524+(K*24|0)+12>>2]|0,ts,ns,w(C[e+524+(K*24|0)+20>>2]),ve,Qe,O)|0){We=22;break e}if(K=K+1|0,K>>>0>=Pe>>>0){We=21;break}}else{if(S){if(P=e+916|0,!(gi(w(C[P>>2]),n)|0)){We=21;break}if(!(gi(w(C[e+920>>2]),r)|0)){We=21;break}if((t[e+924>>2]|0)!=(l|0)){We=21;break}P=(t[e+928>>2]|0)==(s|0)?P:0,We=22;break}if(Pe=t[e+520>>2]|0,!Pe)We=21;else for(K=0;;){if(P=e+524+(K*24|0)|0,((gi(w(C[P>>2]),n)|0?gi(w(C[e+524+(K*24|0)+4>>2]),r)|0:0)?(t[e+524+(K*24|0)+8>>2]|0)==(l|0):0)?(t[e+524+(K*24|0)+12>>2]|0)==(s|0):0){We=22;break e}if(K=K+1|0,K>>>0>=Pe>>>0){We=21;break}}}while(0);do if((We|0)==21)p[11697]|0?(P=0,We=28):(P=0,We=31);else if((We|0)==22){if(K=(p[11697]|0)!=0,!((P|0)!=0&(kr^1)))if(K){We=28;break}else{We=31;break}Ee=P+16|0,t[e+908>>2]=t[Ee>>2],Pe=P+20|0,t[e+912>>2]=t[Pe>>2],(p[11698]|0)==0|K^1||(t[st>>2]=Br(Fe)|0,t[st+4>>2]=Fe,sr(e,4,2972,st),K=t[e+972>>2]|0,K|0&&M1[K&127](e),l=wn(l,S)|0,s=wn(s,S)|0,Xs=+w(C[Ee>>2]),rs=+w(C[Pe>>2]),t[Qt>>2]=l,t[Qt+4>>2]=s,U[Qt+8>>3]=+n,U[Qt+16>>3]=+r,U[Qt+24>>3]=Xs,U[Qt+32>>3]=rs,t[Qt+40>>2]=M,sr(e,4,2989,Qt))}while(0);return(We|0)==28&&(K=Br(Fe)|0,t[Ee>>2]=K,t[Ee+4>>2]=Fe,t[Ee+8>>2]=kr?3047:11699,sr(e,4,3038,Ee),K=t[e+972>>2]|0,K|0&&M1[K&127](e),Qt=wn(l,S)|0,We=wn(s,S)|0,t[Re>>2]=Qt,t[Re+4>>2]=We,U[Re+8>>3]=+n,U[Re+16>>3]=+r,t[Re+24>>2]=M,sr(e,4,3049,Re),We=31),(We|0)==31&&(fu(e,n,r,u,l,s,h,D,S,O),p[11697]|0&&(K=t[2279]|0,Qt=Br(K)|0,t[Lr>>2]=Qt,t[Lr+4>>2]=K,t[Lr+8>>2]=kr?3047:11699,sr(e,4,3083,Lr),K=t[e+972>>2]|0,K|0&&M1[K&127](e),Qt=wn(l,S)|0,Lr=wn(s,S)|0,rs=+w(C[e+908>>2]),Xs=+w(C[e+912>>2]),t[Nn>>2]=Qt,t[Nn+4>>2]=Lr,U[Nn+8>>3]=rs,U[Nn+16>>3]=Xs,t[Nn+24>>2]=M,sr(e,4,3092,Nn)),t[e+516>>2]=u,P||(K=e+520|0,P=t[K>>2]|0,(P|0)==16&&(p[11697]|0&&sr(e,4,3124,mn),t[K>>2]=0,P=0),S?P=e+916|0:(t[K>>2]=P+1,P=e+524+(P*24|0)|0),C[P>>2]=n,C[P+4>>2]=r,t[P+8>>2]=l,t[P+12>>2]=s,t[P+16>>2]=t[e+908>>2],t[P+20>>2]=t[e+912>>2],P=0)),S&&(t[e+416>>2]=t[e+908>>2],t[e+420>>2]=t[e+912>>2],p[e+985>>0]=1,p[hr>>0]=0),t[2279]=(t[2279]|0)+-1,t[e+512>>2]=t[2278],m=On,kr|(P|0)==0|0}function Yt(e,n,r){e=e|0,n=n|0,r=w(r);var u=St;return u=w(Li(e,n,r)),w(u+w(A0(e,n,r)))}function sr(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=m,m=m+16|0,l=s,t[l>>2]=u,e?u=t[e+976>>2]|0:u=0,Ps(u,e,n,r,l),m=s}function Br(e){return e=e|0,(e>>>0>60?3201:3201+(60-e)|0)|0}function wn(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;return l=m,m=m+32|0,r=l+12|0,u=l,t[r>>2]=t[254],t[r+4>>2]=t[255],t[r+8>>2]=t[256],t[u>>2]=t[257],t[u+4>>2]=t[258],t[u+8>>2]=t[259],(e|0)>2?e=11699:e=t[(n?u:r)+(e<<2)>>2]|0,m=l,e|0}function fu(e,n,r,u,l,s,h,D,S,M){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=s|0,h=w(h),D=w(D),S=S|0,M=M|0;var O=0,P=0,K=0,Pe=0,Ee=St,ve=St,Qe=St,We=St,st=St,Re=St,Fe=St,Qt=0,Lr=0,Nn=0,mn=St,hr=St,kr=0,On=St,Zi=0,ts=0,ns=0,rs=0,Xs=0,$2=0,ed=0,Za=0,td=0,Oc=0,kc=0,nd=0,rd=0,id=0,si=0,$a=0,ud=0,zf=0,od=St,ld=St,Mc=St,Nc=St,qf=St,Il=0,Aa=0,As=0,ef=0,L1=0,F1=St,Lc=St,b1=St,P1=St,Bl=St,vl=St,tf=0,lu=St,I1=St,is=St,Hf=St,us=St,Wf=St,B1=0,U1=0,Vf=St,Ul=St,nf=0,j1=0,z1=0,q1=0,gr=St,Mu=0,ml=0,os=0,jl=0,Tr=0,Fn=0,rf=0,hn=St,H1=0,u0=0;rf=m,m=m+16|0,Il=rf+12|0,Aa=rf+8|0,As=rf+4|0,ef=rf,Iu(e,(l|0)==0|(Me(n)|0)^1,3326),Iu(e,(s|0)==0|(Me(r)|0)^1,3406),ml=El(e,u)|0,t[e+496>>2]=ml,Tr=I0(2,ml)|0,Fn=I0(0,ml)|0,C[e+440>>2]=w(Li(e,Tr,h)),C[e+444>>2]=w(A0(e,Tr,h)),C[e+428>>2]=w(Li(e,Fn,h)),C[e+436>>2]=w(A0(e,Fn,h)),C[e+464>>2]=w(R0(e,Tr)),C[e+468>>2]=w(co(e,Tr)),C[e+452>>2]=w(R0(e,Fn)),C[e+460>>2]=w(co(e,Fn)),C[e+488>>2]=w(Ru(e,Tr,h)),C[e+492>>2]=w(Yu(e,Tr,h)),C[e+476>>2]=w(Ru(e,Fn,h)),C[e+484>>2]=w(Yu(e,Fn,h));do if(t[e+964>>2]|0)Xl(e,n,r,l,s,h,D);else{if(os=e+948|0,jl=(t[e+952>>2]|0)-(t[os>>2]|0)>>2,!jl){hs(e,n,r,l,s,h,D);break}if(S?0:ra(e,n,r,l,s,h,D)|0)break;cs(e),$a=e+508|0,p[$a>>0]=0,Tr=I0(t[e+4>>2]|0,ml)|0,Fn=df(Tr,ml)|0,Mu=Fi(Tr)|0,ud=t[e+8>>2]|0,j1=e+28|0,zf=(t[j1>>2]|0)!=0,us=Mu?h:D,Vf=Mu?D:h,od=w(Ku(e,Tr,h)),ld=w(vs(e,Tr,h)),Ee=w(Ku(e,Fn,h)),Wf=w(wr(e,Tr,h)),Ul=w(wr(e,Fn,h)),Nn=Mu?l:s,nf=Mu?s:l,gr=Mu?Wf:Ul,st=Mu?Ul:Wf,Hf=w(Yt(e,2,h)),We=w(Yt(e,0,h)),ve=w(w(Sn(e+364|0,h))-gr),Qe=w(w(Sn(e+380|0,h))-gr),Re=w(w(Sn(e+372|0,D))-st),Fe=w(w(Sn(e+388|0,D))-st),Mc=Mu?ve:Re,Nc=Mu?Qe:Fe,Hf=w(n-Hf),n=w(Hf-gr),Me(n)|0?gr=n:gr=w(Eu(w(Yp(n,Qe)),ve)),I1=w(r-We),n=w(I1-st),Me(n)|0?is=n:is=w(Eu(w(Yp(n,Fe)),Re)),ve=Mu?gr:is,lu=Mu?is:gr;e:do if((Nn|0)==1)for(u=0,P=0;;){if(O=yi(e,P)|0,!u)(w(Xi(O))>w(0)?w(ru(O))>w(0):0)?u=O:u=0;else if($0(O)|0){Pe=0;break e}if(P=P+1|0,P>>>0>=jl>>>0){Pe=u;break}}else Pe=0;while(0);Qt=Pe+500|0,Lr=Pe+504|0,u=0,O=0,n=w(0),K=0;do{if(P=t[(t[os>>2]|0)+(K<<2)>>2]|0,(t[P+36>>2]|0)==1)Ci(P),p[P+985>>0]=1,p[P+984>>0]=0;else{Vr(P),S&&C0(P,El(P,ml)|0,ve,lu,gr);do if((t[P+24>>2]|0)!=1)if((P|0)==(Pe|0)){t[Qt>>2]=t[2278],C[Lr>>2]=w(0);break}else{Xr(e,P,gr,l,is,gr,is,s,ml,M);break}else O|0&&(t[O+960>>2]=P),t[P+960>>2]=0,O=P,u=(u|0)==0?P:u;while(0);vl=w(C[P+504>>2]),n=w(n+w(vl+w(Yt(P,Tr,gr))))}K=K+1|0}while((K|0)!=(jl|0));for(ns=n>ve,tf=zf&((Nn|0)==2&ns)?1:Nn,Zi=(nf|0)==1,Xs=Zi&(S^1),$2=(tf|0)==1,ed=(tf|0)==2,Za=976+(Tr<<2)|0,td=(nf|2|0)==2,id=Zi&(zf^1),Oc=1040+(Fn<<2)|0,kc=1040+(Tr<<2)|0,nd=976+(Fn<<2)|0,rd=(nf|0)!=1,ns=zf&((Nn|0)!=0&ns),ts=e+976|0,Zi=Zi^1,n=ve,kr=0,rs=0,vl=w(0),qf=w(0);;){e:do if(kr>>>0>>0)for(Lr=t[os>>2]|0,K=0,Fe=w(0),Re=w(0),Qe=w(0),ve=w(0),P=0,O=0,Pe=kr;;){if(Qt=t[Lr+(Pe<<2)>>2]|0,(t[Qt+36>>2]|0)!=1?(t[Qt+940>>2]=rs,(t[Qt+24>>2]|0)!=1):0){if(We=w(Yt(Qt,Tr,gr)),si=t[Za>>2]|0,r=w(Sn(Qt+380+(si<<3)|0,us)),st=w(C[Qt+504>>2]),r=w(Yp(r,st)),r=w(Eu(w(Sn(Qt+364+(si<<3)|0,us)),r)),zf&(K|0)!=0&w(We+w(Re+r))>n){s=K,We=Fe,Nn=Pe;break e}We=w(We+r),r=w(Re+We),We=w(Fe+We),$0(Qt)|0&&(Qe=w(Qe+w(Xi(Qt))),ve=w(ve-w(st*w(ru(Qt))))),O|0&&(t[O+960>>2]=Qt),t[Qt+960>>2]=0,K=K+1|0,O=Qt,P=(P|0)==0?Qt:P}else We=Fe,r=Re;if(Pe=Pe+1|0,Pe>>>0>>0)Fe=We,Re=r;else{s=K,Nn=Pe;break}}else s=0,We=w(0),Qe=w(0),ve=w(0),P=0,Nn=kr;while(0);si=Qe>w(0)&Qew(0)&veNc&((Me(Nc)|0)^1))n=Nc,si=51;else if(p[(t[ts>>2]|0)+3>>0]|0)si=51;else{if(mn!=w(0)?w(Xi(e))!=w(0):0){si=53;break}n=We,si=53}while(0);if((si|0)==51&&(si=0,Me(n)|0?si=53:(hr=w(n-We),On=n)),(si|0)==53&&(si=0,We>2]|0,Pe=hrw(0),Re=w(hr/mn),Qe=w(0),We=w(0),n=w(0),O=P;do r=w(Sn(O+380+(K<<3)|0,us)),ve=w(Sn(O+364+(K<<3)|0,us)),ve=w(Yp(r,w(Eu(ve,w(C[O+504>>2]))))),Pe?(r=w(ve*w(ru(O))),(r!=w(-0)?(hn=w(ve-w(st*r)),F1=w(Wn(O,Tr,hn,On,gr)),hn!=F1):0)&&(Qe=w(Qe-w(F1-ve)),n=w(n+r))):((Qt?(Lc=w(Xi(O)),Lc!=w(0)):0)?(hn=w(ve+w(Re*Lc)),b1=w(Wn(O,Tr,hn,On,gr)),hn!=b1):0)&&(Qe=w(Qe-w(b1-ve)),We=w(We-Lc)),O=t[O+960>>2]|0;while((O|0)!=0);if(n=w(Fe+n),ve=w(hr+Qe),L1)n=w(0);else{st=w(mn+We),Pe=t[Za>>2]|0,Qt=vew(0),st=w(ve/st),n=w(0);do{hn=w(Sn(P+380+(Pe<<3)|0,us)),Qe=w(Sn(P+364+(Pe<<3)|0,us)),Qe=w(Yp(hn,w(Eu(Qe,w(C[P+504>>2]))))),Qt?(hn=w(Qe*w(ru(P))),ve=w(-hn),hn!=w(-0)?(hn=w(Re*ve),ve=w(Wn(P,Tr,w(Qe+(Lr?ve:hn)),On,gr))):ve=Qe):(K?(P1=w(Xi(P)),P1!=w(0)):0)?ve=w(Wn(P,Tr,w(Qe+w(st*P1)),On,gr)):ve=Qe,n=w(n-w(ve-Qe)),We=w(Yt(P,Tr,gr)),r=w(Yt(P,Fn,gr)),ve=w(ve+We),C[Aa>>2]=ve,t[ef>>2]=1,Qe=w(C[P+396>>2]);e:do if(Me(Qe)|0){O=Me(lu)|0;do if(!O){if(ns|(Bu(P,Fn,lu)|0|Zi)||(Xu(e,P)|0)!=4||(t[(m0(P,Fn)|0)+4>>2]|0)==3||(t[(y0(P,Fn)|0)+4>>2]|0)==3)break;C[Il>>2]=lu,t[As>>2]=1;break e}while(0);if(Bu(P,Fn,lu)|0){O=t[P+992+(t[nd>>2]<<2)>>2]|0,hn=w(r+w(Sn(O,lu))),C[Il>>2]=hn,O=rd&(t[O+4>>2]|0)==2,t[As>>2]=((Me(hn)|0|O)^1)&1;break}else{C[Il>>2]=lu,t[As>>2]=O?0:2;break}}else hn=w(ve-We),mn=w(hn/Qe),hn=w(Qe*hn),t[As>>2]=1,C[Il>>2]=w(r+(Mu?mn:hn));while(0);kn(P,Tr,On,gr,ef,Aa),kn(P,Fn,lu,gr,As,Il);do if(Bu(P,Fn,lu)|0?0:(Xu(e,P)|0)==4){if((t[(m0(P,Fn)|0)+4>>2]|0)==3){O=0;break}O=(t[(y0(P,Fn)|0)+4>>2]|0)!=3}else O=0;while(0);hn=w(C[Aa>>2]),mn=w(C[Il>>2]),H1=t[ef>>2]|0,u0=t[As>>2]|0,Gt(P,Mu?hn:mn,Mu?mn:hn,ml,Mu?H1:u0,Mu?u0:H1,gr,is,S&(O^1),3488,M)|0,p[$a>>0]=p[$a>>0]|p[P+508>>0],P=t[P+960>>2]|0}while((P|0)!=0)}}else n=w(0);if(n=w(hr+n),u0=n>0]=u0|k[$a>>0],ed&n>w(0)?(O=t[Za>>2]|0,((t[e+364+(O<<3)+4>>2]|0)!=0?(Bl=w(Sn(e+364+(O<<3)|0,us)),Bl>=w(0)):0)?ve=w(Eu(w(0),w(Bl-w(On-n)))):ve=w(0)):ve=n,Qt=kr>>>0>>0,Qt){Pe=t[os>>2]|0,K=kr,O=0;do P=t[Pe+(K<<2)>>2]|0,t[P+24>>2]|0||(O=((t[(m0(P,Tr)|0)+4>>2]|0)==3&1)+O|0,O=O+((t[(y0(P,Tr)|0)+4>>2]|0)==3&1)|0),K=K+1|0;while((K|0)!=(Nn|0));O?(We=w(0),r=w(0)):si=101}else si=101;e:do if((si|0)==101)switch(si=0,ud|0){case 1:{O=0,We=w(ve*w(.5)),r=w(0);break e}case 2:{O=0,We=ve,r=w(0);break e}case 3:{if(s>>>0<=1){O=0,We=w(0),r=w(0);break e}r=w((s+-1|0)>>>0),O=0,We=w(0),r=w(w(Eu(ve,w(0)))/r);break e}case 5:{r=w(ve/w((s+1|0)>>>0)),O=0,We=r;break e}case 4:{r=w(ve/w(s>>>0)),O=0,We=w(r*w(.5));break e}default:{O=0,We=w(0),r=w(0);break e}}while(0);if(n=w(od+We),Qt){Qe=w(ve/w(O|0)),K=t[os>>2]|0,P=kr,ve=w(0);do{O=t[K+(P<<2)>>2]|0;e:do if((t[O+36>>2]|0)!=1){switch(t[O+24>>2]|0){case 1:{if(se(O,Tr)|0){if(!S)break e;hn=w(re(O,Tr,On)),hn=w(hn+w(R0(e,Tr))),hn=w(hn+w(Li(O,Tr,gr))),C[O+400+(t[kc>>2]<<2)>>2]=hn;break e}break}case 0:if(u0=(t[(m0(O,Tr)|0)+4>>2]|0)==3,hn=w(Qe+n),n=u0?hn:n,S&&(u0=O+400+(t[kc>>2]<<2)|0,C[u0>>2]=w(n+w(C[u0>>2]))),u0=(t[(y0(O,Tr)|0)+4>>2]|0)==3,hn=w(Qe+n),n=u0?hn:n,Xs){hn=w(r+w(Yt(O,Tr,gr))),ve=lu,n=w(n+w(hn+w(C[O+504>>2])));break e}else{n=w(n+w(r+w(Le(O,Tr,gr)))),ve=w(Eu(ve,w(Le(O,Fn,gr))));break e}default:}S&&(hn=w(We+w(R0(e,Tr))),u0=O+400+(t[kc>>2]<<2)|0,C[u0>>2]=w(hn+w(C[u0>>2])))}while(0);P=P+1|0}while((P|0)!=(Nn|0))}else ve=w(0);if(r=w(ld+n),td?We=w(w(Wn(e,Fn,w(Ul+ve),Vf,h))-Ul):We=lu,Qe=w(w(Wn(e,Fn,w(Ul+(id?lu:ve)),Vf,h))-Ul),Qt&S){P=kr;do{K=t[(t[os>>2]|0)+(P<<2)>>2]|0;do if((t[K+36>>2]|0)!=1){if((t[K+24>>2]|0)==1){if(se(K,Fn)|0){if(hn=w(re(K,Fn,lu)),hn=w(hn+w(R0(e,Fn))),hn=w(hn+w(Li(K,Fn,gr))),O=t[Oc>>2]|0,C[K+400+(O<<2)>>2]=hn,!(Me(hn)|0))break}else O=t[Oc>>2]|0;hn=w(R0(e,Fn)),C[K+400+(O<<2)>>2]=w(hn+w(Li(K,Fn,gr)));break}O=Xu(e,K)|0;do if((O|0)==4){if((t[(m0(K,Fn)|0)+4>>2]|0)==3){si=139;break}if((t[(y0(K,Fn)|0)+4>>2]|0)==3){si=139;break}if(Bu(K,Fn,lu)|0){n=Ee;break}H1=t[K+908+(t[Za>>2]<<2)>>2]|0,t[Il>>2]=H1,n=w(C[K+396>>2]),u0=Me(n)|0,ve=(t[W>>2]=H1,w(C[W>>2])),u0?n=Qe:(hr=w(Yt(K,Fn,gr)),hn=w(ve/n),n=w(n*ve),n=w(hr+(Mu?hn:n))),C[Aa>>2]=n,C[Il>>2]=w(w(Yt(K,Tr,gr))+ve),t[As>>2]=1,t[ef>>2]=1,kn(K,Tr,On,gr,As,Il),kn(K,Fn,lu,gr,ef,Aa),n=w(C[Il>>2]),hr=w(C[Aa>>2]),hn=Mu?n:hr,n=Mu?hr:n,u0=((Me(hn)|0)^1)&1,Gt(K,hn,n,ml,u0,((Me(n)|0)^1)&1,gr,is,1,3493,M)|0,n=Ee}else si=139;while(0);e:do if((si|0)==139){si=0,n=w(We-w(Le(K,Fn,gr)));do if((t[(m0(K,Fn)|0)+4>>2]|0)==3){if((t[(y0(K,Fn)|0)+4>>2]|0)!=3)break;n=w(Ee+w(Eu(w(0),w(n*w(.5)))));break e}while(0);if((t[(y0(K,Fn)|0)+4>>2]|0)==3){n=Ee;break}if((t[(m0(K,Fn)|0)+4>>2]|0)==3){n=w(Ee+w(Eu(w(0),n)));break}switch(O|0){case 1:{n=Ee;break e}case 2:{n=w(Ee+w(n*w(.5)));break e}default:{n=w(Ee+n);break e}}}while(0);hn=w(vl+n),u0=K+400+(t[Oc>>2]<<2)|0,C[u0>>2]=w(hn+w(C[u0>>2]))}while(0);P=P+1|0}while((P|0)!=(Nn|0))}if(vl=w(vl+Qe),qf=w(Eu(qf,r)),s=rs+1|0,Nn>>>0>=jl>>>0)break;n=On,kr=Nn,rs=s}do if(S){if(O=s>>>0>1,O?0:!(Ae(e)|0))break;if(!(Me(lu)|0)){n=w(lu-vl);e:do switch(t[e+12>>2]|0){case 3:{Ee=w(Ee+n),Re=w(0);break}case 2:{Ee=w(Ee+w(n*w(.5))),Re=w(0);break}case 4:{lu>vl?Re=w(n/w(s>>>0)):Re=w(0);break}case 7:if(lu>vl){Ee=w(Ee+w(n/w(s<<1>>>0))),Re=w(n/w(s>>>0)),Re=O?Re:w(0);break e}else{Ee=w(Ee+w(n*w(.5))),Re=w(0);break e}case 6:{Re=w(n/w(rs>>>0)),Re=lu>vl&O?Re:w(0);break}default:Re=w(0)}while(0);if(s|0)for(Qt=1040+(Fn<<2)|0,Lr=976+(Fn<<2)|0,Pe=0,P=0;;){e:do if(P>>>0>>0)for(ve=w(0),Qe=w(0),n=w(0),K=P;;){O=t[(t[os>>2]|0)+(K<<2)>>2]|0;do if((t[O+36>>2]|0)!=1?(t[O+24>>2]|0)==0:0){if((t[O+940>>2]|0)!=(Pe|0))break e;if(ot(O,Fn)|0&&(hn=w(C[O+908+(t[Lr>>2]<<2)>>2]),n=w(Eu(n,w(hn+w(Yt(O,Fn,gr)))))),(Xu(e,O)|0)!=5)break;Bl=w(vt(O)),Bl=w(Bl+w(Li(O,0,gr))),hn=w(C[O+912>>2]),hn=w(w(hn+w(Yt(O,0,gr)))-Bl),Bl=w(Eu(Qe,Bl)),hn=w(Eu(ve,hn)),ve=hn,Qe=Bl,n=w(Eu(n,w(Bl+hn)))}while(0);if(O=K+1|0,O>>>0>>0)K=O;else{K=O;break}}else Qe=w(0),n=w(0),K=P;while(0);if(st=w(Re+n),r=Ee,Ee=w(Ee+st),P>>>0>>0){We=w(r+Qe),O=P;do{P=t[(t[os>>2]|0)+(O<<2)>>2]|0;e:do if((t[P+36>>2]|0)!=1?(t[P+24>>2]|0)==0:0)switch(Xu(e,P)|0){case 1:{hn=w(r+w(Li(P,Fn,gr))),C[P+400+(t[Qt>>2]<<2)>>2]=hn;break e}case 3:{hn=w(w(Ee-w(A0(P,Fn,gr)))-w(C[P+908+(t[Lr>>2]<<2)>>2])),C[P+400+(t[Qt>>2]<<2)>>2]=hn;break e}case 2:{hn=w(r+w(w(st-w(C[P+908+(t[Lr>>2]<<2)>>2]))*w(.5))),C[P+400+(t[Qt>>2]<<2)>>2]=hn;break e}case 4:{if(hn=w(r+w(Li(P,Fn,gr))),C[P+400+(t[Qt>>2]<<2)>>2]=hn,Bu(P,Fn,lu)|0||(Mu?(ve=w(C[P+908>>2]),n=w(ve+w(Yt(P,Tr,gr))),Qe=st):(Qe=w(C[P+912>>2]),Qe=w(Qe+w(Yt(P,Fn,gr))),n=st,ve=w(C[P+908>>2])),gi(n,ve)|0?gi(Qe,w(C[P+912>>2]))|0:0))break e;Gt(P,n,Qe,ml,1,1,gr,is,1,3501,M)|0;break e}case 5:{C[P+404>>2]=w(w(We-w(vt(P)))+w(re(P,0,lu)));break e}default:break e}while(0);O=O+1|0}while((O|0)!=(K|0))}if(Pe=Pe+1|0,(Pe|0)==(s|0))break;P=K}}}while(0);if(C[e+908>>2]=w(Wn(e,2,Hf,h,h)),C[e+912>>2]=w(Wn(e,0,I1,D,h)),((tf|0)!=0?(B1=t[e+32>>2]|0,U1=(tf|0)==2,!(U1&(B1|0)!=2)):0)?U1&(B1|0)==2&&(n=w(Wf+On),n=w(Eu(w(Yp(n,w(Xt(e,Tr,qf,us)))),Wf)),si=198):(n=w(Wn(e,Tr,qf,us,h)),si=198),(si|0)==198&&(C[e+908+(t[976+(Tr<<2)>>2]<<2)>>2]=n),((nf|0)!=0?(z1=t[e+32>>2]|0,q1=(nf|0)==2,!(q1&(z1|0)!=2)):0)?q1&(z1|0)==2&&(n=w(Ul+lu),n=w(Eu(w(Yp(n,w(Xt(e,Fn,w(Ul+vl),Vf)))),Ul)),si=204):(n=w(Wn(e,Fn,w(Ul+vl),Vf,h)),si=204),(si|0)==204&&(C[e+908+(t[976+(Fn<<2)>>2]<<2)>>2]=n),S){if((t[j1>>2]|0)==2){P=976+(Fn<<2)|0,K=1040+(Fn<<2)|0,O=0;do Pe=yi(e,O)|0,t[Pe+24>>2]|0||(H1=t[P>>2]|0,hn=w(C[e+908+(H1<<2)>>2]),u0=Pe+400+(t[K>>2]<<2)|0,hn=w(hn-w(C[u0>>2])),C[u0>>2]=w(hn-w(C[Pe+908+(H1<<2)>>2]))),O=O+1|0;while((O|0)!=(jl|0))}if(u|0){O=Mu?tf:l;do xn(e,u,gr,O,is,ml,M),u=t[u+960>>2]|0;while((u|0)!=0)}if(O=(Tr|2|0)==3,P=(Fn|2|0)==3,O|P){u=0;do K=t[(t[os>>2]|0)+(u<<2)>>2]|0,(t[K+36>>2]|0)!=1&&(O&&_n(e,K,Tr),P&&_n(e,K,Fn)),u=u+1|0;while((u|0)!=(jl|0))}}}while(0);m=rf}function Gu(e,n){e=e|0,n=w(n);var r=0;Dn(e,n>=w(0),3147),r=n==w(0),C[e+4>>2]=r?w(0):n}function Kr(e,n,r,u){e=e|0,n=w(n),r=w(r),u=u|0;var l=St,s=St,h=0,D=0,S=0;t[2278]=(t[2278]|0)+1,Vr(e),Bu(e,2,n)|0?(l=w(Sn(t[e+992>>2]|0,n)),S=1,l=w(l+w(Yt(e,2,n)))):(l=w(Sn(e+380|0,n)),l>=w(0)?S=2:(S=((Me(n)|0)^1)&1,l=n)),Bu(e,0,r)|0?(s=w(Sn(t[e+996>>2]|0,r)),D=1,s=w(s+w(Yt(e,0,n)))):(s=w(Sn(e+388|0,r)),s>=w(0)?D=2:(D=((Me(r)|0)^1)&1,s=r)),h=e+976|0,(Gt(e,l,s,u,S,D,n,r,1,3189,t[h>>2]|0)|0?(C0(e,t[e+496>>2]|0,n,r,n),Au(e,w(C[(t[h>>2]|0)+4>>2]),w(0),w(0)),p[11696]|0):0)&&ff(e,7)}function Vr(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;D=m,m=m+32|0,h=D+24|0,s=D+16|0,u=D+8|0,l=D,r=0;do n=e+380+(r<<3)|0,((t[e+380+(r<<3)+4>>2]|0)!=0?(S=n,M=t[S+4>>2]|0,O=u,t[O>>2]=t[S>>2],t[O+4>>2]=M,O=e+364+(r<<3)|0,M=t[O+4>>2]|0,S=l,t[S>>2]=t[O>>2],t[S+4>>2]=M,t[s>>2]=t[u>>2],t[s+4>>2]=t[u+4>>2],t[h>>2]=t[l>>2],t[h+4>>2]=t[l+4>>2],Oi(s,h)|0):0)||(n=e+348+(r<<3)|0),t[e+992+(r<<2)>>2]=n,r=r+1|0;while((r|0)!=2);m=D}function Bu(e,n,r){e=e|0,n=n|0,r=w(r);var u=0;switch(e=t[e+992+(t[976+(n<<2)>>2]<<2)>>2]|0,t[e+4>>2]|0){case 0:case 3:{e=0;break}case 1:{w(C[e>>2])>2])>2]|0){case 2:{n=w(w(w(C[e>>2])*n)/w(100));break}case 1:{n=w(C[e>>2]);break}default:n=w(le)}return w(n)}function C0(e,n,r,u,l){e=e|0,n=n|0,r=w(r),u=w(u),l=w(l);var s=0,h=St;n=t[e+944>>2]|0?n:1,s=I0(t[e+4>>2]|0,n)|0,n=df(s,n)|0,r=w(Sr(e,s,r)),u=w(Sr(e,n,u)),h=w(r+w(Li(e,s,l))),C[e+400+(t[1040+(s<<2)>>2]<<2)>>2]=h,r=w(r+w(A0(e,s,l))),C[e+400+(t[1e3+(s<<2)>>2]<<2)>>2]=r,r=w(u+w(Li(e,n,l))),C[e+400+(t[1040+(n<<2)>>2]<<2)>>2]=r,l=w(u+w(A0(e,n,l))),C[e+400+(t[1e3+(n<<2)>>2]<<2)>>2]=l}function Au(e,n,r,u){e=e|0,n=w(n),r=w(r),u=w(u);var l=0,s=0,h=St,D=St,S=0,M=0,O=St,P=0,K=St,Pe=St,Ee=St,ve=St;if(n!=w(0)&&(l=e+400|0,ve=w(C[l>>2]),s=e+404|0,Ee=w(C[s>>2]),P=e+416|0,Pe=w(C[P>>2]),M=e+420|0,h=w(C[M>>2]),K=w(ve+r),O=w(Ee+u),u=w(K+Pe),D=w(O+h),S=(t[e+988>>2]|0)==1,C[l>>2]=w(J0(ve,n,0,S)),C[s>>2]=w(J0(Ee,n,0,S)),r=w(YE(w(Pe*n),w(1))),gi(r,w(0))|0?s=0:s=(gi(r,w(1))|0)^1,r=w(YE(w(h*n),w(1))),gi(r,w(0))|0?l=0:l=(gi(r,w(1))|0)^1,ve=w(J0(u,n,S&s,S&(s^1))),C[P>>2]=w(ve-w(J0(K,n,0,S))),ve=w(J0(D,n,S&l,S&(l^1))),C[M>>2]=w(ve-w(J0(O,n,0,S))),s=(t[e+952>>2]|0)-(t[e+948>>2]|0)>>2,s|0)){l=0;do Au(yi(e,l)|0,n,K,O),l=l+1|0;while((l|0)!=(s|0))}}function ei(e,n,r,u,l){switch(e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,r|0){case 5:case 0:{e=F8(t[489]|0,u,l)|0;break}default:e=QI(u,l)|0}return e|0}function _l(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;l=m,m=m+16|0,s=l,t[s>>2]=u,Ps(e,0,n,r,s),m=l}function Ps(e,n,r,u,l){if(e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,e=e|0?e:956,tS[t[e+8>>2]&1](e,n,r,u,l)|0,(r|0)==5)Xn();else return}function Uu(e,n,r){e=e|0,n=n|0,r=r|0,p[e+n>>0]=r&1}function na(e,n){e=e|0,n=n|0;var r=0,u=0;t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,r=n+4|0,u=(t[r>>2]|0)-(t[n>>2]|0)>>2,u|0&&(zi(e,u),Is(e,t[n>>2]|0,t[r>>2]|0,u))}function zi(e,n){e=e|0,n=n|0;var r=0;if((x0(e)|0)>>>0>>0&&li(e),n>>>0>1073741823)Xn();else{r=cn(n<<2)|0,t[e+4>>2]=r,t[e>>2]=r,t[e+8>>2]=r+(n<<2);return}}function Is(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,u=e+4|0,e=r-n|0,(e|0)>0&&(pr(t[u>>2]|0,n|0,e|0)|0,t[u>>2]=(t[u>>2]|0)+(e>>>2<<2))}function x0(e){return e=e|0,1073741823}function Li(e,n,r){return e=e|0,n=n|0,r=w(r),(Fi(n)|0?(t[e+96>>2]|0)!=0:0)?e=e+92|0:e=dt(e+60|0,t[1040+(n<<2)>>2]|0,992)|0,w($o(e,r))}function A0(e,n,r){return e=e|0,n=n|0,r=w(r),(Fi(n)|0?(t[e+104>>2]|0)!=0:0)?e=e+100|0:e=dt(e+60|0,t[1e3+(n<<2)>>2]|0,992)|0,w($o(e,r))}function Fi(e){return e=e|0,(e|1|0)==3|0}function $o(e,n){return e=e|0,n=w(n),(t[e+4>>2]|0)==3?n=w(0):n=w(Sn(e,n)),w(n)}function El(e,n){return e=e|0,n=n|0,e=t[e>>2]|0,((e|0)==0?(n|0)>1?n:1:e)|0}function I0(e,n){e=e|0,n=n|0;var r=0;e:do if((n|0)==2){switch(e|0){case 2:{e=3;break e}case 3:break;default:{r=4;break e}}e=2}else r=4;while(0);return e|0}function R0(e,n){e=e|0,n=n|0;var r=St;return((Fi(n)|0?(t[e+312>>2]|0)!=0:0)?(r=w(C[e+308>>2]),r>=w(0)):0)||(r=w(Eu(w(C[(dt(e+276|0,t[1040+(n<<2)>>2]|0,992)|0)>>2]),w(0)))),w(r)}function co(e,n){e=e|0,n=n|0;var r=St;return((Fi(n)|0?(t[e+320>>2]|0)!=0:0)?(r=w(C[e+316>>2]),r>=w(0)):0)||(r=w(Eu(w(C[(dt(e+276|0,t[1e3+(n<<2)>>2]|0,992)|0)>>2]),w(0)))),w(r)}function Ru(e,n,r){e=e|0,n=n|0,r=w(r);var u=St;return((Fi(n)|0?(t[e+240>>2]|0)!=0:0)?(u=w(Sn(e+236|0,r)),u>=w(0)):0)||(u=w(Eu(w(Sn(dt(e+204|0,t[1040+(n<<2)>>2]|0,992)|0,r)),w(0)))),w(u)}function Yu(e,n,r){e=e|0,n=n|0,r=w(r);var u=St;return((Fi(n)|0?(t[e+248>>2]|0)!=0:0)?(u=w(Sn(e+244|0,r)),u>=w(0)):0)||(u=w(Eu(w(Sn(dt(e+204|0,t[1e3+(n<<2)>>2]|0,992)|0,r)),w(0)))),w(u)}function Xl(e,n,r,u,l,s,h){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=w(s),h=w(h);var D=St,S=St,M=St,O=St,P=St,K=St,Pe=0,Ee=0,ve=0;ve=m,m=m+16|0,Pe=ve,Ee=e+964|0,Iu(e,(t[Ee>>2]|0)!=0,3519),D=w(wr(e,2,n)),S=w(wr(e,0,n)),M=w(Yt(e,2,n)),O=w(Yt(e,0,n)),Me(n)|0?P=n:P=w(Eu(w(0),w(w(n-M)-D))),Me(r)|0?K=r:K=w(Eu(w(0),w(w(r-O)-S))),(u|0)==1&(l|0)==1?(C[e+908>>2]=w(Wn(e,2,w(n-M),s,s)),n=w(Wn(e,0,w(r-O),h,s))):(nS[t[Ee>>2]&1](Pe,e,P,u,K,l),P=w(D+w(C[Pe>>2])),K=w(n-M),C[e+908>>2]=w(Wn(e,2,(u|2|0)==2?P:K,s,s)),K=w(S+w(C[Pe+4>>2])),n=w(r-O),n=w(Wn(e,0,(l|2|0)==2?K:n,h,s))),C[e+912>>2]=n,m=ve}function hs(e,n,r,u,l,s,h){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=w(s),h=w(h);var D=St,S=St,M=St,O=St;M=w(wr(e,2,s)),D=w(wr(e,0,s)),O=w(Yt(e,2,s)),S=w(Yt(e,0,s)),n=w(n-O),C[e+908>>2]=w(Wn(e,2,(u|2|0)==2?M:n,s,s)),r=w(r-S),C[e+912>>2]=w(Wn(e,0,(l|2|0)==2?D:r,h,s))}function ra(e,n,r,u,l,s,h){e=e|0,n=w(n),r=w(r),u=u|0,l=l|0,s=w(s),h=w(h);var D=0,S=St,M=St;return D=(u|0)==2,((n<=w(0)&D?0:!(r<=w(0)&(l|0)==2))?!((u|0)==1&(l|0)==1):0)?e=0:(S=w(Yt(e,0,s)),M=w(Yt(e,2,s)),D=n>2]=w(Wn(e,2,D?w(0):n,s,s)),n=w(r-S),D=r>2]=w(Wn(e,0,D?w(0):n,h,s)),e=1),e|0}function df(e,n){return e=e|0,n=n|0,yn(e)|0?e=I0(2,n)|0:e=0,e|0}function Ku(e,n,r){return e=e|0,n=n|0,r=w(r),r=w(Ru(e,n,r)),w(r+w(R0(e,n)))}function vs(e,n,r){return e=e|0,n=n|0,r=w(r),r=w(Yu(e,n,r)),w(r+w(co(e,n)))}function wr(e,n,r){e=e|0,n=n|0,r=w(r);var u=St;return u=w(Ku(e,n,r)),w(u+w(vs(e,n,r)))}function $0(e){return e=e|0,t[e+24>>2]|0?e=0:w(Xi(e))!=w(0)?e=1:e=w(ru(e))!=w(0),e|0}function Xi(e){e=e|0;var n=St;if(t[e+944>>2]|0){if(n=w(C[e+44>>2]),Me(n)|0)return n=w(C[e+40>>2]),e=n>w(0)&((Me(n)|0)^1),w(e?n:w(0))}else n=w(0);return w(n)}function ru(e){e=e|0;var n=St,r=0,u=St;do if(t[e+944>>2]|0){if(n=w(C[e+48>>2]),Me(n)|0){if(r=p[(t[e+976>>2]|0)+2>>0]|0,r<<24>>24==0?(u=w(C[e+40>>2]),u>24?w(1):w(0)}}else n=w(0);while(0);return w(n)}function Ci(e){e=e|0;var n=0,r=0;if(Iv(e+400|0,0,540)|0,p[e+985>>0]=1,cs(e),r=mu(e)|0,r|0){n=e+948|0,e=0;do Ci(t[(t[n>>2]|0)+(e<<2)>>2]|0),e=e+1|0;while((e|0)!=(r|0))}}function Xr(e,n,r,u,l,s,h,D,S,M){e=e|0,n=n|0,r=w(r),u=u|0,l=w(l),s=w(s),h=w(h),D=D|0,S=S|0,M=M|0;var O=0,P=St,K=0,Pe=0,Ee=St,ve=St,Qe=0,We=St,st=0,Re=St,Fe=0,Qt=0,Lr=0,Nn=0,mn=0,hr=0,kr=0,On=0,Zi=0,ts=0;Zi=m,m=m+16|0,Lr=Zi+12|0,Nn=Zi+8|0,mn=Zi+4|0,hr=Zi,On=I0(t[e+4>>2]|0,S)|0,Fe=Fi(On)|0,P=w(Sn(En(n)|0,Fe?s:h)),Qt=Bu(n,2,s)|0,kr=Bu(n,0,h)|0;do if(Me(P)|0?0:!(Me(Fe?r:l)|0)){if(O=n+504|0,!(Me(w(C[O>>2]))|0)&&(!(er(t[n+976>>2]|0,0)|0)||(t[n+500>>2]|0)==(t[2278]|0)))break;C[O>>2]=w(Eu(P,w(wr(n,On,s))))}else K=7;while(0);do if((K|0)==7){if(st=Fe^1,!(st|Qt^1)){h=w(Sn(t[n+992>>2]|0,s)),C[n+504>>2]=w(Eu(h,w(wr(n,2,s))));break}if(!(Fe|kr^1)){h=w(Sn(t[n+996>>2]|0,h)),C[n+504>>2]=w(Eu(h,w(wr(n,0,s))));break}C[Lr>>2]=w(le),C[Nn>>2]=w(le),t[mn>>2]=0,t[hr>>2]=0,We=w(Yt(n,2,s)),Re=w(Yt(n,0,s)),Qt?(Ee=w(We+w(Sn(t[n+992>>2]|0,s))),C[Lr>>2]=Ee,t[mn>>2]=1,Pe=1):(Pe=0,Ee=w(le)),kr?(P=w(Re+w(Sn(t[n+996>>2]|0,h))),C[Nn>>2]=P,t[hr>>2]=1,O=1):(O=0,P=w(le)),K=t[e+32>>2]|0,Fe&(K|0)==2?K=2:(Me(Ee)|0?!(Me(r)|0):0)&&(C[Lr>>2]=r,t[mn>>2]=2,Pe=2,Ee=r),(((K|0)==2&st?0:Me(P)|0)?!(Me(l)|0):0)&&(C[Nn>>2]=l,t[hr>>2]=2,O=2,P=l),ve=w(C[n+396>>2]),Qe=Me(ve)|0;do if(Qe)K=Pe;else{if((Pe|0)==1&st){C[Nn>>2]=w(w(Ee-We)/ve),t[hr>>2]=1,O=1,K=1;break}Fe&(O|0)==1?(C[Lr>>2]=w(ve*w(P-Re)),t[mn>>2]=1,O=1,K=1):K=Pe}while(0);ts=Me(r)|0,Pe=(Xu(e,n)|0)!=4,(Fe|Qt|((u|0)!=1|ts)|(Pe|(K|0)==1)?0:(C[Lr>>2]=r,t[mn>>2]=1,!Qe))&&(C[Nn>>2]=w(w(r-We)/ve),t[hr>>2]=1,O=1),(kr|st|((D|0)!=1|(Me(l)|0))|(Pe|(O|0)==1)?0:(C[Nn>>2]=l,t[hr>>2]=1,!Qe))&&(C[Lr>>2]=w(ve*w(l-Re)),t[mn>>2]=1),kn(n,2,s,s,mn,Lr),kn(n,0,h,s,hr,Nn),r=w(C[Lr>>2]),l=w(C[Nn>>2]),Gt(n,r,l,S,t[mn>>2]|0,t[hr>>2]|0,s,h,0,3565,M)|0,h=w(C[n+908+(t[976+(On<<2)>>2]<<2)>>2]),C[n+504>>2]=w(Eu(h,w(wr(n,On,s))))}while(0);t[n+500>>2]=t[2278],m=Zi}function Wn(e,n,r,u,l){return e=e|0,n=n|0,r=w(r),u=w(u),l=w(l),u=w(Xt(e,n,r,u)),w(Eu(u,w(wr(e,n,l))))}function Xu(e,n){return e=e|0,n=n|0,n=n+20|0,n=t[((t[n>>2]|0)==0?e+16|0:n)>>2]|0,((n|0)==5?yn(t[e+4>>2]|0)|0:0)&&(n=1),n|0}function m0(e,n){return e=e|0,n=n|0,(Fi(n)|0?(t[e+96>>2]|0)!=0:0)?n=4:n=t[1040+(n<<2)>>2]|0,e+60+(n<<3)|0}function y0(e,n){return e=e|0,n=n|0,(Fi(n)|0?(t[e+104>>2]|0)!=0:0)?n=5:n=t[1e3+(n<<2)>>2]|0,e+60+(n<<3)|0}function kn(e,n,r,u,l,s){switch(e=e|0,n=n|0,r=w(r),u=w(u),l=l|0,s=s|0,r=w(Sn(e+380+(t[976+(n<<2)>>2]<<3)|0,r)),r=w(r+w(Yt(e,n,u))),t[l>>2]|0){case 2:case 1:{l=Me(r)|0,u=w(C[s>>2]),C[s>>2]=l|u>2]=2,C[s>>2]=r);break}default:}}function se(e,n){return e=e|0,n=n|0,e=e+132|0,(Fi(n)|0?(t[(dt(e,4,948)|0)+4>>2]|0)!=0:0)?e=1:e=(t[(dt(e,t[1040+(n<<2)>>2]|0,948)|0)+4>>2]|0)!=0,e|0}function re(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0;return e=e+132|0,(Fi(n)|0?(u=dt(e,4,948)|0,(t[u+4>>2]|0)!=0):0)?l=4:(u=dt(e,t[1040+(n<<2)>>2]|0,948)|0,t[u+4>>2]|0?l=4:r=w(0)),(l|0)==4&&(r=w(Sn(u,r))),w(r)}function Le(e,n,r){e=e|0,n=n|0,r=w(r);var u=St;return u=w(C[e+908+(t[976+(n<<2)>>2]<<2)>>2]),u=w(u+w(Li(e,n,r))),w(u+w(A0(e,n,r)))}function Ae(e){e=e|0;var n=0,r=0,u=0;e:do if(yn(t[e+4>>2]|0)|0)n=0;else if((t[e+16>>2]|0)!=5)if(r=mu(e)|0,!r)n=0;else for(n=0;;){if(u=yi(e,n)|0,(t[u+24>>2]|0)==0?(t[u+20>>2]|0)==5:0){n=1;break e}if(n=n+1|0,n>>>0>=r>>>0){n=0;break}}else n=1;while(0);return n|0}function ot(e,n){e=e|0,n=n|0;var r=St;return r=w(C[e+908+(t[976+(n<<2)>>2]<<2)>>2]),r>=w(0)&((Me(r)|0)^1)|0}function vt(e){e=e|0;var n=St,r=0,u=0,l=0,s=0,h=0,D=0,S=St;if(r=t[e+968>>2]|0,r)S=w(C[e+908>>2]),n=w(C[e+912>>2]),n=w(J8[r&0](e,S,n)),Iu(e,(Me(n)|0)^1,3573);else{s=mu(e)|0;do if(s|0){for(r=0,l=0;;){if(u=yi(e,l)|0,t[u+940>>2]|0){h=8;break}if((t[u+24>>2]|0)!=1)if(D=(Xu(e,u)|0)==5,D){r=u;break}else r=(r|0)==0?u:r;if(l=l+1|0,l>>>0>=s>>>0){h=8;break}}if((h|0)==8&&!r)break;return n=w(vt(r)),w(n+w(C[r+404>>2]))}while(0);n=w(C[e+912>>2])}return w(n)}function Xt(e,n,r,u){e=e|0,n=n|0,r=w(r),u=w(u);var l=St,s=0;return yn(n)|0?(n=1,s=3):Fi(n)|0?(n=0,s=3):(u=w(le),l=w(le)),(s|0)==3&&(l=w(Sn(e+364+(n<<3)|0,u)),u=w(Sn(e+380+(n<<3)|0,u))),s=u=w(0)&((Me(u)|0)^1)),r=s?u:r,s=l>=w(0)&((Me(l)|0)^1)&r>2]|0,s)|0,Ee=df(Qe,s)|0,ve=Fi(Qe)|0,P=w(Yt(n,2,r)),K=w(Yt(n,0,r)),Bu(n,2,r)|0?D=w(P+w(Sn(t[n+992>>2]|0,r))):(se(n,2)|0?It(n,2)|0:0)?(D=w(C[e+908>>2]),S=w(R0(e,2)),S=w(D-w(S+w(co(e,2)))),D=w(re(n,2,r)),D=w(Wn(n,2,w(S-w(D+w(xi(n,2,r)))),r,r))):D=w(le),Bu(n,0,l)|0?S=w(K+w(Sn(t[n+996>>2]|0,l))):(se(n,0)|0?It(n,0)|0:0)?(S=w(C[e+912>>2]),st=w(R0(e,0)),st=w(S-w(st+w(co(e,0)))),S=w(re(n,0,l)),S=w(Wn(n,0,w(st-w(S+w(xi(n,0,l)))),l,r))):S=w(le),M=Me(D)|0,O=Me(S)|0;do if(M^O?(Pe=w(C[n+396>>2]),!(Me(Pe)|0)):0)if(M){D=w(P+w(w(S-K)*Pe));break}else{st=w(K+w(w(D-P)/Pe)),S=O?st:S;break}while(0);O=Me(D)|0,M=Me(S)|0,O|M&&(Re=(O^1)&1,u=r>w(0)&((u|0)!=0&O),D=ve?D:u?r:D,Gt(n,D,S,s,ve?Re:u?2:Re,O&(M^1)&1,D,S,0,3623,h)|0,D=w(C[n+908>>2]),D=w(D+w(Yt(n,2,r))),S=w(C[n+912>>2]),S=w(S+w(Yt(n,0,r)))),Gt(n,D,S,s,1,1,D,S,1,3635,h)|0,(It(n,Qe)|0?!(se(n,Qe)|0):0)?(Re=t[976+(Qe<<2)>>2]|0,st=w(C[e+908+(Re<<2)>>2]),st=w(st-w(C[n+908+(Re<<2)>>2])),st=w(st-w(co(e,Qe))),st=w(st-w(A0(n,Qe,r))),st=w(st-w(xi(n,Qe,ve?r:l))),C[n+400+(t[1040+(Qe<<2)>>2]<<2)>>2]=st):We=21;do if((We|0)==21){if(se(n,Qe)|0?0:(t[e+8>>2]|0)==1){Re=t[976+(Qe<<2)>>2]|0,st=w(C[e+908+(Re<<2)>>2]),st=w(w(st-w(C[n+908+(Re<<2)>>2]))*w(.5)),C[n+400+(t[1040+(Qe<<2)>>2]<<2)>>2]=st;break}(se(n,Qe)|0?0:(t[e+8>>2]|0)==2)&&(Re=t[976+(Qe<<2)>>2]|0,st=w(C[e+908+(Re<<2)>>2]),st=w(st-w(C[n+908+(Re<<2)>>2])),C[n+400+(t[1040+(Qe<<2)>>2]<<2)>>2]=st)}while(0);(It(n,Ee)|0?!(se(n,Ee)|0):0)?(Re=t[976+(Ee<<2)>>2]|0,st=w(C[e+908+(Re<<2)>>2]),st=w(st-w(C[n+908+(Re<<2)>>2])),st=w(st-w(co(e,Ee))),st=w(st-w(A0(n,Ee,r))),st=w(st-w(xi(n,Ee,ve?l:r))),C[n+400+(t[1040+(Ee<<2)>>2]<<2)>>2]=st):We=30;do if((We|0)==30?!(se(n,Ee)|0):0){if((Xu(e,n)|0)==2){Re=t[976+(Ee<<2)>>2]|0,st=w(C[e+908+(Re<<2)>>2]),st=w(w(st-w(C[n+908+(Re<<2)>>2]))*w(.5)),C[n+400+(t[1040+(Ee<<2)>>2]<<2)>>2]=st;break}Re=(Xu(e,n)|0)==3,Re^(t[e+28>>2]|0)==2&&(Re=t[976+(Ee<<2)>>2]|0,st=w(C[e+908+(Re<<2)>>2]),st=w(st-w(C[n+908+(Re<<2)>>2])),C[n+400+(t[1040+(Ee<<2)>>2]<<2)>>2]=st)}while(0)}function _n(e,n,r){e=e|0,n=n|0,r=r|0;var u=St,l=0;l=t[976+(r<<2)>>2]|0,u=w(C[n+908+(l<<2)>>2]),u=w(w(C[e+908+(l<<2)>>2])-u),u=w(u-w(C[n+400+(t[1040+(r<<2)>>2]<<2)>>2])),C[n+400+(t[1e3+(r<<2)>>2]<<2)>>2]=u}function yn(e){return e=e|0,(e|1|0)==1|0}function En(e){e=e|0;var n=St;switch(t[e+56>>2]|0){case 0:case 3:{n=w(C[e+40>>2]),n>w(0)&((Me(n)|0)^1)?e=p[(t[e+976>>2]|0)+2>>0]|0?1056:992:e=1056;break}default:e=e+52|0}return e|0}function er(e,n){return e=e|0,n=n|0,(p[e+n>>0]|0)!=0|0}function It(e,n){return e=e|0,n=n|0,e=e+132|0,(Fi(n)|0?(t[(dt(e,5,948)|0)+4>>2]|0)!=0:0)?e=1:e=(t[(dt(e,t[1e3+(n<<2)>>2]|0,948)|0)+4>>2]|0)!=0,e|0}function xi(e,n,r){e=e|0,n=n|0,r=w(r);var u=0,l=0;return e=e+132|0,(Fi(n)|0?(u=dt(e,5,948)|0,(t[u+4>>2]|0)!=0):0)?l=4:(u=dt(e,t[1e3+(n<<2)>>2]|0,948)|0,t[u+4>>2]|0?l=4:r=w(0)),(l|0)==4&&(r=w(Sn(u,r))),w(r)}function Sr(e,n,r){return e=e|0,n=n|0,r=w(r),se(e,n)|0?r=w(re(e,n,r)):r=w(-w(xi(e,n,r))),w(r)}function cr(e){return e=w(e),C[W>>2]=e,t[W>>2]|0|0}function Y(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>1073741823)Xn();else{l=cn(n<<2)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<2)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<2)}function Qr(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>2)<<2)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Jr(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-4-n|0)>>>2)<<2)),e=t[e>>2]|0,e|0&&yt(e)}function Ur(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;if(h=e+4|0,D=t[h>>2]|0,l=D-u|0,s=l>>2,e=n+(s<<2)|0,e>>>0>>0){u=D;do t[u>>2]=t[e>>2],e=e+4|0,u=(t[h>>2]|0)+4|0,t[h>>2]=u;while(e>>>0>>0)}s|0&&Iy(D+(0-s<<2)|0,n|0,l|0)|0}function lt(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0;return D=n+4|0,S=t[D>>2]|0,l=t[e>>2]|0,h=r,s=h-l|0,u=S+(0-(s>>2)<<2)|0,t[D>>2]=u,(s|0)>0&&pr(u|0,l|0,s|0)|0,l=e+4|0,s=n+8|0,u=(t[l>>2]|0)-h|0,(u|0)>0&&(pr(t[s>>2]|0,r|0,u|0)|0,t[s>>2]=(t[s>>2]|0)+(u>>>2<<2)),h=t[e>>2]|0,t[e>>2]=t[D>>2],t[D>>2]=h,h=t[l>>2]|0,t[l>>2]=t[s>>2],t[s>>2]=h,h=e+8|0,r=n+12|0,e=t[h>>2]|0,t[h>>2]=t[r>>2],t[r>>2]=e,t[n>>2]=t[D>>2],S|0}function hi(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;if(h=t[n>>2]|0,s=t[r>>2]|0,(h|0)!=(s|0)){l=e+8|0,r=((s+-4-h|0)>>>2)+1|0,e=h,u=t[l>>2]|0;do t[u>>2]=t[e>>2],u=(t[l>>2]|0)+4|0,t[l>>2]=u,e=e+4|0;while((e|0)!=(s|0));t[n>>2]=h+(r<<2)}}function Qi(){_e()}function g0(){var e=0;return e=cn(4)|0,bn(e),e|0}function bn(e){e=e|0,t[e>>2]=p0()|0}function Qu(e){e=e|0,e|0&&(eo(e),yt(e))}function eo(e){e=e|0,K0(t[e>>2]|0)}function po(e,n,r){e=e|0,n=n|0,r=r|0,Uu(t[e>>2]|0,n,r)}function Ju(e,n){e=e|0,n=w(n),Gu(t[e>>2]|0,n)}function bo(e,n){return e=e|0,n=n|0,er(t[e>>2]|0,n)|0}function to(){var e=0;return e=cn(8)|0,Na(e,0),e|0}function Na(e,n){e=e|0,n=n|0,n?n=Hn(t[n>>2]|0)|0:n=or()|0,t[e>>2]=n,t[e+4>>2]=0,Ma(n,e)}function pf(e){e=e|0;var n=0;return n=cn(8)|0,Na(n,e),n|0}function uc(e){e=e|0,e|0&&(ms(e),yt(e))}function ms(e){e=e|0;var n=0;bu(t[e>>2]|0),n=e+4|0,e=t[n>>2]|0,t[n>>2]=0,e|0&&(ia(e),yt(e))}function ia(e){e=e|0,B0(e)}function B0(e){e=e|0,e=t[e>>2]|0,e|0&&Ir(e|0)}function oc(e){return e=e|0,Ls(e)|0}function La(e){e=e|0;var n=0,r=0;r=e+4|0,n=t[r>>2]|0,t[r>>2]=0,n|0&&(ia(n),yt(n)),ao(t[e>>2]|0)}function gd(e,n){e=e|0,n=n|0,ea(t[e>>2]|0,t[n>>2]|0)}function $1(e,n){e=e|0,n=n|0,Z(t[e>>2]|0,n)}function e2(e,n,r){e=e|0,n=n|0,r=+r,lr(t[e>>2]|0,n,w(r))}function ho(e,n,r){e=e|0,n=n|0,r=+r,Qn(t[e>>2]|0,n,w(r))}function Uc(e,n){e=e|0,n=n|0,z(t[e>>2]|0,n)}function Dl(e,n){e=e|0,n=n|0,$(t[e>>2]|0,n)}function el(e,n){e=e|0,n=n|0,me(t[e>>2]|0,n)}function _d(e,n){e=e|0,n=n|0,h0(t[e>>2]|0,n)}function Bs(e,n){e=e|0,n=n|0,Xe(t[e>>2]|0,n)}function wl(e,n){e=e|0,n=n|0,Ni(t[e>>2]|0,n)}function t2(e,n,r){e=e|0,n=n|0,r=+r,Cn(t[e>>2]|0,n,w(r))}function Po(e,n,r){e=e|0,n=n|0,r=+r,Ar(t[e>>2]|0,n,w(r))}function Fa(e,n){e=e|0,n=n|0,Rr(t[e>>2]|0,n)}function ba(e,n){e=e|0,n=n|0,ie(t[e>>2]|0,n)}function Pa(e,n){e=e|0,n=n|0,tt(t[e>>2]|0,n)}function ua(e,n){e=e|0,n=+n,kt(t[e>>2]|0,w(n))}function ys(e,n){e=e|0,n=+n,tn(t[e>>2]|0,w(n))}function gs(e,n){e=e|0,n=+n,Lt(t[e>>2]|0,w(n))}function Ql(e,n){e=e|0,n=+n,bt(t[e>>2]|0,w(n))}function Io(e,n){e=e|0,n=+n,on(t[e>>2]|0,w(n))}function hf(e,n){e=e|0,n=+n,sn(t[e>>2]|0,w(n))}function tl(e,n){e=e|0,n=+n,Yn(t[e>>2]|0,w(n))}function ju(e){e=e|0,yr(t[e>>2]|0)}function Ia(e,n){e=e|0,n=+n,Cu(t[e>>2]|0,w(n))}function Zu(e,n){e=e|0,n=+n,S0(t[e>>2]|0,w(n))}function U0(e){e=e|0,X0(t[e>>2]|0)}function vf(e,n){e=e|0,n=+n,di(t[e>>2]|0,w(n))}function jc(e,n){e=e|0,n=+n,ko(t[e>>2]|0,w(n))}function lc(e,n){e=e|0,n=+n,sf(t[e>>2]|0,w(n))}function Sl(e,n){e=e|0,n=+n,gl(t[e>>2]|0,w(n))}function _s(e,n){e=e|0,n=+n,Mo(t[e>>2]|0,w(n))}function oa(e,n){e=e|0,n=+n,ds(t[e>>2]|0,w(n))}function n2(e,n){e=e|0,n=+n,No(t[e>>2]|0,w(n))}function la(e,n){e=e|0,n=+n,Lo(t[e>>2]|0,w(n))}function sc(e,n){e=e|0,n=+n,Vu(t[e>>2]|0,w(n))}function zc(e,n,r){e=e|0,n=n|0,r=+r,Ft(t[e>>2]|0,n,w(r))}function bi(e,n,r){e=e|0,n=n|0,r=+r,nt(t[e>>2]|0,n,w(r))}function g(e,n,r){e=e|0,n=n|0,r=+r,_t(t[e>>2]|0,n,w(r))}function y(e){return e=e|0,ke(t[e>>2]|0)|0}function A(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;u=m,m=m+16|0,l=u,_r(l,t[n>>2]|0,r),F(e,l),m=u}function F(e,n){e=e|0,n=n|0,I(e,t[n+4>>2]|0,+w(C[n>>2]))}function I(e,n,r){e=e|0,n=n|0,r=+r,t[e>>2]=n,U[e+8>>3]=r}function J(e){return e=e|0,G(t[e>>2]|0)|0}function fe(e){return e=e|0,De(t[e>>2]|0)|0}function mt(e){return e=e|0,xe(t[e>>2]|0)|0}function Ct(e){return e=e|0,Fs(t[e>>2]|0)|0}function Mt(e){return e=e|0,ht(t[e>>2]|0)|0}function Er(e){return e=e|0,B(t[e>>2]|0)|0}function $u(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;u=m,m=m+16|0,l=u,v0(l,t[n>>2]|0,r),F(e,l),m=u}function iu(e){return e=e|0,qe(t[e>>2]|0)|0}function j0(e){return e=e|0,Tt(t[e>>2]|0)|0}function Tl(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,gn(u,t[n>>2]|0),F(e,u),m=r}function e0(e){return e=e|0,+ +w(lf(t[e>>2]|0))}function He(e){return e=e|0,+ +w(Ns(t[e>>2]|0))}function Be(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,nu(u,t[n>>2]|0),F(e,u),m=r}function ut(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,xu(u,t[n>>2]|0),F(e,u),m=r}function Jt(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,Zo(u,t[n>>2]|0),F(e,u),m=r}function jn(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,af(u,t[n>>2]|0),F(e,u),m=r}function ti(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,bs(u,t[n>>2]|0),F(e,u),m=r}function tr(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,ps(u,t[n>>2]|0),F(e,u),m=r}function ii(e){return e=e|0,+ +w(yu(t[e>>2]|0))}function qi(e,n){return e=e|0,n=n|0,+ +w(nn(t[e>>2]|0,n))}function jr(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;u=m,m=m+16|0,l=u,Ze(l,t[n>>2]|0,r),F(e,l),m=u}function gu(e,n,r){e=e|0,n=n|0,r=r|0,ka(t[e>>2]|0,t[n>>2]|0,r)}function Ba(e,n){e=e|0,n=n|0,Tu(t[e>>2]|0,t[n>>2]|0)}function Ua(e){return e=e|0,mu(t[e>>2]|0)|0}function r2(e){return e=e|0,e=ri(t[e>>2]|0)|0,e?e=oc(e)|0:e=0,e|0}function Ed(e,n){return e=e|0,n=n|0,e=yi(t[e>>2]|0,n)|0,e?e=oc(e)|0:e=0,e|0}function Dd(e,n){e=e|0,n=n|0;var r=0,u=0;u=cn(4)|0,mf(u,n),r=e+4|0,n=t[r>>2]|0,t[r>>2]=u,n|0&&(ia(n),yt(n)),$s(t[e>>2]|0,1)}function mf(e,n){e=e|0,n=n|0,rl(e,n)}function i2(e,n,r,u,l,s){e=e|0,n=n|0,r=w(r),u=u|0,l=w(l),s=s|0;var h=0,D=0;h=m,m=m+16|0,D=h,ch(D,Ls(n)|0,+r,u,+l,s),C[e>>2]=w(+U[D>>3]),C[e+4>>2]=w(+U[D+8>>3]),m=h}function ch(e,n,r,u,l,s){e=e|0,n=n|0,r=+r,u=u|0,l=+l,s=s|0;var h=0,D=0,S=0,M=0,O=0;h=m,m=m+32|0,O=h+8|0,M=h+20|0,S=h,D=h+16|0,U[O>>3]=r,t[M>>2]=u,U[S>>3]=l,t[D>>2]=s,qc(e,t[n+4>>2]|0,O,M,S,D),m=h}function qc(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0;h=m,m=m+16|0,D=h,Ta(D),n=vo(n)|0,dh(e,n,+U[r>>3],t[u>>2]|0,+U[l>>3],t[s>>2]|0),Ca(D),m=h}function vo(e){return e=e|0,t[e>>2]|0}function dh(e,n,r,u,l,s){e=e|0,n=n|0,r=+r,u=u|0,l=+l,s=s|0;var h=0;h=mo(ph()|0)|0,r=+Cl(r),u=u2(u)|0,l=+Cl(l),o2(e,Wr(0,h|0,n|0,+r,u|0,+l,u2(s)|0)|0)}function ph(){var e=0;return p[7608]|0||(Wc(9120),e=7608,t[e>>2]=1,t[e+4>>2]=0),9120}function mo(e){return e=e|0,t[e+8>>2]|0}function Cl(e){return e=+e,+ +ja(e)}function u2(e){return e=e|0,s2(e)|0}function o2(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;l=m,m=m+32|0,r=l,u=n,u&1?(wd(r,0),Yi(u|0,r|0)|0,Hc(e,r),Mr(r)):(t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=t[n+8>>2],t[e+12>>2]=t[n+12>>2]),m=l}function wd(e,n){e=e|0,n=n|0,l2(e,n),t[e+8>>2]=0,p[e+24>>0]=0}function Hc(e,n){e=e|0,n=n|0,n=n+8|0,t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=t[n+8>>2],t[e+12>>2]=t[n+12>>2]}function Mr(e){e=e|0,p[e+24>>0]=0}function l2(e,n){e=e|0,n=n|0,t[e>>2]=n}function s2(e){return e=e|0,e|0}function ja(e){return e=+e,+e}function Wc(e){e=e|0,nl(e,Sd()|0,4)}function Sd(){return 1064}function nl(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r,t[e+8>>2]=Pt(n|0,r+1|0)|0}function rl(e,n){e=e|0,n=n|0,n=t[n>>2]|0,t[e>>2]=n,Ei(n|0)}function hh(e){e=e|0;var n=0,r=0;r=e+4|0,n=t[r>>2]|0,t[r>>2]=0,n|0&&(ia(n),yt(n)),$s(t[e>>2]|0,0)}function yf(e){e=e|0,Gr(t[e>>2]|0)}function Vc(e){return e=e|0,Yl(t[e>>2]|0)|0}function Td(e,n,r,u){e=e|0,n=+n,r=+r,u=u|0,Kr(t[e>>2]|0,w(n),w(r),u)}function vh(e){return e=e|0,+ +w(pi(t[e>>2]|0))}function il(e){return e=e|0,+ +w(Q0(t[e>>2]|0))}function sa(e){return e=e|0,+ +w(T0(t[e>>2]|0))}function Cd(e){return e=e|0,+ +w(Fo(t[e>>2]|0))}function xd(e){return e=e|0,+ +w(ta(t[e>>2]|0))}function ac(e){return e=e|0,+ +w(Kl(t[e>>2]|0))}function mh(e,n){e=e|0,n=n|0,U[e>>3]=+w(pi(t[n>>2]|0)),U[e+8>>3]=+w(Q0(t[n>>2]|0)),U[e+16>>3]=+w(T0(t[n>>2]|0)),U[e+24>>3]=+w(Fo(t[n>>2]|0)),U[e+32>>3]=+w(ta(t[n>>2]|0)),U[e+40>>3]=+w(Kl(t[n>>2]|0))}function Ad(e,n){return e=e|0,n=n|0,+ +w(Ki(t[e>>2]|0,n))}function a2(e,n){return e=e|0,n=n|0,+ +w(Yr(t[e>>2]|0,n))}function Gc(e,n){return e=e|0,n=n|0,+ +w(fo(t[e>>2]|0,n))}function Yc(){return Oa()|0}function Us(){Rd(),aa(),Kc(),fc(),cc(),f2()}function Rd(){bN(11713,4938,1)}function aa(){eN(10448)}function Kc(){bM(10408)}function fc(){iM(10324)}function cc(){yE(10096)}function f2(){yh(9132)}function yh(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0,Ee=0,ve=0,Qe=0,We=0,st=0,Re=0,Fe=0,Qt=0,Lr=0,Nn=0,mn=0,hr=0,kr=0,On=0,Zi=0,ts=0,ns=0,rs=0,Xs=0,$2=0,ed=0,Za=0,td=0,Oc=0,kc=0,nd=0,rd=0,id=0,si=0,$a=0,ud=0,zf=0,od=0,ld=0,Mc=0,Nc=0,qf=0,Il=0,Aa=0,As=0,ef=0,L1=0,F1=0,Lc=0,b1=0,P1=0,Bl=0,vl=0,tf=0,lu=0,I1=0,is=0,Hf=0,us=0,Wf=0,B1=0,U1=0,Vf=0,Ul=0,nf=0,j1=0,z1=0,q1=0,gr=0,Mu=0,ml=0,os=0,jl=0,Tr=0,Fn=0,rf=0;n=m,m=m+672|0,r=n+656|0,rf=n+648|0,Fn=n+640|0,Tr=n+632|0,jl=n+624|0,os=n+616|0,ml=n+608|0,Mu=n+600|0,gr=n+592|0,q1=n+584|0,z1=n+576|0,j1=n+568|0,nf=n+560|0,Ul=n+552|0,Vf=n+544|0,U1=n+536|0,B1=n+528|0,Wf=n+520|0,us=n+512|0,Hf=n+504|0,is=n+496|0,I1=n+488|0,lu=n+480|0,tf=n+472|0,vl=n+464|0,Bl=n+456|0,P1=n+448|0,b1=n+440|0,Lc=n+432|0,F1=n+424|0,L1=n+416|0,ef=n+408|0,As=n+400|0,Aa=n+392|0,Il=n+384|0,qf=n+376|0,Nc=n+368|0,Mc=n+360|0,ld=n+352|0,od=n+344|0,zf=n+336|0,ud=n+328|0,$a=n+320|0,si=n+312|0,id=n+304|0,rd=n+296|0,nd=n+288|0,kc=n+280|0,Oc=n+272|0,td=n+264|0,Za=n+256|0,ed=n+248|0,$2=n+240|0,Xs=n+232|0,rs=n+224|0,ns=n+216|0,ts=n+208|0,Zi=n+200|0,On=n+192|0,kr=n+184|0,hr=n+176|0,mn=n+168|0,Nn=n+160|0,Lr=n+152|0,Qt=n+144|0,Fe=n+136|0,Re=n+128|0,st=n+120|0,We=n+112|0,Qe=n+104|0,ve=n+96|0,Ee=n+88|0,Pe=n+80|0,K=n+72|0,P=n+64|0,O=n+56|0,M=n+48|0,S=n+40|0,D=n+32|0,h=n+24|0,s=n+16|0,l=n+8|0,u=n,gf(e,3646),Xc(e,3651,2)|0,gh(e,3665,2)|0,vm(e,3682,18)|0,t[rf>>2]=19,t[rf+4>>2]=0,t[r>>2]=t[rf>>2],t[r+4>>2]=t[rf+4>>2],js(e,3690,r)|0,t[Fn>>2]=1,t[Fn+4>>2]=0,t[r>>2]=t[Fn>>2],t[r+4>>2]=t[Fn+4>>2],fa(e,3696,r)|0,t[Tr>>2]=2,t[Tr+4>>2]=0,t[r>>2]=t[Tr>>2],t[r+4>>2]=t[Tr+4>>2],Ji(e,3706,r)|0,t[jl>>2]=1,t[jl+4>>2]=0,t[r>>2]=t[jl>>2],t[r+4>>2]=t[jl+4>>2],O0(e,3722,r)|0,t[os>>2]=2,t[os+4>>2]=0,t[r>>2]=t[os>>2],t[r+4>>2]=t[os+4>>2],O0(e,3734,r)|0,t[ml>>2]=3,t[ml+4>>2]=0,t[r>>2]=t[ml>>2],t[r+4>>2]=t[ml+4>>2],Ji(e,3753,r)|0,t[Mu>>2]=4,t[Mu+4>>2]=0,t[r>>2]=t[Mu>>2],t[r+4>>2]=t[Mu+4>>2],Ji(e,3769,r)|0,t[gr>>2]=5,t[gr+4>>2]=0,t[r>>2]=t[gr>>2],t[r+4>>2]=t[gr+4>>2],Ji(e,3783,r)|0,t[q1>>2]=6,t[q1+4>>2]=0,t[r>>2]=t[q1>>2],t[r+4>>2]=t[q1+4>>2],Ji(e,3796,r)|0,t[z1>>2]=7,t[z1+4>>2]=0,t[r>>2]=t[z1>>2],t[r+4>>2]=t[z1+4>>2],Ji(e,3813,r)|0,t[j1>>2]=8,t[j1+4>>2]=0,t[r>>2]=t[j1>>2],t[r+4>>2]=t[j1+4>>2],Ji(e,3825,r)|0,t[nf>>2]=3,t[nf+4>>2]=0,t[r>>2]=t[nf>>2],t[r+4>>2]=t[nf+4>>2],O0(e,3843,r)|0,t[Ul>>2]=4,t[Ul+4>>2]=0,t[r>>2]=t[Ul>>2],t[r+4>>2]=t[Ul+4>>2],O0(e,3853,r)|0,t[Vf>>2]=9,t[Vf+4>>2]=0,t[r>>2]=t[Vf>>2],t[r+4>>2]=t[Vf+4>>2],Ji(e,3870,r)|0,t[U1>>2]=10,t[U1+4>>2]=0,t[r>>2]=t[U1>>2],t[r+4>>2]=t[U1+4>>2],Ji(e,3884,r)|0,t[B1>>2]=11,t[B1+4>>2]=0,t[r>>2]=t[B1>>2],t[r+4>>2]=t[B1+4>>2],Ji(e,3896,r)|0,t[Wf>>2]=1,t[Wf+4>>2]=0,t[r>>2]=t[Wf>>2],t[r+4>>2]=t[Wf+4>>2],t0(e,3907,r)|0,t[us>>2]=2,t[us+4>>2]=0,t[r>>2]=t[us>>2],t[r+4>>2]=t[us+4>>2],t0(e,3915,r)|0,t[Hf>>2]=3,t[Hf+4>>2]=0,t[r>>2]=t[Hf>>2],t[r+4>>2]=t[Hf+4>>2],t0(e,3928,r)|0,t[is>>2]=4,t[is+4>>2]=0,t[r>>2]=t[is>>2],t[r+4>>2]=t[is+4>>2],t0(e,3948,r)|0,t[I1>>2]=5,t[I1+4>>2]=0,t[r>>2]=t[I1>>2],t[r+4>>2]=t[I1+4>>2],t0(e,3960,r)|0,t[lu>>2]=6,t[lu+4>>2]=0,t[r>>2]=t[lu>>2],t[r+4>>2]=t[lu+4>>2],t0(e,3974,r)|0,t[tf>>2]=7,t[tf+4>>2]=0,t[r>>2]=t[tf>>2],t[r+4>>2]=t[tf+4>>2],t0(e,3983,r)|0,t[vl>>2]=20,t[vl+4>>2]=0,t[r>>2]=t[vl>>2],t[r+4>>2]=t[vl+4>>2],js(e,3999,r)|0,t[Bl>>2]=8,t[Bl+4>>2]=0,t[r>>2]=t[Bl>>2],t[r+4>>2]=t[Bl+4>>2],t0(e,4012,r)|0,t[P1>>2]=9,t[P1+4>>2]=0,t[r>>2]=t[P1>>2],t[r+4>>2]=t[P1+4>>2],t0(e,4022,r)|0,t[b1>>2]=21,t[b1+4>>2]=0,t[r>>2]=t[b1>>2],t[r+4>>2]=t[b1+4>>2],js(e,4039,r)|0,t[Lc>>2]=10,t[Lc+4>>2]=0,t[r>>2]=t[Lc>>2],t[r+4>>2]=t[Lc+4>>2],t0(e,4053,r)|0,t[F1>>2]=11,t[F1+4>>2]=0,t[r>>2]=t[F1>>2],t[r+4>>2]=t[F1+4>>2],t0(e,4065,r)|0,t[L1>>2]=12,t[L1+4>>2]=0,t[r>>2]=t[L1>>2],t[r+4>>2]=t[L1+4>>2],t0(e,4084,r)|0,t[ef>>2]=13,t[ef+4>>2]=0,t[r>>2]=t[ef>>2],t[r+4>>2]=t[ef+4>>2],t0(e,4097,r)|0,t[As>>2]=14,t[As+4>>2]=0,t[r>>2]=t[As>>2],t[r+4>>2]=t[As+4>>2],t0(e,4117,r)|0,t[Aa>>2]=15,t[Aa+4>>2]=0,t[r>>2]=t[Aa>>2],t[r+4>>2]=t[Aa+4>>2],t0(e,4129,r)|0,t[Il>>2]=16,t[Il+4>>2]=0,t[r>>2]=t[Il>>2],t[r+4>>2]=t[Il+4>>2],t0(e,4148,r)|0,t[qf>>2]=17,t[qf+4>>2]=0,t[r>>2]=t[qf>>2],t[r+4>>2]=t[qf+4>>2],t0(e,4161,r)|0,t[Nc>>2]=18,t[Nc+4>>2]=0,t[r>>2]=t[Nc>>2],t[r+4>>2]=t[Nc+4>>2],t0(e,4181,r)|0,t[Mc>>2]=5,t[Mc+4>>2]=0,t[r>>2]=t[Mc>>2],t[r+4>>2]=t[Mc+4>>2],O0(e,4196,r)|0,t[ld>>2]=6,t[ld+4>>2]=0,t[r>>2]=t[ld>>2],t[r+4>>2]=t[ld+4>>2],O0(e,4206,r)|0,t[od>>2]=7,t[od+4>>2]=0,t[r>>2]=t[od>>2],t[r+4>>2]=t[od+4>>2],O0(e,4217,r)|0,t[zf>>2]=3,t[zf+4>>2]=0,t[r>>2]=t[zf>>2],t[r+4>>2]=t[zf+4>>2],Jl(e,4235,r)|0,t[ud>>2]=1,t[ud+4>>2]=0,t[r>>2]=t[ud>>2],t[r+4>>2]=t[ud+4>>2],za(e,4251,r)|0,t[$a>>2]=4,t[$a+4>>2]=0,t[r>>2]=t[$a>>2],t[r+4>>2]=t[$a+4>>2],Jl(e,4263,r)|0,t[si>>2]=5,t[si+4>>2]=0,t[r>>2]=t[si>>2],t[r+4>>2]=t[si+4>>2],Jl(e,4279,r)|0,t[id>>2]=6,t[id+4>>2]=0,t[r>>2]=t[id>>2],t[r+4>>2]=t[id+4>>2],Jl(e,4293,r)|0,t[rd>>2]=7,t[rd+4>>2]=0,t[r>>2]=t[rd>>2],t[r+4>>2]=t[rd+4>>2],Jl(e,4306,r)|0,t[nd>>2]=8,t[nd+4>>2]=0,t[r>>2]=t[nd>>2],t[r+4>>2]=t[nd+4>>2],Jl(e,4323,r)|0,t[kc>>2]=9,t[kc+4>>2]=0,t[r>>2]=t[kc>>2],t[r+4>>2]=t[kc+4>>2],Jl(e,4335,r)|0,t[Oc>>2]=2,t[Oc+4>>2]=0,t[r>>2]=t[Oc>>2],t[r+4>>2]=t[Oc+4>>2],za(e,4353,r)|0,t[td>>2]=12,t[td+4>>2]=0,t[r>>2]=t[td>>2],t[r+4>>2]=t[td+4>>2],no(e,4363,r)|0,t[Za>>2]=1,t[Za+4>>2]=0,t[r>>2]=t[Za>>2],t[r+4>>2]=t[Za+4>>2],ul(e,4376,r)|0,t[ed>>2]=2,t[ed+4>>2]=0,t[r>>2]=t[ed>>2],t[r+4>>2]=t[ed+4>>2],ul(e,4388,r)|0,t[$2>>2]=13,t[$2+4>>2]=0,t[r>>2]=t[$2>>2],t[r+4>>2]=t[$2+4>>2],no(e,4402,r)|0,t[Xs>>2]=14,t[Xs+4>>2]=0,t[r>>2]=t[Xs>>2],t[r+4>>2]=t[Xs+4>>2],no(e,4411,r)|0,t[rs>>2]=15,t[rs+4>>2]=0,t[r>>2]=t[rs>>2],t[r+4>>2]=t[rs+4>>2],no(e,4421,r)|0,t[ns>>2]=16,t[ns+4>>2]=0,t[r>>2]=t[ns>>2],t[r+4>>2]=t[ns+4>>2],no(e,4433,r)|0,t[ts>>2]=17,t[ts+4>>2]=0,t[r>>2]=t[ts>>2],t[r+4>>2]=t[ts+4>>2],no(e,4446,r)|0,t[Zi>>2]=18,t[Zi+4>>2]=0,t[r>>2]=t[Zi>>2],t[r+4>>2]=t[Zi+4>>2],no(e,4458,r)|0,t[On>>2]=3,t[On+4>>2]=0,t[r>>2]=t[On>>2],t[r+4>>2]=t[On+4>>2],ul(e,4471,r)|0,t[kr>>2]=1,t[kr+4>>2]=0,t[r>>2]=t[kr>>2],t[r+4>>2]=t[kr+4>>2],dc(e,4486,r)|0,t[hr>>2]=10,t[hr+4>>2]=0,t[r>>2]=t[hr>>2],t[r+4>>2]=t[hr+4>>2],Jl(e,4496,r)|0,t[mn>>2]=11,t[mn+4>>2]=0,t[r>>2]=t[mn>>2],t[r+4>>2]=t[mn+4>>2],Jl(e,4508,r)|0,t[Nn>>2]=3,t[Nn+4>>2]=0,t[r>>2]=t[Nn>>2],t[r+4>>2]=t[Nn+4>>2],za(e,4519,r)|0,t[Lr>>2]=4,t[Lr+4>>2]=0,t[r>>2]=t[Lr>>2],t[r+4>>2]=t[Lr+4>>2],Od(e,4530,r)|0,t[Qt>>2]=19,t[Qt+4>>2]=0,t[r>>2]=t[Qt>>2],t[r+4>>2]=t[Qt+4>>2],_h(e,4542,r)|0,t[Fe>>2]=12,t[Fe+4>>2]=0,t[r>>2]=t[Fe>>2],t[r+4>>2]=t[Fe+4>>2],_f(e,4554,r)|0,t[Re>>2]=13,t[Re+4>>2]=0,t[r>>2]=t[Re>>2],t[r+4>>2]=t[Re+4>>2],Ef(e,4568,r)|0,t[st>>2]=2,t[st+4>>2]=0,t[r>>2]=t[st>>2],t[r+4>>2]=t[st+4>>2],Qc(e,4578,r)|0,t[We>>2]=20,t[We+4>>2]=0,t[r>>2]=t[We>>2],t[r+4>>2]=t[We+4>>2],xl(e,4587,r)|0,t[Qe>>2]=22,t[Qe+4>>2]=0,t[r>>2]=t[Qe>>2],t[r+4>>2]=t[Qe+4>>2],js(e,4602,r)|0,t[ve>>2]=23,t[ve+4>>2]=0,t[r>>2]=t[ve>>2],t[r+4>>2]=t[ve+4>>2],js(e,4619,r)|0,t[Ee>>2]=14,t[Ee+4>>2]=0,t[r>>2]=t[Ee>>2],t[r+4>>2]=t[Ee+4>>2],Jc(e,4629,r)|0,t[Pe>>2]=1,t[Pe+4>>2]=0,t[r>>2]=t[Pe>>2],t[r+4>>2]=t[Pe+4>>2],ca(e,4637,r)|0,t[K>>2]=4,t[K+4>>2]=0,t[r>>2]=t[K>>2],t[r+4>>2]=t[K+4>>2],ul(e,4653,r)|0,t[P>>2]=5,t[P+4>>2]=0,t[r>>2]=t[P>>2],t[r+4>>2]=t[P+4>>2],ul(e,4669,r)|0,t[O>>2]=6,t[O+4>>2]=0,t[r>>2]=t[O>>2],t[r+4>>2]=t[O+4>>2],ul(e,4686,r)|0,t[M>>2]=7,t[M+4>>2]=0,t[r>>2]=t[M>>2],t[r+4>>2]=t[M+4>>2],ul(e,4701,r)|0,t[S>>2]=8,t[S+4>>2]=0,t[r>>2]=t[S>>2],t[r+4>>2]=t[S+4>>2],ul(e,4719,r)|0,t[D>>2]=9,t[D+4>>2]=0,t[r>>2]=t[D>>2],t[r+4>>2]=t[D+4>>2],ul(e,4736,r)|0,t[h>>2]=21,t[h+4>>2]=0,t[r>>2]=t[h>>2],t[r+4>>2]=t[h+4>>2],c2(e,4754,r)|0,t[s>>2]=2,t[s+4>>2]=0,t[r>>2]=t[s>>2],t[r+4>>2]=t[s+4>>2],dc(e,4772,r)|0,t[l>>2]=3,t[l+4>>2]=0,t[r>>2]=t[l>>2],t[r+4>>2]=t[l+4>>2],dc(e,4790,r)|0,t[u>>2]=4,t[u+4>>2]=0,t[r>>2]=t[u>>2],t[r+4>>2]=t[u+4>>2],dc(e,4808,r)|0,m=n}function gf(e,n){e=e|0,n=n|0;var r=0;r=Ja()|0,t[e>>2]=r,jo(r,n),Q2(t[e>>2]|0)}function Xc(e,n,r){return e=e|0,n=n|0,r=r|0,Ot(e,Or(n)|0,r,0),e|0}function gh(e,n,r){return e=e|0,n=n|0,r=r|0,c(e,Or(n)|0,r,0),e|0}function vm(e,n,r){return e=e|0,n=n|0,r=r|0,cE(e,Or(n)|0,r,0),e|0}function js(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],rE(e,n,l),m=u,e|0}function fa(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],bl(e,n,l),m=u,e|0}function Ji(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],d(e,n,l),m=u,e|0}function O0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Tv(e,n,l),m=u,e|0}function t0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],sy(e,n,l),m=u,e|0}function Jl(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],W2(e,n,l),m=u,e|0}function za(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],H2(e,n,l),m=u,e|0}function no(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],k0(e,n,l),m=u,e|0}function ul(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Ep(e,n,l),m=u,e|0}function dc(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Hm(e,n,l),m=u,e|0}function Od(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],n0(e,n,l),m=u,e|0}function _h(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],x2(e,n,l),m=u,e|0}function _f(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Fm(e,n,l),m=u,e|0}function Ef(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Zd(e,n,l),m=u,e|0}function Qc(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],p1(e,n,l),m=u,e|0}function xl(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Ga(e,n,l),m=u,e|0}function Jc(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Id(e,n,l),m=u,e|0}function ca(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Nd(e,n,l),m=u,e|0}function c2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],d2(e,n,l),m=u,e|0}function d2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],da(e,r,l,1),m=u}function Or(e){return e=e|0,e|0}function da(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=kd()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=Zc(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,p2(s,u)|0,u),m=l}function kd(){var e=0,n=0;if(p[7616]|0||(ol(9136),Ht(24,9136,he|0)|0,n=7616,t[n>>2]=1,t[n+4>>2]=0),!(rr(9136)|0)){e=9136,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));ol(9136)}return 9136}function Zc(e){return e=e|0,0}function p2(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=kd()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Df(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(wf(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function vi(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0;h=m,m=m+32|0,K=h+24|0,P=h+20|0,S=h+16|0,O=h+12|0,M=h+8|0,D=h+4|0,Pe=h,t[P>>2]=n,t[S>>2]=r,t[O>>2]=u,t[M>>2]=l,t[D>>2]=s,s=e+28|0,t[Pe>>2]=t[s>>2],t[K>>2]=t[Pe>>2],Md(e+24|0,K,P,O,M,S,D)|0,t[s>>2]=t[t[s>>2]>>2],m=h}function Md(e,n,r,u,l,s,h){return e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,h=h|0,e=mm(n)|0,n=cn(24)|0,h2(n+4|0,t[r>>2]|0,t[u>>2]|0,t[l>>2]|0,t[s>>2]|0,t[h>>2]|0),t[n>>2]=t[e>>2],t[e>>2]=n,n|0}function mm(e){return e=e|0,t[e>>2]|0}function h2(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,t[e>>2]=n,t[e+4>>2]=r,t[e+8>>2]=u,t[e+12>>2]=l,t[e+16>>2]=s}function dn(e,n){return e=e|0,n=n|0,n|e|0}function Df(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function wf(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=ym(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,Sf(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Df(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Eh(e,D),gm(D),m=M;return}}function ym(e){return e=e|0,357913941}function Sf(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Eh(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function gm(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function ol(e){e=e|0,Bo(e)}function $c(e){e=e|0,Un(e+24|0)}function rr(e){return e=e|0,t[e>>2]|0}function Un(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function Bo(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,3,n,zn()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function dr(){return 9228}function zn(){return 1140}function ll(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=yo(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=pc(n,u)|0,m=r,n|0}function Pn(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,t[e>>2]=n,t[e+4>>2]=r,t[e+8>>2]=u,t[e+12>>2]=l,t[e+16>>2]=s}function yo(e){return e=e|0,(t[(kd()|0)+24>>2]|0)+(e*12|0)|0}function pc(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;return l=m,m=m+48|0,u=l,r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),N1[r&31](u,e),u=ro(u)|0,m=l,u|0}function ro(e){e=e|0;var n=0,r=0,u=0,l=0;return l=m,m=m+32|0,n=l+12|0,r=l,u=Ou(qa()|0)|0,u?(Zl(n,u),Tf(r,n),hc(e,r),e=Es(n)|0):e=vc(e)|0,m=l,e|0}function qa(){var e=0;return p[7632]|0||(xf(9184),Ht(25,9184,he|0)|0,e=7632,t[e>>2]=1,t[e+4>>2]=0),9184}function Ou(e){return e=e|0,t[e+36>>2]|0}function Zl(e,n){e=e|0,n=n|0,t[e>>2]=n,t[e+4>>2]=e,t[e+8>>2]=0}function Tf(e,n){e=e|0,n=n|0,t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=0}function hc(e,n){e=e|0,n=n|0,io(n,e,e+8|0,e+16|0,e+24|0,e+32|0,e+40|0)|0}function Es(e){return e=e|0,t[(t[e+4>>2]|0)+8>>2]|0}function vc(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0;S=m,m=m+16|0,r=S+4|0,u=S,l=Sa(8)|0,s=l,h=cn(48)|0,D=h,n=D+48|0;do t[D>>2]=t[e>>2],D=D+4|0,e=e+4|0;while((D|0)<(n|0));return n=s+4|0,t[n>>2]=h,D=cn(8)|0,h=t[n>>2]|0,t[u>>2]=0,t[r>>2]=t[u>>2],Dh(D,h,r),t[l>>2]=D,m=S,s|0}function Dh(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=cn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1092,t[r+12>>2]=n,t[e+4>>2]=r}function an(e){e=e|0,Pv(e),yt(e)}function $l(e){e=e|0,e=t[e+12>>2]|0,e|0&&yt(e)}function go(e){e=e|0,yt(e)}function io(e,n,r,u,l,s,h){return e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,h=h|0,s=Hi(t[e>>2]|0,n,r,u,l,s,h)|0,h=e+4|0,t[(t[h>>2]|0)+8>>2]=s,t[(t[h>>2]|0)+8>>2]|0}function Hi(e,n,r,u,l,s,h){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,h=h|0;var D=0,S=0;return D=m,m=m+16|0,S=D,Ta(S),e=vo(e)|0,h=zr(e,+U[n>>3],+U[r>>3],+U[u>>3],+U[l>>3],+U[s>>3],+U[h>>3])|0,Ca(S),m=D,h|0}function zr(e,n,r,u,l,s,h){e=e|0,n=+n,r=+r,u=+u,l=+l,s=+s,h=+h;var D=0;return D=mo(Cf()|0)|0,n=+Cl(n),r=+Cl(r),u=+Cl(u),l=+Cl(l),s=+Cl(s),f0(0,D|0,e|0,+n,+r,+u,+l,+s,+ +Cl(h))|0}function Cf(){var e=0;return p[7624]|0||(_m(9172),e=7624,t[e>>2]=1,t[e+4>>2]=0),9172}function _m(e){e=e|0,nl(e,Al()|0,6)}function Al(){return 1112}function xf(e){e=e|0,Ha(e)}function Af(e){e=e|0,v2(e+24|0),m2(e+16|0)}function v2(e){e=e|0,e1(e)}function m2(e){e=e|0,mc(e)}function mc(e){e=e|0;var n=0,r=0;if(n=t[e>>2]|0,n|0)do r=n,n=t[n>>2]|0,yt(r);while((n|0)!=0);t[e>>2]=0}function e1(e){e=e|0;var n=0,r=0;if(n=t[e>>2]|0,n|0)do r=n,n=t[n>>2]|0,yt(r);while((n|0)!=0);t[e>>2]=0}function Ha(e){e=e|0;var n=0;t[e+16>>2]=0,t[e+20>>2]=0,n=e+24|0,t[n>>2]=0,t[e+28>>2]=n,t[e+36>>2]=0,p[e+40>>0]=0,p[e+41>>0]=0}function Nd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],y2(e,r,l,0),m=u}function y2(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=t1()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=Rf(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,n1(s,u)|0,u),m=l}function t1(){var e=0,n=0;if(p[7640]|0||(Rl(9232),Ht(26,9232,he|0)|0,n=7640,t[n>>2]=1,t[n+4>>2]=0),!(rr(9232)|0)){e=9232,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Rl(9232)}return 9232}function Rf(e){return e=e|0,0}function n1(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=t1()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Wa(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(r1(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function Wa(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function r1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Ld(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,g2(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Wa(s,u,r),t[S>>2]=(t[S>>2]|0)+12,yc(e,D),i1(D),m=M;return}}function Ld(e){return e=e|0,357913941}function g2(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function yc(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function i1(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function Rl(e){e=e|0,Fd(e)}function pa(e){e=e|0,wh(e+24|0)}function wh(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function Fd(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,1,n,bd()|0,3),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function bd(){return 1144}function Sh(e,n,r,u,l){e=e|0,n=n|0,r=+r,u=+u,l=l|0;var s=0,h=0,D=0,S=0;s=m,m=m+16|0,h=s+8|0,D=s,S=_2(e)|0,e=t[S+4>>2]|0,t[D>>2]=t[S>>2],t[D+4>>2]=e,t[h>>2]=t[D>>2],t[h+4>>2]=t[D+4>>2],Th(n,h,r,u,l),m=s}function _2(e){return e=e|0,(t[(t1()|0)+24>>2]|0)+(e*12|0)|0}function Th(e,n,r,u,l){e=e|0,n=n|0,r=+r,u=+u,l=l|0;var s=0,h=0,D=0,S=0,M=0;M=m,m=m+16|0,h=M+2|0,D=M+1|0,S=M,s=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(s=t[(t[e>>2]|0)+s>>2]|0),Ol(h,r),r=+es(h,r),Ol(D,u),u=+es(D,u),Ds(S,l),S=zs(S,l)|0,Z8[s&1](e,r,u,S),m=M}function Ol(e,n){e=e|0,n=+n}function es(e,n){return e=e|0,n=+n,+ +Ch(n)}function Ds(e,n){e=e|0,n=n|0}function zs(e,n){return e=e|0,n=n|0,Pd(n)|0}function Pd(e){return e=e|0,e|0}function Ch(e){return e=+e,+e}function Id(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Bd(e,r,l,1),m=u}function Bd(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=u1()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=o1(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,xh(s,u)|0,u),m=l}function u1(){var e=0,n=0;if(p[7648]|0||(l1(9268),Ht(27,9268,he|0)|0,n=7648,t[n>>2]=1,t[n+4>>2]=0),!(rr(9268)|0)){e=9268,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));l1(9268)}return 9268}function o1(e){return e=e|0,0}function xh(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=u1()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Ud(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(jd(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function Ud(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function jd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=ws(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,Va(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Ud(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Ah(e,D),uu(D),m=M;return}}function ws(e){return e=e|0,357913941}function Va(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Ah(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function uu(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function l1(e){e=e|0,kl(e)}function Rh(e){e=e|0,s1(e+24|0)}function s1(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function kl(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,4,n,Oh()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Oh(){return 1160}function zd(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=kh(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=a1(n,u)|0,m=r,n|0}function kh(e){return e=e|0,(t[(u1()|0)+24>>2]|0)+(e*12|0)|0}function a1(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),Ml(Xp[r&31](e)|0)|0}function Ml(e){return e=e|0,e&1|0}function Ga(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ha(e,r,l,0),m=u}function ha(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=qd()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=Hd(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,Em(s,u)|0,u),m=l}function qd(){var e=0,n=0;if(p[7656]|0||(Lh(9304),Ht(28,9304,he|0)|0,n=7656,t[n>>2]=1,t[n+4>>2]=0),!(rr(9304)|0)){e=9304,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Lh(9304)}return 9304}function Hd(e){return e=e|0,0}function Em(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=qd()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Wd(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Mh(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function Wd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Mh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Nh(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,Vd(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Wd(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Dm(e,D),wm(D),m=M;return}}function Nh(e){return e=e|0,357913941}function Vd(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Dm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function wm(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function Lh(e){e=e|0,f1(e)}function Sm(e){e=e|0,Gd(e+24|0)}function Gd(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function f1(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,5,n,c1()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function c1(){return 1164}function d1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=va(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Yd(n,l,r),m=u}function va(e){return e=e|0,(t[(qd()|0)+24>>2]|0)+(e*12|0)|0}function Yd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),qs(l,r),r=Hs(l,r)|0,N1[u&31](e,r),Ws(l),m=s}function qs(e,n){e=e|0,n=n|0,Kd(e,n)}function Hs(e,n){return e=e|0,n=n|0,e|0}function Ws(e){e=e|0,ia(e)}function Kd(e,n){e=e|0,n=n|0,ma(e,n)}function ma(e,n){e=e|0,n=n|0,t[e>>2]=n}function p1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],E2(e,r,l,0),m=u}function E2(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=gc()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=Xd(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,_o(s,u)|0,u),m=l}function gc(){var e=0,n=0;if(p[7664]|0||(Uh(9340),Ht(29,9340,he|0)|0,n=7664,t[n>>2]=1,t[n+4>>2]=0),!(rr(9340)|0)){e=9340,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Uh(9340)}return 9340}function Xd(e){return e=e|0,0}function _o(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=gc()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Fh(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(bh(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function Fh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function bh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Ph(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,Ih(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Fh(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Tm(e,D),Bh(D),m=M;return}}function Ph(e){return e=e|0,357913941}function Ih(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Tm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Bh(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function Uh(e){e=e|0,jh(e)}function h1(e){e=e|0,Qd(e+24|0)}function Qd(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function jh(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,4,n,Jd()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Jd(){return 1180}function zh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=Cm(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],r=xm(n,l,r)|0,m=u,r|0}function Cm(e){return e=e|0,(t[(gc()|0)+24>>2]|0)+(e*12|0)|0}function xm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;return s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Of(l,r),l=kf(l,r)|0,l=D2(ZE[u&15](e,l)|0)|0,m=s,l|0}function Of(e,n){e=e|0,n=n|0}function kf(e,n){return e=e|0,n=n|0,Am(n)|0}function D2(e){return e=e|0,e|0}function Am(e){return e=e|0,e|0}function Zd(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],w2(e,r,l,0),m=u}function w2(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=$d()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=qh(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,ep(s,u)|0,u),m=l}function $d(){var e=0,n=0;if(p[7672]|0||(Vh(9376),Ht(30,9376,he|0)|0,n=7672,t[n>>2]=1,t[n+4>>2]=0),!(rr(9376)|0)){e=9376,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Vh(9376)}return 9376}function qh(e){return e=e|0,0}function ep(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=$d()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Hh(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Wh(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function Hh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Wh(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=tp(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,Rm(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Hh(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Om(e,D),km(D),m=M;return}}function tp(e){return e=e|0,357913941}function Rm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Om(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function km(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function Vh(e){e=e|0,np(e)}function v1(e){e=e|0,Mm(e+24|0)}function Mm(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function np(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,5,n,rp()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function rp(){return 1196}function Nm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=Lm(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=Gh(n,u)|0,m=r,n|0}function Lm(e){return e=e|0,(t[($d()|0)+24>>2]|0)+(e*12|0)|0}function Gh(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),D2(Xp[r&31](e)|0)|0}function Fm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],bm(e,r,l,1),m=u}function bm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=ip()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=up(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,ya(s,u)|0,u),m=l}function ip(){var e=0,n=0;if(p[7680]|0||(lp(9412),Ht(31,9412,he|0)|0,n=7680,t[n>>2]=1,t[n+4>>2]=0),!(rr(9412)|0)){e=9412,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));lp(9412)}return 9412}function up(e){return e=e|0,0}function ya(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=ip()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],m1(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(op(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function m1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function op(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Yh(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,S2(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],m1(s,u,r),t[S>>2]=(t[S>>2]|0)+12,y1(e,D),Kh(D),m=M;return}}function Yh(e){return e=e|0,357913941}function S2(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function y1(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Kh(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function lp(e){e=e|0,Qh(e)}function Xh(e){e=e|0,sp(e+24|0)}function sp(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function Qh(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,6,n,Jh()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Jh(){return 1200}function ap(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=T2(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=C2(n,u)|0,m=r,n|0}function T2(e){return e=e|0,(t[(ip()|0)+24>>2]|0)+(e*12|0)|0}function C2(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),z0(Xp[r&31](e)|0)|0}function z0(e){return e=e|0,e|0}function x2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ga(e,r,l,0),m=u}function ga(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Ya()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=A2(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,R2(s,u)|0,u),m=l}function Ya(){var e=0,n=0;if(p[7688]|0||(dp(9448),Ht(32,9448,he|0)|0,n=7688,t[n>>2]=1,t[n+4>>2]=0),!(rr(9448)|0)){e=9448,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));dp(9448)}return 9448}function A2(e){return e=e|0,0}function R2(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=Ya()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],fp(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(O2(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function fp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function O2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Zh(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,Pm(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],fp(s,u,r),t[S>>2]=(t[S>>2]|0)+12,$h(e,D),cp(D),m=M;return}}function Zh(e){return e=e|0,357913941}function Pm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function $h(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function cp(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function dp(e){e=e|0,Bm(e)}function pp(e){e=e|0,Im(e+24|0)}function Im(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function Bm(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,6,n,Eo()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Eo(){return 1204}function k2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=Um(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],sl(n,l,r),m=u}function Um(e){return e=e|0,(t[(Ya()|0)+24>>2]|0)+(e*12|0)|0}function sl(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Jn(l,r),l=Vs(l,r)|0,N1[u&31](e,l),m=s}function Jn(e,n){e=e|0,n=n|0}function Vs(e,n){return e=e|0,n=n|0,al(n)|0}function al(e){return e=e|0,e|0}function n0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ev(e,r,l,0),m=u}function ev(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Gs()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=hp(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,jm(s,u)|0,u),m=l}function Gs(){var e=0,n=0;if(p[7696]|0||(yp(9484),Ht(33,9484,he|0)|0,n=7696,t[n>>2]=1,t[n+4>>2]=0),!(rr(9484)|0)){e=9484,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));yp(9484)}return 9484}function hp(e){return e=e|0,0}function jm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=Gs()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],tv(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(vp(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function tv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function vp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=zm(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,mp(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],tv(s,u,r),t[S>>2]=(t[S>>2]|0)+12,_c(e,D),Ea(D),m=M;return}}function zm(e){return e=e|0,357913941}function mp(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function _c(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Ea(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function yp(e){e=e|0,zu(e)}function M2(e){e=e|0,ku(e+24|0)}function ku(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function zu(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,1,n,gp()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function gp(){return 1212}function _p(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,s=l+8|0,h=l,D=nv(e)|0,e=t[D+4>>2]|0,t[h>>2]=t[D>>2],t[h+4>>2]=e,t[s>>2]=t[h>>2],t[s+4>>2]=t[h+4>>2],qm(n,s,r,u),m=l}function nv(e){return e=e|0,(t[(Gs()|0)+24>>2]|0)+(e*12|0)|0}function qm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;D=m,m=m+16|0,s=D+1|0,h=D,l=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(l=t[(t[e>>2]|0)+l>>2]|0),Jn(s,r),s=Vs(s,r)|0,Of(h,u),h=kf(h,u)|0,jy[l&15](e,s,h),m=D}function Hm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Wm(e,r,l,1),m=u}function Wm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=N2()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=rv(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,Ec(s,u)|0,u),m=l}function N2(){var e=0,n=0;if(p[7704]|0||(iv(9520),Ht(34,9520,he|0)|0,n=7704,t[n>>2]=1,t[n+4>>2]=0),!(rr(9520)|0)){e=9520,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));iv(9520)}return 9520}function rv(e){return e=e|0,0}function Ec(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=N2()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],g1(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Vm(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function g1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Vm(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=L2(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,_1(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],g1(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Nl(e,D),Da(D),m=M;return}}function L2(e){return e=e|0,357913941}function _1(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Nl(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Da(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function iv(e){e=e|0,ov(e)}function Gm(e){e=e|0,uv(e+24|0)}function uv(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function ov(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,1,n,Ym()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Ym(){return 1224}function lv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;return l=m,m=m+16|0,s=l+8|0,h=l,D=wa(e)|0,e=t[D+4>>2]|0,t[h>>2]=t[D>>2],t[h+4>>2]=e,t[s>>2]=t[h>>2],t[s+4>>2]=t[h+4>>2],u=+Cr(n,s,r),m=l,+u}function wa(e){return e=e|0,(t[(N2()|0)+24>>2]|0)+(e*12|0)|0}function Cr(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Ds(l,r),l=zs(l,r)|0,h=+ja(+eS[u&7](e,l)),m=s,+h}function Ep(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],fl(e,r,l,1),m=u}function fl(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=cu()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=E1(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,ki(s,u)|0,u),m=l}function cu(){var e=0,n=0;if(p[7712]|0||(wp(9556),Ht(35,9556,he|0)|0,n=7712,t[n>>2]=1,t[n+4>>2]=0),!(rr(9556)|0)){e=9556,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));wp(9556)}return 9556}function E1(e){return e=e|0,0}function ki(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=cu()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Dp(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(F2(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function Dp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function F2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Do(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,Ss(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Dp(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Mf(e,D),b2(D),m=M;return}}function Do(e){return e=e|0,357913941}function Ss(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Mf(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function b2(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function wp(e){e=e|0,Sp(e)}function D1(e){e=e|0,w1(e+24|0)}function w1(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function Sp(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,5,n,Zn()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Zn(){return 1232}function cl(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=qn(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],r=+q0(n,l),m=u,+r}function qn(e){return e=e|0,(t[(cu()|0)+24>>2]|0)+(e*12|0)|0}function q0(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),+ +ja(+$8[r&15](e))}function k0(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],P2(e,r,l,1),m=u}function P2(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Ll()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=S1(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,Dc(s,u)|0,u),m=l}function Ll(){var e=0,n=0;if(p[7720]|0||(U2(9592),Ht(36,9592,he|0)|0,n=7720,t[n>>2]=1,t[n+4>>2]=0),!(rr(9592)|0)){e=9592,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));U2(9592)}return 9592}function S1(e){return e=e|0,0}function Dc(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=Ll()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],wc(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(I2(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function wc(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function I2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Tp(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,M0(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],wc(s,u,r),t[S>>2]=(t[S>>2]|0)+12,fn(e,D),B2(D),m=M;return}}function Tp(e){return e=e|0,357913941}function M0(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function fn(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function B2(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function U2(e){e=e|0,Cc(e)}function Sc(e){e=e|0,Tc(e+24|0)}function Tc(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function Cc(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,7,n,T1()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function T1(){return 1276}function Cp(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=Ka(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=Km(n,u)|0,m=r,n|0}function Ka(e){return e=e|0,(t[(Ll()|0)+24>>2]|0)+(e*12|0)|0}function Km(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;return l=m,m=m+16|0,u=l,r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),N1[r&31](u,e),u=xc(u)|0,m=l,u|0}function xc(e){e=e|0;var n=0,r=0,u=0,l=0;return l=m,m=m+32|0,n=l+12|0,r=l,u=Ou(j2()|0)|0,u?(Zl(n,u),Tf(r,n),sv(e,r),e=Es(n)|0):e=C1(e)|0,m=l,e|0}function j2(){var e=0;return p[7736]|0||(Uo(9640),Ht(25,9640,he|0)|0,e=7736,t[e>>2]=1,t[e+4>>2]=0),9640}function sv(e,n){e=e|0,n=n|0,Ac(n,e,e+8|0)|0}function C1(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0;return r=m,m=m+16|0,l=r+4|0,h=r,u=Sa(8)|0,n=u,D=cn(16)|0,t[D>>2]=t[e>>2],t[D+4>>2]=t[e+4>>2],t[D+8>>2]=t[e+8>>2],t[D+12>>2]=t[e+12>>2],s=n+4|0,t[s>>2]=D,e=cn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],Nf(e,s,l),t[u>>2]=e,m=r,n|0}function Nf(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=cn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1244,t[r+12>>2]=n,t[e+4>>2]=r}function Lf(e){e=e|0,Pv(e),yt(e)}function x1(e){e=e|0,e=t[e+12>>2]|0,e|0&&yt(e)}function Fl(e){e=e|0,yt(e)}function Ac(e,n,r){return e=e|0,n=n|0,r=r|0,n=Ff(t[e>>2]|0,n,r)|0,r=e+4|0,t[(t[r>>2]|0)+8>>2]=n,t[(t[r>>2]|0)+8>>2]|0}function Ff(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;return u=m,m=m+16|0,l=u,Ta(l),e=vo(e)|0,r=Xm(e,t[n>>2]|0,+U[r>>3])|0,Ca(l),m=u,r|0}function Xm(e,n,r){e=e|0,n=n|0,r=+r;var u=0;return u=mo(dl()|0)|0,n=u2(n)|0,Pr(0,u|0,e|0,n|0,+ +Cl(r))|0}function dl(){var e=0;return p[7728]|0||(z2(9628),e=7728,t[e>>2]=1,t[e+4>>2]=0),9628}function z2(e){e=e|0,nl(e,q2()|0,2)}function q2(){return 1264}function Uo(e){e=e|0,Ha(e)}function H2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Qm(e,r,l,1),m=u}function Qm(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=A1()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=Jm(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,Zm(s,u)|0,u),m=l}function A1(){var e=0,n=0;if(p[7744]|0||(cv(9684),Ht(37,9684,he|0)|0,n=7744,t[n>>2]=1,t[n+4>>2]=0),!(rr(9684)|0)){e=9684,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));cv(9684)}return 9684}function Jm(e){return e=e|0,0}function Zm(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=A1()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],av(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):($m(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function av(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function $m(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=fv(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,ey(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],av(s,u,r),t[S>>2]=(t[S>>2]|0)+12,ty(e,D),ny(D),m=M;return}}function fv(e){return e=e|0,357913941}function ey(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function ty(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function ny(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function cv(e){e=e|0,iy(e)}function ry(e){e=e|0,xp(e+24|0)}function xp(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function iy(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,5,n,bf()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function bf(){return 1280}function dv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=pv(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],r=hv(n,l,r)|0,m=u,r|0}function pv(e){return e=e|0,(t[(A1()|0)+24>>2]|0)+(e*12|0)|0}function hv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return h=m,m=m+32|0,l=h,s=h+16|0,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Ds(s,r),s=zs(s,r)|0,jy[u&15](l,e,s),s=xc(l)|0,m=h,s|0}function W2(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],V2(e,r,l,1),m=u}function V2(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Ap()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=vv(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,G2(s,u)|0,u),m=l}function Ap(){var e=0,n=0;if(p[7752]|0||(Ev(9720),Ht(38,9720,he|0)|0,n=7752,t[n>>2]=1,t[n+4>>2]=0),!(rr(9720)|0)){e=9720,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Ev(9720)}return 9720}function vv(e){return e=e|0,0}function G2(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=Ap()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],mv(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(yv(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function mv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function yv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Rp(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,gv(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],mv(s,u,r),t[S>>2]=(t[S>>2]|0)+12,_v(e,D),uy(D),m=M;return}}function Rp(e){return e=e|0,357913941}function gv(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function _v(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function uy(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function Ev(e){e=e|0,Dv(e)}function oy(e){e=e|0,Y2(e+24|0)}function Y2(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function Dv(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,8,n,Op()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Op(){return 1288}function ly(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;return r=m,m=m+16|0,u=r+8|0,l=r,s=r0(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],n=kp(n,u)|0,m=r,n|0}function r0(e){return e=e|0,(t[(Ap()|0)+24>>2]|0)+(e*12|0)|0}function kp(e,n){e=e|0,n=n|0;var r=0;return r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),s2(Xp[r&31](e)|0)|0}function sy(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ay(e,r,l,0),m=u}function ay(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Mp()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=Xa(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,Np(s,u)|0,u),m=l}function Mp(){var e=0,n=0;if(p[7760]|0||(bp(9756),Ht(39,9756,he|0)|0,n=7760,t[n>>2]=1,t[n+4>>2]=0),!(rr(9756)|0)){e=9756,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));bp(9756)}return 9756}function Xa(e){return e=e|0,0}function Np(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=Mp()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],Lp(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Fp(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function Lp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Fp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=fy(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,cy(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],Lp(s,u,r),t[S>>2]=(t[S>>2]|0)+12,wv(e,D),Pf(D),m=M;return}}function fy(e){return e=e|0,357913941}function cy(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function wv(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Pf(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function bp(e){e=e|0,py(e)}function Sv(e){e=e|0,dy(e+24|0)}function dy(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function py(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,8,n,Pp()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Pp(){return 1292}function Ip(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=hy(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],vy(n,l,r),m=u}function hy(e){return e=e|0,(t[(Mp()|0)+24>>2]|0)+(e*12|0)|0}function vy(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Ol(l,r),r=+es(l,r),Q8[u&31](e,r),m=s}function Tv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Bp(e,r,l,0),m=u}function Bp(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Up()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=K2(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,my(s,u)|0,u),m=l}function Up(){var e=0,n=0;if(p[7768]|0||(jp(9792),Ht(40,9792,he|0)|0,n=7768,t[n>>2]=1,t[n+4>>2]=0),!(rr(9792)|0)){e=9792,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));jp(9792)}return 9792}function K2(e){return e=e|0,0}function my(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=Up()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],R1(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(yy(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function R1(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function yy(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Cv(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,xv(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],R1(s,u,r),t[S>>2]=(t[S>>2]|0)+12,gy(e,D),If(D),m=M;return}}function Cv(e){return e=e|0,357913941}function xv(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function gy(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function If(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function jp(e){e=e|0,Ey(e)}function Av(e){e=e|0,_y(e+24|0)}function _y(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function Ey(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,1,n,zp()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function zp(){return 1300}function Dy(e,n,r,u){e=e|0,n=n|0,r=r|0,u=+u;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,s=l+8|0,h=l,D=Ys(e)|0,e=t[D+4>>2]|0,t[h>>2]=t[D>>2],t[h+4>>2]=e,t[s>>2]=t[h>>2],t[s+4>>2]=t[h+4>>2],wy(n,s,r,u),m=l}function Ys(e){return e=e|0,(t[(Up()|0)+24>>2]|0)+(e*12|0)|0}function wy(e,n,r,u){e=e|0,n=n|0,r=r|0,u=+u;var l=0,s=0,h=0,D=0;D=m,m=m+16|0,s=D+1|0,h=D,l=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(l=t[(t[e>>2]|0)+l>>2]|0),Ds(s,r),s=zs(s,r)|0,Ol(h,u),u=+es(h,u),iS[l&15](e,s,u),m=D}function d(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],v(e,r,l,0),m=u}function v(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=x()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=b(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,H(s,u)|0,u),m=l}function x(){var e=0,n=0;if(p[7776]|0||(Rt(9828),Ht(41,9828,he|0)|0,n=7776,t[n>>2]=1,t[n+4>>2]=0),!(rr(9828)|0)){e=9828,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Rt(9828)}return 9828}function b(e){return e=e|0,0}function H(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=x()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],ee(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(de(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function ee(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function de(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=ye(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,be(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],ee(s,u,r),t[S>>2]=(t[S>>2]|0)+12,gt(e,D),Dt(D),m=M;return}}function ye(e){return e=e|0,357913941}function be(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function gt(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Dt(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function Rt(e){e=e|0,$n(e)}function rn(e){e=e|0,Rn(e+24|0)}function Rn(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function $n(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,7,n,Nr()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Nr(){return 1312}function ir(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=Zr(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ui(n,l,r),m=u}function Zr(e){return e=e|0,(t[(x()|0)+24>>2]|0)+(e*12|0)|0}function ui(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Ds(l,r),l=zs(l,r)|0,N1[u&31](e,l),m=s}function bl(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],Wi(e,r,l,0),m=u}function Wi(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=uo()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=i0(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,Ts(s,u)|0,u),m=l}function uo(){var e=0,n=0;if(p[7784]|0||(r_(9864),Ht(42,9864,he|0)|0,n=7784,t[n>>2]=1,t[n+4>>2]=0),!(rr(9864)|0)){e=9864,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));r_(9864)}return 9864}function i0(e){return e=e|0,0}function Ts(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=uo()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],wo(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(Rv(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function wo(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function Rv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=X4(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,Sy(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],wo(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Ty(e,D),Qa(D),m=M;return}}function X4(e){return e=e|0,357913941}function Sy(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Ty(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Qa(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function r_(e){e=e|0,Z4(e)}function Q4(e){e=e|0,J4(e+24|0)}function J4(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function Z4(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,8,n,$4()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function $4(){return 1320}function Cy(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=eE(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],tE(n,l,r),m=u}function eE(e){return e=e|0,(t[(uo()|0)+24>>2]|0)+(e*12|0)|0}function tE(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),xy(l,r),l=i_(l,r)|0,N1[u&31](e,l),m=s}function xy(e,n){e=e|0,n=n|0}function i_(e,n){return e=e|0,n=n|0,nE(n)|0}function nE(e){return e=e|0,e|0}function rE(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],u_(e,r,l,0),m=u}function u_(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=Bf()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=o_(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,iE(s,u)|0,u),m=l}function Bf(){var e=0,n=0;if(p[7792]|0||(Oy(9900),Ht(43,9900,he|0)|0,n=7792,t[n>>2]=1,t[n+4>>2]=0),!(rr(9900)|0)){e=9900,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Oy(9900)}return 9900}function o_(e){return e=e|0,0}function iE(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=Bf()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],qp(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(uE(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function qp(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function uE(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=Ov(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,Ay(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],qp(s,u,r),t[S>>2]=(t[S>>2]|0)+12,Ry(e,D),oE(D),m=M;return}}function Ov(e){return e=e|0,357913941}function Ay(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function Ry(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function oE(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function Oy(e){e=e|0,l_(e)}function lE(e){e=e|0,sE(e+24|0)}function sE(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function l_(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,22,n,aE()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function aE(){return 1344}function fE(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0;r=m,m=m+16|0,u=r+8|0,l=r,s=s_(e)|0,e=t[s+4>>2]|0,t[l>>2]=t[s>>2],t[l+4>>2]=e,t[u>>2]=t[l>>2],t[u+4>>2]=t[l+4>>2],kv(n,u),m=r}function s_(e){return e=e|0,(t[(Bf()|0)+24>>2]|0)+(e*12|0)|0}function kv(e,n){e=e|0,n=n|0;var r=0;r=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(r=t[(t[e>>2]|0)+r>>2]|0),M1[r&127](e)}function cE(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=ky()|0,e=dE(r)|0,vi(s,n,l,e,pE(r,u)|0,u)}function ky(){var e=0,n=0;if(p[7800]|0||(Ny(9936),Ht(44,9936,he|0)|0,n=7800,t[n>>2]=1,t[n+4>>2]=0),!(rr(9936)|0)){e=9936,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));Ny(9936)}return 9936}function dE(e){return e=e|0,e|0}function pE(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=ky()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(My(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(a_(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function My(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function a_(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=f_(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,c_(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,My(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,d_(e,l),p_(l),m=D;return}}function f_(e){return e=e|0,536870911}function c_(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function d_(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function p_(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function Ny(e){e=e|0,v_(e)}function h_(e){e=e|0,hE(e+24|0)}function hE(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function v_(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,23,n,Eo()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function vE(e,n){e=e|0,n=n|0,a(t[(mE(e)|0)>>2]|0,n)}function mE(e){return e=e|0,(t[(ky()|0)+24>>2]|0)+(e<<3)|0}function a(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,Jn(u,n),n=Vs(u,n)|0,M1[e&127](n),m=r}function c(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=_()|0,e=T(r)|0,vi(s,n,l,e,R(r,u)|0,u)}function _(){var e=0,n=0;if(p[7808]|0||(pt(9972),Ht(45,9972,he|0)|0,n=7808,t[n>>2]=1,t[n+4>>2]=0),!(rr(9972)|0)){e=9972,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));pt(9972)}return 9972}function T(e){return e=e|0,e|0}function R(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=_()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(j(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(V(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function j(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function V(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=te(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,oe(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,j(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,Ie(e,l),Ye(l),m=D;return}}function te(e){return e=e|0,536870911}function oe(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function Ie(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Ye(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function pt(e){e=e|0,zt(e)}function Nt(e){e=e|0,Vt(e+24|0)}function Vt(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function zt(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,9,n,vn()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function vn(){return 1348}function xr(e,n){return e=e|0,n=n|0,wi(t[($r(e)|0)>>2]|0,n)|0}function $r(e){return e=e|0,(t[(_()|0)+24>>2]|0)+(e<<3)|0}function wi(e,n){e=e|0,n=n|0;var r=0,u=0;return r=m,m=m+16|0,u=r,N0(u,n),n=Vi(u,n)|0,n=D2(Xp[e&31](n)|0)|0,m=r,n|0}function N0(e,n){e=e|0,n=n|0}function Vi(e,n){return e=e|0,n=n|0,it(n)|0}function it(e){return e=e|0,e|0}function Ot(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=Je()|0,e=Bt(r)|0,vi(s,n,l,e,Mn(r,u)|0,u)}function Je(){var e=0,n=0;if(p[7816]|0||(qr(10008),Ht(46,10008,he|0)|0,n=7816,t[n>>2]=1,t[n+4>>2]=0),!(rr(10008)|0)){e=10008,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));qr(10008)}return 10008}function Bt(e){return e=e|0,e|0}function Mn(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=Je()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(pn(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(Pi(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function pn(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function Pi(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=oi(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,qu(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,pn(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,ar(e,l),ou(l),m=D;return}}function oi(e){return e=e|0,536870911}function qu(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function ar(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function ou(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function qr(e){e=e|0,H0(e)}function _u(e){e=e|0,_0(e+24|0)}function _0(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function H0(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,15,n,rp()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Cs(e){return e=e|0,pl(t[(Hu(e)|0)>>2]|0)|0}function Hu(e){return e=e|0,(t[(Je()|0)+24>>2]|0)+(e<<3)|0}function pl(e){return e=e|0,D2(N_[e&7]()|0)|0}function Ja(){var e=0;return p[7832]|0||(y_(10052),Ht(25,10052,he|0)|0,e=7832,t[e>>2]=1,t[e+4>>2]=0),10052}function jo(e,n){e=e|0,n=n|0,t[e>>2]=xs()|0,t[e+4>>2]=X2()|0,t[e+12>>2]=n,t[e+8>>2]=Uf()|0,t[e+32>>2]=2}function xs(){return 11709}function X2(){return 1188}function Uf(){return O1()|0}function Rc(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Pl(u,896)|0)==512?r|0&&(zo(r),yt(r)):n|0&&(ms(n),yt(n))}function Pl(e,n){return e=e|0,n=n|0,n&e|0}function zo(e){e=e|0,e=t[e+4>>2]|0,e|0&&J2(e)}function O1(){var e=0;return p[7824]|0||(t[2511]=m_()|0,t[2512]=0,e=7824,t[e>>2]=1,t[e+4>>2]=0),10044}function m_(){return 0}function y_(e){e=e|0,Ha(e)}function yE(e){e=e|0;var n=0,r=0,u=0,l=0,s=0;n=m,m=m+32|0,r=n+24|0,s=n+16|0,l=n+8|0,u=n,g_(e,4827),gE(e,4834,3)|0,_E(e,3682,47)|0,t[s>>2]=9,t[s+4>>2]=0,t[r>>2]=t[s>>2],t[r+4>>2]=t[s+4>>2],Ly(e,4841,r)|0,t[l>>2]=1,t[l+4>>2]=0,t[r>>2]=t[l>>2],t[r+4>>2]=t[l+4>>2],__(e,4871,r)|0,t[u>>2]=10,t[u+4>>2]=0,t[r>>2]=t[u>>2],t[r+4>>2]=t[u+4>>2],EE(e,4891,r)|0,m=n}function g_(e,n){e=e|0,n=n|0;var r=0;r=Qk()|0,t[e>>2]=r,Jk(r,n),Q2(t[e>>2]|0)}function gE(e,n,r){return e=e|0,n=n|0,r=r|0,Fk(e,Or(n)|0,r,0),e|0}function _E(e,n,r){return e=e|0,n=n|0,r=r|0,_k(e,Or(n)|0,r,0),e|0}function Ly(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],ek(e,n,l),m=u,e|0}function __(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],bO(e,n,l),m=u,e|0}function EE(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=t[r+4>>2]|0,t[s>>2]=t[r>>2],t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],DE(e,n,l),m=u,e|0}function DE(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],wE(e,r,l,1),m=u}function wE(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=SE()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=DO(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,wO(s,u)|0,u),m=l}function SE(){var e=0,n=0;if(p[7840]|0||(L3(10100),Ht(48,10100,he|0)|0,n=7840,t[n>>2]=1,t[n+4>>2]=0),!(rr(10100)|0)){e=10100,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));L3(10100)}return 10100}function DO(e){return e=e|0,0}function wO(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=SE()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],N3(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(SO(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function N3(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function SO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=TO(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,CO(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],N3(s,u,r),t[S>>2]=(t[S>>2]|0)+12,xO(e,D),AO(D),m=M;return}}function TO(e){return e=e|0,357913941}function CO(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function xO(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function AO(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function L3(e){e=e|0,kO(e)}function RO(e){e=e|0,OO(e+24|0)}function OO(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function kO(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,6,n,MO()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function MO(){return 1364}function NO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;return u=m,m=m+16|0,l=u+8|0,s=u,h=LO(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],r=FO(n,l,r)|0,m=u,r|0}function LO(e){return e=e|0,(t[(SE()|0)+24>>2]|0)+(e*12|0)|0}function FO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;return s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),Ds(l,r),l=zs(l,r)|0,l=Ml(ZE[u&15](e,l)|0)|0,m=s,l|0}function bO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],PO(e,r,l,0),m=u}function PO(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=TE()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=IO(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,BO(s,u)|0,u),m=l}function TE(){var e=0,n=0;if(p[7848]|0||(b3(10136),Ht(49,10136,he|0)|0,n=7848,t[n>>2]=1,t[n+4>>2]=0),!(rr(10136)|0)){e=10136,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));b3(10136)}return 10136}function IO(e){return e=e|0,0}function BO(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=TE()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],F3(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(UO(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function F3(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function UO(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=jO(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,zO(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],F3(s,u,r),t[S>>2]=(t[S>>2]|0)+12,qO(e,D),HO(D),m=M;return}}function jO(e){return e=e|0,357913941}function zO(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function qO(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function HO(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function b3(e){e=e|0,GO(e)}function WO(e){e=e|0,VO(e+24|0)}function VO(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function GO(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,9,n,YO()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function YO(){return 1372}function KO(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,l=u+8|0,s=u,h=XO(e)|0,e=t[h+4>>2]|0,t[s>>2]=t[h>>2],t[s+4>>2]=e,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],QO(n,l,r),m=u}function XO(e){return e=e|0,(t[(TE()|0)+24>>2]|0)+(e*12|0)|0}function QO(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0,h=St;s=m,m=m+16|0,l=s,u=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(u=t[(t[e>>2]|0)+u>>2]|0),JO(l,r),h=w(ZO(l,r)),X8[u&1](e,h),m=s}function JO(e,n){e=e|0,n=+n}function ZO(e,n){return e=e|0,n=+n,w($O(n))}function $O(e){return e=+e,w(e)}function ek(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,l=u+8|0,s=u,D=t[r>>2]|0,h=t[r+4>>2]|0,r=Or(n)|0,t[s>>2]=D,t[s+4>>2]=h,t[l>>2]=t[s>>2],t[l+4>>2]=t[s+4>>2],tk(e,r,l,0),m=u}function tk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0,S=0,M=0,O=0;l=m,m=m+32|0,s=l+16|0,O=l+8|0,D=l,M=t[r>>2]|0,S=t[r+4>>2]|0,h=t[e>>2]|0,e=CE()|0,t[O>>2]=M,t[O+4>>2]=S,t[s>>2]=t[O>>2],t[s+4>>2]=t[O+4>>2],r=nk(s)|0,t[D>>2]=M,t[D+4>>2]=S,t[s>>2]=t[D>>2],t[s+4>>2]=t[D+4>>2],vi(h,n,e,r,rk(s,u)|0,u),m=l}function CE(){var e=0,n=0;if(p[7856]|0||(I3(10172),Ht(50,10172,he|0)|0,n=7856,t[n>>2]=1,t[n+4>>2]=0),!(rr(10172)|0)){e=10172,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));I3(10172)}return 10172}function nk(e){return e=e|0,0}function rk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0;return O=m,m=m+32|0,l=O+24|0,h=O+16|0,D=O,S=O+8|0,s=t[e>>2]|0,u=t[e+4>>2]|0,t[D>>2]=s,t[D+4>>2]=u,P=CE()|0,M=P+24|0,e=dn(n,4)|0,t[S>>2]=e,n=P+28|0,r=t[n>>2]|0,r>>>0<(t[P+32>>2]|0)>>>0?(t[h>>2]=s,t[h+4>>2]=u,t[l>>2]=t[h>>2],t[l+4>>2]=t[h+4>>2],P3(r,l,e),e=(t[n>>2]|0)+12|0,t[n>>2]=e):(ik(M,D,S),e=t[n>>2]|0),m=O,((e-(t[M>>2]|0)|0)/12|0)+-1|0}function P3(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=t[n+4>>2]|0,t[e>>2]=t[n>>2],t[e+4>>2]=u,t[e+8>>2]=r}function ik(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;if(M=m,m=m+48|0,u=M+32|0,h=M+24|0,D=M,S=e+4|0,l=(((t[S>>2]|0)-(t[e>>2]|0)|0)/12|0)+1|0,s=uk(e)|0,s>>>0>>0)li(e);else{O=t[e>>2]|0,K=((t[e+8>>2]|0)-O|0)/12|0,P=K<<1,ok(D,K>>>0>>1>>>0?P>>>0>>0?l:P:s,((t[S>>2]|0)-O|0)/12|0,e+8|0),S=D+8|0,s=t[S>>2]|0,l=t[n+4>>2]|0,r=t[r>>2]|0,t[h>>2]=t[n>>2],t[h+4>>2]=l,t[u>>2]=t[h>>2],t[u+4>>2]=t[h+4>>2],P3(s,u,r),t[S>>2]=(t[S>>2]|0)+12,lk(e,D),sk(D),m=M;return}}function uk(e){return e=e|0,357913941}function ok(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>357913941)Xn();else{l=cn(n*12|0)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r*12|0)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n*12|0)}function lk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(((l|0)/-12|0)*12|0)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function sk(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~(((u+-12-n|0)>>>0)/12|0)*12|0)),e=t[e>>2]|0,e|0&&yt(e)}function I3(e){e=e|0,ck(e)}function ak(e){e=e|0,fk(e+24|0)}function fk(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~(((n+-12-u|0)>>>0)/12|0)*12|0)),yt(r))}function ck(e){e=e|0;var n=0;n=dr()|0,Pn(e,2,3,n,dk()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function dk(){return 1380}function pk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,s=l+8|0,h=l,D=hk(e)|0,e=t[D+4>>2]|0,t[h>>2]=t[D>>2],t[h+4>>2]=e,t[s>>2]=t[h>>2],t[s+4>>2]=t[h+4>>2],vk(n,s,r,u),m=l}function hk(e){return e=e|0,(t[(CE()|0)+24>>2]|0)+(e*12|0)|0}function vk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;D=m,m=m+16|0,s=D+1|0,h=D,l=t[n>>2]|0,n=t[n+4>>2]|0,e=e+(n>>1)|0,n&1&&(l=t[(t[e>>2]|0)+l>>2]|0),Ds(s,r),s=zs(s,r)|0,mk(h,u),h=yk(h,u)|0,jy[l&15](e,s,h),m=D}function mk(e,n){e=e|0,n=n|0}function yk(e,n){return e=e|0,n=n|0,gk(n)|0}function gk(e){return e=e|0,(e|0)!=0|0}function _k(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=xE()|0,e=Ek(r)|0,vi(s,n,l,e,Dk(r,u)|0,u)}function xE(){var e=0,n=0;if(p[7864]|0||(U3(10208),Ht(51,10208,he|0)|0,n=7864,t[n>>2]=1,t[n+4>>2]=0),!(rr(10208)|0)){e=10208,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));U3(10208)}return 10208}function Ek(e){return e=e|0,e|0}function Dk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=xE()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(B3(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(wk(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function B3(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function wk(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=Sk(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,Tk(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,B3(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,Ck(e,l),xk(l),m=D;return}}function Sk(e){return e=e|0,536870911}function Tk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function Ck(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function xk(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function U3(e){e=e|0,Ok(e)}function Ak(e){e=e|0,Rk(e+24|0)}function Rk(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function Ok(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,24,n,kk()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function kk(){return 1392}function Mk(e,n){e=e|0,n=n|0,Lk(t[(Nk(e)|0)>>2]|0,n)}function Nk(e){return e=e|0,(t[(xE()|0)+24>>2]|0)+(e<<3)|0}function Lk(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,N0(u,n),n=Vi(u,n)|0,M1[e&127](n),m=r}function Fk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=AE()|0,e=bk(r)|0,vi(s,n,l,e,Pk(r,u)|0,u)}function AE(){var e=0,n=0;if(p[7872]|0||(z3(10244),Ht(52,10244,he|0)|0,n=7872,t[n>>2]=1,t[n+4>>2]=0),!(rr(10244)|0)){e=10244,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));z3(10244)}return 10244}function bk(e){return e=e|0,e|0}function Pk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=AE()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(j3(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(Ik(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function j3(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function Ik(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=Bk(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,Uk(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,j3(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,jk(e,l),zk(l),m=D;return}}function Bk(e){return e=e|0,536870911}function Uk(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function jk(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function zk(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function z3(e){e=e|0,Wk(e)}function qk(e){e=e|0,Hk(e+24|0)}function Hk(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function Wk(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,16,n,Vk()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Vk(){return 1400}function Gk(e){return e=e|0,Kk(t[(Yk(e)|0)>>2]|0)|0}function Yk(e){return e=e|0,(t[(AE()|0)+24>>2]|0)+(e<<3)|0}function Kk(e){return e=e|0,Xk(N_[e&7]()|0)|0}function Xk(e){return e=e|0,e|0}function Qk(){var e=0;return p[7880]|0||(rM(10280),Ht(25,10280,he|0)|0,e=7880,t[e>>2]=1,t[e+4>>2]=0),10280}function Jk(e,n){e=e|0,n=n|0,t[e>>2]=Zk()|0,t[e+4>>2]=$k()|0,t[e+12>>2]=n,t[e+8>>2]=eM()|0,t[e+32>>2]=4}function Zk(){return 11711}function $k(){return 1356}function eM(){return O1()|0}function tM(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Pl(u,896)|0)==512?r|0&&(nM(r),yt(r)):n|0&&(eo(n),yt(n))}function nM(e){e=e|0,e=t[e+4>>2]|0,e|0&&J2(e)}function rM(e){e=e|0,Ha(e)}function iM(e){e=e|0,uM(e,4920),oM(e)|0,lM(e)|0}function uM(e,n){e=e|0,n=n|0;var r=0;r=j2()|0,t[e>>2]=r,RM(r,n),Q2(t[e>>2]|0)}function oM(e){e=e|0;var n=0;return n=t[e>>2]|0,Hp(n,gM()|0),e|0}function lM(e){e=e|0;var n=0;return n=t[e>>2]|0,Hp(n,sM()|0),e|0}function sM(){var e=0;return p[7888]|0||(q3(10328),Ht(53,10328,he|0)|0,e=7888,t[e>>2]=1,t[e+4>>2]=0),rr(10328)|0||q3(10328),10328}function Hp(e,n){e=e|0,n=n|0,vi(e,0,n,0,0,0)}function q3(e){e=e|0,cM(e),Wp(e,10)}function aM(e){e=e|0,fM(e+24|0)}function fM(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function cM(e){e=e|0;var n=0;n=dr()|0,Pn(e,5,1,n,vM()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function dM(e,n,r){e=e|0,n=n|0,r=+r,pM(e,n,r)}function Wp(e,n){e=e|0,n=n|0,t[e+20>>2]=n}function pM(e,n,r){e=e|0,n=n|0,r=+r;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+16|0,s=u+8|0,D=u+13|0,l=u,h=u+12|0,Ds(D,n),t[s>>2]=zs(D,n)|0,Ol(h,r),U[l>>3]=+es(h,r),hM(e,s,l),m=u}function hM(e,n,r){e=e|0,n=n|0,r=r|0,I(e+8|0,t[n>>2]|0,+U[r>>3]),p[e+24>>0]=1}function vM(){return 1404}function mM(e,n){return e=e|0,n=+n,yM(e,n)|0}function yM(e,n){e=e|0,n=+n;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return u=m,m=m+16|0,s=u+4|0,h=u+8|0,D=u,l=Sa(8)|0,r=l,S=cn(16)|0,Ds(s,e),e=zs(s,e)|0,Ol(h,n),I(S,e,+es(h,n)),h=r+4|0,t[h>>2]=S,e=cn(8)|0,h=t[h>>2]|0,t[D>>2]=0,t[s>>2]=t[D>>2],Nf(e,h,s),t[l>>2]=e,m=u,r|0}function gM(){var e=0;return p[7896]|0||(H3(10364),Ht(54,10364,he|0)|0,e=7896,t[e>>2]=1,t[e+4>>2]=0),rr(10364)|0||H3(10364),10364}function H3(e){e=e|0,DM(e),Wp(e,55)}function _M(e){e=e|0,EM(e+24|0)}function EM(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function DM(e){e=e|0;var n=0;n=dr()|0,Pn(e,5,4,n,CM()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function wM(e){e=e|0,SM(e)}function SM(e){e=e|0,TM(e)}function TM(e){e=e|0,W3(e+8|0),p[e+24>>0]=1}function W3(e){e=e|0,t[e>>2]=0,U[e+8>>3]=0}function CM(){return 1424}function xM(){return AM()|0}function AM(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0;return n=m,m=m+16|0,l=n+4|0,h=n,r=Sa(8)|0,e=r,u=cn(16)|0,W3(u),s=e+4|0,t[s>>2]=u,u=cn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],Nf(u,s,l),t[r>>2]=u,m=n,e|0}function RM(e,n){e=e|0,n=n|0,t[e>>2]=OM()|0,t[e+4>>2]=kM()|0,t[e+12>>2]=n,t[e+8>>2]=MM()|0,t[e+32>>2]=5}function OM(){return 11710}function kM(){return 1416}function MM(){return E_()|0}function NM(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Pl(u,896)|0)==512?r|0&&(LM(r),yt(r)):n|0&&yt(n)}function LM(e){e=e|0,e=t[e+4>>2]|0,e|0&&J2(e)}function E_(){var e=0;return p[7904]|0||(t[2600]=FM()|0,t[2601]=0,e=7904,t[e>>2]=1,t[e+4>>2]=0),10400}function FM(){return t[357]|0}function bM(e){e=e|0,PM(e,4926),IM(e)|0}function PM(e,n){e=e|0,n=n|0;var r=0;r=qa()|0,t[e>>2]=r,KM(r,n),Q2(t[e>>2]|0)}function IM(e){e=e|0;var n=0;return n=t[e>>2]|0,Hp(n,BM()|0),e|0}function BM(){var e=0;return p[7912]|0||(V3(10412),Ht(56,10412,he|0)|0,e=7912,t[e>>2]=1,t[e+4>>2]=0),rr(10412)|0||V3(10412),10412}function V3(e){e=e|0,zM(e),Wp(e,57)}function UM(e){e=e|0,jM(e+24|0)}function jM(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function zM(e){e=e|0;var n=0;n=dr()|0,Pn(e,5,5,n,VM()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function qM(e){e=e|0,HM(e)}function HM(e){e=e|0,WM(e)}function WM(e){e=e|0;var n=0,r=0;n=e+8|0,r=n+48|0;do t[n>>2]=0,n=n+4|0;while((n|0)<(r|0));p[e+56>>0]=1}function VM(){return 1432}function GM(){return YM()|0}function YM(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0,D=0;h=m,m=m+16|0,e=h+4|0,n=h,r=Sa(8)|0,u=r,l=cn(48)|0,s=l,D=s+48|0;do t[s>>2]=0,s=s+4|0;while((s|0)<(D|0));return s=u+4|0,t[s>>2]=l,D=cn(8)|0,s=t[s>>2]|0,t[n>>2]=0,t[e>>2]=t[n>>2],Dh(D,s,e),t[r>>2]=D,m=h,u|0}function KM(e,n){e=e|0,n=n|0,t[e>>2]=XM()|0,t[e+4>>2]=QM()|0,t[e+12>>2]=n,t[e+8>>2]=JM()|0,t[e+32>>2]=6}function XM(){return 11704}function QM(){return 1436}function JM(){return E_()|0}function ZM(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Pl(u,896)|0)==512?r|0&&($M(r),yt(r)):n|0&&yt(n)}function $M(e){e=e|0,e=t[e+4>>2]|0,e|0&&J2(e)}function eN(e){e=e|0,tN(e,4933),nN(e)|0,rN(e)|0}function tN(e,n){e=e|0,n=n|0;var r=0;r=AN()|0,t[e>>2]=r,RN(r,n),Q2(t[e>>2]|0)}function nN(e){e=e|0;var n=0;return n=t[e>>2]|0,Hp(n,yN()|0),e|0}function rN(e){e=e|0;var n=0;return n=t[e>>2]|0,Hp(n,iN()|0),e|0}function iN(){var e=0;return p[7920]|0||(G3(10452),Ht(58,10452,he|0)|0,e=7920,t[e>>2]=1,t[e+4>>2]=0),rr(10452)|0||G3(10452),10452}function G3(e){e=e|0,lN(e),Wp(e,1)}function uN(e){e=e|0,oN(e+24|0)}function oN(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function lN(e){e=e|0;var n=0;n=dr()|0,Pn(e,5,1,n,cN()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function sN(e,n,r){e=e|0,n=+n,r=+r,aN(e,n,r)}function aN(e,n,r){e=e|0,n=+n,r=+r;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+32|0,s=u+8|0,D=u+17|0,l=u,h=u+16|0,Ol(D,n),U[s>>3]=+es(D,n),Ol(h,r),U[l>>3]=+es(h,r),fN(e,s,l),m=u}function fN(e,n,r){e=e|0,n=n|0,r=r|0,Y3(e+8|0,+U[n>>3],+U[r>>3]),p[e+24>>0]=1}function Y3(e,n,r){e=e|0,n=+n,r=+r,U[e>>3]=n,U[e+8>>3]=r}function cN(){return 1472}function dN(e,n){return e=+e,n=+n,pN(e,n)|0}function pN(e,n){e=+e,n=+n;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return u=m,m=m+16|0,h=u+4|0,D=u+8|0,S=u,l=Sa(8)|0,r=l,s=cn(16)|0,Ol(h,e),e=+es(h,e),Ol(D,n),Y3(s,e,+es(D,n)),D=r+4|0,t[D>>2]=s,s=cn(8)|0,D=t[D>>2]|0,t[S>>2]=0,t[h>>2]=t[S>>2],K3(s,D,h),t[l>>2]=s,m=u,r|0}function K3(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=cn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1452,t[r+12>>2]=n,t[e+4>>2]=r}function hN(e){e=e|0,Pv(e),yt(e)}function vN(e){e=e|0,e=t[e+12>>2]|0,e|0&&yt(e)}function mN(e){e=e|0,yt(e)}function yN(){var e=0;return p[7928]|0||(X3(10488),Ht(59,10488,he|0)|0,e=7928,t[e>>2]=1,t[e+4>>2]=0),rr(10488)|0||X3(10488),10488}function X3(e){e=e|0,EN(e),Wp(e,60)}function gN(e){e=e|0,_N(e+24|0)}function _N(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function EN(e){e=e|0;var n=0;n=dr()|0,Pn(e,5,6,n,TN()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function DN(e){e=e|0,wN(e)}function wN(e){e=e|0,SN(e)}function SN(e){e=e|0,Q3(e+8|0),p[e+24>>0]=1}function Q3(e){e=e|0,t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,t[e+12>>2]=0}function TN(){return 1492}function CN(){return xN()|0}function xN(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0;return n=m,m=m+16|0,l=n+4|0,h=n,r=Sa(8)|0,e=r,u=cn(16)|0,Q3(u),s=e+4|0,t[s>>2]=u,u=cn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],K3(u,s,l),t[r>>2]=u,m=n,e|0}function AN(){var e=0;return p[7936]|0||(FN(10524),Ht(25,10524,he|0)|0,e=7936,t[e>>2]=1,t[e+4>>2]=0),10524}function RN(e,n){e=e|0,n=n|0,t[e>>2]=ON()|0,t[e+4>>2]=kN()|0,t[e+12>>2]=n,t[e+8>>2]=MN()|0,t[e+32>>2]=7}function ON(){return 11700}function kN(){return 1484}function MN(){return E_()|0}function NN(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Pl(u,896)|0)==512?r|0&&(LN(r),yt(r)):n|0&&yt(n)}function LN(e){e=e|0,e=t[e+4>>2]|0,e|0&&J2(e)}function FN(e){e=e|0,Ha(e)}function bN(e,n,r){e=e|0,n=n|0,r=r|0,e=Or(n)|0,n=PN(r)|0,r=IN(r,0)|0,pL(e,n,r,RE()|0,0)}function PN(e){return e=e|0,e|0}function IN(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=RE()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(Z3(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(WN(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function RE(){var e=0,n=0;if(p[7944]|0||(J3(10568),Ht(61,10568,he|0)|0,n=7944,t[n>>2]=1,t[n+4>>2]=0),!(rr(10568)|0)){e=10568,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));J3(10568)}return 10568}function J3(e){e=e|0,jN(e)}function BN(e){e=e|0,UN(e+24|0)}function UN(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function jN(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,17,n,Jh()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function zN(e){return e=e|0,HN(t[(qN(e)|0)>>2]|0)|0}function qN(e){return e=e|0,(t[(RE()|0)+24>>2]|0)+(e<<3)|0}function HN(e){return e=e|0,z0(N_[e&7]()|0)|0}function Z3(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function WN(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=VN(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,GN(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,Z3(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,YN(e,l),KN(l),m=D;return}}function VN(e){return e=e|0,536870911}function GN(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function YN(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function KN(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function XN(){QN()}function QN(){JN(10604)}function JN(e){e=e|0,ZN(e,4955)}function ZN(e,n){e=e|0,n=n|0;var r=0;r=$N()|0,t[e>>2]=r,eL(r,n),Q2(t[e>>2]|0)}function $N(){var e=0;return p[7952]|0||(aL(10612),Ht(25,10612,he|0)|0,e=7952,t[e>>2]=1,t[e+4>>2]=0),10612}function eL(e,n){e=e|0,n=n|0,t[e>>2]=iL()|0,t[e+4>>2]=uL()|0,t[e+12>>2]=n,t[e+8>>2]=oL()|0,t[e+32>>2]=8}function Q2(e){e=e|0;var n=0,r=0;n=m,m=m+16|0,r=n,Mv()|0,t[r>>2]=e,tL(10608,r),m=n}function Mv(){return p[11714]|0||(t[2652]=0,Ht(62,10608,he|0)|0,p[11714]=1),10608}function tL(e,n){e=e|0,n=n|0;var r=0;r=cn(8)|0,t[r+4>>2]=t[n>>2],t[r>>2]=t[e>>2],t[e>>2]=r}function nL(e){e=e|0,rL(e)}function rL(e){e=e|0;var n=0,r=0;if(n=t[e>>2]|0,n|0)do r=n,n=t[n>>2]|0,yt(r);while((n|0)!=0);t[e>>2]=0}function iL(){return 11715}function uL(){return 1496}function oL(){return O1()|0}function lL(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Pl(u,896)|0)==512?r|0&&(sL(r),yt(r)):n|0&&yt(n)}function sL(e){e=e|0,e=t[e+4>>2]|0,e|0&&J2(e)}function aL(e){e=e|0,Ha(e)}function fL(e,n){e=e|0,n=n|0;var r=0,u=0;Mv()|0,r=t[2652]|0;e:do if(r|0){for(;u=t[r+4>>2]|0,!(u|0?(L8(OE(u)|0,e)|0)==0:0);)if(r=t[r>>2]|0,!r)break e;cL(u,n)}while(0)}function OE(e){return e=e|0,t[e+12>>2]|0}function cL(e,n){e=e|0,n=n|0;var r=0;e=e+36|0,r=t[e>>2]|0,r|0&&(ia(r),yt(r)),r=cn(4)|0,mf(r,n),t[e>>2]=r}function kE(){return p[11716]|0||(t[2664]=0,Ht(63,10656,he|0)|0,p[11716]=1),10656}function $3(){var e=0;return p[11717]|0?e=t[2665]|0:(dL(),t[2665]=1504,p[11717]=1,e=1504),e|0}function dL(){p[11740]|0||(p[11718]=dn(dn(8,0)|0,0)|0,p[11719]=dn(dn(0,0)|0,0)|0,p[11720]=dn(dn(0,16)|0,0)|0,p[11721]=dn(dn(8,0)|0,0)|0,p[11722]=dn(dn(0,0)|0,0)|0,p[11723]=dn(dn(8,0)|0,0)|0,p[11724]=dn(dn(0,0)|0,0)|0,p[11725]=dn(dn(8,0)|0,0)|0,p[11726]=dn(dn(0,0)|0,0)|0,p[11727]=dn(dn(8,0)|0,0)|0,p[11728]=dn(dn(0,0)|0,0)|0,p[11729]=dn(dn(0,0)|0,32)|0,p[11730]=dn(dn(0,0)|0,32)|0,p[11740]=1)}function e8(){return 1572}function pL(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,M=0,O=0;s=m,m=m+32|0,O=s+16|0,M=s+12|0,S=s+8|0,D=s+4|0,h=s,t[O>>2]=e,t[M>>2]=n,t[S>>2]=r,t[D>>2]=u,t[h>>2]=l,kE()|0,hL(10656,O,M,S,D,h),m=s}function hL(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0;h=cn(24)|0,h2(h+4|0,t[n>>2]|0,t[r>>2]|0,t[u>>2]|0,t[l>>2]|0,t[s>>2]|0),t[h>>2]=t[e>>2],t[e>>2]=h}function t8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0,Ee=0,ve=0,Qe=0,We=0,st=0;if(st=m,m=m+32|0,Ee=st+20|0,ve=st+8|0,Qe=st+4|0,We=st,n=t[n>>2]|0,n|0){Pe=Ee+4|0,S=Ee+8|0,M=ve+4|0,O=ve+8|0,P=ve+8|0,K=Ee+8|0;do{if(h=n+4|0,D=ME(h)|0,D|0){if(l=Fy(D)|0,t[Ee>>2]=0,t[Pe>>2]=0,t[S>>2]=0,u=(by(D)|0)+1|0,vL(Ee,u),u|0)for(;u=u+-1|0,jf(ve,t[l>>2]|0),s=t[Pe>>2]|0,s>>>0<(t[K>>2]|0)>>>0?(t[s>>2]=t[ve>>2],t[Pe>>2]=(t[Pe>>2]|0)+4):NE(Ee,ve),u;)l=l+4|0;u=Py(D)|0,t[ve>>2]=0,t[M>>2]=0,t[O>>2]=0;e:do if(t[u>>2]|0)for(l=0,s=0;;){if((l|0)==(s|0)?mL(ve,u):(t[l>>2]=t[u>>2],t[M>>2]=(t[M>>2]|0)+4),u=u+4|0,!(t[u>>2]|0))break e;l=t[M>>2]|0,s=t[P>>2]|0}while(0);t[Qe>>2]=D_(h)|0,t[We>>2]=rr(D)|0,yL(r,e,Qe,We,Ee,ve),LE(ve),k1(Ee)}n=t[n>>2]|0}while((n|0)!=0)}m=st}function ME(e){return e=e|0,t[e+12>>2]|0}function Fy(e){return e=e|0,t[e+12>>2]|0}function by(e){return e=e|0,t[e+16>>2]|0}function vL(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;l=m,m=m+32|0,r=l,u=t[e>>2]|0,(t[e+8>>2]|0)-u>>2>>>0>>0&&(a8(r,n,(t[e+4>>2]|0)-u>>2,e+8|0),f8(e,r),c8(r)),m=l}function NE(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0;if(h=m,m=m+32|0,r=h,u=e+4|0,l=((t[u>>2]|0)-(t[e>>2]|0)>>2)+1|0,s=s8(e)|0,s>>>0>>0)li(e);else{D=t[e>>2]|0,M=(t[e+8>>2]|0)-D|0,S=M>>1,a8(r,M>>2>>>0>>1>>>0?S>>>0>>0?l:S:s,(t[u>>2]|0)-D>>2,e+8|0),s=r+8|0,t[t[s>>2]>>2]=t[n>>2],t[s>>2]=(t[s>>2]|0)+4,f8(e,r),c8(r),m=h;return}}function Py(e){return e=e|0,t[e+8>>2]|0}function mL(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0;if(h=m,m=m+32|0,r=h,u=e+4|0,l=((t[u>>2]|0)-(t[e>>2]|0)>>2)+1|0,s=l8(e)|0,s>>>0>>0)li(e);else{D=t[e>>2]|0,M=(t[e+8>>2]|0)-D|0,S=M>>1,PL(r,M>>2>>>0>>1>>>0?S>>>0>>0?l:S:s,(t[u>>2]|0)-D>>2,e+8|0),s=r+8|0,t[t[s>>2]>>2]=t[n>>2],t[s>>2]=(t[s>>2]|0)+4,IL(e,r),BL(r),m=h;return}}function D_(e){return e=e|0,t[e>>2]|0}function yL(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,gL(e,n,r,u,l,s)}function LE(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-4-u|0)>>>2)<<2)),yt(r))}function k1(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-4-u|0)>>>2)<<2)),yt(r))}function gL(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,M=0,O=0,P=0;h=m,m=m+48|0,O=h+40|0,D=h+32|0,P=h+24|0,S=h+12|0,M=h,Ta(D),e=vo(e)|0,t[P>>2]=t[n>>2],r=t[r>>2]|0,u=t[u>>2]|0,FE(S,l),_L(M,s),t[O>>2]=t[P>>2],EL(e,O,r,u,S,M),LE(M),k1(S),Ca(D),m=h}function FE(e,n){e=e|0,n=n|0;var r=0,u=0;t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,r=n+4|0,u=(t[r>>2]|0)-(t[n>>2]|0)>>2,u|0&&(FL(e,u),bL(e,t[n>>2]|0,t[r>>2]|0,u))}function _L(e,n){e=e|0,n=n|0;var r=0,u=0;t[e>>2]=0,t[e+4>>2]=0,t[e+8>>2]=0,r=n+4|0,u=(t[r>>2]|0)-(t[n>>2]|0)>>2,u|0&&(NL(e,u),LL(e,t[n>>2]|0,t[r>>2]|0,u))}function EL(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,M=0,O=0,P=0;h=m,m=m+32|0,O=h+28|0,P=h+24|0,D=h+12|0,S=h,M=mo(DL()|0)|0,t[P>>2]=t[n>>2],t[O>>2]=t[P>>2],n=Vp(O)|0,r=n8(r)|0,u=bE(u)|0,t[D>>2]=t[l>>2],O=l+4|0,t[D+4>>2]=t[O>>2],P=l+8|0,t[D+8>>2]=t[P>>2],t[P>>2]=0,t[O>>2]=0,t[l>>2]=0,l=PE(D)|0,t[S>>2]=t[s>>2],O=s+4|0,t[S+4>>2]=t[O>>2],P=s+8|0,t[S+8>>2]=t[P>>2],t[P>>2]=0,t[O>>2]=0,t[s>>2]=0,G0(0,M|0,e|0,n|0,r|0,u|0,l|0,wL(S)|0)|0,LE(S),k1(D),m=h}function DL(){var e=0;return p[7968]|0||(kL(10708),e=7968,t[e>>2]=1,t[e+4>>2]=0),10708}function Vp(e){return e=e|0,i8(e)|0}function n8(e){return e=e|0,r8(e)|0}function bE(e){return e=e|0,z0(e)|0}function PE(e){return e=e|0,TL(e)|0}function wL(e){return e=e|0,SL(e)|0}function SL(e){e=e|0;var n=0,r=0,u=0;if(u=(t[e+4>>2]|0)-(t[e>>2]|0)|0,r=u>>2,u=Sa(u+4|0)|0,t[u>>2]=r,r|0){n=0;do t[u+4+(n<<2)>>2]=r8(t[(t[e>>2]|0)+(n<<2)>>2]|0)|0,n=n+1|0;while((n|0)!=(r|0))}return u|0}function r8(e){return e=e|0,e|0}function TL(e){e=e|0;var n=0,r=0,u=0;if(u=(t[e+4>>2]|0)-(t[e>>2]|0)|0,r=u>>2,u=Sa(u+4|0)|0,t[u>>2]=r,r|0){n=0;do t[u+4+(n<<2)>>2]=i8((t[e>>2]|0)+(n<<2)|0)|0,n=n+1|0;while((n|0)!=(r|0))}return u|0}function i8(e){e=e|0;var n=0,r=0,u=0,l=0;return l=m,m=m+32|0,n=l+12|0,r=l,u=Ou(u8()|0)|0,u?(Zl(n,u),Tf(r,n),lI(e,r),e=Es(n)|0):e=CL(e)|0,m=l,e|0}function u8(){var e=0;return p[7960]|0||(OL(10664),Ht(25,10664,he|0)|0,e=7960,t[e>>2]=1,t[e+4>>2]=0),10664}function CL(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0;return r=m,m=m+16|0,l=r+4|0,h=r,u=Sa(8)|0,n=u,D=cn(4)|0,t[D>>2]=t[e>>2],s=n+4|0,t[s>>2]=D,e=cn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],o8(e,s,l),t[u>>2]=e,m=r,n|0}function o8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=cn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1656,t[r+12>>2]=n,t[e+4>>2]=r}function xL(e){e=e|0,Pv(e),yt(e)}function AL(e){e=e|0,e=t[e+12>>2]|0,e|0&&yt(e)}function RL(e){e=e|0,yt(e)}function OL(e){e=e|0,Ha(e)}function kL(e){e=e|0,nl(e,ML()|0,5)}function ML(){return 1676}function NL(e,n){e=e|0,n=n|0;var r=0;if((l8(e)|0)>>>0>>0&&li(e),n>>>0>1073741823)Xn();else{r=cn(n<<2)|0,t[e+4>>2]=r,t[e>>2]=r,t[e+8>>2]=r+(n<<2);return}}function LL(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,u=e+4|0,e=r-n|0,(e|0)>0&&(pr(t[u>>2]|0,n|0,e|0)|0,t[u>>2]=(t[u>>2]|0)+(e>>>2<<2))}function l8(e){return e=e|0,1073741823}function FL(e,n){e=e|0,n=n|0;var r=0;if((s8(e)|0)>>>0>>0&&li(e),n>>>0>1073741823)Xn();else{r=cn(n<<2)|0,t[e+4>>2]=r,t[e>>2]=r,t[e+8>>2]=r+(n<<2);return}}function bL(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,u=e+4|0,e=r-n|0,(e|0)>0&&(pr(t[u>>2]|0,n|0,e|0)|0,t[u>>2]=(t[u>>2]|0)+(e>>>2<<2))}function s8(e){return e=e|0,1073741823}function PL(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>1073741823)Xn();else{l=cn(n<<2)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<2)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<2)}function IL(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>2)<<2)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function BL(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-4-n|0)>>>2)<<2)),e=t[e>>2]|0,e|0&&yt(e)}function a8(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>1073741823)Xn();else{l=cn(n<<2)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<2)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<2)}function f8(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>2)<<2)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function c8(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-4-n|0)>>>2)<<2)),e=t[e>>2]|0,e|0&&yt(e)}function UL(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0,Ee=0,ve=0;if(ve=m,m=m+32|0,O=ve+20|0,P=ve+12|0,M=ve+16|0,K=ve+4|0,Pe=ve,Ee=ve+8|0,D=$3()|0,s=t[D>>2]|0,h=t[s>>2]|0,h|0)for(S=t[D+8>>2]|0,D=t[D+4>>2]|0;jf(O,h),jL(e,O,D,S),s=s+4|0,h=t[s>>2]|0,h;)S=S+1|0,D=D+1|0;if(s=e8()|0,h=t[s>>2]|0,h|0)do jf(O,h),t[P>>2]=t[s+4>>2],zL(n,O,P),s=s+8|0,h=t[s>>2]|0;while((h|0)!=0);if(s=t[(Mv()|0)>>2]|0,s|0)do n=t[s+4>>2]|0,jf(O,t[(Nv(n)|0)>>2]|0),t[P>>2]=OE(n)|0,qL(r,O,P),s=t[s>>2]|0;while((s|0)!=0);if(jf(M,0),s=kE()|0,t[O>>2]=t[M>>2],t8(O,s,l),s=t[(Mv()|0)>>2]|0,s|0){e=O+4|0,n=O+8|0,r=O+8|0;do{if(S=t[s+4>>2]|0,jf(P,t[(Nv(S)|0)>>2]|0),HL(K,d8(S)|0),h=t[K>>2]|0,h|0){t[O>>2]=0,t[e>>2]=0,t[n>>2]=0;do jf(Pe,t[(Nv(t[h+4>>2]|0)|0)>>2]|0),D=t[e>>2]|0,D>>>0<(t[r>>2]|0)>>>0?(t[D>>2]=t[Pe>>2],t[e>>2]=(t[e>>2]|0)+4):NE(O,Pe),h=t[h>>2]|0;while((h|0)!=0);WL(u,P,O),k1(O)}t[Ee>>2]=t[P>>2],M=p8(S)|0,t[O>>2]=t[Ee>>2],t8(O,M,l),m2(K),s=t[s>>2]|0}while((s|0)!=0)}m=ve}function jL(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,rF(e,n,r,u)}function zL(e,n,r){e=e|0,n=n|0,r=r|0,nF(e,n,r)}function Nv(e){return e=e|0,e|0}function qL(e,n,r){e=e|0,n=n|0,r=r|0,ZL(e,n,r)}function d8(e){return e=e|0,e+16|0}function HL(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;if(s=m,m=m+16|0,l=s+8|0,r=s,t[e>>2]=0,u=t[n>>2]|0,t[l>>2]=u,t[r>>2]=e,r=JL(r)|0,u|0){if(u=cn(12)|0,h=(h8(l)|0)+4|0,e=t[h+4>>2]|0,n=u+4|0,t[n>>2]=t[h>>2],t[n+4>>2]=e,n=t[t[l>>2]>>2]|0,t[l>>2]=n,!n)e=u;else for(n=u;e=cn(12)|0,S=(h8(l)|0)+4|0,D=t[S+4>>2]|0,h=e+4|0,t[h>>2]=t[S>>2],t[h+4>>2]=D,t[n>>2]=e,h=t[t[l>>2]>>2]|0,t[l>>2]=h,h;)n=e;t[e>>2]=t[r>>2],t[r>>2]=u}m=s}function WL(e,n,r){e=e|0,n=n|0,r=r|0,VL(e,n,r)}function p8(e){return e=e|0,e+24|0}function VL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+32|0,h=u+24|0,l=u+16|0,D=u+12|0,s=u,Ta(l),e=vo(e)|0,t[D>>2]=t[n>>2],FE(s,r),t[h>>2]=t[D>>2],YL(e,h,s),k1(s),Ca(l),m=u}function YL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=m,m=m+32|0,h=u+16|0,D=u+12|0,l=u,s=mo(KL()|0)|0,t[D>>2]=t[n>>2],t[h>>2]=t[D>>2],n=Vp(h)|0,t[l>>2]=t[r>>2],h=r+4|0,t[l+4>>2]=t[h>>2],D=r+8|0,t[l+8>>2]=t[D>>2],t[D>>2]=0,t[h>>2]=0,t[r>>2]=0,F0(0,s|0,e|0,n|0,PE(l)|0)|0,k1(l),m=u}function KL(){var e=0;return p[7976]|0||(XL(10720),e=7976,t[e>>2]=1,t[e+4>>2]=0),10720}function XL(e){e=e|0,nl(e,QL()|0,2)}function QL(){return 1732}function JL(e){return e=e|0,t[e>>2]|0}function h8(e){return e=e|0,t[e>>2]|0}function ZL(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+32|0,s=u+16|0,l=u+8|0,h=u,Ta(l),e=vo(e)|0,t[h>>2]=t[n>>2],r=t[r>>2]|0,t[s>>2]=t[h>>2],v8(e,s,r),Ca(l),m=u}function v8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+16|0,s=u+4|0,h=u,l=mo($L()|0)|0,t[h>>2]=t[n>>2],t[s>>2]=t[h>>2],n=Vp(s)|0,F0(0,l|0,e|0,n|0,n8(r)|0)|0,m=u}function $L(){var e=0;return p[7984]|0||(eF(10732),e=7984,t[e>>2]=1,t[e+4>>2]=0),10732}function eF(e){e=e|0,nl(e,tF()|0,2)}function tF(){return 1744}function nF(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;u=m,m=m+32|0,s=u+16|0,l=u+8|0,h=u,Ta(l),e=vo(e)|0,t[h>>2]=t[n>>2],r=t[r>>2]|0,t[s>>2]=t[h>>2],v8(e,s,r),Ca(l),m=u}function rF(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+32|0,h=l+16|0,s=l+8|0,D=l,Ta(s),e=vo(e)|0,t[D>>2]=t[n>>2],r=p[r>>0]|0,u=p[u>>0]|0,t[h>>2]=t[D>>2],iF(e,h,r,u),Ca(s),m=l}function iF(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,h=l+4|0,D=l,s=mo(uF()|0)|0,t[D>>2]=t[n>>2],t[h>>2]=t[D>>2],n=Vp(h)|0,r=Lv(r)|0,Bn(0,s|0,e|0,n|0,r|0,Lv(u)|0)|0,m=l}function uF(){var e=0;return p[7992]|0||(lF(10744),e=7992,t[e>>2]=1,t[e+4>>2]=0),10744}function Lv(e){return e=e|0,oF(e)|0}function oF(e){return e=e|0,e&255|0}function lF(e){e=e|0,nl(e,sF()|0,3)}function sF(){return 1756}function aF(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;switch(K=m,m=m+32|0,D=K+8|0,S=K+4|0,M=K+20|0,O=K,ma(e,0),u=oI(n)|0,t[D>>2]=0,P=D+4|0,t[P>>2]=0,t[D+8>>2]=0,u<<24>>24){case 0:{p[M>>0]=0,fF(S,r,M),w_(e,S)|0,B0(S);break}case 8:{P=qE(n)|0,p[M>>0]=8,jf(O,t[P+4>>2]|0),cF(S,r,M,O,P+8|0),w_(e,S)|0,B0(S);break}case 9:{if(s=qE(n)|0,n=t[s+4>>2]|0,n|0)for(h=D+8|0,l=s+12|0;n=n+-1|0,jf(S,t[l>>2]|0),u=t[P>>2]|0,u>>>0<(t[h>>2]|0)>>>0?(t[u>>2]=t[S>>2],t[P>>2]=(t[P>>2]|0)+4):NE(D,S),n;)l=l+4|0;p[M>>0]=9,jf(O,t[s+8>>2]|0),dF(S,r,M,O,D),w_(e,S)|0,B0(S);break}default:P=qE(n)|0,p[M>>0]=u,jf(O,t[P+4>>2]|0),pF(S,r,M,O),w_(e,S)|0,B0(S)}k1(D),m=K}function fF(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;u=m,m=m+16|0,l=u,Ta(l),n=vo(n)|0,xF(e,n,p[r>>0]|0),Ca(l),m=u}function w_(e,n){e=e|0,n=n|0;var r=0;return r=t[e>>2]|0,r|0&&Ir(r|0),t[e>>2]=t[n>>2],t[n>>2]=0,e|0}function cF(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0;s=m,m=m+32|0,D=s+16|0,h=s+8|0,S=s,Ta(h),n=vo(n)|0,r=p[r>>0]|0,t[S>>2]=t[u>>2],l=t[l>>2]|0,t[D>>2]=t[S>>2],wF(e,n,r,D,l),Ca(h),m=s}function dF(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,M=0;s=m,m=m+32|0,S=s+24|0,h=s+16|0,M=s+12|0,D=s,Ta(h),n=vo(n)|0,r=p[r>>0]|0,t[M>>2]=t[u>>2],FE(D,l),t[S>>2]=t[M>>2],gF(e,n,r,S,D),k1(D),Ca(h),m=s}function pF(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+32|0,h=l+16|0,s=l+8|0,D=l,Ta(s),n=vo(n)|0,r=p[r>>0]|0,t[D>>2]=t[u>>2],t[h>>2]=t[D>>2],hF(e,n,r,h),Ca(s),m=l}function hF(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0,h=0,D=0;l=m,m=m+16|0,s=l+4|0,D=l,h=mo(vF()|0)|0,r=Lv(r)|0,t[D>>2]=t[u>>2],t[s>>2]=t[D>>2],S_(e,F0(0,h|0,n|0,r|0,Vp(s)|0)|0),m=l}function vF(){var e=0;return p[8e3]|0||(mF(10756),e=8e3,t[e>>2]=1,t[e+4>>2]=0),10756}function S_(e,n){e=e|0,n=n|0,ma(e,n)}function mF(e){e=e|0,nl(e,yF()|0,2)}function yF(){return 1772}function gF(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,M=0;s=m,m=m+32|0,S=s+16|0,M=s+12|0,h=s,D=mo(_F()|0)|0,r=Lv(r)|0,t[M>>2]=t[u>>2],t[S>>2]=t[M>>2],u=Vp(S)|0,t[h>>2]=t[l>>2],S=l+4|0,t[h+4>>2]=t[S>>2],M=l+8|0,t[h+8>>2]=t[M>>2],t[M>>2]=0,t[S>>2]=0,t[l>>2]=0,S_(e,Bn(0,D|0,n|0,r|0,u|0,PE(h)|0)|0),k1(h),m=s}function _F(){var e=0;return p[8008]|0||(EF(10768),e=8008,t[e>>2]=1,t[e+4>>2]=0),10768}function EF(e){e=e|0,nl(e,DF()|0,3)}function DF(){return 1784}function wF(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0;s=m,m=m+16|0,D=s+4|0,S=s,h=mo(SF()|0)|0,r=Lv(r)|0,t[S>>2]=t[u>>2],t[D>>2]=t[S>>2],u=Vp(D)|0,S_(e,Bn(0,h|0,n|0,r|0,u|0,bE(l)|0)|0),m=s}function SF(){var e=0;return p[8016]|0||(TF(10780),e=8016,t[e>>2]=1,t[e+4>>2]=0),10780}function TF(e){e=e|0,nl(e,CF()|0,3)}function CF(){return 1800}function xF(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;u=mo(AF()|0)|0,S_(e,ji(0,u|0,n|0,Lv(r)|0)|0)}function AF(){var e=0;return p[8024]|0||(RF(10792),e=8024,t[e>>2]=1,t[e+4>>2]=0),10792}function RF(e){e=e|0,nl(e,OF()|0,1)}function OF(){return 1816}function kF(){MF(),NF(),LF()}function MF(){t[2702]=H8(65536)|0}function NF(){$F(10856)}function LF(){FF(10816)}function FF(e){e=e|0,bF(e,5044),PF(e)|0}function bF(e,n){e=e|0,n=n|0;var r=0;r=u8()|0,t[e>>2]=r,YF(r,n),Q2(t[e>>2]|0)}function PF(e){e=e|0;var n=0;return n=t[e>>2]|0,Hp(n,IF()|0),e|0}function IF(){var e=0;return p[8032]|0||(m8(10820),Ht(64,10820,he|0)|0,e=8032,t[e>>2]=1,t[e+4>>2]=0),rr(10820)|0||m8(10820),10820}function m8(e){e=e|0,jF(e),Wp(e,25)}function BF(e){e=e|0,UF(e+24|0)}function UF(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function jF(e){e=e|0;var n=0;n=dr()|0,Pn(e,5,18,n,WF()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function zF(e,n){e=e|0,n=n|0,qF(e,n)}function qF(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;r=m,m=m+16|0,u=r,l=r+4|0,Of(l,n),t[u>>2]=kf(l,n)|0,HF(e,u),m=r}function HF(e,n){e=e|0,n=n|0,y8(e+4|0,t[n>>2]|0),p[e+8>>0]=1}function y8(e,n){e=e|0,n=n|0,t[e>>2]=n}function WF(){return 1824}function VF(e){return e=e|0,GF(e)|0}function GF(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0;return r=m,m=m+16|0,l=r+4|0,h=r,u=Sa(8)|0,n=u,D=cn(4)|0,Of(l,e),y8(D,kf(l,e)|0),s=n+4|0,t[s>>2]=D,e=cn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],o8(e,s,l),t[u>>2]=e,m=r,n|0}function Sa(e){e=e|0;var n=0,r=0;return e=e+7&-8,(e>>>0<=32768?(n=t[2701]|0,e>>>0<=(65536-n|0)>>>0):0)?(r=(t[2702]|0)+n|0,t[2701]=n+e,e=r):(e=H8(e+8|0)|0,t[e>>2]=t[2703],t[2703]=e,e=e+8|0),e|0}function YF(e,n){e=e|0,n=n|0,t[e>>2]=KF()|0,t[e+4>>2]=XF()|0,t[e+12>>2]=n,t[e+8>>2]=QF()|0,t[e+32>>2]=9}function KF(){return 11744}function XF(){return 1832}function QF(){return E_()|0}function JF(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Pl(u,896)|0)==512?r|0&&(ZF(r),yt(r)):n|0&&yt(n)}function ZF(e){e=e|0,e=t[e+4>>2]|0,e|0&&J2(e)}function $F(e){e=e|0,eb(e,5052),tb(e)|0,nb(e,5058,26)|0,rb(e,5069,1)|0,ib(e,5077,10)|0,ub(e,5087,19)|0,ob(e,5094,27)|0}function eb(e,n){e=e|0,n=n|0;var r=0;r=ZP()|0,t[e>>2]=r,$P(r,n),Q2(t[e>>2]|0)}function tb(e){e=e|0;var n=0;return n=t[e>>2]|0,Hp(n,BP()|0),e|0}function nb(e,n,r){return e=e|0,n=n|0,r=r|0,EP(e,Or(n)|0,r,0),e|0}function rb(e,n,r){return e=e|0,n=n|0,r=r|0,uP(e,Or(n)|0,r,0),e|0}function ib(e,n,r){return e=e|0,n=n|0,r=r|0,Ib(e,Or(n)|0,r,0),e|0}function ub(e,n,r){return e=e|0,n=n|0,r=r|0,wb(e,Or(n)|0,r,0),e|0}function g8(e,n){e=e|0,n=n|0;var r=0,u=0;e:for(;;){for(r=t[2703]|0;;){if((r|0)==(n|0))break e;if(u=t[r>>2]|0,t[2703]=u,!r)r=u;else break}yt(r)}t[2701]=e}function ob(e,n,r){return e=e|0,n=n|0,r=r|0,lb(e,Or(n)|0,r,0),e|0}function lb(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=IE()|0,e=sb(r)|0,vi(s,n,l,e,ab(r,u)|0,u)}function IE(){var e=0,n=0;if(p[8040]|0||(E8(10860),Ht(65,10860,he|0)|0,n=8040,t[n>>2]=1,t[n+4>>2]=0),!(rr(10860)|0)){e=10860,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));E8(10860)}return 10860}function sb(e){return e=e|0,e|0}function ab(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=IE()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(_8(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(fb(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function _8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function fb(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=cb(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,db(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,_8(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,pb(e,l),hb(l),m=D;return}}function cb(e){return e=e|0,536870911}function db(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function pb(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function hb(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function E8(e){e=e|0,yb(e)}function vb(e){e=e|0,mb(e+24|0)}function mb(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function yb(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,11,n,gb()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function gb(){return 1840}function _b(e,n,r){e=e|0,n=n|0,r=r|0,Db(t[(Eb(e)|0)>>2]|0,n,r)}function Eb(e){return e=e|0,(t[(IE()|0)+24>>2]|0)+(e<<3)|0}function Db(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;u=m,m=m+16|0,s=u+1|0,l=u,Of(s,n),n=kf(s,n)|0,Of(l,r),r=kf(l,r)|0,N1[e&31](n,r),m=u}function wb(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=BE()|0,e=Sb(r)|0,vi(s,n,l,e,Tb(r,u)|0,u)}function BE(){var e=0,n=0;if(p[8048]|0||(w8(10896),Ht(66,10896,he|0)|0,n=8048,t[n>>2]=1,t[n+4>>2]=0),!(rr(10896)|0)){e=10896,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));w8(10896)}return 10896}function Sb(e){return e=e|0,e|0}function Tb(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=BE()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(D8(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(Cb(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function D8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function Cb(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=xb(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,Ab(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,D8(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,Rb(e,l),Ob(l),m=D;return}}function xb(e){return e=e|0,536870911}function Ab(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function Rb(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Ob(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function w8(e){e=e|0,Nb(e)}function kb(e){e=e|0,Mb(e+24|0)}function Mb(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function Nb(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,11,n,Lb()|0,1),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Lb(){return 1852}function Fb(e,n){return e=e|0,n=n|0,Pb(t[(bb(e)|0)>>2]|0,n)|0}function bb(e){return e=e|0,(t[(BE()|0)+24>>2]|0)+(e<<3)|0}function Pb(e,n){e=e|0,n=n|0;var r=0,u=0;return r=m,m=m+16|0,u=r,Of(u,n),n=kf(u,n)|0,n=z0(Xp[e&31](n)|0)|0,m=r,n|0}function Ib(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=UE()|0,e=Bb(r)|0,vi(s,n,l,e,Ub(r,u)|0,u)}function UE(){var e=0,n=0;if(p[8056]|0||(T8(10932),Ht(67,10932,he|0)|0,n=8056,t[n>>2]=1,t[n+4>>2]=0),!(rr(10932)|0)){e=10932,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));T8(10932)}return 10932}function Bb(e){return e=e|0,e|0}function Ub(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=UE()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(S8(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(jb(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function S8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function jb(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=zb(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,qb(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,S8(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,Hb(e,l),Wb(l),m=D;return}}function zb(e){return e=e|0,536870911}function qb(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function Hb(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function Wb(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function T8(e){e=e|0,Yb(e)}function Vb(e){e=e|0,Gb(e+24|0)}function Gb(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function Yb(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,7,n,Kb()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function Kb(){return 1860}function Xb(e,n,r){return e=e|0,n=n|0,r=r|0,Jb(t[(Qb(e)|0)>>2]|0,n,r)|0}function Qb(e){return e=e|0,(t[(UE()|0)+24>>2]|0)+(e<<3)|0}function Jb(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0;return u=m,m=m+32|0,h=u+12|0,s=u+8|0,D=u,S=u+16|0,l=u+4|0,Zb(S,n),$b(D,S,n),qs(l,r),r=Hs(l,r)|0,t[h>>2]=t[D>>2],jy[e&15](s,h,r),r=eP(s)|0,B0(s),Ws(l),m=u,r|0}function Zb(e,n){e=e|0,n=n|0}function $b(e,n,r){e=e|0,n=n|0,r=r|0,tP(e,r)}function eP(e){return e=e|0,vo(e)|0}function tP(e,n){e=e|0,n=n|0;var r=0,u=0,l=0;l=m,m=m+16|0,r=l,u=n,u&1?(nP(r,0),Yi(u|0,r|0)|0,rP(e,r),iP(r)):t[e>>2]=t[n>>2],m=l}function nP(e,n){e=e|0,n=n|0,l2(e,n),t[e+4>>2]=0,p[e+8>>0]=0}function rP(e,n){e=e|0,n=n|0,t[e>>2]=t[n+4>>2]}function iP(e){e=e|0,p[e+8>>0]=0}function uP(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=jE()|0,e=oP(r)|0,vi(s,n,l,e,lP(r,u)|0,u)}function jE(){var e=0,n=0;if(p[8064]|0||(x8(10968),Ht(68,10968,he|0)|0,n=8064,t[n>>2]=1,t[n+4>>2]=0),!(rr(10968)|0)){e=10968,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));x8(10968)}return 10968}function oP(e){return e=e|0,e|0}function lP(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=jE()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(C8(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(sP(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function C8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function sP(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=aP(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,fP(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,C8(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,cP(e,l),dP(l),m=D;return}}function aP(e){return e=e|0,536870911}function fP(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function cP(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function dP(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function x8(e){e=e|0,vP(e)}function pP(e){e=e|0,hP(e+24|0)}function hP(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function vP(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,1,n,mP()|0,5),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function mP(){return 1872}function yP(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,_P(t[(gP(e)|0)>>2]|0,n,r,u,l,s)}function gP(e){return e=e|0,(t[(jE()|0)+24>>2]|0)+(e<<3)|0}function _P(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,M=0,O=0,P=0;h=m,m=m+32|0,D=h+16|0,S=h+12|0,M=h+8|0,O=h+4|0,P=h,qs(D,n),n=Hs(D,n)|0,qs(S,r),r=Hs(S,r)|0,qs(M,u),u=Hs(M,u)|0,qs(O,l),l=Hs(O,l)|0,qs(P,s),s=Hs(P,s)|0,K8[e&1](n,r,u,l,s),Ws(P),Ws(O),Ws(M),Ws(S),Ws(D),m=h}function EP(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;s=t[e>>2]|0,l=zE()|0,e=DP(r)|0,vi(s,n,l,e,wP(r,u)|0,u)}function zE(){var e=0,n=0;if(p[8072]|0||(R8(11004),Ht(69,11004,he|0)|0,n=8072,t[n>>2]=1,t[n+4>>2]=0),!(rr(11004)|0)){e=11004,n=e+36|0;do t[e>>2]=0,e=e+4|0;while((e|0)<(n|0));R8(11004)}return 11004}function DP(e){return e=e|0,e|0}function wP(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0,D=0,S=0;return D=m,m=m+16|0,l=D,s=D+4|0,t[l>>2]=e,S=zE()|0,h=S+24|0,n=dn(n,4)|0,t[s>>2]=n,r=S+28|0,u=t[r>>2]|0,u>>>0<(t[S+32>>2]|0)>>>0?(A8(u,e,n),n=(t[r>>2]|0)+8|0,t[r>>2]=n):(SP(h,l,s),n=t[r>>2]|0),m=D,(n-(t[h>>2]|0)>>3)+-1|0}function A8(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,t[e+4>>2]=r}function SP(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0;if(D=m,m=m+32|0,l=D,s=e+4|0,h=((t[s>>2]|0)-(t[e>>2]|0)>>3)+1|0,u=TP(e)|0,u>>>0>>0)li(e);else{S=t[e>>2]|0,O=(t[e+8>>2]|0)-S|0,M=O>>2,CP(l,O>>3>>>0>>1>>>0?M>>>0>>0?h:M:u,(t[s>>2]|0)-S>>3,e+8|0),h=l+8|0,A8(t[h>>2]|0,t[n>>2]|0,t[r>>2]|0),t[h>>2]=(t[h>>2]|0)+8,xP(e,l),AP(l),m=D;return}}function TP(e){return e=e|0,536870911}function CP(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0;t[e+12>>2]=0,t[e+16>>2]=u;do if(n)if(n>>>0>536870911)Xn();else{l=cn(n<<3)|0;break}else l=0;while(0);t[e>>2]=l,u=l+(r<<3)|0,t[e+8>>2]=u,t[e+4>>2]=u,t[e+12>>2]=l+(n<<3)}function xP(e,n){e=e|0,n=n|0;var r=0,u=0,l=0,s=0,h=0;u=t[e>>2]|0,h=e+4|0,s=n+4|0,l=(t[h>>2]|0)-u|0,r=(t[s>>2]|0)+(0-(l>>3)<<3)|0,t[s>>2]=r,(l|0)>0?(pr(r|0,u|0,l|0)|0,u=s,r=t[s>>2]|0):u=s,s=t[e>>2]|0,t[e>>2]=r,t[u>>2]=s,s=n+8|0,l=t[h>>2]|0,t[h>>2]=t[s>>2],t[s>>2]=l,s=e+8|0,h=n+12|0,e=t[s>>2]|0,t[s>>2]=t[h>>2],t[h>>2]=e,t[n>>2]=t[u>>2]}function AP(e){e=e|0;var n=0,r=0,u=0;n=t[e+4>>2]|0,r=e+8|0,u=t[r>>2]|0,(u|0)!=(n|0)&&(t[r>>2]=u+(~((u+-8-n|0)>>>3)<<3)),e=t[e>>2]|0,e|0&&yt(e)}function R8(e){e=e|0,kP(e)}function RP(e){e=e|0,OP(e+24|0)}function OP(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function kP(e){e=e|0;var n=0;n=dr()|0,Pn(e,1,12,n,MP()|0,2),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function MP(){return 1896}function NP(e,n,r){e=e|0,n=n|0,r=r|0,FP(t[(LP(e)|0)>>2]|0,n,r)}function LP(e){return e=e|0,(t[(zE()|0)+24>>2]|0)+(e<<3)|0}function FP(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;u=m,m=m+16|0,s=u+4|0,l=u,bP(s,n),n=PP(s,n)|0,qs(l,r),r=Hs(l,r)|0,N1[e&31](n,r),Ws(l),m=u}function bP(e,n){e=e|0,n=n|0}function PP(e,n){return e=e|0,n=n|0,IP(n)|0}function IP(e){return e=e|0,e|0}function BP(){var e=0;return p[8080]|0||(O8(11040),Ht(70,11040,he|0)|0,e=8080,t[e>>2]=1,t[e+4>>2]=0),rr(11040)|0||O8(11040),11040}function O8(e){e=e|0,zP(e),Wp(e,71)}function UP(e){e=e|0,jP(e+24|0)}function jP(e){e=e|0;var n=0,r=0,u=0;r=t[e>>2]|0,u=r,r|0&&(e=e+4|0,n=t[e>>2]|0,(n|0)!=(r|0)&&(t[e>>2]=n+(~((n+-8-u|0)>>>3)<<3)),yt(r))}function zP(e){e=e|0;var n=0;n=dr()|0,Pn(e,5,7,n,VP()|0,0),t[e+24>>2]=0,t[e+28>>2]=0,t[e+32>>2]=0}function qP(e){e=e|0,HP(e)}function HP(e){e=e|0,WP(e)}function WP(e){e=e|0,p[e+8>>0]=1}function VP(){return 1936}function GP(){return YP()|0}function YP(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0;return n=m,m=m+16|0,l=n+4|0,h=n,r=Sa(8)|0,e=r,s=e+4|0,t[s>>2]=cn(1)|0,u=cn(8)|0,s=t[s>>2]|0,t[h>>2]=0,t[l>>2]=t[h>>2],KP(u,s,l),t[r>>2]=u,m=n,e|0}function KP(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]=n,r=cn(16)|0,t[r+4>>2]=0,t[r+8>>2]=0,t[r>>2]=1916,t[r+12>>2]=n,t[e+4>>2]=r}function XP(e){e=e|0,Pv(e),yt(e)}function QP(e){e=e|0,e=t[e+12>>2]|0,e|0&&yt(e)}function JP(e){e=e|0,yt(e)}function ZP(){var e=0;return p[8088]|0||(uI(11076),Ht(25,11076,he|0)|0,e=8088,t[e>>2]=1,t[e+4>>2]=0),11076}function $P(e,n){e=e|0,n=n|0,t[e>>2]=eI()|0,t[e+4>>2]=tI()|0,t[e+12>>2]=n,t[e+8>>2]=nI()|0,t[e+32>>2]=10}function eI(){return 11745}function tI(){return 1940}function nI(){return O1()|0}function rI(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,(Pl(u,896)|0)==512?r|0&&(iI(r),yt(r)):n|0&&yt(n)}function iI(e){e=e|0,e=t[e+4>>2]|0,e|0&&J2(e)}function uI(e){e=e|0,Ha(e)}function jf(e,n){e=e|0,n=n|0,t[e>>2]=n}function qE(e){return e=e|0,t[e>>2]|0}function oI(e){return e=e|0,p[t[e>>2]>>0]|0}function lI(e,n){e=e|0,n=n|0;var r=0,u=0;r=m,m=m+16|0,u=r,t[u>>2]=t[e>>2],sI(n,u)|0,m=r}function sI(e,n){e=e|0,n=n|0;var r=0;return r=aI(t[e>>2]|0,n)|0,n=e+4|0,t[(t[n>>2]|0)+8>>2]=r,t[(t[n>>2]|0)+8>>2]|0}function aI(e,n){e=e|0,n=n|0;var r=0,u=0;return r=m,m=m+16|0,u=r,Ta(u),e=vo(e)|0,n=fI(e,t[n>>2]|0)|0,Ca(u),m=r,n|0}function Ta(e){e=e|0,t[e>>2]=t[2701],t[e+4>>2]=t[2703]}function fI(e,n){e=e|0,n=n|0;var r=0;return r=mo(cI()|0)|0,ji(0,r|0,e|0,bE(n)|0)|0}function Ca(e){e=e|0,g8(t[e>>2]|0,t[e+4>>2]|0)}function cI(){var e=0;return p[8096]|0||(dI(11120),e=8096,t[e>>2]=1,t[e+4>>2]=0),11120}function dI(e){e=e|0,nl(e,pI()|0,1)}function pI(){return 1948}function hI(){vI()}function vI(){var e=0,n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0,Ee=0,ve=0;if(Ee=m,m=m+16|0,O=Ee+4|0,P=Ee,Ln(65536,10804,t[2702]|0,10812),r=$3()|0,n=t[r>>2]|0,e=t[n>>2]|0,e|0)for(u=t[r+8>>2]|0,r=t[r+4>>2]|0;Wl(e|0,k[r>>0]|0|0,p[u>>0]|0),n=n+4|0,e=t[n>>2]|0,e;)u=u+1|0,r=r+1|0;if(e=e8()|0,n=t[e>>2]|0,n|0)do xo(n|0,t[e+4>>2]|0),e=e+8|0,n=t[e>>2]|0;while((n|0)!=0);xo(mI()|0,5167),M=Mv()|0,e=t[M>>2]|0;e:do if(e|0){do yI(t[e+4>>2]|0),e=t[e>>2]|0;while((e|0)!=0);if(e=t[M>>2]|0,e|0){S=M;do{for(;l=e,e=t[e>>2]|0,l=t[l+4>>2]|0,!!(gI(l)|0);)if(t[P>>2]=S,t[O>>2]=t[P>>2],_I(M,O)|0,!e)break e;if(EI(l),S=t[S>>2]|0,n=k8(l)|0,s=lo()|0,h=m,m=m+((1*(n<<2)|0)+15&-16)|0,D=m,m=m+((1*(n<<2)|0)+15&-16)|0,n=t[(d8(l)|0)>>2]|0,n|0)for(r=h,u=D;t[r>>2]=t[(Nv(t[n+4>>2]|0)|0)>>2],t[u>>2]=t[n+8>>2],n=t[n>>2]|0,n;)r=r+4|0,u=u+4|0;ve=Nv(l)|0,n=DI(l)|0,r=k8(l)|0,u=wI(l)|0,Ao(ve|0,n|0,h|0,D|0,r|0,u|0,OE(l)|0),ci(s|0)}while((e|0)!=0)}}while(0);if(e=t[(kE()|0)>>2]|0,e|0)do ve=e+4|0,M=ME(ve)|0,l=Py(M)|0,s=Fy(M)|0,h=(by(M)|0)+1|0,D=T_(M)|0,S=M8(ve)|0,M=rr(M)|0,O=D_(ve)|0,P=HE(ve)|0,oo(0,l|0,s|0,h|0,D|0,S|0,M|0,O|0,P|0,WE(ve)|0),e=t[e>>2]|0;while((e|0)!=0);e=t[(Mv()|0)>>2]|0;e:do if(e|0){t:for(;;){if(n=t[e+4>>2]|0,n|0?(K=t[(Nv(n)|0)>>2]|0,Pe=t[(p8(n)|0)>>2]|0,Pe|0):0){r=Pe;do{n=r+4|0,u=ME(n)|0;n:do if(u|0)switch(rr(u)|0){case 0:break t;case 4:case 3:case 2:{D=Py(u)|0,S=Fy(u)|0,M=(by(u)|0)+1|0,O=T_(u)|0,P=rr(u)|0,ve=D_(n)|0,oo(K|0,D|0,S|0,M|0,O|0,0,P|0,ve|0,HE(n)|0,WE(n)|0);break n}case 1:{h=Py(u)|0,D=Fy(u)|0,S=(by(u)|0)+1|0,M=T_(u)|0,O=M8(n)|0,P=rr(u)|0,ve=D_(n)|0,oo(K|0,h|0,D|0,S|0,M|0,O|0,P|0,ve|0,HE(n)|0,WE(n)|0);break n}case 5:{M=Py(u)|0,O=Fy(u)|0,P=(by(u)|0)+1|0,ve=T_(u)|0,oo(K|0,M|0,O|0,P|0,ve|0,SI(u)|0,rr(u)|0,0,0,0);break n}default:break n}while(0);r=t[r>>2]|0}while((r|0)!=0)}if(e=t[e>>2]|0,!e)break e}Xn()}while(0);Ms(),m=Ee}function mI(){return 11703}function yI(e){e=e|0,p[e+40>>0]=0}function gI(e){return e=e|0,(p[e+40>>0]|0)!=0|0}function _I(e,n){return e=e|0,n=n|0,n=TI(n)|0,e=t[n>>2]|0,t[n>>2]=t[e>>2],yt(e),t[n>>2]|0}function EI(e){e=e|0,p[e+40>>0]=1}function k8(e){return e=e|0,t[e+20>>2]|0}function DI(e){return e=e|0,t[e+8>>2]|0}function wI(e){return e=e|0,t[e+32>>2]|0}function T_(e){return e=e|0,t[e+4>>2]|0}function M8(e){return e=e|0,t[e+4>>2]|0}function HE(e){return e=e|0,t[e+8>>2]|0}function WE(e){return e=e|0,t[e+16>>2]|0}function SI(e){return e=e|0,t[e+20>>2]|0}function TI(e){return e=e|0,t[e>>2]|0}function C_(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0,Ee=0,ve=0,Qe=0,We=0,st=0,Re=0,Fe=0,Qt=0;Qt=m,m=m+16|0,K=Qt;do if(e>>>0<245){if(M=e>>>0<11?16:e+11&-8,e=M>>>3,P=t[2783]|0,r=P>>>e,r&3|0)return n=(r&1^1)+e|0,e=11172+(n<<1<<2)|0,r=e+8|0,u=t[r>>2]|0,l=u+8|0,s=t[l>>2]|0,(e|0)==(s|0)?t[2783]=P&~(1<>2]=e,t[r>>2]=s),Fe=n<<3,t[u+4>>2]=Fe|3,Fe=u+Fe+4|0,t[Fe>>2]=t[Fe>>2]|1,Fe=l,m=Qt,Fe|0;if(O=t[2785]|0,M>>>0>O>>>0){if(r|0)return n=2<>>12&16,n=n>>>h,r=n>>>5&8,n=n>>>r,l=n>>>2&4,n=n>>>l,e=n>>>1&2,n=n>>>e,u=n>>>1&1,u=(r|h|l|e|u)+(n>>>u)|0,n=11172+(u<<1<<2)|0,e=n+8|0,l=t[e>>2]|0,h=l+8|0,r=t[h>>2]|0,(n|0)==(r|0)?(e=P&~(1<>2]=n,t[e>>2]=r,e=P),s=(u<<3)-M|0,t[l+4>>2]=M|3,u=l+M|0,t[u+4>>2]=s|1,t[u+s>>2]=s,O|0&&(l=t[2788]|0,n=O>>>3,r=11172+(n<<1<<2)|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=l,t[n+12>>2]=l,t[l+8>>2]=n,t[l+12>>2]=r),t[2785]=s,t[2788]=u,Fe=h,m=Qt,Fe|0;if(D=t[2784]|0,D){if(r=(D&0-D)+-1|0,h=r>>>12&16,r=r>>>h,s=r>>>5&8,r=r>>>s,S=r>>>2&4,r=r>>>S,u=r>>>1&2,r=r>>>u,e=r>>>1&1,e=t[11436+((s|h|S|u|e)+(r>>>e)<<2)>>2]|0,r=(t[e+4>>2]&-8)-M|0,u=t[e+16+(((t[e+16>>2]|0)==0&1)<<2)>>2]|0,!u)S=e,s=r;else{do h=(t[u+4>>2]&-8)-M|0,S=h>>>0>>0,r=S?h:r,e=S?u:e,u=t[u+16+(((t[u+16>>2]|0)==0&1)<<2)>>2]|0;while((u|0)!=0);S=e,s=r}if(h=S+M|0,S>>>0>>0){l=t[S+24>>2]|0,n=t[S+12>>2]|0;do if((n|0)==(S|0)){if(e=S+20|0,n=t[e>>2]|0,!n&&(e=S+16|0,n=t[e>>2]|0,!n)){r=0;break}for(;;){if(r=n+20|0,u=t[r>>2]|0,u|0){n=u,e=r;continue}if(r=n+16|0,u=t[r>>2]|0,u)n=u,e=r;else break}t[e>>2]=0,r=n}else r=t[S+8>>2]|0,t[r+12>>2]=n,t[n+8>>2]=r,r=n;while(0);do if(l|0){if(n=t[S+28>>2]|0,e=11436+(n<<2)|0,(S|0)==(t[e>>2]|0)){if(t[e>>2]=r,!r){t[2784]=D&~(1<>2]|0)!=(S|0)&1)<<2)>>2]=r,!r)break;t[r+24>>2]=l,n=t[S+16>>2]|0,n|0&&(t[r+16>>2]=n,t[n+24>>2]=r),n=t[S+20>>2]|0,n|0&&(t[r+20>>2]=n,t[n+24>>2]=r)}while(0);return s>>>0<16?(Fe=s+M|0,t[S+4>>2]=Fe|3,Fe=S+Fe+4|0,t[Fe>>2]=t[Fe>>2]|1):(t[S+4>>2]=M|3,t[h+4>>2]=s|1,t[h+s>>2]=s,O|0&&(u=t[2788]|0,n=O>>>3,r=11172+(n<<1<<2)|0,n=1<>2]|0):(t[2783]=P|n,n=r,e=r+8|0),t[e>>2]=u,t[n+12>>2]=u,t[u+8>>2]=n,t[u+12>>2]=r),t[2785]=s,t[2788]=h),Fe=S+8|0,m=Qt,Fe|0}else P=M}else P=M}else P=M}else if(e>>>0<=4294967231)if(e=e+11|0,M=e&-8,S=t[2784]|0,S){u=0-M|0,e=e>>>8,e?M>>>0>16777215?D=31:(P=(e+1048320|0)>>>16&8,Re=e<>>16&4,Re=Re<>>16&2,D=14-(O|P|D)+(Re<>>15)|0,D=M>>>(D+7|0)&1|D<<1):D=0,r=t[11436+(D<<2)>>2]|0;e:do if(!r)r=0,e=0,Re=57;else for(e=0,h=M<<((D|0)==31?0:25-(D>>>1)|0),s=0;;){if(l=(t[r+4>>2]&-8)-M|0,l>>>0>>0)if(l)e=r,u=l;else{e=r,u=0,l=r,Re=61;break e}if(l=t[r+20>>2]|0,r=t[r+16+(h>>>31<<2)>>2]|0,s=(l|0)==0|(l|0)==(r|0)?s:l,l=(r|0)==0,l){r=s,Re=57;break}else h=h<<((l^1)&1)}while(0);if((Re|0)==57){if((r|0)==0&(e|0)==0){if(e=2<>>12&16,P=P>>>h,s=P>>>5&8,P=P>>>s,D=P>>>2&4,P=P>>>D,O=P>>>1&2,P=P>>>O,r=P>>>1&1,e=0,r=t[11436+((s|h|D|O|r)+(P>>>r)<<2)>>2]|0}r?(l=r,Re=61):(D=e,h=u)}if((Re|0)==61)for(;;)if(Re=0,r=(t[l+4>>2]&-8)-M|0,P=r>>>0>>0,r=P?r:u,e=P?l:e,l=t[l+16+(((t[l+16>>2]|0)==0&1)<<2)>>2]|0,l)u=r,Re=61;else{D=e,h=r;break}if((D|0)!=0?h>>>0<((t[2785]|0)-M|0)>>>0:0){if(s=D+M|0,D>>>0>=s>>>0)return Fe=0,m=Qt,Fe|0;l=t[D+24>>2]|0,n=t[D+12>>2]|0;do if((n|0)==(D|0)){if(e=D+20|0,n=t[e>>2]|0,!n&&(e=D+16|0,n=t[e>>2]|0,!n)){n=0;break}for(;;){if(r=n+20|0,u=t[r>>2]|0,u|0){n=u,e=r;continue}if(r=n+16|0,u=t[r>>2]|0,u)n=u,e=r;else break}t[e>>2]=0}else Fe=t[D+8>>2]|0,t[Fe+12>>2]=n,t[n+8>>2]=Fe;while(0);do if(l){if(e=t[D+28>>2]|0,r=11436+(e<<2)|0,(D|0)==(t[r>>2]|0)){if(t[r>>2]=n,!n){u=S&~(1<>2]|0)!=(D|0)&1)<<2)>>2]=n,!n){u=S;break}t[n+24>>2]=l,e=t[D+16>>2]|0,e|0&&(t[n+16>>2]=e,t[e+24>>2]=n),e=t[D+20>>2]|0,e&&(t[n+20>>2]=e,t[e+24>>2]=n),u=S}else u=S;while(0);do if(h>>>0>=16){if(t[D+4>>2]=M|3,t[s+4>>2]=h|1,t[s+h>>2]=h,n=h>>>3,h>>>0<256){r=11172+(n<<1<<2)|0,e=t[2783]|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=s,t[n+12>>2]=s,t[s+8>>2]=n,t[s+12>>2]=r;break}if(n=h>>>8,n?h>>>0>16777215?n=31:(Re=(n+1048320|0)>>>16&8,Fe=n<>>16&4,Fe=Fe<>>16&2,n=14-(st|Re|n)+(Fe<>>15)|0,n=h>>>(n+7|0)&1|n<<1):n=0,r=11436+(n<<2)|0,t[s+28>>2]=n,e=s+16|0,t[e+4>>2]=0,t[e>>2]=0,e=1<>2]=s,t[s+24>>2]=r,t[s+12>>2]=s,t[s+8>>2]=s;break}for(e=h<<((n|0)==31?0:25-(n>>>1)|0),r=t[r>>2]|0;;){if((t[r+4>>2]&-8|0)==(h|0)){Re=97;break}if(u=r+16+(e>>>31<<2)|0,n=t[u>>2]|0,n)e=e<<1,r=n;else{Re=96;break}}if((Re|0)==96){t[u>>2]=s,t[s+24>>2]=r,t[s+12>>2]=s,t[s+8>>2]=s;break}else if((Re|0)==97){Re=r+8|0,Fe=t[Re>>2]|0,t[Fe+12>>2]=s,t[Re>>2]=s,t[s+8>>2]=Fe,t[s+12>>2]=r,t[s+24>>2]=0;break}}else Fe=h+M|0,t[D+4>>2]=Fe|3,Fe=D+Fe+4|0,t[Fe>>2]=t[Fe>>2]|1;while(0);return Fe=D+8|0,m=Qt,Fe|0}else P=M}else P=M;else P=-1;while(0);if(r=t[2785]|0,r>>>0>=P>>>0)return n=r-P|0,e=t[2788]|0,n>>>0>15?(Fe=e+P|0,t[2788]=Fe,t[2785]=n,t[Fe+4>>2]=n|1,t[Fe+n>>2]=n,t[e+4>>2]=P|3):(t[2785]=0,t[2788]=0,t[e+4>>2]=r|3,Fe=e+r+4|0,t[Fe>>2]=t[Fe>>2]|1),Fe=e+8|0,m=Qt,Fe|0;if(h=t[2786]|0,h>>>0>P>>>0)return st=h-P|0,t[2786]=st,Fe=t[2789]|0,Re=Fe+P|0,t[2789]=Re,t[Re+4>>2]=st|1,t[Fe+4>>2]=P|3,Fe=Fe+8|0,m=Qt,Fe|0;if(t[2901]|0?e=t[2903]|0:(t[2903]=4096,t[2902]=4096,t[2904]=-1,t[2905]=-1,t[2906]=0,t[2894]=0,e=K&-16^1431655768,t[K>>2]=e,t[2901]=e,e=4096),D=P+48|0,S=P+47|0,s=e+S|0,l=0-e|0,M=s&l,M>>>0<=P>>>0||(e=t[2893]|0,e|0?(O=t[2891]|0,K=O+M|0,K>>>0<=O>>>0|K>>>0>e>>>0):0))return Fe=0,m=Qt,Fe|0;e:do if(t[2894]&4)n=0,Re=133;else{r=t[2789]|0;t:do if(r){for(u=11580;e=t[u>>2]|0,!(e>>>0<=r>>>0?(ve=u+4|0,(e+(t[ve>>2]|0)|0)>>>0>r>>>0):0);)if(e=t[u+8>>2]|0,e)u=e;else{Re=118;break t}if(n=s-h&l,n>>>0<2147483647)if(e=Z2(n|0)|0,(e|0)==((t[u>>2]|0)+(t[ve>>2]|0)|0)){if((e|0)!=(-1|0)){h=n,s=e,Re=135;break e}}else u=e,Re=126;else n=0}else Re=118;while(0);do if((Re|0)==118)if(r=Z2(0)|0,(r|0)!=(-1|0)?(n=r,Pe=t[2902]|0,Ee=Pe+-1|0,n=((Ee&n|0)==0?0:(Ee+n&0-Pe)-n|0)+M|0,Pe=t[2891]|0,Ee=n+Pe|0,n>>>0>P>>>0&n>>>0<2147483647):0){if(ve=t[2893]|0,ve|0?Ee>>>0<=Pe>>>0|Ee>>>0>ve>>>0:0){n=0;break}if(e=Z2(n|0)|0,(e|0)==(r|0)){h=n,s=r,Re=135;break e}else u=e,Re=126}else n=0;while(0);do if((Re|0)==126){if(r=0-n|0,!(D>>>0>n>>>0&(n>>>0<2147483647&(u|0)!=(-1|0))))if((u|0)==(-1|0)){n=0;break}else{h=n,s=u,Re=135;break e}if(e=t[2903]|0,e=S-n+e&0-e,e>>>0>=2147483647){h=n,s=u,Re=135;break e}if((Z2(e|0)|0)==(-1|0)){Z2(r|0)|0,n=0;break}else{h=e+n|0,s=u,Re=135;break e}}while(0);t[2894]=t[2894]|4,Re=133}while(0);if((((Re|0)==133?M>>>0<2147483647:0)?(st=Z2(M|0)|0,ve=Z2(0)|0,Qe=ve-st|0,We=Qe>>>0>(P+40|0)>>>0,!((st|0)==(-1|0)|We^1|st>>>0>>0&((st|0)!=(-1|0)&(ve|0)!=(-1|0))^1)):0)&&(h=We?Qe:n,s=st,Re=135),(Re|0)==135){n=(t[2891]|0)+h|0,t[2891]=n,n>>>0>(t[2892]|0)>>>0&&(t[2892]=n),S=t[2789]|0;do if(S){for(n=11580;;){if(e=t[n>>2]|0,r=n+4|0,u=t[r>>2]|0,(s|0)==(e+u|0)){Re=145;break}if(l=t[n+8>>2]|0,l)n=l;else break}if(((Re|0)==145?(t[n+12>>2]&8|0)==0:0)?S>>>0>>0&S>>>0>=e>>>0:0){t[r>>2]=u+h,Fe=S+8|0,Fe=(Fe&7|0)==0?0:0-Fe&7,Re=S+Fe|0,Fe=(t[2786]|0)+(h-Fe)|0,t[2789]=Re,t[2786]=Fe,t[Re+4>>2]=Fe|1,t[Re+Fe+4>>2]=40,t[2790]=t[2905];break}for(s>>>0<(t[2787]|0)>>>0&&(t[2787]=s),r=s+h|0,n=11580;;){if((t[n>>2]|0)==(r|0)){Re=153;break}if(e=t[n+8>>2]|0,e)n=e;else break}if((Re|0)==153?(t[n+12>>2]&8|0)==0:0){t[n>>2]=s,O=n+4|0,t[O>>2]=(t[O>>2]|0)+h,O=s+8|0,O=s+((O&7|0)==0?0:0-O&7)|0,n=r+8|0,n=r+((n&7|0)==0?0:0-n&7)|0,M=O+P|0,D=n-O-P|0,t[O+4>>2]=P|3;do if((n|0)!=(S|0)){if((n|0)==(t[2788]|0)){Fe=(t[2785]|0)+D|0,t[2785]=Fe,t[2788]=M,t[M+4>>2]=Fe|1,t[M+Fe>>2]=Fe;break}if(e=t[n+4>>2]|0,(e&3|0)==1){h=e&-8,u=e>>>3;e:do if(e>>>0<256)if(e=t[n+8>>2]|0,r=t[n+12>>2]|0,(r|0)==(e|0)){t[2783]=t[2783]&~(1<>2]=r,t[r+8>>2]=e;break}else{s=t[n+24>>2]|0,e=t[n+12>>2]|0;do if((e|0)==(n|0)){if(u=n+16|0,r=u+4|0,e=t[r>>2]|0,!e)if(e=t[u>>2]|0,e)r=u;else{e=0;break}for(;;){if(u=e+20|0,l=t[u>>2]|0,l|0){e=l,r=u;continue}if(u=e+16|0,l=t[u>>2]|0,l)e=l,r=u;else break}t[r>>2]=0}else Fe=t[n+8>>2]|0,t[Fe+12>>2]=e,t[e+8>>2]=Fe;while(0);if(!s)break;r=t[n+28>>2]|0,u=11436+(r<<2)|0;do if((n|0)!=(t[u>>2]|0)){if(t[s+16+(((t[s+16>>2]|0)!=(n|0)&1)<<2)>>2]=e,!e)break e}else{if(t[u>>2]=e,e|0)break;t[2784]=t[2784]&~(1<>2]=s,r=n+16|0,u=t[r>>2]|0,u|0&&(t[e+16>>2]=u,t[u+24>>2]=e),r=t[r+4>>2]|0,!r)break;t[e+20>>2]=r,t[r+24>>2]=e}while(0);n=n+h|0,l=h+D|0}else l=D;if(n=n+4|0,t[n>>2]=t[n>>2]&-2,t[M+4>>2]=l|1,t[M+l>>2]=l,n=l>>>3,l>>>0<256){r=11172+(n<<1<<2)|0,e=t[2783]|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=M,t[n+12>>2]=M,t[M+8>>2]=n,t[M+12>>2]=r;break}n=l>>>8;do if(!n)n=0;else{if(l>>>0>16777215){n=31;break}Re=(n+1048320|0)>>>16&8,Fe=n<>>16&4,Fe=Fe<>>16&2,n=14-(st|Re|n)+(Fe<>>15)|0,n=l>>>(n+7|0)&1|n<<1}while(0);if(u=11436+(n<<2)|0,t[M+28>>2]=n,e=M+16|0,t[e+4>>2]=0,t[e>>2]=0,e=t[2784]|0,r=1<>2]=M,t[M+24>>2]=u,t[M+12>>2]=M,t[M+8>>2]=M;break}for(e=l<<((n|0)==31?0:25-(n>>>1)|0),r=t[u>>2]|0;;){if((t[r+4>>2]&-8|0)==(l|0)){Re=194;break}if(u=r+16+(e>>>31<<2)|0,n=t[u>>2]|0,n)e=e<<1,r=n;else{Re=193;break}}if((Re|0)==193){t[u>>2]=M,t[M+24>>2]=r,t[M+12>>2]=M,t[M+8>>2]=M;break}else if((Re|0)==194){Re=r+8|0,Fe=t[Re>>2]|0,t[Fe+12>>2]=M,t[Re>>2]=M,t[M+8>>2]=Fe,t[M+12>>2]=r,t[M+24>>2]=0;break}}else Fe=(t[2786]|0)+D|0,t[2786]=Fe,t[2789]=M,t[M+4>>2]=Fe|1;while(0);return Fe=O+8|0,m=Qt,Fe|0}for(n=11580;e=t[n>>2]|0,!(e>>>0<=S>>>0?(Fe=e+(t[n+4>>2]|0)|0,Fe>>>0>S>>>0):0);)n=t[n+8>>2]|0;l=Fe+-47|0,e=l+8|0,e=l+((e&7|0)==0?0:0-e&7)|0,l=S+16|0,e=e>>>0>>0?S:e,n=e+8|0,r=s+8|0,r=(r&7|0)==0?0:0-r&7,Re=s+r|0,r=h+-40-r|0,t[2789]=Re,t[2786]=r,t[Re+4>>2]=r|1,t[Re+r+4>>2]=40,t[2790]=t[2905],r=e+4|0,t[r>>2]=27,t[n>>2]=t[2895],t[n+4>>2]=t[2896],t[n+8>>2]=t[2897],t[n+12>>2]=t[2898],t[2895]=s,t[2896]=h,t[2898]=0,t[2897]=n,n=e+24|0;do Re=n,n=n+4|0,t[n>>2]=7;while((Re+8|0)>>>0>>0);if((e|0)!=(S|0)){if(s=e-S|0,t[r>>2]=t[r>>2]&-2,t[S+4>>2]=s|1,t[e>>2]=s,n=s>>>3,s>>>0<256){r=11172+(n<<1<<2)|0,e=t[2783]|0,n=1<>2]|0):(t[2783]=e|n,n=r,e=r+8|0),t[e>>2]=S,t[n+12>>2]=S,t[S+8>>2]=n,t[S+12>>2]=r;break}if(n=s>>>8,n?s>>>0>16777215?r=31:(Re=(n+1048320|0)>>>16&8,Fe=n<>>16&4,Fe=Fe<>>16&2,r=14-(st|Re|r)+(Fe<>>15)|0,r=s>>>(r+7|0)&1|r<<1):r=0,u=11436+(r<<2)|0,t[S+28>>2]=r,t[S+20>>2]=0,t[l>>2]=0,n=t[2784]|0,e=1<>2]=S,t[S+24>>2]=u,t[S+12>>2]=S,t[S+8>>2]=S;break}for(e=s<<((r|0)==31?0:25-(r>>>1)|0),r=t[u>>2]|0;;){if((t[r+4>>2]&-8|0)==(s|0)){Re=216;break}if(u=r+16+(e>>>31<<2)|0,n=t[u>>2]|0,n)e=e<<1,r=n;else{Re=215;break}}if((Re|0)==215){t[u>>2]=S,t[S+24>>2]=r,t[S+12>>2]=S,t[S+8>>2]=S;break}else if((Re|0)==216){Re=r+8|0,Fe=t[Re>>2]|0,t[Fe+12>>2]=S,t[Re>>2]=S,t[S+8>>2]=Fe,t[S+12>>2]=r,t[S+24>>2]=0;break}}}else{Fe=t[2787]|0,(Fe|0)==0|s>>>0>>0&&(t[2787]=s),t[2895]=s,t[2896]=h,t[2898]=0,t[2792]=t[2901],t[2791]=-1,n=0;do Fe=11172+(n<<1<<2)|0,t[Fe+12>>2]=Fe,t[Fe+8>>2]=Fe,n=n+1|0;while((n|0)!=32);Fe=s+8|0,Fe=(Fe&7|0)==0?0:0-Fe&7,Re=s+Fe|0,Fe=h+-40-Fe|0,t[2789]=Re,t[2786]=Fe,t[Re+4>>2]=Fe|1,t[Re+Fe+4>>2]=40,t[2790]=t[2905]}while(0);if(n=t[2786]|0,n>>>0>P>>>0)return st=n-P|0,t[2786]=st,Fe=t[2789]|0,Re=Fe+P|0,t[2789]=Re,t[Re+4>>2]=st|1,t[Fe+4>>2]=P|3,Fe=Fe+8|0,m=Qt,Fe|0}return t[(Fv()|0)>>2]=12,Fe=0,m=Qt,Fe|0}function x_(e){e=e|0;var n=0,r=0,u=0,l=0,s=0,h=0,D=0,S=0;if(!!e){r=e+-8|0,l=t[2787]|0,e=t[e+-4>>2]|0,n=e&-8,S=r+n|0;do if(e&1)D=r,h=r;else{if(u=t[r>>2]|0,!(e&3)||(h=r+(0-u)|0,s=u+n|0,h>>>0>>0))return;if((h|0)==(t[2788]|0)){if(e=S+4|0,n=t[e>>2]|0,(n&3|0)!=3){D=h,n=s;break}t[2785]=s,t[e>>2]=n&-2,t[h+4>>2]=s|1,t[h+s>>2]=s;return}if(r=u>>>3,u>>>0<256)if(e=t[h+8>>2]|0,n=t[h+12>>2]|0,(n|0)==(e|0)){t[2783]=t[2783]&~(1<>2]=n,t[n+8>>2]=e,D=h,n=s;break}l=t[h+24>>2]|0,e=t[h+12>>2]|0;do if((e|0)==(h|0)){if(r=h+16|0,n=r+4|0,e=t[n>>2]|0,!e)if(e=t[r>>2]|0,e)n=r;else{e=0;break}for(;;){if(r=e+20|0,u=t[r>>2]|0,u|0){e=u,n=r;continue}if(r=e+16|0,u=t[r>>2]|0,u)e=u,n=r;else break}t[n>>2]=0}else D=t[h+8>>2]|0,t[D+12>>2]=e,t[e+8>>2]=D;while(0);if(l){if(n=t[h+28>>2]|0,r=11436+(n<<2)|0,(h|0)==(t[r>>2]|0)){if(t[r>>2]=e,!e){t[2784]=t[2784]&~(1<>2]|0)!=(h|0)&1)<<2)>>2]=e,!e){D=h,n=s;break}t[e+24>>2]=l,n=h+16|0,r=t[n>>2]|0,r|0&&(t[e+16>>2]=r,t[r+24>>2]=e),n=t[n+4>>2]|0,n?(t[e+20>>2]=n,t[n+24>>2]=e,D=h,n=s):(D=h,n=s)}else D=h,n=s}while(0);if(!(h>>>0>=S>>>0)&&(e=S+4|0,u=t[e>>2]|0,!!(u&1))){if(u&2)t[e>>2]=u&-2,t[D+4>>2]=n|1,t[h+n>>2]=n,l=n;else{if(e=t[2788]|0,(S|0)==(t[2789]|0)){if(S=(t[2786]|0)+n|0,t[2786]=S,t[2789]=D,t[D+4>>2]=S|1,(D|0)!=(e|0))return;t[2788]=0,t[2785]=0;return}if((S|0)==(e|0)){S=(t[2785]|0)+n|0,t[2785]=S,t[2788]=h,t[D+4>>2]=S|1,t[h+S>>2]=S;return}l=(u&-8)+n|0,r=u>>>3;do if(u>>>0<256)if(n=t[S+8>>2]|0,e=t[S+12>>2]|0,(e|0)==(n|0)){t[2783]=t[2783]&~(1<>2]=e,t[e+8>>2]=n;break}else{s=t[S+24>>2]|0,e=t[S+12>>2]|0;do if((e|0)==(S|0)){if(r=S+16|0,n=r+4|0,e=t[n>>2]|0,!e)if(e=t[r>>2]|0,e)n=r;else{r=0;break}for(;;){if(r=e+20|0,u=t[r>>2]|0,u|0){e=u,n=r;continue}if(r=e+16|0,u=t[r>>2]|0,u)e=u,n=r;else break}t[n>>2]=0,r=e}else r=t[S+8>>2]|0,t[r+12>>2]=e,t[e+8>>2]=r,r=e;while(0);if(s|0){if(e=t[S+28>>2]|0,n=11436+(e<<2)|0,(S|0)==(t[n>>2]|0)){if(t[n>>2]=r,!r){t[2784]=t[2784]&~(1<>2]|0)!=(S|0)&1)<<2)>>2]=r,!r)break;t[r+24>>2]=s,e=S+16|0,n=t[e>>2]|0,n|0&&(t[r+16>>2]=n,t[n+24>>2]=r),e=t[e+4>>2]|0,e|0&&(t[r+20>>2]=e,t[e+24>>2]=r)}}while(0);if(t[D+4>>2]=l|1,t[h+l>>2]=l,(D|0)==(t[2788]|0)){t[2785]=l;return}}if(e=l>>>3,l>>>0<256){r=11172+(e<<1<<2)|0,n=t[2783]|0,e=1<>2]|0):(t[2783]=n|e,e=r,n=r+8|0),t[n>>2]=D,t[e+12>>2]=D,t[D+8>>2]=e,t[D+12>>2]=r;return}e=l>>>8,e?l>>>0>16777215?e=31:(h=(e+1048320|0)>>>16&8,S=e<>>16&4,S=S<>>16&2,e=14-(s|h|e)+(S<>>15)|0,e=l>>>(e+7|0)&1|e<<1):e=0,u=11436+(e<<2)|0,t[D+28>>2]=e,t[D+20>>2]=0,t[D+16>>2]=0,n=t[2784]|0,r=1<>>1)|0),r=t[u>>2]|0;;){if((t[r+4>>2]&-8|0)==(l|0)){e=73;break}if(u=r+16+(n>>>31<<2)|0,e=t[u>>2]|0,e)n=n<<1,r=e;else{e=72;break}}if((e|0)==72){t[u>>2]=D,t[D+24>>2]=r,t[D+12>>2]=D,t[D+8>>2]=D;break}else if((e|0)==73){h=r+8|0,S=t[h>>2]|0,t[S+12>>2]=D,t[h>>2]=D,t[D+8>>2]=S,t[D+12>>2]=r,t[D+24>>2]=0;break}}else t[2784]=n|r,t[u>>2]=D,t[D+24>>2]=u,t[D+12>>2]=D,t[D+8>>2]=D;while(0);if(S=(t[2791]|0)+-1|0,t[2791]=S,!S)e=11588;else return;for(;e=t[e>>2]|0,e;)e=e+8|0;t[2791]=-1}}}function CI(){return 11628}function xI(e){e=e|0;var n=0,r=0;return n=m,m=m+16|0,r=n,t[r>>2]=OI(t[e+60>>2]|0)|0,e=A_(wu(6,r|0)|0)|0,m=n,e|0}function N8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0;P=m,m=m+48|0,M=P+16|0,s=P,l=P+32|0,D=e+28|0,u=t[D>>2]|0,t[l>>2]=u,S=e+20|0,u=(t[S>>2]|0)-u|0,t[l+4>>2]=u,t[l+8>>2]=n,t[l+12>>2]=r,u=u+r|0,h=e+60|0,t[s>>2]=t[h>>2],t[s+4>>2]=l,t[s+8>>2]=2,s=A_(d0(146,s|0)|0)|0;e:do if((u|0)!=(s|0)){for(n=2;!((s|0)<0);)if(u=u-s|0,Pe=t[l+4>>2]|0,K=s>>>0>Pe>>>0,l=K?l+8|0:l,n=(K<<31>>31)+n|0,Pe=s-(K?Pe:0)|0,t[l>>2]=(t[l>>2]|0)+Pe,K=l+4|0,t[K>>2]=(t[K>>2]|0)-Pe,t[M>>2]=t[h>>2],t[M+4>>2]=l,t[M+8>>2]=n,s=A_(d0(146,M|0)|0)|0,(u|0)==(s|0)){O=3;break e}t[e+16>>2]=0,t[D>>2]=0,t[S>>2]=0,t[e>>2]=t[e>>2]|32,(n|0)==2?r=0:r=r-(t[l+4>>2]|0)|0}else O=3;while(0);return(O|0)==3&&(Pe=t[e+44>>2]|0,t[e+16>>2]=Pe+(t[e+48>>2]|0),t[D>>2]=Pe,t[S>>2]=Pe),m=P,r|0}function AI(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;return l=m,m=m+32|0,s=l,u=l+20|0,t[s>>2]=t[e+60>>2],t[s+4>>2]=0,t[s+8>>2]=n,t[s+12>>2]=u,t[s+16>>2]=r,(A_(Ti(140,s|0)|0)|0)<0?(t[u>>2]=-1,e=-1):e=t[u>>2]|0,m=l,e|0}function A_(e){return e=e|0,e>>>0>4294963200&&(t[(Fv()|0)>>2]=0-e,e=-1),e|0}function Fv(){return(RI()|0)+64|0}function RI(){return VE()|0}function VE(){return 2084}function OI(e){return e=e|0,e|0}function kI(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;return l=m,m=m+32|0,u=l,t[e+36>>2]=1,((t[e>>2]&64|0)==0?(t[u>>2]=t[e+60>>2],t[u+4>>2]=21523,t[u+8>>2]=l+16,b0(54,u|0)|0):0)&&(p[e+75>>0]=-1),u=N8(e,n,r)|0,m=l,u|0}function L8(e,n){e=e|0,n=n|0;var r=0,u=0;if(r=p[e>>0]|0,u=p[n>>0]|0,r<<24>>24==0?1:r<<24>>24!=u<<24>>24)e=u;else{do e=e+1|0,n=n+1|0,r=p[e>>0]|0,u=p[n>>0]|0;while(!(r<<24>>24==0?1:r<<24>>24!=u<<24>>24));e=u}return(r&255)-(e&255)|0}function MI(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0;e:do if(!r)e=0;else{for(;u=p[e>>0]|0,l=p[n>>0]|0,u<<24>>24==l<<24>>24;)if(r=r+-1|0,r)e=e+1|0,n=n+1|0;else{e=0;break e}e=(u&255)-(l&255)|0}while(0);return e|0}function F8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0,Ee=0,ve=0;ve=m,m=m+224|0,O=ve+120|0,P=ve+80|0,Pe=ve,Ee=ve+136|0,u=P,l=u+40|0;do t[u>>2]=0,u=u+4|0;while((u|0)<(l|0));return t[O>>2]=t[r>>2],(GE(0,n,O,Pe,P)|0)<0?r=-1:((t[e+76>>2]|0)>-1?K=NI(e)|0:K=0,r=t[e>>2]|0,M=r&32,(p[e+74>>0]|0)<1&&(t[e>>2]=r&-33),u=e+48|0,t[u>>2]|0?r=GE(e,n,O,Pe,P)|0:(l=e+44|0,s=t[l>>2]|0,t[l>>2]=Ee,h=e+28|0,t[h>>2]=Ee,D=e+20|0,t[D>>2]=Ee,t[u>>2]=80,S=e+16|0,t[S>>2]=Ee+80,r=GE(e,n,O,Pe,P)|0,s&&(M_[t[e+36>>2]&7](e,0,0)|0,r=(t[D>>2]|0)==0?-1:r,t[l>>2]=s,t[u>>2]=0,t[S>>2]=0,t[h>>2]=0,t[D>>2]=0)),u=t[e>>2]|0,t[e>>2]=u|M,K|0&&LI(e),r=(u&32|0)==0?r:-1),m=ve,r|0}function GE(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0,Ee=0,ve=0,Qe=0,We=0,st=0,Re=0,Fe=0,Qt=0,Lr=0,Nn=0,mn=0,hr=0,kr=0,On=0;On=m,m=m+64|0,Nn=On+16|0,mn=On,Qt=On+24|0,hr=On+8|0,kr=On+20|0,t[Nn>>2]=n,st=(e|0)!=0,Re=Qt+40|0,Fe=Re,Qt=Qt+39|0,Lr=hr+4|0,h=0,s=0,O=0;e:for(;;){do if((s|0)>-1)if((h|0)>(2147483647-s|0)){t[(Fv()|0)>>2]=75,s=-1;break}else{s=h+s|0;break}while(0);if(h=p[n>>0]|0,h<<24>>24)D=n;else{We=87;break}t:for(;;){switch(h<<24>>24){case 37:{h=D,We=9;break t}case 0:{h=D;break t}default:}Qe=D+1|0,t[Nn>>2]=Qe,h=p[Qe>>0]|0,D=Qe}t:do if((We|0)==9)for(;;){if(We=0,(p[D+1>>0]|0)!=37)break t;if(h=h+1|0,D=D+2|0,t[Nn>>2]=D,(p[D>>0]|0)==37)We=9;else break}while(0);if(h=h-n|0,st&&qo(e,n,h),h|0){n=D;continue}S=D+1|0,h=(p[S>>0]|0)+-48|0,h>>>0<10?(Qe=(p[D+2>>0]|0)==36,ve=Qe?h:-1,O=Qe?1:O,S=Qe?D+3|0:S):ve=-1,t[Nn>>2]=S,h=p[S>>0]|0,D=(h<<24>>24)+-32|0;t:do if(D>>>0<32)for(M=0,P=h;;){if(h=1<>2]=S,h=p[S>>0]|0,D=(h<<24>>24)+-32|0,D>>>0>=32)break;P=h}else M=0;while(0);if(h<<24>>24==42){if(D=S+1|0,h=(p[D>>0]|0)+-48|0,h>>>0<10?(p[S+2>>0]|0)==36:0)t[l+(h<<2)>>2]=10,h=t[u+((p[D>>0]|0)+-48<<3)>>2]|0,O=1,S=S+3|0;else{if(O|0){s=-1;break}st?(O=(t[r>>2]|0)+(4-1)&~(4-1),h=t[O>>2]|0,t[r>>2]=O+4,O=0,S=D):(h=0,O=0,S=D)}t[Nn>>2]=S,Qe=(h|0)<0,h=Qe?0-h|0:h,M=Qe?M|8192:M}else{if(h=b8(Nn)|0,(h|0)<0){s=-1;break}S=t[Nn>>2]|0}do if((p[S>>0]|0)==46){if((p[S+1>>0]|0)!=42){t[Nn>>2]=S+1,D=b8(Nn)|0,S=t[Nn>>2]|0;break}if(P=S+2|0,D=(p[P>>0]|0)+-48|0,D>>>0<10?(p[S+3>>0]|0)==36:0){t[l+(D<<2)>>2]=10,D=t[u+((p[P>>0]|0)+-48<<3)>>2]|0,S=S+4|0,t[Nn>>2]=S;break}if(O|0){s=-1;break e}st?(Qe=(t[r>>2]|0)+(4-1)&~(4-1),D=t[Qe>>2]|0,t[r>>2]=Qe+4):D=0,t[Nn>>2]=P,S=P}else D=-1;while(0);for(Ee=0;;){if(((p[S>>0]|0)+-65|0)>>>0>57){s=-1;break e}if(Qe=S+1|0,t[Nn>>2]=Qe,P=p[(p[S>>0]|0)+-65+(5178+(Ee*58|0))>>0]|0,K=P&255,(K+-1|0)>>>0<8)Ee=K,S=Qe;else break}if(!(P<<24>>24)){s=-1;break}Pe=(ve|0)>-1;do if(P<<24>>24==19)if(Pe){s=-1;break e}else We=49;else{if(Pe){t[l+(ve<<2)>>2]=K,Pe=u+(ve<<3)|0,ve=t[Pe+4>>2]|0,We=mn,t[We>>2]=t[Pe>>2],t[We+4>>2]=ve,We=49;break}if(!st){s=0;break e}P8(mn,K,r)}while(0);if((We|0)==49?(We=0,!st):0){h=0,n=Qe;continue}S=p[S>>0]|0,S=(Ee|0)!=0&(S&15|0)==3?S&-33:S,Pe=M&-65537,ve=(M&8192|0)==0?M:Pe;t:do switch(S|0){case 110:switch((Ee&255)<<24>>24){case 0:{t[t[mn>>2]>>2]=s,h=0,n=Qe;continue e}case 1:{t[t[mn>>2]>>2]=s,h=0,n=Qe;continue e}case 2:{h=t[mn>>2]|0,t[h>>2]=s,t[h+4>>2]=((s|0)<0)<<31>>31,h=0,n=Qe;continue e}case 3:{E[t[mn>>2]>>1]=s,h=0,n=Qe;continue e}case 4:{p[t[mn>>2]>>0]=s,h=0,n=Qe;continue e}case 6:{t[t[mn>>2]>>2]=s,h=0,n=Qe;continue e}case 7:{h=t[mn>>2]|0,t[h>>2]=s,t[h+4>>2]=((s|0)<0)<<31>>31,h=0,n=Qe;continue e}default:{h=0,n=Qe;continue e}}case 112:{S=120,D=D>>>0>8?D:8,n=ve|8,We=61;break}case 88:case 120:{n=ve,We=61;break}case 111:{S=mn,n=t[S>>2]|0,S=t[S+4>>2]|0,K=bI(n,S,Re)|0,Pe=Fe-K|0,M=0,P=5642,D=(ve&8|0)==0|(D|0)>(Pe|0)?D:Pe+1|0,Pe=ve,We=67;break}case 105:case 100:if(S=mn,n=t[S>>2]|0,S=t[S+4>>2]|0,(S|0)<0){n=R_(0,0,n|0,S|0)|0,S=ft,M=mn,t[M>>2]=n,t[M+4>>2]=S,M=1,P=5642,We=66;break t}else{M=(ve&2049|0)!=0&1,P=(ve&2048|0)==0?(ve&1|0)==0?5642:5644:5643,We=66;break t}case 117:{S=mn,M=0,P=5642,n=t[S>>2]|0,S=t[S+4>>2]|0,We=66;break}case 99:{p[Qt>>0]=t[mn>>2],n=Qt,M=0,P=5642,K=Re,S=1,D=Pe;break}case 109:{S=PI(t[(Fv()|0)>>2]|0)|0,We=71;break}case 115:{S=t[mn>>2]|0,S=S|0?S:5652,We=71;break}case 67:{t[hr>>2]=t[mn>>2],t[Lr>>2]=0,t[mn>>2]=hr,K=-1,S=hr,We=75;break}case 83:{n=t[mn>>2]|0,D?(K=D,S=n,We=75):(hl(e,32,h,0,ve),n=0,We=84);break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{h=BI(e,+U[mn>>3],h,D,ve,S)|0,n=Qe;continue e}default:M=0,P=5642,K=Re,S=D,D=ve}while(0);t:do if((We|0)==61)ve=mn,Ee=t[ve>>2]|0,ve=t[ve+4>>2]|0,K=FI(Ee,ve,Re,S&32)|0,P=(n&8|0)==0|(Ee|0)==0&(ve|0)==0,M=P?0:2,P=P?5642:5642+(S>>4)|0,Pe=n,n=Ee,S=ve,We=67;else if((We|0)==66)K=bv(n,S,Re)|0,Pe=ve,We=67;else if((We|0)==71)We=0,ve=II(S,0,D)|0,Ee=(ve|0)==0,n=S,M=0,P=5642,K=Ee?S+D|0:ve,S=Ee?D:ve-S|0,D=Pe;else if((We|0)==75){for(We=0,P=S,n=0,D=0;M=t[P>>2]|0,!(!M||(D=I8(kr,M)|0,(D|0)<0|D>>>0>(K-n|0)>>>0));)if(n=D+n|0,K>>>0>n>>>0)P=P+4|0;else break;if((D|0)<0){s=-1;break e}if(hl(e,32,h,n,ve),!n)n=0,We=84;else for(M=0;;){if(D=t[S>>2]|0,!D){We=84;break t}if(D=I8(kr,D)|0,M=D+M|0,(M|0)>(n|0)){We=84;break t}if(qo(e,kr,D),M>>>0>=n>>>0){We=84;break}else S=S+4|0}}while(0);if((We|0)==67)We=0,S=(n|0)!=0|(S|0)!=0,ve=(D|0)!=0|S,S=((S^1)&1)+(Fe-K)|0,n=ve?K:Re,K=Re,S=ve?(D|0)>(S|0)?D:S:D,D=(D|0)>-1?Pe&-65537:Pe;else if((We|0)==84){We=0,hl(e,32,h,n,ve^8192),h=(h|0)>(n|0)?h:n,n=Qe;continue}Ee=K-n|0,Pe=(S|0)<(Ee|0)?Ee:S,ve=Pe+M|0,h=(h|0)<(ve|0)?ve:h,hl(e,32,h,ve,D),qo(e,P,M),hl(e,48,h,ve,D^65536),hl(e,48,Pe,Ee,0),qo(e,n,Ee),hl(e,32,h,ve,D^8192),n=Qe}e:do if((We|0)==87&&!e)if(!O)s=0;else{for(s=1;n=t[l+(s<<2)>>2]|0,!!n;)if(P8(u+(s<<3)|0,n,r),s=s+1|0,(s|0)>=10){s=1;break e}for(;;){if(t[l+(s<<2)>>2]|0){s=-1;break e}if(s=s+1|0,(s|0)>=10){s=1;break}}}while(0);return m=On,s|0}function NI(e){return e=e|0,0}function LI(e){e=e|0}function qo(e,n,r){e=e|0,n=n|0,r=r|0,t[e>>2]&32||YI(n,r,e)|0}function b8(e){e=e|0;var n=0,r=0,u=0;if(r=t[e>>2]|0,u=(p[r>>0]|0)+-48|0,u>>>0<10){n=0;do n=u+(n*10|0)|0,r=r+1|0,t[e>>2]=r,u=(p[r>>0]|0)+-48|0;while(u>>>0<10)}else n=0;return n|0}function P8(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;e:do if(n>>>0<=20)do switch(n|0){case 9:{u=(t[r>>2]|0)+(4-1)&~(4-1),n=t[u>>2]|0,t[r>>2]=u+4,t[e>>2]=n;break e}case 10:{u=(t[r>>2]|0)+(4-1)&~(4-1),n=t[u>>2]|0,t[r>>2]=u+4,u=e,t[u>>2]=n,t[u+4>>2]=((n|0)<0)<<31>>31;break e}case 11:{u=(t[r>>2]|0)+(4-1)&~(4-1),n=t[u>>2]|0,t[r>>2]=u+4,u=e,t[u>>2]=n,t[u+4>>2]=0;break e}case 12:{u=(t[r>>2]|0)+(8-1)&~(8-1),n=u,l=t[n>>2]|0,n=t[n+4>>2]|0,t[r>>2]=u+8,u=e,t[u>>2]=l,t[u+4>>2]=n;break e}case 13:{l=(t[r>>2]|0)+(4-1)&~(4-1),u=t[l>>2]|0,t[r>>2]=l+4,u=(u&65535)<<16>>16,l=e,t[l>>2]=u,t[l+4>>2]=((u|0)<0)<<31>>31;break e}case 14:{l=(t[r>>2]|0)+(4-1)&~(4-1),u=t[l>>2]|0,t[r>>2]=l+4,l=e,t[l>>2]=u&65535,t[l+4>>2]=0;break e}case 15:{l=(t[r>>2]|0)+(4-1)&~(4-1),u=t[l>>2]|0,t[r>>2]=l+4,u=(u&255)<<24>>24,l=e,t[l>>2]=u,t[l+4>>2]=((u|0)<0)<<31>>31;break e}case 16:{l=(t[r>>2]|0)+(4-1)&~(4-1),u=t[l>>2]|0,t[r>>2]=l+4,l=e,t[l>>2]=u&255,t[l+4>>2]=0;break e}case 17:{l=(t[r>>2]|0)+(8-1)&~(8-1),s=+U[l>>3],t[r>>2]=l+8,U[e>>3]=s;break e}case 18:{l=(t[r>>2]|0)+(8-1)&~(8-1),s=+U[l>>3],t[r>>2]=l+8,U[e>>3]=s;break e}default:break e}while(0);while(0)}function FI(e,n,r,u){if(e=e|0,n=n|0,r=r|0,u=u|0,!((e|0)==0&(n|0)==0))do r=r+-1|0,p[r>>0]=k[5694+(e&15)>>0]|0|u,e=O_(e|0,n|0,4)|0,n=ft;while(!((e|0)==0&(n|0)==0));return r|0}function bI(e,n,r){if(e=e|0,n=n|0,r=r|0,!((e|0)==0&(n|0)==0))do r=r+-1|0,p[r>>0]=e&7|48,e=O_(e|0,n|0,3)|0,n=ft;while(!((e|0)==0&(n|0)==0));return r|0}function bv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;if(n>>>0>0|(n|0)==0&e>>>0>4294967295){for(;u=QE(e|0,n|0,10,0)|0,r=r+-1|0,p[r>>0]=u&255|48,u=e,e=XE(e|0,n|0,10,0)|0,n>>>0>9|(n|0)==9&u>>>0>4294967295;)n=ft;n=e}else n=e;if(n)for(;r=r+-1|0,p[r>>0]=(n>>>0)%10|0|48,!(n>>>0<10);)n=(n>>>0)/10|0;return r|0}function PI(e){return e=e|0,HI(e,t[(qI()|0)+188>>2]|0)|0}function II(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;s=n&255,u=(r|0)!=0;e:do if(u&(e&3|0)!=0)for(l=n&255;;){if((p[e>>0]|0)==l<<24>>24){h=6;break e}if(e=e+1|0,r=r+-1|0,u=(r|0)!=0,!(u&(e&3|0)!=0)){h=5;break}}else h=5;while(0);(h|0)==5&&(u?h=6:r=0);e:do if((h|0)==6&&(l=n&255,(p[e>>0]|0)!=l<<24>>24)){u=nr(s,16843009)|0;t:do if(r>>>0>3){for(;s=t[e>>2]^u,!((s&-2139062144^-2139062144)&s+-16843009|0);)if(e=e+4|0,r=r+-4|0,r>>>0<=3){h=11;break t}}else h=11;while(0);if((h|0)==11&&!r){r=0;break}for(;;){if((p[e>>0]|0)==l<<24>>24)break e;if(e=e+1|0,r=r+-1|0,!r){r=0;break}}}while(0);return(r|0?e:0)|0}function hl(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0;if(h=m,m=m+256|0,s=h,(r|0)>(u|0)&(l&73728|0)==0){if(l=r-u|0,Iv(s|0,n|0,(l>>>0<256?l:256)|0)|0,l>>>0>255){n=r-u|0;do qo(e,s,256),l=l+-256|0;while(l>>>0>255);l=n&255}qo(e,s,l)}m=h}function I8(e,n){return e=e|0,n=n|0,e?e=jI(e,n,0)|0:e=0,e|0}function BI(e,n,r,u,l,s){e=e|0,n=+n,r=r|0,u=u|0,l=l|0,s=s|0;var h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0,Ee=0,ve=0,Qe=0,We=0,st=0,Re=0,Fe=0,Qt=0,Lr=0,Nn=0,mn=0,hr=0,kr=0,On=0,Zi=0;Zi=m,m=m+560|0,S=Zi+8|0,Qe=Zi,On=Zi+524|0,kr=On,M=Zi+512|0,t[Qe>>2]=0,hr=M+12|0,B8(n)|0,(ft|0)<0?(n=-n,Nn=1,Lr=5659):(Nn=(l&2049|0)!=0&1,Lr=(l&2048|0)==0?(l&1|0)==0?5660:5665:5662),B8(n)|0,mn=ft&2146435072;do if(mn>>>0<2146435072|(mn|0)==2146435072&0<0){if(Pe=+UI(n,Qe)*2,h=Pe!=0,h&&(t[Qe>>2]=(t[Qe>>2]|0)+-1),st=s|32,(st|0)==97){Ee=s&32,K=(Ee|0)==0?Lr:Lr+9|0,P=Nn|2,h=12-u|0;do if(u>>>0>11|(h|0)==0)n=Pe;else{n=8;do h=h+-1|0,n=n*16;while((h|0)!=0);if((p[K>>0]|0)==45){n=-(n+(-Pe-n));break}else{n=Pe+n-n;break}}while(0);D=t[Qe>>2]|0,h=(D|0)<0?0-D|0:D,h=bv(h,((h|0)<0)<<31>>31,hr)|0,(h|0)==(hr|0)&&(h=M+11|0,p[h>>0]=48),p[h+-1>>0]=(D>>31&2)+43,O=h+-2|0,p[O>>0]=s+15,M=(u|0)<1,S=(l&8|0)==0,h=On;do mn=~~n,D=h+1|0,p[h>>0]=k[5694+mn>>0]|Ee,n=(n-+(mn|0))*16,((D-kr|0)==1?!(S&(M&n==0)):0)?(p[D>>0]=46,h=h+2|0):h=D;while(n!=0);mn=h-kr|0,kr=hr-O|0,hr=(u|0)!=0&(mn+-2|0)<(u|0)?u+2|0:mn,h=kr+P+hr|0,hl(e,32,r,h,l),qo(e,K,P),hl(e,48,r,h,l^65536),qo(e,On,mn),hl(e,48,hr-mn|0,0,0),qo(e,O,kr),hl(e,32,r,h,l^8192);break}D=(u|0)<0?6:u,h?(h=(t[Qe>>2]|0)+-28|0,t[Qe>>2]=h,n=Pe*268435456):(n=Pe,h=t[Qe>>2]|0),mn=(h|0)<0?S:S+288|0,S=mn;do Fe=~~n>>>0,t[S>>2]=Fe,S=S+4|0,n=(n-+(Fe>>>0))*1e9;while(n!=0);if((h|0)>0)for(M=mn,P=S;;){if(O=(h|0)<29?h:29,h=P+-4|0,h>>>0>=M>>>0){S=0;do Re=W8(t[h>>2]|0,0,O|0)|0,Re=KE(Re|0,ft|0,S|0,0)|0,Fe=ft,We=QE(Re|0,Fe|0,1e9,0)|0,t[h>>2]=We,S=XE(Re|0,Fe|0,1e9,0)|0,h=h+-4|0;while(h>>>0>=M>>>0);S&&(M=M+-4|0,t[M>>2]=S)}for(S=P;!(S>>>0<=M>>>0);)if(h=S+-4|0,!(t[h>>2]|0))S=h;else break;if(h=(t[Qe>>2]|0)-O|0,t[Qe>>2]=h,(h|0)>0)P=S;else break}else M=mn;if((h|0)<0){u=((D+25|0)/9|0)+1|0,ve=(st|0)==102;do{if(Ee=0-h|0,Ee=(Ee|0)<9?Ee:9,M>>>0>>0){O=(1<>>Ee,K=0,h=M;do Fe=t[h>>2]|0,t[h>>2]=(Fe>>>Ee)+K,K=nr(Fe&O,P)|0,h=h+4|0;while(h>>>0>>0);h=(t[M>>2]|0)==0?M+4|0:M,K?(t[S>>2]=K,M=h,h=S+4|0):(M=h,h=S)}else M=(t[M>>2]|0)==0?M+4|0:M,h=S;S=ve?mn:M,S=(h-S>>2|0)>(u|0)?S+(u<<2)|0:h,h=(t[Qe>>2]|0)+Ee|0,t[Qe>>2]=h}while((h|0)<0);h=M,u=S}else h=M,u=S;if(Fe=mn,h>>>0>>0){if(S=(Fe-h>>2)*9|0,O=t[h>>2]|0,O>>>0>=10){M=10;do M=M*10|0,S=S+1|0;while(O>>>0>=M>>>0)}}else S=0;if(ve=(st|0)==103,We=(D|0)!=0,M=D-((st|0)!=102?S:0)+((We&ve)<<31>>31)|0,(M|0)<(((u-Fe>>2)*9|0)+-9|0)){if(M=M+9216|0,Ee=mn+4+(((M|0)/9|0)+-1024<<2)|0,M=((M|0)%9|0)+1|0,(M|0)<9){O=10;do O=O*10|0,M=M+1|0;while((M|0)!=9)}else O=10;if(P=t[Ee>>2]|0,K=(P>>>0)%(O>>>0)|0,M=(Ee+4|0)==(u|0),M&(K|0)==0)M=Ee;else if(Pe=(((P>>>0)/(O>>>0)|0)&1|0)==0?9007199254740992:9007199254740994,Re=(O|0)/2|0,n=K>>>0>>0?.5:M&(K|0)==(Re|0)?1:1.5,Nn&&(Re=(p[Lr>>0]|0)==45,n=Re?-n:n,Pe=Re?-Pe:Pe),M=P-K|0,t[Ee>>2]=M,Pe+n!=Pe){if(Re=M+O|0,t[Ee>>2]=Re,Re>>>0>999999999)for(S=Ee;M=S+-4|0,t[S>>2]=0,M>>>0>>0&&(h=h+-4|0,t[h>>2]=0),Re=(t[M>>2]|0)+1|0,t[M>>2]=Re,Re>>>0>999999999;)S=M;else M=Ee;if(S=(Fe-h>>2)*9|0,P=t[h>>2]|0,P>>>0>=10){O=10;do O=O*10|0,S=S+1|0;while(P>>>0>=O>>>0)}}else M=Ee;M=M+4|0,M=u>>>0>M>>>0?M:u,Re=h}else M=u,Re=h;for(st=M;;){if(st>>>0<=Re>>>0){Qe=0;break}if(h=st+-4|0,!(t[h>>2]|0))st=h;else{Qe=1;break}}u=0-S|0;do if(ve)if(h=((We^1)&1)+D|0,(h|0)>(S|0)&(S|0)>-5?(O=s+-1|0,D=h+-1-S|0):(O=s+-2|0,D=h+-1|0),h=l&8,h)Ee=h;else{if(Qe?(Qt=t[st+-4>>2]|0,(Qt|0)!=0):0)if((Qt>>>0)%10|0)M=0;else{M=0,h=10;do h=h*10|0,M=M+1|0;while(!((Qt>>>0)%(h>>>0)|0|0))}else M=9;if(h=((st-Fe>>2)*9|0)+-9|0,(O|32|0)==102){Ee=h-M|0,Ee=(Ee|0)>0?Ee:0,D=(D|0)<(Ee|0)?D:Ee,Ee=0;break}else{Ee=h+S-M|0,Ee=(Ee|0)>0?Ee:0,D=(D|0)<(Ee|0)?D:Ee,Ee=0;break}}else O=s,Ee=l&8;while(0);if(ve=D|Ee,P=(ve|0)!=0&1,K=(O|32|0)==102,K)We=0,h=(S|0)>0?S:0;else{if(h=(S|0)<0?u:S,h=bv(h,((h|0)<0)<<31>>31,hr)|0,M=hr,(M-h|0)<2)do h=h+-1|0,p[h>>0]=48;while((M-h|0)<2);p[h+-1>>0]=(S>>31&2)+43,h=h+-2|0,p[h>>0]=O,We=h,h=M-h|0}if(h=Nn+1+D+P+h|0,hl(e,32,r,h,l),qo(e,Lr,Nn),hl(e,48,r,h,l^65536),K){O=Re>>>0>mn>>>0?mn:Re,Ee=On+9|0,P=Ee,K=On+8|0,M=O;do{if(S=bv(t[M>>2]|0,0,Ee)|0,(M|0)==(O|0))(S|0)==(Ee|0)&&(p[K>>0]=48,S=K);else if(S>>>0>On>>>0){Iv(On|0,48,S-kr|0)|0;do S=S+-1|0;while(S>>>0>On>>>0)}qo(e,S,P-S|0),M=M+4|0}while(M>>>0<=mn>>>0);if(ve|0&&qo(e,5710,1),M>>>0>>0&(D|0)>0)for(;;){if(S=bv(t[M>>2]|0,0,Ee)|0,S>>>0>On>>>0){Iv(On|0,48,S-kr|0)|0;do S=S+-1|0;while(S>>>0>On>>>0)}if(qo(e,S,(D|0)<9?D:9),M=M+4|0,S=D+-9|0,M>>>0>>0&(D|0)>9)D=S;else{D=S;break}}hl(e,48,D+9|0,9,0)}else{if(ve=Qe?st:Re+4|0,(D|0)>-1){Qe=On+9|0,Ee=(Ee|0)==0,u=Qe,P=0-kr|0,K=On+8|0,O=Re;do{S=bv(t[O>>2]|0,0,Qe)|0,(S|0)==(Qe|0)&&(p[K>>0]=48,S=K);do if((O|0)==(Re|0)){if(M=S+1|0,qo(e,S,1),Ee&(D|0)<1){S=M;break}qo(e,5710,1),S=M}else{if(S>>>0<=On>>>0)break;Iv(On|0,48,S+P|0)|0;do S=S+-1|0;while(S>>>0>On>>>0)}while(0);kr=u-S|0,qo(e,S,(D|0)>(kr|0)?kr:D),D=D-kr|0,O=O+4|0}while(O>>>0>>0&(D|0)>-1)}hl(e,48,D+18|0,18,0),qo(e,We,hr-We|0)}hl(e,32,r,h,l^8192)}else On=(s&32|0)!=0,h=Nn+3|0,hl(e,32,r,h,l&-65537),qo(e,Lr,Nn),qo(e,n!=n|!1?On?5686:5690:On?5678:5682,3),hl(e,32,r,h,l^8192);while(0);return m=Zi,((h|0)<(r|0)?r:h)|0}function B8(e){e=+e;var n=0;return U[W>>3]=e,n=t[W>>2]|0,ft=t[W+4>>2]|0,n|0}function UI(e,n){return e=+e,n=n|0,+ +U8(e,n)}function U8(e,n){e=+e,n=n|0;var r=0,u=0,l=0;switch(U[W>>3]=e,r=t[W>>2]|0,u=t[W+4>>2]|0,l=O_(r|0,u|0,52)|0,l&2047){case 0:{e!=0?(e=+U8(e*18446744073709552e3,n),r=(t[n>>2]|0)+-64|0):r=0,t[n>>2]=r;break}case 2047:break;default:t[n>>2]=(l&2047)+-1022,t[W>>2]=r,t[W+4>>2]=u&-2146435073|1071644672,e=+U[W>>3]}return+e}function jI(e,n,r){e=e|0,n=n|0,r=r|0;do if(e){if(n>>>0<128){p[e>>0]=n,e=1;break}if(!(t[t[(zI()|0)+188>>2]>>2]|0))if((n&-128|0)==57216){p[e>>0]=n,e=1;break}else{t[(Fv()|0)>>2]=84,e=-1;break}if(n>>>0<2048){p[e>>0]=n>>>6|192,p[e+1>>0]=n&63|128,e=2;break}if(n>>>0<55296|(n&-8192|0)==57344){p[e>>0]=n>>>12|224,p[e+1>>0]=n>>>6&63|128,p[e+2>>0]=n&63|128,e=3;break}if((n+-65536|0)>>>0<1048576){p[e>>0]=n>>>18|240,p[e+1>>0]=n>>>12&63|128,p[e+2>>0]=n>>>6&63|128,p[e+3>>0]=n&63|128,e=4;break}else{t[(Fv()|0)>>2]=84,e=-1;break}}else e=1;while(0);return e|0}function zI(){return VE()|0}function qI(){return VE()|0}function HI(e,n){e=e|0,n=n|0;var r=0,u=0;for(u=0;;){if((k[5712+u>>0]|0)==(e|0)){e=2;break}if(r=u+1|0,(r|0)==87){r=5800,u=87,e=5;break}else u=r}if((e|0)==2&&(u?(r=5800,e=5):r=5800),(e|0)==5)for(;;){do e=r,r=r+1|0;while((p[e>>0]|0)!=0);if(u=u+-1|0,u)e=5;else break}return WI(r,t[n+20>>2]|0)|0}function WI(e,n){return e=e|0,n=n|0,VI(e,n)|0}function VI(e,n){return e=e|0,n=n|0,n?n=GI(t[n>>2]|0,t[n+4>>2]|0,e)|0:n=0,(n|0?n:e)|0}function GI(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0;K=(t[e>>2]|0)+1794895138|0,s=Gp(t[e+8>>2]|0,K)|0,u=Gp(t[e+12>>2]|0,K)|0,l=Gp(t[e+16>>2]|0,K)|0;e:do if((s>>>0>>2>>>0?(P=n-(s<<2)|0,u>>>0

>>0&l>>>0

>>0):0)?((l|u)&3|0)==0:0){for(P=u>>>2,O=l>>>2,M=0;;){if(D=s>>>1,S=M+D|0,h=S<<1,l=h+P|0,u=Gp(t[e+(l<<2)>>2]|0,K)|0,l=Gp(t[e+(l+1<<2)>>2]|0,K)|0,!(l>>>0>>0&u>>>0<(n-l|0)>>>0)){u=0;break e}if(p[e+(l+u)>>0]|0){u=0;break e}if(u=L8(r,e+l|0)|0,!u)break;if(u=(u|0)<0,(s|0)==1){u=0;break e}else M=u?M:S,s=u?D:s-D|0}u=h+O|0,l=Gp(t[e+(u<<2)>>2]|0,K)|0,u=Gp(t[e+(u+1<<2)>>2]|0,K)|0,u>>>0>>0&l>>>0<(n-u|0)>>>0?u=(p[e+(u+l)>>0]|0)==0?e+u|0:0:u=0}else u=0;while(0);return u|0}function Gp(e,n){e=e|0,n=n|0;var r=0;return r=Y8(e|0)|0,((n|0)==0?e:r)|0}function YI(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0,D=0;u=r+16|0,l=t[u>>2]|0,l?s=5:KI(r)|0?u=0:(l=t[u>>2]|0,s=5);e:do if((s|0)==5){if(D=r+20|0,h=t[D>>2]|0,u=h,(l-h|0)>>>0>>0){u=M_[t[r+36>>2]&7](r,e,n)|0;break}t:do if((p[r+75>>0]|0)>-1){for(h=n;;){if(!h){s=0,l=e;break t}if(l=h+-1|0,(p[e+l>>0]|0)==10)break;h=l}if(u=M_[t[r+36>>2]&7](r,e,h)|0,u>>>0>>0)break e;s=h,l=e+h|0,n=n-h|0,u=t[D>>2]|0}else s=0,l=e;while(0);pr(u|0,l|0,n|0)|0,t[D>>2]=(t[D>>2]|0)+n,u=s+n|0}while(0);return u|0}function KI(e){e=e|0;var n=0,r=0;return n=e+74|0,r=p[n>>0]|0,p[n>>0]=r+255|r,n=t[e>>2]|0,n&8?(t[e>>2]=n|32,e=-1):(t[e+8>>2]=0,t[e+4>>2]=0,r=t[e+44>>2]|0,t[e+28>>2]=r,t[e+20>>2]=r,t[e+16>>2]=r+(t[e+48>>2]|0),e=0),e|0}function Eu(e,n){e=w(e),n=w(n);var r=0,u=0;r=j8(e)|0;do if((r&2147483647)>>>0<=2139095040){if(u=j8(n)|0,(u&2147483647)>>>0<=2139095040)if((u^r|0)<0){e=(r|0)<0?n:e;break}else{e=e>2]=e,t[W>>2]|0|0}function Yp(e,n){e=w(e),n=w(n);var r=0,u=0;r=z8(e)|0;do if((r&2147483647)>>>0<=2139095040){if(u=z8(n)|0,(u&2147483647)>>>0<=2139095040)if((u^r|0)<0){e=(r|0)<0?e:n;break}else{e=e>2]=e,t[W>>2]|0|0}function YE(e,n){e=w(e),n=w(n);var r=0,u=0,l=0,s=0,h=0,D=0,S=0,M=0;s=(C[W>>2]=e,t[W>>2]|0),D=(C[W>>2]=n,t[W>>2]|0),r=s>>>23&255,h=D>>>23&255,S=s&-2147483648,l=D<<1;e:do if((l|0)!=0?!((r|0)==255|((XI(n)|0)&2147483647)>>>0>2139095040):0){if(u=s<<1,u>>>0<=l>>>0)return n=w(e*w(0)),w((u|0)==(l|0)?n:e);if(r)u=s&8388607|8388608;else{if(r=s<<9,(r|0)>-1){u=r,r=0;do r=r+-1|0,u=u<<1;while((u|0)>-1)}else r=0;u=s<<1-r}if(h)D=D&8388607|8388608;else{if(s=D<<9,(s|0)>-1){l=0;do l=l+-1|0,s=s<<1;while((s|0)>-1)}else l=0;h=l,D=D<<1-l}l=u-D|0,s=(l|0)>-1;t:do if((r|0)>(h|0)){for(;;){if(s)if(l)u=l;else break;if(u=u<<1,r=r+-1|0,l=u-D|0,s=(l|0)>-1,(r|0)<=(h|0))break t}n=w(e*w(0));break e}while(0);if(s)if(l)u=l;else{n=w(e*w(0));break}if(u>>>0<8388608)do u=u<<1,r=r+-1|0;while(u>>>0<8388608);(r|0)>0?r=u+-8388608|r<<23:r=u>>>(1-r|0),n=(t[W>>2]=r|S,w(C[W>>2]))}else M=3;while(0);return(M|0)==3&&(n=w(e*n),n=w(n/n)),w(n)}function XI(e){return e=w(e),C[W>>2]=e,t[W>>2]|0|0}function QI(e,n){return e=e|0,n=n|0,F8(t[582]|0,e,n)|0}function li(e){e=e|0,Xn()}function Pv(e){e=e|0}function JI(e,n){return e=e|0,n=n|0,0}function ZI(e){return e=e|0,(q8(e+4|0)|0)==-1?(M1[t[(t[e>>2]|0)+8>>2]&127](e),e=1):e=0,e|0}function q8(e){e=e|0;var n=0;return n=t[e>>2]|0,t[e>>2]=n+-1,n+-1|0}function J2(e){e=e|0,ZI(e)|0&&$I(e)}function $I(e){e=e|0;var n=0;n=e+8|0,((t[n>>2]|0)!=0?(q8(n)|0)!=-1:0)||M1[t[(t[e>>2]|0)+16>>2]&127](e)}function cn(e){e=e|0;var n=0;for(n=(e|0)==0?1:e;e=C_(n)|0,!(e|0);){if(e=tB()|0,!e){e=0;break}rS[e&0]()}return e|0}function H8(e){return e=e|0,cn(e)|0}function yt(e){e=e|0,x_(e)}function eB(e){e=e|0,(p[e+11>>0]|0)<0&&yt(t[e>>2]|0)}function tB(){var e=0;return e=t[2923]|0,t[2923]=e+0,e|0}function nB(){}function R_(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,u=n-u-(r>>>0>e>>>0|0)>>>0,ft=u,e-r>>>0|0|0}function KE(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,r=e+r>>>0,ft=n+u+(r>>>0>>0|0)>>>0,r|0|0}function Iv(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0,h=0;if(s=e+r|0,n=n&255,(r|0)>=67){for(;e&3;)p[e>>0]=n,e=e+1|0;for(u=s&-4|0,l=u-64|0,h=n|n<<8|n<<16|n<<24;(e|0)<=(l|0);)t[e>>2]=h,t[e+4>>2]=h,t[e+8>>2]=h,t[e+12>>2]=h,t[e+16>>2]=h,t[e+20>>2]=h,t[e+24>>2]=h,t[e+28>>2]=h,t[e+32>>2]=h,t[e+36>>2]=h,t[e+40>>2]=h,t[e+44>>2]=h,t[e+48>>2]=h,t[e+52>>2]=h,t[e+56>>2]=h,t[e+60>>2]=h,e=e+64|0;for(;(e|0)<(u|0);)t[e>>2]=h,e=e+4|0}for(;(e|0)<(s|0);)p[e>>0]=n,e=e+1|0;return s-r|0}function W8(e,n,r){return e=e|0,n=n|0,r=r|0,(r|0)<32?(ft=n<>>32-r,e<>>r,e>>>r|(n&(1<>>r-32|0)}function pr(e,n,r){e=e|0,n=n|0,r=r|0;var u=0,l=0,s=0;if((r|0)>=8192)return ni(e|0,n|0,r|0)|0;if(s=e|0,l=e+r|0,(e&3)==(n&3)){for(;e&3;){if(!r)return s|0;p[e>>0]=p[n>>0]|0,e=e+1|0,n=n+1|0,r=r-1|0}for(r=l&-4|0,u=r-64|0;(e|0)<=(u|0);)t[e>>2]=t[n>>2],t[e+4>>2]=t[n+4>>2],t[e+8>>2]=t[n+8>>2],t[e+12>>2]=t[n+12>>2],t[e+16>>2]=t[n+16>>2],t[e+20>>2]=t[n+20>>2],t[e+24>>2]=t[n+24>>2],t[e+28>>2]=t[n+28>>2],t[e+32>>2]=t[n+32>>2],t[e+36>>2]=t[n+36>>2],t[e+40>>2]=t[n+40>>2],t[e+44>>2]=t[n+44>>2],t[e+48>>2]=t[n+48>>2],t[e+52>>2]=t[n+52>>2],t[e+56>>2]=t[n+56>>2],t[e+60>>2]=t[n+60>>2],e=e+64|0,n=n+64|0;for(;(e|0)<(r|0);)t[e>>2]=t[n>>2],e=e+4|0,n=n+4|0}else for(r=l-4|0;(e|0)<(r|0);)p[e>>0]=p[n>>0]|0,p[e+1>>0]=p[n+1>>0]|0,p[e+2>>0]=p[n+2>>0]|0,p[e+3>>0]=p[n+3>>0]|0,e=e+4|0,n=n+4|0;for(;(e|0)<(l|0);)p[e>>0]=p[n>>0]|0,e=e+1|0,n=n+1|0;return s|0}function V8(e){e=e|0;var n=0;return n=p[Se+(e&255)>>0]|0,(n|0)<8?n|0:(n=p[Se+(e>>8&255)>>0]|0,(n|0)<8?n+8|0:(n=p[Se+(e>>16&255)>>0]|0,(n|0)<8?n+16|0:(p[Se+(e>>>24)>>0]|0)+24|0))}function G8(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0;var s=0,h=0,D=0,S=0,M=0,O=0,P=0,K=0,Pe=0,Ee=0;if(O=e,S=n,M=S,h=r,K=u,D=K,!M)return s=(l|0)!=0,D?s?(t[l>>2]=e|0,t[l+4>>2]=n&0,K=0,l=0,ft=K,l|0):(K=0,l=0,ft=K,l|0):(s&&(t[l>>2]=(O>>>0)%(h>>>0),t[l+4>>2]=0),K=0,l=(O>>>0)/(h>>>0)>>>0,ft=K,l|0);s=(D|0)==0;do if(h){if(!s){if(s=(vr(D|0)|0)-(vr(M|0)|0)|0,s>>>0<=31){P=s+1|0,D=31-s|0,n=s-31>>31,h=P,e=O>>>(P>>>0)&n|M<>>(P>>>0)&n,s=0,D=O<>2]=e|0,t[l+4>>2]=S|n&0,K=0,l=0,ft=K,l|0):(K=0,l=0,ft=K,l|0)}if(s=h-1|0,s&h|0){D=(vr(h|0)|0)+33-(vr(M|0)|0)|0,Ee=64-D|0,P=32-D|0,S=P>>31,Pe=D-32|0,n=Pe>>31,h=D,e=P-1>>31&M>>>(Pe>>>0)|(M<>>(D>>>0))&n,n=n&M>>>(D>>>0),s=O<>>(Pe>>>0))&S|O<>31;break}return l|0&&(t[l>>2]=s&O,t[l+4>>2]=0),(h|0)==1?(Pe=S|n&0,Ee=e|0|0,ft=Pe,Ee|0):(Ee=V8(h|0)|0,Pe=M>>>(Ee>>>0)|0,Ee=M<<32-Ee|O>>>(Ee>>>0)|0,ft=Pe,Ee|0)}else{if(s)return l|0&&(t[l>>2]=(M>>>0)%(h>>>0),t[l+4>>2]=0),Pe=0,Ee=(M>>>0)/(h>>>0)>>>0,ft=Pe,Ee|0;if(!O)return l|0&&(t[l>>2]=0,t[l+4>>2]=(M>>>0)%(D>>>0)),Pe=0,Ee=(M>>>0)/(D>>>0)>>>0,ft=Pe,Ee|0;if(s=D-1|0,!(s&D))return l|0&&(t[l>>2]=e|0,t[l+4>>2]=s&M|n&0),Pe=0,Ee=M>>>((V8(D|0)|0)>>>0),ft=Pe,Ee|0;if(s=(vr(D|0)|0)-(vr(M|0)|0)|0,s>>>0<=30){n=s+1|0,D=31-s|0,h=n,e=M<>>(n>>>0),n=M>>>(n>>>0),s=0,D=O<>2]=e|0,t[l+4>>2]=S|n&0,Pe=0,Ee=0,ft=Pe,Ee|0):(Pe=0,Ee=0,ft=Pe,Ee|0)}while(0);if(!h)M=D,S=0,D=0;else{P=r|0|0,O=K|u&0,M=KE(P|0,O|0,-1,-1)|0,r=ft,S=D,D=0;do u=S,S=s>>>31|S<<1,s=D|s<<1,u=e<<1|u>>>31|0,K=e>>>31|n<<1|0,R_(M|0,r|0,u|0,K|0)|0,Ee=ft,Pe=Ee>>31|((Ee|0)<0?-1:0)<<1,D=Pe&1,e=R_(u|0,K|0,Pe&P|0,(((Ee|0)<0?-1:0)>>31|((Ee|0)<0?-1:0)<<1)&O|0)|0,n=ft,h=h-1|0;while((h|0)!=0);M=S,S=0}return h=0,l|0&&(t[l>>2]=e,t[l+4>>2]=n),Pe=(s|0)>>>31|(M|h)<<1|(h<<1|s>>>31)&0|S,Ee=(s<<1|0>>>31)&-2|D,ft=Pe,Ee|0}function XE(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,G8(e,n,r,u,0)|0}function Z2(e){e=e|0;var n=0,r=0;return r=e+15&-16|0,n=t[q>>2]|0,e=n+r|0,(r|0)>0&(e|0)<(n|0)|(e|0)<0?(ur()|0,Vl(12),-1):(t[q>>2]=e,((e|0)>(Fr()|0)?(fr()|0)==0:0)?(t[q>>2]=n,Vl(12),-1):n|0)}function Iy(e,n,r){e=e|0,n=n|0,r=r|0;var u=0;if((n|0)<(e|0)&(e|0)<(n+r|0)){for(u=e,n=n+r|0,e=e+r|0;(r|0)>0;)e=e-1|0,n=n-1|0,r=r-1|0,p[e>>0]=p[n>>0]|0;e=u}else pr(e,n,r)|0;return e|0}function QE(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0;var l=0,s=0;return s=m,m=m+16|0,l=s|0,G8(e,n,r,u,l)|0,m=s,ft=t[l+4>>2]|0,t[l>>2]|0|0}function Y8(e){return e=e|0,(e&255)<<24|(e>>8&255)<<16|(e>>16&255)<<8|e>>>24|0}function rB(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,K8[e&1](n|0,r|0,u|0,l|0,s|0)}function iB(e,n,r){e=e|0,n=n|0,r=w(r),X8[e&1](n|0,w(r))}function uB(e,n,r){e=e|0,n=n|0,r=+r,Q8[e&31](n|0,+r)}function oB(e,n,r,u){return e=e|0,n=n|0,r=w(r),u=w(u),w(J8[e&0](n|0,w(r),w(u)))}function lB(e,n){e=e|0,n=n|0,M1[e&127](n|0)}function sB(e,n,r){e=e|0,n=n|0,r=r|0,N1[e&31](n|0,r|0)}function aB(e,n){return e=e|0,n=n|0,Xp[e&31](n|0)|0}function fB(e,n,r,u,l){e=e|0,n=n|0,r=+r,u=+u,l=l|0,Z8[e&1](n|0,+r,+u,l|0)}function cB(e,n,r,u){e=e|0,n=n|0,r=+r,u=+u,VB[e&1](n|0,+r,+u)}function dB(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,M_[e&7](n|0,r|0,u|0)|0}function pB(e,n,r,u){return e=e|0,n=n|0,r=r|0,u=u|0,+GB[e&1](n|0,r|0,u|0)}function hB(e,n){return e=e|0,n=n|0,+$8[e&15](n|0)}function vB(e,n,r){return e=e|0,n=n|0,r=+r,YB[e&1](n|0,+r)|0}function mB(e,n,r){return e=e|0,n=n|0,r=r|0,ZE[e&15](n|0,r|0)|0}function yB(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=+u,l=+l,s=s|0,KB[e&1](n|0,r|0,+u,+l,s|0)}function gB(e,n,r,u,l,s,h){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,h=h|0,XB[e&1](n|0,r|0,u|0,l|0,s|0,h|0)}function _B(e,n,r){return e=e|0,n=n|0,r=r|0,+eS[e&7](n|0,r|0)}function EB(e){return e=e|0,N_[e&7]()|0}function DB(e,n,r,u,l,s){return e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,tS[e&1](n|0,r|0,u|0,l|0,s|0)|0}function wB(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=+l,QB[e&1](n|0,r|0,u|0,+l)}function SB(e,n,r,u,l,s,h){e=e|0,n=n|0,r=r|0,u=w(u),l=l|0,s=w(s),h=h|0,nS[e&1](n|0,r|0,w(u),l|0,w(s),h|0)}function TB(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,jy[e&15](n|0,r|0,u|0)}function CB(e){e=e|0,rS[e&0]()}function xB(e,n,r,u){e=e|0,n=n|0,r=r|0,u=+u,iS[e&15](n|0,r|0,+u)}function AB(e,n,r){return e=e|0,n=+n,r=+r,JB[e&1](+n,+r)|0}function RB(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,$E[e&15](n|0,r|0,u|0,l|0)}function OB(e,n,r,u,l){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,Ut(0)}function kB(e,n){e=e|0,n=w(n),Ut(1)}function Ks(e,n){e=e|0,n=+n,Ut(2)}function MB(e,n,r){return e=e|0,n=w(n),r=w(r),Ut(3),St}function Kn(e){e=e|0,Ut(4)}function By(e,n){e=e|0,n=n|0,Ut(5)}function xa(e){return e=e|0,Ut(6),0}function NB(e,n,r,u){e=e|0,n=+n,r=+r,u=u|0,Ut(7)}function LB(e,n,r){e=e|0,n=+n,r=+r,Ut(8)}function FB(e,n,r){return e=e|0,n=n|0,r=r|0,Ut(9),0}function bB(e,n,r){return e=e|0,n=n|0,r=r|0,Ut(10),0}function Kp(e){return e=e|0,Ut(11),0}function PB(e,n){return e=e|0,n=+n,Ut(12),0}function Uy(e,n){return e=e|0,n=n|0,Ut(13),0}function IB(e,n,r,u,l){e=e|0,n=n|0,r=+r,u=+u,l=l|0,Ut(14)}function BB(e,n,r,u,l,s){e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,s=s|0,Ut(15)}function JE(e,n){return e=e|0,n=n|0,Ut(16),0}function UB(){return Ut(17),0}function jB(e,n,r,u,l){return e=e|0,n=n|0,r=r|0,u=u|0,l=l|0,Ut(18),0}function zB(e,n,r,u){e=e|0,n=n|0,r=r|0,u=+u,Ut(19)}function qB(e,n,r,u,l,s){e=e|0,n=n|0,r=w(r),u=u|0,l=w(l),s=s|0,Ut(20)}function k_(e,n,r){e=e|0,n=n|0,r=r|0,Ut(21)}function HB(){Ut(22)}function Bv(e,n,r){e=e|0,n=n|0,r=+r,Ut(23)}function WB(e,n){return e=+e,n=+n,Ut(24),0}function Uv(e,n,r,u){e=e|0,n=n|0,r=r|0,u=u|0,Ut(25)}var K8=[OB,UL],X8=[kB,Ju],Q8=[Ks,ua,ys,gs,Ql,Io,hf,tl,Ia,Zu,vf,jc,lc,Sl,_s,oa,n2,la,sc,Ks,Ks,Ks,Ks,Ks,Ks,Ks,Ks,Ks,Ks,Ks,Ks,Ks],J8=[MB],M1=[Kn,Pv,an,$l,go,Lf,x1,Fl,hN,vN,mN,xL,AL,RL,XP,QP,JP,Ne,uc,La,ju,U0,hh,yf,$c,Af,pa,Rh,Sm,h1,v1,Xh,pp,M2,Gm,D1,Sc,ry,oy,Sv,Av,rn,Q4,lE,h_,Nt,_u,Qu,RO,WO,ak,Ak,qk,aM,_M,wM,UM,qM,uN,gN,DN,BN,nL,v2,BF,vb,kb,Vb,pP,RP,UP,qP,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn,Kn],N1=[By,gd,$1,Uc,Dl,el,_d,Bs,wl,Fa,ba,Pa,Tl,Be,ut,Jt,jn,ti,tr,Ba,Dd,mh,fE,vE,Mk,zF,fL,g8,By,By,By,By],Xp=[xa,xI,pf,y,J,fe,mt,Ct,Mt,Er,iu,j0,Ua,r2,Vc,Cs,Gk,zN,VF,Sa,xa,xa,xa,xa,xa,xa,xa,xa,xa,xa,xa,xa],Z8=[NB,Td],VB=[LB,sN],M_=[FB,N8,AI,kI,zh,dv,NO,Xb],GB=[bB,lv],$8=[Kp,e0,He,ii,vh,il,sa,Cd,xd,ac,Kp,Kp,Kp,Kp,Kp,Kp],YB=[PB,mM],ZE=[Uy,JI,Ed,ll,zd,Nm,ap,Cp,ly,xr,bo,Fb,Uy,Uy,Uy,Uy],KB=[IB,Sh],XB=[BB,yP],eS=[JE,qi,Ad,a2,Gc,cl,JE,JE],N_=[UB,Yc,to,g0,xM,GM,CN,GP],tS=[jB,ei],QB=[zB,Dy],nS=[qB,i2],jy=[k_,A,$u,jr,gu,d1,k2,ir,Cy,po,aF,_b,NP,k_,k_,k_],rS=[HB],iS=[Bv,e2,ho,t2,Po,zc,bi,g,Ip,KO,dM,Bv,Bv,Bv,Bv,Bv],JB=[WB,dN],$E=[Uv,_p,Rc,pk,tM,NM,ZM,NN,lL,JF,rI,Uv,Uv,Uv,Uv,Uv];return{_llvm_bswap_i32:Y8,dynCall_idd:AB,dynCall_i:EB,_i64Subtract:R_,___udivdi3:XE,dynCall_vif:iB,setThrew:fs,dynCall_viii:TB,_bitshift64Lshr:O_,_bitshift64Shl:W8,dynCall_vi:lB,dynCall_viiddi:yB,dynCall_diii:pB,dynCall_iii:mB,_memset:Iv,_sbrk:Z2,_memcpy:pr,__GLOBAL__sub_I_Yoga_cpp:Qi,dynCall_vii:sB,___uremdi3:QE,dynCall_vid:uB,stackAlloc:so,_nbind_init:hI,getTempRet0:X,dynCall_di:hB,dynCall_iid:vB,setTempRet0:P0,_i64Add:KE,dynCall_fiff:oB,dynCall_iiii:dB,_emscripten_get_global_libc:CI,dynCall_viid:xB,dynCall_viiid:wB,dynCall_viififi:SB,dynCall_ii:aB,__GLOBAL__sub_I_Binding_cc:kF,dynCall_viiii:RB,dynCall_iiiiii:DB,stackSave:Jo,dynCall_viiiii:rB,__GLOBAL__sub_I_nbind_cc:Us,dynCall_vidd:cB,_free:x_,runPostSets:nB,dynCall_viiiiii:gB,establishStackSpace:Fu,_memmove:Iy,stackRestore:Gl,_malloc:C_,__GLOBAL__sub_I_common_cc:XN,dynCall_viddi:fB,dynCall_dii:_B,dynCall_v:CB}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer),_llvm_bswap_i32=Module._llvm_bswap_i32=asm._llvm_bswap_i32,getTempRet0=Module.getTempRet0=asm.getTempRet0,___udivdi3=Module.___udivdi3=asm.___udivdi3,setThrew=Module.setThrew=asm.setThrew,_bitshift64Lshr=Module._bitshift64Lshr=asm._bitshift64Lshr,_bitshift64Shl=Module._bitshift64Shl=asm._bitshift64Shl,_memset=Module._memset=asm._memset,_sbrk=Module._sbrk=asm._sbrk,_memcpy=Module._memcpy=asm._memcpy,stackAlloc=Module.stackAlloc=asm.stackAlloc,___uremdi3=Module.___uremdi3=asm.___uremdi3,_nbind_init=Module._nbind_init=asm._nbind_init,_i64Subtract=Module._i64Subtract=asm._i64Subtract,setTempRet0=Module.setTempRet0=asm.setTempRet0,_i64Add=Module._i64Add=asm._i64Add,_emscripten_get_global_libc=Module._emscripten_get_global_libc=asm._emscripten_get_global_libc,__GLOBAL__sub_I_Yoga_cpp=Module.__GLOBAL__sub_I_Yoga_cpp=asm.__GLOBAL__sub_I_Yoga_cpp,__GLOBAL__sub_I_Binding_cc=Module.__GLOBAL__sub_I_Binding_cc=asm.__GLOBAL__sub_I_Binding_cc,stackSave=Module.stackSave=asm.stackSave,__GLOBAL__sub_I_nbind_cc=Module.__GLOBAL__sub_I_nbind_cc=asm.__GLOBAL__sub_I_nbind_cc,_free=Module._free=asm._free,runPostSets=Module.runPostSets=asm.runPostSets,establishStackSpace=Module.establishStackSpace=asm.establishStackSpace,_memmove=Module._memmove=asm._memmove,stackRestore=Module.stackRestore=asm.stackRestore,_malloc=Module._malloc=asm._malloc,__GLOBAL__sub_I_common_cc=Module.__GLOBAL__sub_I_common_cc=asm.__GLOBAL__sub_I_common_cc,dynCall_viiiii=Module.dynCall_viiiii=asm.dynCall_viiiii,dynCall_vif=Module.dynCall_vif=asm.dynCall_vif,dynCall_vid=Module.dynCall_vid=asm.dynCall_vid,dynCall_fiff=Module.dynCall_fiff=asm.dynCall_fiff,dynCall_vi=Module.dynCall_vi=asm.dynCall_vi,dynCall_vii=Module.dynCall_vii=asm.dynCall_vii,dynCall_ii=Module.dynCall_ii=asm.dynCall_ii,dynCall_viddi=Module.dynCall_viddi=asm.dynCall_viddi,dynCall_vidd=Module.dynCall_vidd=asm.dynCall_vidd,dynCall_iiii=Module.dynCall_iiii=asm.dynCall_iiii,dynCall_diii=Module.dynCall_diii=asm.dynCall_diii,dynCall_di=Module.dynCall_di=asm.dynCall_di,dynCall_iid=Module.dynCall_iid=asm.dynCall_iid,dynCall_iii=Module.dynCall_iii=asm.dynCall_iii,dynCall_viiddi=Module.dynCall_viiddi=asm.dynCall_viiddi,dynCall_viiiiii=Module.dynCall_viiiiii=asm.dynCall_viiiiii,dynCall_dii=Module.dynCall_dii=asm.dynCall_dii,dynCall_i=Module.dynCall_i=asm.dynCall_i,dynCall_iiiiii=Module.dynCall_iiiiii=asm.dynCall_iiiiii,dynCall_viiid=Module.dynCall_viiid=asm.dynCall_viiid,dynCall_viififi=Module.dynCall_viififi=asm.dynCall_viififi,dynCall_viii=Module.dynCall_viii=asm.dynCall_viii,dynCall_v=Module.dynCall_v=asm.dynCall_v,dynCall_viid=Module.dynCall_viid=asm.dynCall_viid,dynCall_idd=Module.dynCall_idd=asm.dynCall_idd,dynCall_viiii=Module.dynCall_viiii=asm.dynCall_viiii;Runtime.stackAlloc=Module.stackAlloc,Runtime.stackSave=Module.stackSave,Runtime.stackRestore=Module.stackRestore,Runtime.establishStackSpace=Module.establishStackSpace,Runtime.setTempRet0=Module.setTempRet0,Runtime.getTempRet0=Module.getTempRet0,Module.asm=asm;function ExitStatus(i){this.name="ExitStatus",this.message="Program terminated with exit("+i+")",this.status=i}ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var initialStackTop,preloadStartTime=null,calledMain=!1;dependenciesFulfilled=function i(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=i)},Module.callMain=Module.callMain=function(o){o=o||[],ensureInitRuntime();var f=o.length+1;function p(){for(var N=0;N<4-1;N++)E.push(0)}var E=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];p();for(var t=0;t0||(preRun(),runDependencies>0)||Module.calledRun)return;function o(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(i),postRun()))}Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),o()},1)):o()}Module.run=Module.run=run;function exit(i,o){o&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,EXITSTATUS=i,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(i)),ENVIRONMENT_IS_NODE&&process.exit(i),Module.quit(i,new ExitStatus(i)))}Module.exit=Module.exit=exit;var abortDecorators=[];function abort(i){Module.onAbort&&Module.onAbort(i),i!==void 0?(Module.print(i),Module.printErr(i),i=JSON.stringify(i)):i="",ABORT=!0,EXITSTATUS=1;var o=` -If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,f="abort("+i+") at "+stackTrace()+o;throw abortDecorators&&abortDecorators.forEach(function(p){f=p(f,i)}),f}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var eh=ce((Wne,O9)=>{"use strict";var tX=A9(),nX=R9(),hw=!1,vw=null;nX({},function(i,o){if(!hw){if(hw=!0,i)throw i;vw=o}});if(!hw)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");O9.exports=tX(vw.bind,vw.lib)});var M9=ce((Vne,k9)=>{"use strict";k9.exports=({onlyFirst:i=!1}={})=>{let o=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(o,i?void 0:"g")}});var mw=ce((Gne,N9)=>{"use strict";var rX=M9();N9.exports=i=>typeof i=="string"?i.replace(rX(),""):i});var gw=ce((Yne,yw)=>{"use strict";var L9=i=>Number.isNaN(i)?!1:i>=4352&&(i<=4447||i===9001||i===9002||11904<=i&&i<=12871&&i!==12351||12880<=i&&i<=19903||19968<=i&&i<=42182||43360<=i&&i<=43388||44032<=i&&i<=55203||63744<=i&&i<=64255||65040<=i&&i<=65049||65072<=i&&i<=65131||65281<=i&&i<=65376||65504<=i&&i<=65510||110592<=i&&i<=110593||127488<=i&&i<=127569||131072<=i&&i<=262141);yw.exports=L9;yw.exports.default=L9});var b9=ce((Kne,F9)=>{"use strict";F9.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var m4=ce((Xne,_w)=>{"use strict";var iX=mw(),uX=gw(),oX=b9(),P9=i=>{if(i=i.replace(oX()," "),typeof i!="string"||i.length===0)return 0;i=iX(i);let o=0;for(let f=0;f=127&&p<=159||p>=768&&p<=879||(p>65535&&f++,o+=uX(p)?2:1)}return o};_w.exports=P9;_w.exports.default=P9});var Dw=ce((Qne,Ew)=>{"use strict";var lX=m4(),I9=i=>{let o=0;for(let f of i.split(` -`))o=Math.max(o,lX(f));return o};Ew.exports=I9;Ew.exports.default=I9});var B9=ce(vg=>{"use strict";var sX=vg&&vg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(vg,"__esModule",{value:!0});var aX=sX(Dw()),ww={};vg.default=i=>{if(i.length===0)return{width:0,height:0};if(ww[i])return ww[i];let o=aX.default(i),f=i.split(` -`).length;return ww[i]={width:o,height:f},{width:o,height:f}}});var U9=ce(mg=>{"use strict";var fX=mg&&mg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(mg,"__esModule",{value:!0});var Ii=fX(eh()),cX=(i,o)=>{"position"in o&&i.setPositionType(o.position==="absolute"?Ii.default.POSITION_TYPE_ABSOLUTE:Ii.default.POSITION_TYPE_RELATIVE)},dX=(i,o)=>{"marginLeft"in o&&i.setMargin(Ii.default.EDGE_START,o.marginLeft||0),"marginRight"in o&&i.setMargin(Ii.default.EDGE_END,o.marginRight||0),"marginTop"in o&&i.setMargin(Ii.default.EDGE_TOP,o.marginTop||0),"marginBottom"in o&&i.setMargin(Ii.default.EDGE_BOTTOM,o.marginBottom||0)},pX=(i,o)=>{"paddingLeft"in o&&i.setPadding(Ii.default.EDGE_LEFT,o.paddingLeft||0),"paddingRight"in o&&i.setPadding(Ii.default.EDGE_RIGHT,o.paddingRight||0),"paddingTop"in o&&i.setPadding(Ii.default.EDGE_TOP,o.paddingTop||0),"paddingBottom"in o&&i.setPadding(Ii.default.EDGE_BOTTOM,o.paddingBottom||0)},hX=(i,o)=>{var f;"flexGrow"in o&&i.setFlexGrow((f=o.flexGrow)!==null&&f!==void 0?f:0),"flexShrink"in o&&i.setFlexShrink(typeof o.flexShrink=="number"?o.flexShrink:1),"flexDirection"in o&&(o.flexDirection==="row"&&i.setFlexDirection(Ii.default.FLEX_DIRECTION_ROW),o.flexDirection==="row-reverse"&&i.setFlexDirection(Ii.default.FLEX_DIRECTION_ROW_REVERSE),o.flexDirection==="column"&&i.setFlexDirection(Ii.default.FLEX_DIRECTION_COLUMN),o.flexDirection==="column-reverse"&&i.setFlexDirection(Ii.default.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in o&&(typeof o.flexBasis=="number"?i.setFlexBasis(o.flexBasis):typeof o.flexBasis=="string"?i.setFlexBasisPercent(Number.parseInt(o.flexBasis,10)):i.setFlexBasis(NaN)),"alignItems"in o&&((o.alignItems==="stretch"||!o.alignItems)&&i.setAlignItems(Ii.default.ALIGN_STRETCH),o.alignItems==="flex-start"&&i.setAlignItems(Ii.default.ALIGN_FLEX_START),o.alignItems==="center"&&i.setAlignItems(Ii.default.ALIGN_CENTER),o.alignItems==="flex-end"&&i.setAlignItems(Ii.default.ALIGN_FLEX_END)),"alignSelf"in o&&((o.alignSelf==="auto"||!o.alignSelf)&&i.setAlignSelf(Ii.default.ALIGN_AUTO),o.alignSelf==="flex-start"&&i.setAlignSelf(Ii.default.ALIGN_FLEX_START),o.alignSelf==="center"&&i.setAlignSelf(Ii.default.ALIGN_CENTER),o.alignSelf==="flex-end"&&i.setAlignSelf(Ii.default.ALIGN_FLEX_END)),"justifyContent"in o&&((o.justifyContent==="flex-start"||!o.justifyContent)&&i.setJustifyContent(Ii.default.JUSTIFY_FLEX_START),o.justifyContent==="center"&&i.setJustifyContent(Ii.default.JUSTIFY_CENTER),o.justifyContent==="flex-end"&&i.setJustifyContent(Ii.default.JUSTIFY_FLEX_END),o.justifyContent==="space-between"&&i.setJustifyContent(Ii.default.JUSTIFY_SPACE_BETWEEN),o.justifyContent==="space-around"&&i.setJustifyContent(Ii.default.JUSTIFY_SPACE_AROUND))},vX=(i,o)=>{var f,p;"width"in o&&(typeof o.width=="number"?i.setWidth(o.width):typeof o.width=="string"?i.setWidthPercent(Number.parseInt(o.width,10)):i.setWidthAuto()),"height"in o&&(typeof o.height=="number"?i.setHeight(o.height):typeof o.height=="string"?i.setHeightPercent(Number.parseInt(o.height,10)):i.setHeightAuto()),"minWidth"in o&&(typeof o.minWidth=="string"?i.setMinWidthPercent(Number.parseInt(o.minWidth,10)):i.setMinWidth((f=o.minWidth)!==null&&f!==void 0?f:0)),"minHeight"in o&&(typeof o.minHeight=="string"?i.setMinHeightPercent(Number.parseInt(o.minHeight,10)):i.setMinHeight((p=o.minHeight)!==null&&p!==void 0?p:0))},mX=(i,o)=>{"display"in o&&i.setDisplay(o.display==="flex"?Ii.default.DISPLAY_FLEX:Ii.default.DISPLAY_NONE)},yX=(i,o)=>{if("borderStyle"in o){let f=typeof o.borderStyle=="string"?1:0;i.setBorder(Ii.default.EDGE_TOP,f),i.setBorder(Ii.default.EDGE_BOTTOM,f),i.setBorder(Ii.default.EDGE_LEFT,f),i.setBorder(Ii.default.EDGE_RIGHT,f)}};mg.default=(i,o={})=>{cX(i,o),dX(i,o),pX(i,o),hX(i,o),vX(i,o),mX(i,o),yX(i,o)}});var z9=ce(($ne,j9)=>{"use strict";j9.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Sw=ce((ere,q9)=>{var yg=z9(),H9={};for(let i of Object.keys(yg))H9[yg[i]]=i;var In={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};q9.exports=In;for(let i of Object.keys(In)){if(!("channels"in In[i]))throw new Error("missing channels property: "+i);if(!("labels"in In[i]))throw new Error("missing channel labels property: "+i);if(In[i].labels.length!==In[i].channels)throw new Error("channel and label counts mismatch: "+i);let{channels:o,labels:f}=In[i];delete In[i].channels,delete In[i].labels,Object.defineProperty(In[i],"channels",{value:o}),Object.defineProperty(In[i],"labels",{value:f})}In.rgb.hsl=function(i){let o=i[0]/255,f=i[1]/255,p=i[2]/255,E=Math.min(o,f,p),t=Math.max(o,f,p),k=t-E,L,N;t===E?L=0:o===t?L=(f-p)/k:f===t?L=2+(p-o)/k:p===t&&(L=4+(o-f)/k),L=Math.min(L*60,360),L<0&&(L+=360);let C=(E+t)/2;return t===E?N=0:C<=.5?N=k/(t+E):N=k/(2-t-E),[L,N*100,C*100]};In.rgb.hsv=function(i){let o,f,p,E,t,k=i[0]/255,L=i[1]/255,N=i[2]/255,C=Math.max(k,L,N),U=C-Math.min(k,L,N),q=function(W){return(C-W)/6/U+1/2};return U===0?(E=0,t=0):(t=U/C,o=q(k),f=q(L),p=q(N),k===C?E=p-f:L===C?E=1/3+o-p:N===C&&(E=2/3+f-o),E<0?E+=1:E>1&&(E-=1)),[E*360,t*100,C*100]};In.rgb.hwb=function(i){let o=i[0],f=i[1],p=i[2],E=In.rgb.hsl(i)[0],t=1/255*Math.min(o,Math.min(f,p));return p=1-1/255*Math.max(o,Math.max(f,p)),[E,t*100,p*100]};In.rgb.cmyk=function(i){let o=i[0]/255,f=i[1]/255,p=i[2]/255,E=Math.min(1-o,1-f,1-p),t=(1-o-E)/(1-E)||0,k=(1-f-E)/(1-E)||0,L=(1-p-E)/(1-E)||0;return[t*100,k*100,L*100,E*100]};function gX(i,o){return(i[0]-o[0])**2+(i[1]-o[1])**2+(i[2]-o[2])**2}In.rgb.keyword=function(i){let o=H9[i];if(o)return o;let f=Infinity,p;for(let E of Object.keys(yg)){let t=yg[E],k=gX(i,t);k.04045?((o+.055)/1.055)**2.4:o/12.92,f=f>.04045?((f+.055)/1.055)**2.4:f/12.92,p=p>.04045?((p+.055)/1.055)**2.4:p/12.92;let E=o*.4124+f*.3576+p*.1805,t=o*.2126+f*.7152+p*.0722,k=o*.0193+f*.1192+p*.9505;return[E*100,t*100,k*100]};In.rgb.lab=function(i){let o=In.rgb.xyz(i),f=o[0],p=o[1],E=o[2];f/=95.047,p/=100,E/=108.883,f=f>.008856?f**(1/3):7.787*f+16/116,p=p>.008856?p**(1/3):7.787*p+16/116,E=E>.008856?E**(1/3):7.787*E+16/116;let t=116*p-16,k=500*(f-p),L=200*(p-E);return[t,k,L]};In.hsl.rgb=function(i){let o=i[0]/360,f=i[1]/100,p=i[2]/100,E,t,k;if(f===0)return k=p*255,[k,k,k];p<.5?E=p*(1+f):E=p+f-p*f;let L=2*p-E,N=[0,0,0];for(let C=0;C<3;C++)t=o+1/3*-(C-1),t<0&&t++,t>1&&t--,6*t<1?k=L+(E-L)*6*t:2*t<1?k=E:3*t<2?k=L+(E-L)*(2/3-t)*6:k=L,N[C]=k*255;return N};In.hsl.hsv=function(i){let o=i[0],f=i[1]/100,p=i[2]/100,E=f,t=Math.max(p,.01);p*=2,f*=p<=1?p:2-p,E*=t<=1?t:2-t;let k=(p+f)/2,L=p===0?2*E/(t+E):2*f/(p+f);return[o,L*100,k*100]};In.hsv.rgb=function(i){let o=i[0]/60,f=i[1]/100,p=i[2]/100,E=Math.floor(o)%6,t=o-Math.floor(o),k=255*p*(1-f),L=255*p*(1-f*t),N=255*p*(1-f*(1-t));switch(p*=255,E){case 0:return[p,N,k];case 1:return[L,p,k];case 2:return[k,p,N];case 3:return[k,L,p];case 4:return[N,k,p];case 5:return[p,k,L]}};In.hsv.hsl=function(i){let o=i[0],f=i[1]/100,p=i[2]/100,E=Math.max(p,.01),t,k;k=(2-f)*p;let L=(2-f)*E;return t=f*E,t/=L<=1?L:2-L,t=t||0,k/=2,[o,t*100,k*100]};In.hwb.rgb=function(i){let o=i[0]/360,f=i[1]/100,p=i[2]/100,E=f+p,t;E>1&&(f/=E,p/=E);let k=Math.floor(6*o),L=1-p;t=6*o-k,(k&1)!=0&&(t=1-t);let N=f+t*(L-f),C,U,q;switch(k){default:case 6:case 0:C=L,U=N,q=f;break;case 1:C=N,U=L,q=f;break;case 2:C=f,U=L,q=N;break;case 3:C=f,U=N,q=L;break;case 4:C=N,U=f,q=L;break;case 5:C=L,U=f,q=N;break}return[C*255,U*255,q*255]};In.cmyk.rgb=function(i){let o=i[0]/100,f=i[1]/100,p=i[2]/100,E=i[3]/100,t=1-Math.min(1,o*(1-E)+E),k=1-Math.min(1,f*(1-E)+E),L=1-Math.min(1,p*(1-E)+E);return[t*255,k*255,L*255]};In.xyz.rgb=function(i){let o=i[0]/100,f=i[1]/100,p=i[2]/100,E,t,k;return E=o*3.2406+f*-1.5372+p*-.4986,t=o*-.9689+f*1.8758+p*.0415,k=o*.0557+f*-.204+p*1.057,E=E>.0031308?1.055*E**(1/2.4)-.055:E*12.92,t=t>.0031308?1.055*t**(1/2.4)-.055:t*12.92,k=k>.0031308?1.055*k**(1/2.4)-.055:k*12.92,E=Math.min(Math.max(0,E),1),t=Math.min(Math.max(0,t),1),k=Math.min(Math.max(0,k),1),[E*255,t*255,k*255]};In.xyz.lab=function(i){let o=i[0],f=i[1],p=i[2];o/=95.047,f/=100,p/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,f=f>.008856?f**(1/3):7.787*f+16/116,p=p>.008856?p**(1/3):7.787*p+16/116;let E=116*f-16,t=500*(o-f),k=200*(f-p);return[E,t,k]};In.lab.xyz=function(i){let o=i[0],f=i[1],p=i[2],E,t,k;t=(o+16)/116,E=f/500+t,k=t-p/200;let L=t**3,N=E**3,C=k**3;return t=L>.008856?L:(t-16/116)/7.787,E=N>.008856?N:(E-16/116)/7.787,k=C>.008856?C:(k-16/116)/7.787,E*=95.047,t*=100,k*=108.883,[E,t,k]};In.lab.lch=function(i){let o=i[0],f=i[1],p=i[2],E;E=Math.atan2(p,f)*360/2/Math.PI,E<0&&(E+=360);let k=Math.sqrt(f*f+p*p);return[o,k,E]};In.lch.lab=function(i){let o=i[0],f=i[1],E=i[2]/360*2*Math.PI,t=f*Math.cos(E),k=f*Math.sin(E);return[o,t,k]};In.rgb.ansi16=function(i,o=null){let[f,p,E]=i,t=o===null?In.rgb.hsv(i)[2]:o;if(t=Math.round(t/50),t===0)return 30;let k=30+(Math.round(E/255)<<2|Math.round(p/255)<<1|Math.round(f/255));return t===2&&(k+=60),k};In.hsv.ansi16=function(i){return In.rgb.ansi16(In.hsv.rgb(i),i[2])};In.rgb.ansi256=function(i){let o=i[0],f=i[1],p=i[2];return o===f&&f===p?o<8?16:o>248?231:Math.round((o-8)/247*24)+232:16+36*Math.round(o/255*5)+6*Math.round(f/255*5)+Math.round(p/255*5)};In.ansi16.rgb=function(i){let o=i%10;if(o===0||o===7)return i>50&&(o+=3.5),o=o/10.5*255,[o,o,o];let f=(~~(i>50)+1)*.5,p=(o&1)*f*255,E=(o>>1&1)*f*255,t=(o>>2&1)*f*255;return[p,E,t]};In.ansi256.rgb=function(i){if(i>=232){let t=(i-232)*10+8;return[t,t,t]}i-=16;let o,f=Math.floor(i/36)/5*255,p=Math.floor((o=i%36)/6)/5*255,E=o%6/5*255;return[f,p,E]};In.rgb.hex=function(i){let f=(((Math.round(i[0])&255)<<16)+((Math.round(i[1])&255)<<8)+(Math.round(i[2])&255)).toString(16).toUpperCase();return"000000".substring(f.length)+f};In.hex.rgb=function(i){let o=i.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!o)return[0,0,0];let f=o[0];o[0].length===3&&(f=f.split("").map(L=>L+L).join(""));let p=parseInt(f,16),E=p>>16&255,t=p>>8&255,k=p&255;return[E,t,k]};In.rgb.hcg=function(i){let o=i[0]/255,f=i[1]/255,p=i[2]/255,E=Math.max(Math.max(o,f),p),t=Math.min(Math.min(o,f),p),k=E-t,L,N;return k<1?L=t/(1-k):L=0,k<=0?N=0:E===o?N=(f-p)/k%6:E===f?N=2+(p-o)/k:N=4+(o-f)/k,N/=6,N%=1,[N*360,k*100,L*100]};In.hsl.hcg=function(i){let o=i[1]/100,f=i[2]/100,p=f<.5?2*o*f:2*o*(1-f),E=0;return p<1&&(E=(f-.5*p)/(1-p)),[i[0],p*100,E*100]};In.hsv.hcg=function(i){let o=i[1]/100,f=i[2]/100,p=o*f,E=0;return p<1&&(E=(f-p)/(1-p)),[i[0],p*100,E*100]};In.hcg.rgb=function(i){let o=i[0]/360,f=i[1]/100,p=i[2]/100;if(f===0)return[p*255,p*255,p*255];let E=[0,0,0],t=o%1*6,k=t%1,L=1-k,N=0;switch(Math.floor(t)){case 0:E[0]=1,E[1]=k,E[2]=0;break;case 1:E[0]=L,E[1]=1,E[2]=0;break;case 2:E[0]=0,E[1]=1,E[2]=k;break;case 3:E[0]=0,E[1]=L,E[2]=1;break;case 4:E[0]=k,E[1]=0,E[2]=1;break;default:E[0]=1,E[1]=0,E[2]=L}return N=(1-f)*p,[(f*E[0]+N)*255,(f*E[1]+N)*255,(f*E[2]+N)*255]};In.hcg.hsv=function(i){let o=i[1]/100,f=i[2]/100,p=o+f*(1-o),E=0;return p>0&&(E=o/p),[i[0],E*100,p*100]};In.hcg.hsl=function(i){let o=i[1]/100,p=i[2]/100*(1-o)+.5*o,E=0;return p>0&&p<.5?E=o/(2*p):p>=.5&&p<1&&(E=o/(2*(1-p))),[i[0],E*100,p*100]};In.hcg.hwb=function(i){let o=i[1]/100,f=i[2]/100,p=o+f*(1-o);return[i[0],(p-o)*100,(1-p)*100]};In.hwb.hcg=function(i){let o=i[1]/100,f=i[2]/100,p=1-f,E=p-o,t=0;return E<1&&(t=(p-E)/(1-E)),[i[0],E*100,t*100]};In.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]};In.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]};In.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]};In.gray.hsl=function(i){return[0,0,i[0]]};In.gray.hsv=In.gray.hsl;In.gray.hwb=function(i){return[0,100,i[0]]};In.gray.cmyk=function(i){return[0,0,0,i[0]]};In.gray.lab=function(i){return[i[0],0,0]};In.gray.hex=function(i){let o=Math.round(i[0]/100*255)&255,p=((o<<16)+(o<<8)+o).toString(16).toUpperCase();return"000000".substring(p.length)+p};In.rgb.gray=function(i){return[(i[0]+i[1]+i[2])/3/255*100]}});var V9=ce((tre,W9)=>{var y4=Sw();function _X(){let i={},o=Object.keys(y4);for(let f=o.length,p=0;p{var Tw=Sw(),SX=V9(),sm={},TX=Object.keys(Tw);function CX(i){let o=function(...f){let p=f[0];return p==null?p:(p.length>1&&(f=p),i(f))};return"conversion"in i&&(o.conversion=i.conversion),o}function xX(i){let o=function(...f){let p=f[0];if(p==null)return p;p.length>1&&(f=p);let E=i(f);if(typeof E=="object")for(let t=E.length,k=0;k{sm[i]={},Object.defineProperty(sm[i],"channels",{value:Tw[i].channels}),Object.defineProperty(sm[i],"labels",{value:Tw[i].labels});let o=SX(i);Object.keys(o).forEach(p=>{let E=o[p];sm[i][p]=xX(E),sm[i][p].raw=CX(E)})});G9.exports=sm});var _4=ce((rre,K9)=>{"use strict";var X9=(i,o)=>(...f)=>`[${i(...f)+o}m`,Q9=(i,o)=>(...f)=>{let p=i(...f);return`[${38+o};5;${p}m`},J9=(i,o)=>(...f)=>{let p=i(...f);return`[${38+o};2;${p[0]};${p[1]};${p[2]}m`},g4=i=>i,Z9=(i,o,f)=>[i,o,f],am=(i,o,f)=>{Object.defineProperty(i,o,{get:()=>{let p=f();return Object.defineProperty(i,o,{value:p,enumerable:!0,configurable:!0}),p},enumerable:!0,configurable:!0})},Cw,fm=(i,o,f,p)=>{Cw===void 0&&(Cw=Y9());let E=p?10:0,t={};for(let[k,L]of Object.entries(Cw)){let N=k==="ansi16"?"ansi":k;k===o?t[N]=i(f,E):typeof L=="object"&&(t[N]=i(L[o],E))}return t};function AX(){let i=new Map,o={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};o.color.gray=o.color.blackBright,o.bgColor.bgGray=o.bgColor.bgBlackBright,o.color.grey=o.color.blackBright,o.bgColor.bgGrey=o.bgColor.bgBlackBright;for(let[f,p]of Object.entries(o)){for(let[E,t]of Object.entries(p))o[E]={open:`[${t[0]}m`,close:`[${t[1]}m`},p[E]=o[E],i.set(t[0],t[1]);Object.defineProperty(o,f,{value:p,enumerable:!1})}return Object.defineProperty(o,"codes",{value:i,enumerable:!1}),o.color.close="",o.bgColor.close="",am(o.color,"ansi",()=>fm(X9,"ansi16",g4,!1)),am(o.color,"ansi256",()=>fm(Q9,"ansi256",g4,!1)),am(o.color,"ansi16m",()=>fm(J9,"rgb",Z9,!1)),am(o.bgColor,"ansi",()=>fm(X9,"ansi16",g4,!0)),am(o.bgColor,"ansi256",()=>fm(Q9,"ansi256",g4,!0)),am(o.bgColor,"ansi16m",()=>fm(J9,"rgb",Z9,!0)),o}Object.defineProperty(K9,"exports",{enumerable:!0,get:AX})});var tA=ce((ire,$9)=>{"use strict";var gg=m4(),RX=mw(),OX=_4(),xw=new Set(["","\x9B"]),kX=39,eA=i=>`${xw.values().next().value}[${i}m`,MX=i=>i.split(" ").map(o=>gg(o)),Aw=(i,o,f)=>{let p=[...o],E=!1,t=gg(RX(i[i.length-1]));for(let[k,L]of p.entries()){let N=gg(L);if(t+N<=f?i[i.length-1]+=L:(i.push(L),t=0),xw.has(L))E=!0;else if(E&&L==="m"){E=!1;continue}E||(t+=N,t===f&&k0&&i.length>1&&(i[i.length-2]+=i.pop())},NX=i=>{let o=i.split(" "),f=o.length;for(;f>0&&!(gg(o[f-1])>0);)f--;return f===o.length?i:o.slice(0,f).join(" ")+o.slice(f).join("")},LX=(i,o,f={})=>{if(f.trim!==!1&&i.trim()==="")return"";let p="",E="",t,k=MX(i),L=[""];for(let[N,C]of i.split(" ").entries()){f.trim!==!1&&(L[L.length-1]=L[L.length-1].trimLeft());let U=gg(L[L.length-1]);if(N!==0&&(U>=o&&(f.wordWrap===!1||f.trim===!1)&&(L.push(""),U=0),(U>0||f.trim===!1)&&(L[L.length-1]+=" ",U++)),f.hard&&k[N]>o){let q=o-U,W=1+Math.floor((k[N]-q-1)/o);Math.floor((k[N]-1)/o)o&&U>0&&k[N]>0){if(f.wordWrap===!1&&Uo&&f.wordWrap===!1){Aw(L,C,o);continue}L[L.length-1]+=C}f.trim!==!1&&(L=L.map(NX)),p=L.join(` -`);for(let[N,C]of[...p].entries()){if(E+=C,xw.has(C)){let q=parseFloat(/\d[^m]*/.exec(p.slice(N,N+4)));t=q===kX?null:q}let U=OX.codes.get(Number(t));t&&U&&(p[N+1]===` -`?E+=eA(U):C===` -`&&(E+=eA(t)))}return E};$9.exports=(i,o,f)=>String(i).normalize().replace(/\r\n/g,` -`).split(` -`).map(p=>LX(p,o,f)).join(` -`)});var iA=ce((ure,nA)=>{"use strict";var rA="[\uD800-\uDBFF][\uDC00-\uDFFF]",FX=i=>i&&i.exact?new RegExp(`^${rA}$`):new RegExp(rA,"g");nA.exports=FX});var Rw=ce((ore,uA)=>{"use strict";var bX=gw(),PX=iA(),oA=_4(),lA=["","\x9B"],E4=i=>`${lA[0]}[${i}m`,sA=(i,o,f)=>{let p=[];i=[...i];for(let E of i){let t=E;E.match(";")&&(E=E.split(";")[0][0]+"0");let k=oA.codes.get(parseInt(E,10));if(k){let L=i.indexOf(k.toString());L>=0?i.splice(L,1):p.push(E4(o?k:t))}else if(o){p.push(E4(0));break}else p.push(E4(t))}if(o&&(p=p.filter((E,t)=>p.indexOf(E)===t),f!==void 0)){let E=E4(oA.codes.get(parseInt(f,10)));p=p.reduce((t,k)=>k===E?[k,...t]:[...t,k],[])}return p.join("")};uA.exports=(i,o,f)=>{let p=[...i.normalize()],E=[];f=typeof f=="number"?f:p.length;let t=!1,k,L=0,N="";for(let[C,U]of p.entries()){let q=!1;if(lA.includes(U)){let W=/\d[^m]*/.exec(i.slice(C,C+18));k=W&&W.length>0?W[0]:void 0,Lo&&L<=f)N+=U;else if(L===o&&!t&&k!==void 0)N=sA(E);else if(L>=f){N+=sA(E,!0,k);break}}return N}});var fA=ce((lre,aA)=>{"use strict";var pd=Rw(),IX=m4();function D4(i,o,f){if(i.charAt(o)===" ")return o;for(let p=1;p<=3;p++)if(f){if(i.charAt(o+p)===" ")return o+p}else if(i.charAt(o-p)===" ")return o-p;return o}aA.exports=(i,o,f)=>{f=E0({position:"end",preferTruncationOnSpace:!1},f);let{position:p,space:E,preferTruncationOnSpace:t}=f,k="\u2026",L=1;if(typeof i!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof i}`);if(typeof o!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof o}`);if(o<1)return"";if(o===1)return k;let N=IX(i);if(N<=o)return i;if(p==="start"){if(t){let C=D4(i,N-o+1,!0);return k+pd(i,C,N).trim()}return E===!0&&(k+=" ",L=2),k+pd(i,N-o+L,N)}if(p==="middle"){E===!0&&(k=" "+k+" ",L=3);let C=Math.floor(o/2);if(t){let U=D4(i,C),q=D4(i,N-(o-C)+1,!0);return pd(i,0,U)+k+pd(i,q,N).trim()}return pd(i,0,C)+k+pd(i,N-(o-C)+L,N)}if(p==="end"){if(t){let C=D4(i,o-1);return pd(i,0,C)+k}return E===!0&&(k=" "+k,L=2),pd(i,0,o-L)+k}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${p}`)}});var kw=ce(_g=>{"use strict";var cA=_g&&_g.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(_g,"__esModule",{value:!0});var BX=cA(tA()),UX=cA(fA()),Ow={};_g.default=(i,o,f)=>{let p=i+String(o)+String(f);if(Ow[p])return Ow[p];let E=i;if(f==="wrap"&&(E=BX.default(i,o,{trim:!1,hard:!0})),f.startsWith("truncate")){let t="end";f==="truncate-middle"&&(t="middle"),f==="truncate-start"&&(t="start"),E=UX.default(i,o,{position:t})}return Ow[p]=E,E}});var Nw=ce(Mw=>{"use strict";Object.defineProperty(Mw,"__esModule",{value:!0});var dA=i=>{let o="";if(i.childNodes.length>0)for(let f of i.childNodes){let p="";f.nodeName==="#text"?p=f.nodeValue:((f.nodeName==="ink-text"||f.nodeName==="ink-virtual-text")&&(p=dA(f)),p.length>0&&typeof f.internal_transform=="function"&&(p=f.internal_transform(p))),o+=p}return o};Mw.default=dA});var Lw=ce(l0=>{"use strict";var Eg=l0&&l0.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(l0,"__esModule",{value:!0});l0.setTextNodeValue=l0.createTextNode=l0.setStyle=l0.setAttribute=l0.removeChildNode=l0.insertBeforeNode=l0.appendChildNode=l0.createNode=l0.TEXT_NAME=void 0;var jX=Eg(eh()),pA=Eg(B9()),zX=Eg(U9()),qX=Eg(kw()),HX=Eg(Nw());l0.TEXT_NAME="#text";l0.createNode=i=>{var o;let f={nodeName:i,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:i==="ink-virtual-text"?void 0:jX.default.Node.create()};return i==="ink-text"&&((o=f.yogaNode)===null||o===void 0||o.setMeasureFunc(WX.bind(null,f))),f};l0.appendChildNode=(i,o)=>{var f;o.parentNode&&l0.removeChildNode(o.parentNode,o),o.parentNode=i,i.childNodes.push(o),o.yogaNode&&((f=i.yogaNode)===null||f===void 0||f.insertChild(o.yogaNode,i.yogaNode.getChildCount())),(i.nodeName==="ink-text"||i.nodeName==="ink-virtual-text")&&w4(i)};l0.insertBeforeNode=(i,o,f)=>{var p,E;o.parentNode&&l0.removeChildNode(o.parentNode,o),o.parentNode=i;let t=i.childNodes.indexOf(f);if(t>=0){i.childNodes.splice(t,0,o),o.yogaNode&&((p=i.yogaNode)===null||p===void 0||p.insertChild(o.yogaNode,t));return}i.childNodes.push(o),o.yogaNode&&((E=i.yogaNode)===null||E===void 0||E.insertChild(o.yogaNode,i.yogaNode.getChildCount())),(i.nodeName==="ink-text"||i.nodeName==="ink-virtual-text")&&w4(i)};l0.removeChildNode=(i,o)=>{var f,p;o.yogaNode&&((p=(f=o.parentNode)===null||f===void 0?void 0:f.yogaNode)===null||p===void 0||p.removeChild(o.yogaNode)),o.parentNode=null;let E=i.childNodes.indexOf(o);E>=0&&i.childNodes.splice(E,1),(i.nodeName==="ink-text"||i.nodeName==="ink-virtual-text")&&w4(i)};l0.setAttribute=(i,o,f)=>{i.attributes[o]=f};l0.setStyle=(i,o)=>{i.style=o,i.yogaNode&&zX.default(i.yogaNode,o)};l0.createTextNode=i=>{let o={nodeName:"#text",nodeValue:i,yogaNode:void 0,parentNode:null,style:{}};return l0.setTextNodeValue(o,i),o};var WX=function(i,o){var f,p;let E=i.nodeName==="#text"?i.nodeValue:HX.default(i),t=pA.default(E);if(t.width<=o||t.width>=1&&o>0&&o<1)return t;let k=(p=(f=i.style)===null||f===void 0?void 0:f.textWrap)!==null&&p!==void 0?p:"wrap",L=qX.default(E,o,k);return pA.default(L)},hA=i=>{var o;if(!(!i||!i.parentNode))return(o=i.yogaNode)!==null&&o!==void 0?o:hA(i.parentNode)},w4=i=>{let o=hA(i);o==null||o.markDirty()};l0.setTextNodeValue=(i,o)=>{typeof o!="string"&&(o=String(o)),i.nodeValue=o,w4(i)}});var th=ce((cre,vA)=>{"use strict";vA.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),EMPTY_BUFFER:Buffer.alloc(0),NOOP:()=>{}}});var Dg=ce((dre,Fw)=>{"use strict";var{EMPTY_BUFFER:VX}=th();function mA(i,o){if(i.length===0)return VX;if(i.length===1)return i[0];let f=Buffer.allocUnsafe(o),p=0;for(let E=0;E{"use strict";var DA=Symbol("kDone"),bw=Symbol("kRun"),wA=class{constructor(o){this[DA]=()=>{this.pending--,this[bw]()},this.concurrency=o||Infinity,this.jobs=[],this.pending=0}add(o){this.jobs.push(o),this[bw]()}[bw](){if(this.pending!==this.concurrency&&this.jobs.length){let o=this.jobs.shift();this.pending++,o(this[DA])}}};EA.exports=wA});var Tg=ce((hre,TA)=>{"use strict";var wg=require("zlib"),CA=Dg(),GX=SA(),{kStatusCode:xA,NOOP:YX}=th(),KX=Buffer.from([0,0,255,255]),T4=Symbol("permessage-deflate"),G1=Symbol("total-length"),Sg=Symbol("callback"),hd=Symbol("buffers"),Pw=Symbol("error"),C4,AA=class{constructor(o,f,p){if(this._maxPayload=p|0,this._options=o||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!f,this._deflate=null,this._inflate=null,this.params=null,!C4){let E=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;C4=new GX(E)}}static get extensionName(){return"permessage-deflate"}offer(){let o={};return this._options.serverNoContextTakeover&&(o.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(o.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(o.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?o.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(o.client_max_window_bits=!0),o}accept(o){return o=this.normalizeParams(o),this.params=this._isServer?this.acceptAsServer(o):this.acceptAsClient(o),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let o=this._deflate[Sg];this._deflate.close(),this._deflate=null,o&&o(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(o){let f=this._options,p=o.find(E=>!(f.serverNoContextTakeover===!1&&E.server_no_context_takeover||E.server_max_window_bits&&(f.serverMaxWindowBits===!1||typeof f.serverMaxWindowBits=="number"&&f.serverMaxWindowBits>E.server_max_window_bits)||typeof f.clientMaxWindowBits=="number"&&!E.client_max_window_bits));if(!p)throw new Error("None of the extension offers can be accepted");return f.serverNoContextTakeover&&(p.server_no_context_takeover=!0),f.clientNoContextTakeover&&(p.client_no_context_takeover=!0),typeof f.serverMaxWindowBits=="number"&&(p.server_max_window_bits=f.serverMaxWindowBits),typeof f.clientMaxWindowBits=="number"?p.client_max_window_bits=f.clientMaxWindowBits:(p.client_max_window_bits===!0||f.clientMaxWindowBits===!1)&&delete p.client_max_window_bits,p}acceptAsClient(o){let f=o[0];if(this._options.clientNoContextTakeover===!1&&f.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!f.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(f.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&f.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return f}normalizeParams(o){return o.forEach(f=>{Object.keys(f).forEach(p=>{let E=f[p];if(E.length>1)throw new Error(`Parameter "${p}" must have only a single value`);if(E=E[0],p==="client_max_window_bits"){if(E!==!0){let t=+E;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${p}": ${E}`);E=t}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${p}": ${E}`)}else if(p==="server_max_window_bits"){let t=+E;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${p}": ${E}`);E=t}else if(p==="client_no_context_takeover"||p==="server_no_context_takeover"){if(E!==!0)throw new TypeError(`Invalid value for parameter "${p}": ${E}`)}else throw new Error(`Unknown parameter "${p}"`);f[p]=E})}),o}decompress(o,f,p){C4.add(E=>{this._decompress(o,f,(t,k)=>{E(),p(t,k)})})}compress(o,f,p){C4.add(E=>{this._compress(o,f,(t,k)=>{E(),p(t,k)})})}_decompress(o,f,p){let E=this._isServer?"client":"server";if(!this._inflate){let t=`${E}_max_window_bits`,k=typeof this.params[t]!="number"?wg.Z_DEFAULT_WINDOWBITS:this.params[t];this._inflate=wg.createInflateRaw(Gf(E0({},this._options.zlibInflateOptions),{windowBits:k})),this._inflate[T4]=this,this._inflate[G1]=0,this._inflate[hd]=[],this._inflate.on("error",QX),this._inflate.on("data",RA)}this._inflate[Sg]=p,this._inflate.write(o),f&&this._inflate.write(KX),this._inflate.flush(()=>{let t=this._inflate[Pw];if(t){this._inflate.close(),this._inflate=null,p(t);return}let k=CA.concat(this._inflate[hd],this._inflate[G1]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[G1]=0,this._inflate[hd]=[],f&&this.params[`${E}_no_context_takeover`]&&this._inflate.reset()),p(null,k)})}_compress(o,f,p){let E=this._isServer?"server":"client";if(!this._deflate){let t=`${E}_max_window_bits`,k=typeof this.params[t]!="number"?wg.Z_DEFAULT_WINDOWBITS:this.params[t];this._deflate=wg.createDeflateRaw(Gf(E0({},this._options.zlibDeflateOptions),{windowBits:k})),this._deflate[G1]=0,this._deflate[hd]=[],this._deflate.on("error",YX),this._deflate.on("data",XX)}this._deflate[Sg]=p,this._deflate.write(o),this._deflate.flush(wg.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let t=CA.concat(this._deflate[hd],this._deflate[G1]);f&&(t=t.slice(0,t.length-4)),this._deflate[Sg]=null,this._deflate[G1]=0,this._deflate[hd]=[],f&&this.params[`${E}_no_context_takeover`]&&this._deflate.reset(),p(null,t)})}};TA.exports=AA;function XX(i){this[hd].push(i),this[G1]+=i.length}function RA(i){if(this[G1]+=i.length,this[T4]._maxPayload<1||this[G1]<=this[T4]._maxPayload){this[hd].push(i);return}this[Pw]=new RangeError("Max payload size exceeded"),this[Pw][xA]=1009,this.removeListener("data",RA),this.reset()}function QX(i){this[T4]._inflate=null,i[xA]=1007,this[Sg](i)}});var Bw=ce((vre,Iw)=>{"use strict";function OA(i){return i>=1e3&&i<=1014&&i!==1004&&i!==1005&&i!==1006||i>=3e3&&i<=4999}function kA(i){let o=i.length,f=0;for(;f=o||(i[f+1]&192)!=128||(i[f+2]&192)!=128||i[f]===224&&(i[f+1]&224)==128||i[f]===237&&(i[f+1]&224)==160)return!1;f+=3}else if((i[f]&248)==240){if(f+3>=o||(i[f+1]&192)!=128||(i[f+2]&192)!=128||(i[f+3]&192)!=128||i[f]===240&&(i[f+1]&240)==128||i[f]===244&&i[f+1]>143||i[f]>244)return!1;f+=4}else return!1;return!0}try{let i=require("utf-8-validate");typeof i=="object"&&(i=i.Validation.isValidUTF8),Iw.exports={isValidStatusCode:OA,isValidUTF8(o){return o.length<150?kA(o):i(o)}}}catch(i){Iw.exports={isValidStatusCode:OA,isValidUTF8:kA}}});var zw=ce((mre,MA)=>{"use strict";var{Writable:JX}=require("stream"),NA=Tg(),{BINARY_TYPES:ZX,EMPTY_BUFFER:$X,kStatusCode:eQ,kWebSocket:tQ}=th(),{concat:Uw,toArrayBuffer:nQ,unmask:rQ}=Dg(),{isValidStatusCode:iQ,isValidUTF8:LA}=Bw(),Cg=0,FA=1,bA=2,PA=3,jw=4,uQ=5,IA=class extends JX{constructor(o,f,p,E){super();this._binaryType=o||ZX[0],this[tQ]=void 0,this._extensions=f||{},this._isServer=!!p,this._maxPayload=E|0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=Cg,this._loop=!1}_write(o,f,p){if(this._opcode===8&&this._state==Cg)return p();this._bufferedBytes+=o.length,this._buffers.push(o),this.startLoop(p)}consume(o){if(this._bufferedBytes-=o,o===this._buffers[0].length)return this._buffers.shift();if(o=p.length?f.set(this._buffers.shift(),E):(f.set(new Uint8Array(p.buffer,p.byteOffset,o),E),this._buffers[0]=p.slice(o)),o-=p.length}while(o>0);return f}startLoop(o){let f;this._loop=!0;do switch(this._state){case Cg:f=this.getInfo();break;case FA:f=this.getPayloadLength16();break;case bA:f=this.getPayloadLength64();break;case PA:this.getMask();break;case jw:f=this.getData(o);break;default:this._loop=!1;return}while(this._loop);o(f)}getInfo(){if(this._bufferedBytes<2){this._loop=!1;return}let o=this.consume(2);if((o[0]&48)!=0)return this._loop=!1,Ho(RangeError,"RSV2 and RSV3 must be clear",!0,1002);let f=(o[0]&64)==64;if(f&&!this._extensions[NA.extensionName])return this._loop=!1,Ho(RangeError,"RSV1 must be clear",!0,1002);if(this._fin=(o[0]&128)==128,this._opcode=o[0]&15,this._payloadLength=o[1]&127,this._opcode===0){if(f)return this._loop=!1,Ho(RangeError,"RSV1 must be clear",!0,1002);if(!this._fragmented)return this._loop=!1,Ho(RangeError,"invalid opcode 0",!0,1002);this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented)return this._loop=!1,Ho(RangeError,`invalid opcode ${this._opcode}`,!0,1002);this._compressed=f}else if(this._opcode>7&&this._opcode<11){if(!this._fin)return this._loop=!1,Ho(RangeError,"FIN must be set",!0,1002);if(f)return this._loop=!1,Ho(RangeError,"RSV1 must be clear",!0,1002);if(this._payloadLength>125)return this._loop=!1,Ho(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002)}else return this._loop=!1,Ho(RangeError,`invalid opcode ${this._opcode}`,!0,1002);if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(o[1]&128)==128,this._isServer){if(!this._masked)return this._loop=!1,Ho(RangeError,"MASK must be set",!0,1002)}else if(this._masked)return this._loop=!1,Ho(RangeError,"MASK must be clear",!0,1002);if(this._payloadLength===126)this._state=FA;else if(this._payloadLength===127)this._state=bA;else return this.haveLength()}getPayloadLength16(){if(this._bufferedBytes<2){this._loop=!1;return}return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength()}getPayloadLength64(){if(this._bufferedBytes<8){this._loop=!1;return}let o=this.consume(8),f=o.readUInt32BE(0);return f>Math.pow(2,53-32)-1?(this._loop=!1,Ho(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009)):(this._payloadLength=f*Math.pow(2,32)+o.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,Ho(RangeError,"Max payload size exceeded",!1,1009);this._masked?this._state=PA:this._state=jw}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=jw}getData(o){let f=$X;if(this._payloadLength){if(this._bufferedBytes7)return this.controlMessage(f);if(this._compressed){this._state=uQ,this.decompress(f,o);return}return f.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(f)),this.dataMessage()}decompress(o,f){this._extensions[NA.extensionName].decompress(o,this._fin,(E,t)=>{if(E)return f(E);if(t.length){if(this._messageLength+=t.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return f(Ho(RangeError,"Max payload size exceeded",!1,1009));this._fragments.push(t)}let k=this.dataMessage();if(k)return f(k);this.startLoop(f)})}dataMessage(){if(this._fin){let o=this._messageLength,f=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let p;this._binaryType==="nodebuffer"?p=Uw(f,o):this._binaryType==="arraybuffer"?p=nQ(Uw(f,o)):p=f,this.emit("message",p)}else{let p=Uw(f,o);if(!LA(p))return this._loop=!1,Ho(Error,"invalid UTF-8 sequence",!0,1007);this.emit("message",p.toString())}}this._state=Cg}controlMessage(o){if(this._opcode===8)if(this._loop=!1,o.length===0)this.emit("conclude",1005,""),this.end();else{if(o.length===1)return Ho(RangeError,"invalid payload length 1",!0,1002);{let f=o.readUInt16BE(0);if(!iQ(f))return Ho(RangeError,`invalid status code ${f}`,!0,1002);let p=o.slice(2);if(!LA(p))return Ho(Error,"invalid UTF-8 sequence",!0,1007);this.emit("conclude",f,p.toString()),this.end()}}else this._opcode===9?this.emit("ping",o):this.emit("pong",o);this._state=Cg}};MA.exports=IA;function Ho(i,o,f,p){let E=new i(f?`Invalid WebSocket frame: ${o}`:o);return Error.captureStackTrace(E,Ho),E[eQ]=p,E}});var qw=ce((yre,BA)=>{"use strict";var{randomFillSync:oQ}=require("crypto"),UA=Tg(),{EMPTY_BUFFER:lQ}=th(),{isValidStatusCode:sQ}=Bw(),{mask:jA,toBuffer:Y1}=Dg(),nh=Buffer.alloc(4),K1=class{constructor(o,f){this._extensions=f||{},this._socket=o,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(o,f){let p=f.mask&&f.readOnly,E=f.mask?6:2,t=o.length;o.length>=65536?(E+=8,t=127):o.length>125&&(E+=2,t=126);let k=Buffer.allocUnsafe(p?o.length+E:E);return k[0]=f.fin?f.opcode|128:f.opcode,f.rsv1&&(k[0]|=64),k[1]=t,t===126?k.writeUInt16BE(o.length,2):t===127&&(k.writeUInt32BE(0,2),k.writeUInt32BE(o.length,6)),f.mask?(oQ(nh,0,4),k[1]|=128,k[E-4]=nh[0],k[E-3]=nh[1],k[E-2]=nh[2],k[E-1]=nh[3],p?(jA(o,nh,k,E,o.length),[k]):(jA(o,nh,o,0,o.length),[k,o])):[k,o]}close(o,f,p,E){let t;if(o===void 0)t=lQ;else{if(typeof o!="number"||!sQ(o))throw new TypeError("First argument must be a valid error code number");if(f===void 0||f==="")t=Buffer.allocUnsafe(2),t.writeUInt16BE(o,0);else{let k=Buffer.byteLength(f);if(k>123)throw new RangeError("The message must not be greater than 123 bytes");t=Buffer.allocUnsafe(2+k),t.writeUInt16BE(o,0),t.write(f,2)}}this._deflating?this.enqueue([this.doClose,t,p,E]):this.doClose(t,p,E)}doClose(o,f,p){this.sendFrame(K1.frame(o,{fin:!0,rsv1:!1,opcode:8,mask:f,readOnly:!1}),p)}ping(o,f,p){let E=Y1(o);if(E.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPing,E,f,Y1.readOnly,p]):this.doPing(E,f,Y1.readOnly,p)}doPing(o,f,p,E){this.sendFrame(K1.frame(o,{fin:!0,rsv1:!1,opcode:9,mask:f,readOnly:p}),E)}pong(o,f,p){let E=Y1(o);if(E.length>125)throw new RangeError("The data size must not be greater than 125 bytes");this._deflating?this.enqueue([this.doPong,E,f,Y1.readOnly,p]):this.doPong(E,f,Y1.readOnly,p)}doPong(o,f,p,E){this.sendFrame(K1.frame(o,{fin:!0,rsv1:!1,opcode:10,mask:f,readOnly:p}),E)}send(o,f,p){let E=Y1(o),t=this._extensions[UA.extensionName],k=f.binary?2:1,L=f.compress;if(this._firstFragment?(this._firstFragment=!1,L&&t&&(L=E.length>=t._threshold),this._compress=L):(L=!1,k=0),f.fin&&(this._firstFragment=!0),t){let N={fin:f.fin,rsv1:L,opcode:k,mask:f.mask,readOnly:Y1.readOnly};this._deflating?this.enqueue([this.dispatch,E,this._compress,N,p]):this.dispatch(E,this._compress,N,p)}else this.sendFrame(K1.frame(E,{fin:f.fin,rsv1:!1,opcode:k,mask:f.mask,readOnly:Y1.readOnly}),p)}dispatch(o,f,p,E){if(!f){this.sendFrame(K1.frame(o,p),E);return}let t=this._extensions[UA.extensionName];this._bufferedBytes+=o.length,this._deflating=!0,t.compress(o,p.fin,(k,L)=>{if(this._socket.destroyed){let N=new Error("The socket was closed while data was being compressed");typeof E=="function"&&E(N);for(let C=0;C{"use strict";var xg=class{constructor(o,f){this.target=f,this.type=o}},qA=class extends xg{constructor(o,f){super("message",f);this.data=o}},HA=class extends xg{constructor(o,f,p){super("close",p);this.wasClean=p._closeFrameReceived&&p._closeFrameSent,this.reason=f,this.code=o}},WA=class extends xg{constructor(o){super("open",o)}},VA=class extends xg{constructor(o,f){super("error",f);this.message=o.message,this.error=o}},aQ={addEventListener(i,o,f){if(typeof o!="function")return;function p(N){o.call(this,new qA(N,this))}function E(N,C){o.call(this,new HA(N,C,this))}function t(N){o.call(this,new VA(N,this))}function k(){o.call(this,new WA(this))}let L=f&&f.once?"once":"on";i==="message"?(p._listener=o,this[L](i,p)):i==="close"?(E._listener=o,this[L](i,E)):i==="error"?(t._listener=o,this[L](i,t)):i==="open"?(k._listener=o,this[L](i,k)):this[L](i,o)},removeEventListener(i,o){let f=this.listeners(i);for(let p=0;p{"use strict";var Ag=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function Pc(i,o,f){i[o]===void 0?i[o]=[f]:i[o].push(f)}function fQ(i){let o=Object.create(null);if(i===void 0||i==="")return o;let f=Object.create(null),p=!1,E=!1,t=!1,k,L,N=-1,C=-1,U=0;for(;U{let f=i[o];return Array.isArray(f)||(f=[f]),f.map(p=>[o].concat(Object.keys(p).map(E=>{let t=p[E];return Array.isArray(t)||(t=[t]),t.map(k=>k===!0?E:`${E}=${k}`).join("; ")})).join("; ")).join(", ")}).join(", ")}YA.exports={format:cQ,parse:fQ}});var Kw=ce((Ere,KA)=>{"use strict";var dQ=require("events"),pQ=require("https"),hQ=require("http"),XA=require("net"),vQ=require("tls"),{randomBytes:mQ,createHash:yQ}=require("crypto"),{URL:Ww}=require("url"),vd=Tg(),gQ=zw(),_Q=qw(),{BINARY_TYPES:QA,EMPTY_BUFFER:Vw,GUID:EQ,kStatusCode:DQ,kWebSocket:Qs,NOOP:JA}=th(),{addEventListener:wQ,removeEventListener:SQ}=GA(),{format:TQ,parse:CQ}=Hw(),{toBuffer:xQ}=Dg(),ZA=["CONNECTING","OPEN","CLOSING","CLOSED"],Gw=[8,13],AQ=30*1e3,Bi=class extends dQ{constructor(o,f,p){super();this._binaryType=QA[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage="",this._closeTimer=null,this._extensions={},this._protocol="",this._readyState=Bi.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,o!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,Array.isArray(f)?f=f.join(", "):typeof f=="object"&&f!==null&&(p=f,f=void 0),$A(this,o,f,p)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(o){!QA.includes(o)||(this._binaryType=o,this._receiver&&(this._receiver._binaryType=o))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(o,f,p){let E=new gQ(this.binaryType,this._extensions,this._isServer,p);this._sender=new _Q(o,this._extensions),this._receiver=E,this._socket=o,E[Qs]=this,o[Qs]=this,E.on("conclude",RQ),E.on("drain",OQ),E.on("error",kQ),E.on("message",MQ),E.on("ping",NQ),E.on("pong",LQ),o.setTimeout(0),o.setNoDelay(),f.length>0&&o.unshift(f),o.on("close",eR),o.on("data",x4),o.on("end",tR),o.on("error",nR),this._readyState=Bi.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=Bi.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[vd.extensionName]&&this._extensions[vd.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Bi.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(o,f){if(this.readyState!==Bi.CLOSED){if(this.readyState===Bi.CONNECTING){let p="WebSocket was closed before the connection was established";return X1(this,this._req,p)}if(this.readyState===Bi.CLOSING){this._closeFrameSent&&this._closeFrameReceived&&this._socket.end();return}this._readyState=Bi.CLOSING,this._sender.close(o,f,!this._isServer,p=>{p||(this._closeFrameSent=!0,this._closeFrameReceived&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),AQ)}}ping(o,f,p){if(this.readyState===Bi.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof o=="function"?(p=o,o=f=void 0):typeof f=="function"&&(p=f,f=void 0),typeof o=="number"&&(o=o.toString()),this.readyState!==Bi.OPEN){Yw(this,o,p);return}f===void 0&&(f=!this._isServer),this._sender.ping(o||Vw,f,p)}pong(o,f,p){if(this.readyState===Bi.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof o=="function"?(p=o,o=f=void 0):typeof f=="function"&&(p=f,f=void 0),typeof o=="number"&&(o=o.toString()),this.readyState!==Bi.OPEN){Yw(this,o,p);return}f===void 0&&(f=!this._isServer),this._sender.pong(o||Vw,f,p)}send(o,f,p){if(this.readyState===Bi.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof f=="function"&&(p=f,f={}),typeof o=="number"&&(o=o.toString()),this.readyState!==Bi.OPEN){Yw(this,o,p);return}let E=E0({binary:typeof o!="string",mask:!this._isServer,compress:!0,fin:!0},f);this._extensions[vd.extensionName]||(E.compress=!1),this._sender.send(o||Vw,E,p)}terminate(){if(this.readyState!==Bi.CLOSED){if(this.readyState===Bi.CONNECTING){let o="WebSocket was closed before the connection was established";return X1(this,this._req,o)}this._socket&&(this._readyState=Bi.CLOSING,this._socket.destroy())}}};ZA.forEach((i,o)=>{let f={enumerable:!0,value:o};Object.defineProperty(Bi.prototype,i,f),Object.defineProperty(Bi,i,f)});["binaryType","bufferedAmount","extensions","protocol","readyState","url"].forEach(i=>{Object.defineProperty(Bi.prototype,i,{enumerable:!0})});["open","error","close","message"].forEach(i=>{Object.defineProperty(Bi.prototype,`on${i}`,{configurable:!0,enumerable:!0,get(){let o=this.listeners(i);for(let f=0;f{X1(i,W,"Opening handshake has timed out")}),W.on("error",ne=>{W===null||W.aborted||(W=i._req=null,i._readyState=Bi.CLOSING,i.emit("error",ne),i.emitClose())}),W.on("response",ne=>{let m=ne.headers.location,we=ne.statusCode;if(m&&E.followRedirects&&we>=300&&we<400){if(++i._redirects>E.maxRedirects){X1(i,W,"Maximum redirects exceeded");return}W.abort();let Se=new Ww(m,o);$A(i,Se,f,p)}else i.emit("unexpected-response",W,ne)||X1(i,W,`Unexpected server response: ${ne.statusCode}`)}),W.on("upgrade",(ne,m,we)=>{if(i.emit("upgrade",ne),i.readyState!==Bi.CONNECTING)return;W=i._req=null;let Se=yQ("sha1").update(C+EQ).digest("base64");if(ne.headers["sec-websocket-accept"]!==Se){X1(i,m,"Invalid Sec-WebSocket-Accept header");return}let he=ne.headers["sec-websocket-protocol"],ge=(f||"").split(/, */),ze;if(!f&&he?ze="Server sent a subprotocol but none was requested":f&&!he?ze="Server sent no subprotocol":he&&!ge.includes(he)&&(ze="Server sent an invalid subprotocol"),ze){X1(i,m,ze);return}if(he&&(i._protocol=he),q)try{let pe=CQ(ne.headers["sec-websocket-extensions"]);pe[vd.extensionName]&&(q.accept(pe[vd.extensionName]),i._extensions[vd.extensionName]=q)}catch(pe){X1(i,m,"Invalid Sec-WebSocket-Extensions header");return}i.setSocket(m,we,E.maxPayload)})}function FQ(i){return i.path=i.socketPath,XA.connect(i)}function bQ(i){return i.path=void 0,!i.servername&&i.servername!==""&&(i.servername=XA.isIP(i.host)?"":i.host),vQ.connect(i)}function X1(i,o,f){i._readyState=Bi.CLOSING;let p=new Error(f);Error.captureStackTrace(p,X1),o.setHeader?(o.abort(),o.socket&&!o.socket.destroyed&&o.socket.destroy(),o.once("abort",i.emitClose.bind(i)),i.emit("error",p)):(o.destroy(p),o.once("error",i.emit.bind(i,"error")),o.once("close",i.emitClose.bind(i)))}function Yw(i,o,f){if(o){let p=xQ(o).length;i._socket?i._sender._bufferedBytes+=p:i._bufferedAmount+=p}if(f){let p=new Error(`WebSocket is not open: readyState ${i.readyState} (${ZA[i.readyState]})`);f(p)}}function RQ(i,o){let f=this[Qs];f._socket.removeListener("data",x4),f._socket.resume(),f._closeFrameReceived=!0,f._closeMessage=o,f._closeCode=i,i===1005?f.close():f.close(i,o)}function OQ(){this[Qs]._socket.resume()}function kQ(i){let o=this[Qs];o._socket.removeListener("data",x4),o._readyState=Bi.CLOSING,o._closeCode=i[DQ],o.emit("error",i),o._socket.destroy()}function rR(){this[Qs].emitClose()}function MQ(i){this[Qs].emit("message",i)}function NQ(i){let o=this[Qs];o.pong(i,!o._isServer,JA),o.emit("ping",i)}function LQ(i){this[Qs].emit("pong",i)}function eR(){let i=this[Qs];this.removeListener("close",eR),this.removeListener("end",tR),i._readyState=Bi.CLOSING,i._socket.read(),i._receiver.end(),this.removeListener("data",x4),this[Qs]=void 0,clearTimeout(i._closeTimer),i._receiver._writableState.finished||i._receiver._writableState.errorEmitted?i.emitClose():(i._receiver.on("error",rR),i._receiver.on("finish",rR))}function x4(i){this[Qs]._receiver.write(i)||this.pause()}function tR(){let i=this[Qs];i._readyState=Bi.CLOSING,i._receiver.end(),this.end()}function nR(){let i=this[Qs];this.removeListener("error",nR),this.on("error",JA),i&&(i._readyState=Bi.CLOSING,this.destroy())}});var lR=ce((Dre,iR)=>{"use strict";var{Duplex:PQ}=require("stream");function uR(i){i.emit("close")}function IQ(){!this.destroyed&&this._writableState.finished&&this.destroy()}function oR(i){this.removeListener("error",oR),this.destroy(),this.listenerCount("error")===0&&this.emit("error",i)}function BQ(i,o){let f=!0;function p(){f&&i._socket.resume()}i.readyState===i.CONNECTING?i.once("open",function(){i._receiver.removeAllListeners("drain"),i._receiver.on("drain",p)}):(i._receiver.removeAllListeners("drain"),i._receiver.on("drain",p));let E=new PQ(Gf(E0({},o),{autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1}));return i.on("message",function(k){E.push(k)||(f=!1,i._socket.pause())}),i.once("error",function(k){E.destroyed||E.destroy(k)}),i.once("close",function(){E.destroyed||E.push(null)}),E._destroy=function(t,k){if(i.readyState===i.CLOSED){k(t),process.nextTick(uR,E);return}let L=!1;i.once("error",function(C){L=!0,k(C)}),i.once("close",function(){L||k(t),process.nextTick(uR,E)}),i.terminate()},E._final=function(t){if(i.readyState===i.CONNECTING){i.once("open",function(){E._final(t)});return}i._socket!==null&&(i._socket._writableState.finished?(t(),E._readableState.endEmitted&&E.destroy()):(i._socket.once("finish",function(){t()}),i.close()))},E._read=function(){i.readyState===i.OPEN&&!f&&(f=!0,i._receiver._writableState.needDrain||i._socket.resume())},E._write=function(t,k,L){if(i.readyState===i.CONNECTING){i.once("open",function(){E._write(t,k,L)});return}i.send(t,L)},E.on("end",IQ),E.on("error",oR),E}iR.exports=BQ});var fR=ce((wre,sR)=>{"use strict";var UQ=require("events"),{createHash:jQ}=require("crypto"),{createServer:zQ,STATUS_CODES:Xw}=require("http"),rh=Tg(),qQ=Kw(),{format:HQ,parse:WQ}=Hw(),{GUID:VQ,kWebSocket:GQ}=th(),YQ=/^[+/0-9A-Za-z]{22}==$/,aR=class extends UQ{constructor(o,f){super();if(o=E0({maxPayload:100*1024*1024,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null},o),o.port==null&&!o.server&&!o.noServer)throw new TypeError('One of the "port", "server", or "noServer" options must be specified');if(o.port!=null?(this._server=zQ((p,E)=>{let t=Xw[426];E.writeHead(426,{"Content-Length":t.length,"Content-Type":"text/plain"}),E.end(t)}),this._server.listen(o.port,o.host,o.backlog,f)):o.server&&(this._server=o.server),this._server){let p=this.emit.bind(this,"connection");this._removeListeners=KQ(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(E,t,k)=>{this.handleUpgrade(E,t,k,p)}})}o.perMessageDeflate===!0&&(o.perMessageDeflate={}),o.clientTracking&&(this.clients=new Set),this.options=o}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(o){if(o&&this.once("close",o),this.clients)for(let p of this.clients)p.terminate();let f=this._server;if(f&&(this._removeListeners(),this._removeListeners=this._server=null,this.options.port!=null)){f.close(()=>this.emit("close"));return}process.nextTick(XQ,this)}shouldHandle(o){if(this.options.path){let f=o.url.indexOf("?");if((f!==-1?o.url.slice(0,f):o.url)!==this.options.path)return!1}return!0}handleUpgrade(o,f,p,E){f.on("error",Qw);let t=o.headers["sec-websocket-key"]!==void 0?o.headers["sec-websocket-key"].trim():!1,k=+o.headers["sec-websocket-version"],L={};if(o.method!=="GET"||o.headers.upgrade.toLowerCase()!=="websocket"||!t||!YQ.test(t)||k!==8&&k!==13||!this.shouldHandle(o))return A4(f,400);if(this.options.perMessageDeflate){let N=new rh(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let C=WQ(o.headers["sec-websocket-extensions"]);C[rh.extensionName]&&(N.accept(C[rh.extensionName]),L[rh.extensionName]=N)}catch(C){return A4(f,400)}}if(this.options.verifyClient){let N={origin:o.headers[`${k===8?"sec-websocket-origin":"origin"}`],secure:!!(o.socket.authorized||o.socket.encrypted),req:o};if(this.options.verifyClient.length===2){this.options.verifyClient(N,(C,U,q,W)=>{if(!C)return A4(f,U||401,q,W);this.completeUpgrade(t,L,o,f,p,E)});return}if(!this.options.verifyClient(N))return A4(f,401)}this.completeUpgrade(t,L,o,f,p,E)}completeUpgrade(o,f,p,E,t,k){if(!E.readable||!E.writable)return E.destroy();if(E[GQ])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");let L=jQ("sha1").update(o+VQ).digest("base64"),N=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${L}`],C=new qQ(null),U=p.headers["sec-websocket-protocol"];if(U&&(U=U.split(",").map(QQ),this.options.handleProtocols?U=this.options.handleProtocols(U,p):U=U[0],U&&(N.push(`Sec-WebSocket-Protocol: ${U}`),C._protocol=U)),f[rh.extensionName]){let q=f[rh.extensionName].params,W=HQ({[rh.extensionName]:[q]});N.push(`Sec-WebSocket-Extensions: ${W}`),C._extensions=f}this.emit("headers",N,p),E.write(N.concat(`\r -`).join(`\r -`)),E.removeListener("error",Qw),C.setSocket(E,t,this.options.maxPayload),this.clients&&(this.clients.add(C),C.on("close",()=>this.clients.delete(C))),k(C,p)}};sR.exports=aR;function KQ(i,o){for(let f of Object.keys(o))i.on(f,o[f]);return function(){for(let p of Object.keys(o))i.removeListener(p,o[p])}}function XQ(i){i.emit("close")}function Qw(){this.destroy()}function A4(i,o,f,p){i.writable&&(f=f||Xw[o],p=E0({Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(f)},p),i.write(`HTTP/1.1 ${o} ${Xw[o]}\r -`+Object.keys(p).map(E=>`${E}: ${p[E]}`).join(`\r -`)+`\r -\r -`+f)),i.removeListener("error",Qw),i.destroy()}function QQ(i){return i.trim()}});var dR=ce((Sre,cR)=>{"use strict";var Rg=Kw();Rg.createWebSocketStream=lR();Rg.Server=fR();Rg.Receiver=zw();Rg.Sender=qw();cR.exports=Rg});var pR=ce(R4=>{"use strict";var JQ=R4&&R4.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(R4,"__esModule",{value:!0});var ZQ=JQ(dR()),Og=global;Og.WebSocket||(Og.WebSocket=ZQ.default);Og.window||(Og.window=global);Og.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__=[{type:1,value:7,isEnabled:!0},{type:2,value:"InternalApp",isEnabled:!0,isValid:!0},{type:2,value:"InternalAppContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdoutContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStderrContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdinContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalFocusContext",isEnabled:!0,isValid:!0}]});var hR=ce((O4,Jw)=>{(function(i,o){typeof O4=="object"&&typeof Jw=="object"?Jw.exports=o():typeof define=="function"&&define.amd?define([],o):typeof O4=="object"?O4.ReactDevToolsBackend=o():i.ReactDevToolsBackend=o()})(window,function(){return function(i){var o={};function f(p){if(o[p])return o[p].exports;var E=o[p]={i:p,l:!1,exports:{}};return i[p].call(E.exports,E,E.exports,f),E.l=!0,E.exports}return f.m=i,f.c=o,f.d=function(p,E,t){f.o(p,E)||Object.defineProperty(p,E,{enumerable:!0,get:t})},f.r=function(p){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(p,"__esModule",{value:!0})},f.t=function(p,E){if(1&E&&(p=f(p)),8&E||4&E&&typeof p=="object"&&p&&p.__esModule)return p;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:p}),2&E&&typeof p!="string")for(var k in p)f.d(t,k,function(L){return p[L]}.bind(null,k));return t},f.n=function(p){var E=p&&p.__esModule?function(){return p.default}:function(){return p};return f.d(E,"a",E),E},f.o=function(p,E){return Object.prototype.hasOwnProperty.call(p,E)},f.p="",f(f.s=20)}([function(i,o,f){"use strict";i.exports=f(12)},function(i,o,f){"use strict";var p=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function k(L){if(L==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(L)}i.exports=function(){try{if(!Object.assign)return!1;var L=new String("abc");if(L[5]="de",Object.getOwnPropertyNames(L)[0]==="5")return!1;for(var N={},C=0;C<10;C++)N["_"+String.fromCharCode(C)]=C;if(Object.getOwnPropertyNames(N).map(function(q){return N[q]}).join("")!=="0123456789")return!1;var U={};return"abcdefghijklmnopqrst".split("").forEach(function(q){U[q]=q}),Object.keys(Object.assign({},U)).join("")==="abcdefghijklmnopqrst"}catch(q){return!1}}()?Object.assign:function(L,N){for(var C,U,q=k(L),W=1;W=le||en<0||$t&&At-Ke>=wt}function ue(){var At=Se();if(Ce(At))return je(At);$e=setTimeout(ue,function(en){var ln=le-(en-ft);return $t?we(ln,wt-(en-Ke)):ln}(At))}function je(At){return $e=void 0,at&&Ge?Q(At):(Ge=rt=void 0,xt)}function ct(){var At=Se(),en=Ce(At);if(Ge=arguments,rt=this,ft=At,en){if($e===void 0)return ae(ft);if($t)return $e=setTimeout(ue,le),Q(ft)}return $e===void 0&&($e=setTimeout(ue,le)),xt}return le=pe(le)||0,ge(Ue)&&(jt=!!Ue.leading,wt=($t="maxWait"in Ue)?m(pe(Ue.maxWait)||0,le):wt,at="trailing"in Ue?!!Ue.trailing:at),ct.cancel=function(){$e!==void 0&&clearTimeout($e),Ke=0,Ge=ft=rt=$e=void 0},ct.flush=function(){return $e===void 0?xt:je(Se())},ct}function ge(Oe){var le=E(Oe);return!!Oe&&(le=="object"||le=="function")}function ze(Oe){return E(Oe)=="symbol"||function(le){return!!le&&E(le)=="object"}(Oe)&&ne.call(Oe)=="[object Symbol]"}function pe(Oe){if(typeof Oe=="number")return Oe;if(ze(Oe))return NaN;if(ge(Oe)){var le=typeof Oe.valueOf=="function"?Oe.valueOf():Oe;Oe=ge(le)?le+"":le}if(typeof Oe!="string")return Oe===0?Oe:+Oe;Oe=Oe.replace(t,"");var Ue=L.test(Oe);return Ue||N.test(Oe)?C(Oe.slice(2),Ue?2:8):k.test(Oe)?NaN:+Oe}i.exports=function(Oe,le,Ue){var Ge=!0,rt=!0;if(typeof Oe!="function")throw new TypeError("Expected a function");return ge(Ue)&&(Ge="leading"in Ue?!!Ue.leading:Ge,rt="trailing"in Ue?!!Ue.trailing:rt),he(Oe,le,{leading:Ge,maxWait:le,trailing:rt})}}).call(this,f(4))},function(i,o,f){(function(p){function E(Q){return(E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ae){return typeof ae}:function(ae){return ae&&typeof Symbol=="function"&&ae.constructor===Symbol&&ae!==Symbol.prototype?"symbol":typeof ae})(Q)}var t;o=i.exports=m,t=(p===void 0?"undefined":E(p))==="object"&&p.env&&p.env.NODE_DEBUG&&/\bsemver\b/i.test(p.env.NODE_DEBUG)?function(){var Q=Array.prototype.slice.call(arguments,0);Q.unshift("SEMVER"),console.log.apply(console,Q)}:function(){},o.SEMVER_SPEC_VERSION="2.0.0";var k=Number.MAX_SAFE_INTEGER||9007199254740991,L=o.re=[],N=o.src=[],C=o.tokens={},U=0;function q(Q){C[Q]=U++}q("NUMERICIDENTIFIER"),N[C.NUMERICIDENTIFIER]="0|[1-9]\\d*",q("NUMERICIDENTIFIERLOOSE"),N[C.NUMERICIDENTIFIERLOOSE]="[0-9]+",q("NONNUMERICIDENTIFIER"),N[C.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*",q("MAINVERSION"),N[C.MAINVERSION]="("+N[C.NUMERICIDENTIFIER]+")\\.("+N[C.NUMERICIDENTIFIER]+")\\.("+N[C.NUMERICIDENTIFIER]+")",q("MAINVERSIONLOOSE"),N[C.MAINVERSIONLOOSE]="("+N[C.NUMERICIDENTIFIERLOOSE]+")\\.("+N[C.NUMERICIDENTIFIERLOOSE]+")\\.("+N[C.NUMERICIDENTIFIERLOOSE]+")",q("PRERELEASEIDENTIFIER"),N[C.PRERELEASEIDENTIFIER]="(?:"+N[C.NUMERICIDENTIFIER]+"|"+N[C.NONNUMERICIDENTIFIER]+")",q("PRERELEASEIDENTIFIERLOOSE"),N[C.PRERELEASEIDENTIFIERLOOSE]="(?:"+N[C.NUMERICIDENTIFIERLOOSE]+"|"+N[C.NONNUMERICIDENTIFIER]+")",q("PRERELEASE"),N[C.PRERELEASE]="(?:-("+N[C.PRERELEASEIDENTIFIER]+"(?:\\."+N[C.PRERELEASEIDENTIFIER]+")*))",q("PRERELEASELOOSE"),N[C.PRERELEASELOOSE]="(?:-?("+N[C.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+N[C.PRERELEASEIDENTIFIERLOOSE]+")*))",q("BUILDIDENTIFIER"),N[C.BUILDIDENTIFIER]="[0-9A-Za-z-]+",q("BUILD"),N[C.BUILD]="(?:\\+("+N[C.BUILDIDENTIFIER]+"(?:\\."+N[C.BUILDIDENTIFIER]+")*))",q("FULL"),q("FULLPLAIN"),N[C.FULLPLAIN]="v?"+N[C.MAINVERSION]+N[C.PRERELEASE]+"?"+N[C.BUILD]+"?",N[C.FULL]="^"+N[C.FULLPLAIN]+"$",q("LOOSEPLAIN"),N[C.LOOSEPLAIN]="[v=\\s]*"+N[C.MAINVERSIONLOOSE]+N[C.PRERELEASELOOSE]+"?"+N[C.BUILD]+"?",q("LOOSE"),N[C.LOOSE]="^"+N[C.LOOSEPLAIN]+"$",q("GTLT"),N[C.GTLT]="((?:<|>)?=?)",q("XRANGEIDENTIFIERLOOSE"),N[C.XRANGEIDENTIFIERLOOSE]=N[C.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",q("XRANGEIDENTIFIER"),N[C.XRANGEIDENTIFIER]=N[C.NUMERICIDENTIFIER]+"|x|X|\\*",q("XRANGEPLAIN"),N[C.XRANGEPLAIN]="[v=\\s]*("+N[C.XRANGEIDENTIFIER]+")(?:\\.("+N[C.XRANGEIDENTIFIER]+")(?:\\.("+N[C.XRANGEIDENTIFIER]+")(?:"+N[C.PRERELEASE]+")?"+N[C.BUILD]+"?)?)?",q("XRANGEPLAINLOOSE"),N[C.XRANGEPLAINLOOSE]="[v=\\s]*("+N[C.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+N[C.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+N[C.XRANGEIDENTIFIERLOOSE]+")(?:"+N[C.PRERELEASELOOSE]+")?"+N[C.BUILD]+"?)?)?",q("XRANGE"),N[C.XRANGE]="^"+N[C.GTLT]+"\\s*"+N[C.XRANGEPLAIN]+"$",q("XRANGELOOSE"),N[C.XRANGELOOSE]="^"+N[C.GTLT]+"\\s*"+N[C.XRANGEPLAINLOOSE]+"$",q("COERCE"),N[C.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",q("COERCERTL"),L[C.COERCERTL]=new RegExp(N[C.COERCE],"g"),q("LONETILDE"),N[C.LONETILDE]="(?:~>?)",q("TILDETRIM"),N[C.TILDETRIM]="(\\s*)"+N[C.LONETILDE]+"\\s+",L[C.TILDETRIM]=new RegExp(N[C.TILDETRIM],"g"),q("TILDE"),N[C.TILDE]="^"+N[C.LONETILDE]+N[C.XRANGEPLAIN]+"$",q("TILDELOOSE"),N[C.TILDELOOSE]="^"+N[C.LONETILDE]+N[C.XRANGEPLAINLOOSE]+"$",q("LONECARET"),N[C.LONECARET]="(?:\\^)",q("CARETTRIM"),N[C.CARETTRIM]="(\\s*)"+N[C.LONECARET]+"\\s+",L[C.CARETTRIM]=new RegExp(N[C.CARETTRIM],"g"),q("CARET"),N[C.CARET]="^"+N[C.LONECARET]+N[C.XRANGEPLAIN]+"$",q("CARETLOOSE"),N[C.CARETLOOSE]="^"+N[C.LONECARET]+N[C.XRANGEPLAINLOOSE]+"$",q("COMPARATORLOOSE"),N[C.COMPARATORLOOSE]="^"+N[C.GTLT]+"\\s*("+N[C.LOOSEPLAIN]+")$|^$",q("COMPARATOR"),N[C.COMPARATOR]="^"+N[C.GTLT]+"\\s*("+N[C.FULLPLAIN]+")$|^$",q("COMPARATORTRIM"),N[C.COMPARATORTRIM]="(\\s*)"+N[C.GTLT]+"\\s*("+N[C.LOOSEPLAIN]+"|"+N[C.XRANGEPLAIN]+")",L[C.COMPARATORTRIM]=new RegExp(N[C.COMPARATORTRIM],"g"),q("HYPHENRANGE"),N[C.HYPHENRANGE]="^\\s*("+N[C.XRANGEPLAIN]+")\\s+-\\s+("+N[C.XRANGEPLAIN]+")\\s*$",q("HYPHENRANGELOOSE"),N[C.HYPHENRANGELOOSE]="^\\s*("+N[C.XRANGEPLAINLOOSE]+")\\s+-\\s+("+N[C.XRANGEPLAINLOOSE]+")\\s*$",q("STAR"),N[C.STAR]="(<|>)?=?\\s*\\*";for(var W=0;W256||!(ae.loose?L[C.LOOSE]:L[C.FULL]).test(Q))return null;try{return new m(Q,ae)}catch(Ce){return null}}function m(Q,ae){if(ae&&E(ae)==="object"||(ae={loose:!!ae,includePrerelease:!1}),Q instanceof m){if(Q.loose===ae.loose)return Q;Q=Q.version}else if(typeof Q!="string")throw new TypeError("Invalid Version: "+Q);if(Q.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof m))return new m(Q,ae);t("SemVer",Q,ae),this.options=ae,this.loose=!!ae.loose;var Ce=Q.trim().match(ae.loose?L[C.LOOSE]:L[C.FULL]);if(!Ce)throw new TypeError("Invalid Version: "+Q);if(this.raw=Q,this.major=+Ce[1],this.minor=+Ce[2],this.patch=+Ce[3],this.major>k||this.major<0)throw new TypeError("Invalid major version");if(this.minor>k||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>k||this.patch<0)throw new TypeError("Invalid patch version");Ce[4]?this.prerelease=Ce[4].split(".").map(function(ue){if(/^[0-9]+$/.test(ue)){var je=+ue;if(je>=0&&je=0;)typeof this.prerelease[Ce]=="number"&&(this.prerelease[Ce]++,Ce=-2);Ce===-1&&this.prerelease.push(0)}ae&&(this.prerelease[0]===ae?isNaN(this.prerelease[1])&&(this.prerelease=[ae,0]):this.prerelease=[ae,0]);break;default:throw new Error("invalid increment argument: "+Q)}return this.format(),this.raw=this.version,this},o.inc=function(Q,ae,Ce,ue){typeof Ce=="string"&&(ue=Ce,Ce=void 0);try{return new m(Q,Ce).inc(ae,ue).version}catch(je){return null}},o.diff=function(Q,ae){if(pe(Q,ae))return null;var Ce=ne(Q),ue=ne(ae),je="";if(Ce.prerelease.length||ue.prerelease.length){je="pre";var ct="prerelease"}for(var At in Ce)if((At==="major"||At==="minor"||At==="patch")&&Ce[At]!==ue[At])return je+At;return ct},o.compareIdentifiers=Se;var we=/^[0-9]+$/;function Se(Q,ae){var Ce=we.test(Q),ue=we.test(ae);return Ce&&ue&&(Q=+Q,ae=+ae),Q===ae?0:Ce&&!ue?-1:ue&&!Ce?1:Q0}function ze(Q,ae,Ce){return he(Q,ae,Ce)<0}function pe(Q,ae,Ce){return he(Q,ae,Ce)===0}function Oe(Q,ae,Ce){return he(Q,ae,Ce)!==0}function le(Q,ae,Ce){return he(Q,ae,Ce)>=0}function Ue(Q,ae,Ce){return he(Q,ae,Ce)<=0}function Ge(Q,ae,Ce,ue){switch(ae){case"===":return E(Q)==="object"&&(Q=Q.version),E(Ce)==="object"&&(Ce=Ce.version),Q===Ce;case"!==":return E(Q)==="object"&&(Q=Q.version),E(Ce)==="object"&&(Ce=Ce.version),Q!==Ce;case"":case"=":case"==":return pe(Q,Ce,ue);case"!=":return Oe(Q,Ce,ue);case">":return ge(Q,Ce,ue);case">=":return le(Q,Ce,ue);case"<":return ze(Q,Ce,ue);case"<=":return Ue(Q,Ce,ue);default:throw new TypeError("Invalid operator: "+ae)}}function rt(Q,ae){if(ae&&E(ae)==="object"||(ae={loose:!!ae,includePrerelease:!1}),Q instanceof rt){if(Q.loose===!!ae.loose)return Q;Q=Q.value}if(!(this instanceof rt))return new rt(Q,ae);t("comparator",Q,ae),this.options=ae,this.loose=!!ae.loose,this.parse(Q),this.semver===wt?this.value="":this.value=this.operator+this.semver.version,t("comp",this)}o.rcompareIdentifiers=function(Q,ae){return Se(ae,Q)},o.major=function(Q,ae){return new m(Q,ae).major},o.minor=function(Q,ae){return new m(Q,ae).minor},o.patch=function(Q,ae){return new m(Q,ae).patch},o.compare=he,o.compareLoose=function(Q,ae){return he(Q,ae,!0)},o.compareBuild=function(Q,ae,Ce){var ue=new m(Q,Ce),je=new m(ae,Ce);return ue.compare(je)||ue.compareBuild(je)},o.rcompare=function(Q,ae,Ce){return he(ae,Q,Ce)},o.sort=function(Q,ae){return Q.sort(function(Ce,ue){return o.compareBuild(Ce,ue,ae)})},o.rsort=function(Q,ae){return Q.sort(function(Ce,ue){return o.compareBuild(ue,Ce,ae)})},o.gt=ge,o.lt=ze,o.eq=pe,o.neq=Oe,o.gte=le,o.lte=Ue,o.cmp=Ge,o.Comparator=rt;var wt={};function xt(Q,ae){if(ae&&E(ae)==="object"||(ae={loose:!!ae,includePrerelease:!1}),Q instanceof xt)return Q.loose===!!ae.loose&&Q.includePrerelease===!!ae.includePrerelease?Q:new xt(Q.raw,ae);if(Q instanceof rt)return new xt(Q.value,ae);if(!(this instanceof xt))return new xt(Q,ae);if(this.options=ae,this.loose=!!ae.loose,this.includePrerelease=!!ae.includePrerelease,this.raw=Q,this.set=Q.split(/\s*\|\|\s*/).map(function(Ce){return this.parseRange(Ce.trim())},this).filter(function(Ce){return Ce.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+Q);this.format()}function $e(Q,ae){for(var Ce=!0,ue=Q.slice(),je=ue.pop();Ce&&ue.length;)Ce=ue.every(function(ct){return je.intersects(ct,ae)}),je=ue.pop();return Ce}function ft(Q){return!Q||Q.toLowerCase()==="x"||Q==="*"}function Ke(Q,ae,Ce,ue,je,ct,At,en,ln,An,nr,un,Wt){return((ae=ft(Ce)?"":ft(ue)?">="+Ce+".0.0":ft(je)?">="+Ce+"."+ue+".0":">="+ae)+" "+(en=ft(ln)?"":ft(An)?"<"+(+ln+1)+".0.0":ft(nr)?"<"+ln+"."+(+An+1)+".0":un?"<="+ln+"."+An+"."+nr+"-"+un:"<="+en)).trim()}function jt(Q,ae,Ce){for(var ue=0;ue0){var je=Q[ue].semver;if(je.major===ae.major&&je.minor===ae.minor&&je.patch===ae.patch)return!0}return!1}return!0}function $t(Q,ae,Ce){try{ae=new xt(ae,Ce)}catch(ue){return!1}return ae.test(Q)}function at(Q,ae,Ce,ue){var je,ct,At,en,ln;switch(Q=new m(Q,ue),ae=new xt(ae,ue),Ce){case">":je=ge,ct=Ue,At=ze,en=">",ln=">=";break;case"<":je=ze,ct=le,At=ge,en="<",ln="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if($t(Q,ae,ue))return!1;for(var An=0;An=0.0.0")),un=un||vr,Wt=Wt||vr,je(vr.semver,un.semver,ue)?un=vr:At(vr.semver,Wt.semver,ue)&&(Wt=vr)}),un.operator===en||un.operator===ln||(!Wt.operator||Wt.operator===en)&&ct(Q,Wt.semver)||Wt.operator===ln&&At(Q,Wt.semver))return!1}return!0}rt.prototype.parse=function(Q){var ae=this.options.loose?L[C.COMPARATORLOOSE]:L[C.COMPARATOR],Ce=Q.match(ae);if(!Ce)throw new TypeError("Invalid comparator: "+Q);this.operator=Ce[1]!==void 0?Ce[1]:"",this.operator==="="&&(this.operator=""),Ce[2]?this.semver=new m(Ce[2],this.options.loose):this.semver=wt},rt.prototype.toString=function(){return this.value},rt.prototype.test=function(Q){if(t("Comparator.test",Q,this.options.loose),this.semver===wt||Q===wt)return!0;if(typeof Q=="string")try{Q=new m(Q,this.options)}catch(ae){return!1}return Ge(Q,this.operator,this.semver,this.options)},rt.prototype.intersects=function(Q,ae){if(!(Q instanceof rt))throw new TypeError("a Comparator is required");var Ce;if(ae&&E(ae)==="object"||(ae={loose:!!ae,includePrerelease:!1}),this.operator==="")return this.value===""||(Ce=new xt(Q.value,ae),$t(this.value,Ce,ae));if(Q.operator==="")return Q.value===""||(Ce=new xt(this.value,ae),$t(Q.semver,Ce,ae));var ue=!(this.operator!==">="&&this.operator!==">"||Q.operator!==">="&&Q.operator!==">"),je=!(this.operator!=="<="&&this.operator!=="<"||Q.operator!=="<="&&Q.operator!=="<"),ct=this.semver.version===Q.semver.version,At=!(this.operator!==">="&&this.operator!=="<="||Q.operator!==">="&&Q.operator!=="<="),en=Ge(this.semver,"<",Q.semver,ae)&&(this.operator===">="||this.operator===">")&&(Q.operator==="<="||Q.operator==="<"),ln=Ge(this.semver,">",Q.semver,ae)&&(this.operator==="<="||this.operator==="<")&&(Q.operator===">="||Q.operator===">");return ue||je||ct&&At||en||ln},o.Range=xt,xt.prototype.format=function(){return this.range=this.set.map(function(Q){return Q.join(" ").trim()}).join("||").trim(),this.range},xt.prototype.toString=function(){return this.range},xt.prototype.parseRange=function(Q){var ae=this.options.loose;Q=Q.trim();var Ce=ae?L[C.HYPHENRANGELOOSE]:L[C.HYPHENRANGE];Q=Q.replace(Ce,Ke),t("hyphen replace",Q),Q=Q.replace(L[C.COMPARATORTRIM],"$1$2$3"),t("comparator trim",Q,L[C.COMPARATORTRIM]),Q=(Q=(Q=Q.replace(L[C.TILDETRIM],"$1~")).replace(L[C.CARETTRIM],"$1^")).split(/\s+/).join(" ");var ue=ae?L[C.COMPARATORLOOSE]:L[C.COMPARATOR],je=Q.split(" ").map(function(ct){return function(At,en){return t("comp",At,en),At=function(ln,An){return ln.trim().split(/\s+/).map(function(nr){return function(un,Wt){t("caret",un,Wt);var vr=Wt.loose?L[C.CARETLOOSE]:L[C.CARET];return un.replace(vr,function(w,Ut,Vn,fr,Fr){var ur;return t("caret",un,w,Ut,Vn,fr,Fr),ft(Ut)?ur="":ft(Vn)?ur=">="+Ut+".0.0 <"+(+Ut+1)+".0.0":ft(fr)?ur=Ut==="0"?">="+Ut+"."+Vn+".0 <"+Ut+"."+(+Vn+1)+".0":">="+Ut+"."+Vn+".0 <"+(+Ut+1)+".0.0":Fr?(t("replaceCaret pr",Fr),ur=Ut==="0"?Vn==="0"?">="+Ut+"."+Vn+"."+fr+"-"+Fr+" <"+Ut+"."+Vn+"."+(+fr+1):">="+Ut+"."+Vn+"."+fr+"-"+Fr+" <"+Ut+"."+(+Vn+1)+".0":">="+Ut+"."+Vn+"."+fr+"-"+Fr+" <"+(+Ut+1)+".0.0"):(t("no pr"),ur=Ut==="0"?Vn==="0"?">="+Ut+"."+Vn+"."+fr+" <"+Ut+"."+Vn+"."+(+fr+1):">="+Ut+"."+Vn+"."+fr+" <"+Ut+"."+(+Vn+1)+".0":">="+Ut+"."+Vn+"."+fr+" <"+(+Ut+1)+".0.0"),t("caret return",ur),ur})}(nr,An)}).join(" ")}(At,en),t("caret",At),At=function(ln,An){return ln.trim().split(/\s+/).map(function(nr){return function(un,Wt){var vr=Wt.loose?L[C.TILDELOOSE]:L[C.TILDE];return un.replace(vr,function(w,Ut,Vn,fr,Fr){var ur;return t("tilde",un,w,Ut,Vn,fr,Fr),ft(Ut)?ur="":ft(Vn)?ur=">="+Ut+".0.0 <"+(+Ut+1)+".0.0":ft(fr)?ur=">="+Ut+"."+Vn+".0 <"+Ut+"."+(+Vn+1)+".0":Fr?(t("replaceTilde pr",Fr),ur=">="+Ut+"."+Vn+"."+fr+"-"+Fr+" <"+Ut+"."+(+Vn+1)+".0"):ur=">="+Ut+"."+Vn+"."+fr+" <"+Ut+"."+(+Vn+1)+".0",t("tilde return",ur),ur})}(nr,An)}).join(" ")}(At,en),t("tildes",At),At=function(ln,An){return t("replaceXRanges",ln,An),ln.split(/\s+/).map(function(nr){return function(un,Wt){un=un.trim();var vr=Wt.loose?L[C.XRANGELOOSE]:L[C.XRANGE];return un.replace(vr,function(w,Ut,Vn,fr,Fr,ur){t("xRange",un,w,Ut,Vn,fr,Fr,ur);var br=ft(Vn),Kt=br||ft(fr),vu=Kt||ft(Fr),a0=vu;return Ut==="="&&a0&&(Ut=""),ur=Wt.includePrerelease?"-0":"",br?w=Ut===">"||Ut==="<"?"<0.0.0-0":"*":Ut&&a0?(Kt&&(fr=0),Fr=0,Ut===">"?(Ut=">=",Kt?(Vn=+Vn+1,fr=0,Fr=0):(fr=+fr+1,Fr=0)):Ut==="<="&&(Ut="<",Kt?Vn=+Vn+1:fr=+fr+1),w=Ut+Vn+"."+fr+"."+Fr+ur):Kt?w=">="+Vn+".0.0"+ur+" <"+(+Vn+1)+".0.0"+ur:vu&&(w=">="+Vn+"."+fr+".0"+ur+" <"+Vn+"."+(+fr+1)+".0"+ur),t("xRange return",w),w})}(nr,An)}).join(" ")}(At,en),t("xrange",At),At=function(ln,An){return t("replaceStars",ln,An),ln.trim().replace(L[C.STAR],"")}(At,en),t("stars",At),At}(ct,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(je=je.filter(function(ct){return!!ct.match(ue)})),je=je.map(function(ct){return new rt(ct,this.options)},this)},xt.prototype.intersects=function(Q,ae){if(!(Q instanceof xt))throw new TypeError("a Range is required");return this.set.some(function(Ce){return $e(Ce,ae)&&Q.set.some(function(ue){return $e(ue,ae)&&Ce.every(function(je){return ue.every(function(ct){return je.intersects(ct,ae)})})})})},o.toComparators=function(Q,ae){return new xt(Q,ae).set.map(function(Ce){return Ce.map(function(ue){return ue.value}).join(" ").trim().split(" ")})},xt.prototype.test=function(Q){if(!Q)return!1;if(typeof Q=="string")try{Q=new m(Q,this.options)}catch(Ce){return!1}for(var ae=0;ae":ct.prerelease.length===0?ct.patch++:ct.prerelease.push(0),ct.raw=ct.format();case"":case">=":Ce&&!ge(Ce,ct)||(Ce=ct);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+je.operator)}});return Ce&&Q.test(Ce)?Ce:null},o.validRange=function(Q,ae){try{return new xt(Q,ae).range||"*"}catch(Ce){return null}},o.ltr=function(Q,ae,Ce){return at(Q,ae,"<",Ce)},o.gtr=function(Q,ae,Ce){return at(Q,ae,">",Ce)},o.outside=at,o.prerelease=function(Q,ae){var Ce=ne(Q,ae);return Ce&&Ce.prerelease.length?Ce.prerelease:null},o.intersects=function(Q,ae,Ce){return Q=new xt(Q,Ce),ae=new xt(ae,Ce),Q.intersects(ae)},o.coerce=function(Q,ae){if(Q instanceof m)return Q;if(typeof Q=="number"&&(Q=String(Q)),typeof Q!="string")return null;var Ce=null;if((ae=ae||{}).rtl){for(var ue;(ue=L[C.COERCERTL].exec(Q))&&(!Ce||Ce.index+Ce[0].length!==Q.length);)Ce&&ue.index+ue[0].length===Ce.index+Ce[0].length||(Ce=ue),L[C.COERCERTL].lastIndex=ue.index+ue[1].length+ue[2].length;L[C.COERCERTL].lastIndex=-1}else Ce=Q.match(L[C.COERCE]);return Ce===null?null:ne(Ce[2]+"."+(Ce[3]||"0")+"."+(Ce[4]||"0"),ae)}}).call(this,f(5))},function(i,o){function f(E){return(f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(E)}var p;p=function(){return this}();try{p=p||new Function("return this")()}catch(E){(typeof window=="undefined"?"undefined":f(window))==="object"&&(p=window)}i.exports=p},function(i,o){var f,p,E=i.exports={};function t(){throw new Error("setTimeout has not been defined")}function k(){throw new Error("clearTimeout has not been defined")}function L(Se){if(f===setTimeout)return setTimeout(Se,0);if((f===t||!f)&&setTimeout)return f=setTimeout,setTimeout(Se,0);try{return f(Se,0)}catch(he){try{return f.call(null,Se,0)}catch(ge){return f.call(this,Se,0)}}}(function(){try{f=typeof setTimeout=="function"?setTimeout:t}catch(Se){f=t}try{p=typeof clearTimeout=="function"?clearTimeout:k}catch(Se){p=k}})();var N,C=[],U=!1,q=-1;function W(){U&&N&&(U=!1,N.length?C=N.concat(C):q=-1,C.length&&ne())}function ne(){if(!U){var Se=L(W);U=!0;for(var he=C.length;he;){for(N=C,C=[];++q1)for(var ge=1;gethis[k])return Oe(this,this[m].get($e)),!1;var at=this[m].get($e).value;return this[q]&&(this[W]||this[q]($e,at.value)),at.now=jt,at.maxAge=Ke,at.value=ft,this[L]+=$t-at.length,at.length=$t,this.get($e),pe(this),!0}var Q=new le($e,ft,$t,jt,Ke);return Q.length>this[k]?(this[q]&&this[q]($e,ft),!1):(this[L]+=Q.length,this[ne].unshift(Q),this[m].set($e,this[ne].head),pe(this),!0)}},{key:"has",value:function($e){if(!this[m].has($e))return!1;var ft=this[m].get($e).value;return!ze(this,ft)}},{key:"get",value:function($e){return ge(this,$e,!0)}},{key:"peek",value:function($e){return ge(this,$e,!1)}},{key:"pop",value:function(){var $e=this[ne].tail;return $e?(Oe(this,$e),$e.value):null}},{key:"del",value:function($e){Oe(this,this[m].get($e))}},{key:"load",value:function($e){this.reset();for(var ft=Date.now(),Ke=$e.length-1;Ke>=0;Ke--){var jt=$e[Ke],$t=jt.e||0;if($t===0)this.set(jt.k,jt.v);else{var at=$t-ft;at>0&&this.set(jt.k,jt.v,at)}}}},{key:"prune",value:function(){var $e=this;this[m].forEach(function(ft,Ke){return ge($e,Ke,!1)})}},{key:"max",set:function($e){if(typeof $e!="number"||$e<0)throw new TypeError("max must be a non-negative number");this[k]=$e||1/0,pe(this)},get:function(){return this[k]}},{key:"allowStale",set:function($e){this[C]=!!$e},get:function(){return this[C]}},{key:"maxAge",set:function($e){if(typeof $e!="number")throw new TypeError("maxAge must be a non-negative number");this[U]=$e,pe(this)},get:function(){return this[U]}},{key:"lengthCalculator",set:function($e){var ft=this;typeof $e!="function"&&($e=Se),$e!==this[N]&&(this[N]=$e,this[L]=0,this[ne].forEach(function(Ke){Ke.length=ft[N](Ke.value,Ke.key),ft[L]+=Ke.length})),pe(this)},get:function(){return this[N]}},{key:"length",get:function(){return this[L]}},{key:"itemCount",get:function(){return this[ne].length}}])&&E(rt.prototype,wt),xt&&E(rt,xt),Ge}(),ge=function(Ge,rt,wt){var xt=Ge[m].get(rt);if(xt){var $e=xt.value;if(ze(Ge,$e)){if(Oe(Ge,xt),!Ge[C])return}else wt&&(Ge[we]&&(xt.value.now=Date.now()),Ge[ne].unshiftNode(xt));return $e.value}},ze=function(Ge,rt){if(!rt||!rt.maxAge&&!Ge[U])return!1;var wt=Date.now()-rt.now;return rt.maxAge?wt>rt.maxAge:Ge[U]&&wt>Ge[U]},pe=function(Ge){if(Ge[L]>Ge[k])for(var rt=Ge[ne].tail;Ge[L]>Ge[k]&&rt!==null;){var wt=rt.prev;Oe(Ge,rt),rt=wt}},Oe=function(Ge,rt){if(rt){var wt=rt.value;Ge[q]&&Ge[q](wt.key,wt.value),Ge[L]-=wt.length,Ge[m].delete(wt.key),Ge[ne].removeNode(rt)}},le=function Ge(rt,wt,xt,$e,ft){p(this,Ge),this.key=rt,this.value=wt,this.length=xt,this.now=$e,this.maxAge=ft||0},Ue=function(Ge,rt,wt,xt){var $e=wt.value;ze(Ge,$e)&&(Oe(Ge,wt),Ge[C]||($e=void 0)),$e&&rt.call(xt,$e.value,$e.key,Ge)};i.exports=he},function(i,o,f){(function(p){function E(t){return(E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(k){return typeof k}:function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k})(t)}i.exports=function(){if(typeof document=="undefined"||!document.addEventListener)return null;var t,k,L,N={};return N.copy=function(){var C=!1,U=null,q=!1;function W(){C=!1,U=null,q&&window.getSelection().removeAllRanges(),q=!1}return document.addEventListener("copy",function(ne){if(C){for(var m in U)ne.clipboardData.setData(m,U[m]);ne.preventDefault()}}),function(ne){return new Promise(function(m,we){C=!0,typeof ne=="string"?U={"text/plain":ne}:ne instanceof Node?U={"text/html":new XMLSerializer().serializeToString(ne)}:ne instanceof Object?U=ne:we("Invalid data type. Must be string, DOM node, or an object mapping MIME types to strings."),function Se(he){try{if(document.execCommand("copy"))W(),m();else{if(he)throw W(),new Error("Unable to copy. Perhaps it's not available in your browser?");(function(){var ge=document.getSelection();if(!document.queryCommandEnabled("copy")&&ge.isCollapsed){var ze=document.createRange();ze.selectNodeContents(document.body),ge.removeAllRanges(),ge.addRange(ze),q=!0}})(),Se(!0)}}catch(ge){W(),we(ge)}}(!1)})}}(),N.paste=(L=!1,document.addEventListener("paste",function(C){if(L){L=!1,C.preventDefault();var U=t;t=null,U(C.clipboardData.getData(k))}}),function(C){return new Promise(function(U,q){L=!0,t=U,k=C||"text/plain";try{document.execCommand("paste")||(L=!1,q(new Error("Unable to paste. Pasting only works in Internet Explorer at the moment.")))}catch(W){L=!1,q(new Error(W))}})}),typeof ClipboardEvent=="undefined"&&window.clipboardData!==void 0&&window.clipboardData.setData!==void 0&&(function(C){function U(pe,Oe){return function(){pe.apply(Oe,arguments)}}function q(pe){if(E(this)!="object")throw new TypeError("Promises must be constructed via new");if(typeof pe!="function")throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],he(pe,U(ne,this),U(m,this))}function W(pe){var Oe=this;return this._state===null?void this._deferreds.push(pe):void ge(function(){var le=Oe._state?pe.onFulfilled:pe.onRejected;if(le!==null){var Ue;try{Ue=le(Oe._value)}catch(Ge){return void pe.reject(Ge)}pe.resolve(Ue)}else(Oe._state?pe.resolve:pe.reject)(Oe._value)})}function ne(pe){try{if(pe===this)throw new TypeError("A promise cannot be resolved with itself.");if(pe&&(E(pe)=="object"||typeof pe=="function")){var Oe=pe.then;if(typeof Oe=="function")return void he(U(Oe,pe),U(ne,this),U(m,this))}this._state=!0,this._value=pe,we.call(this)}catch(le){m.call(this,le)}}function m(pe){this._state=!1,this._value=pe,we.call(this)}function we(){for(var pe=0,Oe=this._deferreds.length;Oe>pe;pe++)W.call(this,this._deferreds[pe]);this._deferreds=null}function Se(pe,Oe,le,Ue){this.onFulfilled=typeof pe=="function"?pe:null,this.onRejected=typeof Oe=="function"?Oe:null,this.resolve=le,this.reject=Ue}function he(pe,Oe,le){var Ue=!1;try{pe(function(Ge){Ue||(Ue=!0,Oe(Ge))},function(Ge){Ue||(Ue=!0,le(Ge))})}catch(Ge){if(Ue)return;Ue=!0,le(Ge)}}var ge=q.immediateFn||typeof p=="function"&&p||function(pe){setTimeout(pe,1)},ze=Array.isArray||function(pe){return Object.prototype.toString.call(pe)==="[object Array]"};q.prototype.catch=function(pe){return this.then(null,pe)},q.prototype.then=function(pe,Oe){var le=this;return new q(function(Ue,Ge){W.call(le,new Se(pe,Oe,Ue,Ge))})},q.all=function(){var pe=Array.prototype.slice.call(arguments.length===1&&ze(arguments[0])?arguments[0]:arguments);return new q(function(Oe,le){function Ue(wt,xt){try{if(xt&&(E(xt)=="object"||typeof xt=="function")){var $e=xt.then;if(typeof $e=="function")return void $e.call(xt,function(ft){Ue(wt,ft)},le)}pe[wt]=xt,--Ge==0&&Oe(pe)}catch(ft){le(ft)}}if(pe.length===0)return Oe([]);for(var Ge=pe.length,rt=0;rtUe;Ue++)pe[Ue].then(Oe,le)})},i.exports?i.exports=q:C.Promise||(C.Promise=q)}(this),N.copy=function(C){return new Promise(function(U,q){if(typeof C!="string"&&!("text/plain"in C))throw new Error("You must provide a text/plain type.");var W=typeof C=="string"?C:C["text/plain"];window.clipboardData.setData("Text",W)?U():q(new Error("Copying was rejected."))})},N.paste=function(){return new Promise(function(C,U){var q=window.clipboardData.getData("Text");q?C(q):U(new Error("Pasting was rejected."))})}),N}()}).call(this,f(13).setImmediate)},function(i,o,f){"use strict";i.exports=f(15)},function(i,o,f){"use strict";f.r(o),o.default=`:root { - /** - * IMPORTANT: When new theme variables are added below\u2013 also add them to SettingsContext updateThemeVariables() - */ - - /* Light theme */ - --light-color-attribute-name: #ef6632; - --light-color-attribute-name-not-editable: #23272f; - --light-color-attribute-name-inverted: rgba(255, 255, 255, 0.7); - --light-color-attribute-value: #1a1aa6; - --light-color-attribute-value-inverted: #ffffff; - --light-color-attribute-editable-value: #1a1aa6; - --light-color-background: #ffffff; - --light-color-background-hover: rgba(0, 136, 250, 0.1); - --light-color-background-inactive: #e5e5e5; - --light-color-background-invalid: #fff0f0; - --light-color-background-selected: #0088fa; - --light-color-button-background: #ffffff; - --light-color-button-background-focus: #ededed; - --light-color-button: #5f6673; - --light-color-button-disabled: #cfd1d5; - --light-color-button-active: #0088fa; - --light-color-button-focus: #23272f; - --light-color-button-hover: #23272f; - --light-color-border: #eeeeee; - --light-color-commit-did-not-render-fill: #cfd1d5; - --light-color-commit-did-not-render-fill-text: #000000; - --light-color-commit-did-not-render-pattern: #cfd1d5; - --light-color-commit-did-not-render-pattern-text: #333333; - --light-color-commit-gradient-0: #37afa9; - --light-color-commit-gradient-1: #63b19e; - --light-color-commit-gradient-2: #80b393; - --light-color-commit-gradient-3: #97b488; - --light-color-commit-gradient-4: #abb67d; - --light-color-commit-gradient-5: #beb771; - --light-color-commit-gradient-6: #cfb965; - --light-color-commit-gradient-7: #dfba57; - --light-color-commit-gradient-8: #efbb49; - --light-color-commit-gradient-9: #febc38; - --light-color-commit-gradient-text: #000000; - --light-color-component-name: #6a51b2; - --light-color-component-name-inverted: #ffffff; - --light-color-component-badge-background: rgba(0, 0, 0, 0.1); - --light-color-component-badge-background-inverted: rgba(255, 255, 255, 0.25); - --light-color-component-badge-count: #777d88; - --light-color-component-badge-count-inverted: rgba(255, 255, 255, 0.7); - --light-color-context-background: rgba(0,0,0,.9); - --light-color-context-background-hover: rgba(255, 255, 255, 0.1); - --light-color-context-background-selected: #178fb9; - --light-color-context-border: #3d424a; - --light-color-context-text: #ffffff; - --light-color-context-text-selected: #ffffff; - --light-color-dim: #777d88; - --light-color-dimmer: #cfd1d5; - --light-color-dimmest: #eff0f1; - --light-color-error-background: hsl(0, 100%, 97%); - --light-color-error-border: hsl(0, 100%, 92%); - --light-color-error-text: #ff0000; - --light-color-expand-collapse-toggle: #777d88; - --light-color-link: #0000ff; - --light-color-modal-background: rgba(255, 255, 255, 0.75); - --light-color-record-active: #fc3a4b; - --light-color-record-hover: #3578e5; - --light-color-record-inactive: #0088fa; - --light-color-scroll-thumb: #c2c2c2; - --light-color-scroll-track: #fafafa; - --light-color-search-match: yellow; - --light-color-search-match-current: #f7923b; - --light-color-selected-tree-highlight-active: rgba(0, 136, 250, 0.1); - --light-color-selected-tree-highlight-inactive: rgba(0, 0, 0, 0.05); - --light-color-shadow: rgba(0, 0, 0, 0.25); - --light-color-tab-selected-border: #0088fa; - --light-color-text: #000000; - --light-color-text-invalid: #ff0000; - --light-color-text-selected: #ffffff; - --light-color-toggle-background-invalid: #fc3a4b; - --light-color-toggle-background-on: #0088fa; - --light-color-toggle-background-off: #cfd1d5; - --light-color-toggle-text: #ffffff; - --light-color-tooltip-background: rgba(0, 0, 0, 0.9); - --light-color-tooltip-text: #ffffff; - - /* Dark theme */ - --dark-color-attribute-name: #9d87d2; - --dark-color-attribute-name-not-editable: #ededed; - --dark-color-attribute-name-inverted: #282828; - --dark-color-attribute-value: #cedae0; - --dark-color-attribute-value-inverted: #ffffff; - --dark-color-attribute-editable-value: yellow; - --dark-color-background: #282c34; - --dark-color-background-hover: rgba(255, 255, 255, 0.1); - --dark-color-background-inactive: #3d424a; - --dark-color-background-invalid: #5c0000; - --dark-color-background-selected: #178fb9; - --dark-color-button-background: #282c34; - --dark-color-button-background-focus: #3d424a; - --dark-color-button: #afb3b9; - --dark-color-button-active: #61dafb; - --dark-color-button-disabled: #4f5766; - --dark-color-button-focus: #a2e9fc; - --dark-color-button-hover: #ededed; - --dark-color-border: #3d424a; - --dark-color-commit-did-not-render-fill: #777d88; - --dark-color-commit-did-not-render-fill-text: #000000; - --dark-color-commit-did-not-render-pattern: #666c77; - --dark-color-commit-did-not-render-pattern-text: #ffffff; - --dark-color-commit-gradient-0: #37afa9; - --dark-color-commit-gradient-1: #63b19e; - --dark-color-commit-gradient-2: #80b393; - --dark-color-commit-gradient-3: #97b488; - --dark-color-commit-gradient-4: #abb67d; - --dark-color-commit-gradient-5: #beb771; - --dark-color-commit-gradient-6: #cfb965; - --dark-color-commit-gradient-7: #dfba57; - --dark-color-commit-gradient-8: #efbb49; - --dark-color-commit-gradient-9: #febc38; - --dark-color-commit-gradient-text: #000000; - --dark-color-component-name: #61dafb; - --dark-color-component-name-inverted: #282828; - --dark-color-component-badge-background: rgba(255, 255, 255, 0.25); - --dark-color-component-badge-background-inverted: rgba(0, 0, 0, 0.25); - --dark-color-component-badge-count: #8f949d; - --dark-color-component-badge-count-inverted: rgba(255, 255, 255, 0.7); - --dark-color-context-background: rgba(255,255,255,.9); - --dark-color-context-background-hover: rgba(0, 136, 250, 0.1); - --dark-color-context-background-selected: #0088fa; - --dark-color-context-border: #eeeeee; - --dark-color-context-text: #000000; - --dark-color-context-text-selected: #ffffff; - --dark-color-dim: #8f949d; - --dark-color-dimmer: #777d88; - --dark-color-dimmest: #4f5766; - --dark-color-error-background: #200; - --dark-color-error-border: #900; - --dark-color-error-text: #f55; - --dark-color-expand-collapse-toggle: #8f949d; - --dark-color-link: #61dafb; - --dark-color-modal-background: rgba(0, 0, 0, 0.75); - --dark-color-record-active: #fc3a4b; - --dark-color-record-hover: #a2e9fc; - --dark-color-record-inactive: #61dafb; - --dark-color-scroll-thumb: #afb3b9; - --dark-color-scroll-track: #313640; - --dark-color-search-match: yellow; - --dark-color-search-match-current: #f7923b; - --dark-color-selected-tree-highlight-active: rgba(23, 143, 185, 0.15); - --dark-color-selected-tree-highlight-inactive: rgba(255, 255, 255, 0.05); - --dark-color-shadow: rgba(0, 0, 0, 0.5); - --dark-color-tab-selected-border: #178fb9; - --dark-color-text: #ffffff; - --dark-color-text-invalid: #ff8080; - --dark-color-text-selected: #ffffff; - --dark-color-toggle-background-invalid: #fc3a4b; - --dark-color-toggle-background-on: #178fb9; - --dark-color-toggle-background-off: #777d88; - --dark-color-toggle-text: #ffffff; - --dark-color-tooltip-background: rgba(255, 255, 255, 0.9); - --dark-color-tooltip-text: #000000; - - /* Font smoothing */ - --light-font-smoothing: auto; - --dark-font-smoothing: antialiased; - --font-smoothing: auto; - - /* Compact density */ - --compact-font-size-monospace-small: 9px; - --compact-font-size-monospace-normal: 11px; - --compact-font-size-monospace-large: 15px; - --compact-font-size-sans-small: 10px; - --compact-font-size-sans-normal: 12px; - --compact-font-size-sans-large: 14px; - --compact-line-height-data: 18px; - --compact-root-font-size: 16px; - - /* Comfortable density */ - --comfortable-font-size-monospace-small: 10px; - --comfortable-font-size-monospace-normal: 13px; - --comfortable-font-size-monospace-large: 17px; - --comfortable-font-size-sans-small: 12px; - --comfortable-font-size-sans-normal: 14px; - --comfortable-font-size-sans-large: 16px; - --comfortable-line-height-data: 22px; - --comfortable-root-font-size: 20px; - - /* GitHub.com system fonts */ - --font-family-monospace: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, - Courier, monospace; - --font-family-sans: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, - Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; - - /* Constant values shared between JS and CSS */ - --interaction-commit-size: 10px; - --interaction-label-width: 200px; -} -`},function(i,o,f){"use strict";function p(N){var C=this;if(C instanceof p||(C=new p),C.tail=null,C.head=null,C.length=0,N&&typeof N.forEach=="function")N.forEach(function(W){C.push(W)});else if(arguments.length>0)for(var U=0,q=arguments.length;U1)U=C;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");q=this.head.next,U=this.head.value}for(var W=0;q!==null;W++)U=N(U,q.value,W),q=q.next;return U},p.prototype.reduceReverse=function(N,C){var U,q=this.tail;if(arguments.length>1)U=C;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");q=this.tail.prev,U=this.tail.value}for(var W=this.length-1;q!==null;W--)U=N(U,q.value,W),q=q.prev;return U},p.prototype.toArray=function(){for(var N=new Array(this.length),C=0,U=this.head;U!==null;C++)N[C]=U.value,U=U.next;return N},p.prototype.toArrayReverse=function(){for(var N=new Array(this.length),C=0,U=this.tail;U!==null;C++)N[C]=U.value,U=U.prev;return N},p.prototype.slice=function(N,C){(C=C||this.length)<0&&(C+=this.length),(N=N||0)<0&&(N+=this.length);var U=new p;if(Cthis.length&&(C=this.length);for(var q=0,W=this.head;W!==null&&qthis.length&&(C=this.length);for(var q=this.length,W=this.tail;W!==null&&q>C;q--)W=W.prev;for(;W!==null&&q>N;q--,W=W.prev)U.push(W.value);return U},p.prototype.splice=function(N,C){N>this.length&&(N=this.length-1),N<0&&(N=this.length+N);for(var U=0,q=this.head;q!==null&&U=0&&(L._idleTimeoutId=setTimeout(function(){L._onTimeout&&L._onTimeout()},N))},f(14),o.setImmediate=typeof self!="undefined"&&self.setImmediate||p!==void 0&&p.setImmediate||this&&this.setImmediate,o.clearImmediate=typeof self!="undefined"&&self.clearImmediate||p!==void 0&&p.clearImmediate||this&&this.clearImmediate}).call(this,f(4))},function(i,o,f){(function(p,E){(function(t,k){"use strict";if(!t.setImmediate){var L,N,C,U,q,W=1,ne={},m=!1,we=t.document,Se=Object.getPrototypeOf&&Object.getPrototypeOf(t);Se=Se&&Se.setTimeout?Se:t,{}.toString.call(t.process)==="[object process]"?L=function(ze){E.nextTick(function(){ge(ze)})}:function(){if(t.postMessage&&!t.importScripts){var ze=!0,pe=t.onmessage;return t.onmessage=function(){ze=!1},t.postMessage("","*"),t.onmessage=pe,ze}}()?(U="setImmediate$"+Math.random()+"$",q=function(ze){ze.source===t&&typeof ze.data=="string"&&ze.data.indexOf(U)===0&&ge(+ze.data.slice(U.length))},t.addEventListener?t.addEventListener("message",q,!1):t.attachEvent("onmessage",q),L=function(ze){t.postMessage(U+ze,"*")}):t.MessageChannel?((C=new MessageChannel).port1.onmessage=function(ze){ge(ze.data)},L=function(ze){C.port2.postMessage(ze)}):we&&"onreadystatechange"in we.createElement("script")?(N=we.documentElement,L=function(ze){var pe=we.createElement("script");pe.onreadystatechange=function(){ge(ze),pe.onreadystatechange=null,N.removeChild(pe),pe=null},N.appendChild(pe)}):L=function(ze){setTimeout(ge,0,ze)},Se.setImmediate=function(ze){typeof ze!="function"&&(ze=new Function(""+ze));for(var pe=new Array(arguments.length-1),Oe=0;Oeae;ae++)if((Q=he(at,jt,ae))!==-1){Se=ae,jt=Q;break e}jt=-1}}e:{if(at=$t,(Q=W().get(Ke.primitive))!==void 0){for(ae=0;aejt-at?null:$t.slice(at,jt-1))!==null){if(jt=0,rt!==null){for(;jt<$t.length&&jtjt;rt--)wt=$e.pop()}for(rt=$t.length-jt-1;1<=rt;rt--)jt=[],wt.push({id:null,isStateEditable:!1,name:ze($t[rt-1].functionName),value:void 0,subHooks:jt}),$e.push(wt),wt=jt;rt=$t}jt=($t=Ke.primitive)==="Context"||$t==="DebugValue"?null:xt++,wt.push({id:jt,isStateEditable:$t==="Reducer"||$t==="State",name:$t,value:Ke.value,subHooks:[]})}return function Ce(ue,je){for(var ct=[],At=0;At-1&&(ne=ne.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var m=ne.replace(/^\s+/,"").replace(/\(eval code/g,"("),we=m.match(/ (\((.+):(\d+):(\d+)\)$)/),Se=(m=we?m.replace(we[0],""):m).split(/\s+/).slice(1),he=this.extractLocation(we?we[1]:Se.pop()),ge=Se.join(" ")||void 0,ze=["eval",""].indexOf(he[0])>-1?void 0:he[0];return new N({functionName:ge,fileName:ze,lineNumber:he[1],columnNumber:he[2],source:ne})},this)},parseFFOrSafari:function(W){return W.stack.split(` -`).filter(function(ne){return!ne.match(q)},this).map(function(ne){if(ne.indexOf(" > eval")>-1&&(ne=ne.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),ne.indexOf("@")===-1&&ne.indexOf(":")===-1)return new N({functionName:ne});var m=/((.*".+"[^@]*)?[^@]*)(?:@)/,we=ne.match(m),Se=we&&we[1]?we[1]:void 0,he=this.extractLocation(ne.replace(m,""));return new N({functionName:Se,fileName:he[0],lineNumber:he[1],columnNumber:he[2],source:ne})},this)},parseOpera:function(W){return!W.stacktrace||W.message.indexOf(` -`)>-1&&W.message.split(` -`).length>W.stacktrace.split(` -`).length?this.parseOpera9(W):W.stack?this.parseOpera11(W):this.parseOpera10(W)},parseOpera9:function(W){for(var ne=/Line (\d+).*script (?:in )?(\S+)/i,m=W.message.split(` -`),we=[],Se=2,he=m.length;Se/,"$2").replace(/\([^)]*\)/g,"")||void 0;he.match(/\(([^)]*)\)/)&&(m=he.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var ze=m===void 0||m==="[arguments not available]"?void 0:m.split(",");return new N({functionName:ge,args:ze,fileName:Se[0],lineNumber:Se[1],columnNumber:Se[2],source:ne})},this)}}})=="function"?p.apply(o,E):p)===void 0||(i.exports=t)})()},function(i,o,f){var p,E,t;(function(k,L){"use strict";E=[],(t=typeof(p=function(){function N(ge){return ge.charAt(0).toUpperCase()+ge.substring(1)}function C(ge){return function(){return this[ge]}}var U=["isConstructor","isEval","isNative","isToplevel"],q=["columnNumber","lineNumber"],W=["fileName","functionName","source"],ne=U.concat(q,W,["args"]);function m(ge){if(ge)for(var ze=0;ze1?xe-1:0),ke=1;ke=0&&xe.splice(Z,1)}}}])&&p(z.prototype,G),$&&p(z,$),B}(),t=f(2),k=f.n(t);try{var L=f(9).default,N=function(B){var z=new RegExp("".concat(B,": ([0-9]+)")),G=L.match(z);return parseInt(G[1],10)};N("comfortable-line-height-data"),N("compact-line-height-data")}catch(B){}function C(B){try{return sessionStorage.getItem(B)}catch(z){return null}}function U(B){try{sessionStorage.removeItem(B)}catch(z){}}function q(B,z){try{return sessionStorage.setItem(B,z)}catch(G){}}var W=function(B,z){return B===z},ne=f(1),m=f.n(ne);function we(B){return B.ownerDocument?B.ownerDocument.defaultView:null}function Se(B){var z=we(B);return z?z.frameElement:null}function he(B){var z=pe(B);return ge([B.getBoundingClientRect(),{top:z.borderTop,left:z.borderLeft,bottom:z.borderBottom,right:z.borderRight,width:0,height:0}])}function ge(B){return B.reduce(function(z,G){return z==null?G:{top:z.top+G.top,left:z.left+G.left,width:z.width,height:z.height,bottom:z.bottom+G.bottom,right:z.right+G.right}})}function ze(B,z){var G=Se(B);if(G&&G!==z){for(var $=[B.getBoundingClientRect()],De=G,me=!1;De;){var xe=he(De);if($.push(xe),De=Se(De),me)break;De&&we(De)===z&&(me=!0)}return ge($)}return B.getBoundingClientRect()}function pe(B){var z=window.getComputedStyle(B);return{borderLeft:parseInt(z.borderLeftWidth,10),borderRight:parseInt(z.borderRightWidth,10),borderTop:parseInt(z.borderTopWidth,10),borderBottom:parseInt(z.borderBottomWidth,10),marginLeft:parseInt(z.marginLeft,10),marginRight:parseInt(z.marginRight,10),marginTop:parseInt(z.marginTop,10),marginBottom:parseInt(z.marginBottom,10),paddingLeft:parseInt(z.paddingLeft,10),paddingRight:parseInt(z.paddingRight,10),paddingTop:parseInt(z.paddingTop,10),paddingBottom:parseInt(z.paddingBottom,10)}}function Oe(B,z){var G;if(typeof Symbol=="undefined"||B[Symbol.iterator]==null){if(Array.isArray(B)||(G=function(ke,Xe){if(!!ke){if(typeof ke=="string")return le(ke,Xe);var ht=Object.prototype.toString.call(ke).slice(8,-1);if(ht==="Object"&&ke.constructor&&(ht=ke.constructor.name),ht==="Map"||ht==="Set")return Array.from(ke);if(ht==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ht))return le(ke,Xe)}}(B))||z&&B&&typeof B.length=="number"){G&&(B=G);var $=0,De=function(){};return{s:De,n:function(){return $>=B.length?{done:!0}:{done:!1,value:B[$++]}},e:function(ke){throw ke},f:De}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var me,xe=!0,Z=!1;return{s:function(){G=B[Symbol.iterator]()},n:function(){var ke=G.next();return xe=ke.done,ke},e:function(ke){Z=!0,me=ke},f:function(){try{xe||G.return==null||G.return()}finally{if(Z)throw me}}}}function le(B,z){(z==null||z>B.length)&&(z=B.length);for(var G=0,$=new Array(z);Gxe.left+xe.width&&(ie=xe.left+xe.width-ht-5),{style:{top:ke+="px",left:ie+="px"}}}(z,G,{width:$.width,height:$.height});m()(this.tip.style,De.style)}}]),B}(),$e=function(){function B(){Ue(this,B);var z=window.__REACT_DEVTOOLS_TARGET_WINDOW__||window;this.window=z;var G=window.__REACT_DEVTOOLS_TARGET_WINDOW__||window;this.tipBoundsWindow=G;var $=z.document;this.container=$.createElement("div"),this.container.style.zIndex="10000000",this.tip=new xt($,this.container),this.rects=[],$.body.appendChild(this.container)}return rt(B,[{key:"remove",value:function(){this.tip.remove(),this.rects.forEach(function(z){z.remove()}),this.rects.length=0,this.container.parentNode&&this.container.parentNode.removeChild(this.container)}},{key:"inspect",value:function(z,G){for(var $=this,De=z.filter(function(Tt){return Tt.nodeType===Node.ELEMENT_NODE});this.rects.length>De.length;)this.rects.pop().remove();if(De.length!==0){for(;this.rects.length1&&arguments[1]!==void 0?arguments[1]:W,tt=void 0,Tt=[],kt=void 0,bt=!1,on=function(Lt,gn){return qe(Lt,Tt[gn])},tn=function(){for(var Lt=arguments.length,gn=Array(Lt),lr=0;lr5&&arguments[5]!==void 0?arguments[5]:0,Z=Co(B);switch(Z){case"html_element":return z.push($),{inspectable:!1,preview_short:Si(B,!1),preview_long:Si(B,!0),name:B.tagName,type:Z};case"function":return z.push($),{inspectable:!1,preview_short:Si(B,!1),preview_long:Si(B,!0),name:typeof B.name!="function"&&B.name?B.name:"function",type:Z};case"string":return B.length<=500?B:B.slice(0,500)+"...";case"bigint":case"symbol":return z.push($),{inspectable:!1,preview_short:Si(B,!1),preview_long:Si(B,!0),name:B.toString(),type:Z};case"react_element":return z.push($),{inspectable:!1,preview_short:Si(B,!1),preview_long:Si(B,!0),name:L0(B)||"Unknown",type:Z};case"array_buffer":case"data_view":return z.push($),{inspectable:!1,preview_short:Si(B,!1),preview_long:Si(B,!0),name:Z==="data_view"?"DataView":"ArrayBuffer",size:B.byteLength,type:Z};case"array":return me=De($),xe>=2&&!me?a0(Z,!0,B,z,$):B.map(function(ht,ie){return So(ht,z,G,$.concat([ie]),De,me?1:xe+1)});case"html_all_collection":case"typed_array":case"iterator":if(me=De($),xe>=2&&!me)return a0(Z,!0,B,z,$);var ke={unserializable:!0,type:Z,readonly:!0,size:Z==="typed_array"?B.length:void 0,preview_short:Si(B,!1),preview_long:Si(B,!0),name:B.constructor&&B.constructor.name!=="Object"?B.constructor.name:""};return Kt(B[Symbol.iterator])&&Array.from(B).forEach(function(ht,ie){return ke[ie]=So(ht,z,G,$.concat([ie]),De,me?1:xe+1)}),G.push($),ke;case"opaque_iterator":return z.push($),{inspectable:!1,preview_short:Si(B,!1),preview_long:Si(B,!0),name:B[Symbol.toStringTag],type:Z};case"date":case"regexp":return z.push($),{inspectable:!1,preview_short:Si(B,!1),preview_long:Si(B,!0),name:B.toString(),type:Z};case"object":if(me=De($),xe>=2&&!me)return a0(Z,!0,B,z,$);var Xe={};return eu(B).forEach(function(ht){var ie=ht.toString();Xe[ie]=So(B[ht],z,G,$.concat([ie]),De,me?1:xe+1)}),Xe;case"infinity":case"nan":case"undefined":return z.push($),{type:Z};default:return B}}function Go(B){return(Go=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(B)}function Os(B){return function(z){if(Array.isArray(z))return Yo(z)}(B)||function(z){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(z))return Array.from(z)}(B)||function(z,G){if(!!z){if(typeof z=="string")return Yo(z,G);var $=Object.prototype.toString.call(z).slice(8,-1);if($==="Object"&&z.constructor&&($=z.constructor.name),$==="Map"||$==="Set")return Array.from(z);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return Yo(z,G)}}(B)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Yo(B,z){(z==null||z>B.length)&&(z=B.length);for(var G=0,$=new Array(z);Gz.toString()?1:z.toString()>B.toString()?-1:0}function eu(B){for(var z=[],G=B,$=function(){var De=[].concat(Os(Object.keys(G)),Os(Object.getOwnPropertySymbols(G))),me=Object.getOwnPropertyDescriptors(G);De.forEach(function(xe){me[xe].enumerable&&z.push(xe)}),G=Object.getPrototypeOf(G)};G!=null;)$();return z}function ai(B){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Anonymous",G=Ko.get(B);if(G!=null)return G;var $=z;return typeof B.displayName=="string"?$=B.displayName:typeof B.name=="string"&&B.name!==""&&($=B.name),Ko.set(B,$),$}var mr=0;function Xo(){return++mr}function W0(B){var z=qt.get(B);if(z!==void 0)return z;for(var G=new Array(B.length),$=0;$1&&arguments[1]!==void 0?arguments[1]:50;return B.length>z?B.substr(0,z)+"\u2026":B}function Si(B,z){if(B!=null&&hasOwnProperty.call(B,vu.type))return z?B[vu.preview_long]:B[vu.preview_short];switch(Co(B)){case"html_element":return"<".concat(tu(B.tagName.toLowerCase())," />");case"function":return tu("\u0192 ".concat(typeof B.name=="function"?"":B.name,"() {}"));case"string":return'"'.concat(B,'"');case"bigint":return tu(B.toString()+"n");case"regexp":case"symbol":return tu(B.toString());case"react_element":return"<".concat(tu(L0(B)||"Unknown")," />");case"array_buffer":return"ArrayBuffer(".concat(B.byteLength,")");case"data_view":return"DataView(".concat(B.buffer.byteLength,")");case"array":if(z){for(var G="",$=0;$0&&(G+=", "),!((G+=Si(B[$],!1)).length>50));$++);return"[".concat(tu(G),"]")}var De=hasOwnProperty.call(B,vu.size)?B[vu.size]:B.length;return"Array(".concat(De,")");case"typed_array":var me="".concat(B.constructor.name,"(").concat(B.length,")");if(z){for(var xe="",Z=0;Z0&&(xe+=", "),!((xe+=B[Z]).length>50));Z++);return"".concat(me," [").concat(tu(xe),"]")}return me;case"iterator":var ke=B.constructor.name;if(z){for(var Xe=Array.from(B),ht="",ie=0;ie0&&(ht+=", "),Array.isArray(qe)){var tt=Si(qe[0],!0),Tt=Si(qe[1],!1);ht+="".concat(tt," => ").concat(Tt)}else ht+=Si(qe,!1);if(ht.length>50)break}return"".concat(ke,"(").concat(B.size,") {").concat(tu(ht),"}")}return"".concat(ke,"(").concat(B.size,")");case"opaque_iterator":return B[Symbol.toStringTag];case"date":return B.toString();case"object":if(z){for(var kt=eu(B).sort(_i),bt="",on=0;on0&&(bt+=", "),(bt+="".concat(tn.toString(),": ").concat(Si(B[tn],!1))).length>50)break}return"{".concat(tu(bt),"}")}return"{\u2026}";case"boolean":case"number":case"infinity":case"nan":case"null":case"undefined":return B;default:try{return tu(""+B)}catch(Lt){return"unserializable"}}}var ks=f(7);function Hl(B){return(Hl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(B)}function F0(B,z){var G=Object.keys(B);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(B);z&&($=$.filter(function(De){return Object.getOwnPropertyDescriptor(B,De).enumerable})),G.push.apply(G,$)}return G}function f0(B){for(var z=1;z2&&arguments[2]!==void 0?arguments[2]:[];if(B!==null){var $=[],De=[],me=So(B,$,De,G,z);return{data:me,cleaned:$,unserializable:De}}return null}function G0(B){var z,G,$=(z=B,G=new Set,JSON.stringify(z,function(xe,Z){if(Hl(Z)==="object"&&Z!==null){if(G.has(Z))return;G.add(Z)}return typeof Z=="bigint"?Z.toString()+"n":Z})),De=$===void 0?"undefined":$,me=window.__REACT_DEVTOOLS_GLOBAL_HOOK__.clipboardCopyText;typeof me=="function"?me(De).catch(function(xe){}):Object(ks.copy)(De)}function fi(B,z){var G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,$=z[G],De=Array.isArray(B)?B.slice():f0({},B);return G+1===z.length?Array.isArray(De)?De.splice($,1):delete De[$]:De[$]=fi(B[$],z,G+1),De}function Zt(B,z,G){var $=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,De=z[$],me=Array.isArray(B)?B.slice():f0({},B);if($+1===z.length){var xe=G[$];me[xe]=me[De],Array.isArray(me)?me.splice(De,1):delete me[De]}else me[De]=Zt(B[De],z,G,$+1);return me}function Ln(B,z,G){var $=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;if($>=z.length)return G;var De=z[$],me=Array.isArray(B)?B.slice():f0({},B);return me[De]=Ln(B[De],z,G,$+1),me}var Di=f(8);function ci(B,z){var G=Object.keys(B);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(B);z&&($=$.filter(function(De){return Object.getOwnPropertyDescriptor(B,De).enumerable})),G.push.apply(G,$)}return G}function Ht(B){for(var z=1;z=B.length?{done:!0}:{done:!1,value:B[$++]}},e:function(ke){throw ke},f:De}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var me,xe=!0,Z=!1;return{s:function(){G=B[Symbol.iterator]()},n:function(){var ke=G.next();return xe=ke.done,ke},e:function(ke){Z=!0,me=ke},f:function(){try{xe||G.return==null||G.return()}finally{if(Z)throw me}}}}function Wl(B,z){if(B){if(typeof B=="string")return xo(B,z);var G=Object.prototype.toString.call(B).slice(8,-1);return G==="Object"&&B.constructor&&(G=B.constructor.name),G==="Map"||G==="Set"?Array.from(B):G==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(G)?xo(B,z):void 0}}function xo(B,z){(z==null||z>B.length)&&(z=B.length);for(var G=0,$=new Array(z);G0){var vt=me(se);if(vt!=null){var Xt,xn=Ui(Mo);try{for(xn.s();!(Xt=xn.n()).done;)if(Xt.value.test(vt))return!0}catch(er){xn.e(er)}finally{xn.f()}}}if(re!=null&&ds.size>0){var _n,yn=re.fileName,En=Ui(ds);try{for(En.s();!(_n=En.n()).done;)if(_n.value.test(yn))return!0}catch(er){En.e(er)}finally{En.f()}}return!1}function yu(se){var re=se.type;switch(se.tag){case Tt:case _r:return 1;case tt:case Cn:return 5;case tn:return 6;case Lt:return 11;case lr:return 7;case gn:case Qn:case on:return 9;case Ar:case Rr:return 8;case nt:return 12;case _t:return 13;default:switch(xe(re)){case 60111:case"Symbol(react.concurrent_mode)":case"Symbol(react.async_mode)":return 9;case 60109:case"Symbol(react.provider)":return 2;case 60110:case"Symbol(react.context)":return 2;case 60108:case"Symbol(react.strict_mode)":return 9;case 60114:case"Symbol(react.profiler)":return 10;default:return 9}}}function pi(se){if(Fo.has(se))return se;var re=se.alternate;return re!=null&&Fo.has(re)?re:(Fo.add(se),se)}window.__REACT_DEVTOOLS_COMPONENT_FILTERS__!=null?ps(window.__REACT_DEVTOOLS_COMPONENT_FILTERS__):ps([{type:1,value:7,isEnabled:!0}]);var T0=new Map,Q0=new Map,Fo=new Set,ta=new Map,Kl=new Map,Ki=-1;function Yr(se){if(!T0.has(se)){var re=Xo();T0.set(se,re),Q0.set(re,se)}return T0.get(se)}function fo(se){switch(yu(se)){case 1:if(I0!==null){var re=Yr(pi(se)),Le=gi(se);Le!==null&&I0.set(re,Le)}}}var Oi={};function gi(se){switch(yu(se)){case 1:var re=se.stateNode,Le=Oi,Ae=Oi;return re!=null&&(re.constructor&&re.constructor.contextType!=null?Ae=re.context:(Le=re.context)&&Object.keys(Le).length===0&&(Le=Oi)),[Le,Ae];default:return null}}function ff(se){switch(yu(se)){case 1:if(I0!==null){var re=Yr(pi(se)),Le=I0.has(re)?I0.get(re):null,Ae=gi(se);if(Le==null||Ae==null)return null;var ot=Y0(Le,2),vt=ot[0],Xt=ot[1],xn=Y0(Ae,2),_n=xn[0],yn=xn[1];if(_n!==Oi)return J0(vt,_n);if(yn!==Oi)return Xt!==yn}}return null}function cf(se,re){if(se==null||re==null)return!1;if(re.hasOwnProperty("baseState")&&re.hasOwnProperty("memoizedState")&&re.hasOwnProperty("next")&&re.hasOwnProperty("queue"))for(;re!==null;){if(re.memoizedState!==se.memoizedState)return!0;re=re.next,se=se.next}return!1}function J0(se,re){if(se==null||re==null||re.hasOwnProperty("baseState")&&re.hasOwnProperty("memoizedState")&&re.hasOwnProperty("next")&&re.hasOwnProperty("queue"))return null;var Le,Ae=[],ot=Ui(new Set([].concat(Yi(Object.keys(se)),Yi(Object.keys(re)))));try{for(ot.s();!(Le=ot.n()).done;){var vt=Le.value;se[vt]!==re[vt]&&Ae.push(vt)}}catch(Xt){ot.e(Xt)}finally{ot.f()}return Ae}function Z0(se,re){switch(re.tag){case Tt:case tt:case kt:case Ar:case Rr:return(oo(re)&ie)===ie;default:return se.memoizedProps!==re.memoizedProps||se.memoizedState!==re.memoizedState||se.ref!==re.ref}}var Te=[],et=[],Ve=[],Gt=[],Yt=new Map,sr=0,Br=null;function wn(se){Te.push(se)}function fu(se){if(Te.length!==0||et.length!==0||Ve.length!==0||Br!==null||Ru){var re=et.length+Ve.length+(Br===null?0:1),Le=new Array(3+sr+(re>0?2+re:0)+Te.length),Ae=0;if(Le[Ae++]=z,Le[Ae++]=Ki,Le[Ae++]=sr,Yt.forEach(function(xn,_n){Le[Ae++]=_n.length;for(var yn=W0(_n),En=0;En0){Le[Ae++]=2,Le[Ae++]=re;for(var ot=et.length-1;ot>=0;ot--)Le[Ae++]=et[ot];for(var vt=0;vt0?se.forEach(function(re){B.emit("operations",re)}):(wr!==null&&(ru=!0),B.getFiberRoots(z).forEach(function(re){Xu(Ki=Yr(pi(re.current)),re.current),Ru&&re.memoizedInteractions!=null&&($o={changeDescriptions:Xl?new Map:null,durations:[],commitTime:Vl()-Yu,interactions:Array.from(re.memoizedInteractions).map(function(Le){return Ht(Ht({},Le),{},{timestamp:Le.timestamp-Yu})}),maxActualDuration:0,priorityLevel:null}),Vr(re.current,null,!1,!1),fu(),Ki=-1}))},getBestMatchForTrackedPath:function(){if(wr===null||$0===null)return null;for(var se=$0;se!==null&&Vu(se);)se=se.return;return se===null?null:{id:Yr(pi(se)),isFullMatch:Xi===wr.length-1}},getDisplayNameForFiberID:function(se){var re=Q0.get(se);return re!=null?me(re):null},getFiberIDForNative:function(se){var re=arguments.length>1&&arguments[1]!==void 0&&arguments[1],Le=G.findFiberByHostInstance(se);if(Le!=null){if(re)for(;Le!==null&&Vu(Le);)Le=Le.return;return Yr(pi(Le))}return null},getInstanceAndStyle:function(se){var re=null,Le=null,Ae=Uu(se);return Ae!==null&&(re=Ae.stateNode,Ae.memoizedProps!==null&&(Le=Ae.memoizedProps.style)),{instance:re,style:Le}},getOwnersList:function(se){var re=Uu(se);if(re==null)return null;var Le=re._debugOwner,Ae=[{displayName:me(re)||"Anonymous",id:se,type:yu(re)}];if(Le)for(var ot=Le;ot!==null;)Ae.unshift({displayName:me(ot)||"Anonymous",id:Yr(pi(ot)),type:yu(ot)}),ot=ot._debugOwner||null;return Ae},getPathForElement:function(se){var re=Q0.get(se);if(re==null)return null;for(var Le=[];re!==null;)Le.push(y0(re)),re=re.return;return Le.reverse(),Le},getProfilingData:function(){var se=[];if(hs===null)throw Error("getProfilingData() called before any profiling data was recorded");return hs.forEach(function(re,Le){var Ae=[],ot=[],vt=new Map,Xt=new Map,xn=El!==null&&El.get(Le)||"Unknown";R0!=null&&R0.forEach(function(_n,yn){co!=null&&co.get(yn)===Le&&ot.push([yn,_n])}),re.forEach(function(_n,yn){var En=_n.changeDescriptions,er=_n.durations,It=_n.interactions,xi=_n.maxActualDuration,Sr=_n.priorityLevel,cr=_n.commitTime,Y=[];It.forEach(function(hi){vt.has(hi.id)||vt.set(hi.id,hi),Y.push(hi.id);var Qi=Xt.get(hi.id);Qi!=null?Qi.push(yn):Xt.set(hi.id,[yn])});for(var Qr=[],Jr=[],Ur=0;Ur1?Wn.set(En,er-1):Wn.delete(En),Xr.delete(_n)}(Ki),Kr(Le,!1))}else Xu(Ki,Le),Vr(Le,null,!1,!1);if(Ru&&ot){var xn=hs.get(Ki);xn!=null?xn.push($o):hs.set(Ki,[$o])}fu(),No&&B.emit("traceUpdates",Lo),Ki=-1},handleCommitFiberUnmount:function(se){Kr(se,!1)},inspectElement:function(se,re){if(Li(se)){if(re!=null){A0(re);var Le=null;return re[0]==="hooks"&&(Le="hooks"),{id:se,type:"hydrated-path",path:re,value:Ei(Lu(zi,re),Fi(null,Le),re)}}return{id:se,type:"no-change"}}if(Is=!1,zi!==null&&zi.id===se||(x0={}),(zi=na(se))===null)return{id:se,type:"not-found"};re!=null&&A0(re),function(ot){var vt=ot.hooks,Xt=ot.id,xn=ot.props,_n=Q0.get(Xt);if(_n!=null){var yn=_n.elementType,En=_n.stateNode,er=_n.tag,It=_n.type;switch(er){case Tt:case _r:case Cn:$.$r=En;break;case tt:$.$r={hooks:vt,props:xn,type:It};break;case tn:$.$r={props:xn,type:It.render};break;case Ar:case Rr:$.$r={props:xn,type:yn!=null&&yn.type!=null?yn.type:It};break;default:$.$r=null}}else console.warn('Could not find Fiber with id "'.concat(Xt,'"'))}(zi);var Ae=Ht({},zi);return Ae.context=Ei(Ae.context,Fi("context",null)),Ae.hooks=Ei(Ae.hooks,Fi("hooks","hooks")),Ae.props=Ei(Ae.props,Fi("props",null)),Ae.state=Ei(Ae.state,Fi("state",null)),{id:se,type:"full-data",value:Ae}},logElementToConsole:function(se){var re=Li(se)?zi:na(se);if(re!==null){var Le=typeof console.groupCollapsed=="function";Le&&console.groupCollapsed("[Click to expand] %c<".concat(re.displayName||"Component"," />"),"color: var(--dom-tag-name-color); font-weight: normal;"),re.props!==null&&console.log("Props:",re.props),re.state!==null&&console.log("State:",re.state),re.hooks!==null&&console.log("Hooks:",re.hooks);var Ae=_l(se);Ae!==null&&console.log("Nodes:",Ae),re.source!==null&&console.log("Location:",re.source),(window.chrome||/firefox/i.test(navigator.userAgent))&&console.log("Right-click any value to save it as a global variable for further inspection."),Le&&console.groupEnd()}else console.warn('Could not find Fiber with id "'.concat(se,'"'))},prepareViewAttributeSource:function(se,re){Li(se)&&(window.$attribute=Lu(zi,re))},prepareViewElementSource:function(se){var re=Q0.get(se);if(re!=null){var Le=re.elementType,Ae=re.tag,ot=re.type;switch(Ae){case Tt:case _r:case Cn:case tt:$.$type=ot;break;case tn:$.$type=ot.render;break;case Ar:case Rr:$.$type=Le!=null&&Le.type!=null?Le.type:ot;break;default:$.$type=null}}else console.warn('Could not find Fiber with id "'.concat(se,'"'))},overrideSuspense:function(se,re){if(typeof ko!="function"||typeof Zo!="function")throw new Error("Expected overrideSuspense() to not get called for earlier React versions.");re?(Ku.add(se),Ku.size===1&&ko(vs)):(Ku.delete(se),Ku.size===0&&ko(df));var Le=Q0.get(se);Le!=null&&Zo(Le)},overrideValueAtPath:function(se,re,Le,Ae,ot){var vt=Uu(re);if(vt!==null){var Xt=vt.stateNode;switch(se){case"context":switch(Ae=Ae.slice(1),vt.tag){case Tt:Ae.length===0?Xt.context=ot:To(Xt.context,Ae,ot),Xt.forceUpdate()}break;case"hooks":typeof nu=="function"&&nu(vt,Le,Ae,ot);break;case"props":switch(vt.tag){case Tt:vt.pendingProps=Ln(Xt.props,Ae,ot),Xt.forceUpdate();break;default:typeof X0=="function"&&X0(vt,Ae,ot)}break;case"state":switch(vt.tag){case Tt:To(Xt.state,Ae,ot),Xt.forceUpdate()}}}},renamePath:function(se,re,Le,Ae,ot){var vt=Uu(re);if(vt!==null){var Xt=vt.stateNode;switch(se){case"context":switch(Ae=Ae.slice(1),ot=ot.slice(1),vt.tag){case Tt:Ae.length===0||Hr(Xt.context,Ae,ot),Xt.forceUpdate()}break;case"hooks":typeof S0=="function"&&S0(vt,Le,Ae,ot);break;case"props":Xt===null?typeof di=="function"&&di(vt,Ae,ot):(vt.pendingProps=Zt(Xt.props,Ae,ot),Xt.forceUpdate());break;case"state":Hr(Xt.state,Ae,ot),Xt.forceUpdate()}}},renderer:G,setTraceUpdatesEnabled:function(se){No=se},setTrackedPath:Ci,startProfiling:ra,stopProfiling:function(){Ru=!1,Xl=!1},storeAsGlobal:function(se,re,Le){if(Li(se)){var Ae=Lu(zi,re),ot="$reactTemp".concat(Le);window[ot]=Ae,console.log(ot),console.log(Ae)}},updateComponentFilters:function(se){if(Ru)throw Error("Cannot modify filter preferences while profiling");B.getFiberRoots(z).forEach(function(re){Ki=Yr(pi(re.current)),Bu(re.current),Kr(re.current,!1),Ki=-1}),ps(se),Wn.clear(),B.getFiberRoots(z).forEach(function(re){Xu(Ki=Yr(pi(re.current)),re.current),Vr(re.current,null,!1,!1),fu(re),Ki=-1})}}}var Xn;function Qo(B){return(Qo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(B)}function lo(B,z,G){if(Xn===void 0)try{throw Error()}catch(De){var $=De.stack.trim().match(/\n( *(at )?)/);Xn=$&&$[1]||""}return` -`+Xn+B}var b0=!1;function yl(B,z,G){if(!B||b0)return"";var $,De=Error.prepareStackTrace;Error.prepareStackTrace=void 0,b0=!0;var me=G.current;G.current=null;try{if(z){var xe=function(){throw Error()};if(Object.defineProperty(xe.prototype,"props",{set:function(){throw Error()}}),(typeof Reflect=="undefined"?"undefined":Qo(Reflect))==="object"&&Reflect.construct){try{Reflect.construct(xe,[])}catch(qe){$=qe}Reflect.construct(B,[],xe)}else{try{xe.call()}catch(qe){$=qe}B.call(xe.prototype)}}else{try{throw Error()}catch(qe){$=qe}B()}}catch(qe){if(qe&&$&&typeof qe.stack=="string"){for(var Z=qe.stack.split(` -`),ke=$.stack.split(` -`),Xe=Z.length-1,ht=ke.length-1;Xe>=1&&ht>=0&&Z[Xe]!==ke[ht];)ht--;for(;Xe>=1&&ht>=0;Xe--,ht--)if(Z[Xe]!==ke[ht]){if(Xe!==1||ht!==1)do if(Xe--,--ht<0||Z[Xe]!==ke[ht])return` -`+Z[Xe].replace(" at new "," at ");while(Xe>=1&&ht>=0);break}}}finally{b0=!1,Error.prepareStackTrace=De,G.current=me}var ie=B?B.displayName||B.name:"";return ie?lo(ie):""}function Ro(B,z,G,$){return yl(B,!1,$)}function Et(B,z,G){var $=B.HostComponent,De=B.LazyComponent,me=B.SuspenseComponent,xe=B.SuspenseListComponent,Z=B.FunctionComponent,ke=B.IndeterminateComponent,Xe=B.SimpleMemoComponent,ht=B.ForwardRef,ie=B.Block,qe=B.ClassComponent;switch(z.tag){case $:return lo(z.type);case De:return lo("Lazy");case me:return lo("Suspense");case xe:return lo("SuspenseList");case Z:case ke:case Xe:return Ro(z.type,0,0,G);case ht:return Ro(z.type.render,0,0,G);case ie:return Ro(z.type._render,0,0,G);case qe:return function(tt,Tt,kt,bt){return yl(tt,!0,bt)}(z.type,0,0,G);default:return""}}function Pt(B,z,G){try{var $="",De=z;do $+=Et(B,De,G),De=De.return;while(De);return $}catch(me){return` -Error generating stack: `+me.message+` -`+me.stack}}function Bn(B,z){var G;if(typeof Symbol=="undefined"||B[Symbol.iterator]==null){if(Array.isArray(B)||(G=function(ke,Xe){if(!!ke){if(typeof ke=="string")return Ir(ke,Xe);var ht=Object.prototype.toString.call(ke).slice(8,-1);if(ht==="Object"&&ke.constructor&&(ht=ke.constructor.name),ht==="Map"||ht==="Set")return Array.from(ke);if(ht==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ht))return Ir(ke,Xe)}}(B))||z&&B&&typeof B.length=="number"){G&&(B=G);var $=0,De=function(){};return{s:De,n:function(){return $>=B.length?{done:!0}:{done:!1,value:B[$++]}},e:function(ke){throw ke},f:De}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var me,xe=!0,Z=!1;return{s:function(){G=B[Symbol.iterator]()},n:function(){var ke=G.next();return xe=ke.done,ke},e:function(ke){Z=!0,me=ke},f:function(){try{xe||G.return==null||G.return()}finally{if(Z)throw me}}}}function Ir(B,z){(z==null||z>B.length)&&(z=B.length);for(var G=0,$=new Array(z);G0?Xe[Xe.length-1]:null,qe=ie!==null&&(Wr.test(ie)||wu.test(ie));if(!qe){var tt,Tt=Bn(c0.values());try{for(Tt.s();!(tt=Tt.n()).done;){var kt=tt.value,bt=kt.currentDispatcherRef,on=kt.getCurrentFiber,tn=kt.workTagMap,Lt=on();if(Lt!=null){var gn=Pt(tn,Lt,bt);gn!==""&&Xe.push(gn);break}}}catch(lr){Tt.e(lr)}finally{Tt.f()}}}catch(lr){}me.apply(void 0,Xe)};xe.__REACT_DEVTOOLS_ORIGINAL_METHOD__=me,Ti[De]=xe}catch(Z){}})}}function Fu(B){return(Fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(B)}function fs(B,z){for(var G=0;GB.length)&&(z=B.length);for(var G=0,$=new Array(z);G1?Z-1:0),Xe=1;Xe0?ie[ie.length-1]:0),ie.push(nn),Z.set(Ze,Xe(Ft._topLevelWrapper));try{var sn=nt.apply(this,_t);return ie.pop(),sn}catch(yr){throw ie=[],yr}finally{if(ie.length===0){var Yn=Z.get(Ze);if(Yn===void 0)throw new Error("Expected to find root ID.");lr(Yn)}}},performUpdateIfNecessary:function(nt,_t){var Ze=_t[0];if(w0(Ze)===9)return nt.apply(this,_t);var Ft=Xe(Ze);ie.push(Ft);var nn=Gn(Ze);try{var sn=nt.apply(this,_t),Yn=Gn(Ze);return ht(nn,Yn)||Tt(Ze,Ft,Yn),ie.pop(),sn}catch(nu){throw ie=[],nu}finally{if(ie.length===0){var yr=Z.get(Ze);if(yr===void 0)throw new Error("Expected to find root ID.");lr(yr)}}},receiveComponent:function(nt,_t){var Ze=_t[0];if(w0(Ze)===9)return nt.apply(this,_t);var Ft=Xe(Ze);ie.push(Ft);var nn=Gn(Ze);try{var sn=nt.apply(this,_t),Yn=Gn(Ze);return ht(nn,Yn)||Tt(Ze,Ft,Yn),ie.pop(),sn}catch(nu){throw ie=[],nu}finally{if(ie.length===0){var yr=Z.get(Ze);if(yr===void 0)throw new Error("Expected to find root ID.");lr(yr)}}},unmountComponent:function(nt,_t){var Ze=_t[0];if(w0(Ze)===9)return nt.apply(this,_t);var Ft=Xe(Ze);ie.push(Ft);try{var nn=nt.apply(this,_t);return ie.pop(),function(Yn,yr){tn.push(yr),me.delete(yr)}(0,Ft),nn}catch(Yn){throw ie=[],Yn}finally{if(ie.length===0){var sn=Z.get(Ze);if(sn===void 0)throw new Error("Expected to find root ID.");lr(sn)}}}}));var bt=[],on=new Map,tn=[],Lt=0,gn=null;function lr(nt){if(bt.length!==0||tn.length!==0||gn!==null){var _t=tn.length+(gn===null?0:1),Ze=new Array(3+Lt+(_t>0?2+_t:0)+bt.length),Ft=0;if(Ze[Ft++]=z,Ze[Ft++]=nt,Ze[Ft++]=Lt,on.forEach(function(Yn,yr){Ze[Ft++]=yr.length;for(var nu=W0(yr),Cu=0;Cu0){Ze[Ft++]=2,Ze[Ft++]=_t;for(var nn=0;nn"),"color: var(--dom-tag-name-color); font-weight: normal;"),_t.props!==null&&console.log("Props:",_t.props),_t.state!==null&&console.log("State:",_t.state),_t.context!==null&&console.log("Context:",_t.context);var Ft=De(nt);Ft!==null&&console.log("Node:",Ft),(window.chrome||/firefox/i.test(navigator.userAgent))&&console.log("Right-click any value to save it as a global variable for further inspection."),Ze&&console.groupEnd()}else console.warn('Could not find element with id "'.concat(nt,'"'))},overrideSuspense:function(){throw new Error("overrideSuspense not supported by this renderer")},overrideValueAtPath:function(nt,_t,Ze,Ft,nn){var sn=me.get(_t);if(sn!=null){var Yn=sn._instance;if(Yn!=null)switch(nt){case"context":To(Yn.context,Ft,nn),p0(Yn);break;case"hooks":throw new Error("Hooks not supported by this renderer");case"props":var yr=sn._currentElement;sn._currentElement=K0(K0({},yr),{},{props:Ln(yr.props,Ft,nn)}),p0(Yn);break;case"state":To(Yn.state,Ft,nn),p0(Yn)}}},renamePath:function(nt,_t,Ze,Ft,nn){var sn=me.get(_t);if(sn!=null){var Yn=sn._instance;if(Yn!=null)switch(nt){case"context":Hr(Yn.context,Ft,nn),p0(Yn);break;case"hooks":throw new Error("Hooks not supported by this renderer");case"props":var yr=sn._currentElement;sn._currentElement=K0(K0({},yr),{},{props:Zt(yr.props,Ft,nn)}),p0(Yn);break;case"state":Hr(Yn.state,Ft,nn),p0(Yn)}}},prepareViewAttributeSource:function(nt,_t){var Ze=Rr(nt);Ze!==null&&(window.$attribute=Lu(Ze,_t))},prepareViewElementSource:function(nt){var _t=me.get(nt);if(_t!=null){var Ze=_t._currentElement;Ze!=null?$.$type=Ze.type:console.warn('Could not find element with id "'.concat(nt,'"'))}else console.warn('Could not find instance with id "'.concat(nt,'"'))},renderer:G,setTraceUpdatesEnabled:function(nt){},setTrackedPath:function(nt){},startProfiling:function(){},stopProfiling:function(){},storeAsGlobal:function(nt,_t,Ze){var Ft=Rr(nt);if(Ft!==null){var nn=Lu(Ft,_t),sn="$reactTemp".concat(Ze);window[sn]=nn,console.log(sn),console.log(nn)}},updateComponentFilters:function(nt){}}}function ri(B,z){var G=!1,$={bottom:0,left:0,right:0,top:0},De=z[B];if(De!=null){for(var me=0,xe=Object.keys($);me0?"development":"production";var bt=Function.prototype.toString;if(kt.Mount&&kt.Mount._renderNewRootComponent){var on=bt.call(kt.Mount._renderNewRootComponent);return on.indexOf("function")!==0?"production":on.indexOf("storedMeasure")!==-1?"development":on.indexOf("should be a pure function")!==-1?on.indexOf("NODE_ENV")!==-1||on.indexOf("development")!==-1||on.indexOf("true")!==-1?"development":on.indexOf("nextElement")!==-1||on.indexOf("nextComponent")!==-1?"unminified":"development":on.indexOf("nextElement")!==-1||on.indexOf("nextComponent")!==-1?"unminified":"outdated"}}catch(tn){}return"production"}(ke);try{var ie=window.__REACT_DEVTOOLS_APPEND_COMPONENT_STACK__!==!1,qe=window.__REACT_DEVTOOLS_BREAK_ON_CONSOLE_ERRORS__===!0;(ie||qe)&&(so(ke),Gl({appendComponentStack:ie,breakOnConsoleErrors:qe}))}catch(kt){}var tt=B.__REACT_DEVTOOLS_ATTACH__;if(typeof tt=="function"){var Tt=tt(Z,Xe,ke,B);Z.rendererInterfaces.set(Xe,Tt)}return Z.emit("renderer",{id:Xe,renderer:ke,reactBuildType:ht}),Xe},on:function(ke,Xe){me[ke]||(me[ke]=[]),me[ke].push(Xe)},off:function(ke,Xe){if(me[ke]){var ht=me[ke].indexOf(Xe);ht!==-1&&me[ke].splice(ht,1),me[ke].length||delete me[ke]}},sub:function(ke,Xe){return Z.on(ke,Xe),function(){return Z.off(ke,Xe)}},supportsFiber:!0,checkDCE:function(ke){try{Function.prototype.toString.call(ke).indexOf("^_^")>-1&&(G=!0,setTimeout(function(){throw new Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")}))}catch(Xe){}},onCommitFiberUnmount:function(ke,Xe){var ht=De.get(ke);ht!=null&&ht.handleCommitFiberUnmount(Xe)},onCommitFiberRoot:function(ke,Xe,ht){var ie=Z.getFiberRoots(ke),qe=Xe.current,tt=ie.has(Xe),Tt=qe.memoizedState==null||qe.memoizedState.element==null;tt||Tt?tt&&Tt&&ie.delete(Xe):ie.add(Xe);var kt=De.get(ke);kt!=null&&kt.handleCommitFiberRoot(Xe,ht)}};Object.defineProperty(B,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!1,enumerable:!1,get:function(){return Z}})})(window);var h0=window.__REACT_DEVTOOLS_GLOBAL_HOOK__,Fs=[{type:1,value:7,isEnabled:!0}];function Ni(B){if(h0!=null){var z=B||{},G=z.host,$=G===void 0?"localhost":G,De=z.nativeStyleEditorValidAttributes,me=z.useHttps,xe=me!==void 0&&me,Z=z.port,ke=Z===void 0?8097:Z,Xe=z.websocket,ht=z.resolveRNStyle,ie=ht===void 0?null:ht,qe=z.isAppActive,tt=xe?"wss":"ws",Tt=null;if((qe===void 0?function(){return!0}:qe)()){var kt=null,bt=[],on=tt+"://"+$+":"+ke,tn=Xe||new window.WebSocket(on);tn.onclose=function(){kt!==null&&kt.emit("shutdown"),Lt()},tn.onerror=function(){Lt()},tn.onmessage=function(gn){var lr;try{if(typeof gn.data!="string")throw Error();lr=JSON.parse(gn.data)}catch(Qn){return void console.error("[React DevTools] Failed to parse JSON: "+gn.data)}bt.forEach(function(Qn){try{Qn(lr)}catch(_r){throw console.log("[React DevTools] Error calling listener",lr),console.log("error:",_r),_r}})},tn.onopen=function(){(kt=new ao({listen:function(Cn){return bt.push(Cn),function(){var Ar=bt.indexOf(Cn);Ar>=0&&bt.splice(Ar,1)}},send:function(Cn,Ar,v0){tn.readyState===tn.OPEN?tn.send(JSON.stringify({event:Cn,payload:Ar})):(kt!==null&&kt.shutdown(),Lt())}})).addListener("inspectElement",function(Cn){var Ar=Cn.id,v0=Cn.rendererID,Rr=gn.rendererInterfaces[v0];if(Rr!=null){var nt=Rr.findNativeNodesForFiberID(Ar);nt!=null&&nt[0]!=null&&gn.emit("showNativeHighlight",nt[0])}}),kt.addListener("updateComponentFilters",function(Cn){Fs=Cn}),window.__REACT_DEVTOOLS_COMPONENT_FILTERS__==null&&kt.send("overrideComponentFilters",Fs);var gn=new Hn(kt);if(gn.addListener("shutdown",function(){h0.emit("shutdown")}),function(Cn,Ar,v0){if(Cn==null)return function(){};var Rr=[Cn.sub("renderer-attached",function(Ze){var Ft=Ze.id,nn=(Ze.renderer,Ze.rendererInterface);Ar.setRendererInterface(Ft,nn),nn.flushInitialOperations()}),Cn.sub("unsupported-renderer-version",function(Ze){Ar.onUnsupportedRenderer(Ze)}),Cn.sub("operations",Ar.onHookOperations),Cn.sub("traceUpdates",Ar.onTraceUpdates)],nt=function(Ze,Ft){var nn=Cn.rendererInterfaces.get(Ze);nn==null&&(typeof Ft.findFiberByHostInstance=="function"?nn=Ms(Cn,Ze,Ft,v0):Ft.ComponentTree&&(nn=ic(Cn,Ze,Ft,v0)),nn!=null&&Cn.rendererInterfaces.set(Ze,nn)),nn!=null?Cn.emit("renderer-attached",{id:Ze,renderer:Ft,rendererInterface:nn}):Cn.emit("unsupported-renderer-version",Ze)};Cn.renderers.forEach(function(Ze,Ft){nt(Ft,Ze)}),Rr.push(Cn.sub("renderer",function(Ze){var Ft=Ze.id,nn=Ze.renderer;nt(Ft,nn)})),Cn.emit("react-devtools",Ar),Cn.reactDevtoolsAgent=Ar;var _t=function(){Rr.forEach(function(Ze){return Ze()}),Cn.rendererInterfaces.forEach(function(Ze){Ze.cleanup()}),Cn.reactDevtoolsAgent=null};Ar.addListener("shutdown",_t),Rr.push(function(){Ar.removeListener("shutdown",_t)})}(h0,gn,window),ie!=null||h0.resolveRNStyle!=null)ea(kt,gn,ie||h0.resolveRNStyle,De||h0.nativeStyleEditorValidAttributes||null);else{var lr,Qn,_r=function(){kt!==null&&ea(kt,gn,lr,Qn)};h0.hasOwnProperty("resolveRNStyle")||Object.defineProperty(h0,"resolveRNStyle",{enumerable:!1,get:function(){return lr},set:function(Cn){lr=Cn,_r()}}),h0.hasOwnProperty("nativeStyleEditorValidAttributes")||Object.defineProperty(h0,"nativeStyleEditorValidAttributes",{enumerable:!1,get:function(){return Qn},set:function(Cn){Qn=Cn,_r()}})}}}else Lt()}function Lt(){Tt===null&&(Tt=setTimeout(function(){return Ni(B)},2e3))}}}])})});var mR=ce(vR=>{"use strict";Object.defineProperty(vR,"__esModule",{value:!0});pR();var $Q=hR();$Q.connectToDevTools()});var DR=ce(kg=>{"use strict";var yR=kg&&kg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(kg,"__esModule",{value:!0});var gR=h4(),eJ=yR(D9()),_R=yR(eh()),ss=Lw();process.env.DEV==="true"&&mR();var ER=i=>{i==null||i.unsetMeasureFunc(),i==null||i.freeRecursive()};kg.default=eJ.default({schedulePassiveEffects:gR.unstable_scheduleCallback,cancelPassiveEffects:gR.unstable_cancelCallback,now:Date.now,getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>{},resetAfterCommit:i=>{if(i.isStaticDirty){i.isStaticDirty=!1,typeof i.onImmediateRender=="function"&&i.onImmediateRender();return}typeof i.onRender=="function"&&i.onRender()},getChildHostContext:(i,o)=>{let f=i.isInsideText,p=o==="ink-text"||o==="ink-virtual-text";return f===p?i:{isInsideText:p}},shouldSetTextContent:()=>!1,createInstance:(i,o,f,p)=>{if(p.isInsideText&&i==="ink-box")throw new Error(" can\u2019t be nested inside component");let E=i==="ink-text"&&p.isInsideText?"ink-virtual-text":i,t=ss.createNode(E);for(let[k,L]of Object.entries(o))k!=="children"&&(k==="style"?ss.setStyle(t,L):k==="internal_transform"?t.internal_transform=L:k==="internal_static"?t.internal_static=!0:ss.setAttribute(t,k,L));return t},createTextInstance:(i,o,f)=>{if(!f.isInsideText)throw new Error(`Text string "${i}" must be rendered inside component`);return ss.createTextNode(i)},resetTextContent:()=>{},hideTextInstance:i=>{ss.setTextNodeValue(i,"")},unhideTextInstance:(i,o)=>{ss.setTextNodeValue(i,o)},getPublicInstance:i=>i,hideInstance:i=>{var o;(o=i.yogaNode)===null||o===void 0||o.setDisplay(_R.default.DISPLAY_NONE)},unhideInstance:i=>{var o;(o=i.yogaNode)===null||o===void 0||o.setDisplay(_R.default.DISPLAY_FLEX)},appendInitialChild:ss.appendChildNode,appendChild:ss.appendChildNode,insertBefore:ss.insertBeforeNode,finalizeInitialChildren:(i,o,f,p)=>(i.internal_static&&(p.isStaticDirty=!0,p.staticNode=i),!1),supportsMutation:!0,appendChildToContainer:ss.appendChildNode,insertInContainerBefore:ss.insertBeforeNode,removeChildFromContainer:(i,o)=>{ss.removeChildNode(i,o),ER(o.yogaNode)},prepareUpdate:(i,o,f,p,E)=>{i.internal_static&&(E.isStaticDirty=!0);let t={},k=Object.keys(p);for(let L of k)if(p[L]!==f[L]){if(L==="style"&&typeof p.style=="object"&&typeof f.style=="object"){let C=p.style,U=f.style,q=Object.keys(C);for(let W of q){if(W==="borderStyle"||W==="borderColor"){if(typeof t.style!="object"){let ne={};t.style=ne}t.style.borderStyle=C.borderStyle,t.style.borderColor=C.borderColor}if(C[W]!==U[W]){if(typeof t.style!="object"){let ne={};t.style=ne}t.style[W]=C[W]}}continue}t[L]=p[L]}return t},commitUpdate:(i,o)=>{for(let[f,p]of Object.entries(o))f!=="children"&&(f==="style"?ss.setStyle(i,p):f==="internal_transform"?i.internal_transform=p:f==="internal_static"?i.internal_static=!0:ss.setAttribute(i,f,p))},commitTextUpdate:(i,o,f)=>{ss.setTextNodeValue(i,f)},removeChild:(i,o)=>{ss.removeChildNode(i,o),ER(o.yogaNode)}})});var SR=ce((Are,wR)=>{"use strict";wR.exports=(i,o=1,f)=>{if(f=E0({indent:" ",includeEmptyLines:!1},f),typeof i!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof i}\``);if(typeof o!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof o}\``);if(typeof f.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof f.indent}\``);if(o===0)return i;let p=f.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return i.replace(p,f.indent.repeat(o))}});var TR=ce(Mg=>{"use strict";var tJ=Mg&&Mg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Mg,"__esModule",{value:!0});var k4=tJ(eh());Mg.default=i=>i.getComputedWidth()-i.getComputedPadding(k4.default.EDGE_LEFT)-i.getComputedPadding(k4.default.EDGE_RIGHT)-i.getComputedBorder(k4.default.EDGE_LEFT)-i.getComputedBorder(k4.default.EDGE_RIGHT)});var xR=ce((Ore,CR)=>{CR.exports={single:{topLeft:"\u250C",topRight:"\u2510",bottomRight:"\u2518",bottomLeft:"\u2514",vertical:"\u2502",horizontal:"\u2500"},double:{topLeft:"\u2554",topRight:"\u2557",bottomRight:"\u255D",bottomLeft:"\u255A",vertical:"\u2551",horizontal:"\u2550"},round:{topLeft:"\u256D",topRight:"\u256E",bottomRight:"\u256F",bottomLeft:"\u2570",vertical:"\u2502",horizontal:"\u2500"},bold:{topLeft:"\u250F",topRight:"\u2513",bottomRight:"\u251B",bottomLeft:"\u2517",vertical:"\u2503",horizontal:"\u2501"},singleDouble:{topLeft:"\u2553",topRight:"\u2556",bottomRight:"\u255C",bottomLeft:"\u2559",vertical:"\u2551",horizontal:"\u2500"},doubleSingle:{topLeft:"\u2552",topRight:"\u2555",bottomRight:"\u255B",bottomLeft:"\u2558",vertical:"\u2502",horizontal:"\u2550"},classic:{topLeft:"+",topRight:"+",bottomRight:"+",bottomLeft:"+",vertical:"|",horizontal:"-"}}});var RR=ce((kre,Zw)=>{"use strict";var AR=xR();Zw.exports=AR;Zw.exports.default=AR});var kR=ce((Mre,OR)=>{"use strict";OR.exports=(i,o=process.argv)=>{let f=i.startsWith("-")?"":i.length===1?"-":"--",p=o.indexOf(f+i),E=o.indexOf("--");return p!==-1&&(E===-1||p{"use strict";var nJ=require("os"),NR=require("tty"),of=kR(),{env:Wo}=process,md;of("no-color")||of("no-colors")||of("color=false")||of("color=never")?md=0:(of("color")||of("colors")||of("color=true")||of("color=always"))&&(md=1);"FORCE_COLOR"in Wo&&(Wo.FORCE_COLOR==="true"?md=1:Wo.FORCE_COLOR==="false"?md=0:md=Wo.FORCE_COLOR.length===0?1:Math.min(parseInt(Wo.FORCE_COLOR,10),3));function $w(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function e3(i,o){if(md===0)return 0;if(of("color=16m")||of("color=full")||of("color=truecolor"))return 3;if(of("color=256"))return 2;if(i&&!o&&md===void 0)return 0;let f=md||0;if(Wo.TERM==="dumb")return f;if(process.platform==="win32"){let p=nJ.release().split(".");return Number(p[0])>=10&&Number(p[2])>=10586?Number(p[2])>=14931?3:2:1}if("CI"in Wo)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(p=>p in Wo)||Wo.CI_NAME==="codeship"?1:f;if("TEAMCITY_VERSION"in Wo)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Wo.TEAMCITY_VERSION)?1:0;if("GITHUB_ACTIONS"in Wo)return 1;if(Wo.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Wo){let p=parseInt((Wo.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Wo.TERM_PROGRAM){case"iTerm.app":return p>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Wo.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Wo.TERM)||"COLORTERM"in Wo?1:f}function rJ(i){let o=e3(i,i&&i.isTTY);return $w(o)}MR.exports={supportsColor:rJ,stdout:$w(e3(!0,NR.isatty(1))),stderr:$w(e3(!0,NR.isatty(2)))}});var bR=ce((Lre,FR)=>{"use strict";var iJ=(i,o,f)=>{let p=i.indexOf(o);if(p===-1)return i;let E=o.length,t=0,k="";do k+=i.substr(t,p-t)+o+f,t=p+E,p=i.indexOf(o,t);while(p!==-1);return k+=i.substr(t),k},uJ=(i,o,f,p)=>{let E=0,t="";do{let k=i[p-1]==="\r";t+=i.substr(E,(k?p-1:p)-E)+o+(k?`\r -`:` -`)+f,E=p+1,p=i.indexOf(` -`,E)}while(p!==-1);return t+=i.substr(E),t};FR.exports={stringReplaceAll:iJ,stringEncaseCRLFWithFirstIndex:uJ}});var jR=ce((Fre,PR)=>{"use strict";var oJ=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,IR=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,lJ=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,sJ=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,aJ=new Map([["n",` -`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a","\x07"]]);function BR(i){let o=i[0]==="u",f=i[1]==="{";return o&&!f&&i.length===5||i[0]==="x"&&i.length===3?String.fromCharCode(parseInt(i.slice(1),16)):o&&f?String.fromCodePoint(parseInt(i.slice(2,-1),16)):aJ.get(i)||i}function fJ(i,o){let f=[],p=o.trim().split(/\s*,\s*/g),E;for(let t of p){let k=Number(t);if(!Number.isNaN(k))f.push(k);else if(E=t.match(lJ))f.push(E[2].replace(sJ,(L,N,C)=>N?BR(N):C));else throw new Error(`Invalid Chalk template style argument: ${t} (in style '${i}')`)}return f}function cJ(i){IR.lastIndex=0;let o=[],f;for(;(f=IR.exec(i))!==null;){let p=f[1];if(f[2]){let E=fJ(p,f[2]);o.push([p].concat(E))}else o.push([p])}return o}function UR(i,o){let f={};for(let E of o)for(let t of E.styles)f[t[0]]=E.inverse?null:t.slice(1);let p=i;for(let[E,t]of Object.entries(f))if(!!Array.isArray(t)){if(!(E in p))throw new Error(`Unknown Chalk style: ${E}`);p=t.length>0?p[E](...t):p[E]}return p}PR.exports=(i,o)=>{let f=[],p=[],E=[];if(o.replace(oJ,(t,k,L,N,C,U)=>{if(k)E.push(BR(k));else if(N){let q=E.join("");E=[],p.push(f.length===0?q:UR(i,f)(q)),f.push({inverse:L,styles:cJ(N)})}else if(C){if(f.length===0)throw new Error("Found extraneous } in Chalk template literal");p.push(UR(i,f)(E.join(""))),E=[],f.pop()}else E.push(U)}),p.push(E.join("")),f.length>0){let t=`Chalk template literal is missing ${f.length} closing bracket${f.length===1?"":"s"} (\`}\`)`;throw new Error(t)}return p.join("")}});var u3=ce((bre,zR)=>{"use strict";var Ng=_4(),{stdout:t3,stderr:n3}=LR(),{stringReplaceAll:dJ,stringEncaseCRLFWithFirstIndex:pJ}=bR(),{isArray:M4}=Array,qR=["ansi","ansi","ansi256","ansi16m"],cm=Object.create(null),hJ=(i,o={})=>{if(o.level&&!(Number.isInteger(o.level)&&o.level>=0&&o.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let f=t3?t3.level:0;i.level=o.level===void 0?f:o.level},HR=class{constructor(o){return WR(o)}},WR=i=>{let o={};return hJ(o,i),o.template=(...f)=>VR(o.template,...f),Object.setPrototypeOf(o,N4.prototype),Object.setPrototypeOf(o.template,o),o.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},o.template.Instance=HR,o.template};function N4(i){return WR(i)}for(let[i,o]of Object.entries(Ng))cm[i]={get(){let f=L4(this,r3(o.open,o.close,this._styler),this._isEmpty);return Object.defineProperty(this,i,{value:f}),f}};cm.visible={get(){let i=L4(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:i}),i}};var GR=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let i of GR)cm[i]={get(){let{level:o}=this;return function(...f){let p=r3(Ng.color[qR[o]][i](...f),Ng.color.close,this._styler);return L4(this,p,this._isEmpty)}}};for(let i of GR){let o="bg"+i[0].toUpperCase()+i.slice(1);cm[o]={get(){let{level:f}=this;return function(...p){let E=r3(Ng.bgColor[qR[f]][i](...p),Ng.bgColor.close,this._styler);return L4(this,E,this._isEmpty)}}}}var vJ=Object.defineProperties(()=>{},Gf(E0({},cm),{level:{enumerable:!0,get(){return this._generator.level},set(i){this._generator.level=i}}})),r3=(i,o,f)=>{let p,E;return f===void 0?(p=i,E=o):(p=f.openAll+i,E=o+f.closeAll),{open:i,close:o,openAll:p,closeAll:E,parent:f}},L4=(i,o,f)=>{let p=(...E)=>M4(E[0])&&M4(E[0].raw)?YR(p,VR(p,...E)):YR(p,E.length===1?""+E[0]:E.join(" "));return Object.setPrototypeOf(p,vJ),p._generator=i,p._styler=o,p._isEmpty=f,p},YR=(i,o)=>{if(i.level<=0||!o)return i._isEmpty?"":o;let f=i._styler;if(f===void 0)return o;let{openAll:p,closeAll:E}=f;if(o.indexOf("")!==-1)for(;f!==void 0;)o=dJ(o,f.close,f.open),f=f.parent;let t=o.indexOf(` -`);return t!==-1&&(o=pJ(o,E,p,t)),p+o+E},i3,VR=(i,...o)=>{let[f]=o;if(!M4(f)||!M4(f.raw))return o.join(" ");let p=o.slice(1),E=[f.raw[0]];for(let t=1;t{"use strict";var mJ=Lg&&Lg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Lg,"__esModule",{value:!0});var Fg=mJ(u3()),yJ=/^(rgb|hsl|hsv|hwb)\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,gJ=/^(ansi|ansi256)\(\s?(\d+)\s?\)$/,b4=(i,o)=>o==="foreground"?i:"bg"+i[0].toUpperCase()+i.slice(1);Lg.default=(i,o,f)=>{if(!o)return i;if(o in Fg.default){let E=b4(o,f);return Fg.default[E](i)}if(o.startsWith("#")){let E=b4("hex",f);return Fg.default[E](o)(i)}if(o.startsWith("ansi")){let E=gJ.exec(o);if(!E)return i;let t=b4(E[1],f),k=Number(E[2]);return Fg.default[t](k)(i)}if(o.startsWith("rgb")||o.startsWith("hsl")||o.startsWith("hsv")||o.startsWith("hwb")){let E=yJ.exec(o);if(!E)return i;let t=b4(E[1],f),k=Number(E[2]),L=Number(E[3]),N=Number(E[4]);return Fg.default[t](k,L,N)(i)}return i}});var XR=ce(bg=>{"use strict";var KR=bg&&bg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(bg,"__esModule",{value:!0});var _J=KR(RR()),l3=KR(o3());bg.default=(i,o,f,p)=>{if(typeof f.style.borderStyle=="string"){let E=f.yogaNode.getComputedWidth(),t=f.yogaNode.getComputedHeight(),k=f.style.borderColor,L=_J.default[f.style.borderStyle],N=l3.default(L.topLeft+L.horizontal.repeat(E-2)+L.topRight,k,"foreground"),C=(l3.default(L.vertical,k,"foreground")+` -`).repeat(t-2),U=l3.default(L.bottomLeft+L.horizontal.repeat(E-2)+L.bottomRight,k,"foreground");p.write(i,o,N,{transformers:[]}),p.write(i,o+1,C,{transformers:[]}),p.write(i+E-1,o+1,C,{transformers:[]}),p.write(i,o+t-1,U,{transformers:[]})}}});var JR=ce(Pg=>{"use strict";var ih=Pg&&Pg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Pg,"__esModule",{value:!0});var EJ=ih(eh()),DJ=ih(Dw()),wJ=ih(SR()),SJ=ih(kw()),TJ=ih(TR()),CJ=ih(Nw()),xJ=ih(XR()),AJ=(i,o)=>{var f;let p=(f=i.childNodes[0])===null||f===void 0?void 0:f.yogaNode;if(p){let E=p.getComputedLeft(),t=p.getComputedTop();o=` -`.repeat(t)+wJ.default(o,E)}return o},QR=(i,o,f)=>{var p;let{offsetX:E=0,offsetY:t=0,transformers:k=[],skipStaticElements:L}=f;if(L&&i.internal_static)return;let{yogaNode:N}=i;if(N){if(N.getDisplay()===EJ.default.DISPLAY_NONE)return;let C=E+N.getComputedLeft(),U=t+N.getComputedTop(),q=k;if(typeof i.internal_transform=="function"&&(q=[i.internal_transform,...k]),i.nodeName==="ink-text"){let W=CJ.default(i);if(W.length>0){let ne=DJ.default(W),m=TJ.default(N);if(ne>m){let we=(p=i.style.textWrap)!==null&&p!==void 0?p:"wrap";W=SJ.default(W,m,we)}W=AJ(i,W),o.write(C,U,W,{transformers:q})}return}if(i.nodeName==="ink-box"&&xJ.default(C,U,i,o),i.nodeName==="ink-root"||i.nodeName==="ink-box")for(let W of i.childNodes)QR(W,o,{offsetX:C,offsetY:U,transformers:q,skipStaticElements:L})}};Pg.default=QR});var $R=ce((Ure,ZR)=>{"use strict";ZR.exports=i=>{i=Object.assign({onlyFirst:!1},i);let o=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(o,i.onlyFirst?void 0:"g")}});var t7=ce((jre,s3)=>{"use strict";var RJ=$R(),e7=i=>typeof i=="string"?i.replace(RJ(),""):i;s3.exports=e7;s3.exports.default=e7});var i7=ce((zre,n7)=>{"use strict";var r7="[\uD800-\uDBFF][\uDC00-\uDFFF]";n7.exports=i=>i&&i.exact?new RegExp(`^${r7}$`):new RegExp(r7,"g")});var o7=ce((qre,a3)=>{"use strict";var OJ=t7(),kJ=i7(),u7=i=>OJ(i).replace(kJ()," ").length;a3.exports=u7;a3.exports.default=u7});var f7=ce(Ig=>{"use strict";var l7=Ig&&Ig.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ig,"__esModule",{value:!0});var s7=l7(Rw()),MJ=l7(o7()),a7=class{constructor(o){this.writes=[];let{width:f,height:p}=o;this.width=f,this.height=p}write(o,f,p,E){let{transformers:t}=E;!p||this.writes.push({x:o,y:f,text:p,transformers:t})}get(){let o=[];for(let p=0;pp.trimRight()).join(` -`),height:o.length}}};Ig.default=a7});var p7=ce(Bg=>{"use strict";var f3=Bg&&Bg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Bg,"__esModule",{value:!0});var NJ=f3(eh()),c7=f3(JR()),d7=f3(f7());Bg.default=(i,o)=>{var f;if(i.yogaNode.setWidth(o),i.yogaNode){i.yogaNode.calculateLayout(void 0,void 0,NJ.default.DIRECTION_LTR);let p=new d7.default({width:i.yogaNode.getComputedWidth(),height:i.yogaNode.getComputedHeight()});c7.default(i,p,{skipStaticElements:!0});let E;((f=i.staticNode)===null||f===void 0?void 0:f.yogaNode)&&(E=new d7.default({width:i.staticNode.yogaNode.getComputedWidth(),height:i.staticNode.yogaNode.getComputedHeight()}),c7.default(i.staticNode,E,{skipStaticElements:!1}));let{output:t,height:k}=p.get();return{output:t,outputHeight:k,staticOutput:E?`${E.get().output} -`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var y7=ce((Vre,h7)=>{"use strict";var v7=require("stream"),m7=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],c3={},LJ=i=>{let o=new v7.PassThrough,f=new v7.PassThrough;o.write=E=>i("stdout",E),f.write=E=>i("stderr",E);let p=new console.Console(o,f);for(let E of m7)c3[E]=console[E],console[E]=p[E];return()=>{for(let E of m7)console[E]=c3[E];c3={}}};h7.exports=LJ});var p3=ce(d3=>{"use strict";Object.defineProperty(d3,"__esModule",{value:!0});d3.default=new WeakMap});var v3=ce(h3=>{"use strict";Object.defineProperty(h3,"__esModule",{value:!0});var FJ=su(),g7=FJ.createContext({exit:()=>{}});g7.displayName="InternalAppContext";h3.default=g7});var y3=ce(m3=>{"use strict";Object.defineProperty(m3,"__esModule",{value:!0});var bJ=su(),_7=bJ.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});_7.displayName="InternalStdinContext";m3.default=_7});var _3=ce(g3=>{"use strict";Object.defineProperty(g3,"__esModule",{value:!0});var PJ=su(),E7=PJ.createContext({stdout:void 0,write:()=>{}});E7.displayName="InternalStdoutContext";g3.default=E7});var D3=ce(E3=>{"use strict";Object.defineProperty(E3,"__esModule",{value:!0});var IJ=su(),D7=IJ.createContext({stderr:void 0,write:()=>{}});D7.displayName="InternalStderrContext";E3.default=D7});var P4=ce(w3=>{"use strict";Object.defineProperty(w3,"__esModule",{value:!0});var BJ=su(),w7=BJ.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{}});w7.displayName="InternalFocusContext";w3.default=w7});var T7=ce((Zre,S7)=>{"use strict";var UJ=/[|\\{}()[\]^$+*?.-]/g;S7.exports=i=>{if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(UJ,"\\$&")}});var R7=ce(($re,C7)=>{"use strict";var jJ=T7(),x7=[].concat(require("module").builtinModules,"bootstrap_node","node").map(i=>new RegExp(`(?:\\(${i}\\.js:\\d+:\\d+\\)$|^\\s*at ${i}\\.js:\\d+:\\d+$)`));x7.push(/\(internal\/[^:]+:\d+:\d+\)$/,/\s*at internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var I4=class{constructor(o){o=E0({ignoredPackages:[]},o),"internals"in o||(o.internals=I4.nodeInternals()),"cwd"in o||(o.cwd=process.cwd()),this._cwd=o.cwd.replace(/\\/g,"/"),this._internals=[].concat(o.internals,zJ(o.ignoredPackages)),this._wrapCallSite=o.wrapCallSite||!1}static nodeInternals(){return[...x7]}clean(o,f=0){f=" ".repeat(f),Array.isArray(o)||(o=o.split(` -`)),!/^\s*at /.test(o[0])&&/^\s*at /.test(o[1])&&(o=o.slice(1));let p=!1,E=null,t=[];return o.forEach(k=>{if(k=k.replace(/\\/g,"/"),this._internals.some(N=>N.test(k)))return;let L=/^\s*at /.test(k);p?k=k.trimEnd().replace(/^(\s+)at /,"$1"):(k=k.trim(),L&&(k=k.slice(3))),k=k.replace(`${this._cwd}/`,""),k&&(L?(E&&(t.push(E),E=null),t.push(k)):(p=!0,E=k))}),t.map(k=>`${f}${k} -`).join("")}captureString(o,f=this.captureString){typeof o=="function"&&(f=o,o=Infinity);let{stackTraceLimit:p}=Error;o&&(Error.stackTraceLimit=o);let E={};Error.captureStackTrace(E,f);let{stack:t}=E;return Error.stackTraceLimit=p,this.clean(t)}capture(o,f=this.capture){typeof o=="function"&&(f=o,o=Infinity);let{prepareStackTrace:p,stackTraceLimit:E}=Error;Error.prepareStackTrace=(L,N)=>this._wrapCallSite?N.map(this._wrapCallSite):N,o&&(Error.stackTraceLimit=o);let t={};Error.captureStackTrace(t,f);let{stack:k}=t;return Object.assign(Error,{prepareStackTrace:p,stackTraceLimit:E}),k}at(o=this.at){let[f]=this.capture(1,o);if(!f)return{};let p={line:f.getLineNumber(),column:f.getColumnNumber()};A7(p,f.getFileName(),this._cwd),f.isConstructor()&&(p.constructor=!0),f.isEval()&&(p.evalOrigin=f.getEvalOrigin()),f.isNative()&&(p.native=!0);let E;try{E=f.getTypeName()}catch(L){}E&&E!=="Object"&&E!=="[object Object]"&&(p.type=E);let t=f.getFunctionName();t&&(p.function=t);let k=f.getMethodName();return k&&t!==k&&(p.method=k),p}parseLine(o){let f=o&&o.match(qJ);if(!f)return null;let p=f[1]==="new",E=f[2],t=f[3],k=f[4],L=Number(f[5]),N=Number(f[6]),C=f[7],U=f[8],q=f[9],W=f[10]==="native",ne=f[11]===")",m,we={};if(U&&(we.line=Number(U)),q&&(we.column=Number(q)),ne&&C){let Se=0;for(let he=C.length-1;he>0;he--)if(C.charAt(he)===")")Se++;else if(C.charAt(he)==="("&&C.charAt(he-1)===" "&&(Se--,Se===-1&&C.charAt(he-1)===" ")){let ge=C.slice(0,he-1);C=C.slice(he+1),E+=` (${ge}`;break}}if(E){let Se=E.match(HJ);Se&&(E=Se[1],m=Se[2])}return A7(we,C,this._cwd),p&&(we.constructor=!0),t&&(we.evalOrigin=t,we.evalLine=L,we.evalColumn=N,we.evalFile=k&&k.replace(/\\/g,"/")),W&&(we.native=!0),E&&(we.function=E),m&&E!==m&&(we.method=m),we}};function A7(i,o,f){o&&(o=o.replace(/\\/g,"/"),o.startsWith(`${f}/`)&&(o=o.slice(f.length+1)),i.file=o)}function zJ(i){if(i.length===0)return[];let o=i.map(f=>jJ(f));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${o.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var qJ=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),HJ=/^(.*?) \[as (.*?)\]$/;C7.exports=I4});var k7=ce((eie,O7)=>{"use strict";O7.exports=(i,o)=>i.replace(/^\t+/gm,f=>" ".repeat(f.length*(o||2)))});var N7=ce((tie,M7)=>{"use strict";var WJ=k7(),VJ=(i,o)=>{let f=[],p=i-o,E=i+o;for(let t=p;t<=E;t++)f.push(t);return f};M7.exports=(i,o,f)=>{if(typeof i!="string")throw new TypeError("Source code is missing.");if(!o||o<1)throw new TypeError("Line number must start from `1`.");if(i=WJ(i).split(/\r?\n/),!(o>i.length))return f=E0({around:3},f),VJ(o,f.around).filter(p=>i[p-1]!==void 0).map(p=>({line:p,value:i[p-1]}))}});var B4=ce(Zf=>{"use strict";var GJ=Zf&&Zf.__createBinding||(Object.create?function(i,o,f,p){p===void 0&&(p=f),Object.defineProperty(i,p,{enumerable:!0,get:function(){return o[f]}})}:function(i,o,f,p){p===void 0&&(p=f),i[p]=o[f]}),YJ=Zf&&Zf.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),KJ=Zf&&Zf.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var f in i)f!=="default"&&Object.hasOwnProperty.call(i,f)&&GJ(o,i,f);return YJ(o,i),o},XJ=Zf&&Zf.__rest||function(i,o){var f={};for(var p in i)Object.prototype.hasOwnProperty.call(i,p)&&o.indexOf(p)<0&&(f[p]=i[p]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var E=0,p=Object.getOwnPropertySymbols(i);E{var{children:f}=i,p=XJ(i,["children"]);let E=Object.assign(Object.assign({},p),{marginLeft:p.marginLeft||p.marginX||p.margin||0,marginRight:p.marginRight||p.marginX||p.margin||0,marginTop:p.marginTop||p.marginY||p.margin||0,marginBottom:p.marginBottom||p.marginY||p.margin||0,paddingLeft:p.paddingLeft||p.paddingX||p.padding||0,paddingRight:p.paddingRight||p.paddingX||p.padding||0,paddingTop:p.paddingTop||p.paddingY||p.padding||0,paddingBottom:p.paddingBottom||p.paddingY||p.padding||0});return L7.default.createElement("ink-box",{ref:o,style:E},f)});S3.displayName="Box";S3.defaultProps={flexDirection:"row",flexGrow:0,flexShrink:1};Zf.default=S3});var x3=ce(Ug=>{"use strict";var T3=Ug&&Ug.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ug,"__esModule",{value:!0});var QJ=T3(su()),dm=T3(u3()),F7=T3(o3()),C3=({color:i,backgroundColor:o,dimColor:f,bold:p,italic:E,underline:t,strikethrough:k,inverse:L,wrap:N,children:C})=>{if(C==null)return null;let U=q=>(f&&(q=dm.default.dim(q)),i&&(q=F7.default(q,i,"foreground")),o&&(q=F7.default(q,o,"background")),p&&(q=dm.default.bold(q)),E&&(q=dm.default.italic(q)),t&&(q=dm.default.underline(q)),k&&(q=dm.default.strikethrough(q)),L&&(q=dm.default.inverse(q)),q);return QJ.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row",textWrap:N},internal_transform:U},C)};C3.displayName="Text";C3.defaultProps={dimColor:!1,bold:!1,italic:!1,underline:!1,strikethrough:!1,wrap:"wrap"};Ug.default=C3});var B7=ce($f=>{"use strict";var JJ=$f&&$f.__createBinding||(Object.create?function(i,o,f,p){p===void 0&&(p=f),Object.defineProperty(i,p,{enumerable:!0,get:function(){return o[f]}})}:function(i,o,f,p){p===void 0&&(p=f),i[p]=o[f]}),ZJ=$f&&$f.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),$J=$f&&$f.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var f in i)f!=="default"&&Object.hasOwnProperty.call(i,f)&&JJ(o,i,f);return ZJ(o,i),o},jg=$f&&$f.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty($f,"__esModule",{value:!0});var b7=$J(require("fs")),Vo=jg(su()),P7=jg(R7()),eZ=jg(N7()),Q1=jg(B4()),Ic=jg(x3()),I7=new P7.default({cwd:process.cwd(),internals:P7.default.nodeInternals()}),tZ=({error:i})=>{let o=i.stack?i.stack.split(` -`).slice(1):void 0,f=o?I7.parseLine(o[0]):void 0,p,E=0;if((f==null?void 0:f.file)&&(f==null?void 0:f.line)&&b7.existsSync(f.file)){let t=b7.readFileSync(f.file,"utf8");if(p=eZ.default(t,f.line),p)for(let{line:k}of p)E=Math.max(E,String(k).length)}return Vo.default.createElement(Q1.default,{flexDirection:"column",padding:1},Vo.default.createElement(Q1.default,null,Vo.default.createElement(Ic.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),Vo.default.createElement(Ic.default,null," ",i.message)),f&&Vo.default.createElement(Q1.default,{marginTop:1},Vo.default.createElement(Ic.default,{dimColor:!0},f.file,":",f.line,":",f.column)),f&&p&&Vo.default.createElement(Q1.default,{marginTop:1,flexDirection:"column"},p.map(({line:t,value:k})=>Vo.default.createElement(Q1.default,{key:t},Vo.default.createElement(Q1.default,{width:E+1},Vo.default.createElement(Ic.default,{dimColor:t!==f.line,backgroundColor:t===f.line?"red":void 0,color:t===f.line?"white":void 0},String(t).padStart(E," "),":")),Vo.default.createElement(Ic.default,{key:t,backgroundColor:t===f.line?"red":void 0,color:t===f.line?"white":void 0}," "+k)))),i.stack&&Vo.default.createElement(Q1.default,{marginTop:1,flexDirection:"column"},i.stack.split(` -`).slice(1).map(t=>{let k=I7.parseLine(t);return k?Vo.default.createElement(Q1.default,{key:t},Vo.default.createElement(Ic.default,{dimColor:!0},"- "),Vo.default.createElement(Ic.default,{dimColor:!0,bold:!0},k.function),Vo.default.createElement(Ic.default,{dimColor:!0,color:"gray"}," ","(",k.file,":",k.line,":",k.column,")")):Vo.default.createElement(Q1.default,{key:t},Vo.default.createElement(Ic.default,{dimColor:!0},"- "),Vo.default.createElement(Ic.default,{dimColor:!0,bold:!0},t))})))};$f.default=tZ});var j7=ce(ec=>{"use strict";var nZ=ec&&ec.__createBinding||(Object.create?function(i,o,f,p){p===void 0&&(p=f),Object.defineProperty(i,p,{enumerable:!0,get:function(){return o[f]}})}:function(i,o,f,p){p===void 0&&(p=f),i[p]=o[f]}),rZ=ec&&ec.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),iZ=ec&&ec.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var f in i)f!=="default"&&Object.hasOwnProperty.call(i,f)&&nZ(o,i,f);return rZ(o,i),o},uh=ec&&ec.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ec,"__esModule",{value:!0});var oh=iZ(su()),U7=uh(ZD()),uZ=uh(v3()),oZ=uh(y3()),lZ=uh(_3()),sZ=uh(D3()),aZ=uh(P4()),fZ=uh(B7()),cZ=" ",dZ="",pZ="",A3=class extends oh.PureComponent{constructor(){super(...arguments);this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=o=>{let{stdin:f}=this.props;if(!this.isRawModeSupported())throw f===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default. -Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink. -Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(f.setEncoding("utf8"),o){this.rawModeEnabledCount===0&&(f.addListener("data",this.handleInput),f.resume(),f.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount==0&&(f.setRawMode(!1),f.removeListener("data",this.handleInput),f.pause())},this.handleInput=o=>{o===""&&this.props.exitOnCtrlC&&this.handleExit(),o===pZ&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(o===cZ&&this.focusNext(),o===dZ&&this.focusPrevious())},this.handleExit=o=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(o)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focusNext=()=>{this.setState(o=>{let f=o.focusables[0].id;return{activeFocusId:this.findNextFocusable(o)||f}})},this.focusPrevious=()=>{this.setState(o=>{let f=o.focusables[o.focusables.length-1].id;return{activeFocusId:this.findPreviousFocusable(o)||f}})},this.addFocusable=(o,{autoFocus:f})=>{this.setState(p=>{let E=p.activeFocusId;return!E&&f&&(E=o),{activeFocusId:E,focusables:[...p.focusables,{id:o,isActive:!0}]}})},this.removeFocusable=o=>{this.setState(f=>({activeFocusId:f.activeFocusId===o?void 0:f.activeFocusId,focusables:f.focusables.filter(p=>p.id!==o)}))},this.activateFocusable=o=>{this.setState(f=>({focusables:f.focusables.map(p=>p.id!==o?p:{id:o,isActive:!0})}))},this.deactivateFocusable=o=>{this.setState(f=>({activeFocusId:f.activeFocusId===o?void 0:f.activeFocusId,focusables:f.focusables.map(p=>p.id!==o?p:{id:o,isActive:!1})}))},this.findNextFocusable=o=>{let f=o.focusables.findIndex(p=>p.id===o.activeFocusId);for(let p=f+1;p{let f=o.focusables.findIndex(p=>p.id===o.activeFocusId);for(let p=f-1;p>=0;p--)if(o.focusables[p].isActive)return o.focusables[p].id}}static getDerivedStateFromError(o){return{error:o}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return oh.default.createElement(uZ.default.Provider,{value:{exit:this.handleExit}},oh.default.createElement(oZ.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},oh.default.createElement(lZ.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},oh.default.createElement(sZ.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},oh.default.createElement(aZ.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious}},this.state.error?oh.default.createElement(fZ.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){U7.default.hide(this.props.stdout)}componentWillUnmount(){U7.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(o){this.handleExit(o)}};ec.default=A3;A3.displayName="InternalApp"});var W7=ce(tc=>{"use strict";var hZ=tc&&tc.__createBinding||(Object.create?function(i,o,f,p){p===void 0&&(p=f),Object.defineProperty(i,p,{enumerable:!0,get:function(){return o[f]}})}:function(i,o,f,p){p===void 0&&(p=f),i[p]=o[f]}),vZ=tc&&tc.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),mZ=tc&&tc.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var f in i)f!=="default"&&Object.hasOwnProperty.call(i,f)&&hZ(o,i,f);return vZ(o,i),o},nc=tc&&tc.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(tc,"__esModule",{value:!0});var yZ=nc(su()),z7=B5(),gZ=nc(Z5()),_Z=nc(GD()),EZ=nc(u9()),DZ=nc(l9()),U4=nc(DR()),wZ=nc(p7()),SZ=nc(JD()),TZ=nc(y7()),CZ=mZ(Lw()),xZ=nc(p3()),AZ=nc(j7()),pm=process.env.CI==="false"?!1:EZ.default,q7=()=>{},H7=class{constructor(o){this.resolveExitPromise=()=>{},this.rejectExitPromise=()=>{},this.unsubscribeExit=()=>{},this.onRender=()=>{if(this.isUnmounted)return;let{output:f,outputHeight:p,staticOutput:E}=wZ.default(this.rootNode,this.options.stdout.columns||80),t=E&&E!==` -`;if(this.options.debug){t&&(this.fullStaticOutput+=E),this.options.stdout.write(this.fullStaticOutput+f);return}if(pm){t&&this.options.stdout.write(E),this.lastOutput=f;return}if(t&&(this.fullStaticOutput+=E),p>=this.options.stdout.rows){this.options.stdout.write(_Z.default.clearTerminal+this.fullStaticOutput+f),this.lastOutput=f;return}t&&(this.log.clear(),this.options.stdout.write(E),this.log(f)),!t&&f!==this.lastOutput&&this.throttledLog(f),this.lastOutput=f},DZ.default(this),this.options=o,this.rootNode=CZ.createNode("ink-root"),this.rootNode.onRender=o.debug?this.onRender:z7.throttle(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=gZ.default.create(o.stdout),this.throttledLog=o.debug?this.log:z7.throttle(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=U4.default.createContainer(this.rootNode,!1,!1),this.unsubscribeExit=SZ.default(this.unmount,{alwaysLast:!1}),process.env.DEV==="true"&&U4.default.injectIntoDevTools({bundleType:0,version:"16.13.1",rendererPackageName:"ink"}),o.patchConsole&&this.patchConsole(),pm||(o.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{o.stdout.off("resize",this.onRender)})}render(o){let f=yZ.default.createElement(AZ.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},o);U4.default.updateContainer(f,this.container,null,q7)}writeToStdout(o){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(o+this.fullStaticOutput+this.lastOutput);return}if(pm){this.options.stdout.write(o);return}this.log.clear(),this.options.stdout.write(o),this.log(this.lastOutput)}}writeToStderr(o){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(o),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(pm){this.options.stderr.write(o);return}this.log.clear(),this.options.stderr.write(o),this.log(this.lastOutput)}}unmount(o){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole=="function"&&this.restoreConsole(),typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),pm?this.options.stdout.write(this.lastOutput+` -`):this.options.debug||this.log.done(),this.isUnmounted=!0,U4.default.updateContainer(null,this.container,null,q7),xZ.default.delete(this.options.stdout),o instanceof Error?this.rejectExitPromise(o):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((o,f)=>{this.resolveExitPromise=o,this.rejectExitPromise=f})),this.exitPromise}clear(){!pm&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=TZ.default((o,f)=>{o==="stdout"&&this.writeToStdout(f),o==="stderr"&&(f.startsWith("The above error occurred")||this.writeToStderr(f))}))}};tc.default=H7});var G7=ce(zg=>{"use strict";var V7=zg&&zg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(zg,"__esModule",{value:!0});var RZ=V7(W7()),j4=V7(p3()),OZ=require("stream"),NZ=(i,o)=>{let f=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},kZ(o)),p=MZ(f.stdout,()=>new RZ.default(f));return p.render(i),{rerender:p.render,unmount:()=>p.unmount(),waitUntilExit:p.waitUntilExit,cleanup:()=>j4.default.delete(f.stdout),clear:p.clear}};zg.default=NZ;var kZ=(i={})=>i instanceof OZ.Stream?{stdout:i,stdin:process.stdin}:i,MZ=(i,o)=>{let f;return j4.default.has(i)?f=j4.default.get(i):(f=o(),j4.default.set(i,f)),f}});var K7=ce(J1=>{"use strict";var LZ=J1&&J1.__createBinding||(Object.create?function(i,o,f,p){p===void 0&&(p=f),Object.defineProperty(i,p,{enumerable:!0,get:function(){return o[f]}})}:function(i,o,f,p){p===void 0&&(p=f),i[p]=o[f]}),FZ=J1&&J1.__setModuleDefault||(Object.create?function(i,o){Object.defineProperty(i,"default",{enumerable:!0,value:o})}:function(i,o){i.default=o}),bZ=J1&&J1.__importStar||function(i){if(i&&i.__esModule)return i;var o={};if(i!=null)for(var f in i)f!=="default"&&Object.hasOwnProperty.call(i,f)&&LZ(o,i,f);return FZ(o,i),o};Object.defineProperty(J1,"__esModule",{value:!0});var qg=bZ(su()),Y7=i=>{let{items:o,children:f,style:p}=i,[E,t]=qg.useState(0),k=qg.useMemo(()=>o.slice(E),[o,E]);qg.useLayoutEffect(()=>{t(o.length)},[o.length]);let L=k.map((C,U)=>f(C,E+U)),N=qg.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},p),[p]);return qg.default.createElement("ink-box",{internal_static:!0,style:N},L)};Y7.displayName="Static";J1.default=Y7});var Q7=ce(Hg=>{"use strict";var PZ=Hg&&Hg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Hg,"__esModule",{value:!0});var IZ=PZ(su()),X7=({children:i,transform:o})=>i==null?null:IZ.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:o},i);X7.displayName="Transform";Hg.default=X7});var Z7=ce(Wg=>{"use strict";var BZ=Wg&&Wg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Wg,"__esModule",{value:!0});var UZ=BZ(su()),J7=({count:i=1})=>UZ.default.createElement("ink-text",null,` -`.repeat(i));J7.displayName="Newline";Wg.default=J7});var tO=ce(Vg=>{"use strict";var $7=Vg&&Vg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Vg,"__esModule",{value:!0});var jZ=$7(su()),zZ=$7(B4()),eO=()=>jZ.default.createElement(zZ.default,{flexGrow:1});eO.displayName="Spacer";Vg.default=eO});var z4=ce(Gg=>{"use strict";var qZ=Gg&&Gg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Gg,"__esModule",{value:!0});var HZ=su(),WZ=qZ(y3()),VZ=()=>HZ.useContext(WZ.default);Gg.default=VZ});var rO=ce(Yg=>{"use strict";var GZ=Yg&&Yg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Yg,"__esModule",{value:!0});var nO=su(),YZ=GZ(z4()),KZ=(i,o={})=>{let{stdin:f,setRawMode:p,internal_exitOnCtrlC:E}=YZ.default();nO.useEffect(()=>{if(o.isActive!==!1)return p(!0),()=>{p(!1)}},[o.isActive,p]),nO.useEffect(()=>{if(o.isActive===!1)return;let t=k=>{let L=String(k),N={upArrow:L==="",downArrow:L==="",leftArrow:L==="",rightArrow:L==="",pageDown:L==="[6~",pageUp:L==="[5~",return:L==="\r",escape:L==="",ctrl:!1,shift:!1,tab:L===" "||L==="",backspace:L==="\b",delete:L==="\x7F"||L==="[3~",meta:!1};L<=""&&!N.return&&(L=String.fromCharCode(L.charCodeAt(0)+"a".charCodeAt(0)-1),N.ctrl=!0),L.startsWith("")&&(L=L.slice(1),N.meta=!0);let C=L>="A"&&L<="Z",U=L>="\u0410"&&L<="\u042F";L.length===1&&(C||U)&&(N.shift=!0),N.tab&&L==="[Z"&&(N.shift=!0),(N.tab||N.backspace||N.delete)&&(L=""),(!(L==="c"&&N.ctrl)||!E)&&i(L,N)};return f==null||f.on("data",t),()=>{f==null||f.off("data",t)}},[o.isActive,f,E,i])};Yg.default=KZ});var iO=ce(Kg=>{"use strict";var XZ=Kg&&Kg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Kg,"__esModule",{value:!0});var QZ=su(),JZ=XZ(v3()),ZZ=()=>QZ.useContext(JZ.default);Kg.default=ZZ});var uO=ce(Xg=>{"use strict";var $Z=Xg&&Xg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Xg,"__esModule",{value:!0});var e$=su(),t$=$Z(_3()),n$=()=>e$.useContext(t$.default);Xg.default=n$});var oO=ce(Qg=>{"use strict";var r$=Qg&&Qg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Qg,"__esModule",{value:!0});var i$=su(),u$=r$(D3()),o$=()=>i$.useContext(u$.default);Qg.default=o$});var sO=ce(Jg=>{"use strict";var lO=Jg&&Jg.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Jg,"__esModule",{value:!0});var Zg=su(),l$=lO(P4()),s$=lO(z4()),a$=({isActive:i=!0,autoFocus:o=!1}={})=>{let{isRawModeSupported:f,setRawMode:p}=s$.default(),{activeId:E,add:t,remove:k,activate:L,deactivate:N}=Zg.useContext(l$.default),C=Zg.useMemo(()=>Math.random().toString().slice(2,7),[]);return Zg.useEffect(()=>(t(C,{autoFocus:o}),()=>{k(C)}),[C,o]),Zg.useEffect(()=>{i?L(C):N(C)},[i,C]),Zg.useEffect(()=>{if(!(!f||!i))return p(!0),()=>{p(!1)}},[i]),{isFocused:Boolean(C)&&E===C}};Jg.default=a$});var aO=ce($g=>{"use strict";var f$=$g&&$g.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty($g,"__esModule",{value:!0});var c$=su(),d$=f$(P4()),p$=()=>{let i=c$.useContext(d$.default);return{enableFocus:i.enableFocus,disableFocus:i.disableFocus,focusNext:i.focusNext,focusPrevious:i.focusPrevious}};$g.default=p$});var fO=ce(R3=>{"use strict";Object.defineProperty(R3,"__esModule",{value:!0});R3.default=i=>{var o,f,p,E;return{width:(f=(o=i.yogaNode)===null||o===void 0?void 0:o.getComputedWidth())!==null&&f!==void 0?f:0,height:(E=(p=i.yogaNode)===null||p===void 0?void 0:p.getComputedHeight())!==null&&E!==void 0?E:0}}});var lh=ce(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});var h$=G7();Object.defineProperty(ql,"render",{enumerable:!0,get:function(){return h$.default}});var v$=B4();Object.defineProperty(ql,"Box",{enumerable:!0,get:function(){return v$.default}});var m$=x3();Object.defineProperty(ql,"Text",{enumerable:!0,get:function(){return m$.default}});var y$=K7();Object.defineProperty(ql,"Static",{enumerable:!0,get:function(){return y$.default}});var g$=Q7();Object.defineProperty(ql,"Transform",{enumerable:!0,get:function(){return g$.default}});var _$=Z7();Object.defineProperty(ql,"Newline",{enumerable:!0,get:function(){return _$.default}});var E$=tO();Object.defineProperty(ql,"Spacer",{enumerable:!0,get:function(){return E$.default}});var D$=rO();Object.defineProperty(ql,"useInput",{enumerable:!0,get:function(){return D$.default}});var w$=iO();Object.defineProperty(ql,"useApp",{enumerable:!0,get:function(){return w$.default}});var S$=z4();Object.defineProperty(ql,"useStdin",{enumerable:!0,get:function(){return S$.default}});var T$=uO();Object.defineProperty(ql,"useStdout",{enumerable:!0,get:function(){return T$.default}});var C$=oO();Object.defineProperty(ql,"useStderr",{enumerable:!0,get:function(){return C$.default}});var x$=sO();Object.defineProperty(ql,"useFocus",{enumerable:!0,get:function(){return x$.default}});var A$=aO();Object.defineProperty(ql,"useFocusManager",{enumerable:!0,get:function(){return A$.default}});var R$=fO();Object.defineProperty(ql,"measureElement",{enumerable:!0,get:function(){return R$.default}})});var k$={};sS(k$,{default:()=>N$,versionUtils:()=>RD});var M3=Mi(require("@yarnpkg/core"));var X_=Mi(require("@yarnpkg/cli")),em=Mi(require("@yarnpkg/core")),Q_=Mi(require("@yarnpkg/core")),cd=Mi(require("clipanion"));var RD={};sS(RD,{Decision:()=>Nu,applyPrerelease:()=>v5,applyReleases:()=>ND,applyStrategy:()=>Y_,clearVersionFiles:()=>OD,fetchBase:()=>pK,fetchChangedFiles:()=>vK,fetchRoot:()=>hK,getUndecidedDependentWorkspaces:()=>Zy,getUndecidedWorkspaces:()=>K_,openVersionFile:()=>$v,requireMoreDecisions:()=>yK,resolveVersionFiles:()=>Jy,suggestStrategy:()=>MD,updateVersionFiles:()=>kD,validateReleaseDecision:()=>Zv});var Gi=Mi(require("@yarnpkg/core")),D0=Mi(require("@yarnpkg/fslib")),W1=Mi(require("@yarnpkg/parsers")),Zp=Mi(require("@yarnpkg/plugin-git")),Jv=Mi(require("clipanion")),h5=Mi(p5()),Fc=Mi(require("semver")),pK=Zp.gitUtils.fetchBase,hK=Zp.gitUtils.fetchRoot,vK=Zp.gitUtils.fetchChangedFiles,mK=/^(>=|[~^]|)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/,Nu;(function(k){k.UNDECIDED="undecided",k.DECLINE="decline",k.MAJOR="major",k.MINOR="minor",k.PATCH="patch",k.PRERELEASE="prerelease"})(Nu||(Nu={}));function Zv(i){let o=Fc.default.valid(i);return o||Gi.miscUtils.validateEnum((0,h5.default)(Nu,"UNDECIDED"),i)}async function Jy(i,{prerelease:o=null}={}){var t;let f=new Map,p=i.configuration.get("deferredVersionFolder");if(!D0.xfs.existsSync(p))return new Map;let E=await D0.xfs.readdirPromise(p);for(let k of E){if(!k.endsWith(".yml"))continue;let L=D0.ppath.join(p,k),N=await D0.xfs.readFilePromise(L,"utf8"),C=(0,W1.parseSyml)(N);for(let[U,q]of Object.entries(C.releases||{})){if(q===Nu.DECLINE)continue;let W=Gi.structUtils.parseIdent(U),ne=i.tryWorkspaceByIdent(W);if(ne===null)throw new Error(`Assertion failed: Expected a release definition file to only reference existing workspaces (${D0.ppath.basename(L)} references ${U})`);if(ne.manifest.version===null)throw new Error(`Assertion failed: Expected the workspace to have a version (${Gi.structUtils.prettyLocator(i.configuration,ne.anchoredLocator)})`);let m=(t=ne.manifest.raw.stableVersion)!=null?t:ne.manifest.version,we=f.get(ne),Se=Y_(m,Zv(q));if(Se===null)throw new Error(`Assertion failed: Expected ${m} to support being bumped via strategy ${q}`);let he=typeof we!="undefined"?Fc.default.gt(Se,we)?Se:we:Se;f.set(ne,he)}}return o&&(f=new Map([...f].map(([k,L])=>[k,v5(L,{current:k.manifest.version,prerelease:o})]))),f}async function OD(i){let o=i.configuration.get("deferredVersionFolder");!D0.xfs.existsSync(o)||await D0.xfs.removePromise(o)}async function kD(i){let o=i.configuration.get("deferredVersionFolder");if(!D0.xfs.existsSync(o))return;let f=await D0.xfs.readdirPromise(o);for(let p of f){if(!p.endsWith(".yml"))continue;let E=D0.ppath.join(o,p),t=await D0.xfs.readFilePromise(E,"utf8"),k=(0,W1.parseSyml)(t),L=k==null?void 0:k.releases;if(!!L){for(let N of Object.keys(L)){let C=Gi.structUtils.parseLocator(N);i.tryWorkspaceByLocator(C)===null&&delete k.releases[N]}await D0.xfs.changeFilePromise(E,(0,W1.stringifySyml)(new W1.stringifySyml.PreserveOrdering(k)))}}}async function $v(i,{allowEmpty:o=!1}={}){let f=i.configuration;if(f.projectCwd===null)throw new Jv.UsageError("This command can only be run from within a Yarn project");let p=await Zp.gitUtils.fetchRoot(f.projectCwd),E=p!==null?await Zp.gitUtils.fetchBase(p,{baseRefs:f.get("changesetBaseRefs")}):null,t=p!==null?await Zp.gitUtils.fetchChangedFiles(p,{base:E.hash,project:i}):[],k=f.get("deferredVersionFolder"),L=t.filter(ne=>D0.ppath.contains(k,ne)!==null);if(L.length>1)throw new Jv.UsageError(`Your current branch contains multiple versioning files; this isn't supported: -- ${L.map(ne=>D0.npath.fromPortablePath(ne)).join(` -- `)}`);let N=new Set(Gi.miscUtils.mapAndFilter(t,ne=>{let m=i.tryWorkspaceByFilePath(ne);return m===null?Gi.miscUtils.mapAndFilter.skip:m}));if(L.length===0&&N.size===0&&!o)return null;let C=L.length===1?L[0]:D0.ppath.join(k,`${Gi.hashUtils.makeHash(Math.random().toString()).slice(0,8)}.yml`),U=D0.xfs.existsSync(C)?await D0.xfs.readFilePromise(C,"utf8"):"{}",q=(0,W1.parseSyml)(U),W=new Map;for(let ne of q.declined||[]){let m=Gi.structUtils.parseIdent(ne),we=i.getWorkspaceByIdent(m);W.set(we,Nu.DECLINE)}for(let[ne,m]of Object.entries(q.releases||{})){let we=Gi.structUtils.parseIdent(ne),Se=i.getWorkspaceByIdent(we);W.set(Se,Zv(m))}return{project:i,root:p,baseHash:E!==null?E.hash:null,baseTitle:E!==null?E.title:null,changedFiles:new Set(t),changedWorkspaces:N,releaseRoots:new Set([...N].filter(ne=>ne.manifest.version!==null)),releases:W,async saveAll(){let ne={},m=[],we=[];for(let Se of i.workspaces){if(Se.manifest.version===null)continue;let he=Gi.structUtils.stringifyIdent(Se.locator),ge=W.get(Se);ge===Nu.DECLINE?m.push(he):typeof ge!="undefined"?ne[he]=Zv(ge):N.has(Se)&&we.push(he)}await D0.xfs.mkdirPromise(D0.ppath.dirname(C),{recursive:!0}),await D0.xfs.changeFilePromise(C,(0,W1.stringifySyml)(new W1.stringifySyml.PreserveOrdering({releases:Object.keys(ne).length>0?ne:void 0,declined:m.length>0?m:void 0,undecided:we.length>0?we:void 0})))}}}function yK(i){return K_(i).size>0||Zy(i).length>0}function K_(i){let o=new Set;for(let f of i.changedWorkspaces)f.manifest.version!==null&&(i.releases.has(f)||o.add(f));return o}function Zy(i,{include:o=new Set}={}){let f=[],p=new Map(Gi.miscUtils.mapAndFilter([...i.releases],([t,k])=>k===Nu.DECLINE?Gi.miscUtils.mapAndFilter.skip:[t.anchoredLocator.locatorHash,t])),E=new Map(Gi.miscUtils.mapAndFilter([...i.releases],([t,k])=>k!==Nu.DECLINE?Gi.miscUtils.mapAndFilter.skip:[t.anchoredLocator.locatorHash,t]));for(let t of i.project.workspaces)if(!(!o.has(t)&&(E.has(t.anchoredLocator.locatorHash)||p.has(t.anchoredLocator.locatorHash)))&&t.manifest.version!==null)for(let k of Gi.Manifest.hardDependencies)for(let L of t.manifest.getForScope(k).values()){let N=i.project.tryWorkspaceByDescriptor(L);N!==null&&p.has(N.anchoredLocator.locatorHash)&&f.push([t,N])}return f}function MD(i,o){let f=Fc.default.clean(o);for(let p of Object.values(Nu))if(p!==Nu.UNDECIDED&&p!==Nu.DECLINE&&Fc.default.inc(i,p)===f)return p;return null}function Y_(i,o){if(Fc.default.valid(o))return o;if(i===null)throw new Jv.UsageError(`Cannot apply the release strategy "${o}" unless the workspace already has a valid version`);if(!Fc.default.valid(i))throw new Jv.UsageError(`Cannot apply the release strategy "${o}" on a non-semver version (${i})`);let f=Fc.default.inc(i,o);if(f===null)throw new Jv.UsageError(`Cannot apply the release strategy "${o}" on the specified version (${i})`);return f}function ND(i,o,{report:f}){let p=new Map;for(let E of i.workspaces)for(let t of Gi.Manifest.allDependencies)for(let k of E.manifest[t].values()){let L=i.tryWorkspaceByDescriptor(k);if(L===null||!o.has(L))continue;Gi.miscUtils.getArrayWithDefault(p,L).push([E,t,k.identHash])}for(let[E,t]of o){let k=E.manifest.version;E.manifest.version=t,Fc.default.prerelease(t)===null?delete E.manifest.raw.stableVersion:E.manifest.raw.stableVersion||(E.manifest.raw.stableVersion=k);let L=E.manifest.name!==null?Gi.structUtils.stringifyIdent(E.manifest.name):null;f.reportInfo(Gi.MessageName.UNNAMED,`${Gi.structUtils.prettyLocator(i.configuration,E.anchoredLocator)}: Bumped to ${t}`),f.reportJson({cwd:D0.npath.fromPortablePath(E.cwd),ident:L,oldVersion:k,newVersion:t});let N=p.get(E);if(typeof N!="undefined")for(let[C,U,q]of N){let W=C.manifest[U].get(q);if(typeof W=="undefined")throw new Error("Assertion failed: The dependency should have existed");let ne=W.range,m=!1;if(ne.startsWith(Gi.WorkspaceResolver.protocol)&&(ne=ne.slice(Gi.WorkspaceResolver.protocol.length),m=!0,ne===E.relativeCwd))continue;let we=ne.match(mK);if(!we){f.reportWarning(Gi.MessageName.UNNAMED,`Couldn't auto-upgrade range ${ne} (in ${Gi.structUtils.prettyLocator(i.configuration,C.anchoredLocator)})`);continue}let Se=`${we[1]}${t}`;m&&(Se=`${Gi.WorkspaceResolver.protocol}${Se}`);let he=Gi.structUtils.makeDescriptor(W,Se);C.manifest[U].set(q,he)}}}var gK=new Map([["%n",{extract:i=>i.length>=1?[i[0],i.slice(1)]:null,generate:(i=0)=>`${i+1}`}]]);function v5(i,{current:o,prerelease:f}){let p=new Fc.default.SemVer(o),E=p.prerelease.slice(),t=[];p.prerelease=[],p.format()!==i&&(E.length=0);let k=!0,L=f.split(/\./g);for(let N of L){let C=gK.get(N);if(typeof C=="undefined")t.push(N),E[0]===N?E.shift():k=!1;else{let U=k?C.extract(E):null;U!==null&&typeof U[0]=="number"?(t.push(C.generate(U[0])),E=U[1]):(t.push(C.generate()),k=!1)}}return p.prerelease&&(p.prerelease=[]),`${i}-${t.join(".")}`}var $y=class extends X_.BaseCommand{constructor(){super(...arguments);this.all=cd.Option.Boolean("--all",!1,{description:"Apply the deferred version changes on all workspaces"});this.dryRun=cd.Option.Boolean("--dry-run",!1,{description:"Print the versions without actually generating the package archive"});this.prerelease=cd.Option.String("--prerelease",{description:"Add a prerelease identifier to new versions",tolerateBoolean:!0});this.recursive=cd.Option.Boolean("-R,--recursive",{description:"Release the transitive workspaces as well"});this.json=cd.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let o=await em.Configuration.find(this.context.cwd,this.context.plugins),{project:f,workspace:p}=await Q_.Project.find(o,this.context.cwd),E=await em.Cache.find(o);if(!p)throw new X_.WorkspaceRequiredError(f.cwd,this.context.cwd);return await f.restoreInstallState({restoreResolutions:!1}),(await Q_.StreamReport.start({configuration:o,json:this.json,stdout:this.context.stdout},async k=>{let L=this.prerelease?typeof this.prerelease!="boolean"?this.prerelease:"rc.%n":null,N=await Jy(f,{prerelease:L}),C=new Map;if(this.all)C=N;else{let U=this.recursive?p.getRecursiveWorkspaceDependencies():[p];for(let q of U){let W=N.get(q);typeof W!="undefined"&&C.set(q,W)}}if(C.size===0){let U=N.size>0?" Did you want to add --all?":"";k.reportWarning(em.MessageName.UNNAMED,`The current workspace doesn't seem to require a version bump.${U}`);return}ND(f,C,{report:k}),this.dryRun||(L||(this.all?await OD(f):await kD(f)),k.reportSeparator(),await f.install({cache:E,report:k}))})).exitCode()}};$y.paths=[["version","apply"]],$y.usage=cd.Command.Usage({category:"Release-related commands",description:"apply all the deferred version bumps at once",details:` - This command will apply the deferred version changes and remove their definitions from the repository. - - Note that if \`--prerelease\` is set, the given prerelease identifier (by default \`rc.%d\`) will be used on all new versions and the version definitions will be kept as-is. - - By default only the current workspace will be bumped, but you can configure this behavior by using one of: - - - \`--recursive\` to also apply the version bump on its dependencies - - \`--all\` to apply the version bump on all packages in the repository - - Note that this command will also update the \`workspace:\` references across all your local workspaces, thus ensuring that they keep referring to the same workspaces even after the version bump. - `,examples:[["Apply the version change to the local workspace","yarn version apply"],["Apply the version change to all the workspaces in the local workspace","yarn version apply --all"]]});var m5=$y;var e_=Mi(require("@yarnpkg/cli")),s0=Mi(require("@yarnpkg/core")),rc=Mi(require("@yarnpkg/fslib"));var cO=Mi(lh()),sh=Mi(su()),dO=(0,sh.memo)(({active:i})=>{let o=(0,sh.useMemo)(()=>i?"\u25C9":"\u25EF",[i]),f=(0,sh.useMemo)(()=>i?"green":"yellow",[i]);return sh.default.createElement(cO.Text,{color:f},o)});var yd=Mi(lh()),Js=Mi(su());var pO=Mi(lh()),q4=Mi(su());function hm({active:i},o,f){let{stdin:p}=(0,pO.useStdin)(),E=(0,q4.useCallback)((t,k)=>o(t,k),f);(0,q4.useEffect)(()=>{if(!(!i||!p))return p.on("keypress",E),()=>{p.off("keypress",E)}},[i,E,p])}var ah;(function(f){f.BEFORE="before",f.AFTER="after"})(ah||(ah={}));var hO=function({active:i},o,f){hm({active:i},(p,E)=>{E.name==="tab"&&(E.shift?o(ah.BEFORE):o(ah.AFTER))},f)};var H4=function(i,o,{active:f,minus:p,plus:E,set:t,loop:k=!0}){hm({active:f},(L,N)=>{let C=o.indexOf(i);switch(N.name){case p:{let U=C-1;if(k){t(o[(o.length+U)%o.length]);return}if(U<0)return;t(o[U])}break;case E:{let U=C+1;if(k){t(o[U%o.length]);return}if(U>=o.length)return;t(o[U])}break}},[o,i,E,t,k])};var O3=({active:i=!0,children:o=[],radius:f=10,size:p=1,loop:E=!0,onFocusRequest:t,willReachEnd:k})=>{let L=Se=>{if(Se.key===null)throw new Error("Expected all children to have a key");return Se.key},N=Js.default.Children.map(o,Se=>L(Se)),C=N[0],[U,q]=(0,Js.useState)(C),W=N.indexOf(U);(0,Js.useEffect)(()=>{N.includes(U)||q(C)},[o]),(0,Js.useEffect)(()=>{k&&W>=N.length-2&&k()},[W]),hO({active:i&&!!t},Se=>{t==null||t(Se)},[t]),H4(U,N,{active:i,minus:"up",plus:"down",set:q,loop:E});let ne=W-f,m=W+f;m>N.length&&(ne-=m-N.length,m=N.length),ne<0&&(m+=-ne,ne=0),m>=N.length&&(m=N.length-1);let we=[];for(let Se=ne;Se<=m;++Se){let he=N[Se],ge=i&&he===U;we.push(Js.default.createElement(yd.Box,{key:he,height:p},Js.default.createElement(yd.Box,{marginLeft:1,marginRight:1},Js.default.createElement(yd.Text,null,ge?Js.default.createElement(yd.Text,{color:"cyan",bold:!0},">"):" ")),Js.default.createElement(yd.Box,null,Js.default.cloneElement(o[Se],{active:ge}))))}return Js.default.createElement(yd.Box,{flexDirection:"column",width:"100%"},we)};var W4=Mi(lh()),k3=Mi(su());var vO=Mi(lh()),Z1=Mi(su()),mO=Mi(require("readline")),O$=Z1.default.createContext(null),yO=({children:i})=>{let{stdin:o,setRawMode:f}=(0,vO.useStdin)();(0,Z1.useEffect)(()=>{f&&f(!0),o&&(0,mO.emitKeypressEvents)(o)},[o,f]);let[p,E]=(0,Z1.useState)(new Map),t=(0,Z1.useMemo)(()=>({getAll:()=>p,get:k=>p.get(k),set:(k,L)=>E(new Map([...p,[k,L]]))}),[p,E]);return Z1.default.createElement(O$.Provider,{value:t,children:i})};async function gO(i,o){let f,p=t=>{let{exit:k}=(0,W4.useApp)();hm({active:!0},(L,N)=>{N.name==="return"&&(f=t,k())},[k,t])},{waitUntilExit:E}=(0,W4.render)(k3.default.createElement(yO,null,k3.default.createElement(i,Gf(E0({},o),{useSubmit:p}))));return await E(),f}var fh=Mi(require("clipanion")),Dr=Mi(lh()),Tn=Mi(su()),V4=Mi(require("semver"));var t_=class extends e_.BaseCommand{constructor(){super(...arguments);this.interactive=fh.Option.Boolean("-i,--interactive",{description:"Open an interactive interface used to set version bumps"})}async execute(){return this.interactive?await this.executeInteractive():await this.executeStandard()}async executeInteractive(){let o=await s0.Configuration.find(this.context.cwd,this.context.plugins),{project:f,workspace:p}=await s0.Project.find(o,this.context.cwd);if(!p)throw new e_.WorkspaceRequiredError(f.cwd,this.context.cwd);await f.restoreInstallState();let E=await $v(f);if(E===null||E.releaseRoots.size===0)return 0;if(E.root===null)throw new fh.UsageError("This command can only be run on Git repositories");let t=()=>Tn.default.createElement(Dr.Box,{flexDirection:"row",paddingBottom:1},Tn.default.createElement(Dr.Box,{flexDirection:"column",width:60},Tn.default.createElement(Dr.Box,null,Tn.default.createElement(Dr.Text,null,"Press ",Tn.default.createElement(Dr.Text,{bold:!0,color:"cyanBright"},""),"/",Tn.default.createElement(Dr.Text,{bold:!0,color:"cyanBright"},"")," to select workspaces.")),Tn.default.createElement(Dr.Box,null,Tn.default.createElement(Dr.Text,null,"Press ",Tn.default.createElement(Dr.Text,{bold:!0,color:"cyanBright"},""),"/",Tn.default.createElement(Dr.Text,{bold:!0,color:"cyanBright"},"")," to select release strategies."))),Tn.default.createElement(Dr.Box,{flexDirection:"column"},Tn.default.createElement(Dr.Box,{marginLeft:1},Tn.default.createElement(Dr.Text,null,"Press ",Tn.default.createElement(Dr.Text,{bold:!0,color:"cyanBright"},"")," to save.")),Tn.default.createElement(Dr.Box,{marginLeft:1},Tn.default.createElement(Dr.Text,null,"Press ",Tn.default.createElement(Dr.Text,{bold:!0,color:"cyanBright"},"")," to abort.")))),k=({workspace:W,active:ne,decision:m,setDecision:we})=>{var ze;let Se=(ze=W.manifest.raw.stableVersion)!=null?ze:W.manifest.version;if(Se===null)throw new Error(`Assertion failed: The version should have been set (${s0.structUtils.prettyLocator(o,W.anchoredLocator)})`);if(V4.default.prerelease(Se)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${Se})`);let he=[Nu.UNDECIDED,Nu.DECLINE,Nu.PATCH,Nu.MINOR,Nu.MAJOR];H4(m,he,{active:ne,minus:"left",plus:"right",set:we});let ge=m===Nu.UNDECIDED?Tn.default.createElement(Dr.Text,{color:"yellow"},Se):m===Nu.DECLINE?Tn.default.createElement(Dr.Text,{color:"green"},Se):Tn.default.createElement(Dr.Text,null,Tn.default.createElement(Dr.Text,{color:"magenta"},Se)," \u2192 ",Tn.default.createElement(Dr.Text,{color:"green"},V4.default.valid(m)?m:V4.default.inc(Se,m)));return Tn.default.createElement(Dr.Box,{flexDirection:"column"},Tn.default.createElement(Dr.Box,null,Tn.default.createElement(Dr.Text,null,s0.structUtils.prettyLocator(o,W.anchoredLocator)," - ",ge)),Tn.default.createElement(Dr.Box,null,he.map(pe=>Tn.default.createElement(Dr.Box,{key:pe,paddingLeft:2},Tn.default.createElement(Dr.Text,null,Tn.default.createElement(dO,{active:pe===m})," ",pe)))))},L=W=>{let ne=new Set(E.releaseRoots),m=new Map([...W].filter(([we])=>ne.has(we)));for(;;){let we=Zy({project:E.project,releases:m}),Se=!1;if(we.length>0){for(let[he]of we)if(!ne.has(he)){ne.add(he),Se=!0;let ge=W.get(he);typeof ge!="undefined"&&m.set(he,ge)}}if(!Se)break}return{relevantWorkspaces:ne,relevantReleases:m}},N=()=>{let[W,ne]=(0,Tn.useState)(()=>new Map(E.releases)),m=(0,Tn.useCallback)((we,Se)=>{let he=new Map(W);Se!==Nu.UNDECIDED?he.set(we,Se):he.delete(we);let{relevantReleases:ge}=L(he);ne(ge)},[W,ne]);return[W,m]},C=({workspaces:W,releases:ne})=>{let m=[];m.push(`${W.size} total`);let we=0,Se=0;for(let he of W){let ge=ne.get(he);typeof ge=="undefined"?Se+=1:ge!==Nu.DECLINE&&(we+=1)}return m.push(`${we} release${we===1?"":"s"}`),m.push(`${Se} remaining`),Tn.default.createElement(Dr.Text,{color:"yellow"},m.join(", "))},q=await gO(({useSubmit:W})=>{let[ne,m]=N();W(ne);let{relevantWorkspaces:we}=L(ne),Se=new Set([...we].filter(pe=>!E.releaseRoots.has(pe))),[he,ge]=(0,Tn.useState)(0),ze=(0,Tn.useCallback)(pe=>{switch(pe){case ah.BEFORE:ge(he-1);break;case ah.AFTER:ge(he+1);break}},[he,ge]);return Tn.default.createElement(Dr.Box,{flexDirection:"column"},Tn.default.createElement(t,null),Tn.default.createElement(Dr.Box,null,Tn.default.createElement(Dr.Text,{wrap:"wrap"},"The following files have been modified in your local checkout.")),Tn.default.createElement(Dr.Box,{flexDirection:"column",marginTop:1,paddingLeft:2},[...E.changedFiles].map(pe=>Tn.default.createElement(Dr.Box,{key:pe},Tn.default.createElement(Dr.Text,null,Tn.default.createElement(Dr.Text,{color:"grey"},rc.npath.fromPortablePath(E.root)),rc.npath.sep,rc.npath.relative(rc.npath.fromPortablePath(E.root),rc.npath.fromPortablePath(pe)))))),E.releaseRoots.size>0&&Tn.default.createElement(Tn.default.Fragment,null,Tn.default.createElement(Dr.Box,{marginTop:1},Tn.default.createElement(Dr.Text,{wrap:"wrap"},"Because of those files having been modified, the following workspaces may need to be released again (note that private workspaces are also shown here, because even though they won't be published, releasing them will allow us to flag their dependents for potential re-release):")),Se.size>3?Tn.default.createElement(Dr.Box,{marginTop:1},Tn.default.createElement(C,{workspaces:E.releaseRoots,releases:ne})):null,Tn.default.createElement(Dr.Box,{marginTop:1,flexDirection:"column"},Tn.default.createElement(O3,{active:he%2==0,radius:1,size:2,onFocusRequest:ze},[...E.releaseRoots].map(pe=>Tn.default.createElement(k,{key:pe.cwd,workspace:pe,decision:ne.get(pe)||Nu.UNDECIDED,setDecision:Oe=>m(pe,Oe)}))))),Se.size>0?Tn.default.createElement(Tn.default.Fragment,null,Tn.default.createElement(Dr.Box,{marginTop:1},Tn.default.createElement(Dr.Text,{wrap:"wrap"},"The following workspaces depend on other workspaces that have been marked for release, and thus may need to be released as well:")),Tn.default.createElement(Dr.Box,null,Tn.default.createElement(Dr.Text,null,"(Press ",Tn.default.createElement(Dr.Text,{bold:!0,color:"cyanBright"},"")," to move the focus between the workspace groups.)")),Se.size>5?Tn.default.createElement(Dr.Box,{marginTop:1},Tn.default.createElement(C,{workspaces:Se,releases:ne})):null,Tn.default.createElement(Dr.Box,{marginTop:1,flexDirection:"column"},Tn.default.createElement(O3,{active:he%2==1,radius:2,size:2,onFocusRequest:ze},[...Se].map(pe=>Tn.default.createElement(k,{key:pe.cwd,workspace:pe,decision:ne.get(pe)||Nu.UNDECIDED,setDecision:Oe=>m(pe,Oe)}))))):null)},{versionFile:E});if(typeof q=="undefined")return 1;E.releases.clear();for(let[W,ne]of q)E.releases.set(W,ne);await E.saveAll()}async executeStandard(){let o=await s0.Configuration.find(this.context.cwd,this.context.plugins),{project:f,workspace:p}=await s0.Project.find(o,this.context.cwd);if(!p)throw new e_.WorkspaceRequiredError(f.cwd,this.context.cwd);return await f.restoreInstallState(),(await s0.StreamReport.start({configuration:o,stdout:this.context.stdout},async t=>{let k=await $v(f);if(k===null||k.releaseRoots.size===0)return;if(k.root===null)throw new fh.UsageError("This command can only be run on Git repositories");if(t.reportInfo(s0.MessageName.UNNAMED,`Your PR was started right after ${s0.formatUtils.pretty(o,k.baseHash.slice(0,7),"yellow")} ${s0.formatUtils.pretty(o,k.baseTitle,"magenta")}`),k.changedFiles.size>0){t.reportInfo(s0.MessageName.UNNAMED,"You have changed the following files since then:"),t.reportSeparator();for(let q of k.changedFiles)t.reportInfo(null,`${s0.formatUtils.pretty(o,rc.npath.fromPortablePath(k.root),"gray")}${rc.npath.sep}${rc.npath.relative(rc.npath.fromPortablePath(k.root),rc.npath.fromPortablePath(q))}`)}let L=!1,N=!1,C=K_(k);if(C.size>0){L||t.reportSeparator();for(let q of C)t.reportError(s0.MessageName.UNNAMED,`${s0.structUtils.prettyLocator(o,q.anchoredLocator)} has been modified but doesn't have a release strategy attached`);L=!0}let U=Zy(k);for(let[q,W]of U)N||t.reportSeparator(),t.reportError(s0.MessageName.UNNAMED,`${s0.structUtils.prettyLocator(o,q.anchoredLocator)} doesn't have a release strategy attached, but depends on ${s0.structUtils.prettyWorkspace(o,W)} which is planned for release.`),N=!0;(L||N)&&(t.reportSeparator(),t.reportInfo(s0.MessageName.UNNAMED,"This command detected that at least some workspaces have received modifications without explicit instructions as to how they had to be released (if needed)."),t.reportInfo(s0.MessageName.UNNAMED,"To correct these errors, run `yarn version check --interactive` then follow the instructions."))})).exitCode()}};t_.paths=[["version","check"]],t_.usage=fh.Command.Usage({category:"Release-related commands",description:"check that all the relevant packages have been bumped",details:"\n **Warning:** This command currently requires Git.\n\n This command will check that all the packages covered by the files listed in argument have been properly bumped or declined to bump.\n\n In the case of a bump, the check will also cover transitive packages - meaning that should `Foo` be bumped, a package `Bar` depending on `Foo` will require a decision as to whether `Bar` will need to be bumped. This check doesn't cross packages that have declined to bump.\n\n In case no arguments are passed to the function, the list of modified files will be generated by comparing the HEAD against `master`.\n ",examples:[["Check whether the modified packages need a bump","yarn version check"]]});var _O=t_;var G4=Mi(require("@yarnpkg/cli")),Y4=Mi(require("@yarnpkg/core")),Bc=Mi(require("clipanion")),K4=Mi(require("semver"));var n_=class extends G4.BaseCommand{constructor(){super(...arguments);this.deferred=Bc.Option.Boolean("-d,--deferred",{description:"Prepare the version to be bumped during the next release cycle"});this.immediate=Bc.Option.Boolean("-i,--immediate",{description:"Bump the version immediately"});this.strategy=Bc.Option.String()}async execute(){let o=await Y4.Configuration.find(this.context.cwd,this.context.plugins),{project:f,workspace:p}=await Y4.Project.find(o,this.context.cwd);if(!p)throw new G4.WorkspaceRequiredError(f.cwd,this.context.cwd);let E=o.get("preferDeferredVersions");this.deferred&&(E=!0),this.immediate&&(E=!1);let t=K4.default.valid(this.strategy),k=this.strategy===Nu.DECLINE,L;if(t)if(p.manifest.version!==null){let C=MD(p.manifest.version,this.strategy);C!==null?L=C:L=this.strategy}else L=this.strategy;else{let C=p.manifest.version;if(!k){if(C===null)throw new Bc.UsageError("Can't bump the version if there wasn't a version to begin with - use 0.0.0 as initial version then run the command again.");if(typeof C!="string"||!K4.default.valid(C))throw new Bc.UsageError(`Can't bump the version (${C}) if it's not valid semver`)}L=Zv(this.strategy)}if(!E){let U=(await Jy(f)).get(p);if(typeof U!="undefined"&&L!==Nu.DECLINE){let q=Y_(p.manifest.version,L);if(K4.default.lt(q,U))throw new Bc.UsageError(`Can't bump the version to one that would be lower than the current deferred one (${U})`)}}let N=await $v(f,{allowEmpty:!0});return N.releases.set(p,L),await N.saveAll(),E?0:await this.cli.run(["version","apply"])}};n_.paths=[["version"]],n_.usage=Bc.Command.Usage({category:"Release-related commands",description:"apply a new version to the current package",details:"\n This command will bump the version number for the given package, following the specified strategy:\n\n - If `major`, the first number from the semver range will be increased (`X.0.0`).\n - If `minor`, the second number from the semver range will be increased (`0.X.0`).\n - If `patch`, the third number from the semver range will be increased (`0.0.X`).\n - If prefixed by `pre` (`premajor`, ...), a `-0` suffix will be set (`0.0.0-0`).\n - If `prerelease`, the suffix will be increased (`0.0.0-X`); the third number from the semver range will also be increased if there was no suffix in the previous version.\n - If `decline`, the nonce will be increased for `yarn version check` to pass without version bump.\n - If a valid semver range, it will be used as new version.\n - If unspecified, Yarn will ask you for guidance.\n\n For more information about the `--deferred` flag, consult our documentation (https://yarnpkg.com/features/release-workflow#deferred-versioning).\n ",examples:[["Immediately bump the version to the next major","yarn version major"],["Prepare the version to be bumped to the next major","yarn version major --deferred"]]});var EO=n_;var M$={configuration:{deferredVersionFolder:{description:"Folder where are stored the versioning files",type:M3.SettingsType.ABSOLUTE_PATH,default:"./.yarn/versions"},preferDeferredVersions:{description:"If true, running `yarn version` will assume the `--deferred` flag unless `--immediate` is set",type:M3.SettingsType.BOOLEAN,default:!1}},commands:[m5,_O,EO]},N$=M$;return k$;})(); -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ -/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ -/** @license React v0.0.0-experimental-51a3aa6af - * react-debug-tools.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.0.0-experimental-51a3aa6af - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.0.0-experimental-51a3aa6af - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.18.0 - * scheduler-tracing.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.18.0 - * scheduler-tracing.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.18.0 - * scheduler.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.18.0 - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.24.0 - * react-reconciler.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v0.24.0 - * react-reconciler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v16.13.1 - * react.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/** @license React v16.13.1 - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -return plugin; -} -}; diff --git a/.yarn/releases/yarn-3.3.1.cjs b/.yarn/releases/yarn-3.3.1.cjs deleted file mode 100755 index 53a282e4..00000000 --- a/.yarn/releases/yarn-3.3.1.cjs +++ /dev/null @@ -1,823 +0,0 @@ -#!/usr/bin/env node -/* eslint-disable */ -//prettier-ignore -(()=>{var dfe=Object.create;var jS=Object.defineProperty;var Cfe=Object.getOwnPropertyDescriptor;var mfe=Object.getOwnPropertyNames;var Efe=Object.getPrototypeOf,Ife=Object.prototype.hasOwnProperty;var J=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var y=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),ht=(r,e)=>{for(var t in e)jS(r,t,{get:e[t],enumerable:!0})},yfe=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of mfe(e))!Ife.call(r,n)&&n!==t&&jS(r,n,{get:()=>e[n],enumerable:!(i=Cfe(e,n))||i.enumerable});return r};var ne=(r,e,t)=>(t=r!=null?dfe(Efe(r)):{},yfe(e||!r||!r.__esModule?jS(t,"default",{value:r,enumerable:!0}):t,r));var aK=y((uZe,oK)=>{oK.exports=sK;sK.sync=Gfe;var iK=J("fs");function Hfe(r,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var i=0;i{uK.exports=lK;lK.sync=Yfe;var AK=J("fs");function lK(r,e,t){AK.stat(r,function(i,n){t(i,i?!1:cK(n,e))})}function Yfe(r,e){return cK(AK.statSync(r),e)}function cK(r,e){return r.isFile()&&jfe(r,e)}function jfe(r,e){var t=r.mode,i=r.uid,n=r.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),c=parseInt("001",8),u=a|l,g=t&c||t&l&&n===o||t&a&&i===s||t&u&&s===0;return g}});var hK=y((hZe,fK)=>{var fZe=J("fs"),OI;process.platform==="win32"||global.TESTING_WINDOWS?OI=aK():OI=gK();fK.exports=av;av.sync=qfe;function av(r,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){av(r,e||{},function(s,o){s?n(s):i(o)})})}OI(r,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),t(i,n)})}function qfe(r,e){try{return OI.sync(r,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var yK=y((pZe,IK)=>{var _g=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",pK=J("path"),Jfe=_g?";":":",dK=hK(),CK=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"}),mK=(r,e)=>{let t=e.colon||Jfe,i=r.match(/\//)||_g&&r.match(/\\/)?[""]:[..._g?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],n=_g?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=_g?n.split(t):[""];return _g&&r.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},EK=(r,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=mK(r,e),o=[],a=c=>new Promise((u,g)=>{if(c===i.length)return e.all&&o.length?u(o):g(CK(r));let f=i[c],h=/^".*"$/.test(f)?f.slice(1,-1):f,p=pK.join(h,r),C=!h&&/^\.[\\\/]/.test(r)?r.slice(0,2)+p:p;u(l(C,c,0))}),l=(c,u,g)=>new Promise((f,h)=>{if(g===n.length)return f(a(u+1));let p=n[g];dK(c+p,{pathExt:s},(C,w)=>{if(!C&&w)if(e.all)o.push(c+p);else return f(c+p);return f(l(c,u,g+1))})});return t?a(0).then(c=>t(null,c),t):a(0)},Wfe=(r,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:n}=mK(r,e),s=[];for(let o=0;o{"use strict";var wK=(r={})=>{let e=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};Av.exports=wK;Av.exports.default=wK});var vK=y((CZe,SK)=>{"use strict";var bK=J("path"),zfe=yK(),Vfe=BK();function QK(r,e){let t=r.options.env||process.env,i=process.cwd(),n=r.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(r.options.cwd)}catch{}let o;try{o=zfe.sync(r.command,{path:t[Vfe({env:t})],pathExt:e?bK.delimiter:void 0})}catch{}finally{s&&process.chdir(i)}return o&&(o=bK.resolve(n?r.options.cwd:"",o)),o}function Xfe(r){return QK(r)||QK(r,!0)}SK.exports=Xfe});var xK=y((mZe,cv)=>{"use strict";var lv=/([()\][%!^"`<>&|;, *?])/g;function _fe(r){return r=r.replace(lv,"^$1"),r}function Zfe(r,e){return r=`${r}`,r=r.replace(/(\\*)"/g,'$1$1\\"'),r=r.replace(/(\\*)$/,"$1$1"),r=`"${r}"`,r=r.replace(lv,"^$1"),e&&(r=r.replace(lv,"^$1")),r}cv.exports.command=_fe;cv.exports.argument=Zfe});var DK=y((EZe,PK)=>{"use strict";PK.exports=/^#!(.*)/});var RK=y((IZe,kK)=>{"use strict";var $fe=DK();kK.exports=(r="")=>{let e=r.match($fe);if(!e)return null;let[t,i]=e[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var NK=y((yZe,FK)=>{"use strict";var uv=J("fs"),ehe=RK();function the(r){let t=Buffer.alloc(150),i;try{i=uv.openSync(r,"r"),uv.readSync(i,t,0,150,0),uv.closeSync(i)}catch{}return ehe(t.toString())}FK.exports=the});var MK=y((wZe,OK)=>{"use strict";var rhe=J("path"),TK=vK(),LK=xK(),ihe=NK(),nhe=process.platform==="win32",she=/\.(?:com|exe)$/i,ohe=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function ahe(r){r.file=TK(r);let e=r.file&&ihe(r.file);return e?(r.args.unshift(r.file),r.command=e,TK(r)):r.file}function Ahe(r){if(!nhe)return r;let e=ahe(r),t=!she.test(e);if(r.options.forceShell||t){let i=ohe.test(e);r.command=rhe.normalize(r.command),r.command=LK.command(r.command),r.args=r.args.map(s=>LK.argument(s,i));let n=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${n}"`],r.command=process.env.comspec||"cmd.exe",r.options.windowsVerbatimArguments=!0}return r}function lhe(r,e,t){e&&!Array.isArray(e)&&(t=e,e=null),e=e?e.slice(0):[],t=Object.assign({},t);let i={command:r,args:e,options:t,file:void 0,original:{command:r,args:e}};return t.shell?i:Ahe(i)}OK.exports=lhe});var HK=y((BZe,KK)=>{"use strict";var gv=process.platform==="win32";function fv(r,e){return Object.assign(new Error(`${e} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${r.command}`,path:r.command,spawnargs:r.args})}function che(r,e){if(!gv)return;let t=r.emit;r.emit=function(i,n){if(i==="exit"){let s=UK(n,e,"spawn");if(s)return t.call(r,"error",s)}return t.apply(r,arguments)}}function UK(r,e){return gv&&r===1&&!e.file?fv(e.original,"spawn"):null}function uhe(r,e){return gv&&r===1&&!e.file?fv(e.original,"spawnSync"):null}KK.exports={hookChildProcess:che,verifyENOENT:UK,verifyENOENTSync:uhe,notFoundError:fv}});var dv=y((bZe,Zg)=>{"use strict";var GK=J("child_process"),hv=MK(),pv=HK();function YK(r,e,t){let i=hv(r,e,t),n=GK.spawn(i.command,i.args,i.options);return pv.hookChildProcess(n,i),n}function ghe(r,e,t){let i=hv(r,e,t),n=GK.spawnSync(i.command,i.args,i.options);return n.error=n.error||pv.verifyENOENTSync(n.status,i),n}Zg.exports=YK;Zg.exports.spawn=YK;Zg.exports.sync=ghe;Zg.exports._parse=hv;Zg.exports._enoent=pv});var qK=y((QZe,jK)=>{"use strict";function fhe(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function uc(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,uc)}fhe(uc,Error);uc.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g>",re=de(">>",!1),me=">&",tt=de(">&",!1),Rt=">",It=de(">",!1),Ur="<<<",oi=de("<<<",!1),pi="<&",pr=de("<&",!1),di="<",ai=de("<",!1),Os=function(m){return{type:"argument",segments:[].concat(...m)}},dr=function(m){return m},Bi="$'",_n=de("$'",!1),pa="'",EA=de("'",!1),kg=function(m){return[{type:"text",text:m}]},Zn='""',IA=de('""',!1),da=function(){return{type:"text",text:""}},Jp='"',yA=de('"',!1),wA=function(m){return m},Br=function(m){return{type:"arithmetic",arithmetic:m,quoted:!0}},Vl=function(m){return{type:"shell",shell:m,quoted:!0}},Rg=function(m){return{type:"variable",...m,quoted:!0}},Eo=function(m){return{type:"text",text:m}},Fg=function(m){return{type:"arithmetic",arithmetic:m,quoted:!1}},Wp=function(m){return{type:"shell",shell:m,quoted:!1}},zp=function(m){return{type:"variable",...m,quoted:!1}},Pr=function(m){return{type:"glob",pattern:m}},oe=/^[^']/,Io=Ye(["'"],!0,!1),kn=function(m){return m.join("")},Ng=/^[^$"]/,bt=Ye(["$",'"'],!0,!1),Xl=`\\ -`,Rn=de(`\\ -`,!1),$n=function(){return""},es="\\",ut=de("\\",!1),yo=/^[\\$"`]/,at=Ye(["\\","$",'"',"`"],!1,!1),ln=function(m){return m},S="\\a",Lt=de("\\a",!1),Tg=function(){return"a"},_l="\\b",Vp=de("\\b",!1),Xp=function(){return"\b"},_p=/^[Ee]/,Zp=Ye(["E","e"],!1,!1),$p=function(){return"\x1B"},G="\\f",yt=de("\\f",!1),BA=function(){return"\f"},Wi="\\n",Zl=de("\\n",!1),We=function(){return` -`},Ca="\\r",Lg=de("\\r",!1),uI=function(){return"\r"},ed="\\t",gI=de("\\t",!1),ar=function(){return" "},Fn="\\v",$l=de("\\v",!1),td=function(){return"\v"},Ms=/^[\\'"?]/,ma=Ye(["\\","'",'"',"?"],!1,!1),cn=function(m){return String.fromCharCode(parseInt(m,16))},ke="\\x",Og=de("\\x",!1),ec="\\u",Us=de("\\u",!1),tc="\\U",bA=de("\\U",!1),Mg=function(m){return String.fromCodePoint(parseInt(m,16))},Ug=/^[0-7]/,Ea=Ye([["0","7"]],!1,!1),Ia=/^[0-9a-fA-f]/,$e=Ye([["0","9"],["a","f"],["A","f"]],!1,!1),wo=rt(),QA="-",rc=de("-",!1),Ks="+",ic=de("+",!1),fI=".",rd=de(".",!1),Kg=function(m,Q,F){return{type:"number",value:(m==="-"?-1:1)*parseFloat(Q.join("")+"."+F.join(""))}},id=function(m,Q){return{type:"number",value:(m==="-"?-1:1)*parseInt(Q.join(""))}},hI=function(m){return{type:"variable",...m}},nc=function(m){return{type:"variable",name:m}},pI=function(m){return m},Hg="*",SA=de("*",!1),Nr="/",dI=de("/",!1),Hs=function(m,Q,F){return{type:Q==="*"?"multiplication":"division",right:F}},Gs=function(m,Q){return Q.reduce((F,K)=>({left:F,...K}),m)},Gg=function(m,Q,F){return{type:Q==="+"?"addition":"subtraction",right:F}},vA="$((",R=de("$((",!1),q="))",pe=de("))",!1),Ne=function(m){return m},xe="$(",qe=de("$(",!1),dt=function(m){return m},Ft="${",Nn=de("${",!1),vS=":-",AU=de(":-",!1),lU=function(m,Q){return{name:m,defaultValue:Q}},xS=":-}",cU=de(":-}",!1),uU=function(m){return{name:m,defaultValue:[]}},PS=":+",gU=de(":+",!1),fU=function(m,Q){return{name:m,alternativeValue:Q}},DS=":+}",hU=de(":+}",!1),pU=function(m){return{name:m,alternativeValue:[]}},kS=function(m){return{name:m}},dU="$",CU=de("$",!1),mU=function(m){return e.isGlobPattern(m)},EU=function(m){return m},RS=/^[a-zA-Z0-9_]/,FS=Ye([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),NS=function(){return O()},TS=/^[$@*?#a-zA-Z0-9_\-]/,LS=Ye(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),IU=/^[(){}<>$|&; \t"']/,Yg=Ye(["(",")","{","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),OS=/^[<>&; \t"']/,MS=Ye(["<",">","&",";"," "," ",'"',"'"],!1,!1),CI=/^[ \t]/,mI=Ye([" "," "],!1,!1),b=0,Fe=0,xA=[{line:1,column:1}],d=0,E=[],I=0,k;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function O(){return r.substring(Fe,b)}function X(){return Et(Fe,b)}function te(m,Q){throw Q=Q!==void 0?Q:Et(Fe,b),Fi([At(m)],r.substring(Fe,b),Q)}function ye(m,Q){throw Q=Q!==void 0?Q:Et(Fe,b),Tn(m,Q)}function de(m,Q){return{type:"literal",text:m,ignoreCase:Q}}function Ye(m,Q,F){return{type:"class",parts:m,inverted:Q,ignoreCase:F}}function rt(){return{type:"any"}}function wt(){return{type:"end"}}function At(m){return{type:"other",description:m}}function et(m){var Q=xA[m],F;if(Q)return Q;for(F=m-1;!xA[F];)F--;for(Q=xA[F],Q={line:Q.line,column:Q.column};Fd&&(d=b,E=[]),E.push(m))}function Tn(m,Q){return new uc(m,null,null,Q)}function Fi(m,Q,F){return new uc(uc.buildMessage(m,Q),m,Q,F)}function PA(){var m,Q;return m=b,Q=Kr(),Q===t&&(Q=null),Q!==t&&(Fe=m,Q=s(Q)),m=Q,m}function Kr(){var m,Q,F,K,ce;if(m=b,Q=Hr(),Q!==t){for(F=[],K=Me();K!==t;)F.push(K),K=Me();F!==t?(K=ya(),K!==t?(ce=ts(),ce===t&&(ce=null),ce!==t?(Fe=m,Q=o(Q,K,ce),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;if(m===t)if(m=b,Q=Hr(),Q!==t){for(F=[],K=Me();K!==t;)F.push(K),K=Me();F!==t?(K=ya(),K===t&&(K=null),K!==t?(Fe=m,Q=a(Q,K),m=Q):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;return m}function ts(){var m,Q,F,K,ce;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t)if(F=Kr(),F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();K!==t?(Fe=m,Q=l(F),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t;return m}function ya(){var m;return r.charCodeAt(b)===59?(m=c,b++):(m=t,I===0&&Be(u)),m===t&&(r.charCodeAt(b)===38?(m=g,b++):(m=t,I===0&&Be(f))),m}function Hr(){var m,Q,F;return m=b,Q=yU(),Q!==t?(F=$ge(),F===t&&(F=null),F!==t?(Fe=m,Q=h(Q,F),m=Q):(b=m,m=t)):(b=m,m=t),m}function $ge(){var m,Q,F,K,ce,Qe,ft;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t)if(F=efe(),F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();if(K!==t)if(ce=Hr(),ce!==t){for(Qe=[],ft=Me();ft!==t;)Qe.push(ft),ft=Me();Qe!==t?(Fe=m,Q=p(F,ce),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t;return m}function efe(){var m;return r.substr(b,2)===C?(m=C,b+=2):(m=t,I===0&&Be(w)),m===t&&(r.substr(b,2)===B?(m=B,b+=2):(m=t,I===0&&Be(v))),m}function yU(){var m,Q,F;return m=b,Q=ife(),Q!==t?(F=tfe(),F===t&&(F=null),F!==t?(Fe=m,Q=D(Q,F),m=Q):(b=m,m=t)):(b=m,m=t),m}function tfe(){var m,Q,F,K,ce,Qe,ft;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t)if(F=rfe(),F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();if(K!==t)if(ce=yU(),ce!==t){for(Qe=[],ft=Me();ft!==t;)Qe.push(ft),ft=Me();Qe!==t?(Fe=m,Q=T(F,ce),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t;return m}function rfe(){var m;return r.substr(b,2)===H?(m=H,b+=2):(m=t,I===0&&Be(j)),m===t&&(r.charCodeAt(b)===124?(m=$,b++):(m=t,I===0&&Be(V))),m}function EI(){var m,Q,F,K,ce,Qe;if(m=b,Q=FU(),Q!==t)if(r.charCodeAt(b)===61?(F=W,b++):(F=t,I===0&&Be(Z)),F!==t)if(K=bU(),K!==t){for(ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();ce!==t?(Fe=m,Q=A(Q,K),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t;else b=m,m=t;if(m===t)if(m=b,Q=FU(),Q!==t)if(r.charCodeAt(b)===61?(F=W,b++):(F=t,I===0&&Be(Z)),F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();K!==t?(Fe=m,Q=ae(Q),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t;return m}function ife(){var m,Q,F,K,ce,Qe,ft,Bt,Vr,Ci,rs;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t)if(r.charCodeAt(b)===40?(F=ge,b++):(F=t,I===0&&Be(_)),F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();if(K!==t)if(ce=Kr(),ce!==t){for(Qe=[],ft=Me();ft!==t;)Qe.push(ft),ft=Me();if(Qe!==t)if(r.charCodeAt(b)===41?(ft=L,b++):(ft=t,I===0&&Be(N)),ft!==t){for(Bt=[],Vr=Me();Vr!==t;)Bt.push(Vr),Vr=Me();if(Bt!==t){for(Vr=[],Ci=nd();Ci!==t;)Vr.push(Ci),Ci=nd();if(Vr!==t){for(Ci=[],rs=Me();rs!==t;)Ci.push(rs),rs=Me();Ci!==t?(Fe=m,Q=ue(ce,Vr),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t;if(m===t){for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t)if(r.charCodeAt(b)===123?(F=we,b++):(F=t,I===0&&Be(Te)),F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();if(K!==t)if(ce=Kr(),ce!==t){for(Qe=[],ft=Me();ft!==t;)Qe.push(ft),ft=Me();if(Qe!==t)if(r.charCodeAt(b)===125?(ft=Pe,b++):(ft=t,I===0&&Be(Le)),ft!==t){for(Bt=[],Vr=Me();Vr!==t;)Bt.push(Vr),Vr=Me();if(Bt!==t){for(Vr=[],Ci=nd();Ci!==t;)Vr.push(Ci),Ci=nd();if(Vr!==t){for(Ci=[],rs=Me();rs!==t;)Ci.push(rs),rs=Me();Ci!==t?(Fe=m,Q=se(ce,Vr),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t;if(m===t){for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t){for(F=[],K=EI();K!==t;)F.push(K),K=EI();if(F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();if(K!==t){if(ce=[],Qe=BU(),Qe!==t)for(;Qe!==t;)ce.push(Qe),Qe=BU();else ce=t;if(ce!==t){for(Qe=[],ft=Me();ft!==t;)Qe.push(ft),ft=Me();Qe!==t?(Fe=m,Q=Ae(F,ce),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t}else b=m,m=t}else b=m,m=t;if(m===t){for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t){if(F=[],K=EI(),K!==t)for(;K!==t;)F.push(K),K=EI();else F=t;if(F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();K!==t?(Fe=m,Q=be(F),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t}}}return m}function wU(){var m,Q,F,K,ce;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t){if(F=[],K=II(),K!==t)for(;K!==t;)F.push(K),K=II();else F=t;if(F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();K!==t?(Fe=m,Q=fe(F),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t;return m}function BU(){var m,Q,F;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t?(F=nd(),F!==t?(Fe=m,Q=le(F),m=Q):(b=m,m=t)):(b=m,m=t),m===t){for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();Q!==t?(F=II(),F!==t?(Fe=m,Q=le(F),m=Q):(b=m,m=t)):(b=m,m=t)}return m}function nd(){var m,Q,F,K,ce;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();return Q!==t?(Ge.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(ie)),F===t&&(F=null),F!==t?(K=nfe(),K!==t?(ce=II(),ce!==t?(Fe=m,Q=Y(F,K,ce),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m}function nfe(){var m;return r.substr(b,2)===he?(m=he,b+=2):(m=t,I===0&&Be(re)),m===t&&(r.substr(b,2)===me?(m=me,b+=2):(m=t,I===0&&Be(tt)),m===t&&(r.charCodeAt(b)===62?(m=Rt,b++):(m=t,I===0&&Be(It)),m===t&&(r.substr(b,3)===Ur?(m=Ur,b+=3):(m=t,I===0&&Be(oi)),m===t&&(r.substr(b,2)===pi?(m=pi,b+=2):(m=t,I===0&&Be(pr)),m===t&&(r.charCodeAt(b)===60?(m=di,b++):(m=t,I===0&&Be(ai))))))),m}function II(){var m,Q,F;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();return Q!==t?(F=bU(),F!==t?(Fe=m,Q=le(F),m=Q):(b=m,m=t)):(b=m,m=t),m}function bU(){var m,Q,F;if(m=b,Q=[],F=QU(),F!==t)for(;F!==t;)Q.push(F),F=QU();else Q=t;return Q!==t&&(Fe=m,Q=Os(Q)),m=Q,m}function QU(){var m,Q;return m=b,Q=sfe(),Q!==t&&(Fe=m,Q=dr(Q)),m=Q,m===t&&(m=b,Q=ofe(),Q!==t&&(Fe=m,Q=dr(Q)),m=Q,m===t&&(m=b,Q=afe(),Q!==t&&(Fe=m,Q=dr(Q)),m=Q,m===t&&(m=b,Q=Afe(),Q!==t&&(Fe=m,Q=dr(Q)),m=Q))),m}function sfe(){var m,Q,F,K;return m=b,r.substr(b,2)===Bi?(Q=Bi,b+=2):(Q=t,I===0&&Be(_n)),Q!==t?(F=ufe(),F!==t?(r.charCodeAt(b)===39?(K=pa,b++):(K=t,I===0&&Be(EA)),K!==t?(Fe=m,Q=kg(F),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m}function ofe(){var m,Q,F,K;return m=b,r.charCodeAt(b)===39?(Q=pa,b++):(Q=t,I===0&&Be(EA)),Q!==t?(F=lfe(),F!==t?(r.charCodeAt(b)===39?(K=pa,b++):(K=t,I===0&&Be(EA)),K!==t?(Fe=m,Q=kg(F),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m}function afe(){var m,Q,F,K;if(m=b,r.substr(b,2)===Zn?(Q=Zn,b+=2):(Q=t,I===0&&Be(IA)),Q!==t&&(Fe=m,Q=da()),m=Q,m===t)if(m=b,r.charCodeAt(b)===34?(Q=Jp,b++):(Q=t,I===0&&Be(yA)),Q!==t){for(F=[],K=SU();K!==t;)F.push(K),K=SU();F!==t?(r.charCodeAt(b)===34?(K=Jp,b++):(K=t,I===0&&Be(yA)),K!==t?(Fe=m,Q=wA(F),m=Q):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;return m}function Afe(){var m,Q,F;if(m=b,Q=[],F=vU(),F!==t)for(;F!==t;)Q.push(F),F=vU();else Q=t;return Q!==t&&(Fe=m,Q=wA(Q)),m=Q,m}function SU(){var m,Q;return m=b,Q=kU(),Q!==t&&(Fe=m,Q=Br(Q)),m=Q,m===t&&(m=b,Q=RU(),Q!==t&&(Fe=m,Q=Vl(Q)),m=Q,m===t&&(m=b,Q=GS(),Q!==t&&(Fe=m,Q=Rg(Q)),m=Q,m===t&&(m=b,Q=cfe(),Q!==t&&(Fe=m,Q=Eo(Q)),m=Q))),m}function vU(){var m,Q;return m=b,Q=kU(),Q!==t&&(Fe=m,Q=Fg(Q)),m=Q,m===t&&(m=b,Q=RU(),Q!==t&&(Fe=m,Q=Wp(Q)),m=Q,m===t&&(m=b,Q=GS(),Q!==t&&(Fe=m,Q=zp(Q)),m=Q,m===t&&(m=b,Q=hfe(),Q!==t&&(Fe=m,Q=Pr(Q)),m=Q,m===t&&(m=b,Q=ffe(),Q!==t&&(Fe=m,Q=Eo(Q)),m=Q)))),m}function lfe(){var m,Q,F;for(m=b,Q=[],oe.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(Io));F!==t;)Q.push(F),oe.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(Io));return Q!==t&&(Fe=m,Q=kn(Q)),m=Q,m}function cfe(){var m,Q,F;if(m=b,Q=[],F=xU(),F===t&&(Ng.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(bt))),F!==t)for(;F!==t;)Q.push(F),F=xU(),F===t&&(Ng.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(bt)));else Q=t;return Q!==t&&(Fe=m,Q=kn(Q)),m=Q,m}function xU(){var m,Q,F;return m=b,r.substr(b,2)===Xl?(Q=Xl,b+=2):(Q=t,I===0&&Be(Rn)),Q!==t&&(Fe=m,Q=$n()),m=Q,m===t&&(m=b,r.charCodeAt(b)===92?(Q=es,b++):(Q=t,I===0&&Be(ut)),Q!==t?(yo.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(at)),F!==t?(Fe=m,Q=ln(F),m=Q):(b=m,m=t)):(b=m,m=t)),m}function ufe(){var m,Q,F;for(m=b,Q=[],F=PU(),F===t&&(oe.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(Io)));F!==t;)Q.push(F),F=PU(),F===t&&(oe.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(Io)));return Q!==t&&(Fe=m,Q=kn(Q)),m=Q,m}function PU(){var m,Q,F;return m=b,r.substr(b,2)===S?(Q=S,b+=2):(Q=t,I===0&&Be(Lt)),Q!==t&&(Fe=m,Q=Tg()),m=Q,m===t&&(m=b,r.substr(b,2)===_l?(Q=_l,b+=2):(Q=t,I===0&&Be(Vp)),Q!==t&&(Fe=m,Q=Xp()),m=Q,m===t&&(m=b,r.charCodeAt(b)===92?(Q=es,b++):(Q=t,I===0&&Be(ut)),Q!==t?(_p.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(Zp)),F!==t?(Fe=m,Q=$p(),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===G?(Q=G,b+=2):(Q=t,I===0&&Be(yt)),Q!==t&&(Fe=m,Q=BA()),m=Q,m===t&&(m=b,r.substr(b,2)===Wi?(Q=Wi,b+=2):(Q=t,I===0&&Be(Zl)),Q!==t&&(Fe=m,Q=We()),m=Q,m===t&&(m=b,r.substr(b,2)===Ca?(Q=Ca,b+=2):(Q=t,I===0&&Be(Lg)),Q!==t&&(Fe=m,Q=uI()),m=Q,m===t&&(m=b,r.substr(b,2)===ed?(Q=ed,b+=2):(Q=t,I===0&&Be(gI)),Q!==t&&(Fe=m,Q=ar()),m=Q,m===t&&(m=b,r.substr(b,2)===Fn?(Q=Fn,b+=2):(Q=t,I===0&&Be($l)),Q!==t&&(Fe=m,Q=td()),m=Q,m===t&&(m=b,r.charCodeAt(b)===92?(Q=es,b++):(Q=t,I===0&&Be(ut)),Q!==t?(Ms.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(ma)),F!==t?(Fe=m,Q=ln(F),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=gfe()))))))))),m}function gfe(){var m,Q,F,K,ce,Qe,ft,Bt,Vr,Ci,rs,YS;return m=b,r.charCodeAt(b)===92?(Q=es,b++):(Q=t,I===0&&Be(ut)),Q!==t?(F=US(),F!==t?(Fe=m,Q=cn(F),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===ke?(Q=ke,b+=2):(Q=t,I===0&&Be(Og)),Q!==t?(F=b,K=b,ce=US(),ce!==t?(Qe=Ln(),Qe!==t?(ce=[ce,Qe],K=ce):(b=K,K=t)):(b=K,K=t),K===t&&(K=US()),K!==t?F=r.substring(F,b):F=K,F!==t?(Fe=m,Q=cn(F),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===ec?(Q=ec,b+=2):(Q=t,I===0&&Be(Us)),Q!==t?(F=b,K=b,ce=Ln(),ce!==t?(Qe=Ln(),Qe!==t?(ft=Ln(),ft!==t?(Bt=Ln(),Bt!==t?(ce=[ce,Qe,ft,Bt],K=ce):(b=K,K=t)):(b=K,K=t)):(b=K,K=t)):(b=K,K=t),K!==t?F=r.substring(F,b):F=K,F!==t?(Fe=m,Q=cn(F),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===tc?(Q=tc,b+=2):(Q=t,I===0&&Be(bA)),Q!==t?(F=b,K=b,ce=Ln(),ce!==t?(Qe=Ln(),Qe!==t?(ft=Ln(),ft!==t?(Bt=Ln(),Bt!==t?(Vr=Ln(),Vr!==t?(Ci=Ln(),Ci!==t?(rs=Ln(),rs!==t?(YS=Ln(),YS!==t?(ce=[ce,Qe,ft,Bt,Vr,Ci,rs,YS],K=ce):(b=K,K=t)):(b=K,K=t)):(b=K,K=t)):(b=K,K=t)):(b=K,K=t)):(b=K,K=t)):(b=K,K=t)):(b=K,K=t),K!==t?F=r.substring(F,b):F=K,F!==t?(Fe=m,Q=Mg(F),m=Q):(b=m,m=t)):(b=m,m=t)))),m}function US(){var m;return Ug.test(r.charAt(b))?(m=r.charAt(b),b++):(m=t,I===0&&Be(Ea)),m}function Ln(){var m;return Ia.test(r.charAt(b))?(m=r.charAt(b),b++):(m=t,I===0&&Be($e)),m}function ffe(){var m,Q,F,K,ce;if(m=b,Q=[],F=b,r.charCodeAt(b)===92?(K=es,b++):(K=t,I===0&&Be(ut)),K!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&Be(wo)),ce!==t?(Fe=F,K=ln(ce),F=K):(b=F,F=t)):(b=F,F=t),F===t&&(F=b,K=b,I++,ce=NU(),I--,ce===t?K=void 0:(b=K,K=t),K!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&Be(wo)),ce!==t?(Fe=F,K=ln(ce),F=K):(b=F,F=t)):(b=F,F=t)),F!==t)for(;F!==t;)Q.push(F),F=b,r.charCodeAt(b)===92?(K=es,b++):(K=t,I===0&&Be(ut)),K!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&Be(wo)),ce!==t?(Fe=F,K=ln(ce),F=K):(b=F,F=t)):(b=F,F=t),F===t&&(F=b,K=b,I++,ce=NU(),I--,ce===t?K=void 0:(b=K,K=t),K!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&Be(wo)),ce!==t?(Fe=F,K=ln(ce),F=K):(b=F,F=t)):(b=F,F=t));else Q=t;return Q!==t&&(Fe=m,Q=kn(Q)),m=Q,m}function KS(){var m,Q,F,K,ce,Qe;if(m=b,r.charCodeAt(b)===45?(Q=QA,b++):(Q=t,I===0&&Be(rc)),Q===t&&(r.charCodeAt(b)===43?(Q=Ks,b++):(Q=t,I===0&&Be(ic))),Q===t&&(Q=null),Q!==t){if(F=[],Ge.test(r.charAt(b))?(K=r.charAt(b),b++):(K=t,I===0&&Be(ie)),K!==t)for(;K!==t;)F.push(K),Ge.test(r.charAt(b))?(K=r.charAt(b),b++):(K=t,I===0&&Be(ie));else F=t;if(F!==t)if(r.charCodeAt(b)===46?(K=fI,b++):(K=t,I===0&&Be(rd)),K!==t){if(ce=[],Ge.test(r.charAt(b))?(Qe=r.charAt(b),b++):(Qe=t,I===0&&Be(ie)),Qe!==t)for(;Qe!==t;)ce.push(Qe),Ge.test(r.charAt(b))?(Qe=r.charAt(b),b++):(Qe=t,I===0&&Be(ie));else ce=t;ce!==t?(Fe=m,Q=Kg(Q,F,ce),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t;if(m===t){if(m=b,r.charCodeAt(b)===45?(Q=QA,b++):(Q=t,I===0&&Be(rc)),Q===t&&(r.charCodeAt(b)===43?(Q=Ks,b++):(Q=t,I===0&&Be(ic))),Q===t&&(Q=null),Q!==t){if(F=[],Ge.test(r.charAt(b))?(K=r.charAt(b),b++):(K=t,I===0&&Be(ie)),K!==t)for(;K!==t;)F.push(K),Ge.test(r.charAt(b))?(K=r.charAt(b),b++):(K=t,I===0&&Be(ie));else F=t;F!==t?(Fe=m,Q=id(Q,F),m=Q):(b=m,m=t)}else b=m,m=t;if(m===t&&(m=b,Q=GS(),Q!==t&&(Fe=m,Q=hI(Q)),m=Q,m===t&&(m=b,Q=sc(),Q!==t&&(Fe=m,Q=nc(Q)),m=Q,m===t)))if(m=b,r.charCodeAt(b)===40?(Q=ge,b++):(Q=t,I===0&&Be(_)),Q!==t){for(F=[],K=Me();K!==t;)F.push(K),K=Me();if(F!==t)if(K=DU(),K!==t){for(ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();ce!==t?(r.charCodeAt(b)===41?(Qe=L,b++):(Qe=t,I===0&&Be(N)),Qe!==t?(Fe=m,Q=pI(K),m=Q):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t}return m}function HS(){var m,Q,F,K,ce,Qe,ft,Bt;if(m=b,Q=KS(),Q!==t){for(F=[],K=b,ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();if(ce!==t)if(r.charCodeAt(b)===42?(Qe=Hg,b++):(Qe=t,I===0&&Be(SA)),Qe===t&&(r.charCodeAt(b)===47?(Qe=Nr,b++):(Qe=t,I===0&&Be(dI))),Qe!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=KS(),Bt!==t?(Fe=K,ce=Hs(Q,Qe,Bt),K=ce):(b=K,K=t)):(b=K,K=t)}else b=K,K=t;else b=K,K=t;for(;K!==t;){for(F.push(K),K=b,ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();if(ce!==t)if(r.charCodeAt(b)===42?(Qe=Hg,b++):(Qe=t,I===0&&Be(SA)),Qe===t&&(r.charCodeAt(b)===47?(Qe=Nr,b++):(Qe=t,I===0&&Be(dI))),Qe!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=KS(),Bt!==t?(Fe=K,ce=Hs(Q,Qe,Bt),K=ce):(b=K,K=t)):(b=K,K=t)}else b=K,K=t;else b=K,K=t}F!==t?(Fe=m,Q=Gs(Q,F),m=Q):(b=m,m=t)}else b=m,m=t;return m}function DU(){var m,Q,F,K,ce,Qe,ft,Bt;if(m=b,Q=HS(),Q!==t){for(F=[],K=b,ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();if(ce!==t)if(r.charCodeAt(b)===43?(Qe=Ks,b++):(Qe=t,I===0&&Be(ic)),Qe===t&&(r.charCodeAt(b)===45?(Qe=QA,b++):(Qe=t,I===0&&Be(rc))),Qe!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=HS(),Bt!==t?(Fe=K,ce=Gg(Q,Qe,Bt),K=ce):(b=K,K=t)):(b=K,K=t)}else b=K,K=t;else b=K,K=t;for(;K!==t;){for(F.push(K),K=b,ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();if(ce!==t)if(r.charCodeAt(b)===43?(Qe=Ks,b++):(Qe=t,I===0&&Be(ic)),Qe===t&&(r.charCodeAt(b)===45?(Qe=QA,b++):(Qe=t,I===0&&Be(rc))),Qe!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=HS(),Bt!==t?(Fe=K,ce=Gg(Q,Qe,Bt),K=ce):(b=K,K=t)):(b=K,K=t)}else b=K,K=t;else b=K,K=t}F!==t?(Fe=m,Q=Gs(Q,F),m=Q):(b=m,m=t)}else b=m,m=t;return m}function kU(){var m,Q,F,K,ce,Qe;if(m=b,r.substr(b,3)===vA?(Q=vA,b+=3):(Q=t,I===0&&Be(R)),Q!==t){for(F=[],K=Me();K!==t;)F.push(K),K=Me();if(F!==t)if(K=DU(),K!==t){for(ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();ce!==t?(r.substr(b,2)===q?(Qe=q,b+=2):(Qe=t,I===0&&Be(pe)),Qe!==t?(Fe=m,Q=Ne(K),m=Q):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t;return m}function RU(){var m,Q,F,K;return m=b,r.substr(b,2)===xe?(Q=xe,b+=2):(Q=t,I===0&&Be(qe)),Q!==t?(F=Kr(),F!==t?(r.charCodeAt(b)===41?(K=L,b++):(K=t,I===0&&Be(N)),K!==t?(Fe=m,Q=dt(F),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m}function GS(){var m,Q,F,K,ce,Qe;return m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&Be(Nn)),Q!==t?(F=sc(),F!==t?(r.substr(b,2)===vS?(K=vS,b+=2):(K=t,I===0&&Be(AU)),K!==t?(ce=wU(),ce!==t?(r.charCodeAt(b)===125?(Qe=Pe,b++):(Qe=t,I===0&&Be(Le)),Qe!==t?(Fe=m,Q=lU(F,ce),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&Be(Nn)),Q!==t?(F=sc(),F!==t?(r.substr(b,3)===xS?(K=xS,b+=3):(K=t,I===0&&Be(cU)),K!==t?(Fe=m,Q=uU(F),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&Be(Nn)),Q!==t?(F=sc(),F!==t?(r.substr(b,2)===PS?(K=PS,b+=2):(K=t,I===0&&Be(gU)),K!==t?(ce=wU(),ce!==t?(r.charCodeAt(b)===125?(Qe=Pe,b++):(Qe=t,I===0&&Be(Le)),Qe!==t?(Fe=m,Q=fU(F,ce),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&Be(Nn)),Q!==t?(F=sc(),F!==t?(r.substr(b,3)===DS?(K=DS,b+=3):(K=t,I===0&&Be(hU)),K!==t?(Fe=m,Q=pU(F),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&Be(Nn)),Q!==t?(F=sc(),F!==t?(r.charCodeAt(b)===125?(K=Pe,b++):(K=t,I===0&&Be(Le)),K!==t?(Fe=m,Q=kS(F),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.charCodeAt(b)===36?(Q=dU,b++):(Q=t,I===0&&Be(CU)),Q!==t?(F=sc(),F!==t?(Fe=m,Q=kS(F),m=Q):(b=m,m=t)):(b=m,m=t)))))),m}function hfe(){var m,Q,F;return m=b,Q=pfe(),Q!==t?(Fe=b,F=mU(Q),F?F=void 0:F=t,F!==t?(Fe=m,Q=EU(Q),m=Q):(b=m,m=t)):(b=m,m=t),m}function pfe(){var m,Q,F,K,ce;if(m=b,Q=[],F=b,K=b,I++,ce=TU(),I--,ce===t?K=void 0:(b=K,K=t),K!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&Be(wo)),ce!==t?(Fe=F,K=ln(ce),F=K):(b=F,F=t)):(b=F,F=t),F!==t)for(;F!==t;)Q.push(F),F=b,K=b,I++,ce=TU(),I--,ce===t?K=void 0:(b=K,K=t),K!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&Be(wo)),ce!==t?(Fe=F,K=ln(ce),F=K):(b=F,F=t)):(b=F,F=t);else Q=t;return Q!==t&&(Fe=m,Q=kn(Q)),m=Q,m}function FU(){var m,Q,F;if(m=b,Q=[],RS.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(FS)),F!==t)for(;F!==t;)Q.push(F),RS.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(FS));else Q=t;return Q!==t&&(Fe=m,Q=NS()),m=Q,m}function sc(){var m,Q,F;if(m=b,Q=[],TS.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(LS)),F!==t)for(;F!==t;)Q.push(F),TS.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(LS));else Q=t;return Q!==t&&(Fe=m,Q=NS()),m=Q,m}function NU(){var m;return IU.test(r.charAt(b))?(m=r.charAt(b),b++):(m=t,I===0&&Be(Yg)),m}function TU(){var m;return OS.test(r.charAt(b))?(m=r.charAt(b),b++):(m=t,I===0&&Be(MS)),m}function Me(){var m,Q;if(m=[],CI.test(r.charAt(b))?(Q=r.charAt(b),b++):(Q=t,I===0&&Be(mI)),Q!==t)for(;Q!==t;)m.push(Q),CI.test(r.charAt(b))?(Q=r.charAt(b),b++):(Q=t,I===0&&Be(mI));else m=t;return m}if(k=n(),k!==t&&b===r.length)return k;throw k!==t&&b{"use strict";function phe(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function fc(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,fc)}phe(fc,Error);fc.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;gH&&(H=v,j=[]),j.push(ie))}function Le(ie,Y){return new fc(ie,null,null,Y)}function se(ie,Y,he){return new fc(fc.buildMessage(ie,Y),ie,Y,he)}function Ae(){var ie,Y,he,re;return ie=v,Y=be(),Y!==t?(r.charCodeAt(v)===47?(he=s,v++):(he=t,$===0&&Pe(o)),he!==t?(re=be(),re!==t?(D=ie,Y=a(Y,re),ie=Y):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t),ie===t&&(ie=v,Y=be(),Y!==t&&(D=ie,Y=l(Y)),ie=Y),ie}function be(){var ie,Y,he,re;return ie=v,Y=fe(),Y!==t?(r.charCodeAt(v)===64?(he=c,v++):(he=t,$===0&&Pe(u)),he!==t?(re=Ge(),re!==t?(D=ie,Y=g(Y,re),ie=Y):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t),ie===t&&(ie=v,Y=fe(),Y!==t&&(D=ie,Y=f(Y)),ie=Y),ie}function fe(){var ie,Y,he,re,me;return ie=v,r.charCodeAt(v)===64?(Y=c,v++):(Y=t,$===0&&Pe(u)),Y!==t?(he=le(),he!==t?(r.charCodeAt(v)===47?(re=s,v++):(re=t,$===0&&Pe(o)),re!==t?(me=le(),me!==t?(D=ie,Y=h(),ie=Y):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t),ie===t&&(ie=v,Y=le(),Y!==t&&(D=ie,Y=h()),ie=Y),ie}function le(){var ie,Y,he;if(ie=v,Y=[],p.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(C)),he!==t)for(;he!==t;)Y.push(he),p.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(C));else Y=t;return Y!==t&&(D=ie,Y=h()),ie=Y,ie}function Ge(){var ie,Y,he;if(ie=v,Y=[],w.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(B)),he!==t)for(;he!==t;)Y.push(he),w.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(B));else Y=t;return Y!==t&&(D=ie,Y=h()),ie=Y,ie}if(V=n(),V!==t&&v===r.length)return V;throw V!==t&&v{"use strict";function XK(r){return typeof r>"u"||r===null}function Che(r){return typeof r=="object"&&r!==null}function mhe(r){return Array.isArray(r)?r:XK(r)?[]:[r]}function Ehe(r,e){var t,i,n,s;if(e)for(s=Object.keys(e),t=0,i=s.length;t{"use strict";function md(r,e){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}md.prototype=Object.create(Error.prototype);md.prototype.constructor=md;md.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t};_K.exports=md});var e2=y((YZe,$K)=>{"use strict";var ZK=pc();function wv(r,e,t,i,n){this.name=r,this.buffer=e,this.position=t,this.line=i,this.column=n}wv.prototype.getSnippet=function(e,t){var i,n,s,o,a;if(!this.buffer)return null;for(e=e||4,t=t||75,i="",n=this.position;n>0&&`\0\r -\x85\u2028\u2029`.indexOf(this.buffer.charAt(n-1))===-1;)if(n-=1,this.position-n>t/2-1){i=" ... ",n+=5;break}for(s="",o=this.position;ot/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(n,o),ZK.repeat(" ",e)+i+a+s+` -`+ZK.repeat(" ",e+this.position-n+i.length)+"^"};wv.prototype.toString=function(e){var t,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(i+=`: -`+t)),i};$K.exports=wv});var Ai=y((jZe,r2)=>{"use strict";var t2=tf(),whe=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],Bhe=["scalar","sequence","mapping"];function bhe(r){var e={};return r!==null&&Object.keys(r).forEach(function(t){r[t].forEach(function(i){e[String(i)]=t})}),e}function Qhe(r,e){if(e=e||{},Object.keys(e).forEach(function(t){if(whe.indexOf(t)===-1)throw new t2('Unknown option "'+t+'" is met in definition of "'+r+'" YAML type.')}),this.tag=r,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=bhe(e.styleAliases||null),Bhe.indexOf(this.kind)===-1)throw new t2('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}r2.exports=Qhe});var dc=y((qZe,n2)=>{"use strict";var i2=pc(),jI=tf(),She=Ai();function Bv(r,e,t){var i=[];return r.include.forEach(function(n){t=Bv(n,e,t)}),r[e].forEach(function(n){t.forEach(function(s,o){s.tag===n.tag&&s.kind===n.kind&&i.push(o)}),t.push(n)}),t.filter(function(n,s){return i.indexOf(s)===-1})}function vhe(){var r={scalar:{},sequence:{},mapping:{},fallback:{}},e,t;function i(n){r[n.kind][n.tag]=r.fallback[n.tag]=n}for(e=0,t=arguments.length;e{"use strict";var xhe=Ai();s2.exports=new xhe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})});var A2=y((WZe,a2)=>{"use strict";var Phe=Ai();a2.exports=new Phe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})});var c2=y((zZe,l2)=>{"use strict";var Dhe=Ai();l2.exports=new Dhe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})});var qI=y((VZe,u2)=>{"use strict";var khe=dc();u2.exports=new khe({explicit:[o2(),A2(),c2()]})});var f2=y((XZe,g2)=>{"use strict";var Rhe=Ai();function Fhe(r){if(r===null)return!0;var e=r.length;return e===1&&r==="~"||e===4&&(r==="null"||r==="Null"||r==="NULL")}function Nhe(){return null}function The(r){return r===null}g2.exports=new Rhe("tag:yaml.org,2002:null",{kind:"scalar",resolve:Fhe,construct:Nhe,predicate:The,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var p2=y((_Ze,h2)=>{"use strict";var Lhe=Ai();function Ohe(r){if(r===null)return!1;var e=r.length;return e===4&&(r==="true"||r==="True"||r==="TRUE")||e===5&&(r==="false"||r==="False"||r==="FALSE")}function Mhe(r){return r==="true"||r==="True"||r==="TRUE"}function Uhe(r){return Object.prototype.toString.call(r)==="[object Boolean]"}h2.exports=new Lhe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Ohe,construct:Mhe,predicate:Uhe,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE":"FALSE"},camelcase:function(r){return r?"True":"False"}},defaultStyle:"lowercase"})});var C2=y((ZZe,d2)=>{"use strict";var Khe=pc(),Hhe=Ai();function Ghe(r){return 48<=r&&r<=57||65<=r&&r<=70||97<=r&&r<=102}function Yhe(r){return 48<=r&&r<=55}function jhe(r){return 48<=r&&r<=57}function qhe(r){if(r===null)return!1;var e=r.length,t=0,i=!1,n;if(!e)return!1;if(n=r[t],(n==="-"||n==="+")&&(n=r[++t]),n==="0"){if(t+1===e)return!0;if(n=r[++t],n==="b"){for(t++;t=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},octal:function(r){return r>=0?"0"+r.toString(8):"-0"+r.toString(8).slice(1)},decimal:function(r){return r.toString(10)},hexadecimal:function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var I2=y(($Ze,E2)=>{"use strict";var m2=pc(),zhe=Ai(),Vhe=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Xhe(r){return!(r===null||!Vhe.test(r)||r[r.length-1]==="_")}function _he(r){var e,t,i,n;return e=r.replace(/_/g,"").toLowerCase(),t=e[0]==="-"?-1:1,n=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?t===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(s){n.unshift(parseFloat(s,10))}),e=0,i=1,n.forEach(function(s){e+=s*i,i*=60}),t*e):t*parseFloat(e,10)}var Zhe=/^[-+]?[0-9]+e/;function $he(r,e){var t;if(isNaN(r))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===r)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===r)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(m2.isNegativeZero(r))return"-0.0";return t=r.toString(10),Zhe.test(t)?t.replace("e",".e"):t}function epe(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!==0||m2.isNegativeZero(r))}E2.exports=new zhe("tag:yaml.org,2002:float",{kind:"scalar",resolve:Xhe,construct:_he,predicate:epe,represent:$he,defaultStyle:"lowercase"})});var bv=y((e$e,y2)=>{"use strict";var tpe=dc();y2.exports=new tpe({include:[qI()],implicit:[f2(),p2(),C2(),I2()]})});var Qv=y((t$e,w2)=>{"use strict";var rpe=dc();w2.exports=new rpe({include:[bv()]})});var S2=y((r$e,Q2)=>{"use strict";var ipe=Ai(),B2=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),b2=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function npe(r){return r===null?!1:B2.exec(r)!==null||b2.exec(r)!==null}function spe(r){var e,t,i,n,s,o,a,l=0,c=null,u,g,f;if(e=B2.exec(r),e===null&&(e=b2.exec(r)),e===null)throw new Error("Date resolve error");if(t=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(t,i,n));if(s=+e[4],o=+e[5],a=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],g=+(e[11]||0),c=(u*60+g)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(t,i,n,s,o,a,l)),c&&f.setTime(f.getTime()-c),f}function ope(r){return r.toISOString()}Q2.exports=new ipe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:npe,construct:spe,instanceOf:Date,represent:ope})});var x2=y((i$e,v2)=>{"use strict";var ape=Ai();function Ape(r){return r==="<<"||r===null}v2.exports=new ape("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Ape})});var k2=y((n$e,D2)=>{"use strict";var Cc;try{P2=J,Cc=P2("buffer").Buffer}catch{}var P2,lpe=Ai(),Sv=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;function cpe(r){if(r===null)return!1;var e,t,i=0,n=r.length,s=Sv;for(t=0;t64)){if(e<0)return!1;i+=6}return i%8===0}function upe(r){var e,t,i=r.replace(/[\r\n=]/g,""),n=i.length,s=Sv,o=0,a=[];for(e=0;e>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(i.charAt(e));return t=n%4*6,t===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):t===18?(a.push(o>>10&255),a.push(o>>2&255)):t===12&&a.push(o>>4&255),Cc?Cc.from?Cc.from(a):new Cc(a):a}function gpe(r){var e="",t=0,i,n,s=r.length,o=Sv;for(i=0;i>18&63],e+=o[t>>12&63],e+=o[t>>6&63],e+=o[t&63]),t=(t<<8)+r[i];return n=s%3,n===0?(e+=o[t>>18&63],e+=o[t>>12&63],e+=o[t>>6&63],e+=o[t&63]):n===2?(e+=o[t>>10&63],e+=o[t>>4&63],e+=o[t<<2&63],e+=o[64]):n===1&&(e+=o[t>>2&63],e+=o[t<<4&63],e+=o[64],e+=o[64]),e}function fpe(r){return Cc&&Cc.isBuffer(r)}D2.exports=new lpe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:cpe,construct:upe,predicate:fpe,represent:gpe})});var F2=y((s$e,R2)=>{"use strict";var hpe=Ai(),ppe=Object.prototype.hasOwnProperty,dpe=Object.prototype.toString;function Cpe(r){if(r===null)return!0;var e=[],t,i,n,s,o,a=r;for(t=0,i=a.length;t{"use strict";var Epe=Ai(),Ipe=Object.prototype.toString;function ype(r){if(r===null)return!0;var e,t,i,n,s,o=r;for(s=new Array(o.length),e=0,t=o.length;e{"use strict";var Bpe=Ai(),bpe=Object.prototype.hasOwnProperty;function Qpe(r){if(r===null)return!0;var e,t=r;for(e in t)if(bpe.call(t,e)&&t[e]!==null)return!1;return!0}function Spe(r){return r!==null?r:{}}L2.exports=new Bpe("tag:yaml.org,2002:set",{kind:"mapping",resolve:Qpe,construct:Spe})});var nf=y((A$e,M2)=>{"use strict";var vpe=dc();M2.exports=new vpe({include:[Qv()],implicit:[S2(),x2()],explicit:[k2(),F2(),T2(),O2()]})});var K2=y((l$e,U2)=>{"use strict";var xpe=Ai();function Ppe(){return!0}function Dpe(){}function kpe(){return""}function Rpe(r){return typeof r>"u"}U2.exports=new xpe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:Ppe,construct:Dpe,predicate:Rpe,represent:kpe})});var G2=y((c$e,H2)=>{"use strict";var Fpe=Ai();function Npe(r){if(r===null||r.length===0)return!1;var e=r,t=/\/([gim]*)$/.exec(r),i="";return!(e[0]==="/"&&(t&&(i=t[1]),i.length>3||e[e.length-i.length-1]!=="/"))}function Tpe(r){var e=r,t=/\/([gim]*)$/.exec(r),i="";return e[0]==="/"&&(t&&(i=t[1]),e=e.slice(1,e.length-i.length-1)),new RegExp(e,i)}function Lpe(r){var e="/"+r.source+"/";return r.global&&(e+="g"),r.multiline&&(e+="m"),r.ignoreCase&&(e+="i"),e}function Ope(r){return Object.prototype.toString.call(r)==="[object RegExp]"}H2.exports=new Fpe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:Npe,construct:Tpe,predicate:Ope,represent:Lpe})});var q2=y((u$e,j2)=>{"use strict";var JI;try{Y2=J,JI=Y2("esprima")}catch{typeof window<"u"&&(JI=window.esprima)}var Y2,Mpe=Ai();function Upe(r){if(r===null)return!1;try{var e="("+r+")",t=JI.parse(e,{range:!0});return!(t.type!=="Program"||t.body.length!==1||t.body[0].type!=="ExpressionStatement"||t.body[0].expression.type!=="ArrowFunctionExpression"&&t.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function Kpe(r){var e="("+r+")",t=JI.parse(e,{range:!0}),i=[],n;if(t.type!=="Program"||t.body.length!==1||t.body[0].type!=="ExpressionStatement"||t.body[0].expression.type!=="ArrowFunctionExpression"&&t.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return t.body[0].expression.params.forEach(function(s){i.push(s.name)}),n=t.body[0].expression.body.range,t.body[0].expression.body.type==="BlockStatement"?new Function(i,e.slice(n[0]+1,n[1]-1)):new Function(i,"return "+e.slice(n[0],n[1]))}function Hpe(r){return r.toString()}function Gpe(r){return Object.prototype.toString.call(r)==="[object Function]"}j2.exports=new Mpe("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:Upe,construct:Kpe,predicate:Gpe,represent:Hpe})});var Ed=y((g$e,W2)=>{"use strict";var J2=dc();W2.exports=J2.DEFAULT=new J2({include:[nf()],explicit:[K2(),G2(),q2()]})});var gH=y((f$e,Id)=>{"use strict";var Qa=pc(),eH=tf(),Ype=e2(),tH=nf(),jpe=Ed(),NA=Object.prototype.hasOwnProperty,WI=1,rH=2,iH=3,zI=4,vv=1,qpe=2,z2=3,Jpe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Wpe=/[\x85\u2028\u2029]/,zpe=/[,\[\]\{\}]/,nH=/^(?:!|!!|![a-z\-]+!)$/i,sH=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function V2(r){return Object.prototype.toString.call(r)}function So(r){return r===10||r===13}function Ec(r){return r===9||r===32}function fn(r){return r===9||r===32||r===10||r===13}function sf(r){return r===44||r===91||r===93||r===123||r===125}function Vpe(r){var e;return 48<=r&&r<=57?r-48:(e=r|32,97<=e&&e<=102?e-97+10:-1)}function Xpe(r){return r===120?2:r===117?4:r===85?8:0}function _pe(r){return 48<=r&&r<=57?r-48:-1}function X2(r){return r===48?"\0":r===97?"\x07":r===98?"\b":r===116||r===9?" ":r===110?` -`:r===118?"\v":r===102?"\f":r===114?"\r":r===101?"\x1B":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"\x85":r===95?"\xA0":r===76?"\u2028":r===80?"\u2029":""}function Zpe(r){return r<=65535?String.fromCharCode(r):String.fromCharCode((r-65536>>10)+55296,(r-65536&1023)+56320)}var oH=new Array(256),aH=new Array(256);for(mc=0;mc<256;mc++)oH[mc]=X2(mc)?1:0,aH[mc]=X2(mc);var mc;function $pe(r,e){this.input=r,this.filename=e.filename||null,this.schema=e.schema||jpe,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=r.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function AH(r,e){return new eH(e,new Ype(r.filename,r.input,r.position,r.line,r.position-r.lineStart))}function gt(r,e){throw AH(r,e)}function VI(r,e){r.onWarning&&r.onWarning.call(null,AH(r,e))}var _2={YAML:function(e,t,i){var n,s,o;e.version!==null&>(e,"duplication of %YAML directive"),i.length!==1&>(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&>(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),o=parseInt(n[2],10),s!==1&>(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&VI(e,"unsupported YAML version of the document")},TAG:function(e,t,i){var n,s;i.length!==2&>(e,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],nH.test(n)||gt(e,"ill-formed tag handle (first argument) of the TAG directive"),NA.call(e.tagMap,n)&>(e,'there is a previously declared suffix for "'+n+'" tag handle'),sH.test(s)||gt(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=s}};function FA(r,e,t,i){var n,s,o,a;if(e1&&(r.result+=Qa.repeat(` -`,e-1))}function ede(r,e,t){var i,n,s,o,a,l,c,u,g=r.kind,f=r.result,h;if(h=r.input.charCodeAt(r.position),fn(h)||sf(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(n=r.input.charCodeAt(r.position+1),fn(n)||t&&sf(n)))return!1;for(r.kind="scalar",r.result="",s=o=r.position,a=!1;h!==0;){if(h===58){if(n=r.input.charCodeAt(r.position+1),fn(n)||t&&sf(n))break}else if(h===35){if(i=r.input.charCodeAt(r.position-1),fn(i))break}else{if(r.position===r.lineStart&&XI(r)||t&&sf(h))break;if(So(h))if(l=r.line,c=r.lineStart,u=r.lineIndent,_r(r,!1,-1),r.lineIndent>=e){a=!0,h=r.input.charCodeAt(r.position);continue}else{r.position=o,r.line=l,r.lineStart=c,r.lineIndent=u;break}}a&&(FA(r,s,o,!1),Pv(r,r.line-l),s=o=r.position,a=!1),Ec(h)||(o=r.position+1),h=r.input.charCodeAt(++r.position)}return FA(r,s,o,!1),r.result?!0:(r.kind=g,r.result=f,!1)}function tde(r,e){var t,i,n;if(t=r.input.charCodeAt(r.position),t!==39)return!1;for(r.kind="scalar",r.result="",r.position++,i=n=r.position;(t=r.input.charCodeAt(r.position))!==0;)if(t===39)if(FA(r,i,r.position,!0),t=r.input.charCodeAt(++r.position),t===39)i=r.position,r.position++,n=r.position;else return!0;else So(t)?(FA(r,i,n,!0),Pv(r,_r(r,!1,e)),i=n=r.position):r.position===r.lineStart&&XI(r)?gt(r,"unexpected end of the document within a single quoted scalar"):(r.position++,n=r.position);gt(r,"unexpected end of the stream within a single quoted scalar")}function rde(r,e){var t,i,n,s,o,a;if(a=r.input.charCodeAt(r.position),a!==34)return!1;for(r.kind="scalar",r.result="",r.position++,t=i=r.position;(a=r.input.charCodeAt(r.position))!==0;){if(a===34)return FA(r,t,r.position,!0),r.position++,!0;if(a===92){if(FA(r,t,r.position,!0),a=r.input.charCodeAt(++r.position),So(a))_r(r,!1,e);else if(a<256&&oH[a])r.result+=aH[a],r.position++;else if((o=Xpe(a))>0){for(n=o,s=0;n>0;n--)a=r.input.charCodeAt(++r.position),(o=Vpe(a))>=0?s=(s<<4)+o:gt(r,"expected hexadecimal character");r.result+=Zpe(s),r.position++}else gt(r,"unknown escape sequence");t=i=r.position}else So(a)?(FA(r,t,i,!0),Pv(r,_r(r,!1,e)),t=i=r.position):r.position===r.lineStart&&XI(r)?gt(r,"unexpected end of the document within a double quoted scalar"):(r.position++,i=r.position)}gt(r,"unexpected end of the stream within a double quoted scalar")}function ide(r,e){var t=!0,i,n=r.tag,s,o=r.anchor,a,l,c,u,g,f={},h,p,C,w;if(w=r.input.charCodeAt(r.position),w===91)l=93,g=!1,s=[];else if(w===123)l=125,g=!0,s={};else return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=s),w=r.input.charCodeAt(++r.position);w!==0;){if(_r(r,!0,e),w=r.input.charCodeAt(r.position),w===l)return r.position++,r.tag=n,r.anchor=o,r.kind=g?"mapping":"sequence",r.result=s,!0;t||gt(r,"missed comma between flow collection entries"),p=h=C=null,c=u=!1,w===63&&(a=r.input.charCodeAt(r.position+1),fn(a)&&(c=u=!0,r.position++,_r(r,!0,e))),i=r.line,af(r,e,WI,!1,!0),p=r.tag,h=r.result,_r(r,!0,e),w=r.input.charCodeAt(r.position),(u||r.line===i)&&w===58&&(c=!0,w=r.input.charCodeAt(++r.position),_r(r,!0,e),af(r,e,WI,!1,!0),C=r.result),g?of(r,s,f,p,h,C):c?s.push(of(r,null,f,p,h,C)):s.push(h),_r(r,!0,e),w=r.input.charCodeAt(r.position),w===44?(t=!0,w=r.input.charCodeAt(++r.position)):t=!1}gt(r,"unexpected end of the stream within a flow collection")}function nde(r,e){var t,i,n=vv,s=!1,o=!1,a=e,l=0,c=!1,u,g;if(g=r.input.charCodeAt(r.position),g===124)i=!1;else if(g===62)i=!0;else return!1;for(r.kind="scalar",r.result="";g!==0;)if(g=r.input.charCodeAt(++r.position),g===43||g===45)vv===n?n=g===43?z2:qpe:gt(r,"repeat of a chomping mode identifier");else if((u=_pe(g))>=0)u===0?gt(r,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?gt(r,"repeat of an indentation width identifier"):(a=e+u-1,o=!0);else break;if(Ec(g)){do g=r.input.charCodeAt(++r.position);while(Ec(g));if(g===35)do g=r.input.charCodeAt(++r.position);while(!So(g)&&g!==0)}for(;g!==0;){for(xv(r),r.lineIndent=0,g=r.input.charCodeAt(r.position);(!o||r.lineIndenta&&(a=r.lineIndent),So(g)){l++;continue}if(r.lineIndente)&&l!==0)gt(r,"bad indentation of a sequence entry");else if(r.lineIndente)&&(af(r,e,zI,!0,n)&&(p?f=r.result:h=r.result),p||(of(r,c,u,g,f,h,s,o),g=f=h=null),_r(r,!0,-1),w=r.input.charCodeAt(r.position)),r.lineIndent>e&&w!==0)gt(r,"bad indentation of a mapping entry");else if(r.lineIndente?l=1:r.lineIndent===e?l=0:r.lineIndente?l=1:r.lineIndent===e?l=0:r.lineIndent tag; it should be "scalar", not "'+r.kind+'"'),g=0,f=r.implicitTypes.length;g tag; it should be "'+h.kind+'", not "'+r.kind+'"'),h.resolve(r.result)?(r.result=h.construct(r.result),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):gt(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")):gt(r,"unknown tag !<"+r.tag+">");return r.listener!==null&&r.listener("close",r),r.tag!==null||r.anchor!==null||u}function lde(r){var e=r.position,t,i,n,s=!1,o;for(r.version=null,r.checkLineBreaks=r.legacy,r.tagMap={},r.anchorMap={};(o=r.input.charCodeAt(r.position))!==0&&(_r(r,!0,-1),o=r.input.charCodeAt(r.position),!(r.lineIndent>0||o!==37));){for(s=!0,o=r.input.charCodeAt(++r.position),t=r.position;o!==0&&!fn(o);)o=r.input.charCodeAt(++r.position);for(i=r.input.slice(t,r.position),n=[],i.length<1&>(r,"directive name must not be less than one character in length");o!==0;){for(;Ec(o);)o=r.input.charCodeAt(++r.position);if(o===35){do o=r.input.charCodeAt(++r.position);while(o!==0&&!So(o));break}if(So(o))break;for(t=r.position;o!==0&&!fn(o);)o=r.input.charCodeAt(++r.position);n.push(r.input.slice(t,r.position))}o!==0&&xv(r),NA.call(_2,i)?_2[i](r,i,n):VI(r,'unknown document directive "'+i+'"')}if(_r(r,!0,-1),r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45?(r.position+=3,_r(r,!0,-1)):s&>(r,"directives end mark is expected"),af(r,r.lineIndent-1,zI,!1,!0),_r(r,!0,-1),r.checkLineBreaks&&Wpe.test(r.input.slice(e,r.position))&&VI(r,"non-ASCII line breaks are interpreted as content"),r.documents.push(r.result),r.position===r.lineStart&&XI(r)){r.input.charCodeAt(r.position)===46&&(r.position+=3,_r(r,!0,-1));return}if(r.position"u"&&(t=e,e=null);var i=lH(r,t);if(typeof e!="function")return i;for(var n=0,s=i.length;n"u"&&(t=e,e=null),cH(r,e,Qa.extend({schema:tH},t))}function ude(r,e){return uH(r,Qa.extend({schema:tH},e))}Id.exports.loadAll=cH;Id.exports.load=uH;Id.exports.safeLoadAll=cde;Id.exports.safeLoad=ude});var TH=y((h$e,Fv)=>{"use strict";var wd=pc(),Bd=tf(),gde=Ed(),fde=nf(),IH=Object.prototype.toString,yH=Object.prototype.hasOwnProperty,hde=9,yd=10,pde=13,dde=32,Cde=33,mde=34,wH=35,Ede=37,Ide=38,yde=39,wde=42,BH=44,Bde=45,bH=58,bde=61,Qde=62,Sde=63,vde=64,QH=91,SH=93,xde=96,vH=123,Pde=124,xH=125,Ti={};Ti[0]="\\0";Ti[7]="\\a";Ti[8]="\\b";Ti[9]="\\t";Ti[10]="\\n";Ti[11]="\\v";Ti[12]="\\f";Ti[13]="\\r";Ti[27]="\\e";Ti[34]='\\"';Ti[92]="\\\\";Ti[133]="\\N";Ti[160]="\\_";Ti[8232]="\\L";Ti[8233]="\\P";var Dde=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function kde(r,e){var t,i,n,s,o,a,l;if(e===null)return{};for(t={},i=Object.keys(e),n=0,s=i.length;n0?r.charCodeAt(s-1):null,f=f&&pH(o,a)}else{for(s=0;si&&r[g+1]!==" ",g=s);else if(!Af(o))return _I;a=s>0?r.charCodeAt(s-1):null,f=f&&pH(o,a)}c=c||u&&s-g-1>i&&r[g+1]!==" "}return!l&&!c?f&&!n(r)?DH:kH:t>9&&PH(r)?_I:c?FH:RH}function Ode(r,e,t,i){r.dump=function(){if(e.length===0)return"''";if(!r.noCompatMode&&Dde.indexOf(e)!==-1)return"'"+e+"'";var n=r.indent*Math.max(1,t),s=r.lineWidth===-1?-1:Math.max(Math.min(r.lineWidth,40),r.lineWidth-n),o=i||r.flowLevel>-1&&t>=r.flowLevel;function a(l){return Fde(r,l)}switch(Lde(e,o,r.indent,s,a)){case DH:return e;case kH:return"'"+e.replace(/'/g,"''")+"'";case RH:return"|"+dH(e,r.indent)+CH(hH(e,n));case FH:return">"+dH(e,r.indent)+CH(hH(Mde(e,s),n));case _I:return'"'+Ude(e,s)+'"';default:throw new Bd("impossible error: invalid scalar style")}}()}function dH(r,e){var t=PH(r)?String(e):"",i=r[r.length-1]===` -`,n=i&&(r[r.length-2]===` -`||r===` -`),s=n?"+":i?"":"-";return t+s+` -`}function CH(r){return r[r.length-1]===` -`?r.slice(0,-1):r}function Mde(r,e){for(var t=/(\n+)([^\n]*)/g,i=function(){var c=r.indexOf(` -`);return c=c!==-1?c:r.length,t.lastIndex=c,mH(r.slice(0,c),e)}(),n=r[0]===` -`||r[0]===" ",s,o;o=t.exec(r);){var a=o[1],l=o[2];s=l[0]===" ",i+=a+(!n&&!s&&l!==""?` -`:"")+mH(l,e),n=s}return i}function mH(r,e){if(r===""||r[0]===" ")return r;for(var t=/ [^ ]/g,i,n=0,s,o=0,a=0,l="";i=t.exec(r);)a=i.index,a-n>e&&(s=o>n?o:a,l+=` -`+r.slice(n,s),n=s+1),o=a;return l+=` -`,r.length-n>e&&o>n?l+=r.slice(n,o)+` -`+r.slice(o+1):l+=r.slice(n),l.slice(1)}function Ude(r){for(var e="",t,i,n,s=0;s=55296&&t<=56319&&(i=r.charCodeAt(s+1),i>=56320&&i<=57343)){e+=fH((t-55296)*1024+i-56320+65536),s++;continue}n=Ti[t],e+=!n&&Af(t)?r[s]:n||fH(t)}return e}function Kde(r,e,t){var i="",n=r.tag,s,o;for(s=0,o=t.length;s1024&&(u+="? "),u+=r.dump+(r.condenseFlow?'"':"")+":"+(r.condenseFlow?"":" "),Ic(r,e,c,!1,!1)&&(u+=r.dump,i+=u));r.tag=n,r.dump="{"+i+"}"}function Yde(r,e,t,i){var n="",s=r.tag,o=Object.keys(t),a,l,c,u,g,f;if(r.sortKeys===!0)o.sort();else if(typeof r.sortKeys=="function")o.sort(r.sortKeys);else if(r.sortKeys)throw new Bd("sortKeys must be a boolean or a function");for(a=0,l=o.length;a1024,g&&(r.dump&&yd===r.dump.charCodeAt(0)?f+="?":f+="? "),f+=r.dump,g&&(f+=Dv(r,e)),Ic(r,e+1,u,!0,g)&&(r.dump&&yd===r.dump.charCodeAt(0)?f+=":":f+=": ",f+=r.dump,n+=f));r.tag=s,r.dump=n||"{}"}function EH(r,e,t){var i,n,s,o,a,l;for(n=t?r.explicitTypes:r.implicitTypes,s=0,o=n.length;s tag resolver accepts not "'+l+'" style');r.dump=i}return!0}return!1}function Ic(r,e,t,i,n,s){r.tag=null,r.dump=t,EH(r,t,!1)||EH(r,t,!0);var o=IH.call(r.dump);i&&(i=r.flowLevel<0||r.flowLevel>e);var a=o==="[object Object]"||o==="[object Array]",l,c;if(a&&(l=r.duplicates.indexOf(t),c=l!==-1),(r.tag!==null&&r.tag!=="?"||c||r.indent!==2&&e>0)&&(n=!1),c&&r.usedDuplicates[l])r.dump="*ref_"+l;else{if(a&&c&&!r.usedDuplicates[l]&&(r.usedDuplicates[l]=!0),o==="[object Object]")i&&Object.keys(r.dump).length!==0?(Yde(r,e,r.dump,n),c&&(r.dump="&ref_"+l+r.dump)):(Gde(r,e,r.dump),c&&(r.dump="&ref_"+l+" "+r.dump));else if(o==="[object Array]"){var u=r.noArrayIndent&&e>0?e-1:e;i&&r.dump.length!==0?(Hde(r,u,r.dump,n),c&&(r.dump="&ref_"+l+r.dump)):(Kde(r,u,r.dump),c&&(r.dump="&ref_"+l+" "+r.dump))}else if(o==="[object String]")r.tag!=="?"&&Ode(r,r.dump,e,s);else{if(r.skipInvalid)return!1;throw new Bd("unacceptable kind of an object to dump "+o)}r.tag!==null&&r.tag!=="?"&&(r.dump="!<"+r.tag+"> "+r.dump)}return!0}function jde(r,e){var t=[],i=[],n,s;for(kv(r,t,i),n=0,s=i.length;n{"use strict";var ZI=gH(),LH=TH();function $I(r){return function(){throw new Error("Function "+r+" is deprecated and cannot be used.")}}Tr.exports.Type=Ai();Tr.exports.Schema=dc();Tr.exports.FAILSAFE_SCHEMA=qI();Tr.exports.JSON_SCHEMA=bv();Tr.exports.CORE_SCHEMA=Qv();Tr.exports.DEFAULT_SAFE_SCHEMA=nf();Tr.exports.DEFAULT_FULL_SCHEMA=Ed();Tr.exports.load=ZI.load;Tr.exports.loadAll=ZI.loadAll;Tr.exports.safeLoad=ZI.safeLoad;Tr.exports.safeLoadAll=ZI.safeLoadAll;Tr.exports.dump=LH.dump;Tr.exports.safeDump=LH.safeDump;Tr.exports.YAMLException=tf();Tr.exports.MINIMAL_SCHEMA=qI();Tr.exports.SAFE_SCHEMA=nf();Tr.exports.DEFAULT_SCHEMA=Ed();Tr.exports.scan=$I("scan");Tr.exports.parse=$I("parse");Tr.exports.compose=$I("compose");Tr.exports.addConstructor=$I("addConstructor")});var UH=y((d$e,MH)=>{"use strict";var Jde=OH();MH.exports=Jde});var HH=y((C$e,KH)=>{"use strict";function Wde(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function yc(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,yc)}Wde(yc,Error);yc.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g({[Ne]:pe})))},H=function(R){return R},j=function(R){return R},$=Ms("correct indentation"),V=" ",W=ar(" ",!1),Z=function(R){return R.length===vA*Gg},A=function(R){return R.length===(vA+1)*Gg},ae=function(){return vA++,!0},ge=function(){return vA--,!0},_=function(){return Lg()},L=Ms("pseudostring"),N=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,ue=Fn(["\r",` -`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),we=/^[^\r\n\t ,\][{}:#"']/,Te=Fn(["\r",` -`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),Pe=function(){return Lg().replace(/^ *| *$/g,"")},Le="--",se=ar("--",!1),Ae=/^[a-zA-Z\/0-9]/,be=Fn([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),fe=/^[^\r\n\t :,]/,le=Fn(["\r",` -`," "," ",":",","],!0,!1),Ge="null",ie=ar("null",!1),Y=function(){return null},he="true",re=ar("true",!1),me=function(){return!0},tt="false",Rt=ar("false",!1),It=function(){return!1},Ur=Ms("string"),oi='"',pi=ar('"',!1),pr=function(){return""},di=function(R){return R},ai=function(R){return R.join("")},Os=/^[^"\\\0-\x1F\x7F]/,dr=Fn(['"',"\\",["\0",""],"\x7F"],!0,!1),Bi='\\"',_n=ar('\\"',!1),pa=function(){return'"'},EA="\\\\",kg=ar("\\\\",!1),Zn=function(){return"\\"},IA="\\/",da=ar("\\/",!1),Jp=function(){return"/"},yA="\\b",wA=ar("\\b",!1),Br=function(){return"\b"},Vl="\\f",Rg=ar("\\f",!1),Eo=function(){return"\f"},Fg="\\n",Wp=ar("\\n",!1),zp=function(){return` -`},Pr="\\r",oe=ar("\\r",!1),Io=function(){return"\r"},kn="\\t",Ng=ar("\\t",!1),bt=function(){return" "},Xl="\\u",Rn=ar("\\u",!1),$n=function(R,q,pe,Ne){return String.fromCharCode(parseInt(`0x${R}${q}${pe}${Ne}`))},es=/^[0-9a-fA-F]/,ut=Fn([["0","9"],["a","f"],["A","F"]],!1,!1),yo=Ms("blank space"),at=/^[ \t]/,ln=Fn([" "," "],!1,!1),S=Ms("white space"),Lt=/^[ \t\n\r]/,Tg=Fn([" "," ",` -`,"\r"],!1,!1),_l=`\r -`,Vp=ar(`\r -`,!1),Xp=` -`,_p=ar(` -`,!1),Zp="\r",$p=ar("\r",!1),G=0,yt=0,BA=[{line:1,column:1}],Wi=0,Zl=[],We=0,Ca;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function Lg(){return r.substring(yt,G)}function uI(){return cn(yt,G)}function ed(R,q){throw q=q!==void 0?q:cn(yt,G),ec([Ms(R)],r.substring(yt,G),q)}function gI(R,q){throw q=q!==void 0?q:cn(yt,G),Og(R,q)}function ar(R,q){return{type:"literal",text:R,ignoreCase:q}}function Fn(R,q,pe){return{type:"class",parts:R,inverted:q,ignoreCase:pe}}function $l(){return{type:"any"}}function td(){return{type:"end"}}function Ms(R){return{type:"other",description:R}}function ma(R){var q=BA[R],pe;if(q)return q;for(pe=R-1;!BA[pe];)pe--;for(q=BA[pe],q={line:q.line,column:q.column};peWi&&(Wi=G,Zl=[]),Zl.push(R))}function Og(R,q){return new yc(R,null,null,q)}function ec(R,q,pe){return new yc(yc.buildMessage(R,q),R,q,pe)}function Us(){var R;return R=Mg(),R}function tc(){var R,q,pe;for(R=G,q=[],pe=bA();pe!==t;)q.push(pe),pe=bA();return q!==t&&(yt=R,q=s(q)),R=q,R}function bA(){var R,q,pe,Ne,xe;return R=G,q=Ia(),q!==t?(r.charCodeAt(G)===45?(pe=o,G++):(pe=t,We===0&&ke(a)),pe!==t?(Ne=Nr(),Ne!==t?(xe=Ea(),xe!==t?(yt=R,q=l(xe),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R}function Mg(){var R,q,pe;for(R=G,q=[],pe=Ug();pe!==t;)q.push(pe),pe=Ug();return q!==t&&(yt=R,q=c(q)),R=q,R}function Ug(){var R,q,pe,Ne,xe,qe,dt,Ft,Nn;if(R=G,q=Nr(),q===t&&(q=null),q!==t){if(pe=G,r.charCodeAt(G)===35?(Ne=u,G++):(Ne=t,We===0&&ke(g)),Ne!==t){if(xe=[],qe=G,dt=G,We++,Ft=Gs(),We--,Ft===t?dt=void 0:(G=dt,dt=t),dt!==t?(r.length>G?(Ft=r.charAt(G),G++):(Ft=t,We===0&&ke(f)),Ft!==t?(dt=[dt,Ft],qe=dt):(G=qe,qe=t)):(G=qe,qe=t),qe!==t)for(;qe!==t;)xe.push(qe),qe=G,dt=G,We++,Ft=Gs(),We--,Ft===t?dt=void 0:(G=dt,dt=t),dt!==t?(r.length>G?(Ft=r.charAt(G),G++):(Ft=t,We===0&&ke(f)),Ft!==t?(dt=[dt,Ft],qe=dt):(G=qe,qe=t)):(G=qe,qe=t);else xe=t;xe!==t?(Ne=[Ne,xe],pe=Ne):(G=pe,pe=t)}else G=pe,pe=t;if(pe===t&&(pe=null),pe!==t){if(Ne=[],xe=Hs(),xe!==t)for(;xe!==t;)Ne.push(xe),xe=Hs();else Ne=t;Ne!==t?(yt=R,q=h(),R=q):(G=R,R=t)}else G=R,R=t}else G=R,R=t;if(R===t&&(R=G,q=Ia(),q!==t?(pe=rc(),pe!==t?(Ne=Nr(),Ne===t&&(Ne=null),Ne!==t?(r.charCodeAt(G)===58?(xe=p,G++):(xe=t,We===0&&ke(C)),xe!==t?(qe=Nr(),qe===t&&(qe=null),qe!==t?(dt=Ea(),dt!==t?(yt=R,q=w(pe,dt),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,q=Ia(),q!==t?(pe=Ks(),pe!==t?(Ne=Nr(),Ne===t&&(Ne=null),Ne!==t?(r.charCodeAt(G)===58?(xe=p,G++):(xe=t,We===0&&ke(C)),xe!==t?(qe=Nr(),qe===t&&(qe=null),qe!==t?(dt=Ea(),dt!==t?(yt=R,q=w(pe,dt),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t))){if(R=G,q=Ia(),q!==t)if(pe=Ks(),pe!==t)if(Ne=Nr(),Ne!==t)if(xe=fI(),xe!==t){if(qe=[],dt=Hs(),dt!==t)for(;dt!==t;)qe.push(dt),dt=Hs();else qe=t;qe!==t?(yt=R,q=w(pe,xe),R=q):(G=R,R=t)}else G=R,R=t;else G=R,R=t;else G=R,R=t;else G=R,R=t;if(R===t)if(R=G,q=Ia(),q!==t)if(pe=Ks(),pe!==t){if(Ne=[],xe=G,qe=Nr(),qe===t&&(qe=null),qe!==t?(r.charCodeAt(G)===44?(dt=B,G++):(dt=t,We===0&&ke(v)),dt!==t?(Ft=Nr(),Ft===t&&(Ft=null),Ft!==t?(Nn=Ks(),Nn!==t?(yt=xe,qe=D(pe,Nn),xe=qe):(G=xe,xe=t)):(G=xe,xe=t)):(G=xe,xe=t)):(G=xe,xe=t),xe!==t)for(;xe!==t;)Ne.push(xe),xe=G,qe=Nr(),qe===t&&(qe=null),qe!==t?(r.charCodeAt(G)===44?(dt=B,G++):(dt=t,We===0&&ke(v)),dt!==t?(Ft=Nr(),Ft===t&&(Ft=null),Ft!==t?(Nn=Ks(),Nn!==t?(yt=xe,qe=D(pe,Nn),xe=qe):(G=xe,xe=t)):(G=xe,xe=t)):(G=xe,xe=t)):(G=xe,xe=t);else Ne=t;Ne!==t?(xe=Nr(),xe===t&&(xe=null),xe!==t?(r.charCodeAt(G)===58?(qe=p,G++):(qe=t,We===0&&ke(C)),qe!==t?(dt=Nr(),dt===t&&(dt=null),dt!==t?(Ft=Ea(),Ft!==t?(yt=R,q=T(pe,Ne,Ft),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)}else G=R,R=t;else G=R,R=t}return R}function Ea(){var R,q,pe,Ne,xe,qe,dt;if(R=G,q=G,We++,pe=G,Ne=Gs(),Ne!==t?(xe=$e(),xe!==t?(r.charCodeAt(G)===45?(qe=o,G++):(qe=t,We===0&&ke(a)),qe!==t?(dt=Nr(),dt!==t?(Ne=[Ne,xe,qe,dt],pe=Ne):(G=pe,pe=t)):(G=pe,pe=t)):(G=pe,pe=t)):(G=pe,pe=t),We--,pe!==t?(G=q,q=void 0):q=t,q!==t?(pe=Hs(),pe!==t?(Ne=wo(),Ne!==t?(xe=tc(),xe!==t?(qe=QA(),qe!==t?(yt=R,q=H(xe),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,q=Gs(),q!==t?(pe=wo(),pe!==t?(Ne=Mg(),Ne!==t?(xe=QA(),xe!==t?(yt=R,q=H(Ne),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t))if(R=G,q=ic(),q!==t){if(pe=[],Ne=Hs(),Ne!==t)for(;Ne!==t;)pe.push(Ne),Ne=Hs();else pe=t;pe!==t?(yt=R,q=j(q),R=q):(G=R,R=t)}else G=R,R=t;return R}function Ia(){var R,q,pe;for(We++,R=G,q=[],r.charCodeAt(G)===32?(pe=V,G++):(pe=t,We===0&&ke(W));pe!==t;)q.push(pe),r.charCodeAt(G)===32?(pe=V,G++):(pe=t,We===0&&ke(W));return q!==t?(yt=G,pe=Z(q),pe?pe=void 0:pe=t,pe!==t?(q=[q,pe],R=q):(G=R,R=t)):(G=R,R=t),We--,R===t&&(q=t,We===0&&ke($)),R}function $e(){var R,q,pe;for(R=G,q=[],r.charCodeAt(G)===32?(pe=V,G++):(pe=t,We===0&&ke(W));pe!==t;)q.push(pe),r.charCodeAt(G)===32?(pe=V,G++):(pe=t,We===0&&ke(W));return q!==t?(yt=G,pe=A(q),pe?pe=void 0:pe=t,pe!==t?(q=[q,pe],R=q):(G=R,R=t)):(G=R,R=t),R}function wo(){var R;return yt=G,R=ae(),R?R=void 0:R=t,R}function QA(){var R;return yt=G,R=ge(),R?R=void 0:R=t,R}function rc(){var R;return R=nc(),R===t&&(R=rd()),R}function Ks(){var R,q,pe;if(R=nc(),R===t){if(R=G,q=[],pe=Kg(),pe!==t)for(;pe!==t;)q.push(pe),pe=Kg();else q=t;q!==t&&(yt=R,q=_()),R=q}return R}function ic(){var R;return R=id(),R===t&&(R=hI(),R===t&&(R=nc(),R===t&&(R=rd()))),R}function fI(){var R;return R=id(),R===t&&(R=nc(),R===t&&(R=Kg())),R}function rd(){var R,q,pe,Ne,xe,qe;if(We++,R=G,N.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&ke(ue)),q!==t){for(pe=[],Ne=G,xe=Nr(),xe===t&&(xe=null),xe!==t?(we.test(r.charAt(G))?(qe=r.charAt(G),G++):(qe=t,We===0&&ke(Te)),qe!==t?(xe=[xe,qe],Ne=xe):(G=Ne,Ne=t)):(G=Ne,Ne=t);Ne!==t;)pe.push(Ne),Ne=G,xe=Nr(),xe===t&&(xe=null),xe!==t?(we.test(r.charAt(G))?(qe=r.charAt(G),G++):(qe=t,We===0&&ke(Te)),qe!==t?(xe=[xe,qe],Ne=xe):(G=Ne,Ne=t)):(G=Ne,Ne=t);pe!==t?(yt=R,q=Pe(),R=q):(G=R,R=t)}else G=R,R=t;return We--,R===t&&(q=t,We===0&&ke(L)),R}function Kg(){var R,q,pe,Ne,xe;if(R=G,r.substr(G,2)===Le?(q=Le,G+=2):(q=t,We===0&&ke(se)),q===t&&(q=null),q!==t)if(Ae.test(r.charAt(G))?(pe=r.charAt(G),G++):(pe=t,We===0&&ke(be)),pe!==t){for(Ne=[],fe.test(r.charAt(G))?(xe=r.charAt(G),G++):(xe=t,We===0&&ke(le));xe!==t;)Ne.push(xe),fe.test(r.charAt(G))?(xe=r.charAt(G),G++):(xe=t,We===0&&ke(le));Ne!==t?(yt=R,q=Pe(),R=q):(G=R,R=t)}else G=R,R=t;else G=R,R=t;return R}function id(){var R,q;return R=G,r.substr(G,4)===Ge?(q=Ge,G+=4):(q=t,We===0&&ke(ie)),q!==t&&(yt=R,q=Y()),R=q,R}function hI(){var R,q;return R=G,r.substr(G,4)===he?(q=he,G+=4):(q=t,We===0&&ke(re)),q!==t&&(yt=R,q=me()),R=q,R===t&&(R=G,r.substr(G,5)===tt?(q=tt,G+=5):(q=t,We===0&&ke(Rt)),q!==t&&(yt=R,q=It()),R=q),R}function nc(){var R,q,pe,Ne;return We++,R=G,r.charCodeAt(G)===34?(q=oi,G++):(q=t,We===0&&ke(pi)),q!==t?(r.charCodeAt(G)===34?(pe=oi,G++):(pe=t,We===0&&ke(pi)),pe!==t?(yt=R,q=pr(),R=q):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,r.charCodeAt(G)===34?(q=oi,G++):(q=t,We===0&&ke(pi)),q!==t?(pe=pI(),pe!==t?(r.charCodeAt(G)===34?(Ne=oi,G++):(Ne=t,We===0&&ke(pi)),Ne!==t?(yt=R,q=di(pe),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)),We--,R===t&&(q=t,We===0&&ke(Ur)),R}function pI(){var R,q,pe;if(R=G,q=[],pe=Hg(),pe!==t)for(;pe!==t;)q.push(pe),pe=Hg();else q=t;return q!==t&&(yt=R,q=ai(q)),R=q,R}function Hg(){var R,q,pe,Ne,xe,qe;return Os.test(r.charAt(G))?(R=r.charAt(G),G++):(R=t,We===0&&ke(dr)),R===t&&(R=G,r.substr(G,2)===Bi?(q=Bi,G+=2):(q=t,We===0&&ke(_n)),q!==t&&(yt=R,q=pa()),R=q,R===t&&(R=G,r.substr(G,2)===EA?(q=EA,G+=2):(q=t,We===0&&ke(kg)),q!==t&&(yt=R,q=Zn()),R=q,R===t&&(R=G,r.substr(G,2)===IA?(q=IA,G+=2):(q=t,We===0&&ke(da)),q!==t&&(yt=R,q=Jp()),R=q,R===t&&(R=G,r.substr(G,2)===yA?(q=yA,G+=2):(q=t,We===0&&ke(wA)),q!==t&&(yt=R,q=Br()),R=q,R===t&&(R=G,r.substr(G,2)===Vl?(q=Vl,G+=2):(q=t,We===0&&ke(Rg)),q!==t&&(yt=R,q=Eo()),R=q,R===t&&(R=G,r.substr(G,2)===Fg?(q=Fg,G+=2):(q=t,We===0&&ke(Wp)),q!==t&&(yt=R,q=zp()),R=q,R===t&&(R=G,r.substr(G,2)===Pr?(q=Pr,G+=2):(q=t,We===0&&ke(oe)),q!==t&&(yt=R,q=Io()),R=q,R===t&&(R=G,r.substr(G,2)===kn?(q=kn,G+=2):(q=t,We===0&&ke(Ng)),q!==t&&(yt=R,q=bt()),R=q,R===t&&(R=G,r.substr(G,2)===Xl?(q=Xl,G+=2):(q=t,We===0&&ke(Rn)),q!==t?(pe=SA(),pe!==t?(Ne=SA(),Ne!==t?(xe=SA(),xe!==t?(qe=SA(),qe!==t?(yt=R,q=$n(pe,Ne,xe,qe),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)))))))))),R}function SA(){var R;return es.test(r.charAt(G))?(R=r.charAt(G),G++):(R=t,We===0&&ke(ut)),R}function Nr(){var R,q;if(We++,R=[],at.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&ke(ln)),q!==t)for(;q!==t;)R.push(q),at.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&ke(ln));else R=t;return We--,R===t&&(q=t,We===0&&ke(yo)),R}function dI(){var R,q;if(We++,R=[],Lt.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&ke(Tg)),q!==t)for(;q!==t;)R.push(q),Lt.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&ke(Tg));else R=t;return We--,R===t&&(q=t,We===0&&ke(S)),R}function Hs(){var R,q,pe,Ne,xe,qe;if(R=G,q=Gs(),q!==t){for(pe=[],Ne=G,xe=Nr(),xe===t&&(xe=null),xe!==t?(qe=Gs(),qe!==t?(xe=[xe,qe],Ne=xe):(G=Ne,Ne=t)):(G=Ne,Ne=t);Ne!==t;)pe.push(Ne),Ne=G,xe=Nr(),xe===t&&(xe=null),xe!==t?(qe=Gs(),qe!==t?(xe=[xe,qe],Ne=xe):(G=Ne,Ne=t)):(G=Ne,Ne=t);pe!==t?(q=[q,pe],R=q):(G=R,R=t)}else G=R,R=t;return R}function Gs(){var R;return r.substr(G,2)===_l?(R=_l,G+=2):(R=t,We===0&&ke(Vp)),R===t&&(r.charCodeAt(G)===10?(R=Xp,G++):(R=t,We===0&&ke(_p)),R===t&&(r.charCodeAt(G)===13?(R=Zp,G++):(R=t,We===0&&ke($p)))),R}let Gg=2,vA=0;if(Ca=n(),Ca!==t&&G===r.length)return Ca;throw Ca!==t&&G{"use strict";var $de=r=>{let e=!1,t=!1,i=!1;for(let n=0;n{if(!(typeof r=="string"||Array.isArray(r)))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);let t=n=>e.pascalCase?n.charAt(0).toUpperCase()+n.slice(1):n;return Array.isArray(r)?r=r.map(n=>n.trim()).filter(n=>n.length).join("-"):r=r.trim(),r.length===0?"":r.length===1?e.pascalCase?r.toUpperCase():r.toLowerCase():(r!==r.toLowerCase()&&(r=$de(r)),r=r.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(n,s)=>s.toUpperCase()).replace(/\d+(\w|$)/g,n=>n.toUpperCase()),t(r))};Tv.exports=JH;Tv.exports.default=JH});var zH=y((B$e,eCe)=>{eCe.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vercel",constant:"VERCEL",env:"NOW_BUILDER"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"}]});var wc=y(Mn=>{"use strict";var XH=zH(),vo=process.env;Object.defineProperty(Mn,"_vendors",{value:XH.map(function(r){return r.constant})});Mn.name=null;Mn.isPR=null;XH.forEach(function(r){let t=(Array.isArray(r.env)?r.env:[r.env]).every(function(i){return VH(i)});if(Mn[r.constant]=t,t)switch(Mn.name=r.name,typeof r.pr){case"string":Mn.isPR=!!vo[r.pr];break;case"object":"env"in r.pr?Mn.isPR=r.pr.env in vo&&vo[r.pr.env]!==r.pr.ne:"any"in r.pr?Mn.isPR=r.pr.any.some(function(i){return!!vo[i]}):Mn.isPR=VH(r.pr);break;default:Mn.isPR=null}});Mn.isCI=!!(vo.CI||vo.CONTINUOUS_INTEGRATION||vo.BUILD_NUMBER||vo.RUN_ID||Mn.name);function VH(r){return typeof r=="string"?!!vo[r]:Object.keys(r).every(function(e){return vo[e]===r[e]})}});var ry=y(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});var tCe=0,rCe=1,iCe=2,nCe="",sCe="\0",oCe=-1,aCe=/^(-h|--help)(?:=([0-9]+))?$/,ACe=/^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/,lCe=/^-[a-zA-Z]{2,}$/,cCe=/^([^=]+)=([\s\S]*)$/,uCe=process.env.DEBUG_CLI==="1";Un.BATCH_REGEX=lCe;Un.BINDING_REGEX=cCe;Un.DEBUG=uCe;Un.END_OF_INPUT=sCe;Un.HELP_COMMAND_INDEX=oCe;Un.HELP_REGEX=aCe;Un.NODE_ERRORED=iCe;Un.NODE_INITIAL=tCe;Un.NODE_SUCCESS=rCe;Un.OPTION_REGEX=ACe;Un.START_OF_INPUT=nCe});var iy=y(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});var gCe=ry(),Lv=class extends Error{constructor(e){super(e),this.clipanion={type:"usage"},this.name="UsageError"}},Ov=class extends Error{constructor(e,t){if(super(),this.input=e,this.candidates=t,this.clipanion={type:"none"},this.name="UnknownSyntaxError",this.candidates.length===0)this.message="Command not found, but we're not sure what's the alternative.";else if(this.candidates.every(i=>i.reason!==null&&i.reason===t[0].reason)){let[{reason:i}]=this.candidates;this.message=`${i} - -${this.candidates.map(({usage:n})=>`$ ${n}`).join(` -`)}`}else if(this.candidates.length===1){let[{usage:i}]=this.candidates;this.message=`Command not found; did you mean: - -$ ${i} -${Uv(e)}`}else this.message=`Command not found; did you mean one of: - -${this.candidates.map(({usage:i},n)=>`${`${n}.`.padStart(4)} ${i}`).join(` -`)} - -${Uv(e)}`}},Mv=class extends Error{constructor(e,t){super(),this.input=e,this.usages=t,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find which to pick amongst the following alternatives: - -${this.usages.map((i,n)=>`${`${n}.`.padStart(4)} ${i}`).join(` -`)} - -${Uv(e)}`}},Uv=r=>`While running ${r.filter(e=>e!==gCe.END_OF_INPUT).map(e=>{let t=JSON.stringify(e);return e.match(/\s/)||e.length===0||t!==`"${e}"`?t:e}).join(" ")}`;Qd.AmbiguousSyntaxError=Mv;Qd.UnknownSyntaxError=Ov;Qd.UsageError=Lv});var va=y(TA=>{"use strict";Object.defineProperty(TA,"__esModule",{value:!0});var _H=iy(),ZH=Symbol("clipanion/isOption");function fCe(r){return{...r,[ZH]:!0}}function hCe(r,e){return typeof r>"u"?[r,e]:typeof r=="object"&&r!==null&&!Array.isArray(r)?[void 0,r]:[r,e]}function Kv(r,e=!1){let t=r.replace(/^\.: /,"");return e&&(t=t[0].toLowerCase()+t.slice(1)),t}function $H(r,e){return e.length===1?new _H.UsageError(`${r}: ${Kv(e[0],!0)}`):new _H.UsageError(`${r}: -${e.map(t=>` -- ${Kv(t)}`).join("")}`)}function pCe(r,e,t){if(typeof t>"u")return e;let i=[],n=[],s=a=>{let l=e;return e=a,s.bind(null,l)};if(!t(e,{errors:i,coercions:n,coercion:s}))throw $H(`Invalid value for ${r}`,i);for(let[,a]of n)a();return e}TA.applyValidator=pCe;TA.cleanValidationError=Kv;TA.formatError=$H;TA.isOptionSymbol=ZH;TA.makeCommandOption=fCe;TA.rerouteArguments=hCe});var ns=y(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});var eG=/^[a-zA-Z_][a-zA-Z0-9_]*$/,tG=/^#[0-9a-f]{6}$/i,rG=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,iG=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,nG=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,Hv=/^(?:[1-9]\d{3}(-?)(?:(?:0[1-9]|1[0-2])\1(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])\1(?:29|30)|(?:0[13578]|1[02])(?:\1)31|00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[0-5]))|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\2)29|-?366))T(?:[01]\d|2[0-3])(:?)[0-5]\d(?:\3[0-5]\d)?(?:Z|[+-][01]\d(?:\3[0-5]\d)?)$/,sG=r=>()=>r;function Qt({test:r}){return sG(r)()}function Zr(r){return r===null?"null":r===void 0?"undefined":r===""?"an empty string":JSON.stringify(r)}function LA(r,e){var t,i,n;return typeof e=="number"?`${(t=r==null?void 0:r.p)!==null&&t!==void 0?t:"."}[${e}]`:eG.test(e)?`${(i=r==null?void 0:r.p)!==null&&i!==void 0?i:""}.${e}`:`${(n=r==null?void 0:r.p)!==null&&n!==void 0?n:"."}[${JSON.stringify(e)}]`}function Bc(r,e){return t=>{let i=r[e];return r[e]=t,Bc(r,e).bind(null,i)}}function oG(r,e){return t=>{r[e]=t}}function ny(r,e,t){return r===1?e:t}function pt({errors:r,p:e}={},t){return r==null||r.push(`${e!=null?e:"."}: ${t}`),!1}var aG=()=>Qt({test:(r,e)=>!0});function dCe(r){return Qt({test:(e,t)=>e!==r?pt(t,`Expected a literal (got ${Zr(r)})`):!0})}var CCe=()=>Qt({test:(r,e)=>typeof r!="string"?pt(e,`Expected a string (got ${Zr(r)})`):!0});function mCe(r){let e=Array.isArray(r)?r:Object.values(r),t=new Set(e);return Qt({test:(i,n)=>t.has(i)?!0:pt(n,`Expected a valid enumeration value (got ${Zr(i)})`)})}var ECe=new Map([["true",!0],["True",!0],["1",!0],[1,!0],["false",!1],["False",!1],["0",!1],[0,!1]]),ICe=()=>Qt({test:(r,e)=>{var t;if(typeof r!="boolean"){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i=ECe.get(r);if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a boolean (got ${Zr(r)})`)}return!0}}),yCe=()=>Qt({test:(r,e)=>{var t;if(typeof r!="number"){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i;if(typeof r=="string"){let n;try{n=JSON.parse(r)}catch{}if(typeof n=="number")if(JSON.stringify(n)===r)i=n;else return pt(e,`Received a number that can't be safely represented by the runtime (${r})`)}if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a number (got ${Zr(r)})`)}return!0}}),wCe=()=>Qt({test:(r,e)=>{var t;if(!(r instanceof Date)){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i;if(typeof r=="string"&&Hv.test(r))i=new Date(r);else{let n;if(typeof r=="string"){let s;try{s=JSON.parse(r)}catch{}typeof s=="number"&&(n=s)}else typeof r=="number"&&(n=r);if(typeof n<"u")if(Number.isSafeInteger(n)||!Number.isSafeInteger(n*1e3))i=new Date(n*1e3);else return pt(e,`Received a timestamp that can't be safely represented by the runtime (${r})`)}if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a date (got ${Zr(r)})`)}return!0}}),BCe=(r,{delimiter:e}={})=>Qt({test:(t,i)=>{var n;if(typeof t=="string"&&typeof e<"u"&&typeof(i==null?void 0:i.coercions)<"u"){if(typeof(i==null?void 0:i.coercion)>"u")return pt(i,"Unbound coercion result");t=t.split(e),i.coercions.push([(n=i.p)!==null&&n!==void 0?n:".",i.coercion.bind(null,t)])}if(!Array.isArray(t))return pt(i,`Expected an array (got ${Zr(t)})`);let s=!0;for(let o=0,a=t.length;o{let t=AG(r.length);return Qt({test:(i,n)=>{var s;if(typeof i=="string"&&typeof e<"u"&&typeof(n==null?void 0:n.coercions)<"u"){if(typeof(n==null?void 0:n.coercion)>"u")return pt(n,"Unbound coercion result");i=i.split(e),n.coercions.push([(s=n.p)!==null&&s!==void 0?s:".",n.coercion.bind(null,i)])}if(!Array.isArray(i))return pt(n,`Expected a tuple (got ${Zr(i)})`);let o=t(i,Object.assign({},n));for(let a=0,l=i.length;aQt({test:(t,i)=>{if(typeof t!="object"||t===null)return pt(i,`Expected an object (got ${Zr(t)})`);let n=Object.keys(t),s=!0;for(let o=0,a=n.length;o{let t=Object.keys(r);return Qt({test:(i,n)=>{if(typeof i!="object"||i===null)return pt(n,`Expected an object (got ${Zr(i)})`);let s=new Set([...t,...Object.keys(i)]),o={},a=!0;for(let l of s){if(l==="constructor"||l==="__proto__")a=pt(Object.assign(Object.assign({},n),{p:LA(n,l)}),"Unsafe property name");else{let c=Object.prototype.hasOwnProperty.call(r,l)?r[l]:void 0,u=Object.prototype.hasOwnProperty.call(i,l)?i[l]:void 0;typeof c<"u"?a=c(u,Object.assign(Object.assign({},n),{p:LA(n,l),coercion:Bc(i,l)}))&&a:e===null?a=pt(Object.assign(Object.assign({},n),{p:LA(n,l)}),`Extraneous property (got ${Zr(u)})`):Object.defineProperty(o,l,{enumerable:!0,get:()=>u,set:oG(i,l)})}if(!a&&(n==null?void 0:n.errors)==null)break}return e!==null&&(a||(n==null?void 0:n.errors)!=null)&&(a=e(o,n)&&a),a}})},vCe=r=>Qt({test:(e,t)=>e instanceof r?!0:pt(t,`Expected an instance of ${r.name} (got ${Zr(e)})`)}),xCe=(r,{exclusive:e=!1}={})=>Qt({test:(t,i)=>{var n,s,o;let a=[],l=typeof(i==null?void 0:i.errors)<"u"?[]:void 0;for(let c=0,u=r.length;c1?pt(i,`Expected to match exactly a single predicate (matched ${a.join(", ")})`):(o=i==null?void 0:i.errors)===null||o===void 0||o.push(...l),!1}}),PCe=(r,e)=>Qt({test:(t,i)=>{var n,s;let o={value:t},a=typeof(i==null?void 0:i.coercions)<"u"?Bc(o,"value"):void 0,l=typeof(i==null?void 0:i.coercions)<"u"?[]:void 0;if(!r(t,Object.assign(Object.assign({},i),{coercion:a,coercions:l})))return!1;let c=[];if(typeof l<"u")for(let[,u]of l)c.push(u());try{if(typeof(i==null?void 0:i.coercions)<"u"){if(o.value!==t){if(typeof(i==null?void 0:i.coercion)>"u")return pt(i,"Unbound coercion result");i.coercions.push([(n=i.p)!==null&&n!==void 0?n:".",i.coercion.bind(null,o.value)])}(s=i==null?void 0:i.coercions)===null||s===void 0||s.push(...l)}return e.every(u=>u(o.value,i))}finally{for(let u of c)u()}}}),DCe=r=>Qt({test:(e,t)=>typeof e>"u"?!0:r(e,t)}),kCe=r=>Qt({test:(e,t)=>e===null?!0:r(e,t)}),RCe=r=>Qt({test:(e,t)=>e.length>=r?!0:pt(t,`Expected to have a length of at least ${r} elements (got ${e.length})`)}),FCe=r=>Qt({test:(e,t)=>e.length<=r?!0:pt(t,`Expected to have a length of at most ${r} elements (got ${e.length})`)}),AG=r=>Qt({test:(e,t)=>e.length!==r?pt(t,`Expected to have a length of exactly ${r} elements (got ${e.length})`):!0}),NCe=({map:r}={})=>Qt({test:(e,t)=>{let i=new Set,n=new Set;for(let s=0,o=e.length;sQt({test:(r,e)=>r<=0?!0:pt(e,`Expected to be negative (got ${r})`)}),LCe=()=>Qt({test:(r,e)=>r>=0?!0:pt(e,`Expected to be positive (got ${r})`)}),OCe=r=>Qt({test:(e,t)=>e>=r?!0:pt(t,`Expected to be at least ${r} (got ${e})`)}),MCe=r=>Qt({test:(e,t)=>e<=r?!0:pt(t,`Expected to be at most ${r} (got ${e})`)}),UCe=(r,e)=>Qt({test:(t,i)=>t>=r&&t<=e?!0:pt(i,`Expected to be in the [${r}; ${e}] range (got ${t})`)}),KCe=(r,e)=>Qt({test:(t,i)=>t>=r&&tQt({test:(e,t)=>e!==Math.round(e)?pt(t,`Expected to be an integer (got ${e})`):Number.isSafeInteger(e)?!0:pt(t,`Expected to be a safe integer (got ${e})`)}),GCe=r=>Qt({test:(e,t)=>r.test(e)?!0:pt(t,`Expected to match the pattern ${r.toString()} (got ${Zr(e)})`)}),YCe=()=>Qt({test:(r,e)=>r!==r.toLowerCase()?pt(e,`Expected to be all-lowercase (got ${r})`):!0}),jCe=()=>Qt({test:(r,e)=>r!==r.toUpperCase()?pt(e,`Expected to be all-uppercase (got ${r})`):!0}),qCe=()=>Qt({test:(r,e)=>nG.test(r)?!0:pt(e,`Expected to be a valid UUID v4 (got ${Zr(r)})`)}),JCe=()=>Qt({test:(r,e)=>Hv.test(r)?!1:pt(e,`Expected to be a valid ISO 8601 date string (got ${Zr(r)})`)}),WCe=({alpha:r=!1})=>Qt({test:(e,t)=>(r?tG.test(e):rG.test(e))?!0:pt(t,`Expected to be a valid hexadecimal color string (got ${Zr(e)})`)}),zCe=()=>Qt({test:(r,e)=>iG.test(r)?!0:pt(e,`Expected to be a valid base 64 string (got ${Zr(r)})`)}),VCe=(r=aG())=>Qt({test:(e,t)=>{let i;try{i=JSON.parse(e)}catch{return pt(t,`Expected to be a valid JSON string (got ${Zr(e)})`)}return r(i,t)}}),XCe=r=>{let e=new Set(r);return Qt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)||s.push(o);return s.length>0?pt(i,`Missing required ${ny(s.length,"property","properties")} ${s.map(o=>`"${o}"`).join(", ")}`):!0}})},_Ce=r=>{let e=new Set(r);return Qt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)&&s.push(o);return s.length>0?pt(i,`Forbidden ${ny(s.length,"property","properties")} ${s.map(o=>`"${o}"`).join(", ")}`):!0}})},ZCe=r=>{let e=new Set(r);return Qt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)&&s.push(o);return s.length>1?pt(i,`Mutually exclusive properties ${s.map(o=>`"${o}"`).join(", ")}`):!0}})};(function(r){r.Forbids="Forbids",r.Requires="Requires"})(st.KeyRelationship||(st.KeyRelationship={}));var $Ce={[st.KeyRelationship.Forbids]:{expect:!1,message:"forbids using"},[st.KeyRelationship.Requires]:{expect:!0,message:"requires using"}},eme=(r,e,t,{ignore:i=[]}={})=>{let n=new Set(i),s=new Set(t),o=$Ce[e];return Qt({test:(a,l)=>{let c=new Set(Object.keys(a));if(!c.has(r)||n.has(a[r]))return!0;let u=[];for(let g of s)(c.has(g)&&!n.has(a[g]))!==o.expect&&u.push(g);return u.length>=1?pt(l,`Property "${r}" ${o.message} ${ny(u.length,"property","properties")} ${u.map(g=>`"${g}"`).join(", ")}`):!0}})};st.applyCascade=PCe;st.base64RegExp=iG;st.colorStringAlphaRegExp=rG;st.colorStringRegExp=tG;st.computeKey=LA;st.getPrintable=Zr;st.hasExactLength=AG;st.hasForbiddenKeys=_Ce;st.hasKeyRelationship=eme;st.hasMaxLength=FCe;st.hasMinLength=RCe;st.hasMutuallyExclusiveKeys=ZCe;st.hasRequiredKeys=XCe;st.hasUniqueItems=NCe;st.isArray=BCe;st.isAtLeast=OCe;st.isAtMost=MCe;st.isBase64=zCe;st.isBoolean=ICe;st.isDate=wCe;st.isDict=QCe;st.isEnum=mCe;st.isHexColor=WCe;st.isISO8601=JCe;st.isInExclusiveRange=KCe;st.isInInclusiveRange=UCe;st.isInstanceOf=vCe;st.isInteger=HCe;st.isJSON=VCe;st.isLiteral=dCe;st.isLowerCase=YCe;st.isNegative=TCe;st.isNullable=kCe;st.isNumber=yCe;st.isObject=SCe;st.isOneOf=xCe;st.isOptional=DCe;st.isPositive=LCe;st.isString=CCe;st.isTuple=bCe;st.isUUID4=qCe;st.isUnknown=aG;st.isUpperCase=jCe;st.iso8601RegExp=Hv;st.makeCoercionFn=Bc;st.makeSetter=oG;st.makeTrait=sG;st.makeValidator=Qt;st.matchesRegExp=GCe;st.plural=ny;st.pushError=pt;st.simpleKeyRegExp=eG;st.uuid4RegExp=nG});var bc=y(Gv=>{"use strict";Object.defineProperty(Gv,"__esModule",{value:!0});var lG=va();function tme(r){if(r&&r.__esModule)return r;var e=Object.create(null);return r&&Object.keys(r).forEach(function(t){if(t!=="default"){var i=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:function(){return r[t]}})}}),e.default=r,Object.freeze(e)}var Sd=class{constructor(){this.help=!1}static Usage(e){return e}async catch(e){throw e}async validateAndExecute(){let t=this.constructor.schema;if(Array.isArray(t)){let{isDict:n,isUnknown:s,applyCascade:o}=await Promise.resolve().then(function(){return tme(ns())}),a=o(n(s()),t),l=[],c=[];if(!a(this,{errors:l,coercions:c}))throw lG.formatError("Invalid option schema",l);for(let[,g]of c)g()}else if(t!=null)throw new Error("Invalid command schema");let i=await this.execute();return typeof i<"u"?i:0}};Sd.isOption=lG.isOptionSymbol;Sd.Default=[];Gv.Command=Sd});var jv=y(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});var cG=80,Yv=Array(cG).fill("\u2501");for(let r=0;r<=24;++r)Yv[Yv.length-r]=`\x1B[38;5;${232+r}m\u2501`;var rme={header:r=>`\x1B[1m\u2501\u2501\u2501 ${r}${r.length`\x1B[1m${r}\x1B[22m`,error:r=>`\x1B[31m\x1B[1m${r}\x1B[22m\x1B[39m`,code:r=>`\x1B[36m${r}\x1B[39m`},ime={header:r=>r,bold:r=>r,error:r=>r,code:r=>r};function nme(r){let e=r.split(` -`),t=e.filter(n=>n.match(/\S/)),i=t.length>0?t.reduce((n,s)=>Math.min(n,s.length-s.trimStart().length),Number.MAX_VALUE):0;return e.map(n=>n.slice(i).trimRight()).join(` -`)}function sme(r,{format:e,paragraphs:t}){return r=r.replace(/\r\n?/g,` -`),r=nme(r),r=r.replace(/^\n+|\n+$/g,""),r=r.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2 - -`),r=r.replace(/\n(\n)?\n*/g,"$1"),t&&(r=r.split(/\n/).map(i=>{let n=i.match(/^\s*[*-][\t ]+(.*)/);if(!n)return i.match(/(.{1,80})(?: |$)/g).join(` -`);let s=i.length-i.trimStart().length;return n[1].match(new RegExp(`(.{1,${78-s}})(?: |$)`,"g")).map((o,a)=>" ".repeat(s)+(a===0?"- ":" ")+o).join(` -`)}).join(` - -`)),r=r.replace(/(`+)((?:.|[\n])*?)\1/g,(i,n,s)=>e.code(n+s+n)),r=r.replace(/(\*\*)((?:.|[\n])*?)\1/g,(i,n,s)=>e.bold(n+s+n)),r?`${r} -`:""}vd.formatMarkdownish=sme;vd.richFormat=rme;vd.textFormat=ime});var ly=y(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});var lt=ry(),ay=iy();function Vi(r){lt.DEBUG&&console.log(r)}var uG={candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:lt.HELP_COMMAND_INDEX};function qv(){return{nodes:[Li(),Li(),Li()]}}function gG(r){let e=qv(),t=[],i=e.nodes.length;for(let n of r){t.push(i);for(let s=0;s{if(e.has(i))return;e.add(i);let n=r.nodes[i];for(let o of Object.values(n.statics))for(let{to:a}of o)t(a);for(let[,{to:o}]of n.dynamics)t(o);for(let{to:o}of n.shortcuts)t(o);let s=new Set(n.shortcuts.map(({to:o})=>o));for(;n.shortcuts.length>0;){let{to:o}=n.shortcuts.shift(),a=r.nodes[o];for(let[l,c]of Object.entries(a.statics)){let u=Object.prototype.hasOwnProperty.call(n.statics,l)?n.statics[l]:n.statics[l]=[];for(let g of c)u.some(({to:f})=>g.to===f)||u.push(g)}for(let[l,c]of a.dynamics)n.dynamics.some(([u,{to:g}])=>l===u&&c.to===g)||n.dynamics.push([l,c]);for(let l of a.shortcuts)s.has(l.to)||(n.shortcuts.push(l),s.add(l.to))}};t(lt.NODE_INITIAL)}function hG(r,{prefix:e=""}={}){if(lt.DEBUG){Vi(`${e}Nodes are:`);for(let t=0;tl!==lt.NODE_ERRORED).map(({state:l})=>({usage:l.candidateUsage,reason:null})));if(a.every(({node:l})=>l===lt.NODE_ERRORED))throw new ay.UnknownSyntaxError(e,a.map(({state:l})=>({usage:l.candidateUsage,reason:l.errorMessage})));i=pG(a)}if(i.length>0){Vi(" Results:");for(let s of i)Vi(` - ${s.node} -> ${JSON.stringify(s.state)}`)}else Vi(" No results");return i}function ome(r,e){if(e.selectedIndex!==null)return!0;if(Object.prototype.hasOwnProperty.call(r.statics,lt.END_OF_INPUT)){for(let{to:t}of r.statics[lt.END_OF_INPUT])if(t===lt.NODE_SUCCESS)return!0}return!1}function ame(r,e,t){let i=t&&e.length>0?[""]:[],n=Jv(r,e,t),s=[],o=new Set,a=(l,c,u=!0)=>{let g=[c];for(;g.length>0;){let h=g;g=[];for(let p of h){let C=r.nodes[p],w=Object.keys(C.statics);for(let B of Object.keys(C.statics)){let v=w[0];for(let{to:D,reducer:T}of C.statics[v])T==="pushPath"&&(u||l.push(v),g.push(D))}}u=!1}let f=JSON.stringify(l);o.has(f)||(s.push(l),o.add(f))};for(let{node:l,state:c}of n){if(c.remainder!==null){a([c.remainder],l);continue}let u=r.nodes[l],g=ome(u,c);for(let[f,h]of Object.entries(u.statics))(g&&f!==lt.END_OF_INPUT||!f.startsWith("-")&&h.some(({reducer:p})=>p==="pushPath"))&&a([...i,f],l);if(!!g)for(let[f,{to:h}]of u.dynamics){if(h===lt.NODE_ERRORED)continue;let p=IG(f,c);if(p!==null)for(let C of p)a([...i,C],l)}}return[...s].sort()}function Ame(r,e){let t=Jv(r,[...e,lt.END_OF_INPUT]);return dG(e,t.map(({state:i})=>i))}function pG(r){let e=0;for(let{state:t}of r)t.path.length>e&&(e=t.path.length);return r.filter(({state:t})=>t.path.length===e)}function dG(r,e){let t=e.filter(g=>g.selectedIndex!==null);if(t.length===0)throw new Error;let i=t.filter(g=>g.requiredOptions.every(f=>f.some(h=>g.options.find(p=>p.name===h))));if(i.length===0)throw new ay.UnknownSyntaxError(r,t.map(g=>({usage:g.candidateUsage,reason:null})));let n=0;for(let g of i)g.path.length>n&&(n=g.path.length);let s=i.filter(g=>g.path.length===n),o=g=>g.positionals.filter(({extra:f})=>!f).length+g.options.length,a=s.map(g=>({state:g,positionalCount:o(g)})),l=0;for(let{positionalCount:g}of a)g>l&&(l=g);let c=a.filter(({positionalCount:g})=>g===l).map(({state:g})=>g),u=CG(c);if(u.length>1)throw new ay.AmbiguousSyntaxError(r,u.map(g=>g.candidateUsage));return u[0]}function CG(r){let e=[],t=[];for(let i of r)i.selectedIndex===lt.HELP_COMMAND_INDEX?t.push(i):e.push(i);return t.length>0&&e.push({...uG,path:mG(...t.map(i=>i.path)),options:t.reduce((i,n)=>i.concat(n.options),[])}),e}function mG(r,e,...t){return e===void 0?Array.from(r):mG(r.filter((i,n)=>i===e[n]),...t)}function Li(){return{dynamics:[],shortcuts:[],statics:{}}}function Wv(r){return r===lt.NODE_SUCCESS||r===lt.NODE_ERRORED}function sy(r,e=0){return{to:Wv(r.to)?r.to:r.to>2?r.to+e-2:r.to+e,reducer:r.reducer}}function EG(r,e=0){let t=Li();for(let[i,n]of r.dynamics)t.dynamics.push([i,sy(n,e)]);for(let i of r.shortcuts)t.shortcuts.push(sy(i,e));for(let[i,n]of Object.entries(r.statics))t.statics[i]=n.map(s=>sy(s,e));return t}function Ei(r,e,t,i,n){r.nodes[e].dynamics.push([t,{to:i,reducer:n}])}function Qc(r,e,t,i){r.nodes[e].shortcuts.push({to:t,reducer:i})}function xo(r,e,t,i,n){(Object.prototype.hasOwnProperty.call(r.nodes[e].statics,t)?r.nodes[e].statics[t]:r.nodes[e].statics[t]=[]).push({to:i,reducer:n})}function xd(r,e,t,i){if(Array.isArray(e)){let[n,...s]=e;return r[n](t,i,...s)}else return r[e](t,i)}function IG(r,e){let t=Array.isArray(r)?Pd[r[0]]:Pd[r];if(typeof t.suggest>"u")return null;let i=Array.isArray(r)?r.slice(1):[];return t.suggest(e,...i)}var Pd={always:()=>!0,isOptionLike:(r,e)=>!r.ignoreOptions&&e!=="-"&&e.startsWith("-"),isNotOptionLike:(r,e)=>r.ignoreOptions||e==="-"||!e.startsWith("-"),isOption:(r,e,t,i)=>!r.ignoreOptions&&e===t,isBatchOption:(r,e,t)=>!r.ignoreOptions&<.BATCH_REGEX.test(e)&&[...e.slice(1)].every(i=>t.includes(`-${i}`)),isBoundOption:(r,e,t,i)=>{let n=e.match(lt.BINDING_REGEX);return!r.ignoreOptions&&!!n&<.OPTION_REGEX.test(n[1])&&t.includes(n[1])&&i.filter(s=>s.names.includes(n[1])).every(s=>s.allowBinding)},isNegatedOption:(r,e,t)=>!r.ignoreOptions&&e===`--no-${t.slice(2)}`,isHelp:(r,e)=>!r.ignoreOptions&<.HELP_REGEX.test(e),isUnsupportedOption:(r,e,t)=>!r.ignoreOptions&&e.startsWith("-")&<.OPTION_REGEX.test(e)&&!t.includes(e),isInvalidOption:(r,e)=>!r.ignoreOptions&&e.startsWith("-")&&!lt.OPTION_REGEX.test(e)};Pd.isOption.suggest=(r,e,t=!0)=>t?null:[e];var oy={setCandidateState:(r,e,t)=>({...r,...t}),setSelectedIndex:(r,e,t)=>({...r,selectedIndex:t}),pushBatch:(r,e)=>({...r,options:r.options.concat([...e.slice(1)].map(t=>({name:`-${t}`,value:!0})))}),pushBound:(r,e)=>{let[,t,i]=e.match(lt.BINDING_REGEX);return{...r,options:r.options.concat({name:t,value:i})}},pushPath:(r,e)=>({...r,path:r.path.concat(e)}),pushPositional:(r,e)=>({...r,positionals:r.positionals.concat({value:e,extra:!1})}),pushExtra:(r,e)=>({...r,positionals:r.positionals.concat({value:e,extra:!0})}),pushExtraNoLimits:(r,e)=>({...r,positionals:r.positionals.concat({value:e,extra:Po})}),pushTrue:(r,e,t=e)=>({...r,options:r.options.concat({name:e,value:!0})}),pushFalse:(r,e,t=e)=>({...r,options:r.options.concat({name:t,value:!1})}),pushUndefined:(r,e)=>({...r,options:r.options.concat({name:e,value:void 0})}),pushStringValue:(r,e)=>{var t;let i={...r,options:[...r.options]},n=r.options[r.options.length-1];return n.value=((t=n.value)!==null&&t!==void 0?t:[]).concat([e]),i},setStringValue:(r,e)=>{let t={...r,options:[...r.options]},i=r.options[r.options.length-1];return i.value=e,t},inhibateOptions:r=>({...r,ignoreOptions:!0}),useHelp:(r,e,t)=>{let[,,i]=e.match(lt.HELP_REGEX);return typeof i<"u"?{...r,options:[{name:"-c",value:String(t)},{name:"-i",value:i}]}:{...r,options:[{name:"-c",value:String(t)}]}},setError:(r,e,t)=>e===lt.END_OF_INPUT?{...r,errorMessage:`${t}.`}:{...r,errorMessage:`${t} ("${e}").`},setOptionArityError:(r,e)=>{let t=r.options[r.options.length-1];return{...r,errorMessage:`Not enough arguments to option ${t.name}.`}}},Po=Symbol(),Ay=class{constructor(e,t){this.allOptionNames=[],this.arity={leading:[],trailing:[],extra:[],proxy:!1},this.options=[],this.paths=[],this.cliIndex=e,this.cliOpts=t}addPath(e){this.paths.push(e)}setArity({leading:e=this.arity.leading,trailing:t=this.arity.trailing,extra:i=this.arity.extra,proxy:n=this.arity.proxy}){Object.assign(this.arity,{leading:e,trailing:t,extra:i,proxy:n})}addPositional({name:e="arg",required:t=!0}={}){if(!t&&this.arity.extra===Po)throw new Error("Optional parameters cannot be declared when using .rest() or .proxy()");if(!t&&this.arity.trailing.length>0)throw new Error("Optional parameters cannot be declared after the required trailing positional arguments");!t&&this.arity.extra!==Po?this.arity.extra.push(e):this.arity.extra!==Po&&this.arity.extra.length===0?this.arity.leading.push(e):this.arity.trailing.push(e)}addRest({name:e="arg",required:t=0}={}){if(this.arity.extra===Po)throw new Error("Infinite lists cannot be declared multiple times in the same command");if(this.arity.trailing.length>0)throw new Error("Infinite lists cannot be declared after the required trailing positional arguments");for(let i=0;i1)throw new Error("The arity cannot be higher than 1 when the option only supports the --arg=value syntax");if(!Number.isInteger(i))throw new Error(`The arity must be an integer, got ${i}`);if(i<0)throw new Error(`The arity must be positive, got ${i}`);this.allOptionNames.push(...e),this.options.push({names:e,description:t,arity:i,hidden:n,required:s,allowBinding:o})}setContext(e){this.context=e}usage({detailed:e=!0,inlineOptions:t=!0}={}){let i=[this.cliOpts.binaryName],n=[];if(this.paths.length>0&&i.push(...this.paths[0]),e){for(let{names:o,arity:a,hidden:l,description:c,required:u}of this.options){if(l)continue;let g=[];for(let h=0;h`:`[${f}]`)}i.push(...this.arity.leading.map(o=>`<${o}>`)),this.arity.extra===Po?i.push("..."):i.push(...this.arity.extra.map(o=>`[${o}]`)),i.push(...this.arity.trailing.map(o=>`<${o}>`))}return{usage:i.join(" "),options:n}}compile(){if(typeof this.context>"u")throw new Error("Assertion failed: No context attached");let e=qv(),t=lt.NODE_INITIAL,i=this.usage().usage,n=this.options.filter(a=>a.required).map(a=>a.names);t=ss(e,Li()),xo(e,lt.NODE_INITIAL,lt.START_OF_INPUT,t,["setCandidateState",{candidateUsage:i,requiredOptions:n}]);let s=this.arity.proxy?"always":"isNotOptionLike",o=this.paths.length>0?this.paths:[[]];for(let a of o){let l=t;if(a.length>0){let f=ss(e,Li());Qc(e,l,f),this.registerOptions(e,f),l=f}for(let f=0;f0||!this.arity.proxy){let f=ss(e,Li());Ei(e,l,"isHelp",f,["useHelp",this.cliIndex]),xo(e,f,lt.END_OF_INPUT,lt.NODE_SUCCESS,["setSelectedIndex",lt.HELP_COMMAND_INDEX]),this.registerOptions(e,l)}this.arity.leading.length>0&&xo(e,l,lt.END_OF_INPUT,lt.NODE_ERRORED,["setError","Not enough positional arguments"]);let c=l;for(let f=0;f0||f+1!==this.arity.leading.length)&&xo(e,h,lt.END_OF_INPUT,lt.NODE_ERRORED,["setError","Not enough positional arguments"]),Ei(e,c,"isNotOptionLike",h,"pushPositional"),c=h}let u=c;if(this.arity.extra===Po||this.arity.extra.length>0){let f=ss(e,Li());if(Qc(e,c,f),this.arity.extra===Po){let h=ss(e,Li());this.arity.proxy||this.registerOptions(e,h),Ei(e,c,s,h,"pushExtraNoLimits"),Ei(e,h,s,h,"pushExtraNoLimits"),Qc(e,h,f)}else for(let h=0;h0&&xo(e,u,lt.END_OF_INPUT,lt.NODE_ERRORED,["setError","Not enough positional arguments"]);let g=u;for(let f=0;fo.length>s.length?o:s,"");if(i.arity===0)for(let s of i.names)Ei(e,t,["isOption",s,i.hidden||s!==n],t,"pushTrue"),s.startsWith("--")&&!s.startsWith("--no-")&&Ei(e,t,["isNegatedOption",s],t,["pushFalse",s]);else{let s=ss(e,Li());for(let o of i.names)Ei(e,t,["isOption",o,i.hidden||o!==n],s,"pushUndefined");for(let o=0;o=0&&eAme(i,n),suggest:(n,s)=>ame(i,n,s)}}};Ar.CliBuilder=Dd;Ar.CommandBuilder=Ay;Ar.NoLimits=Po;Ar.aggregateHelpStates=CG;Ar.cloneNode=EG;Ar.cloneTransition=sy;Ar.debug=Vi;Ar.debugMachine=hG;Ar.execute=xd;Ar.injectNode=ss;Ar.isTerminalNode=Wv;Ar.makeAnyOfMachine=gG;Ar.makeNode=Li;Ar.makeStateMachine=qv;Ar.reducers=oy;Ar.registerDynamic=Ei;Ar.registerShortcut=Qc;Ar.registerStatic=xo;Ar.runMachineInternal=Jv;Ar.selectBestState=dG;Ar.simplifyMachine=fG;Ar.suggest=IG;Ar.tests=Pd;Ar.trimSmallerBranches=pG});var yG=y(zv=>{"use strict";Object.defineProperty(zv,"__esModule",{value:!0});var lme=bc(),kd=class extends lme.Command{constructor(e){super(),this.contexts=e,this.commands=[]}static from(e,t){let i=new kd(t);i.path=e.path;for(let n of e.options)switch(n.name){case"-c":i.commands.push(Number(n.value));break;case"-i":i.index=Number(n.value);break}return i}async execute(){let e=this.commands;if(typeof this.index<"u"&&this.index>=0&&this.index1){this.context.stdout.write(`Multiple commands match your selection: -`),this.context.stdout.write(` -`);let t=0;for(let i of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[i].commandClass,{prefix:`${t++}. `.padStart(5)}));this.context.stdout.write(` -`),this.context.stdout.write(`Run again with -h= to see the longer details of any of those commands. -`)}}};zv.HelpCommand=kd});var vG=y(Vv=>{"use strict";Object.defineProperty(Vv,"__esModule",{value:!0});var cme=ry(),wG=bc(),ume=J("tty"),gme=ly(),hn=jv(),fme=yG();function hme(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var BG=hme(ume),bG=Symbol("clipanion/errorCommand");function pme(){return process.env.FORCE_COLOR==="0"?1:process.env.FORCE_COLOR==="1"||typeof process.stdout<"u"&&process.stdout.isTTY?8:1}var OA=class{constructor({binaryLabel:e,binaryName:t="...",binaryVersion:i,enableCapture:n=!1,enableColors:s}={}){this.registrations=new Map,this.builder=new gme.CliBuilder({binaryName:t}),this.binaryLabel=e,this.binaryName=t,this.binaryVersion=i,this.enableCapture=n,this.enableColors=s}static from(e,t={}){let i=new OA(t);for(let n of e)i.register(n);return i}register(e){var t;let i=new Map,n=new e;for(let l in n){let c=n[l];typeof c=="object"&&c!==null&&c[wG.Command.isOption]&&i.set(l,c)}let s=this.builder.command(),o=s.cliIndex,a=(t=e.paths)!==null&&t!==void 0?t:n.paths;if(typeof a<"u")for(let l of a)s.addPath(l);this.registrations.set(e,{specs:i,builder:s,index:o});for(let[l,{definition:c}]of i.entries())c(s,l);s.setContext({commandClass:e})}process(e){let{contexts:t,process:i}=this.builder.compile(),n=i(e);switch(n.selectedIndex){case cme.HELP_COMMAND_INDEX:return fme.HelpCommand.from(n,t);default:{let{commandClass:s}=t[n.selectedIndex],o=this.registrations.get(s);if(typeof o>"u")throw new Error("Assertion failed: Expected the command class to have been registered.");let a=new s;a.path=n.path;try{for(let[l,{transformer:c}]of o.specs.entries())a[l]=c(o.builder,l,n);return a}catch(l){throw l[bG]=a,l}}break}}async run(e,t){var i;let n,s={...OA.defaultContext,...t},o=(i=this.enableColors)!==null&&i!==void 0?i:s.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e)}catch(c){return s.stdout.write(this.error(c,{colored:o})),1}if(n.help)return s.stdout.write(this.usage(n,{colored:o,detailed:!0})),0;n.context=s,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),error:(c,u)=>this.error(c,u),format:c=>this.format(c),process:c=>this.process(c),run:(c,u)=>this.run(c,{...s,...u}),usage:(c,u)=>this.usage(c,u)};let a=this.enableCapture?dme(s):SG,l;try{l=await a(()=>n.validateAndExecute().catch(c=>n.catch(c).then(()=>0)))}catch(c){return s.stdout.write(this.error(c,{colored:o,command:n})),1}return l}async runExit(e,t){process.exitCode=await this.run(e,t)}suggest(e,t){let{suggest:i}=this.builder.compile();return i(e,t)}definitions({colored:e=!1}={}){let t=[];for(let[i,{index:n}]of this.registrations){if(typeof i.usage>"u")continue;let{usage:s}=this.getUsageByIndex(n,{detailed:!1}),{usage:o,options:a}=this.getUsageByIndex(n,{detailed:!0,inlineOptions:!1}),l=typeof i.usage.category<"u"?hn.formatMarkdownish(i.usage.category,{format:this.format(e),paragraphs:!1}):void 0,c=typeof i.usage.description<"u"?hn.formatMarkdownish(i.usage.description,{format:this.format(e),paragraphs:!1}):void 0,u=typeof i.usage.details<"u"?hn.formatMarkdownish(i.usage.details,{format:this.format(e),paragraphs:!0}):void 0,g=typeof i.usage.examples<"u"?i.usage.examples.map(([f,h])=>[hn.formatMarkdownish(f,{format:this.format(e),paragraphs:!1}),h.replace(/\$0/g,this.binaryName)]):void 0;t.push({path:s,usage:o,category:l,description:c,details:u,examples:g,options:a})}return t}usage(e=null,{colored:t,detailed:i=!1,prefix:n="$ "}={}){var s;if(e===null){for(let l of this.registrations.keys()){let c=l.paths,u=typeof l.usage<"u";if(!c||c.length===0||c.length===1&&c[0].length===0||((s=c==null?void 0:c.some(h=>h.length===0))!==null&&s!==void 0?s:!1))if(e){e=null;break}else e=l;else if(u){e=null;continue}}e&&(i=!0)}let o=e!==null&&e instanceof wG.Command?e.constructor:e,a="";if(o)if(i){let{description:l="",details:c="",examples:u=[]}=o.usage||{};l!==""&&(a+=hn.formatMarkdownish(l,{format:this.format(t),paragraphs:!1}).replace(/^./,h=>h.toUpperCase()),a+=` -`),(c!==""||u.length>0)&&(a+=`${this.format(t).header("Usage")} -`,a+=` -`);let{usage:g,options:f}=this.getUsageByRegistration(o,{inlineOptions:!1});if(a+=`${this.format(t).bold(n)}${g} -`,f.length>0){a+=` -`,a+=`${hn.richFormat.header("Options")} -`;let h=f.reduce((p,C)=>Math.max(p,C.definition.length),0);a+=` -`;for(let{definition:p,description:C}of f)a+=` ${this.format(t).bold(p.padEnd(h))} ${hn.formatMarkdownish(C,{format:this.format(t),paragraphs:!1})}`}if(c!==""&&(a+=` -`,a+=`${this.format(t).header("Details")} -`,a+=` -`,a+=hn.formatMarkdownish(c,{format:this.format(t),paragraphs:!0})),u.length>0){a+=` -`,a+=`${this.format(t).header("Examples")} -`;for(let[h,p]of u)a+=` -`,a+=hn.formatMarkdownish(h,{format:this.format(t),paragraphs:!1}),a+=`${p.replace(/^/m,` ${this.format(t).bold(n)}`).replace(/\$0/g,this.binaryName)} -`}}else{let{usage:l}=this.getUsageByRegistration(o);a+=`${this.format(t).bold(n)}${l} -`}else{let l=new Map;for(let[f,{index:h}]of this.registrations.entries()){if(typeof f.usage>"u")continue;let p=typeof f.usage.category<"u"?hn.formatMarkdownish(f.usage.category,{format:this.format(t),paragraphs:!1}):null,C=l.get(p);typeof C>"u"&&l.set(p,C=[]);let{usage:w}=this.getUsageByIndex(h);C.push({commandClass:f,usage:w})}let c=Array.from(l.keys()).sort((f,h)=>f===null?-1:h===null?1:f.localeCompare(h,"en",{usage:"sort",caseFirst:"upper"})),u=typeof this.binaryLabel<"u",g=typeof this.binaryVersion<"u";u||g?(u&&g?a+=`${this.format(t).header(`${this.binaryLabel} - ${this.binaryVersion}`)} - -`:u?a+=`${this.format(t).header(`${this.binaryLabel}`)} -`:a+=`${this.format(t).header(`${this.binaryVersion}`)} -`,a+=` ${this.format(t).bold(n)}${this.binaryName} -`):a+=`${this.format(t).bold(n)}${this.binaryName} -`;for(let f of c){let h=l.get(f).slice().sort((C,w)=>C.usage.localeCompare(w.usage,"en",{usage:"sort",caseFirst:"upper"})),p=f!==null?f.trim():"General commands";a+=` -`,a+=`${this.format(t).header(`${p}`)} -`;for(let{commandClass:C,usage:w}of h){let B=C.usage.description||"undocumented";a+=` -`,a+=` ${this.format(t).bold(w)} -`,a+=` ${hn.formatMarkdownish(B,{format:this.format(t),paragraphs:!1})}`}}a+=` -`,a+=hn.formatMarkdownish("You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.",{format:this.format(t),paragraphs:!0})}return a}error(e,t){var i,{colored:n,command:s=(i=e[bG])!==null&&i!==void 0?i:null}=t===void 0?{}:t;e instanceof Error||(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let o="",a=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");a==="Error"&&(a="Internal Error"),o+=`${this.format(n).error(a)}: ${e.message} -`;let l=e.clipanion;return typeof l<"u"?l.type==="usage"&&(o+=` -`,o+=this.usage(s)):e.stack&&(o+=`${e.stack.replace(/^.*\n/,"")} -`),o}format(e){var t;return((t=e!=null?e:this.enableColors)!==null&&t!==void 0?t:OA.defaultContext.colorDepth>1)?hn.richFormat:hn.textFormat}getUsageByRegistration(e,t){let i=this.registrations.get(e);if(typeof i>"u")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(i.index,t)}getUsageByIndex(e,t){return this.builder.getBuilderByIndex(e).usage(t)}};OA.defaultContext={stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:"getColorDepth"in BG.default.WriteStream.prototype?BG.default.WriteStream.prototype.getColorDepth():pme()};var QG;function dme(r){let e=QG;if(typeof e>"u"){if(r.stdout===process.stdout&&r.stderr===process.stderr)return SG;let{AsyncLocalStorage:t}=J("async_hooks");e=QG=new t;let i=process.stdout._write;process.stdout._write=function(s,o,a){let l=e.getStore();return typeof l>"u"?i.call(this,s,o,a):l.stdout.write(s,o,a)};let n=process.stderr._write;process.stderr._write=function(s,o,a){let l=e.getStore();return typeof l>"u"?n.call(this,s,o,a):l.stderr.write(s,o,a)}}return t=>e.run(r,t)}function SG(r){return r()}Vv.Cli=OA});var xG=y(Xv=>{"use strict";Object.defineProperty(Xv,"__esModule",{value:!0});var Cme=bc(),cy=class extends Cme.Command{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)} -`)}};cy.paths=[["--clipanion=definitions"]];Xv.DefinitionsCommand=cy});var PG=y(_v=>{"use strict";Object.defineProperty(_v,"__esModule",{value:!0});var mme=bc(),uy=class extends mme.Command{async execute(){this.context.stdout.write(this.cli.usage())}};uy.paths=[["-h"],["--help"]];_v.HelpCommand=uy});var DG=y(Zv=>{"use strict";Object.defineProperty(Zv,"__esModule",{value:!0});var Eme=bc(),gy=class extends Eme.Command{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:""} -`)}};gy.paths=[["-v"],["--version"]];Zv.VersionCommand=gy});var kG=y(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});var Ime=xG(),yme=PG(),wme=DG();Rd.DefinitionsCommand=Ime.DefinitionsCommand;Rd.HelpCommand=yme.HelpCommand;Rd.VersionCommand=wme.VersionCommand});var FG=y($v=>{"use strict";Object.defineProperty($v,"__esModule",{value:!0});var RG=va();function Bme(r,e,t){let[i,n]=RG.rerouteArguments(e,t!=null?t:{}),{arity:s=1}=n,o=r.split(","),a=new Set(o);return RG.makeCommandOption({definition(l){l.addOption({names:o,arity:s,hidden:n==null?void 0:n.hidden,description:n==null?void 0:n.description,required:n.required})},transformer(l,c,u){let g=typeof i<"u"?[...i]:void 0;for(let{name:f,value:h}of u.options)!a.has(f)||(g=g!=null?g:[],g.push(h));return g}})}$v.Array=Bme});var TG=y(ex=>{"use strict";Object.defineProperty(ex,"__esModule",{value:!0});var NG=va();function bme(r,e,t){let[i,n]=NG.rerouteArguments(e,t!=null?t:{}),s=r.split(","),o=new Set(s);return NG.makeCommandOption({definition(a){a.addOption({names:s,allowBinding:!1,arity:0,hidden:n.hidden,description:n.description,required:n.required})},transformer(a,l,c){let u=i;for(let{name:g,value:f}of c.options)!o.has(g)||(u=f);return u}})}ex.Boolean=bme});var OG=y(tx=>{"use strict";Object.defineProperty(tx,"__esModule",{value:!0});var LG=va();function Qme(r,e,t){let[i,n]=LG.rerouteArguments(e,t!=null?t:{}),s=r.split(","),o=new Set(s);return LG.makeCommandOption({definition(a){a.addOption({names:s,allowBinding:!1,arity:0,hidden:n.hidden,description:n.description,required:n.required})},transformer(a,l,c){let u=i;for(let{name:g,value:f}of c.options)!o.has(g)||(u!=null||(u=0),f?u+=1:u=0);return u}})}tx.Counter=Qme});var MG=y(rx=>{"use strict";Object.defineProperty(rx,"__esModule",{value:!0});var Sme=va();function vme(r={}){return Sme.makeCommandOption({definition(e,t){var i;e.addProxy({name:(i=r.name)!==null&&i!==void 0?i:t,required:r.required})},transformer(e,t,i){return i.positionals.map(({value:n})=>n)}})}rx.Proxy=vme});var UG=y(ix=>{"use strict";Object.defineProperty(ix,"__esModule",{value:!0});var xme=va(),Pme=ly();function Dme(r={}){return xme.makeCommandOption({definition(e,t){var i;e.addRest({name:(i=r.name)!==null&&i!==void 0?i:t,required:r.required})},transformer(e,t,i){let n=o=>{let a=i.positionals[o];return a.extra===Pme.NoLimits||a.extra===!1&&oo)}})}ix.Rest=Dme});var KG=y(nx=>{"use strict";Object.defineProperty(nx,"__esModule",{value:!0});var Fd=va(),kme=ly();function Rme(r,e,t){let[i,n]=Fd.rerouteArguments(e,t!=null?t:{}),{arity:s=1}=n,o=r.split(","),a=new Set(o);return Fd.makeCommandOption({definition(l){l.addOption({names:o,arity:n.tolerateBoolean?0:s,hidden:n.hidden,description:n.description,required:n.required})},transformer(l,c,u){let g,f=i;for(let{name:h,value:p}of u.options)!a.has(h)||(g=h,f=p);return typeof f=="string"?Fd.applyValidator(g!=null?g:c,f,n.validator):f}})}function Fme(r={}){let{required:e=!0}=r;return Fd.makeCommandOption({definition(t,i){var n;t.addPositional({name:(n=r.name)!==null&&n!==void 0?n:i,required:r.required})},transformer(t,i,n){var s;for(let o=0;o{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});var lf=va(),Tme=FG(),Lme=TG(),Ome=OG(),Mme=MG(),Ume=UG(),Kme=KG();pn.applyValidator=lf.applyValidator;pn.cleanValidationError=lf.cleanValidationError;pn.formatError=lf.formatError;pn.isOptionSymbol=lf.isOptionSymbol;pn.makeCommandOption=lf.makeCommandOption;pn.rerouteArguments=lf.rerouteArguments;pn.Array=Tme.Array;pn.Boolean=Lme.Boolean;pn.Counter=Ome.Counter;pn.Proxy=Mme.Proxy;pn.Rest=Ume.Rest;pn.String=Kme.String});var Xe=y(MA=>{"use strict";Object.defineProperty(MA,"__esModule",{value:!0});var Hme=iy(),Gme=bc(),Yme=jv(),jme=vG(),qme=kG(),Jme=HG();MA.UsageError=Hme.UsageError;MA.Command=Gme.Command;MA.formatMarkdownish=Yme.formatMarkdownish;MA.Cli=jme.Cli;MA.Builtins=qme;MA.Option=Jme});var YG=y((J$e,GG)=>{"use strict";GG.exports=(r,...e)=>new Promise(t=>{t(r(...e))})});var cf=y((W$e,sx)=>{"use strict";var Wme=YG(),jG=r=>{if(r<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],t=0,i=()=>{t--,e.length>0&&e.shift()()},n=(a,l,...c)=>{t++;let u=Wme(a,...c);l(u),u.then(i,i)},s=(a,l,...c)=>{tnew Promise(c=>s(a,c,...l));return Object.defineProperties(o,{activeCount:{get:()=>t},pendingCount:{get:()=>e.length}}),o};sx.exports=jG;sx.exports.default=jG});var Nd=y((V$e,qG)=>{var zme="2.0.0",Vme=Number.MAX_SAFE_INTEGER||9007199254740991,Xme=16;qG.exports={SEMVER_SPEC_VERSION:zme,MAX_LENGTH:256,MAX_SAFE_INTEGER:Vme,MAX_SAFE_COMPONENT_LENGTH:Xme}});var Td=y((X$e,JG)=>{var _me=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};JG.exports=_me});var Sc=y((KA,WG)=>{var{MAX_SAFE_COMPONENT_LENGTH:ox}=Nd(),Zme=Td();KA=WG.exports={};var $me=KA.re=[],_e=KA.src=[],Ze=KA.t={},eEe=0,St=(r,e,t)=>{let i=eEe++;Zme(i,e),Ze[r]=i,_e[i]=e,$me[i]=new RegExp(e,t?"g":void 0)};St("NUMERICIDENTIFIER","0|[1-9]\\d*");St("NUMERICIDENTIFIERLOOSE","[0-9]+");St("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");St("MAINVERSION",`(${_e[Ze.NUMERICIDENTIFIER]})\\.(${_e[Ze.NUMERICIDENTIFIER]})\\.(${_e[Ze.NUMERICIDENTIFIER]})`);St("MAINVERSIONLOOSE",`(${_e[Ze.NUMERICIDENTIFIERLOOSE]})\\.(${_e[Ze.NUMERICIDENTIFIERLOOSE]})\\.(${_e[Ze.NUMERICIDENTIFIERLOOSE]})`);St("PRERELEASEIDENTIFIER",`(?:${_e[Ze.NUMERICIDENTIFIER]}|${_e[Ze.NONNUMERICIDENTIFIER]})`);St("PRERELEASEIDENTIFIERLOOSE",`(?:${_e[Ze.NUMERICIDENTIFIERLOOSE]}|${_e[Ze.NONNUMERICIDENTIFIER]})`);St("PRERELEASE",`(?:-(${_e[Ze.PRERELEASEIDENTIFIER]}(?:\\.${_e[Ze.PRERELEASEIDENTIFIER]})*))`);St("PRERELEASELOOSE",`(?:-?(${_e[Ze.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${_e[Ze.PRERELEASEIDENTIFIERLOOSE]})*))`);St("BUILDIDENTIFIER","[0-9A-Za-z-]+");St("BUILD",`(?:\\+(${_e[Ze.BUILDIDENTIFIER]}(?:\\.${_e[Ze.BUILDIDENTIFIER]})*))`);St("FULLPLAIN",`v?${_e[Ze.MAINVERSION]}${_e[Ze.PRERELEASE]}?${_e[Ze.BUILD]}?`);St("FULL",`^${_e[Ze.FULLPLAIN]}$`);St("LOOSEPLAIN",`[v=\\s]*${_e[Ze.MAINVERSIONLOOSE]}${_e[Ze.PRERELEASELOOSE]}?${_e[Ze.BUILD]}?`);St("LOOSE",`^${_e[Ze.LOOSEPLAIN]}$`);St("GTLT","((?:<|>)?=?)");St("XRANGEIDENTIFIERLOOSE",`${_e[Ze.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);St("XRANGEIDENTIFIER",`${_e[Ze.NUMERICIDENTIFIER]}|x|X|\\*`);St("XRANGEPLAIN",`[v=\\s]*(${_e[Ze.XRANGEIDENTIFIER]})(?:\\.(${_e[Ze.XRANGEIDENTIFIER]})(?:\\.(${_e[Ze.XRANGEIDENTIFIER]})(?:${_e[Ze.PRERELEASE]})?${_e[Ze.BUILD]}?)?)?`);St("XRANGEPLAINLOOSE",`[v=\\s]*(${_e[Ze.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_e[Ze.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_e[Ze.XRANGEIDENTIFIERLOOSE]})(?:${_e[Ze.PRERELEASELOOSE]})?${_e[Ze.BUILD]}?)?)?`);St("XRANGE",`^${_e[Ze.GTLT]}\\s*${_e[Ze.XRANGEPLAIN]}$`);St("XRANGELOOSE",`^${_e[Ze.GTLT]}\\s*${_e[Ze.XRANGEPLAINLOOSE]}$`);St("COERCE",`(^|[^\\d])(\\d{1,${ox}})(?:\\.(\\d{1,${ox}}))?(?:\\.(\\d{1,${ox}}))?(?:$|[^\\d])`);St("COERCERTL",_e[Ze.COERCE],!0);St("LONETILDE","(?:~>?)");St("TILDETRIM",`(\\s*)${_e[Ze.LONETILDE]}\\s+`,!0);KA.tildeTrimReplace="$1~";St("TILDE",`^${_e[Ze.LONETILDE]}${_e[Ze.XRANGEPLAIN]}$`);St("TILDELOOSE",`^${_e[Ze.LONETILDE]}${_e[Ze.XRANGEPLAINLOOSE]}$`);St("LONECARET","(?:\\^)");St("CARETTRIM",`(\\s*)${_e[Ze.LONECARET]}\\s+`,!0);KA.caretTrimReplace="$1^";St("CARET",`^${_e[Ze.LONECARET]}${_e[Ze.XRANGEPLAIN]}$`);St("CARETLOOSE",`^${_e[Ze.LONECARET]}${_e[Ze.XRANGEPLAINLOOSE]}$`);St("COMPARATORLOOSE",`^${_e[Ze.GTLT]}\\s*(${_e[Ze.LOOSEPLAIN]})$|^$`);St("COMPARATOR",`^${_e[Ze.GTLT]}\\s*(${_e[Ze.FULLPLAIN]})$|^$`);St("COMPARATORTRIM",`(\\s*)${_e[Ze.GTLT]}\\s*(${_e[Ze.LOOSEPLAIN]}|${_e[Ze.XRANGEPLAIN]})`,!0);KA.comparatorTrimReplace="$1$2$3";St("HYPHENRANGE",`^\\s*(${_e[Ze.XRANGEPLAIN]})\\s+-\\s+(${_e[Ze.XRANGEPLAIN]})\\s*$`);St("HYPHENRANGELOOSE",`^\\s*(${_e[Ze.XRANGEPLAINLOOSE]})\\s+-\\s+(${_e[Ze.XRANGEPLAINLOOSE]})\\s*$`);St("STAR","(<|>)?=?\\s*\\*");St("GTE0","^\\s*>=\\s*0.0.0\\s*$");St("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")});var Ld=y((_$e,zG)=>{var tEe=["includePrerelease","loose","rtl"],rEe=r=>r?typeof r!="object"?{loose:!0}:tEe.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};zG.exports=rEe});var hy=y((Z$e,_G)=>{var VG=/^[0-9]+$/,XG=(r,e)=>{let t=VG.test(r),i=VG.test(e);return t&&i&&(r=+r,e=+e),r===e?0:t&&!i?-1:i&&!t?1:rXG(e,r);_G.exports={compareIdentifiers:XG,rcompareIdentifiers:iEe}});var Oi=y(($$e,tY)=>{var py=Td(),{MAX_LENGTH:ZG,MAX_SAFE_INTEGER:dy}=Nd(),{re:$G,t:eY}=Sc(),nEe=Ld(),{compareIdentifiers:Od}=hy(),Kn=class{constructor(e,t){if(t=nEe(t),e instanceof Kn){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>ZG)throw new TypeError(`version is longer than ${ZG} characters`);py("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?$G[eY.LOOSE]:$G[eY.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>dy||this.major<0)throw new TypeError("Invalid major version");if(this.minor>dy||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>dy||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let s=+n;if(s>=0&&s=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);i===-1&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};tY.exports=Kn});var vc=y((eet,sY)=>{var{MAX_LENGTH:sEe}=Nd(),{re:rY,t:iY}=Sc(),nY=Oi(),oEe=Ld(),aEe=(r,e)=>{if(e=oEe(e),r instanceof nY)return r;if(typeof r!="string"||r.length>sEe||!(e.loose?rY[iY.LOOSE]:rY[iY.FULL]).test(r))return null;try{return new nY(r,e)}catch{return null}};sY.exports=aEe});var aY=y((tet,oY)=>{var AEe=vc(),lEe=(r,e)=>{let t=AEe(r,e);return t?t.version:null};oY.exports=lEe});var lY=y((ret,AY)=>{var cEe=vc(),uEe=(r,e)=>{let t=cEe(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};AY.exports=uEe});var uY=y((iet,cY)=>{var gEe=Oi(),fEe=(r,e,t,i)=>{typeof t=="string"&&(i=t,t=void 0);try{return new gEe(r,t).inc(e,i).version}catch{return null}};cY.exports=fEe});var os=y((net,fY)=>{var gY=Oi(),hEe=(r,e,t)=>new gY(r,t).compare(new gY(e,t));fY.exports=hEe});var Cy=y((set,hY)=>{var pEe=os(),dEe=(r,e,t)=>pEe(r,e,t)===0;hY.exports=dEe});var CY=y((oet,dY)=>{var pY=vc(),CEe=Cy(),mEe=(r,e)=>{if(CEe(r,e))return null;{let t=pY(r),i=pY(e),n=t.prerelease.length||i.prerelease.length,s=n?"pre":"",o=n?"prerelease":"";for(let a in t)if((a==="major"||a==="minor"||a==="patch")&&t[a]!==i[a])return s+a;return o}};dY.exports=mEe});var EY=y((aet,mY)=>{var EEe=Oi(),IEe=(r,e)=>new EEe(r,e).major;mY.exports=IEe});var yY=y((Aet,IY)=>{var yEe=Oi(),wEe=(r,e)=>new yEe(r,e).minor;IY.exports=wEe});var BY=y((cet,wY)=>{var BEe=Oi(),bEe=(r,e)=>new BEe(r,e).patch;wY.exports=bEe});var QY=y((uet,bY)=>{var QEe=vc(),SEe=(r,e)=>{let t=QEe(r,e);return t&&t.prerelease.length?t.prerelease:null};bY.exports=SEe});var vY=y((get,SY)=>{var vEe=os(),xEe=(r,e,t)=>vEe(e,r,t);SY.exports=xEe});var PY=y((fet,xY)=>{var PEe=os(),DEe=(r,e)=>PEe(r,e,!0);xY.exports=DEe});var my=y((het,kY)=>{var DY=Oi(),kEe=(r,e,t)=>{let i=new DY(r,t),n=new DY(e,t);return i.compare(n)||i.compareBuild(n)};kY.exports=kEe});var FY=y((pet,RY)=>{var REe=my(),FEe=(r,e)=>r.sort((t,i)=>REe(t,i,e));RY.exports=FEe});var TY=y((det,NY)=>{var NEe=my(),TEe=(r,e)=>r.sort((t,i)=>NEe(i,t,e));NY.exports=TEe});var Md=y((Cet,LY)=>{var LEe=os(),OEe=(r,e,t)=>LEe(r,e,t)>0;LY.exports=OEe});var Ey=y((met,OY)=>{var MEe=os(),UEe=(r,e,t)=>MEe(r,e,t)<0;OY.exports=UEe});var ax=y((Eet,MY)=>{var KEe=os(),HEe=(r,e,t)=>KEe(r,e,t)!==0;MY.exports=HEe});var Iy=y((Iet,UY)=>{var GEe=os(),YEe=(r,e,t)=>GEe(r,e,t)>=0;UY.exports=YEe});var yy=y((yet,KY)=>{var jEe=os(),qEe=(r,e,t)=>jEe(r,e,t)<=0;KY.exports=qEe});var Ax=y((wet,HY)=>{var JEe=Cy(),WEe=ax(),zEe=Md(),VEe=Iy(),XEe=Ey(),_Ee=yy(),ZEe=(r,e,t,i)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return JEe(r,t,i);case"!=":return WEe(r,t,i);case">":return zEe(r,t,i);case">=":return VEe(r,t,i);case"<":return XEe(r,t,i);case"<=":return _Ee(r,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};HY.exports=ZEe});var YY=y((Bet,GY)=>{var $Ee=Oi(),eIe=vc(),{re:wy,t:By}=Sc(),tIe=(r,e)=>{if(r instanceof $Ee)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(wy[By.COERCE]);else{let i;for(;(i=wy[By.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||i.index+i[0].length!==t.index+t[0].length)&&(t=i),wy[By.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;wy[By.COERCERTL].lastIndex=-1}return t===null?null:eIe(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};GY.exports=tIe});var qY=y((bet,jY)=>{"use strict";jY.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Ud=y((Qet,JY)=>{"use strict";JY.exports=Ht;Ht.Node=xc;Ht.create=Ht;function Ht(r){var e=this;if(e instanceof Ht||(e=new Ht),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(n){e.push(n)});else if(arguments.length>0)for(var t=0,i=arguments.length;t1)t=e;else if(this.head)i=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;i!==null;n++)t=r(t,i.value,n),i=i.next;return t};Ht.prototype.reduceReverse=function(r,e){var t,i=this.tail;if(arguments.length>1)t=e;else if(this.tail)i=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=this.length-1;i!==null;n--)t=r(t,i.value,n),i=i.prev;return t};Ht.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};Ht.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};Ht.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new Ht;if(ethis.length&&(e=this.length);for(var i=0,n=this.head;n!==null&&ithis.length&&(e=this.length);for(var i=this.length,n=this.tail;n!==null&&i>e;i--)n=n.prev;for(;n!==null&&i>r;i--,n=n.prev)t.push(n.value);return t};Ht.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var i=0,n=this.head;n!==null&&i{"use strict";var sIe=Ud(),Pc=Symbol("max"),Pa=Symbol("length"),uf=Symbol("lengthCalculator"),Hd=Symbol("allowStale"),Dc=Symbol("maxAge"),xa=Symbol("dispose"),WY=Symbol("noDisposeOnSet"),Ii=Symbol("lruList"),zs=Symbol("cache"),VY=Symbol("updateAgeOnGet"),lx=()=>1,ux=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[Pc]=e.max||1/0,i=e.length||lx;if(this[uf]=typeof i!="function"?lx:i,this[Hd]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Dc]=e.maxAge||0,this[xa]=e.dispose,this[WY]=e.noDisposeOnSet||!1,this[VY]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Pc]=e||1/0,Kd(this)}get max(){return this[Pc]}set allowStale(e){this[Hd]=!!e}get allowStale(){return this[Hd]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Dc]=e,Kd(this)}get maxAge(){return this[Dc]}set lengthCalculator(e){typeof e!="function"&&(e=lx),e!==this[uf]&&(this[uf]=e,this[Pa]=0,this[Ii].forEach(t=>{t.length=this[uf](t.value,t.key),this[Pa]+=t.length})),Kd(this)}get lengthCalculator(){return this[uf]}get length(){return this[Pa]}get itemCount(){return this[Ii].length}rforEach(e,t){t=t||this;for(let i=this[Ii].tail;i!==null;){let n=i.prev;zY(this,e,i,t),i=n}}forEach(e,t){t=t||this;for(let i=this[Ii].head;i!==null;){let n=i.next;zY(this,e,i,t),i=n}}keys(){return this[Ii].toArray().map(e=>e.key)}values(){return this[Ii].toArray().map(e=>e.value)}reset(){this[xa]&&this[Ii]&&this[Ii].length&&this[Ii].forEach(e=>this[xa](e.key,e.value)),this[zs]=new Map,this[Ii]=new sIe,this[Pa]=0}dump(){return this[Ii].map(e=>by(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[Ii]}set(e,t,i){if(i=i||this[Dc],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let n=i?Date.now():0,s=this[uf](t,e);if(this[zs].has(e)){if(s>this[Pc])return gf(this,this[zs].get(e)),!1;let l=this[zs].get(e).value;return this[xa]&&(this[WY]||this[xa](e,l.value)),l.now=n,l.maxAge=i,l.value=t,this[Pa]+=s-l.length,l.length=s,this.get(e),Kd(this),!0}let o=new gx(e,t,s,n,i);return o.length>this[Pc]?(this[xa]&&this[xa](e,t),!1):(this[Pa]+=o.length,this[Ii].unshift(o),this[zs].set(e,this[Ii].head),Kd(this),!0)}has(e){if(!this[zs].has(e))return!1;let t=this[zs].get(e).value;return!by(this,t)}get(e){return cx(this,e,!0)}peek(e){return cx(this,e,!1)}pop(){let e=this[Ii].tail;return e?(gf(this,e),e.value):null}del(e){gf(this,this[zs].get(e))}load(e){this.reset();let t=Date.now();for(let i=e.length-1;i>=0;i--){let n=e[i],s=n.e||0;if(s===0)this.set(n.k,n.v);else{let o=s-t;o>0&&this.set(n.k,n.v,o)}}}prune(){this[zs].forEach((e,t)=>cx(this,t,!1))}},cx=(r,e,t)=>{let i=r[zs].get(e);if(i){let n=i.value;if(by(r,n)){if(gf(r,i),!r[Hd])return}else t&&(r[VY]&&(i.value.now=Date.now()),r[Ii].unshiftNode(i));return n.value}},by=(r,e)=>{if(!e||!e.maxAge&&!r[Dc])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[Dc]&&t>r[Dc]},Kd=r=>{if(r[Pa]>r[Pc])for(let e=r[Ii].tail;r[Pa]>r[Pc]&&e!==null;){let t=e.prev;gf(r,e),e=t}},gf=(r,e)=>{if(e){let t=e.value;r[xa]&&r[xa](t.key,t.value),r[Pa]-=t.length,r[zs].delete(t.key),r[Ii].removeNode(e)}},gx=class{constructor(e,t,i,n,s){this.key=e,this.value=t,this.length=i,this.now=n,this.maxAge=s||0}},zY=(r,e,t,i)=>{let n=t.value;by(r,n)&&(gf(r,t),r[Hd]||(n=void 0)),n&&e.call(i,n.value,n.key,r)};XY.exports=ux});var as=y((xet,tj)=>{var kc=class{constructor(e,t){if(t=aIe(t),e instanceof kc)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new kc(e.raw,t);if(e instanceof fx)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(n=>!$Y(n[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&gIe(n[0])){this.set=[n];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let i=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=ZY.get(i);if(n)return n;let s=this.options.loose,o=s?Mi[Qi.HYPHENRANGELOOSE]:Mi[Qi.HYPHENRANGE];e=e.replace(o,wIe(this.options.includePrerelease)),jr("hyphen replace",e),e=e.replace(Mi[Qi.COMPARATORTRIM],lIe),jr("comparator trim",e,Mi[Qi.COMPARATORTRIM]),e=e.replace(Mi[Qi.TILDETRIM],cIe),e=e.replace(Mi[Qi.CARETTRIM],uIe),e=e.split(/\s+/).join(" ");let a=s?Mi[Qi.COMPARATORLOOSE]:Mi[Qi.COMPARATOR],l=e.split(" ").map(f=>fIe(f,this.options)).join(" ").split(/\s+/).map(f=>yIe(f,this.options)).filter(this.options.loose?f=>!!f.match(a):()=>!0).map(f=>new fx(f,this.options)),c=l.length,u=new Map;for(let f of l){if($Y(f))return[f];u.set(f.value,f)}u.size>1&&u.has("")&&u.delete("");let g=[...u.values()];return ZY.set(i,g),g}intersects(e,t){if(!(e instanceof kc))throw new TypeError("a Range is required");return this.set.some(i=>ej(i,t)&&e.set.some(n=>ej(n,t)&&i.every(s=>n.every(o=>s.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new AIe(e,this.options)}catch{return!1}for(let t=0;tr.value==="<0.0.0-0",gIe=r=>r.value==="",ej=(r,e)=>{let t=!0,i=r.slice(),n=i.pop();for(;t&&i.length;)t=i.every(s=>n.intersects(s,e)),n=i.pop();return t},fIe=(r,e)=>(jr("comp",r,e),r=dIe(r,e),jr("caret",r),r=hIe(r,e),jr("tildes",r),r=mIe(r,e),jr("xrange",r),r=IIe(r,e),jr("stars",r),r),Xi=r=>!r||r.toLowerCase()==="x"||r==="*",hIe=(r,e)=>r.trim().split(/\s+/).map(t=>pIe(t,e)).join(" "),pIe=(r,e)=>{let t=e.loose?Mi[Qi.TILDELOOSE]:Mi[Qi.TILDE];return r.replace(t,(i,n,s,o,a)=>{jr("tilde",r,i,n,s,o,a);let l;return Xi(n)?l="":Xi(s)?l=`>=${n}.0.0 <${+n+1}.0.0-0`:Xi(o)?l=`>=${n}.${s}.0 <${n}.${+s+1}.0-0`:a?(jr("replaceTilde pr",a),l=`>=${n}.${s}.${o}-${a} <${n}.${+s+1}.0-0`):l=`>=${n}.${s}.${o} <${n}.${+s+1}.0-0`,jr("tilde return",l),l})},dIe=(r,e)=>r.trim().split(/\s+/).map(t=>CIe(t,e)).join(" "),CIe=(r,e)=>{jr("caret",r,e);let t=e.loose?Mi[Qi.CARETLOOSE]:Mi[Qi.CARET],i=e.includePrerelease?"-0":"";return r.replace(t,(n,s,o,a,l)=>{jr("caret",r,n,s,o,a,l);let c;return Xi(s)?c="":Xi(o)?c=`>=${s}.0.0${i} <${+s+1}.0.0-0`:Xi(a)?s==="0"?c=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.0${i} <${+s+1}.0.0-0`:l?(jr("replaceCaret pr",l),s==="0"?o==="0"?c=`>=${s}.${o}.${a}-${l} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}-${l} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a}-${l} <${+s+1}.0.0-0`):(jr("no pr"),s==="0"?o==="0"?c=`>=${s}.${o}.${a}${i} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),jr("caret return",c),c})},mIe=(r,e)=>(jr("replaceXRanges",r,e),r.split(/\s+/).map(t=>EIe(t,e)).join(" ")),EIe=(r,e)=>{r=r.trim();let t=e.loose?Mi[Qi.XRANGELOOSE]:Mi[Qi.XRANGE];return r.replace(t,(i,n,s,o,a,l)=>{jr("xRange",r,i,n,s,o,a,l);let c=Xi(s),u=c||Xi(o),g=u||Xi(a),f=g;return n==="="&&f&&(n=""),l=e.includePrerelease?"-0":"",c?n===">"||n==="<"?i="<0.0.0-0":i="*":n&&f?(u&&(o=0),a=0,n===">"?(n=">=",u?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):n==="<="&&(n="<",u?s=+s+1:o=+o+1),n==="<"&&(l="-0"),i=`${n+s}.${o}.${a}${l}`):u?i=`>=${s}.0.0${l} <${+s+1}.0.0-0`:g&&(i=`>=${s}.${o}.0${l} <${s}.${+o+1}.0-0`),jr("xRange return",i),i})},IIe=(r,e)=>(jr("replaceStars",r,e),r.trim().replace(Mi[Qi.STAR],"")),yIe=(r,e)=>(jr("replaceGTE0",r,e),r.trim().replace(Mi[e.includePrerelease?Qi.GTE0PRE:Qi.GTE0],"")),wIe=r=>(e,t,i,n,s,o,a,l,c,u,g,f,h)=>(Xi(i)?t="":Xi(n)?t=`>=${i}.0.0${r?"-0":""}`:Xi(s)?t=`>=${i}.${n}.0${r?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,Xi(c)?l="":Xi(u)?l=`<${+c+1}.0.0-0`:Xi(g)?l=`<${c}.${+u+1}.0-0`:f?l=`<=${c}.${u}.${g}-${f}`:r?l=`<${c}.${u}.${+g+1}-0`:l=`<=${l}`,`${t} ${l}`.trim()),BIe=(r,e,t)=>{for(let i=0;i0){let n=r[i].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var Gd=y((Pet,oj)=>{var Yd=Symbol("SemVer ANY"),ff=class{static get ANY(){return Yd}constructor(e,t){if(t=bIe(t),e instanceof ff){if(e.loose===!!t.loose)return e;e=e.value}px("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Yd?this.value="":this.value=this.operator+this.semver.version,px("comp",this)}parse(e){let t=this.options.loose?rj[ij.COMPARATORLOOSE]:rj[ij.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new nj(i[2],this.options.loose):this.semver=Yd}toString(){return this.value}test(e){if(px("Comparator.test",e,this.options.loose),this.semver===Yd||e===Yd)return!0;if(typeof e=="string")try{e=new nj(e,this.options)}catch{return!1}return hx(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof ff))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new sj(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new sj(this.value,t).test(e.semver);let i=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),n=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),s=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),a=hx(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),l=hx(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return i||n||s&&o||a||l}};oj.exports=ff;var bIe=Ld(),{re:rj,t:ij}=Sc(),hx=Ax(),px=Td(),nj=Oi(),sj=as()});var jd=y((Det,aj)=>{var QIe=as(),SIe=(r,e,t)=>{try{e=new QIe(e,t)}catch{return!1}return e.test(r)};aj.exports=SIe});var lj=y((ket,Aj)=>{var vIe=as(),xIe=(r,e)=>new vIe(r,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));Aj.exports=xIe});var uj=y((Ret,cj)=>{var PIe=Oi(),DIe=as(),kIe=(r,e,t)=>{let i=null,n=null,s=null;try{s=new DIe(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!i||n.compare(o)===-1)&&(i=o,n=new PIe(i,t))}),i};cj.exports=kIe});var fj=y((Fet,gj)=>{var RIe=Oi(),FIe=as(),NIe=(r,e,t)=>{let i=null,n=null,s=null;try{s=new FIe(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!i||n.compare(o)===1)&&(i=o,n=new RIe(i,t))}),i};gj.exports=NIe});var dj=y((Net,pj)=>{var dx=Oi(),TIe=as(),hj=Md(),LIe=(r,e)=>{r=new TIe(r,e);let t=new dx("0.0.0");if(r.test(t)||(t=new dx("0.0.0-0"),r.test(t)))return t;t=null;for(let i=0;i{let a=new dx(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||hj(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!t||hj(t,s))&&(t=s)}return t&&r.test(t)?t:null};pj.exports=LIe});var mj=y((Tet,Cj)=>{var OIe=as(),MIe=(r,e)=>{try{return new OIe(r,e).range||"*"}catch{return null}};Cj.exports=MIe});var Qy=y((Let,wj)=>{var UIe=Oi(),yj=Gd(),{ANY:KIe}=yj,HIe=as(),GIe=jd(),Ej=Md(),Ij=Ey(),YIe=yy(),jIe=Iy(),qIe=(r,e,t,i)=>{r=new UIe(r,i),e=new HIe(e,i);let n,s,o,a,l;switch(t){case">":n=Ej,s=YIe,o=Ij,a=">",l=">=";break;case"<":n=Ij,s=jIe,o=Ej,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(GIe(r,e,i))return!1;for(let c=0;c{h.semver===KIe&&(h=new yj(">=0.0.0")),g=g||h,f=f||h,n(h.semver,g.semver,i)?g=h:o(h.semver,f.semver,i)&&(f=h)}),g.operator===a||g.operator===l||(!f.operator||f.operator===a)&&s(r,f.semver))return!1;if(f.operator===l&&o(r,f.semver))return!1}return!0};wj.exports=qIe});var bj=y((Oet,Bj)=>{var JIe=Qy(),WIe=(r,e,t)=>JIe(r,e,">",t);Bj.exports=WIe});var Sj=y((Met,Qj)=>{var zIe=Qy(),VIe=(r,e,t)=>zIe(r,e,"<",t);Qj.exports=VIe});var Pj=y((Uet,xj)=>{var vj=as(),XIe=(r,e,t)=>(r=new vj(r,t),e=new vj(e,t),r.intersects(e));xj.exports=XIe});var kj=y((Ket,Dj)=>{var _Ie=jd(),ZIe=os();Dj.exports=(r,e,t)=>{let i=[],n=null,s=null,o=r.sort((u,g)=>ZIe(u,g,t));for(let u of o)_Ie(u,e,t)?(s=u,n||(n=u)):(s&&i.push([n,s]),s=null,n=null);n&&i.push([n,null]);let a=[];for(let[u,g]of i)u===g?a.push(u):!g&&u===o[0]?a.push("*"):g?u===o[0]?a.push(`<=${g}`):a.push(`${u} - ${g}`):a.push(`>=${u}`);let l=a.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return l.length{var Rj=as(),Sy=Gd(),{ANY:Cx}=Sy,qd=jd(),mx=os(),$Ie=(r,e,t={})=>{if(r===e)return!0;r=new Rj(r,t),e=new Rj(e,t);let i=!1;e:for(let n of r.set){for(let s of e.set){let o=eye(n,s,t);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},eye=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===Cx){if(e.length===1&&e[0].semver===Cx)return!0;t.includePrerelease?r=[new Sy(">=0.0.0-0")]:r=[new Sy(">=0.0.0")]}if(e.length===1&&e[0].semver===Cx){if(t.includePrerelease)return!0;e=[new Sy(">=0.0.0")]}let i=new Set,n,s;for(let h of r)h.operator===">"||h.operator===">="?n=Fj(n,h,t):h.operator==="<"||h.operator==="<="?s=Nj(s,h,t):i.add(h.semver);if(i.size>1)return null;let o;if(n&&s){if(o=mx(n.semver,s.semver,t),o>0)return null;if(o===0&&(n.operator!==">="||s.operator!=="<="))return null}for(let h of i){if(n&&!qd(h,String(n),t)||s&&!qd(h,String(s),t))return null;for(let p of e)if(!qd(h,String(p),t))return!1;return!0}let a,l,c,u,g=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,f=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1;g&&g.prerelease.length===1&&s.operator==="<"&&g.prerelease[0]===0&&(g=!1);for(let h of e){if(u=u||h.operator===">"||h.operator===">=",c=c||h.operator==="<"||h.operator==="<=",n){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator===">"||h.operator===">="){if(a=Fj(n,h,t),a===h&&a!==n)return!1}else if(n.operator===">="&&!qd(n.semver,String(h),t))return!1}if(s){if(g&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===g.major&&h.semver.minor===g.minor&&h.semver.patch===g.patch&&(g=!1),h.operator==="<"||h.operator==="<="){if(l=Nj(s,h,t),l===h&&l!==s)return!1}else if(s.operator==="<="&&!qd(s.semver,String(h),t))return!1}if(!h.operator&&(s||n)&&o!==0)return!1}return!(n&&c&&!s&&o!==0||s&&u&&!n&&o!==0||f||g)},Fj=(r,e,t)=>{if(!r)return e;let i=mx(r.semver,e.semver,t);return i>0?r:i<0||e.operator===">"&&r.operator===">="?e:r},Nj=(r,e,t)=>{if(!r)return e;let i=mx(r.semver,e.semver,t);return i<0?r:i>0||e.operator==="<"&&r.operator==="<="?e:r};Tj.exports=$Ie});var $r=y((Get,Oj)=>{var Ex=Sc();Oj.exports={re:Ex.re,src:Ex.src,tokens:Ex.t,SEMVER_SPEC_VERSION:Nd().SEMVER_SPEC_VERSION,SemVer:Oi(),compareIdentifiers:hy().compareIdentifiers,rcompareIdentifiers:hy().rcompareIdentifiers,parse:vc(),valid:aY(),clean:lY(),inc:uY(),diff:CY(),major:EY(),minor:yY(),patch:BY(),prerelease:QY(),compare:os(),rcompare:vY(),compareLoose:PY(),compareBuild:my(),sort:FY(),rsort:TY(),gt:Md(),lt:Ey(),eq:Cy(),neq:ax(),gte:Iy(),lte:yy(),cmp:Ax(),coerce:YY(),Comparator:Gd(),Range:as(),satisfies:jd(),toComparators:lj(),maxSatisfying:uj(),minSatisfying:fj(),minVersion:dj(),validRange:mj(),outside:Qy(),gtr:bj(),ltr:Sj(),intersects:Pj(),simplifyRange:kj(),subset:Lj()}});var Ix=y(vy=>{"use strict";Object.defineProperty(vy,"__esModule",{value:!0});vy.VERSION=void 0;vy.VERSION="9.1.0"});var Gt=y((exports,module)=>{"use strict";var __spreadArray=exports&&exports.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var i=0,n=e.length,s;i{(function(r,e){typeof define=="function"&&define.amd?define([],e):typeof xy=="object"&&xy.exports?xy.exports=e():r.regexpToAst=e()})(typeof self<"u"?self:Mj,function(){function r(){}r.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},r.prototype.restoreState=function(p){this.idx=p.idx,this.input=p.input,this.groupIdx=p.groupIdx},r.prototype.pattern=function(p){this.idx=0,this.input=p,this.groupIdx=0,this.consumeChar("/");var C=this.disjunction();this.consumeChar("/");for(var w={type:"Flags",loc:{begin:this.idx,end:p.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":o(w,"global");break;case"i":o(w,"ignoreCase");break;case"m":o(w,"multiLine");break;case"u":o(w,"unicode");break;case"y":o(w,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:w,value:C,loc:this.loc(0)}},r.prototype.disjunction=function(){var p=[],C=this.idx;for(p.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),p.push(this.alternative());return{type:"Disjunction",value:p,loc:this.loc(C)}},r.prototype.alternative=function(){for(var p=[],C=this.idx;this.isTerm();)p.push(this.term());return{type:"Alternative",value:p,loc:this.loc(C)}},r.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},r.prototype.assertion=function(){var p=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(p)};case"$":return{type:"EndAnchor",loc:this.loc(p)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(p)};case"B":return{type:"NonWordBoundary",loc:this.loc(p)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");var C;switch(this.popChar()){case"=":C="Lookahead";break;case"!":C="NegativeLookahead";break}a(C);var w=this.disjunction();return this.consumeChar(")"),{type:C,value:w,loc:this.loc(p)}}l()},r.prototype.quantifier=function(p){var C,w=this.idx;switch(this.popChar()){case"*":C={atLeast:0,atMost:1/0};break;case"+":C={atLeast:1,atMost:1/0};break;case"?":C={atLeast:0,atMost:1};break;case"{":var B=this.integerIncludingZero();switch(this.popChar()){case"}":C={atLeast:B,atMost:B};break;case",":var v;this.isDigit()?(v=this.integerIncludingZero(),C={atLeast:B,atMost:v}):C={atLeast:B,atMost:1/0},this.consumeChar("}");break}if(p===!0&&C===void 0)return;a(C);break}if(!(p===!0&&C===void 0))return a(C),this.peekChar(0)==="?"?(this.consumeChar("?"),C.greedy=!1):C.greedy=!0,C.type="Quantifier",C.loc=this.loc(w),C},r.prototype.atom=function(){var p,C=this.idx;switch(this.peekChar()){case".":p=this.dotAll();break;case"\\":p=this.atomEscape();break;case"[":p=this.characterClass();break;case"(":p=this.group();break}return p===void 0&&this.isPatternCharacter()&&(p=this.patternCharacter()),a(p),p.loc=this.loc(C),this.isQuantifier()&&(p.quantifier=this.quantifier()),p},r.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[n(` -`),n("\r"),n("\u2028"),n("\u2029")]}},r.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},r.prototype.decimalEscapeAtom=function(){var p=this.positiveInteger();return{type:"GroupBackReference",value:p}},r.prototype.characterClassEscape=function(){var p,C=!1;switch(this.popChar()){case"d":p=u;break;case"D":p=u,C=!0;break;case"s":p=f;break;case"S":p=f,C=!0;break;case"w":p=g;break;case"W":p=g,C=!0;break}return a(p),{type:"Set",value:p,complement:C}},r.prototype.controlEscapeAtom=function(){var p;switch(this.popChar()){case"f":p=n("\f");break;case"n":p=n(` -`);break;case"r":p=n("\r");break;case"t":p=n(" ");break;case"v":p=n("\v");break}return a(p),{type:"Character",value:p}},r.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var p=this.popChar();if(/[a-zA-Z]/.test(p)===!1)throw Error("Invalid ");var C=p.toUpperCase().charCodeAt(0)-64;return{type:"Character",value:C}},r.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:n("\0")}},r.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},r.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},r.prototype.identityEscapeAtom=function(){var p=this.popChar();return{type:"Character",value:n(p)}},r.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case` -`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:var p=this.popChar();return{type:"Character",value:n(p)}}},r.prototype.characterClass=function(){var p=[],C=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),C=!0);this.isClassAtom();){var w=this.classAtom(),B=w.type==="Character";if(B&&this.isRangeDash()){this.consumeChar("-");var v=this.classAtom(),D=v.type==="Character";if(D){if(v.value=this.input.length)throw Error("Unexpected end of input");this.idx++},r.prototype.loc=function(p){return{begin:p,end:this.idx}};var e=/[0-9a-fA-F]/,t=/[0-9]/,i=/[1-9]/;function n(p){return p.charCodeAt(0)}function s(p,C){p.length!==void 0?p.forEach(function(w){C.push(w)}):C.push(p)}function o(p,C){if(p[C]===!0)throw"duplicate flag "+C;p[C]=!0}function a(p){if(p===void 0)throw Error("Internal Error - Should never get here!")}function l(){throw Error("Internal Error - Should never get here!")}var c,u=[];for(c=n("0");c<=n("9");c++)u.push(c);var g=[n("_")].concat(u);for(c=n("a");c<=n("z");c++)g.push(c);for(c=n("A");c<=n("Z");c++)g.push(c);var f=[n(" "),n("\f"),n(` -`),n("\r"),n(" "),n("\v"),n(" "),n("\xA0"),n("\u1680"),n("\u2000"),n("\u2001"),n("\u2002"),n("\u2003"),n("\u2004"),n("\u2005"),n("\u2006"),n("\u2007"),n("\u2008"),n("\u2009"),n("\u200A"),n("\u2028"),n("\u2029"),n("\u202F"),n("\u205F"),n("\u3000"),n("\uFEFF")];function h(){}return h.prototype.visitChildren=function(p){for(var C in p){var w=p[C];p.hasOwnProperty(C)&&(w.type!==void 0?this.visit(w):Array.isArray(w)&&w.forEach(function(B){this.visit(B)},this))}},h.prototype.visit=function(p){switch(p.type){case"Pattern":this.visitPattern(p);break;case"Flags":this.visitFlags(p);break;case"Disjunction":this.visitDisjunction(p);break;case"Alternative":this.visitAlternative(p);break;case"StartAnchor":this.visitStartAnchor(p);break;case"EndAnchor":this.visitEndAnchor(p);break;case"WordBoundary":this.visitWordBoundary(p);break;case"NonWordBoundary":this.visitNonWordBoundary(p);break;case"Lookahead":this.visitLookahead(p);break;case"NegativeLookahead":this.visitNegativeLookahead(p);break;case"Character":this.visitCharacter(p);break;case"Set":this.visitSet(p);break;case"Group":this.visitGroup(p);break;case"GroupBackReference":this.visitGroupBackReference(p);break;case"Quantifier":this.visitQuantifier(p);break}this.visitChildren(p)},h.prototype.visitPattern=function(p){},h.prototype.visitFlags=function(p){},h.prototype.visitDisjunction=function(p){},h.prototype.visitAlternative=function(p){},h.prototype.visitStartAnchor=function(p){},h.prototype.visitEndAnchor=function(p){},h.prototype.visitWordBoundary=function(p){},h.prototype.visitNonWordBoundary=function(p){},h.prototype.visitLookahead=function(p){},h.prototype.visitNegativeLookahead=function(p){},h.prototype.visitCharacter=function(p){},h.prototype.visitSet=function(p){},h.prototype.visitGroup=function(p){},h.prototype.visitGroupBackReference=function(p){},h.prototype.visitQuantifier=function(p){},{RegExpParser:r,BaseRegExpVisitor:h,VERSION:"0.5.0"}})});var ky=y(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.clearRegExpParserCache=hf.getRegExpAst=void 0;var tye=Py(),Dy={},rye=new tye.RegExpParser;function iye(r){var e=r.toString();if(Dy.hasOwnProperty(e))return Dy[e];var t=rye.pattern(e);return Dy[e]=t,t}hf.getRegExpAst=iye;function nye(){Dy={}}hf.clearRegExpParserCache=nye});var Yj=y(dn=>{"use strict";var sye=dn&&dn.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(dn,"__esModule",{value:!0});dn.canMatchCharCode=dn.firstCharOptimizedIndices=dn.getOptimizedStartCodesIndices=dn.failedOptimizationPrefixMsg=void 0;var Kj=Py(),As=Gt(),Hj=ky(),Da=wx(),Gj="Complement Sets are not supported for first char optimization";dn.failedOptimizationPrefixMsg=`Unable to use "first char" lexer optimizations: -`;function oye(r,e){e===void 0&&(e=!1);try{var t=(0,Hj.getRegExpAst)(r),i=Fy(t.value,{},t.flags.ignoreCase);return i}catch(s){if(s.message===Gj)e&&(0,As.PRINT_WARNING)(""+dn.failedOptimizationPrefixMsg+(" Unable to optimize: < "+r.toString()+` > -`)+` Complement Sets cannot be automatically optimized. - This will disable the lexer's first char optimizations. - See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{var n="";e&&(n=` - This will disable the lexer's first char optimizations. - See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),(0,As.PRINT_ERROR)(dn.failedOptimizationPrefixMsg+` -`+(" Failed parsing: < "+r.toString()+` > -`)+(" Using the regexp-to-ast library version: "+Kj.VERSION+` -`)+" Please open an issue at: https://github.com/bd82/regexp-to-ast/issues"+n)}}return[]}dn.getOptimizedStartCodesIndices=oye;function Fy(r,e,t){switch(r.type){case"Disjunction":for(var i=0;i=Da.minOptimizationVal)for(var f=u.from>=Da.minOptimizationVal?u.from:Da.minOptimizationVal,h=u.to,p=(0,Da.charCodeToOptimizedIndex)(f),C=(0,Da.charCodeToOptimizedIndex)(h),w=p;w<=C;w++)e[w]=w}}});break;case"Group":Fy(o.value,e,t);break;default:throw Error("Non Exhaustive Match")}var a=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&yx(o)===!1||o.type!=="Group"&&a===!1)break}break;default:throw Error("non exhaustive match!")}return(0,As.values)(e)}dn.firstCharOptimizedIndices=Fy;function Ry(r,e,t){var i=(0,Da.charCodeToOptimizedIndex)(r);e[i]=i,t===!0&&aye(r,e)}function aye(r,e){var t=String.fromCharCode(r),i=t.toUpperCase();if(i!==t){var n=(0,Da.charCodeToOptimizedIndex)(i.charCodeAt(0));e[n]=n}else{var s=t.toLowerCase();if(s!==t){var n=(0,Da.charCodeToOptimizedIndex)(s.charCodeAt(0));e[n]=n}}}function Uj(r,e){return(0,As.find)(r.value,function(t){if(typeof t=="number")return(0,As.contains)(e,t);var i=t;return(0,As.find)(e,function(n){return i.from<=n&&n<=i.to})!==void 0})}function yx(r){return r.quantifier&&r.quantifier.atLeast===0?!0:r.value?(0,As.isArray)(r.value)?(0,As.every)(r.value,yx):yx(r.value):!1}var Aye=function(r){sye(e,r);function e(t){var i=r.call(this)||this;return i.targetCharCodes=t,i.found=!1,i}return e.prototype.visitChildren=function(t){if(this.found!==!0){switch(t.type){case"Lookahead":this.visitLookahead(t);return;case"NegativeLookahead":this.visitNegativeLookahead(t);return}r.prototype.visitChildren.call(this,t)}},e.prototype.visitCharacter=function(t){(0,As.contains)(this.targetCharCodes,t.value)&&(this.found=!0)},e.prototype.visitSet=function(t){t.complement?Uj(t,this.targetCharCodes)===void 0&&(this.found=!0):Uj(t,this.targetCharCodes)!==void 0&&(this.found=!0)},e}(Kj.BaseRegExpVisitor);function lye(r,e){if(e instanceof RegExp){var t=(0,Hj.getRegExpAst)(e),i=new Aye(r);return i.visit(t),i.found}else return(0,As.find)(e,function(n){return(0,As.contains)(r,n.charCodeAt(0))})!==void 0}dn.canMatchCharCode=lye});var wx=y(Je=>{"use strict";var jj=Je&&Je.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Je,"__esModule",{value:!0});Je.charCodeToOptimizedIndex=Je.minOptimizationVal=Je.buildLineBreakIssueMessage=Je.LineTerminatorOptimizedTester=Je.isShortPattern=Je.isCustomPattern=Je.cloneEmptyGroups=Je.performWarningRuntimeChecks=Je.performRuntimeChecks=Je.addStickyFlag=Je.addStartOfInput=Je.findUnreachablePatterns=Je.findModesThatDoNotExist=Je.findInvalidGroupType=Je.findDuplicatePatterns=Je.findUnsupportedFlags=Je.findStartOfInputAnchor=Je.findEmptyMatchRegExps=Je.findEndOfInputAnchor=Je.findInvalidPatterns=Je.findMissingPatterns=Je.validatePatterns=Je.analyzeTokenTypes=Je.enableSticky=Je.disableSticky=Je.SUPPORT_STICKY=Je.MODES=Je.DEFAULT_MODE=void 0;var qj=Py(),ir=Jd(),Se=Gt(),pf=Yj(),Jj=ky(),Do="PATTERN";Je.DEFAULT_MODE="defaultMode";Je.MODES="modes";Je.SUPPORT_STICKY=typeof new RegExp("(?:)").sticky=="boolean";function cye(){Je.SUPPORT_STICKY=!1}Je.disableSticky=cye;function uye(){Je.SUPPORT_STICKY=!0}Je.enableSticky=uye;function gye(r,e){e=(0,Se.defaults)(e,{useSticky:Je.SUPPORT_STICKY,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` -`],tracer:function(v,D){return D()}});var t=e.tracer;t("initCharCodeToOptimizedIndexMap",function(){wye()});var i;t("Reject Lexer.NA",function(){i=(0,Se.reject)(r,function(v){return v[Do]===ir.Lexer.NA})});var n=!1,s;t("Transform Patterns",function(){n=!1,s=(0,Se.map)(i,function(v){var D=v[Do];if((0,Se.isRegExp)(D)){var T=D.source;return T.length===1&&T!=="^"&&T!=="$"&&T!=="."&&!D.ignoreCase?T:T.length===2&&T[0]==="\\"&&!(0,Se.contains)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],T[1])?T[1]:e.useSticky?Qx(D):bx(D)}else{if((0,Se.isFunction)(D))return n=!0,{exec:D};if((0,Se.has)(D,"exec"))return n=!0,D;if(typeof D=="string"){if(D.length===1)return D;var H=D.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),j=new RegExp(H);return e.useSticky?Qx(j):bx(j)}else throw Error("non exhaustive match")}})});var o,a,l,c,u;t("misc mapping",function(){o=(0,Se.map)(i,function(v){return v.tokenTypeIdx}),a=(0,Se.map)(i,function(v){var D=v.GROUP;if(D!==ir.Lexer.SKIPPED){if((0,Se.isString)(D))return D;if((0,Se.isUndefined)(D))return!1;throw Error("non exhaustive match")}}),l=(0,Se.map)(i,function(v){var D=v.LONGER_ALT;if(D){var T=(0,Se.isArray)(D)?(0,Se.map)(D,function(H){return(0,Se.indexOf)(i,H)}):[(0,Se.indexOf)(i,D)];return T}}),c=(0,Se.map)(i,function(v){return v.PUSH_MODE}),u=(0,Se.map)(i,function(v){return(0,Se.has)(v,"POP_MODE")})});var g;t("Line Terminator Handling",function(){var v=oq(e.lineTerminatorCharacters);g=(0,Se.map)(i,function(D){return!1}),e.positionTracking!=="onlyOffset"&&(g=(0,Se.map)(i,function(D){if((0,Se.has)(D,"LINE_BREAKS"))return D.LINE_BREAKS;if(nq(D,v)===!1)return(0,pf.canMatchCharCode)(v,D.PATTERN)}))});var f,h,p,C;t("Misc Mapping #2",function(){f=(0,Se.map)(i,vx),h=(0,Se.map)(s,iq),p=(0,Se.reduce)(i,function(v,D){var T=D.GROUP;return(0,Se.isString)(T)&&T!==ir.Lexer.SKIPPED&&(v[T]=[]),v},{}),C=(0,Se.map)(s,function(v,D){return{pattern:s[D],longerAlt:l[D],canLineTerminator:g[D],isCustom:f[D],short:h[D],group:a[D],push:c[D],pop:u[D],tokenTypeIdx:o[D],tokenType:i[D]}})});var w=!0,B=[];return e.safeMode||t("First Char Optimization",function(){B=(0,Se.reduce)(i,function(v,D,T){if(typeof D.PATTERN=="string"){var H=D.PATTERN.charCodeAt(0),j=Sx(H);Bx(v,j,C[T])}else if((0,Se.isArray)(D.START_CHARS_HINT)){var $;(0,Se.forEach)(D.START_CHARS_HINT,function(W){var Z=typeof W=="string"?W.charCodeAt(0):W,A=Sx(Z);$!==A&&($=A,Bx(v,A,C[T]))})}else if((0,Se.isRegExp)(D.PATTERN))if(D.PATTERN.unicode)w=!1,e.ensureOptimizations&&(0,Se.PRINT_ERROR)(""+pf.failedOptimizationPrefixMsg+(" Unable to analyze < "+D.PATTERN.toString()+` > pattern. -`)+` The regexp unicode flag is not currently supported by the regexp-to-ast library. - This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{var V=(0,pf.getOptimizedStartCodesIndices)(D.PATTERN,e.ensureOptimizations);(0,Se.isEmpty)(V)&&(w=!1),(0,Se.forEach)(V,function(W){Bx(v,W,C[T])})}else e.ensureOptimizations&&(0,Se.PRINT_ERROR)(""+pf.failedOptimizationPrefixMsg+(" TokenType: <"+D.name+`> is using a custom token pattern without providing parameter. -`)+` This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),w=!1;return v},[])}),t("ArrayPacking",function(){B=(0,Se.packArray)(B)}),{emptyGroups:p,patternIdxToConfig:C,charCodeToPatternIdxToConfig:B,hasCustom:n,canBeOptimized:w}}Je.analyzeTokenTypes=gye;function fye(r,e){var t=[],i=Wj(r);t=t.concat(i.errors);var n=zj(i.valid),s=n.valid;return t=t.concat(n.errors),t=t.concat(hye(s)),t=t.concat(eq(s)),t=t.concat(tq(s,e)),t=t.concat(rq(s)),t}Je.validatePatterns=fye;function hye(r){var e=[],t=(0,Se.filter)(r,function(i){return(0,Se.isRegExp)(i[Do])});return e=e.concat(Vj(t)),e=e.concat(_j(t)),e=e.concat(Zj(t)),e=e.concat($j(t)),e=e.concat(Xj(t)),e}function Wj(r){var e=(0,Se.filter)(r,function(n){return!(0,Se.has)(n,Do)}),t=(0,Se.map)(e,function(n){return{message:"Token Type: ->"+n.name+"<- missing static 'PATTERN' property",type:ir.LexerDefinitionErrorType.MISSING_PATTERN,tokenTypes:[n]}}),i=(0,Se.difference)(r,e);return{errors:t,valid:i}}Je.findMissingPatterns=Wj;function zj(r){var e=(0,Se.filter)(r,function(n){var s=n[Do];return!(0,Se.isRegExp)(s)&&!(0,Se.isFunction)(s)&&!(0,Se.has)(s,"exec")&&!(0,Se.isString)(s)}),t=(0,Se.map)(e,function(n){return{message:"Token Type: ->"+n.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:ir.LexerDefinitionErrorType.INVALID_PATTERN,tokenTypes:[n]}}),i=(0,Se.difference)(r,e);return{errors:t,valid:i}}Je.findInvalidPatterns=zj;var pye=/[^\\][\$]/;function Vj(r){var e=function(n){jj(s,n);function s(){var o=n!==null&&n.apply(this,arguments)||this;return o.found=!1,o}return s.prototype.visitEndAnchor=function(o){this.found=!0},s}(qj.BaseRegExpVisitor),t=(0,Se.filter)(r,function(n){var s=n[Do];try{var o=(0,Jj.getRegExpAst)(s),a=new e;return a.visit(o),a.found}catch{return pye.test(s.source)}}),i=(0,Se.map)(t,function(n){return{message:`Unexpected RegExp Anchor Error: - Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain end of input anchor '$' - See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ir.LexerDefinitionErrorType.EOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}Je.findEndOfInputAnchor=Vj;function Xj(r){var e=(0,Se.filter)(r,function(i){var n=i[Do];return n.test("")}),t=(0,Se.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' must not match an empty string",type:ir.LexerDefinitionErrorType.EMPTY_MATCH_PATTERN,tokenTypes:[i]}});return t}Je.findEmptyMatchRegExps=Xj;var dye=/[^\\[][\^]|^\^/;function _j(r){var e=function(n){jj(s,n);function s(){var o=n!==null&&n.apply(this,arguments)||this;return o.found=!1,o}return s.prototype.visitStartAnchor=function(o){this.found=!0},s}(qj.BaseRegExpVisitor),t=(0,Se.filter)(r,function(n){var s=n[Do];try{var o=(0,Jj.getRegExpAst)(s),a=new e;return a.visit(o),a.found}catch{return dye.test(s.source)}}),i=(0,Se.map)(t,function(n){return{message:`Unexpected RegExp Anchor Error: - Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain start of input anchor '^' - See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ir.LexerDefinitionErrorType.SOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}Je.findStartOfInputAnchor=_j;function Zj(r){var e=(0,Se.filter)(r,function(i){var n=i[Do];return n instanceof RegExp&&(n.multiline||n.global)}),t=(0,Se.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:ir.LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[i]}});return t}Je.findUnsupportedFlags=Zj;function $j(r){var e=[],t=(0,Se.map)(r,function(s){return(0,Se.reduce)(r,function(o,a){return s.PATTERN.source===a.PATTERN.source&&!(0,Se.contains)(e,a)&&a.PATTERN!==ir.Lexer.NA&&(e.push(a),o.push(a)),o},[])});t=(0,Se.compact)(t);var i=(0,Se.filter)(t,function(s){return s.length>1}),n=(0,Se.map)(i,function(s){var o=(0,Se.map)(s,function(l){return l.name}),a=(0,Se.first)(s).PATTERN;return{message:"The same RegExp pattern ->"+a+"<-"+("has been used in all of the following Token Types: "+o.join(", ")+" <-"),type:ir.LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}});return n}Je.findDuplicatePatterns=$j;function eq(r){var e=(0,Se.filter)(r,function(i){if(!(0,Se.has)(i,"GROUP"))return!1;var n=i.GROUP;return n!==ir.Lexer.SKIPPED&&n!==ir.Lexer.NA&&!(0,Se.isString)(n)}),t=(0,Se.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:ir.LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,tokenTypes:[i]}});return t}Je.findInvalidGroupType=eq;function tq(r,e){var t=(0,Se.filter)(r,function(n){return n.PUSH_MODE!==void 0&&!(0,Se.contains)(e,n.PUSH_MODE)}),i=(0,Se.map)(t,function(n){var s="Token Type: ->"+n.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+n.PUSH_MODE+"<-which does not exist";return{message:s,type:ir.LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[n]}});return i}Je.findModesThatDoNotExist=tq;function rq(r){var e=[],t=(0,Se.reduce)(r,function(i,n,s){var o=n.PATTERN;return o===ir.Lexer.NA||((0,Se.isString)(o)?i.push({str:o,idx:s,tokenType:n}):(0,Se.isRegExp)(o)&&mye(o)&&i.push({str:o.source,idx:s,tokenType:n})),i},[]);return(0,Se.forEach)(r,function(i,n){(0,Se.forEach)(t,function(s){var o=s.str,a=s.idx,l=s.tokenType;if(n"+i.name+"<-")+`in the lexer's definition. -See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:c,type:ir.LexerDefinitionErrorType.UNREACHABLE_PATTERN,tokenTypes:[i,l]})}})}),e}Je.findUnreachablePatterns=rq;function Cye(r,e){if((0,Se.isRegExp)(e)){var t=e.exec(r);return t!==null&&t.index===0}else{if((0,Se.isFunction)(e))return e(r,0,[],{});if((0,Se.has)(e,"exec"))return e.exec(r,0,[],{});if(typeof e=="string")return e===r;throw Error("non exhaustive match")}}function mye(r){var e=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return(0,Se.find)(e,function(t){return r.source.indexOf(t)!==-1})===void 0}function bx(r){var e=r.ignoreCase?"i":"";return new RegExp("^(?:"+r.source+")",e)}Je.addStartOfInput=bx;function Qx(r){var e=r.ignoreCase?"iy":"y";return new RegExp(""+r.source,e)}Je.addStickyFlag=Qx;function Eye(r,e,t){var i=[];return(0,Se.has)(r,Je.DEFAULT_MODE)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Je.DEFAULT_MODE+`> property in its definition -`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,Se.has)(r,Je.MODES)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Je.MODES+`> property in its definition -`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,Se.has)(r,Je.MODES)&&(0,Se.has)(r,Je.DEFAULT_MODE)&&!(0,Se.has)(r.modes,r.defaultMode)&&i.push({message:"A MultiMode Lexer cannot be initialized with a "+Je.DEFAULT_MODE+": <"+r.defaultMode+`>which does not exist -`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,Se.has)(r,Je.MODES)&&(0,Se.forEach)(r.modes,function(n,s){(0,Se.forEach)(n,function(o,a){(0,Se.isUndefined)(o)&&i.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:"+("<"+s+"> at index: <"+a+`> -`),type:ir.LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})})}),i}Je.performRuntimeChecks=Eye;function Iye(r,e,t){var i=[],n=!1,s=(0,Se.compact)((0,Se.flatten)((0,Se.mapValues)(r.modes,function(l){return l}))),o=(0,Se.reject)(s,function(l){return l[Do]===ir.Lexer.NA}),a=oq(t);return e&&(0,Se.forEach)(o,function(l){var c=nq(l,a);if(c!==!1){var u=sq(l,c),g={message:u,type:c.issue,tokenType:l};i.push(g)}else(0,Se.has)(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(n=!0):(0,pf.canMatchCharCode)(a,l.PATTERN)&&(n=!0)}),e&&!n&&i.push({message:`Warning: No LINE_BREAKS Found. - This Lexer has been defined to track line and column information, - But none of the Token Types can be identified as matching a line terminator. - See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS - for details.`,type:ir.LexerDefinitionErrorType.NO_LINE_BREAKS_FLAGS}),i}Je.performWarningRuntimeChecks=Iye;function yye(r){var e={},t=(0,Se.keys)(r);return(0,Se.forEach)(t,function(i){var n=r[i];if((0,Se.isArray)(n))e[i]=[];else throw Error("non exhaustive match")}),e}Je.cloneEmptyGroups=yye;function vx(r){var e=r.PATTERN;if((0,Se.isRegExp)(e))return!1;if((0,Se.isFunction)(e))return!0;if((0,Se.has)(e,"exec"))return!0;if((0,Se.isString)(e))return!1;throw Error("non exhaustive match")}Je.isCustomPattern=vx;function iq(r){return(0,Se.isString)(r)&&r.length===1?r.charCodeAt(0):!1}Je.isShortPattern=iq;Je.LineTerminatorOptimizedTester={test:function(r){for(var e=r.length,t=this.lastIndex;t Token Type -`)+(" Root cause: "+e.errMsg+`. -`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(e.issue===ir.LexerDefinitionErrorType.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. -`+(" The problem is in the <"+r.name+`> Token Type -`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}Je.buildLineBreakIssueMessage=sq;function oq(r){var e=(0,Se.map)(r,function(t){return(0,Se.isString)(t)&&t.length>0?t.charCodeAt(0):t});return e}function Bx(r,e,t){r[e]===void 0?r[e]=[t]:r[e].push(t)}Je.minOptimizationVal=256;var Ny=[];function Sx(r){return r255?255+~~(r/255):r}}});var df=y(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.isTokenType=Nt.hasExtendingTokensTypesMapProperty=Nt.hasExtendingTokensTypesProperty=Nt.hasCategoriesProperty=Nt.hasShortKeyProperty=Nt.singleAssignCategoriesToksMap=Nt.assignCategoriesMapProp=Nt.assignCategoriesTokensProp=Nt.assignTokenDefaultProps=Nt.expandCategories=Nt.augmentTokenTypes=Nt.tokenIdxToClass=Nt.tokenShortNameIdx=Nt.tokenStructuredMatcherNoCategories=Nt.tokenStructuredMatcher=void 0;var ei=Gt();function Bye(r,e){var t=r.tokenTypeIdx;return t===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[t]===!0}Nt.tokenStructuredMatcher=Bye;function bye(r,e){return r.tokenTypeIdx===e.tokenTypeIdx}Nt.tokenStructuredMatcherNoCategories=bye;Nt.tokenShortNameIdx=1;Nt.tokenIdxToClass={};function Qye(r){var e=aq(r);Aq(e),cq(e),lq(e),(0,ei.forEach)(e,function(t){t.isParent=t.categoryMatches.length>0})}Nt.augmentTokenTypes=Qye;function aq(r){for(var e=(0,ei.cloneArr)(r),t=r,i=!0;i;){t=(0,ei.compact)((0,ei.flatten)((0,ei.map)(t,function(s){return s.CATEGORIES})));var n=(0,ei.difference)(t,e);e=e.concat(n),(0,ei.isEmpty)(n)?i=!1:t=n}return e}Nt.expandCategories=aq;function Aq(r){(0,ei.forEach)(r,function(e){uq(e)||(Nt.tokenIdxToClass[Nt.tokenShortNameIdx]=e,e.tokenTypeIdx=Nt.tokenShortNameIdx++),xx(e)&&!(0,ei.isArray)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),xx(e)||(e.CATEGORIES=[]),gq(e)||(e.categoryMatches=[]),fq(e)||(e.categoryMatchesMap={})})}Nt.assignTokenDefaultProps=Aq;function lq(r){(0,ei.forEach)(r,function(e){e.categoryMatches=[],(0,ei.forEach)(e.categoryMatchesMap,function(t,i){e.categoryMatches.push(Nt.tokenIdxToClass[i].tokenTypeIdx)})})}Nt.assignCategoriesTokensProp=lq;function cq(r){(0,ei.forEach)(r,function(e){Px([],e)})}Nt.assignCategoriesMapProp=cq;function Px(r,e){(0,ei.forEach)(r,function(t){e.categoryMatchesMap[t.tokenTypeIdx]=!0}),(0,ei.forEach)(e.CATEGORIES,function(t){var i=r.concat(e);(0,ei.contains)(i,t)||Px(i,t)})}Nt.singleAssignCategoriesToksMap=Px;function uq(r){return(0,ei.has)(r,"tokenTypeIdx")}Nt.hasShortKeyProperty=uq;function xx(r){return(0,ei.has)(r,"CATEGORIES")}Nt.hasCategoriesProperty=xx;function gq(r){return(0,ei.has)(r,"categoryMatches")}Nt.hasExtendingTokensTypesProperty=gq;function fq(r){return(0,ei.has)(r,"categoryMatchesMap")}Nt.hasExtendingTokensTypesMapProperty=fq;function Sye(r){return(0,ei.has)(r,"tokenTypeIdx")}Nt.isTokenType=Sye});var Dx=y(Ty=>{"use strict";Object.defineProperty(Ty,"__esModule",{value:!0});Ty.defaultLexerErrorProvider=void 0;Ty.defaultLexerErrorProvider={buildUnableToPopLexerModeMessage:function(r){return"Unable to pop Lexer Mode after encountering Token ->"+r.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(r,e,t,i,n){return"unexpected character: ->"+r.charAt(e)+"<- at offset: "+e+","+(" skipped "+t+" characters.")}}});var Jd=y(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.Lexer=Rc.LexerDefinitionErrorType=void 0;var Vs=wx(),nr=Gt(),vye=df(),xye=Dx(),Pye=ky(),Dye;(function(r){r[r.MISSING_PATTERN=0]="MISSING_PATTERN",r[r.INVALID_PATTERN=1]="INVALID_PATTERN",r[r.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",r[r.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",r[r.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",r[r.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",r[r.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",r[r.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",r[r.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",r[r.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",r[r.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",r[r.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",r[r.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",r[r.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",r[r.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",r[r.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",r[r.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"})(Dye=Rc.LexerDefinitionErrorType||(Rc.LexerDefinitionErrorType={}));var Wd={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` -`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:xye.defaultLexerErrorProvider,traceInitPerf:!1,skipValidations:!1};Object.freeze(Wd);var kye=function(){function r(e,t){var i=this;if(t===void 0&&(t=Wd),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},typeof t=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. -a boolean 2nd argument is no longer supported`);this.config=(0,nr.merge)(Wd,t);var n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",function(){var s,o=!0;i.TRACE_INIT("Lexer Config handling",function(){if(i.config.lineTerminatorsPattern===Wd.lineTerminatorsPattern)i.config.lineTerminatorsPattern=Vs.LineTerminatorOptimizedTester;else if(i.config.lineTerminatorCharacters===Wd.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');i.trackStartLines=/full|onlyStart/i.test(i.config.positionTracking),i.trackEndLines=/full/i.test(i.config.positionTracking),(0,nr.isArray)(e)?(s={modes:{}},s.modes[Vs.DEFAULT_MODE]=(0,nr.cloneArr)(e),s[Vs.DEFAULT_MODE]=Vs.DEFAULT_MODE):(o=!1,s=(0,nr.cloneObj)(e))}),i.config.skipValidations===!1&&(i.TRACE_INIT("performRuntimeChecks",function(){i.lexerDefinitionErrors=i.lexerDefinitionErrors.concat((0,Vs.performRuntimeChecks)(s,i.trackStartLines,i.config.lineTerminatorCharacters))}),i.TRACE_INIT("performWarningRuntimeChecks",function(){i.lexerDefinitionWarning=i.lexerDefinitionWarning.concat((0,Vs.performWarningRuntimeChecks)(s,i.trackStartLines,i.config.lineTerminatorCharacters))})),s.modes=s.modes?s.modes:{},(0,nr.forEach)(s.modes,function(u,g){s.modes[g]=(0,nr.reject)(u,function(f){return(0,nr.isUndefined)(f)})});var a=(0,nr.keys)(s.modes);if((0,nr.forEach)(s.modes,function(u,g){i.TRACE_INIT("Mode: <"+g+"> processing",function(){if(i.modes.push(g),i.config.skipValidations===!1&&i.TRACE_INIT("validatePatterns",function(){i.lexerDefinitionErrors=i.lexerDefinitionErrors.concat((0,Vs.validatePatterns)(u,a))}),(0,nr.isEmpty)(i.lexerDefinitionErrors)){(0,vye.augmentTokenTypes)(u);var f;i.TRACE_INIT("analyzeTokenTypes",function(){f=(0,Vs.analyzeTokenTypes)(u,{lineTerminatorCharacters:i.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:i.TRACE_INIT.bind(i)})}),i.patternIdxToConfig[g]=f.patternIdxToConfig,i.charCodeToPatternIdxToConfig[g]=f.charCodeToPatternIdxToConfig,i.emptyGroups=(0,nr.merge)(i.emptyGroups,f.emptyGroups),i.hasCustom=f.hasCustom||i.hasCustom,i.canModeBeOptimized[g]=f.canBeOptimized}})}),i.defaultMode=s.defaultMode,!(0,nr.isEmpty)(i.lexerDefinitionErrors)&&!i.config.deferDefinitionErrorsHandling){var l=(0,nr.map)(i.lexerDefinitionErrors,function(u){return u.message}),c=l.join(`----------------------- -`);throw new Error(`Errors detected in definition of Lexer: -`+c)}(0,nr.forEach)(i.lexerDefinitionWarning,function(u){(0,nr.PRINT_WARNING)(u.message)}),i.TRACE_INIT("Choosing sub-methods implementations",function(){if(Vs.SUPPORT_STICKY?(i.chopInput=nr.IDENTITY,i.match=i.matchWithTest):(i.updateLastIndex=nr.NOOP,i.match=i.matchWithExec),o&&(i.handleModes=nr.NOOP),i.trackStartLines===!1&&(i.computeNewColumn=nr.IDENTITY),i.trackEndLines===!1&&(i.updateTokenEndLineColumnLocation=nr.NOOP),/full/i.test(i.config.positionTracking))i.createTokenInstance=i.createFullToken;else if(/onlyStart/i.test(i.config.positionTracking))i.createTokenInstance=i.createStartOnlyToken;else if(/onlyOffset/i.test(i.config.positionTracking))i.createTokenInstance=i.createOffsetOnlyToken;else throw Error('Invalid config option: "'+i.config.positionTracking+'"');i.hasCustom?(i.addToken=i.addTokenUsingPush,i.handlePayload=i.handlePayloadWithCustom):(i.addToken=i.addTokenUsingMemberAccess,i.handlePayload=i.handlePayloadNoCustom)}),i.TRACE_INIT("Failed Optimization Warnings",function(){var u=(0,nr.reduce)(i.canModeBeOptimized,function(g,f,h){return f===!1&&g.push(h),g},[]);if(t.ensureOptimizations&&!(0,nr.isEmpty)(u))throw Error("Lexer Modes: < "+u.join(", ")+` > cannot be optimized. - Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. - Or inspect the console log for details on how to resolve these issues.`)}),i.TRACE_INIT("clearRegExpParserCache",function(){(0,Pye.clearRegExpParserCache)()}),i.TRACE_INIT("toFastProperties",function(){(0,nr.toFastProperties)(i)})})}return r.prototype.tokenize=function(e,t){if(t===void 0&&(t=this.defaultMode),!(0,nr.isEmpty)(this.lexerDefinitionErrors)){var i=(0,nr.map)(this.lexerDefinitionErrors,function(o){return o.message}),n=i.join(`----------------------- -`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: -`+n)}var s=this.tokenizeInternal(e,t);return s},r.prototype.tokenizeInternal=function(e,t){var i=this,n,s,o,a,l,c,u,g,f,h,p,C,w,B,v,D,T=e,H=T.length,j=0,$=0,V=this.hasCustom?0:Math.floor(e.length/10),W=new Array(V),Z=[],A=this.trackStartLines?1:void 0,ae=this.trackStartLines?1:void 0,ge=(0,Vs.cloneEmptyGroups)(this.emptyGroups),_=this.trackStartLines,L=this.config.lineTerminatorsPattern,N=0,ue=[],we=[],Te=[],Pe=[];Object.freeze(Pe);var Le=void 0;function se(){return ue}function Ae(dr){var Bi=(0,Vs.charCodeToOptimizedIndex)(dr),_n=we[Bi];return _n===void 0?Pe:_n}var be=function(dr){if(Te.length===1&&dr.tokenType.PUSH_MODE===void 0){var Bi=i.config.errorMessageProvider.buildUnableToPopLexerModeMessage(dr);Z.push({offset:dr.startOffset,line:dr.startLine!==void 0?dr.startLine:void 0,column:dr.startColumn!==void 0?dr.startColumn:void 0,length:dr.image.length,message:Bi})}else{Te.pop();var _n=(0,nr.last)(Te);ue=i.patternIdxToConfig[_n],we=i.charCodeToPatternIdxToConfig[_n],N=ue.length;var pa=i.canModeBeOptimized[_n]&&i.config.safeMode===!1;we&&pa?Le=Ae:Le=se}};function fe(dr){Te.push(dr),we=this.charCodeToPatternIdxToConfig[dr],ue=this.patternIdxToConfig[dr],N=ue.length,N=ue.length;var Bi=this.canModeBeOptimized[dr]&&this.config.safeMode===!1;we&&Bi?Le=Ae:Le=se}fe.call(this,t);for(var le;jc.length){c=a,u=g,le=tt;break}}}break}}if(c!==null){if(f=c.length,h=le.group,h!==void 0&&(p=le.tokenTypeIdx,C=this.createTokenInstance(c,j,p,le.tokenType,A,ae,f),this.handlePayload(C,u),h===!1?$=this.addToken(W,$,C):ge[h].push(C)),e=this.chopInput(e,f),j=j+f,ae=this.computeNewColumn(ae,f),_===!0&&le.canLineTerminator===!0){var It=0,Ur=void 0,oi=void 0;L.lastIndex=0;do Ur=L.test(c),Ur===!0&&(oi=L.lastIndex-1,It++);while(Ur===!0);It!==0&&(A=A+It,ae=f-oi,this.updateTokenEndLineColumnLocation(C,h,oi,It,A,ae,f))}this.handleModes(le,be,fe,C)}else{for(var pi=j,pr=A,di=ae,ai=!1;!ai&&j <"+e+">");var n=(0,nr.timer)(t),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent time: "+s+"ms"),this.traceInitIndent--,o}else return t()},r.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",r.NA=/NOT_APPLICABLE/,r}();Rc.Lexer=kye});var HA=y(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.tokenMatcher=Si.createTokenInstance=Si.EOF=Si.createToken=Si.hasTokenLabel=Si.tokenName=Si.tokenLabel=void 0;var Xs=Gt(),Rye=Jd(),kx=df();function Fye(r){return wq(r)?r.LABEL:r.name}Si.tokenLabel=Fye;function Nye(r){return r.name}Si.tokenName=Nye;function wq(r){return(0,Xs.isString)(r.LABEL)&&r.LABEL!==""}Si.hasTokenLabel=wq;var Tye="parent",hq="categories",pq="label",dq="group",Cq="push_mode",mq="pop_mode",Eq="longer_alt",Iq="line_breaks",yq="start_chars_hint";function Bq(r){return Lye(r)}Si.createToken=Bq;function Lye(r){var e=r.pattern,t={};if(t.name=r.name,(0,Xs.isUndefined)(e)||(t.PATTERN=e),(0,Xs.has)(r,Tye))throw`The parent property is no longer supported. -See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return(0,Xs.has)(r,hq)&&(t.CATEGORIES=r[hq]),(0,kx.augmentTokenTypes)([t]),(0,Xs.has)(r,pq)&&(t.LABEL=r[pq]),(0,Xs.has)(r,dq)&&(t.GROUP=r[dq]),(0,Xs.has)(r,mq)&&(t.POP_MODE=r[mq]),(0,Xs.has)(r,Cq)&&(t.PUSH_MODE=r[Cq]),(0,Xs.has)(r,Eq)&&(t.LONGER_ALT=r[Eq]),(0,Xs.has)(r,Iq)&&(t.LINE_BREAKS=r[Iq]),(0,Xs.has)(r,yq)&&(t.START_CHARS_HINT=r[yq]),t}Si.EOF=Bq({name:"EOF",pattern:Rye.Lexer.NA});(0,kx.augmentTokenTypes)([Si.EOF]);function Oye(r,e,t,i,n,s,o,a){return{image:e,startOffset:t,endOffset:i,startLine:n,endLine:s,startColumn:o,endColumn:a,tokenTypeIdx:r.tokenTypeIdx,tokenType:r}}Si.createTokenInstance=Oye;function Mye(r,e){return(0,kx.tokenStructuredMatcher)(r,e)}Si.tokenMatcher=Mye});var Cn=y(Wt=>{"use strict";var ka=Wt&&Wt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Wt,"__esModule",{value:!0});Wt.serializeProduction=Wt.serializeGrammar=Wt.Terminal=Wt.Alternation=Wt.RepetitionWithSeparator=Wt.Repetition=Wt.RepetitionMandatoryWithSeparator=Wt.RepetitionMandatory=Wt.Option=Wt.Alternative=Wt.Rule=Wt.NonTerminal=Wt.AbstractProduction=void 0;var lr=Gt(),Uye=HA(),ko=function(){function r(e){this._definition=e}return Object.defineProperty(r.prototype,"definition",{get:function(){return this._definition},set:function(e){this._definition=e},enumerable:!1,configurable:!0}),r.prototype.accept=function(e){e.visit(this),(0,lr.forEach)(this.definition,function(t){t.accept(e)})},r}();Wt.AbstractProduction=ko;var bq=function(r){ka(e,r);function e(t){var i=r.call(this,[])||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return Object.defineProperty(e.prototype,"definition",{get:function(){return this.referencedRule!==void 0?this.referencedRule.definition:[]},set:function(t){},enumerable:!1,configurable:!0}),e.prototype.accept=function(t){t.visit(this)},e}(ko);Wt.NonTerminal=bq;var Qq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.orgText="",(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.Rule=Qq;var Sq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.ignoreAmbiguities=!1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.Alternative=Sq;var vq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.Option=vq;var xq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.RepetitionMandatory=xq;var Pq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.RepetitionMandatoryWithSeparator=Pq;var Dq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.Repetition=Dq;var kq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.RepetitionWithSeparator=kq;var Rq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,i.ignoreAmbiguities=!1,i.hasPredicates=!1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),e}(ko);Wt.Alternation=Rq;var Ly=function(){function r(e){this.idx=1,(0,lr.assign)(this,(0,lr.pick)(e,function(t){return t!==void 0}))}return r.prototype.accept=function(e){e.visit(this)},r}();Wt.Terminal=Ly;function Kye(r){return(0,lr.map)(r,zd)}Wt.serializeGrammar=Kye;function zd(r){function e(s){return(0,lr.map)(s,zd)}if(r instanceof bq){var t={type:"NonTerminal",name:r.nonTerminalName,idx:r.idx};return(0,lr.isString)(r.label)&&(t.label=r.label),t}else{if(r instanceof Sq)return{type:"Alternative",definition:e(r.definition)};if(r instanceof vq)return{type:"Option",idx:r.idx,definition:e(r.definition)};if(r instanceof xq)return{type:"RepetitionMandatory",idx:r.idx,definition:e(r.definition)};if(r instanceof Pq)return{type:"RepetitionMandatoryWithSeparator",idx:r.idx,separator:zd(new Ly({terminalType:r.separator})),definition:e(r.definition)};if(r instanceof kq)return{type:"RepetitionWithSeparator",idx:r.idx,separator:zd(new Ly({terminalType:r.separator})),definition:e(r.definition)};if(r instanceof Dq)return{type:"Repetition",idx:r.idx,definition:e(r.definition)};if(r instanceof Rq)return{type:"Alternation",idx:r.idx,definition:e(r.definition)};if(r instanceof Ly){var i={type:"Terminal",name:r.terminalType.name,label:(0,Uye.tokenLabel)(r.terminalType),idx:r.idx};(0,lr.isString)(r.label)&&(i.terminalLabel=r.label);var n=r.terminalType.PATTERN;return r.terminalType.PATTERN&&(i.pattern=(0,lr.isRegExp)(n)?n.source:n),i}else{if(r instanceof Qq)return{type:"Rule",name:r.name,orgText:r.orgText,definition:e(r.definition)};throw Error("non exhaustive match")}}}Wt.serializeProduction=zd});var My=y(Oy=>{"use strict";Object.defineProperty(Oy,"__esModule",{value:!0});Oy.RestWalker=void 0;var Rx=Gt(),mn=Cn(),Hye=function(){function r(){}return r.prototype.walk=function(e,t){var i=this;t===void 0&&(t=[]),(0,Rx.forEach)(e.definition,function(n,s){var o=(0,Rx.drop)(e.definition,s+1);if(n instanceof mn.NonTerminal)i.walkProdRef(n,o,t);else if(n instanceof mn.Terminal)i.walkTerminal(n,o,t);else if(n instanceof mn.Alternative)i.walkFlat(n,o,t);else if(n instanceof mn.Option)i.walkOption(n,o,t);else if(n instanceof mn.RepetitionMandatory)i.walkAtLeastOne(n,o,t);else if(n instanceof mn.RepetitionMandatoryWithSeparator)i.walkAtLeastOneSep(n,o,t);else if(n instanceof mn.RepetitionWithSeparator)i.walkManySep(n,o,t);else if(n instanceof mn.Repetition)i.walkMany(n,o,t);else if(n instanceof mn.Alternation)i.walkOr(n,o,t);else throw Error("non exhaustive match")})},r.prototype.walkTerminal=function(e,t,i){},r.prototype.walkProdRef=function(e,t,i){},r.prototype.walkFlat=function(e,t,i){var n=t.concat(i);this.walk(e,n)},r.prototype.walkOption=function(e,t,i){var n=t.concat(i);this.walk(e,n)},r.prototype.walkAtLeastOne=function(e,t,i){var n=[new mn.Option({definition:e.definition})].concat(t,i);this.walk(e,n)},r.prototype.walkAtLeastOneSep=function(e,t,i){var n=Fq(e,t,i);this.walk(e,n)},r.prototype.walkMany=function(e,t,i){var n=[new mn.Option({definition:e.definition})].concat(t,i);this.walk(e,n)},r.prototype.walkManySep=function(e,t,i){var n=Fq(e,t,i);this.walk(e,n)},r.prototype.walkOr=function(e,t,i){var n=this,s=t.concat(i);(0,Rx.forEach)(e.definition,function(o){var a=new mn.Alternative({definition:[o]});n.walk(a,s)})},r}();Oy.RestWalker=Hye;function Fq(r,e,t){var i=[new mn.Option({definition:[new mn.Terminal({terminalType:r.separator})].concat(r.definition)})],n=i.concat(e,t);return n}});var Cf=y(Uy=>{"use strict";Object.defineProperty(Uy,"__esModule",{value:!0});Uy.GAstVisitor=void 0;var Ro=Cn(),Gye=function(){function r(){}return r.prototype.visit=function(e){var t=e;switch(t.constructor){case Ro.NonTerminal:return this.visitNonTerminal(t);case Ro.Alternative:return this.visitAlternative(t);case Ro.Option:return this.visitOption(t);case Ro.RepetitionMandatory:return this.visitRepetitionMandatory(t);case Ro.RepetitionMandatoryWithSeparator:return this.visitRepetitionMandatoryWithSeparator(t);case Ro.RepetitionWithSeparator:return this.visitRepetitionWithSeparator(t);case Ro.Repetition:return this.visitRepetition(t);case Ro.Alternation:return this.visitAlternation(t);case Ro.Terminal:return this.visitTerminal(t);case Ro.Rule:return this.visitRule(t);default:throw Error("non exhaustive match")}},r.prototype.visitNonTerminal=function(e){},r.prototype.visitAlternative=function(e){},r.prototype.visitOption=function(e){},r.prototype.visitRepetition=function(e){},r.prototype.visitRepetitionMandatory=function(e){},r.prototype.visitRepetitionMandatoryWithSeparator=function(e){},r.prototype.visitRepetitionWithSeparator=function(e){},r.prototype.visitAlternation=function(e){},r.prototype.visitTerminal=function(e){},r.prototype.visitRule=function(e){},r}();Uy.GAstVisitor=Gye});var Xd=y(Ui=>{"use strict";var Yye=Ui&&Ui.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Ui,"__esModule",{value:!0});Ui.collectMethods=Ui.DslMethodsCollectorVisitor=Ui.getProductionDslName=Ui.isBranchingProd=Ui.isOptionalProd=Ui.isSequenceProd=void 0;var Vd=Gt(),Qr=Cn(),jye=Cf();function qye(r){return r instanceof Qr.Alternative||r instanceof Qr.Option||r instanceof Qr.Repetition||r instanceof Qr.RepetitionMandatory||r instanceof Qr.RepetitionMandatoryWithSeparator||r instanceof Qr.RepetitionWithSeparator||r instanceof Qr.Terminal||r instanceof Qr.Rule}Ui.isSequenceProd=qye;function Fx(r,e){e===void 0&&(e=[]);var t=r instanceof Qr.Option||r instanceof Qr.Repetition||r instanceof Qr.RepetitionWithSeparator;return t?!0:r instanceof Qr.Alternation?(0,Vd.some)(r.definition,function(i){return Fx(i,e)}):r instanceof Qr.NonTerminal&&(0,Vd.contains)(e,r)?!1:r instanceof Qr.AbstractProduction?(r instanceof Qr.NonTerminal&&e.push(r),(0,Vd.every)(r.definition,function(i){return Fx(i,e)})):!1}Ui.isOptionalProd=Fx;function Jye(r){return r instanceof Qr.Alternation}Ui.isBranchingProd=Jye;function Wye(r){if(r instanceof Qr.NonTerminal)return"SUBRULE";if(r instanceof Qr.Option)return"OPTION";if(r instanceof Qr.Alternation)return"OR";if(r instanceof Qr.RepetitionMandatory)return"AT_LEAST_ONE";if(r instanceof Qr.RepetitionMandatoryWithSeparator)return"AT_LEAST_ONE_SEP";if(r instanceof Qr.RepetitionWithSeparator)return"MANY_SEP";if(r instanceof Qr.Repetition)return"MANY";if(r instanceof Qr.Terminal)return"CONSUME";throw Error("non exhaustive match")}Ui.getProductionDslName=Wye;var Nq=function(r){Yye(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.separator="-",t.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},t}return e.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},e.prototype.visitTerminal=function(t){var i=t.terminalType.name+this.separator+"Terminal";(0,Vd.has)(this.dslMethods,i)||(this.dslMethods[i]=[]),this.dslMethods[i].push(t)},e.prototype.visitNonTerminal=function(t){var i=t.nonTerminalName+this.separator+"Terminal";(0,Vd.has)(this.dslMethods,i)||(this.dslMethods[i]=[]),this.dslMethods[i].push(t)},e.prototype.visitOption=function(t){this.dslMethods.option.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.dslMethods.repetitionWithSeparator.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.dslMethods.repetitionMandatory.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)},e.prototype.visitRepetition=function(t){this.dslMethods.repetition.push(t)},e.prototype.visitAlternation=function(t){this.dslMethods.alternation.push(t)},e}(jye.GAstVisitor);Ui.DslMethodsCollectorVisitor=Nq;var Ky=new Nq;function zye(r){Ky.reset(),r.accept(Ky);var e=Ky.dslMethods;return Ky.reset(),e}Ui.collectMethods=zye});var Tx=y(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.firstForTerminal=Fo.firstForBranching=Fo.firstForSequence=Fo.first=void 0;var Hy=Gt(),Tq=Cn(),Nx=Xd();function Gy(r){if(r instanceof Tq.NonTerminal)return Gy(r.referencedRule);if(r instanceof Tq.Terminal)return Mq(r);if((0,Nx.isSequenceProd)(r))return Lq(r);if((0,Nx.isBranchingProd)(r))return Oq(r);throw Error("non exhaustive match")}Fo.first=Gy;function Lq(r){for(var e=[],t=r.definition,i=0,n=t.length>i,s,o=!0;n&&o;)s=t[i],o=(0,Nx.isOptionalProd)(s),e=e.concat(Gy(s)),i=i+1,n=t.length>i;return(0,Hy.uniq)(e)}Fo.firstForSequence=Lq;function Oq(r){var e=(0,Hy.map)(r.definition,function(t){return Gy(t)});return(0,Hy.uniq)((0,Hy.flatten)(e))}Fo.firstForBranching=Oq;function Mq(r){return[r.terminalType]}Fo.firstForTerminal=Mq});var Lx=y(Yy=>{"use strict";Object.defineProperty(Yy,"__esModule",{value:!0});Yy.IN=void 0;Yy.IN="_~IN~_"});var Yq=y(ls=>{"use strict";var Vye=ls&&ls.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(ls,"__esModule",{value:!0});ls.buildInProdFollowPrefix=ls.buildBetweenProdsFollowPrefix=ls.computeAllProdsFollows=ls.ResyncFollowsWalker=void 0;var Xye=My(),_ye=Tx(),Uq=Gt(),Kq=Lx(),Zye=Cn(),Hq=function(r){Vye(e,r);function e(t){var i=r.call(this)||this;return i.topProd=t,i.follows={},i}return e.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},e.prototype.walkTerminal=function(t,i,n){},e.prototype.walkProdRef=function(t,i,n){var s=Gq(t.referencedRule,t.idx)+this.topProd.name,o=i.concat(n),a=new Zye.Alternative({definition:o}),l=(0,_ye.first)(a);this.follows[s]=l},e}(Xye.RestWalker);ls.ResyncFollowsWalker=Hq;function $ye(r){var e={};return(0,Uq.forEach)(r,function(t){var i=new Hq(t).startWalking();(0,Uq.assign)(e,i)}),e}ls.computeAllProdsFollows=$ye;function Gq(r,e){return r.name+e+Kq.IN}ls.buildBetweenProdsFollowPrefix=Gq;function ewe(r){var e=r.terminalType.name;return e+r.idx+Kq.IN}ls.buildInProdFollowPrefix=ewe});var _d=y(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.defaultGrammarValidatorErrorProvider=Ra.defaultGrammarResolverErrorProvider=Ra.defaultParserErrorProvider=void 0;var mf=HA(),twe=Gt(),_s=Gt(),Ox=Cn(),jq=Xd();Ra.defaultParserErrorProvider={buildMismatchTokenMessage:function(r){var e=r.expected,t=r.actual,i=r.previous,n=r.ruleName,s=(0,mf.hasTokenLabel)(e),o=s?"--> "+(0,mf.tokenLabel)(e)+" <--":"token of type --> "+e.name+" <--",a="Expecting "+o+" but found --> '"+t.image+"' <--";return a},buildNotAllInputParsedMessage:function(r){var e=r.firstRedundant,t=r.ruleName;return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage:function(r){var e=r.expectedPathsPerAlt,t=r.actual,i=r.previous,n=r.customUserDescription,s=r.ruleName,o="Expecting: ",a=(0,_s.first)(t).image,l=` -but found: '`+a+"'";if(n)return o+n+l;var c=(0,_s.reduce)(e,function(h,p){return h.concat(p)},[]),u=(0,_s.map)(c,function(h){return"["+(0,_s.map)(h,function(p){return(0,mf.tokenLabel)(p)}).join(", ")+"]"}),g=(0,_s.map)(u,function(h,p){return" "+(p+1)+". "+h}),f=`one of these possible Token sequences: -`+g.join(` -`);return o+f+l},buildEarlyExitMessage:function(r){var e=r.expectedIterationPaths,t=r.actual,i=r.customUserDescription,n=r.ruleName,s="Expecting: ",o=(0,_s.first)(t).image,a=` -but found: '`+o+"'";if(i)return s+i+a;var l=(0,_s.map)(e,function(u){return"["+(0,_s.map)(u,function(g){return(0,mf.tokenLabel)(g)}).join(",")+"]"}),c=`expecting at least one iteration which starts with one of these possible Token sequences:: - `+("<"+l.join(" ,")+">");return s+c+a}};Object.freeze(Ra.defaultParserErrorProvider);Ra.defaultGrammarResolverErrorProvider={buildRuleNotFoundError:function(r,e){var t="Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- -inside top level rule: ->`+r.name+"<-";return t}};Ra.defaultGrammarValidatorErrorProvider={buildDuplicateFoundError:function(r,e){function t(u){return u instanceof Ox.Terminal?u.terminalType.name:u instanceof Ox.NonTerminal?u.nonTerminalName:""}var i=r.name,n=(0,_s.first)(e),s=n.idx,o=(0,jq.getProductionDslName)(n),a=t(n),l=s>0,c="->"+o+(l?s:"")+"<- "+(a?"with argument: ->"+a+"<-":"")+` - appears more than once (`+e.length+" times) in the top level rule: ->"+i+`<-. - For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES - `;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,` -`),c},buildNamespaceConflictError:function(r){var e=`Namespace conflict found in grammar. -`+("The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+r.name+`>. -`)+`To resolve this make sure each Terminal and Non-Terminal names are unique -This is easy to accomplish by using the convention that Terminal names start with an uppercase letter -and Non-Terminal names start with a lower case letter.`;return e},buildAlternationPrefixAmbiguityError:function(r){var e=(0,_s.map)(r.prefixPath,function(n){return(0,mf.tokenLabel)(n)}).join(", "),t=r.alternation.idx===0?"":r.alternation.idx,i="Ambiguous alternatives: <"+r.ambiguityIndices.join(" ,")+`> due to common lookahead prefix -`+("in inside <"+r.topLevelRule.name+`> Rule, -`)+("<"+e+`> may appears as a prefix path in all these alternatives. -`)+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX -For Further details.`;return i},buildAlternationAmbiguityError:function(r){var e=(0,_s.map)(r.prefixPath,function(n){return(0,mf.tokenLabel)(n)}).join(", "),t=r.alternation.idx===0?"":r.alternation.idx,i="Ambiguous Alternatives Detected: <"+r.ambiguityIndices.join(" ,")+"> in "+(" inside <"+r.topLevelRule.name+`> Rule, -`)+("<"+e+`> may appears as a prefix path in all these alternatives. -`);return i=i+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES -For Further details.`,i},buildEmptyRepetitionError:function(r){var e=(0,jq.getProductionDslName)(r.repetition);r.repetition.idx!==0&&(e+=r.repetition.idx);var t="The repetition <"+e+"> within Rule <"+r.topLevelRule.name+`> can never consume any tokens. -This could lead to an infinite loop.`;return t},buildTokenNameError:function(r){return"deprecated"},buildEmptyAlternationError:function(r){var e="Ambiguous empty alternative: <"+(r.emptyChoiceIdx+1)+">"+(" in inside <"+r.topLevelRule.name+`> Rule. -`)+"Only the last alternative may be an empty alternative.";return e},buildTooManyAlternativesError:function(r){var e=`An Alternation cannot have more than 256 alternatives: -`+(" inside <"+r.topLevelRule.name+`> Rule. - has `+(r.alternation.definition.length+1)+" alternatives.");return e},buildLeftRecursionError:function(r){var e=r.topLevelRule.name,t=twe.map(r.leftRecursionPath,function(s){return s.name}),i=e+" --> "+t.concat([e]).join(" --> "),n=`Left Recursion found in grammar. -`+("rule: <"+e+`> can be invoked from itself (directly or indirectly) -`)+(`without consuming any Tokens. The grammar path that causes this is: - `+i+` -`)+` To fix this refactor your grammar to remove the left recursion. -see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;return n},buildInvalidRuleNameError:function(r){return"deprecated"},buildDuplicateRuleNameError:function(r){var e;r.topLevelRule instanceof Ox.Rule?e=r.topLevelRule.name:e=r.topLevelRule;var t="Duplicate definition, rule: ->"+e+"<- is already defined in the grammar: ->"+r.grammarName+"<-";return t}}});var Wq=y(GA=>{"use strict";var rwe=GA&&GA.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(GA,"__esModule",{value:!0});GA.GastRefResolverVisitor=GA.resolveGrammar=void 0;var iwe=Hn(),qq=Gt(),nwe=Cf();function swe(r,e){var t=new Jq(r,e);return t.resolveRefs(),t.errors}GA.resolveGrammar=swe;var Jq=function(r){rwe(e,r);function e(t,i){var n=r.call(this)||this;return n.nameToTopRule=t,n.errMsgProvider=i,n.errors=[],n}return e.prototype.resolveRefs=function(){var t=this;(0,qq.forEach)((0,qq.values)(this.nameToTopRule),function(i){t.currTopLevel=i,i.accept(t)})},e.prototype.visitNonTerminal=function(t){var i=this.nameToTopRule[t.nonTerminalName];if(i)t.referencedRule=i;else{var n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:iwe.ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}},e}(nwe.GAstVisitor);GA.GastRefResolverVisitor=Jq});var $d=y(Lr=>{"use strict";var Fc=Lr&&Lr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Lr,"__esModule",{value:!0});Lr.nextPossibleTokensAfter=Lr.possiblePathsFrom=Lr.NextTerminalAfterAtLeastOneSepWalker=Lr.NextTerminalAfterAtLeastOneWalker=Lr.NextTerminalAfterManySepWalker=Lr.NextTerminalAfterManyWalker=Lr.AbstractNextTerminalAfterProductionWalker=Lr.NextAfterTokenWalker=Lr.AbstractNextPossibleTokensWalker=void 0;var zq=My(),Ut=Gt(),owe=Tx(),Dt=Cn(),Vq=function(r){Fc(e,r);function e(t,i){var n=r.call(this)||this;return n.topProd=t,n.path=i,n.possibleTokTypes=[],n.nextProductionName="",n.nextProductionOccurrence=0,n.found=!1,n.isAtEndOfPath=!1,n}return e.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=(0,Ut.cloneArr)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,Ut.cloneArr)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},e.prototype.walk=function(t,i){i===void 0&&(i=[]),this.found||r.prototype.walk.call(this,t,i)},e.prototype.walkProdRef=function(t,i,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){var s=i.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,s)}},e.prototype.updateExpectedNext=function(){(0,Ut.isEmpty)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},e}(zq.RestWalker);Lr.AbstractNextPossibleTokensWalker=Vq;var awe=function(r){Fc(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.path=i,n.nextTerminalName="",n.nextTerminalOccurrence=0,n.nextTerminalName=n.path.lastTok.name,n.nextTerminalOccurrence=n.path.lastTokOccurrence,n}return e.prototype.walkTerminal=function(t,i,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){var s=i.concat(n),o=new Dt.Alternative({definition:s});this.possibleTokTypes=(0,owe.first)(o),this.found=!0}},e}(Vq);Lr.NextAfterTokenWalker=awe;var Zd=function(r){Fc(e,r);function e(t,i){var n=r.call(this)||this;return n.topRule=t,n.occurrence=i,n.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},n}return e.prototype.startWalking=function(){return this.walk(this.topRule),this.result},e}(zq.RestWalker);Lr.AbstractNextTerminalAfterProductionWalker=Zd;var Awe=function(r){Fc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkMany=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Ut.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkMany.call(this,t,i,n)},e}(Zd);Lr.NextTerminalAfterManyWalker=Awe;var lwe=function(r){Fc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkManySep=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Ut.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkManySep.call(this,t,i,n)},e}(Zd);Lr.NextTerminalAfterManySepWalker=lwe;var cwe=function(r){Fc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkAtLeastOne=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Ut.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkAtLeastOne.call(this,t,i,n)},e}(Zd);Lr.NextTerminalAfterAtLeastOneWalker=cwe;var uwe=function(r){Fc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkAtLeastOneSep=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Ut.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkAtLeastOneSep.call(this,t,i,n)},e}(Zd);Lr.NextTerminalAfterAtLeastOneSepWalker=uwe;function Xq(r,e,t){t===void 0&&(t=[]),t=(0,Ut.cloneArr)(t);var i=[],n=0;function s(c){return c.concat((0,Ut.drop)(r,n+1))}function o(c){var u=Xq(s(c),e,t);return i.concat(u)}for(;t.length=0;ge--){var _=B.definition[ge],L={idx:p,def:_.definition.concat((0,Ut.drop)(h)),ruleStack:C,occurrenceStack:w};g.push(L),g.push(o)}else if(B instanceof Dt.Alternative)g.push({idx:p,def:B.definition.concat((0,Ut.drop)(h)),ruleStack:C,occurrenceStack:w});else if(B instanceof Dt.Rule)g.push(fwe(B,p,C,w));else throw Error("non exhaustive match")}}return u}Lr.nextPossibleTokensAfter=gwe;function fwe(r,e,t,i){var n=(0,Ut.cloneArr)(t);n.push(r.name);var s=(0,Ut.cloneArr)(i);return s.push(1),{idx:e,def:r.definition,ruleStack:n,occurrenceStack:s}}});var eC=y(_t=>{"use strict";var $q=_t&&_t.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(_t,"__esModule",{value:!0});_t.areTokenCategoriesNotUsed=_t.isStrictPrefixOfPath=_t.containsPath=_t.getLookaheadPathsForOptionalProd=_t.getLookaheadPathsForOr=_t.lookAheadSequenceFromAlternatives=_t.buildSingleAlternativeLookaheadFunction=_t.buildAlternativesLookAheadFunc=_t.buildLookaheadFuncForOptionalProd=_t.buildLookaheadFuncForOr=_t.getProdType=_t.PROD_TYPE=void 0;var sr=Gt(),_q=$d(),hwe=My(),jy=df(),YA=Cn(),pwe=Cf(),li;(function(r){r[r.OPTION=0]="OPTION",r[r.REPETITION=1]="REPETITION",r[r.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",r[r.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",r[r.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",r[r.ALTERNATION=5]="ALTERNATION"})(li=_t.PROD_TYPE||(_t.PROD_TYPE={}));function dwe(r){if(r instanceof YA.Option)return li.OPTION;if(r instanceof YA.Repetition)return li.REPETITION;if(r instanceof YA.RepetitionMandatory)return li.REPETITION_MANDATORY;if(r instanceof YA.RepetitionMandatoryWithSeparator)return li.REPETITION_MANDATORY_WITH_SEPARATOR;if(r instanceof YA.RepetitionWithSeparator)return li.REPETITION_WITH_SEPARATOR;if(r instanceof YA.Alternation)return li.ALTERNATION;throw Error("non exhaustive match")}_t.getProdType=dwe;function Cwe(r,e,t,i,n,s){var o=tJ(r,e,t),a=Kx(o)?jy.tokenStructuredMatcherNoCategories:jy.tokenStructuredMatcher;return s(o,i,a,n)}_t.buildLookaheadFuncForOr=Cwe;function mwe(r,e,t,i,n,s){var o=rJ(r,e,n,t),a=Kx(o)?jy.tokenStructuredMatcherNoCategories:jy.tokenStructuredMatcher;return s(o[0],a,i)}_t.buildLookaheadFuncForOptionalProd=mwe;function Ewe(r,e,t,i){var n=r.length,s=(0,sr.every)(r,function(l){return(0,sr.every)(l,function(c){return c.length===1})});if(e)return function(l){for(var c=(0,sr.map)(l,function(D){return D.GATE}),u=0;u{"use strict";var Hx=zt&&zt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(zt,"__esModule",{value:!0});zt.checkPrefixAlternativesAmbiguities=zt.validateSomeNonEmptyLookaheadPath=zt.validateTooManyAlts=zt.RepetionCollector=zt.validateAmbiguousAlternationAlternatives=zt.validateEmptyOrAlternative=zt.getFirstNoneTerminal=zt.validateNoLeftRecursion=zt.validateRuleIsOverridden=zt.validateRuleDoesNotAlreadyExist=zt.OccurrenceValidationCollector=zt.identifyProductionForDuplicates=zt.validateGrammar=void 0;var er=Gt(),Sr=Gt(),No=Hn(),Gx=Xd(),Ef=eC(),bwe=$d(),Zs=Cn(),Yx=Cf();function Qwe(r,e,t,i,n){var s=er.map(r,function(h){return Swe(h,i)}),o=er.map(r,function(h){return jx(h,h,i)}),a=[],l=[],c=[];(0,Sr.every)(o,Sr.isEmpty)&&(a=(0,Sr.map)(r,function(h){return AJ(h,i)}),l=(0,Sr.map)(r,function(h){return lJ(h,e,i)}),c=gJ(r,e,i));var u=Pwe(r,t,i),g=(0,Sr.map)(r,function(h){return uJ(h,i)}),f=(0,Sr.map)(r,function(h){return aJ(h,r,n,i)});return er.flatten(s.concat(c,o,a,l,u,g,f))}zt.validateGrammar=Qwe;function Swe(r,e){var t=new oJ;r.accept(t);var i=t.allProductions,n=er.groupBy(i,nJ),s=er.pick(n,function(a){return a.length>1}),o=er.map(er.values(s),function(a){var l=er.first(a),c=e.buildDuplicateFoundError(r,a),u=(0,Gx.getProductionDslName)(l),g={message:c,type:No.ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,ruleName:r.name,dslName:u,occurrence:l.idx},f=sJ(l);return f&&(g.parameter=f),g});return o}function nJ(r){return(0,Gx.getProductionDslName)(r)+"_#_"+r.idx+"_#_"+sJ(r)}zt.identifyProductionForDuplicates=nJ;function sJ(r){return r instanceof Zs.Terminal?r.terminalType.name:r instanceof Zs.NonTerminal?r.nonTerminalName:""}var oJ=function(r){Hx(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.allProductions=[],t}return e.prototype.visitNonTerminal=function(t){this.allProductions.push(t)},e.prototype.visitOption=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e.prototype.visitAlternation=function(t){this.allProductions.push(t)},e.prototype.visitTerminal=function(t){this.allProductions.push(t)},e}(Yx.GAstVisitor);zt.OccurrenceValidationCollector=oJ;function aJ(r,e,t,i){var n=[],s=(0,Sr.reduce)(e,function(a,l){return l.name===r.name?a+1:a},0);if(s>1){var o=i.buildDuplicateRuleNameError({topLevelRule:r,grammarName:t});n.push({message:o,type:No.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:r.name})}return n}zt.validateRuleDoesNotAlreadyExist=aJ;function vwe(r,e,t){var i=[],n;return er.contains(e,r)||(n="Invalid rule override, rule: ->"+r+"<- cannot be overridden in the grammar: ->"+t+"<-as it is not defined in any of the super grammars ",i.push({message:n,type:No.ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,ruleName:r})),i}zt.validateRuleIsOverridden=vwe;function jx(r,e,t,i){i===void 0&&(i=[]);var n=[],s=tC(e.definition);if(er.isEmpty(s))return[];var o=r.name,a=er.contains(s,r);a&&n.push({message:t.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:i}),type:No.ParserDefinitionErrorType.LEFT_RECURSION,ruleName:o});var l=er.difference(s,i.concat([r])),c=er.map(l,function(u){var g=er.cloneArr(i);return g.push(u),jx(r,u,t,g)});return n.concat(er.flatten(c))}zt.validateNoLeftRecursion=jx;function tC(r){var e=[];if(er.isEmpty(r))return e;var t=er.first(r);if(t instanceof Zs.NonTerminal)e.push(t.referencedRule);else if(t instanceof Zs.Alternative||t instanceof Zs.Option||t instanceof Zs.RepetitionMandatory||t instanceof Zs.RepetitionMandatoryWithSeparator||t instanceof Zs.RepetitionWithSeparator||t instanceof Zs.Repetition)e=e.concat(tC(t.definition));else if(t instanceof Zs.Alternation)e=er.flatten(er.map(t.definition,function(o){return tC(o.definition)}));else if(!(t instanceof Zs.Terminal))throw Error("non exhaustive match");var i=(0,Gx.isOptionalProd)(t),n=r.length>1;if(i&&n){var s=er.drop(r);return e.concat(tC(s))}else return e}zt.getFirstNoneTerminal=tC;var qx=function(r){Hx(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.alternations=[],t}return e.prototype.visitAlternation=function(t){this.alternations.push(t)},e}(Yx.GAstVisitor);function AJ(r,e){var t=new qx;r.accept(t);var i=t.alternations,n=er.reduce(i,function(s,o){var a=er.dropRight(o.definition),l=er.map(a,function(c,u){var g=(0,bwe.nextPossibleTokensAfter)([c],[],null,1);return er.isEmpty(g)?{message:e.buildEmptyAlternationError({topLevelRule:r,alternation:o,emptyChoiceIdx:u}),type:No.ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,ruleName:r.name,occurrence:o.idx,alternative:u+1}:null});return s.concat(er.compact(l))},[]);return n}zt.validateEmptyOrAlternative=AJ;function lJ(r,e,t){var i=new qx;r.accept(i);var n=i.alternations;n=(0,Sr.reject)(n,function(o){return o.ignoreAmbiguities===!0});var s=er.reduce(n,function(o,a){var l=a.idx,c=a.maxLookahead||e,u=(0,Ef.getLookaheadPathsForOr)(l,r,c,a),g=xwe(u,a,r,t),f=fJ(u,a,r,t);return o.concat(g,f)},[]);return s}zt.validateAmbiguousAlternationAlternatives=lJ;var cJ=function(r){Hx(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.allProductions=[],t}return e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e}(Yx.GAstVisitor);zt.RepetionCollector=cJ;function uJ(r,e){var t=new qx;r.accept(t);var i=t.alternations,n=er.reduce(i,function(s,o){return o.definition.length>255&&s.push({message:e.buildTooManyAlternativesError({topLevelRule:r,alternation:o}),type:No.ParserDefinitionErrorType.TOO_MANY_ALTS,ruleName:r.name,occurrence:o.idx}),s},[]);return n}zt.validateTooManyAlts=uJ;function gJ(r,e,t){var i=[];return(0,Sr.forEach)(r,function(n){var s=new cJ;n.accept(s);var o=s.allProductions;(0,Sr.forEach)(o,function(a){var l=(0,Ef.getProdType)(a),c=a.maxLookahead||e,u=a.idx,g=(0,Ef.getLookaheadPathsForOptionalProd)(u,n,l,c),f=g[0];if((0,Sr.isEmpty)((0,Sr.flatten)(f))){var h=t.buildEmptyRepetitionError({topLevelRule:n,repetition:a});i.push({message:h,type:No.ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name})}})}),i}zt.validateSomeNonEmptyLookaheadPath=gJ;function xwe(r,e,t,i){var n=[],s=(0,Sr.reduce)(r,function(a,l,c){return e.definition[c].ignoreAmbiguities===!0||(0,Sr.forEach)(l,function(u){var g=[c];(0,Sr.forEach)(r,function(f,h){c!==h&&(0,Ef.containsPath)(f,u)&&e.definition[h].ignoreAmbiguities!==!0&&g.push(h)}),g.length>1&&!(0,Ef.containsPath)(n,u)&&(n.push(u),a.push({alts:g,path:u}))}),a},[]),o=er.map(s,function(a){var l=(0,Sr.map)(a.alts,function(u){return u+1}),c=i.buildAlternationAmbiguityError({topLevelRule:t,alternation:e,ambiguityIndices:l,prefixPath:a.path});return{message:c,type:No.ParserDefinitionErrorType.AMBIGUOUS_ALTS,ruleName:t.name,occurrence:e.idx,alternatives:[a.alts]}});return o}function fJ(r,e,t,i){var n=[],s=(0,Sr.reduce)(r,function(o,a,l){var c=(0,Sr.map)(a,function(u){return{idx:l,path:u}});return o.concat(c)},[]);return(0,Sr.forEach)(s,function(o){var a=e.definition[o.idx];if(a.ignoreAmbiguities!==!0){var l=o.idx,c=o.path,u=(0,Sr.findAll)(s,function(f){return e.definition[f.idx].ignoreAmbiguities!==!0&&f.idx{"use strict";Object.defineProperty(If,"__esModule",{value:!0});If.validateGrammar=If.resolveGrammar=void 0;var Wx=Gt(),Dwe=Wq(),kwe=Jx(),hJ=_d();function Rwe(r){r=(0,Wx.defaults)(r,{errMsgProvider:hJ.defaultGrammarResolverErrorProvider});var e={};return(0,Wx.forEach)(r.rules,function(t){e[t.name]=t}),(0,Dwe.resolveGrammar)(e,r.errMsgProvider)}If.resolveGrammar=Rwe;function Fwe(r){return r=(0,Wx.defaults)(r,{errMsgProvider:hJ.defaultGrammarValidatorErrorProvider}),(0,kwe.validateGrammar)(r.rules,r.maxLookahead,r.tokenTypes,r.errMsgProvider,r.grammarName)}If.validateGrammar=Fwe});var yf=y(En=>{"use strict";var rC=En&&En.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(En,"__esModule",{value:!0});En.EarlyExitException=En.NotAllInputParsedException=En.NoViableAltException=En.MismatchedTokenException=En.isRecognitionException=void 0;var Nwe=Gt(),dJ="MismatchedTokenException",CJ="NoViableAltException",mJ="EarlyExitException",EJ="NotAllInputParsedException",IJ=[dJ,CJ,mJ,EJ];Object.freeze(IJ);function Twe(r){return(0,Nwe.contains)(IJ,r.name)}En.isRecognitionException=Twe;var qy=function(r){rC(e,r);function e(t,i){var n=this.constructor,s=r.call(this,t)||this;return s.token=i,s.resyncedTokens=[],Object.setPrototypeOf(s,n.prototype),Error.captureStackTrace&&Error.captureStackTrace(s,s.constructor),s}return e}(Error),Lwe=function(r){rC(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=dJ,s}return e}(qy);En.MismatchedTokenException=Lwe;var Owe=function(r){rC(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=CJ,s}return e}(qy);En.NoViableAltException=Owe;var Mwe=function(r){rC(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.name=EJ,n}return e}(qy);En.NotAllInputParsedException=Mwe;var Uwe=function(r){rC(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=mJ,s}return e}(qy);En.EarlyExitException=Uwe});var Vx=y(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.attemptInRepetitionRecovery=Ki.Recoverable=Ki.InRuleRecoveryException=Ki.IN_RULE_RECOVERY_EXCEPTION=Ki.EOF_FOLLOW_KEY=void 0;var Jy=HA(),cs=Gt(),Kwe=yf(),Hwe=Lx(),Gwe=Hn();Ki.EOF_FOLLOW_KEY={};Ki.IN_RULE_RECOVERY_EXCEPTION="InRuleRecoveryException";function zx(r){this.name=Ki.IN_RULE_RECOVERY_EXCEPTION,this.message=r}Ki.InRuleRecoveryException=zx;zx.prototype=Error.prototype;var Ywe=function(){function r(){}return r.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,cs.has)(e,"recoveryEnabled")?e.recoveryEnabled:Gwe.DEFAULT_PARSER_CONFIG.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=yJ)},r.prototype.getTokenToInsert=function(e){var t=(0,Jy.createTokenInstance)(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t},r.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},r.prototype.tryInRepetitionRecovery=function(e,t,i,n){for(var s=this,o=this.findReSyncTokenType(),a=this.exportLexerState(),l=[],c=!1,u=this.LA(1),g=this.LA(1),f=function(){var h=s.LA(0),p=s.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:u,previous:h,ruleName:s.getCurrRuleFullName()}),C=new Kwe.MismatchedTokenException(p,u,s.LA(0));C.resyncedTokens=(0,cs.dropRight)(l),s.SAVE_ERROR(C)};!c;)if(this.tokenMatcher(g,n)){f();return}else if(i.call(this)){f(),e.apply(this,t);return}else this.tokenMatcher(g,o)?c=!0:(g=this.SKIP_TOKEN(),this.addToResyncTokens(g,l));this.importLexerState(a)},r.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,i){return!(i===!1||e===void 0||t===void 0||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))},r.prototype.getFollowsForInRuleRecovery=function(e,t){var i=this.getCurrentGrammarPath(e,t),n=this.getNextPossibleTokenTypes(i);return n},r.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t)){var i=this.getTokenToInsert(e);return i}if(this.canRecoverWithSingleTokenDeletion(e)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new zx("sad sad panda")},r.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},r.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var i=this;if(!this.canTokenTypeBeInsertedInRecovery(e)||(0,cs.isEmpty)(t))return!1;var n=this.LA(1),s=(0,cs.find)(t,function(o){return i.tokenMatcher(n,o)})!==void 0;return s},r.prototype.canRecoverWithSingleTokenDeletion=function(e){var t=this.tokenMatcher(this.LA(2),e);return t},r.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),i=this.getFollowSetFromFollowKey(t);return(0,cs.contains)(i,e)},r.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),i=2;;){var n=t.tokenType;if((0,cs.contains)(e,n))return n;t=this.LA(i),i++}},r.prototype.getCurrFollowKey=function(){if(this.RULE_STACK.length===1)return Ki.EOF_FOLLOW_KEY;var e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),i=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(i)}},r.prototype.buildFullFollowKeyStack=function(){var e=this,t=this.RULE_STACK,i=this.RULE_OCCURRENCE_STACK;return(0,cs.map)(t,function(n,s){return s===0?Ki.EOF_FOLLOW_KEY:{ruleName:e.shortRuleNameToFullName(n),idxInCallingRule:i[s],inRule:e.shortRuleNameToFullName(t[s-1])}})},r.prototype.flattenFollowSet=function(){var e=this,t=(0,cs.map)(this.buildFullFollowKeyStack(),function(i){return e.getFollowSetFromFollowKey(i)});return(0,cs.flatten)(t)},r.prototype.getFollowSetFromFollowKey=function(e){if(e===Ki.EOF_FOLLOW_KEY)return[Jy.EOF];var t=e.ruleName+e.idxInCallingRule+Hwe.IN+e.inRule;return this.resyncFollows[t]},r.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,Jy.EOF)||t.push(e),t},r.prototype.reSyncTo=function(e){for(var t=[],i=this.LA(1);this.tokenMatcher(i,e)===!1;)i=this.SKIP_TOKEN(),this.addToResyncTokens(i,t);return(0,cs.dropRight)(t)},r.prototype.attemptInRepetitionRecovery=function(e,t,i,n,s,o,a){},r.prototype.getCurrentGrammarPath=function(e,t){var i=this.getHumanReadableRuleStack(),n=(0,cs.cloneArr)(this.RULE_OCCURRENCE_STACK),s={ruleStack:i,occurrenceStack:n,lastTok:e,lastTokOccurrence:t};return s},r.prototype.getHumanReadableRuleStack=function(){var e=this;return(0,cs.map)(this.RULE_STACK,function(t){return e.shortRuleNameToFullName(t)})},r}();Ki.Recoverable=Ywe;function yJ(r,e,t,i,n,s,o){var a=this.getKeyForAutomaticLookahead(i,n),l=this.firstAfterRepMap[a];if(l===void 0){var c=this.getCurrRuleFullName(),u=this.getGAstProductions()[c],g=new s(u,n);l=g.startWalking(),this.firstAfterRepMap[a]=l}var f=l.token,h=l.occurrence,p=l.isEndOfRule;this.RULE_STACK.length===1&&p&&f===void 0&&(f=Jy.EOF,h=1),this.shouldInRepetitionRecoveryBeTried(f,h,o)&&this.tryInRepetitionRecovery(r,e,t,f)}Ki.attemptInRepetitionRecovery=yJ});var Wy=y(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.getKeyForAutomaticLookahead=qt.AT_LEAST_ONE_SEP_IDX=qt.MANY_SEP_IDX=qt.AT_LEAST_ONE_IDX=qt.MANY_IDX=qt.OPTION_IDX=qt.OR_IDX=qt.BITS_FOR_ALT_IDX=qt.BITS_FOR_RULE_IDX=qt.BITS_FOR_OCCURRENCE_IDX=qt.BITS_FOR_METHOD_TYPE=void 0;qt.BITS_FOR_METHOD_TYPE=4;qt.BITS_FOR_OCCURRENCE_IDX=8;qt.BITS_FOR_RULE_IDX=12;qt.BITS_FOR_ALT_IDX=8;qt.OR_IDX=1<{"use strict";Object.defineProperty(zy,"__esModule",{value:!0});zy.LooksAhead=void 0;var Fa=eC(),$s=Gt(),wJ=Hn(),Na=Wy(),Nc=Xd(),qwe=function(){function r(){}return r.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=(0,$s.has)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:wJ.DEFAULT_PARSER_CONFIG.dynamicTokensEnabled,this.maxLookahead=(0,$s.has)(e,"maxLookahead")?e.maxLookahead:wJ.DEFAULT_PARSER_CONFIG.maxLookahead,this.lookAheadFuncsCache=(0,$s.isES2015MapSupported)()?new Map:[],(0,$s.isES2015MapSupported)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},r.prototype.preComputeLookaheadFunctions=function(e){var t=this;(0,$s.forEach)(e,function(i){t.TRACE_INIT(i.name+" Rule Lookahead",function(){var n=(0,Nc.collectMethods)(i),s=n.alternation,o=n.repetition,a=n.option,l=n.repetitionMandatory,c=n.repetitionMandatoryWithSeparator,u=n.repetitionWithSeparator;(0,$s.forEach)(s,function(g){var f=g.idx===0?"":g.idx;t.TRACE_INIT(""+(0,Nc.getProductionDslName)(g)+f,function(){var h=(0,Fa.buildLookaheadFuncForOr)(g.idx,i,g.maxLookahead||t.maxLookahead,g.hasPredicates,t.dynamicTokensEnabled,t.lookAheadBuilderForAlternatives),p=(0,Na.getKeyForAutomaticLookahead)(t.fullRuleNameToShort[i.name],Na.OR_IDX,g.idx);t.setLaFuncCache(p,h)})}),(0,$s.forEach)(o,function(g){t.computeLookaheadFunc(i,g.idx,Na.MANY_IDX,Fa.PROD_TYPE.REPETITION,g.maxLookahead,(0,Nc.getProductionDslName)(g))}),(0,$s.forEach)(a,function(g){t.computeLookaheadFunc(i,g.idx,Na.OPTION_IDX,Fa.PROD_TYPE.OPTION,g.maxLookahead,(0,Nc.getProductionDslName)(g))}),(0,$s.forEach)(l,function(g){t.computeLookaheadFunc(i,g.idx,Na.AT_LEAST_ONE_IDX,Fa.PROD_TYPE.REPETITION_MANDATORY,g.maxLookahead,(0,Nc.getProductionDslName)(g))}),(0,$s.forEach)(c,function(g){t.computeLookaheadFunc(i,g.idx,Na.AT_LEAST_ONE_SEP_IDX,Fa.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,g.maxLookahead,(0,Nc.getProductionDslName)(g))}),(0,$s.forEach)(u,function(g){t.computeLookaheadFunc(i,g.idx,Na.MANY_SEP_IDX,Fa.PROD_TYPE.REPETITION_WITH_SEPARATOR,g.maxLookahead,(0,Nc.getProductionDslName)(g))})})})},r.prototype.computeLookaheadFunc=function(e,t,i,n,s,o){var a=this;this.TRACE_INIT(""+o+(t===0?"":t),function(){var l=(0,Fa.buildLookaheadFuncForOptionalProd)(t,e,s||a.maxLookahead,a.dynamicTokensEnabled,n,a.lookAheadBuilderForOptional),c=(0,Na.getKeyForAutomaticLookahead)(a.fullRuleNameToShort[e.name],i,t);a.setLaFuncCache(c,l)})},r.prototype.lookAheadBuilderForOptional=function(e,t,i){return(0,Fa.buildSingleAlternativeLookaheadFunction)(e,t,i)},r.prototype.lookAheadBuilderForAlternatives=function(e,t,i,n){return(0,Fa.buildAlternativesLookAheadFunc)(e,t,i,n)},r.prototype.getKeyForAutomaticLookahead=function(e,t){var i=this.getLastExplicitRuleShortName();return(0,Na.getKeyForAutomaticLookahead)(i,e,t)},r.prototype.getLaFuncFromCache=function(e){},r.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},r.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},r.prototype.setLaFuncCache=function(e,t){},r.prototype.setLaFuncCacheUsingMap=function(e,t){this.lookAheadFuncsCache.set(e,t)},r.prototype.setLaFuncUsingObj=function(e,t){this.lookAheadFuncsCache[e]=t},r}();zy.LooksAhead=qwe});var bJ=y(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.addNoneTerminalToCst=To.addTerminalToCst=To.setNodeLocationFull=To.setNodeLocationOnlyOffset=void 0;function Jwe(r,e){isNaN(r.startOffset)===!0?(r.startOffset=e.startOffset,r.endOffset=e.endOffset):r.endOffset{"use strict";Object.defineProperty(jA,"__esModule",{value:!0});jA.defineNameProp=jA.functionName=jA.classNameFromInstance=void 0;var Xwe=Gt();function _we(r){return SJ(r.constructor)}jA.classNameFromInstance=_we;var QJ="name";function SJ(r){var e=r.name;return e||"anonymous"}jA.functionName=SJ;function Zwe(r,e){var t=Object.getOwnPropertyDescriptor(r,QJ);return(0,Xwe.isUndefined)(t)||t.configurable?(Object.defineProperty(r,QJ,{enumerable:!1,configurable:!0,writable:!1,value:e}),!0):!1}jA.defineNameProp=Zwe});var kJ=y(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.validateRedundantMethods=vi.validateMissingCstMethods=vi.validateVisitor=vi.CstVisitorDefinitionError=vi.createBaseVisitorConstructorWithDefaults=vi.createBaseSemanticVisitorConstructor=vi.defaultVisit=void 0;var us=Gt(),iC=Xx();function vJ(r,e){for(var t=(0,us.keys)(r),i=t.length,n=0;n: - `+(""+s.join(` - -`).replace(/\n/g,` - `)))}}};return t.prototype=i,t.prototype.constructor=t,t._RULE_NAMES=e,t}vi.createBaseSemanticVisitorConstructor=$we;function eBe(r,e,t){var i=function(){};(0,iC.defineNameProp)(i,r+"BaseSemanticsWithDefaults");var n=Object.create(t.prototype);return(0,us.forEach)(e,function(s){n[s]=vJ}),i.prototype=n,i.prototype.constructor=i,i}vi.createBaseVisitorConstructorWithDefaults=eBe;var _x;(function(r){r[r.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",r[r.MISSING_METHOD=1]="MISSING_METHOD"})(_x=vi.CstVisitorDefinitionError||(vi.CstVisitorDefinitionError={}));function xJ(r,e){var t=PJ(r,e),i=DJ(r,e);return t.concat(i)}vi.validateVisitor=xJ;function PJ(r,e){var t=(0,us.map)(e,function(i){if(!(0,us.isFunction)(r[i]))return{msg:"Missing visitor method: <"+i+"> on "+(0,iC.functionName)(r.constructor)+" CST Visitor.",type:_x.MISSING_METHOD,methodName:i}});return(0,us.compact)(t)}vi.validateMissingCstMethods=PJ;var tBe=["constructor","visit","validateVisitor"];function DJ(r,e){var t=[];for(var i in r)(0,us.isFunction)(r[i])&&!(0,us.contains)(tBe,i)&&!(0,us.contains)(e,i)&&t.push({msg:"Redundant visitor method: <"+i+"> on "+(0,iC.functionName)(r.constructor)+` CST Visitor -There is no Grammar Rule corresponding to this method's name. -`,type:_x.REDUNDANT_METHOD,methodName:i});return t}vi.validateRedundantMethods=DJ});var FJ=y(Vy=>{"use strict";Object.defineProperty(Vy,"__esModule",{value:!0});Vy.TreeBuilder=void 0;var wf=bJ(),ti=Gt(),RJ=kJ(),rBe=Hn(),iBe=function(){function r(){}return r.prototype.initTreeBuilder=function(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(0,ti.has)(e,"nodeLocationTracking")?e.nodeLocationTracking:rBe.DEFAULT_PARSER_CONFIG.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=ti.NOOP,this.cstFinallyStateUpdate=ti.NOOP,this.cstPostTerminal=ti.NOOP,this.cstPostNonTerminal=ti.NOOP,this.cstPostRule=ti.NOOP;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=wf.setNodeLocationFull,this.setNodeLocationFromNode=wf.setNodeLocationFull,this.cstPostRule=ti.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=ti.NOOP,this.setNodeLocationFromNode=ti.NOOP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=wf.setNodeLocationOnlyOffset,this.setNodeLocationFromNode=wf.setNodeLocationOnlyOffset,this.cstPostRule=ti.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=ti.NOOP,this.setNodeLocationFromNode=ti.NOOP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=ti.NOOP,this.setNodeLocationFromNode=ti.NOOP,this.cstPostRule=ti.NOOP,this.setInitialNodeLocation=ti.NOOP;else throw Error('Invalid config option: "'+e.nodeLocationTracking+'"')},r.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(e){e.location={startOffset:NaN,endOffset:NaN}},r.prototype.setInitialNodeLocationOnlyOffsetRegular=function(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},r.prototype.setInitialNodeLocationFullRecovery=function(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},r.prototype.setInitialNodeLocationFullRegular=function(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},r.prototype.cstInvocationStateUpdate=function(e,t){var i={name:e,children:{}};this.setInitialNodeLocation(i),this.CST_STACK.push(i)},r.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},r.prototype.cstPostRuleFull=function(e){var t=this.LA(0),i=e.location;i.startOffset<=t.startOffset?(i.endOffset=t.endOffset,i.endLine=t.endLine,i.endColumn=t.endColumn):(i.startOffset=NaN,i.startLine=NaN,i.startColumn=NaN)},r.prototype.cstPostRuleOnlyOffset=function(e){var t=this.LA(0),i=e.location;i.startOffset<=t.startOffset?i.endOffset=t.endOffset:i.startOffset=NaN},r.prototype.cstPostTerminal=function(e,t){var i=this.CST_STACK[this.CST_STACK.length-1];(0,wf.addTerminalToCst)(i,t,e),this.setNodeLocationFromToken(i.location,t)},r.prototype.cstPostNonTerminal=function(e,t){var i=this.CST_STACK[this.CST_STACK.length-1];(0,wf.addNoneTerminalToCst)(i,t,e),this.setNodeLocationFromNode(i.location,e.location)},r.prototype.getBaseCstVisitorConstructor=function(){if((0,ti.isUndefined)(this.baseCstVisitorConstructor)){var e=(0,RJ.createBaseSemanticVisitorConstructor)(this.className,(0,ti.keys)(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},r.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if((0,ti.isUndefined)(this.baseCstVisitorWithDefaultsConstructor)){var e=(0,RJ.createBaseVisitorConstructorWithDefaults)(this.className,(0,ti.keys)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor},r.prototype.getLastExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-1]},r.prototype.getPreviousExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-2]},r.prototype.getLastExplicitRuleOccurrenceIndex=function(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]},r}();Vy.TreeBuilder=iBe});var TJ=y(Xy=>{"use strict";Object.defineProperty(Xy,"__esModule",{value:!0});Xy.LexerAdapter=void 0;var NJ=Hn(),nBe=function(){function r(){}return r.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(r.prototype,"input",{get:function(){return this.tokVector},set:function(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length},enumerable:!1,configurable:!0}),r.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):NJ.END_OF_FILE},r.prototype.LA=function(e){var t=this.currIdx+e;return t<0||this.tokVectorLength<=t?NJ.END_OF_FILE:this.tokVector[t]},r.prototype.consumeToken=function(){this.currIdx++},r.prototype.exportLexerState=function(){return this.currIdx},r.prototype.importLexerState=function(e){this.currIdx=e},r.prototype.resetLexerState=function(){this.currIdx=-1},r.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},r.prototype.getLexerPosition=function(){return this.exportLexerState()},r}();Xy.LexerAdapter=nBe});var OJ=y(_y=>{"use strict";Object.defineProperty(_y,"__esModule",{value:!0});_y.RecognizerApi=void 0;var LJ=Gt(),sBe=yf(),Zx=Hn(),oBe=_d(),aBe=Jx(),ABe=Cn(),lBe=function(){function r(){}return r.prototype.ACTION=function(e){return e.call(this)},r.prototype.consume=function(e,t,i){return this.consumeInternal(t,e,i)},r.prototype.subrule=function(e,t,i){return this.subruleInternal(t,e,i)},r.prototype.option=function(e,t){return this.optionInternal(t,e)},r.prototype.or=function(e,t){return this.orInternal(t,e)},r.prototype.many=function(e,t){return this.manyInternal(e,t)},r.prototype.atLeastOne=function(e,t){return this.atLeastOneInternal(e,t)},r.prototype.CONSUME=function(e,t){return this.consumeInternal(e,0,t)},r.prototype.CONSUME1=function(e,t){return this.consumeInternal(e,1,t)},r.prototype.CONSUME2=function(e,t){return this.consumeInternal(e,2,t)},r.prototype.CONSUME3=function(e,t){return this.consumeInternal(e,3,t)},r.prototype.CONSUME4=function(e,t){return this.consumeInternal(e,4,t)},r.prototype.CONSUME5=function(e,t){return this.consumeInternal(e,5,t)},r.prototype.CONSUME6=function(e,t){return this.consumeInternal(e,6,t)},r.prototype.CONSUME7=function(e,t){return this.consumeInternal(e,7,t)},r.prototype.CONSUME8=function(e,t){return this.consumeInternal(e,8,t)},r.prototype.CONSUME9=function(e,t){return this.consumeInternal(e,9,t)},r.prototype.SUBRULE=function(e,t){return this.subruleInternal(e,0,t)},r.prototype.SUBRULE1=function(e,t){return this.subruleInternal(e,1,t)},r.prototype.SUBRULE2=function(e,t){return this.subruleInternal(e,2,t)},r.prototype.SUBRULE3=function(e,t){return this.subruleInternal(e,3,t)},r.prototype.SUBRULE4=function(e,t){return this.subruleInternal(e,4,t)},r.prototype.SUBRULE5=function(e,t){return this.subruleInternal(e,5,t)},r.prototype.SUBRULE6=function(e,t){return this.subruleInternal(e,6,t)},r.prototype.SUBRULE7=function(e,t){return this.subruleInternal(e,7,t)},r.prototype.SUBRULE8=function(e,t){return this.subruleInternal(e,8,t)},r.prototype.SUBRULE9=function(e,t){return this.subruleInternal(e,9,t)},r.prototype.OPTION=function(e){return this.optionInternal(e,0)},r.prototype.OPTION1=function(e){return this.optionInternal(e,1)},r.prototype.OPTION2=function(e){return this.optionInternal(e,2)},r.prototype.OPTION3=function(e){return this.optionInternal(e,3)},r.prototype.OPTION4=function(e){return this.optionInternal(e,4)},r.prototype.OPTION5=function(e){return this.optionInternal(e,5)},r.prototype.OPTION6=function(e){return this.optionInternal(e,6)},r.prototype.OPTION7=function(e){return this.optionInternal(e,7)},r.prototype.OPTION8=function(e){return this.optionInternal(e,8)},r.prototype.OPTION9=function(e){return this.optionInternal(e,9)},r.prototype.OR=function(e){return this.orInternal(e,0)},r.prototype.OR1=function(e){return this.orInternal(e,1)},r.prototype.OR2=function(e){return this.orInternal(e,2)},r.prototype.OR3=function(e){return this.orInternal(e,3)},r.prototype.OR4=function(e){return this.orInternal(e,4)},r.prototype.OR5=function(e){return this.orInternal(e,5)},r.prototype.OR6=function(e){return this.orInternal(e,6)},r.prototype.OR7=function(e){return this.orInternal(e,7)},r.prototype.OR8=function(e){return this.orInternal(e,8)},r.prototype.OR9=function(e){return this.orInternal(e,9)},r.prototype.MANY=function(e){this.manyInternal(0,e)},r.prototype.MANY1=function(e){this.manyInternal(1,e)},r.prototype.MANY2=function(e){this.manyInternal(2,e)},r.prototype.MANY3=function(e){this.manyInternal(3,e)},r.prototype.MANY4=function(e){this.manyInternal(4,e)},r.prototype.MANY5=function(e){this.manyInternal(5,e)},r.prototype.MANY6=function(e){this.manyInternal(6,e)},r.prototype.MANY7=function(e){this.manyInternal(7,e)},r.prototype.MANY8=function(e){this.manyInternal(8,e)},r.prototype.MANY9=function(e){this.manyInternal(9,e)},r.prototype.MANY_SEP=function(e){this.manySepFirstInternal(0,e)},r.prototype.MANY_SEP1=function(e){this.manySepFirstInternal(1,e)},r.prototype.MANY_SEP2=function(e){this.manySepFirstInternal(2,e)},r.prototype.MANY_SEP3=function(e){this.manySepFirstInternal(3,e)},r.prototype.MANY_SEP4=function(e){this.manySepFirstInternal(4,e)},r.prototype.MANY_SEP5=function(e){this.manySepFirstInternal(5,e)},r.prototype.MANY_SEP6=function(e){this.manySepFirstInternal(6,e)},r.prototype.MANY_SEP7=function(e){this.manySepFirstInternal(7,e)},r.prototype.MANY_SEP8=function(e){this.manySepFirstInternal(8,e)},r.prototype.MANY_SEP9=function(e){this.manySepFirstInternal(9,e)},r.prototype.AT_LEAST_ONE=function(e){this.atLeastOneInternal(0,e)},r.prototype.AT_LEAST_ONE1=function(e){return this.atLeastOneInternal(1,e)},r.prototype.AT_LEAST_ONE2=function(e){this.atLeastOneInternal(2,e)},r.prototype.AT_LEAST_ONE3=function(e){this.atLeastOneInternal(3,e)},r.prototype.AT_LEAST_ONE4=function(e){this.atLeastOneInternal(4,e)},r.prototype.AT_LEAST_ONE5=function(e){this.atLeastOneInternal(5,e)},r.prototype.AT_LEAST_ONE6=function(e){this.atLeastOneInternal(6,e)},r.prototype.AT_LEAST_ONE7=function(e){this.atLeastOneInternal(7,e)},r.prototype.AT_LEAST_ONE8=function(e){this.atLeastOneInternal(8,e)},r.prototype.AT_LEAST_ONE9=function(e){this.atLeastOneInternal(9,e)},r.prototype.AT_LEAST_ONE_SEP=function(e){this.atLeastOneSepFirstInternal(0,e)},r.prototype.AT_LEAST_ONE_SEP1=function(e){this.atLeastOneSepFirstInternal(1,e)},r.prototype.AT_LEAST_ONE_SEP2=function(e){this.atLeastOneSepFirstInternal(2,e)},r.prototype.AT_LEAST_ONE_SEP3=function(e){this.atLeastOneSepFirstInternal(3,e)},r.prototype.AT_LEAST_ONE_SEP4=function(e){this.atLeastOneSepFirstInternal(4,e)},r.prototype.AT_LEAST_ONE_SEP5=function(e){this.atLeastOneSepFirstInternal(5,e)},r.prototype.AT_LEAST_ONE_SEP6=function(e){this.atLeastOneSepFirstInternal(6,e)},r.prototype.AT_LEAST_ONE_SEP7=function(e){this.atLeastOneSepFirstInternal(7,e)},r.prototype.AT_LEAST_ONE_SEP8=function(e){this.atLeastOneSepFirstInternal(8,e)},r.prototype.AT_LEAST_ONE_SEP9=function(e){this.atLeastOneSepFirstInternal(9,e)},r.prototype.RULE=function(e,t,i){if(i===void 0&&(i=Zx.DEFAULT_RULE_CONFIG),(0,LJ.contains)(this.definedRulesNames,e)){var n=oBe.defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),s={message:n,type:Zx.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);var o=this.defineRule(e,t,i);return this[e]=o,o},r.prototype.OVERRIDE_RULE=function(e,t,i){i===void 0&&(i=Zx.DEFAULT_RULE_CONFIG);var n=[];n=n.concat((0,aBe.validateRuleIsOverridden)(e,this.definedRulesNames,this.className)),this.definitionErrors=this.definitionErrors.concat(n);var s=this.defineRule(e,t,i);return this[e]=s,s},r.prototype.BACKTRACK=function(e,t){return function(){this.isBackTrackingStack.push(1);var i=this.saveRecogState();try{return e.apply(this,t),!0}catch(n){if((0,sBe.isRecognitionException)(n))return!1;throw n}finally{this.reloadRecogState(i),this.isBackTrackingStack.pop()}}},r.prototype.getGAstProductions=function(){return this.gastProductionsCache},r.prototype.getSerializedGastProductions=function(){return(0,ABe.serializeGrammar)((0,LJ.values)(this.gastProductionsCache))},r}();_y.RecognizerApi=lBe});var HJ=y($y=>{"use strict";Object.defineProperty($y,"__esModule",{value:!0});$y.RecognizerEngine=void 0;var kr=Gt(),Gn=Wy(),Zy=yf(),MJ=eC(),Bf=$d(),UJ=Hn(),cBe=Vx(),KJ=HA(),nC=df(),uBe=Xx(),gBe=function(){function r(){}return r.prototype.initRecognizerEngine=function(e,t){if(this.className=(0,uBe.classNameFromInstance)(this),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=nC.tokenStructuredMatcherNoCategories,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,kr.has)(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. - See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 - For Further details.`);if((0,kr.isArray)(e)){if((0,kr.isEmpty)(e))throw Error(`A Token Vocabulary cannot be empty. - Note that the first argument for the parser constructor - is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. - See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 - For Further details.`)}if((0,kr.isArray)(e))this.tokensMap=(0,kr.reduce)(e,function(o,a){return o[a.name]=a,o},{});else if((0,kr.has)(e,"modes")&&(0,kr.every)((0,kr.flatten)((0,kr.values)(e.modes)),nC.isTokenType)){var i=(0,kr.flatten)((0,kr.values)(e.modes)),n=(0,kr.uniq)(i);this.tokensMap=(0,kr.reduce)(n,function(o,a){return o[a.name]=a,o},{})}else if((0,kr.isObject)(e))this.tokensMap=(0,kr.cloneObj)(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=KJ.EOF;var s=(0,kr.every)((0,kr.values)(e),function(o){return(0,kr.isEmpty)(o.categoryMatches)});this.tokenMatcher=s?nC.tokenStructuredMatcherNoCategories:nC.tokenStructuredMatcher,(0,nC.augmentTokenTypes)((0,kr.values)(this.tokensMap))},r.prototype.defineRule=function(e,t,i){if(this.selfAnalysisDone)throw Error("Grammar rule <"+e+`> may not be defined after the 'performSelfAnalysis' method has been called' -Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);var n=(0,kr.has)(i,"resyncEnabled")?i.resyncEnabled:UJ.DEFAULT_RULE_CONFIG.resyncEnabled,s=(0,kr.has)(i,"recoveryValueFunc")?i.recoveryValueFunc:UJ.DEFAULT_RULE_CONFIG.recoveryValueFunc,o=this.ruleShortNameIdx<t},r.prototype.orInternal=function(e,t){var i=this.getKeyForAutomaticLookahead(Gn.OR_IDX,t),n=(0,kr.isArray)(e)?e:e.DEF,s=this.getLaFuncFromCache(i),o=s.call(this,n);if(o!==void 0){var a=n[o];return a.ALT.call(this)}this.raiseNoAltException(t,e.ERR_MSG)},r.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){var e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Zy.NotAllInputParsedException(t,e))}},r.prototype.subruleInternal=function(e,t,i){var n;try{var s=i!==void 0?i.ARGS:void 0;return n=e.call(this,t,s),this.cstPostNonTerminal(n,i!==void 0&&i.LABEL!==void 0?i.LABEL:e.ruleName),n}catch(o){this.subruleInternalError(o,i,e.ruleName)}},r.prototype.subruleInternalError=function(e,t,i){throw(0,Zy.isRecognitionException)(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:i),delete e.partialCstResult),e},r.prototype.consumeInternal=function(e,t,i){var n;try{var s=this.LA(1);this.tokenMatcher(s,e)===!0?(this.consumeToken(),n=s):this.consumeInternalError(e,s,i)}catch(o){n=this.consumeInternalRecovery(e,t,o)}return this.cstPostTerminal(i!==void 0&&i.LABEL!==void 0?i.LABEL:e.name,n),n},r.prototype.consumeInternalError=function(e,t,i){var n,s=this.LA(0);throw i!==void 0&&i.ERR_MSG?n=i.ERR_MSG:n=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Zy.MismatchedTokenException(n,t,s))},r.prototype.consumeInternalRecovery=function(e,t,i){if(this.recoveryEnabled&&i.name==="MismatchedTokenException"&&!this.isBackTracking()){var n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(s){throw s.name===cBe.IN_RULE_RECOVERY_EXCEPTION?i:s}}else throw i},r.prototype.saveRecogState=function(){var e=this.errors,t=(0,kr.cloneArr)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}},r.prototype.reloadRecogState=function(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK},r.prototype.ruleInvocationStateUpdate=function(e,t,i){this.RULE_OCCURRENCE_STACK.push(i),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t,e)},r.prototype.isBackTracking=function(){return this.isBackTrackingStack.length!==0},r.prototype.getCurrRuleFullName=function(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]},r.prototype.shortRuleNameToFullName=function(e){return this.shortRuleNameToFull[e]},r.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),KJ.EOF)},r.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},r}();$y.RecognizerEngine=gBe});var YJ=y(ew=>{"use strict";Object.defineProperty(ew,"__esModule",{value:!0});ew.ErrorHandler=void 0;var $x=yf(),eP=Gt(),GJ=eC(),fBe=Hn(),hBe=function(){function r(){}return r.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=(0,eP.has)(e,"errorMessageProvider")?e.errorMessageProvider:fBe.DEFAULT_PARSER_CONFIG.errorMessageProvider},r.prototype.SAVE_ERROR=function(e){if((0,$x.isRecognitionException)(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,eP.cloneArr)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(r.prototype,"errors",{get:function(){return(0,eP.cloneArr)(this._errors)},set:function(e){this._errors=e},enumerable:!1,configurable:!0}),r.prototype.raiseEarlyExitException=function(e,t,i){for(var n=this.getCurrRuleFullName(),s=this.getGAstProductions()[n],o=(0,GJ.getLookaheadPathsForOptionalProd)(e,s,t,this.maxLookahead),a=o[0],l=[],c=1;c<=this.maxLookahead;c++)l.push(this.LA(c));var u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:l,previous:this.LA(0),customUserDescription:i,ruleName:n});throw this.SAVE_ERROR(new $x.EarlyExitException(u,this.LA(1),this.LA(0)))},r.prototype.raiseNoAltException=function(e,t){for(var i=this.getCurrRuleFullName(),n=this.getGAstProductions()[i],s=(0,GJ.getLookaheadPathsForOr)(e,n,this.maxLookahead),o=[],a=1;a<=this.maxLookahead;a++)o.push(this.LA(a));var l=this.LA(0),c=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:o,previous:l,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new $x.NoViableAltException(c,this.LA(1),l))},r}();ew.ErrorHandler=hBe});var JJ=y(tw=>{"use strict";Object.defineProperty(tw,"__esModule",{value:!0});tw.ContentAssist=void 0;var jJ=$d(),qJ=Gt(),pBe=function(){function r(){}return r.prototype.initContentAssist=function(){},r.prototype.computeContentAssist=function(e,t){var i=this.gastProductionsCache[e];if((0,qJ.isUndefined)(i))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return(0,jJ.nextPossibleTokensAfter)([i],t,this.tokenMatcher,this.maxLookahead)},r.prototype.getNextPossibleTokenTypes=function(e){var t=(0,qJ.first)(e.ruleStack),i=this.getGAstProductions(),n=i[t],s=new jJ.NextAfterTokenWalker(n,e).startWalking();return s},r}();tw.ContentAssist=pBe});var e3=y(nw=>{"use strict";Object.defineProperty(nw,"__esModule",{value:!0});nw.GastRecorder=void 0;var In=Gt(),Lo=Cn(),dBe=Jd(),XJ=df(),_J=HA(),CBe=Hn(),mBe=Wy(),iw={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(iw);var WJ=!0,zJ=Math.pow(2,mBe.BITS_FOR_OCCURRENCE_IDX)-1,ZJ=(0,_J.createToken)({name:"RECORDING_PHASE_TOKEN",pattern:dBe.Lexer.NA});(0,XJ.augmentTokenTypes)([ZJ]);var $J=(0,_J.createTokenInstance)(ZJ,`This IToken indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze($J);var EBe={name:`This CSTNode indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},IBe=function(){function r(){}return r.prototype.initGastRecorder=function(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1},r.prototype.enableRecording=function(){var e=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",function(){for(var t=function(n){var s=n>0?n:"";e["CONSUME"+s]=function(o,a){return this.consumeInternalRecord(o,n,a)},e["SUBRULE"+s]=function(o,a){return this.subruleInternalRecord(o,n,a)},e["OPTION"+s]=function(o){return this.optionInternalRecord(o,n)},e["OR"+s]=function(o){return this.orInternalRecord(o,n)},e["MANY"+s]=function(o){this.manyInternalRecord(n,o)},e["MANY_SEP"+s]=function(o){this.manySepFirstInternalRecord(n,o)},e["AT_LEAST_ONE"+s]=function(o){this.atLeastOneInternalRecord(n,o)},e["AT_LEAST_ONE_SEP"+s]=function(o){this.atLeastOneSepFirstInternalRecord(n,o)}},i=0;i<10;i++)t(i);e.consume=function(n,s,o){return this.consumeInternalRecord(s,n,o)},e.subrule=function(n,s,o){return this.subruleInternalRecord(s,n,o)},e.option=function(n,s){return this.optionInternalRecord(s,n)},e.or=function(n,s){return this.orInternalRecord(s,n)},e.many=function(n,s){this.manyInternalRecord(n,s)},e.atLeastOne=function(n,s){this.atLeastOneInternalRecord(n,s)},e.ACTION=e.ACTION_RECORD,e.BACKTRACK=e.BACKTRACK_RECORD,e.LA=e.LA_RECORD})},r.prototype.disableRecording=function(){var e=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",function(){for(var t=0;t<10;t++){var i=t>0?t:"";delete e["CONSUME"+i],delete e["SUBRULE"+i],delete e["OPTION"+i],delete e["OR"+i],delete e["MANY"+i],delete e["MANY_SEP"+i],delete e["AT_LEAST_ONE"+i],delete e["AT_LEAST_ONE_SEP"+i]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})},r.prototype.ACTION_RECORD=function(e){},r.prototype.BACKTRACK_RECORD=function(e,t){return function(){return!0}},r.prototype.LA_RECORD=function(e){return CBe.END_OF_FILE},r.prototype.topLevelRuleRecord=function(e,t){try{var i=new Lo.Rule({definition:[],name:e});return i.name=e,this.recordingProdStack.push(i),t.call(this),this.recordingProdStack.pop(),i}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+` - This error was thrown during the "grammar recording phase" For more info see: - https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}},r.prototype.optionInternalRecord=function(e,t){return sC.call(this,Lo.Option,e,t)},r.prototype.atLeastOneInternalRecord=function(e,t){sC.call(this,Lo.RepetitionMandatory,t,e)},r.prototype.atLeastOneSepFirstInternalRecord=function(e,t){sC.call(this,Lo.RepetitionMandatoryWithSeparator,t,e,WJ)},r.prototype.manyInternalRecord=function(e,t){sC.call(this,Lo.Repetition,t,e)},r.prototype.manySepFirstInternalRecord=function(e,t){sC.call(this,Lo.RepetitionWithSeparator,t,e,WJ)},r.prototype.orInternalRecord=function(e,t){return yBe.call(this,e,t)},r.prototype.subruleInternalRecord=function(e,t,i){if(rw(t),!e||(0,In.has)(e,"ruleName")===!1){var n=new Error(" argument is invalid"+(" expecting a Parser method reference but got: <"+JSON.stringify(e)+">")+(` - inside top level rule: <`+this.recordingProdStack[0].name+">"));throw n.KNOWN_RECORDER_ERROR=!0,n}var s=(0,In.peek)(this.recordingProdStack),o=e.ruleName,a=new Lo.NonTerminal({idx:t,nonTerminalName:o,label:i==null?void 0:i.LABEL,referencedRule:void 0});return s.definition.push(a),this.outputCst?EBe:iw},r.prototype.consumeInternalRecord=function(e,t,i){if(rw(t),!(0,XJ.hasShortKeyProperty)(e)){var n=new Error(" argument is invalid"+(" expecting a TokenType reference but got: <"+JSON.stringify(e)+">")+(` - inside top level rule: <`+this.recordingProdStack[0].name+">"));throw n.KNOWN_RECORDER_ERROR=!0,n}var s=(0,In.peek)(this.recordingProdStack),o=new Lo.Terminal({idx:t,terminalType:e,label:i==null?void 0:i.LABEL});return s.definition.push(o),$J},r}();nw.GastRecorder=IBe;function sC(r,e,t,i){i===void 0&&(i=!1),rw(t);var n=(0,In.peek)(this.recordingProdStack),s=(0,In.isFunction)(e)?e:e.DEF,o=new r({definition:[],idx:t});return i&&(o.separator=e.SEP),(0,In.has)(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(o),s.call(this),n.definition.push(o),this.recordingProdStack.pop(),iw}function yBe(r,e){var t=this;rw(e);var i=(0,In.peek)(this.recordingProdStack),n=(0,In.isArray)(r)===!1,s=n===!1?r:r.DEF,o=new Lo.Alternation({definition:[],idx:e,ignoreAmbiguities:n&&r.IGNORE_AMBIGUITIES===!0});(0,In.has)(r,"MAX_LOOKAHEAD")&&(o.maxLookahead=r.MAX_LOOKAHEAD);var a=(0,In.some)(s,function(l){return(0,In.isFunction)(l.GATE)});return o.hasPredicates=a,i.definition.push(o),(0,In.forEach)(s,function(l){var c=new Lo.Alternative({definition:[]});o.definition.push(c),(0,In.has)(l,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:(0,In.has)(l,"GATE")&&(c.ignoreAmbiguities=!0),t.recordingProdStack.push(c),l.ALT.call(t),t.recordingProdStack.pop()}),iw}function VJ(r){return r===0?"":""+r}function rw(r){if(r<0||r>zJ){var e=new Error("Invalid DSL Method idx value: <"+r+`> - `+("Idx value must be a none negative value smaller than "+(zJ+1)));throw e.KNOWN_RECORDER_ERROR=!0,e}}});var r3=y(sw=>{"use strict";Object.defineProperty(sw,"__esModule",{value:!0});sw.PerformanceTracer=void 0;var t3=Gt(),wBe=Hn(),BBe=function(){function r(){}return r.prototype.initPerformanceTracer=function(e){if((0,t3.has)(e,"traceInitPerf")){var t=e.traceInitPerf,i=typeof t=="number";this.traceInitMaxIdent=i?t:1/0,this.traceInitPerf=i?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=wBe.DEFAULT_PARSER_CONFIG.traceInitPerf;this.traceInitIndent=-1},r.prototype.TRACE_INIT=function(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;var i=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <"+e+">");var n=(0,t3.timer)(t),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent time: "+s+"ms"),this.traceInitIndent--,o}else return t()},r}();sw.PerformanceTracer=BBe});var i3=y(ow=>{"use strict";Object.defineProperty(ow,"__esModule",{value:!0});ow.applyMixins=void 0;function bBe(r,e){e.forEach(function(t){var i=t.prototype;Object.getOwnPropertyNames(i).forEach(function(n){if(n!=="constructor"){var s=Object.getOwnPropertyDescriptor(i,n);s&&(s.get||s.set)?Object.defineProperty(r.prototype,n,s):r.prototype[n]=t.prototype[n]}})})}ow.applyMixins=bBe});var Hn=y(Cr=>{"use strict";var o3=Cr&&Cr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.EmbeddedActionsParser=Cr.CstParser=Cr.Parser=Cr.EMPTY_ALT=Cr.ParserDefinitionErrorType=Cr.DEFAULT_RULE_CONFIG=Cr.DEFAULT_PARSER_CONFIG=Cr.END_OF_FILE=void 0;var _i=Gt(),QBe=Yq(),n3=HA(),a3=_d(),s3=pJ(),SBe=Vx(),vBe=BJ(),xBe=FJ(),PBe=TJ(),DBe=OJ(),kBe=HJ(),RBe=YJ(),FBe=JJ(),NBe=e3(),TBe=r3(),LBe=i3();Cr.END_OF_FILE=(0,n3.createTokenInstance)(n3.EOF,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Cr.END_OF_FILE);Cr.DEFAULT_PARSER_CONFIG=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:a3.defaultParserErrorProvider,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1});Cr.DEFAULT_RULE_CONFIG=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});var OBe;(function(r){r[r.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",r[r.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",r[r.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",r[r.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",r[r.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",r[r.LEFT_RECURSION=5]="LEFT_RECURSION",r[r.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",r[r.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",r[r.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",r[r.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",r[r.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",r[r.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",r[r.TOO_MANY_ALTS=12]="TOO_MANY_ALTS"})(OBe=Cr.ParserDefinitionErrorType||(Cr.ParserDefinitionErrorType={}));function MBe(r){return r===void 0&&(r=void 0),function(){return r}}Cr.EMPTY_ALT=MBe;var aw=function(){function r(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;var i=this;if(i.initErrorHandler(t),i.initLexerAdapter(),i.initLooksAhead(t),i.initRecognizerEngine(e,t),i.initRecoverable(t),i.initTreeBuilder(t),i.initContentAssist(),i.initGastRecorder(t),i.initPerformanceTracer(t),(0,_i.has)(t,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. - Please use the flag on the relevant DSL method instead. - See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES - For further details.`);this.skipValidations=(0,_i.has)(t,"skipValidations")?t.skipValidations:Cr.DEFAULT_PARSER_CONFIG.skipValidations}return r.performSelfAnalysis=function(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")},r.prototype.performSelfAnalysis=function(){var e=this;this.TRACE_INIT("performSelfAnalysis",function(){var t;e.selfAnalysisDone=!0;var i=e.className;e.TRACE_INIT("toFastProps",function(){(0,_i.toFastProperties)(e)}),e.TRACE_INIT("Grammar Recording",function(){try{e.enableRecording(),(0,_i.forEach)(e.definedRulesNames,function(s){var o=e[s],a=o.originalGrammarAction,l=void 0;e.TRACE_INIT(s+" Rule",function(){l=e.topLevelRuleRecord(s,a)}),e.gastProductionsCache[s]=l})}finally{e.disableRecording()}});var n=[];if(e.TRACE_INIT("Grammar Resolving",function(){n=(0,s3.resolveGrammar)({rules:(0,_i.values)(e.gastProductionsCache)}),e.definitionErrors=e.definitionErrors.concat(n)}),e.TRACE_INIT("Grammar Validations",function(){if((0,_i.isEmpty)(n)&&e.skipValidations===!1){var s=(0,s3.validateGrammar)({rules:(0,_i.values)(e.gastProductionsCache),maxLookahead:e.maxLookahead,tokenTypes:(0,_i.values)(e.tokensMap),errMsgProvider:a3.defaultGrammarValidatorErrorProvider,grammarName:i});e.definitionErrors=e.definitionErrors.concat(s)}}),(0,_i.isEmpty)(e.definitionErrors)&&(e.recoveryEnabled&&e.TRACE_INIT("computeAllProdsFollows",function(){var s=(0,QBe.computeAllProdsFollows)((0,_i.values)(e.gastProductionsCache));e.resyncFollows=s}),e.TRACE_INIT("ComputeLookaheadFunctions",function(){e.preComputeLookaheadFunctions((0,_i.values)(e.gastProductionsCache))})),!r.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,_i.isEmpty)(e.definitionErrors))throw t=(0,_i.map)(e.definitionErrors,function(s){return s.message}),new Error(`Parser Definition Errors detected: - `+t.join(` -------------------------------- -`))})},r.DEFER_DEFINITION_ERRORS_HANDLING=!1,r}();Cr.Parser=aw;(0,LBe.applyMixins)(aw,[SBe.Recoverable,vBe.LooksAhead,xBe.TreeBuilder,PBe.LexerAdapter,kBe.RecognizerEngine,DBe.RecognizerApi,RBe.ErrorHandler,FBe.ContentAssist,NBe.GastRecorder,TBe.PerformanceTracer]);var UBe=function(r){o3(e,r);function e(t,i){i===void 0&&(i=Cr.DEFAULT_PARSER_CONFIG);var n=this,s=(0,_i.cloneObj)(i);return s.outputCst=!0,n=r.call(this,t,s)||this,n}return e}(aw);Cr.CstParser=UBe;var KBe=function(r){o3(e,r);function e(t,i){i===void 0&&(i=Cr.DEFAULT_PARSER_CONFIG);var n=this,s=(0,_i.cloneObj)(i);return s.outputCst=!1,n=r.call(this,t,s)||this,n}return e}(aw);Cr.EmbeddedActionsParser=KBe});var l3=y(Aw=>{"use strict";Object.defineProperty(Aw,"__esModule",{value:!0});Aw.createSyntaxDiagramsCode=void 0;var A3=Ix();function HBe(r,e){var t=e===void 0?{}:e,i=t.resourceBase,n=i===void 0?"https://unpkg.com/chevrotain@"+A3.VERSION+"/diagrams/":i,s=t.css,o=s===void 0?"https://unpkg.com/chevrotain@"+A3.VERSION+"/diagrams/diagrams.css":s,a=` - - - - - -`,l=` - -`,c=` -